*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #f0f4f8;
  color: #2d3748;
  min-height: 100vh;
}

header {
  background: linear-gradient(135deg, #008EAA 0%, #005f75 100%);
  color: white;
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
header h1 { font-size: 1.4rem; font-weight: 700; letter-spacing: 0.5px; }
header p { font-size: 0.85rem; opacity: 0.85; margin-top: 0.2rem; }

.login-wrap {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 4rem 1.5rem;
}

.login-panel {
  background: white;
  border: 1px solid #cbd5e0;
  border-radius: 8px;
  padding: 2rem;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

.login-panel h2 {
  font-size: 1rem;
  font-weight: 700;
  color: #4a5568;
  margin-bottom: 1.4rem;
  text-align: center;
}

.field { margin-bottom: 1rem; }
label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: #4a5568;
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
input[type="email"],
input[type="password"] {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #cbd5e0;
  border-radius: 5px;
  font-size: 0.85rem;
  background: #fafafa;
  color: #2d3748;
  transition: border-color 0.15s, box-shadow 0.15s;
  font-family: inherit;
}
input:focus {
  outline: none;
  border-color: #008EAA;
  box-shadow: 0 0 0 3px rgba(0,142,170,0.12);
  background: white;
}

.hint { font-size: 0.72rem; color: #a0aec0; margin-top: 0.3rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  padding: 0.65rem 1rem;
  font-size: 0.9rem; font-weight: 600;
  border-radius: 6px; border: none; cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  width: 100%;
  margin-top: 0.6rem;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-primary { background: #008EAA; color: white; }
.btn-primary:hover:not(:disabled) { background: #007a94; }

.error-msg {
  display: none;
  background: #fff5f5;
  border: 1px solid #fed7d7;
  color: #c53030;
  border-radius: 6px;
  padding: 0.75rem 1rem;
  font-size: 0.82rem;
  margin-top: 0.9rem;
}

.spinner-inline {
  display: none;
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
