/* ============================================================
   LOGIN.CSS — Consolidated styles
   ============================================================ */

/* Root variables */
:root {
  --card-radius: 20px;
  --primary-color: #0d6efd;
  --text-muted: #6c757d;
  --text-subtle: #9aa3b2;
  --bg-gradient-start: #f6f8fb;
  --bg-gradient-end: #e9eef6;
}

/* Base */
body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
}

/* Layout */
.login-wrapper {
  max-width: 460px;
  width: 100%;
  padding: 2rem;
}

/* Card */
.card {
  border-radius: var(--card-radius) !important;
  box-shadow: 0 20px 60px rgba(16, 24, 40, 0.10) !important;
  border: none;
  overflow: hidden;
}

.card-body {
  padding: 2.75rem 2.5rem;
}

/* Logo area */
.logo-area {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #e8f0fe 0%, #dce8fd 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid rgba(13, 110, 253, 0.12);
  flex-shrink: 0;
}

.brand-logo img {
  max-width: 26px;
  max-height: 26px;
  object-fit: contain;
}

/* Title */
.login-title {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #0f172a;
  margin-bottom: 0.25rem;
  line-height: 1.2;
}

/* Helper text */
.help-text {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.small-muted {
  font-size: 0.8125rem;
  color: var(--text-subtle);
}

/* Labels */
.form-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  margin-bottom: 0.45rem;
}

/* Inputs */
.form-control {
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px !important;
  padding: 0.72rem 1rem;
  font-size: 0.9rem;
  color: #0f172a;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
  background-color: #fff;
  border-color: var(--primary-color) !important;
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.1) !important;
}

.form-control::placeholder {
  color: #b0bac9;
}

/* Input group — password toggle */
.input-group .form-control {
  border-right: none;
  border-radius: 10px 0 0 10px !important;
}

.input-group .btn-outline-secondary {
  border-radius: 0 10px 10px 0 !important;
  border: 1px solid #e2e8f0;
  border-left: none;
  background: #f8fafc;
  color: #94a3b8;
  transition: color 0.2s, background 0.2s;
}

.input-group .btn-outline-secondary:hover {
  background: #f1f5f9;
  color: #475569;
}

/* Submit button */
.btn-primary {
  border-radius: 10px !important;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.75rem;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border: none;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
  transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
  letter-spacing: 0.01em;
}

.btn-primary:hover {
  opacity: 0.93;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.38);
}

.btn-primary:active {
  transform: translateY(0);
}

/* Theme toggle */
.theme-toggle-wrap {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* Alert */
.alert-danger {
  border-radius: 10px;
  font-size: 0.875rem;
  padding: 0.7rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Footer divider */
.divider-row {
  border-top: 1px solid #f1f5f9;
  padding-top: 1rem;
  margin-top: 0.5rem;
}

footer a {
  text-decoration: none;
  color: var(--primary-color);
}

footer a:hover {
  text-decoration: underline;
}

/* ============================================================
   DARK MODE
   ============================================================ */

[data-bs-theme="dark"] {
  --bg-gradient-start: #111623;
  --bg-gradient-end: #1a2030;
  --text-muted: #adb5bd;
  --text-subtle: #6c757d;
}

[data-bs-theme="dark"] body {
  background: linear-gradient(180deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
}

[data-bs-theme="dark"] .card {
  background-color: #161b27 !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4) !important;
}

[data-bs-theme="dark"] .login-title {
  color: #f1f5f9;
}

[data-bs-theme="dark"] .form-label {
  color: #8892a4;
}

[data-bs-theme="dark"] .form-control {
  background-color: #23293a;
  border-color: #333d52;
  color: #e2e8f0;
}

[data-bs-theme="dark"] .form-control:focus {
  background-color: #2a3148;
  border-color: var(--primary-color);
}

[data-bs-theme="dark"] .input-group .btn-outline-secondary {
  background: #23293a;
  border-color: #333d52;
  color: #8892a4;
}

[data-bs-theme="dark"] .input-group .btn-outline-secondary:hover {
  background: #2d3448;
  color: #c0cad8;
}

[data-bs-theme="dark"] .brand-logo {
  background: linear-gradient(135deg, #1e2d4d, #1a2842);
  border-color: rgba(255, 255, 255, 0.08);
}

[data-bs-theme="dark"] .divider-row {
  border-color: #2d3446;
}

[data-bs-theme="dark"] .border-top {
  border-color: #2d3446 !important;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 520px) {
  .card-body {
    padding: 2rem 1.5rem;
  }
}