/* admin.css — Web A admin panel */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #f4f5fb; --card: #fff; --border: #e6e8f2; --fg: #16182b; --muted: #6b6f87;
  --accent: #4f46e5; --accent-2: #7c3aed; --green: #16a34a; --red: #ef4444; --amber: #d97706;
  --radius: 14px;
}
body { font-family: 'Inter', system-ui, sans-serif; background: var(--bg); color: var(--fg); -webkit-font-smoothing: antialiased; }
.admin-body { min-height: 100vh; }
.mono { font-family: 'JetBrains Mono', monospace; font-size: 13.5px; }

/* shell */
.adm-shell { display: flex; min-height: 100vh; }
.adm-side { width: 230px; background: #131426; color: #cbd0f2; display: flex; flex-direction: column; padding: 22px 16px; position: sticky; top: 0; height: 100vh; }
.adm-brand { display: flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 800; letter-spacing: -.02em; color: #fff; padding: 0 8px 22px; border-bottom: 1px solid rgba(255,255,255,.08); margin-bottom: 18px; }
.adm-brand span b { color: #8b5cf6; }
.adm-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.adm-nav a { color: #aab0d8; text-decoration: none; padding: 11px 12px; border-radius: 10px; font-size: 14px; font-weight: 600; transition: all .12s; }
.adm-nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.adm-side-foot { border-top: 1px solid rgba(255,255,255,.08); padding-top: 14px; }
.adm-user { font-size: 13px; font-weight: 700; color: #fff; padding: 0 8px; margin-bottom: 8px; }
.adm-logout { display: block; padding: 8px 12px; color: #f87171; text-decoration: none; font-size: 13px; font-weight: 600; border-radius: 8px; }
.adm-logout:hover { background: rgba(248,113,113,.1); }
.adm-main { flex: 1; padding: 28px 34px 60px; min-width: 0; }
.adm-top h1 { font-size: 24px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 22px; }
.adm-content { display: flex; flex-direction: column; gap: 20px; }

/* cards / stats */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.card-head h2 { font-size: 16px; font-weight: 800; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.stat { padding: 18px 20px; }
.stat b { display: block; font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.stat span { color: var(--muted); font-size: 13px; font-weight: 600; }

/* table */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; padding: 8px 10px; border-bottom: 2px solid var(--border); }
.table td { padding: 11px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table .hint { padding: 18px; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* badges */
.badge { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: #eef0f8; color: #4b4f6e; text-transform: capitalize; }
.badge-green { background: #dcfce7; color: #15803d; }
.badge-red { background: #fee2e2; color: #b91c1c; }
.badge-amber { background: #fef3c7; color: #b45309; }
.badge-gold { background: #fef9c3; color: #a16207; }

/* forms */
.grid-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.grid-form .full { grid-column: 1 / -1; }
.inline-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.inline-form input, .inline-form select, .stack input, .stack select { border: 1px solid var(--border); background: #fff; border-radius: 10px; padding: 10px 13px; font: inherit; font-size: 14px; outline: none; }
.inline-form input:focus, .stack input:focus { border-color: var(--accent); }
.stack { display: flex; flex-direction: column; gap: 14px; max-width: 560px; }
.stack label { display: flex; flex-direction: column; gap: 7px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.stack small { color: var(--muted); font-weight: 400; }
.check { flex-direction: row !important; align-items: center; gap: 10px !important; }
.lease-info { color: var(--muted); font-size: 13.5px; padding: 10px 2px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid transparent; border-radius: 10px; cursor: pointer; font: inherit; font-weight: 700; font-size: 14px; padding: 10px 18px; text-decoration: none; transition: all .12s; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #4338ca; }
.btn-ghost { background: #fff; border-color: var(--border); color: var(--fg); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-danger-ghost { background: #fff; border-color: var(--border); color: var(--red); }
.btn-danger-ghost:hover { border-color: var(--red); }
.btn-xs { padding: 6px 11px; font-size: 12.5px; }

/* misc */
.alert { background: #fef3c7; border: 1px solid #fde68a; color: #92400e; padding: 13px 17px; border-radius: 12px; font-size: 14px; font-weight: 600; }
.alert a { color: #92400e; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; }
.code { background: #131426; color: #d8e0ff; padding: 16px 18px; border-radius: 12px; font-family: 'JetBrains Mono', monospace; font-size: 12.5px; line-height: 1.7; overflow-x: auto; }
.hint { color: var(--muted); font-size: 13px; }
.ok { color: var(--green); font-weight: 600; }

/* theme preview */
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.theme-card { text-decoration: none; color: inherit; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: all .15s; }
.theme-card:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(22,24,43,.14); border-color: var(--accent); }
.theme-chip { padding: 12px; }
.theme-chip .chip-bar { display: flex; align-items: center; gap: 7px; font-size: 10.5px; font-weight: 700; padding: 8px 10px; border-radius: 8px 8px 0 0; }
.chip-dot { width: 8px; height: 8px; border-radius: 50%; background: #f87171; box-shadow: 14px 0 0 #fbbf24, 28px 0 0 #34d399; }
.chip-inbox { padding: 12px 10px; border-radius: 0 0 8px 8px; display: flex; flex-direction: column; gap: 7px; }
.chip-line { height: 7px; border-radius: 4px; background: rgba(128,128,128,.25); width: 80%; }
.chip-line:last-child { width: 55%; }
.theme-meta { padding: 12px 14px; border-top: 1px solid var(--border); }
.theme-meta b { font-size: 14px; }
.theme-meta p { color: var(--muted); font-size: 12px; margin-top: 3px; }
.theme-aurora { background: #0b0d1a; color: #eef0ff; } .theme-aurora .chip-bar, .theme-aurora .chip-inbox { background: rgba(255,255,255,.06); }
.theme-minimal { background: #f7f7f8; color: #17171c; } .theme-minimal .chip-bar, .theme-minimal .chip-inbox { background: #fff; }
.theme-ocean { background: #f0f7fb; color: #0e2a3a; } .theme-ocean .chip-bar, .theme-ocean .chip-inbox { background: #fff; }
.theme-sunset { background: #fff7f2; color: #3a2318; } .theme-sunset .chip-bar, .theme-sunset .chip-inbox { background: #fff; }
.theme-terminal { background: #0c0f0d; color: #d8ffe8; } .theme-terminal .chip-bar, .theme-terminal .chip-inbox { background: rgba(255,255,255,.05); }
.theme-neon { background: #08070f; color: #eef3ff; } .theme-neon .chip-bar, .theme-neon .chip-inbox { background: rgba(255,255,255,.05); }
.theme-paper { background: #faf6ef; color: #2e2617; } .theme-paper .chip-bar, .theme-paper .chip-inbox { background: #fffdf8; }

/* login page */
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(900px 500px at 70% -10%, rgba(124,58,237,.18), transparent 55%), radial-gradient(700px 450px at 10% 60%, rgba(79,70,229,.14), transparent 55%), #0f1023; }
.login-card { width: 100%; max-width: 400px; background: #fff; border-radius: 20px; padding: 34px 32px; box-shadow: 0 30px 70px rgba(0,0,0,.35); }
.login-logo { color: var(--accent); margin-bottom: 14px; }
.login-card h1 { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.login-sub { color: var(--muted); font-size: 13.5px; margin: 6px 0 22px; }
.login-card .btn { width: 100%; }

@media (max-width: 800px) {
  .adm-side { width: 64px; padding: 18px 8px; }
  .adm-brand span, .adm-nav a { font-size: 0; }
  .adm-nav a { text-align: center; padding: 12px 6px; }
  .adm-nav a::first-letter { font-size: 16px; }
  .adm-main { padding: 20px; }
}
