/* Dukkapu — login.css */
/* Auto-extracted from login.html */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #f0f2f7;
  -webkit-font-smoothing: antialiased;
}

/* ── Left panel — brand ── */
.brand-panel {
  background: #0a2a6e;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
}

/* Background decoration */
.brand-panel::before {
  content: '';
  position: absolute;
  top: -120px; right: -80px;
  width: 420px; height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,170,204,0.18) 0%, transparent 70%);
  pointer-events: none;
}
.brand-panel::after {
  content: '';
  position: absolute;
  bottom: -80px; left: -60px;
  width: 360px; height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,170,204,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.brand-top { position: relative; z-index: 1; }
.brand-logo {
  margin-bottom: 3rem;
}
.brand-logo img {
  display: block;
  height: 52px; width: auto; max-width: 260px;
  /* Invert dark logo to white for use on the navy panel */
  filter: brightness(0) invert(1);
  opacity: 0.92;
}

.brand-headline {
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(1.75rem, 2.5vw, 2.4rem);
  font-weight: 700; line-height: 1.2;
  color: #fff; margin-bottom: 1rem;
}
.brand-headline i { font-style: italic; color: #00aacc; }

.brand-sub {
  font-size: 0.9rem; color: rgba(255,255,255,0.6);
  line-height: 1.7; max-width: 360px;
}

.brand-stats {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 1rem; position: relative; z-index: 1;
}
.stat-box {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px; padding: 1rem 1.1rem;
}
.stat-box strong {
  display: block; font-size: 1.4rem; font-weight: 700;
  color: #fff; line-height: 1.1; margin-bottom: 0.2rem;
}
.stat-box span { font-size: 0.72rem; color: rgba(255,255,255,0.5); }

/* ── Right panel — form ── */
.form-panel {
  display: flex; align-items: center; justify-content: center;
  padding: 2rem;
}

.form-wrap {
  width: 100%; max-width: 400px;
}

.form-header { margin-bottom: 2rem; }
.form-header h2 {
  font-size: 1.5rem; font-weight: 700;
  color: #1a1a2e; margin-bottom: 0.35rem;
}
.form-header p { font-size: 0.85rem; color: #6b6b80; }

/* ── Tabs: Wavuh SSO | Email ── */
.auth-tabs {
  display: grid; grid-template-columns: 1fr 1fr;
  background: #f0f2f7; border-radius: 8px;
  padding: 3px; margin-bottom: 1.5rem;
}
.auth-tab {
  padding: 0.55rem; font-size: 0.8rem; font-weight: 600;
  border: none; background: transparent; cursor: pointer;
  border-radius: 6px; color: #6b6b80;
  transition: all 0.15s;
}
.auth-tab.active { background: #fff; color: #0a2a6e; box-shadow: 0 1px 4px rgba(0,0,0,0.08); }

/* ── SSO panel ── */
.sso-panel { display: none; } .email-panel { display: none; }
.email-panel.active { display: block; }

.sso-info {
  background: #e0f7ff; border: 1px solid #b3e9f7;
  border-radius: 8px; padding: 0.85rem 1rem;
  font-size: 0.82rem; color: #0a2a6e;
  margin-bottom: 1.25rem; line-height: 1.5;
}
.sso-info strong { display: block; margin-bottom: 0.2rem; }

.wavuh-sso-btn {
  width: 100%; padding: 0.8rem;
  background: #0a2a6e; color: #fff;
  border: none; border-radius: 8px;
  font-size: 0.9rem; font-weight: 700;
  cursor: pointer; transition: background 0.15s;
  display: flex; align-items: center; justify-content: center; gap: 0.6rem;
  letter-spacing: 0.02em;
}
.wavuh-sso-btn:hover { background: #0d3a8a; }
.wavuh-sso-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* ── Divider ── */
.divider {
  display: flex; align-items: center; gap: 0.75rem;
  margin: 1.25rem 0; font-size: 0.75rem; color: #aaa;
}
.divider::before, .divider::after {
  content: ''; flex: 1; height: 1px; background: #e2e0da;
}

/* ── Form fields ── */
.field { margin-bottom: 1rem; }
.field label {
  display: block; font-size: 0.72rem; font-weight: 600;
  color: #6b6b80; text-transform: uppercase;
  letter-spacing: 0.04em; margin-bottom: 0.3rem;
}
.field-wrap { position: relative; }
.field input {
  width: 100%; padding: 0.7rem 0.9rem;
  border: 1.5px solid #e2e0da; border-radius: 8px;
  font-size: 0.9rem; color: #1a1a2e;
  background: #fff; outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:focus {
  border-color: #006699;
  box-shadow: 0 0 0 3px rgba(0,102,153,0.1);
}
.field input.error { border-color: #c0392b; }

.pwd-toggle {
  position: absolute; right: 0.75rem; top: 50%;
  transform: translateY(-50%); background: none;
  border: none; cursor: pointer; font-size: 0.85rem;
  color: #6b6b80; padding: 0.2rem;
}

.field-error {
  font-size: 0.72rem; color: #c0392b;
  margin-top: 0.3rem; display: none;
}
.field-error.show { display: block; }

/* ── Remember / forgot ── */
.field-row {
  display: flex; align-items: center;
  justify-content: space-between; margin-bottom: 1.25rem;
}
.remember {
  display: flex; align-items: center; gap: 0.4rem;
  font-size: 0.8rem; color: #6b6b80; cursor: pointer;
}
.remember input { width: 15px; height: 15px; accent-color: #006699; cursor: pointer; }
.forgot { font-size: 0.8rem; color: #006699; cursor: pointer; font-weight: 500; }
.forgot:hover { text-decoration: underline; }

/* ── Submit button ── */
.submit-btn {
  width: 100%; padding: 0.8rem;
  background: #006699; color: #fff;
  border: none; border-radius: 8px;
  font-size: 0.9rem; font-weight: 700;
  cursor: pointer; transition: background 0.15s;
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  margin-bottom: 1.25rem;
}
.submit-btn:hover:not(:disabled) { background: #0d3a8a; }
.submit-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* ── Role selector ── */
.role-selector { margin-bottom: 1rem; }
.role-selector label {
  display: block; font-size: 0.72rem; font-weight: 600;
  color: #6b6b80; text-transform: uppercase;
  letter-spacing: 0.04em; margin-bottom: 0.4rem;
}
.role-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.role-btn {
  padding: 0.65rem 0.5rem; border: 1.5px solid #e2e0da;
  border-radius: 8px; background: #fff;
  font-size: 0.8rem; font-weight: 600; cursor: pointer;
  color: #6b6b80; transition: all 0.12s; text-align: center;
}
.role-btn.active {
  border-color: #006699; background: #e8f4f8; color: #006699;
}
.role-btn:hover:not(.active) { border-color: #aaa; color: #1a1a2e; }

/* ── Register link ── */
.register-link {
  text-align: center; font-size: 0.82rem; color: #6b6b80;
}
.register-link a { color: #006699; font-weight: 600; cursor: pointer; }
.register-link a:hover { text-decoration: underline; }

/* ── Alert box ── */
.alert {
  padding: 0.75rem 1rem; border-radius: 8px;
  font-size: 0.82rem; margin-bottom: 1rem;
  display: none; align-items: flex-start; gap: 0.5rem;
}
.alert.show { display: flex; }
.alert-error   { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.alert-success { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.alert-icon { flex-shrink: 0; font-size: 0.9rem; margin-top: 0.05rem; }

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

/* ── Session indicator (shown after login) ── */
.session-card {
  background: #d1fae5; border: 1px solid #a7f3d0;
  border-radius: 10px; padding: 1.1rem 1.25rem;
  display: none; margin-bottom: 1rem;
}
.session-card.show { display: block; }
.session-card h4 { font-size: 0.85rem; font-weight: 700; color: #065f46; margin-bottom: 0.35rem; }
.session-card p  { font-size: 0.78rem; color: #047857; line-height: 1.5; }
.session-card .token-preview {
  font-size: 0.68rem; font-family: monospace;
  background: rgba(0,0,0,0.08); padding: 0.3rem 0.5rem;
  border-radius: 4px; margin-top: 0.5rem;
  word-break: break-all; color: #065f46;
}
.session-actions { display: flex; gap: 0.5rem; margin-top: 0.75rem; }
.session-btn {
  flex: 1; padding: 0.5rem; border: none; border-radius: 6px;
  font-size: 0.78rem; font-weight: 600; cursor: pointer;
  transition: opacity 0.15s;
}
.session-btn:hover { opacity: 0.85; }
.btn-go      { background: #00875a; color: #fff; }
.btn-signout { background: #fee2e2; color: #991b1b; }

/* ── Footer ── */
.form-footer {
  margin-top: 2rem; text-align: center;
  font-size: 0.72rem; color: #aaa; line-height: 1.6;
}
.form-footer a { color: #006699; }

/* ── Responsive ── */
@media (max-width: 768px) {
  body { grid-template-columns: 1fr; }
  .brand-panel { display: none; }
  .form-panel { padding: 1.5rem 1rem; align-items: flex-start; padding-top: 3rem; }
}