/* Pure Exterior — Login page styles
   Matches the dashboard's brand palette: off-white background, blue accents,
   Inter for UI text, Cormorant Garamond for display headings.
*/

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

:root {
  --pe-blue:        #1a3a5c;
  --pe-blue-mid:    #2a5082;
  --pe-blue-light:  #4a7ab0;
  --pe-accent:      #3a6fa0;
  --pe-bg:          #f8f6f1;
  --pe-bg-card:     #ffffff;
  --pe-border:      #ddd9d0;
  --pe-text:        #1a1a1a;
  --pe-text-muted:  #666057;
  --pe-error-bg:    #fff2f0;
  --pe-error-text:  #c0392b;
  --pe-error-border:#e8b4b0;
  --pe-radius:      8px;
  --pe-shadow:      0 2px 16px rgba(26, 58, 92, 0.10), 0 1px 4px rgba(26, 58, 92, 0.06);
}

html, body {
  height: 100%;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background-color: var(--pe-bg);
  color: var(--pe-text);
  font-size: 14px;
  line-height: 1.5;
}

/* ── Page layout ─────────────────────────────────────────────────────────── */

.login-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  position: relative;
  overflow: hidden;
}

/* ── Brand block ─────────────────────────────────────────────────────────── */

.login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-bottom: 28px;
}

.login-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.login-brand-name {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--pe-blue);
  letter-spacing: 0.01em;
}

.login-brand-sub {
  font-size: 12px;
  color: var(--pe-text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ── Card ────────────────────────────────────────────────────────────────── */

.login-card {
  background: var(--pe-bg-card);
  border: 1px solid var(--pe-border);
  border-radius: var(--pe-radius);
  box-shadow: var(--pe-shadow);
  padding: 36px 40px;
  width: 100%;
  max-width: 380px;
}

.login-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--pe-blue);
  margin-bottom: 24px;
  text-align: center;
}

/* ── Form fields ─────────────────────────────────────────────────────────── */

.login-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 18px;
}

.login-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--pe-text);
}

.login-input {
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--pe-border);
  border-radius: 6px;
  font-family: inherit;
  font-size: 14px;
  color: var(--pe-text);
  background: var(--pe-bg);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.login-input:focus {
  border-color: var(--pe-blue-light);
  box-shadow: 0 0 0 3px rgba(74, 122, 176, 0.15);
  background: #fff;
}

/* ── Error message ───────────────────────────────────────────────────────── */

.login-error {
  background: var(--pe-error-bg);
  border: 1px solid var(--pe-error-border);
  border-radius: 6px;
  color: var(--pe-error-text);
  font-size: 13px;
  padding: 10px 14px;
  margin-bottom: 18px;
}

/* ── Submit button ───────────────────────────────────────────────────────── */

.login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 42px;
  background: var(--pe-blue);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}

.login-btn:hover:not(:disabled) {
  background: var(--pe-blue-mid);
}

.login-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* ── Spinner ─────────────────────────────────────────────────────────────── */

.login-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Decorative sketch ───────────────────────────────────────────────────── */

.login-sketch {
  position: fixed;
  bottom: -20px;
  right: -20px;
  width: 260px;
  opacity: 0.06;
  pointer-events: none;
  user-select: none;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 440px) {
  .login-card {
    padding: 28px 20px;
  }
  .login-sketch {
    display: none;
  }
}
