/* ─── Variables ──────────────────────────────────────────────────────────── */
:root {
  --bg:           #0d1117;
  --bg-secondary: #161b22;
  --bg-card:      #1c2333;
  --border:       #30363d;
  --accent:       #f59e0b;
  --accent-hover: #d97706;
  --accent-bg:    rgba(245,158,11,0.1);
  --blue:         #58a6ff;
  --green:        #3fb950;
  --green-bg:     rgba(63,185,80,0.1);
  --red:          #f85149;
  --red-bg:       rgba(248,81,73,0.1);
  --text:         #e6edf3;
  --text-muted:   #8b949e;
  --text-dim:     #6e7681;
  --radius:       10px;
  --shadow:       0 4px 24px rgba(0,0,0,0.5);
}

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

html { -webkit-font-smoothing: antialiased; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

input, select, textarea, button {
  font-family: inherit;
  font-size: 0.9rem;
}

/* ─── Login Page ─────────────────────────────────────────────────────────── */
.login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(245,158,11,0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(88,166,255,0.06) 0%, transparent 50%),
    var(--bg);
  padding: 1.5rem;
}

.login-container {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Brand */
.login-brand { text-align: center; }

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
}

.brand-icon {
  font-size: 2rem;
  filter: drop-shadow(0 0 12px rgba(245,158,11,0.6));
}

.brand-logo h1 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.brand-tagline {
  color: var(--text-muted);
  font-size: 0.85rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 500;
}

/* Card */
.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.login-card h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.login-subtitle {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}

/* Form */
.form-group { margin-bottom: 1.1rem; }

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.4rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.65rem 0.9rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(245,158,11,0.15);
}

.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-dim); }

.password-wrapper { position: relative; }

.password-wrapper input { padding-right: 2.8rem; }

.toggle-password {
  position: absolute;
  right: 0.7rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  opacity: 0.5;
  padding: 0;
  line-height: 1;
  color: var(--text);
}

.toggle-password:hover { opacity: 0.9; }

.form-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  cursor: pointer;
}

.checkbox-label input { width: auto; cursor: pointer; }

.forgot-link {
  font-size: 0.85rem;
  color: var(--accent);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 1.2rem;
  border-radius: 7px;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.18s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
}
.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  text-decoration: none;
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border);
}
.btn-ghost:hover {
  background: var(--bg-secondary);
  color: var(--text);
  text-decoration: none;
}

.btn-full { width: 100%; }

.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.8rem; }

/* Alerts */
.alert {
  padding: 0.65rem 0.9rem;
  border-radius: 7px;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}
.alert-error {
  background: var(--red-bg);
  border: 1px solid rgba(248,81,73,0.3);
  color: var(--red);
}
.hidden { display: none !important; }

/* Demo credentials */
.login-demo {
  margin-top: 1.25rem;
  padding: 0.75rem 1rem;
  background: var(--bg-secondary);
  border: 1px dashed var(--border);
  border-radius: 7px;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.login-demo p { margin-bottom: 0.3rem; }
.login-demo code {
  color: var(--accent);
  background: rgba(245,158,11,0.08);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-size: 0.8rem;
}

/* Footer */
.login-footer {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-dim);
}
