/* ══════════════════════════════════════════════════════════════════════════
   LOGIN PAGE — css/login.css
   All styles are scoped to the login page only.
   app.css still provides :root CSS variables, .dark overrides, .toast-container
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Page shell ──────────────────────────────────────────────────────────── */
body {
  min-height: 100vh;
  background: var(--bg);
  display: flex;
  align-items: stretch;
}

/* ── Theme toggle ────────────────────────────────────────────────────────── */
.login-theme-toggle {
  position: fixed;
  top: 18px;
  right: 20px;
  z-index: 20;
  width: 40px;
  height: 40px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  font-size: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  transition: background .15s, transform .12s;
}

.login-theme-toggle:hover {
  background: var(--table-hov);
  transform: scale(1.08);
}

/* ── Two-column layout ───────────────────────────────────────────────────── */
.login-wrap {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

/* ── Left panel ──────────────────────────────────────────────────────────── */
.login-left {
  flex: 1;
  background: #18181b;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* decorative circles */
.login-left::before,
.login-left::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.login-left::before {
  width: 520px;
  height: 520px;
  top: -180px;
  right: -160px;
  background: rgba(37, 99, 235, .14);
}

.login-left::after {
  width: 340px;
  height: 340px;
  bottom: -120px;
  left: -80px;
  background: rgba(99, 102, 241, .1);
}

.login-left-inner {
  position: relative;
  z-index: 1;
  padding: 56px 52px;
  max-width: 480px;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 52px;
}

.login-brand-icon {
  width: 80px;
  height: 80px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, .45);
  background: url(../img/logo.png);
  background-size: cover;
}

.login-brand-name {
  font-size: 21px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -.02em;
}

.login-headline {
  font-size: 38px;
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
  margin-bottom: 16px;
}

.login-tagline {
  font-size: 15px;
  line-height: 1.75;
  color: rgba(255, 255, 255, .5);
  max-width: 380px;
  margin-bottom: 44px;
}

.login-features {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 44px;
}

.login-feature {
  display: flex;
  align-items: center;
  gap: 14px;
  color: rgba(255, 255, 255, .65);
  font-size: 14px;
}

.login-feature-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  background: rgba(255, 255, 255, .08);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.login-expiry {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 20px;
  padding: 7px 14px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, .5);
}

.login-expiry strong {
  color: rgba(255, 255, 255, .8);
}

.login-expiry-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 6px #22c55e;
  flex-shrink: 0;
}

/* ── Right panel ─────────────────────────────────────────────────────────── */
.login-right {
  width: 50%;
  min-width: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
  background: var(--bg);
}

.login-card {
  width: 100%;
  max-width: 400px;
}

.login-card-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 34px;
}

.login-card-icon {
  width: 80px;
  height: 80px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  background: url(../img/logo.png);
  background-size: cover;

}

.login-card-brand {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
}

.login-card-sub {
  font-size: 11px;
  color: var(--muted);
}

.login-card-title {
  font-size: 27px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
}

.login-card-desc {
  font-size: 13.5px;
  color: var(--muted);
  margin-bottom: 28px;
}

/* ── Alerts ──────────────────────────────────────────────────────────────── */
.login-error {
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--red-lt, #fee2e2);
  color: var(--red, #dc2626);
  border: 1px solid rgba(220, 38, 38, .18);
  border-radius: 9px;
  padding: 11px 14px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 20px;
  animation: fadeIn .2s ease;
}

.login-error-icon {
  font-size: 15px;
  flex-shrink: 0;
}

.login-success {
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--green-lt, #dcfce7);
  color: var(--green, #16a34a);
  border: 1px solid rgba(22, 163, 74, .18);
  border-radius: 9px;
  padding: 11px 14px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 20px;
  animation: fadeIn .2s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Fields ──────────────────────────────────────────────────────────────── */
.login-field {
  margin-bottom: 18px;
}

.login-field label {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 7px;
}

.login-field-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 7px;
}

.login-field-header label {
  margin-bottom: 0;
}

.login-forgot {
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  transition: opacity .12s;
}

.login-forgot:hover {
  opacity: .75;
  text-decoration: underline;
}

.login-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.login-input-icon {
  position: absolute;
  left: 12px;
  font-size: 15px;
  color: var(--muted);
  pointer-events: none;
  line-height: 1;
}

.login-input-wrap input {
  width: 100%;
  background: var(--card);
  border: 1.5px solid var(--input-bdr);
  border-radius: 10px;
  padding: 12px 44px 12px 40px;
  color: var(--text);
  font-size: 14px;
  outline: none;
  font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}

.login-input-wrap input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .1);
}

.login-input-wrap input.login-input-error {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, .08);
}

.login-eye {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 15px;
  color: var(--muted);
  padding: 4px;
  transition: color .12s;
}

.login-eye:hover {
  color: var(--text);
}

.login-field-err {
  font-size: 11.5px;
  color: var(--red);
  font-weight: 600;
  margin-top: 5px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Remember me */
.login-remember {
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  color: var(--text);
  font-size: 13px;
  margin-bottom: 24px;
}

.login-remember input {
  width: 15px;
  height: 15px;
  accent-color: var(--accent);
  cursor: pointer;
}

/* ── Submit button ───────────────────────────────────────────────────────── */
.login-submit {
  width: 100%;
  padding: 13px;
  background: var(--accent, #2563eb);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: .01em;
  transition: background .15s, transform .12s, box-shadow .15s;
}

.login-submit:hover:not([disabled]) {
  background: var(--accent-dk, #1d4ed8);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, .35);
}

.login-submit:active:not([disabled]) {
  transform: translateY(0);
}

.login-submit[disabled] {
  opacity: .65;
  cursor: not-allowed;
}

/* Spinner inside button */
.login-spinner {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.login-spinner::after {
  content: '';
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, .35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .65s linear infinite;
}

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

/* ── Hint ────────────────────────────────────────────────────────────────── */
.login-hint {
  margin-top: 22px;
  font-size: 12px;
  color: var(--subtle);
  text-align: center;
}

.login-hint strong {
  color: var(--muted);
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 860px) {
  .login-left {
    display: none;
  }

  .login-right {
    width: 100%;
    min-width: 0;
    padding: 32px 20px;
  }
}