/* Shared styles for login pages and the admin panel. Loaded after style.css. */

.auth-shell {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 1.5rem; background: var(--bg);
}
.auth-card {
  width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 8px; padding: clamp(1.75rem, 4vw, 2.5rem); box-shadow: var(--shadow);
}
.auth-brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--ink); margin-bottom: 1.5rem; }
.auth-brand img { width: 38px; height: 30px; object-fit: contain; border-radius: 5px; }
.auth-brand span { font-family: 'Plex Cond', sans-serif; font-weight: 700; font-size: 1.05rem; }
.auth-brand em { font-style: normal; color: var(--green-strong); }
.auth-card h1 { font-size: 1.5rem; margin-bottom: 0.4rem; }
.auth-card .sub { color: var(--ink-soft); font-size: 0.92rem; margin-bottom: 1.5rem; }

.field { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1.1rem; }
.field label { font-size: 0.82rem; font-weight: 600; color: var(--ink); }
.field input, .field select, .field textarea {
  font-family: 'Plex Sans', sans-serif; font-size: 0.95rem; padding: 0.6rem 0.75rem;
  border: 1px solid var(--line); border-radius: 5px; background: var(--bg); color: var(--ink); width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--green); outline-offset: -1px; }
.field .hint { font-size: 0.76rem; color: var(--ink-faint); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }

.btn-block { width: 100%; justify-content: center; }
.alert { padding: 0.7rem 0.95rem; border-radius: 5px; font-size: 0.88rem; margin-bottom: 1.25rem; }
.alert-error { background: rgba(213, 71, 60, 0.1); border: 1px solid rgba(213, 71, 60, 0.4); color: #B3392E; }
.alert-success { background: var(--green-soft); border: 1px solid var(--green); color: var(--green-strong); }

/* ---------- Admin shell ---------- */
.admin-topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.85rem clamp(1.25rem, 4vw, 2.5rem); border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.admin-nav { display: flex; gap: 1.5rem; }
.admin-nav a { text-decoration: none; color: var(--ink-soft); font-size: 0.9rem; font-weight: 500; }
.admin-nav a[aria-current="page"], .admin-nav a:hover { color: var(--ink); }
.admin-main { max-width: 1080px; margin: 0 auto; padding: clamp(1.5rem, 4vw, 2.5rem) clamp(1.25rem, 4vw, 2.5rem) 4rem; }
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.75rem; flex-wrap: wrap; }
.admin-head h1 { font-size: 1.7rem; }

.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-bottom: 2.5rem; }
.stat-tile { background: var(--surface); padding: 1.4rem 1.5rem; }
.stat-tile .num { font-family: 'Plex Mono', monospace; font-size: 1.8rem; color: var(--green-strong); font-weight: 500; }
.stat-tile .lbl { color: var(--ink-soft); font-size: 0.85rem; margin-top: 0.3rem; }
@media (max-width: 700px) { .stat-row { grid-template-columns: 1fr; } }

.data-table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.data-table th, .data-table td { text-align: left; padding: 0.75rem 1rem; font-size: 0.88rem; border-bottom: 1px solid var(--line); }
.data-table th { font-family: 'Plex Mono', monospace; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-faint); background: var(--surface-2); }
.data-table tr:last-child td { border-bottom: none; }
.data-table td.actions { display: flex; gap: 0.75rem; white-space: nowrap; }
.data-table td.actions a, .data-table td.actions button { font-size: 0.82rem; font-weight: 600; border: none; background: none; cursor: pointer; padding: 0; color: var(--green-strong); text-decoration: none; }
.data-table td.actions button.danger, .data-table td.actions a.danger { color: #C0392B; }
.badge { display: inline-block; font-family: 'Plex Mono', monospace; font-size: 0.68rem; padding: 0.2rem 0.5rem; border-radius: 3px; }
.badge.on { background: var(--green-soft); color: var(--green-strong); }
.badge.off { background: var(--surface-2); color: var(--ink-faint); }
.table-wrap { overflow-x: auto; margin-bottom: 2.5rem; }
.empty-row td { text-align: center; color: var(--ink-faint); padding: 2rem 1rem; }

.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: clamp(1.5rem, 4vw, 2rem); max-width: 560px; margin-bottom: 2.5rem; }
.form-card h2 { font-size: 1.15rem; margin-bottom: 1.25rem; }
.form-actions { display: flex; gap: 0.75rem; align-items: center; margin-top: 0.25rem; }
.gen-pw-btn { font-size: 0.78rem; color: var(--green-strong); background: none; border: none; cursor: pointer; padding: 0; margin-top: 0.3rem; text-align: left; }
