/* ===============================
   LS25 Manager – Dark UI (app.css)
   =============================== */

/* ---- Theme Tokens ---- */
:root {
  --bg: #0b0f14;          /* page background */
  --panel: #0f1620;       /* card base */
  --panel-2: #121b27;     /* hover/active */
  --panel-3: #0c131c;     /* inputs */
  --text: #e8eef7;        /* main text */
  --muted: #9aa7bb;       /* secondary text */
  --brand: #89b4ff;       /* brand accent */
  --accent: #7ee0d3;      /* subtle accent */
  --danger: #ff6673;      /* errors */
  --warning: #ffd37a;
  --success: #7ae0a6;

  --border: rgba(255,255,255,.08);
  --border-strong: rgba(255,255,255,.14);
  --shadow: 0 12px 40px rgba(0,0,0,.45);
  --radius: 14px;

  --focus: 0 0 0 3px rgba(137,180,255,.18);
  color-scheme: dark;
}

/* ---- Base ---- */
*,
*::before,
*::after { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  background:
    radial-gradient(1200px 800px at 10% -10%, rgba(122, 224, 211, .05), transparent 60%),
    radial-gradient(1200px 800px at 110% 10%, rgba(137, 180, 255, .06), transparent 60%),
    var(--bg);
  color: var(--text);
  font: 15px/1.55 ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Scrollbar (WebKit) */
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(255,255,255,.18), rgba(255,255,255,.08));
  border: 2px solid transparent; border-radius: 999px; background-clip: padding-box;
}
*::-webkit-scrollbar-track { background: transparent; }

/* ---- Layout ---- */
body.layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(10px);
  background: linear-gradient(180deg, rgba(10,14,20,.65), rgba(10,14,20,.35));
  border-bottom: 1px solid var(--border);
}

.container { max-width: 1120px; margin: 0 auto; padding: 16px 22px; }
.container-main { max-width: 1120px; margin: 0 auto; padding: 18px 22px 28px; width: 100%;
  display: grid; grid-template-columns: 220px 1fr; gap: 22px;
}
@media (max-width: 900px) {
  .container-main { grid-template-columns: 1fr; }
}

.row { display: flex; align-items: center; gap: 12px; }
.space { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.p-lg { padding: 20px; }

.brand {
  font-weight: 700; letter-spacing: .2px; font-size: 18px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 0 24px rgba(137,180,255,.15);
}

/* ---- Cards ---- */
.card {
  background:
    linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.01)),
    var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.content { padding: 20px; }

/* ---- Sidebar Tabs ---- */
.sidebar {
  padding: 10px;
  display: flex; flex-direction: column; gap: 8px;
  border-radius: var(--radius);
}

.tab {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  color: var(--text); text-decoration: none;
  border: 1px solid transparent; border-radius: 10px;
  transition: transform .05s ease, background .15s ease, border-color .15s ease;
}
.tab:hover { background: rgba(255,255,255,.04); border-color: var(--border); }
.tab.active { background: var(--panel-2); border-color: var(--border-strong); }
.tab:active { transform: translateY(1px); }

/* ---- Typography ---- */
.h1 { font-size: 28px; font-weight: 700; margin: 0 0 10px; }
.h2 { font-size: 20px; font-weight: 600; margin: 0 0 8px; }

/* ---- Forms ---- */
.form { display: grid; gap: 14px; }
.field { display: grid; gap: 8px; }
.field > span { color: var(--muted); font-size: 13px; }

.input, .select, .textarea {
  width: 100%;
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel-3);
  color: var(--text);
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--brand);
  box-shadow: var(--focus);
}
.input[readonly] { opacity: .8; }

.input::placeholder { color: #728097; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #111927;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  transition: filter .15s ease, transform .05s ease, background .15s ease, border-color .15s ease;
}
.btn:hover { background: #0f1825; }
.btn:active { transform: translateY(1px); }

.btn.primary {
  background: linear-gradient(180deg, #1c2c45, #152337);
  border-color: #2a3b56;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}
.btn.primary:hover { filter: brightness(1.05); }

.btn.ghost {
  background: transparent;
  border-color: var(--border);
}
.btn.ghost:hover { background: rgba(255,255,255,.06); }

/* ---- Alerts ---- */
.alert {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255,255,255,.03);
}
.alert.error   { border-color: rgba(255,102,115,.35); background: rgba(255,102,115,.10); color: #ffd6da; }
.alert.warn    { border-color: rgba(255,211,122,.35); background: rgba(255,211,122,.10); color: #fff0c9; }
.alert.success { border-color: rgba(122,224,166,.35); background: rgba(122,224,166,.10); color: #dbffe9; }

/* ---- Tables ---- */
.table-wrap { overflow: auto; border-radius: 12px; border: 1px solid var(--border); }
.table {
  width: 100%; border-collapse: collapse; min-width: 640px;
  background: rgba(255,255,255,.01);
}
.table th, .table td { padding: 10px 12px; white-space: nowrap; }
.table thead th {
  font-weight: 600; color: var(--muted);
  background: rgba(255,255,255,.04);
  border-bottom: 1px solid var(--border);
}
.table tbody tr { border-bottom: 1px solid var(--border); }
.table tbody tr:nth-child(odd) { background: rgba(255,255,255,.02); }
.table tbody tr:hover { background: rgba(137,180,255,.10); }

/* ---- Utility ---- */
.hr { width: 100%; height: 1px; background: var(--border); border: 0; margin: 12px 0; }
.empty { padding: 16px; color: var(--muted); }
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 8px; border-radius: 999px; font-size: 12px;
  background: rgba(255,255,255,.06); border: 1px solid var(--border);
}
.kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  background: rgba(255,255,255,.05); border: 1px solid var(--border);
  padding: 2px 6px; border-radius: 6px; font-size: 12px;
}

/* ---- Forms: Inline Rows ---- */
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.row-end { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }

/* ---- Animations ---- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.card, .tab, .table { animation: fadeInUp .24s ease both; }

/* ---- Topbar user area ---- */
.user { display: flex; align-items: center; gap: 10px; }

/* ---- Forms: Login Card Helper (optional) ---- */
.login-card {
  max-width: 420px; margin: 0 auto;
  padding: 22px 20px;
}

/* ---- Links ---- */
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- Focus-visible for a11y ---- */
:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  border-color: var(--brand);
}

/* ---- Code blocks (if needed) ---- */
code, pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}
pre {
  background: #0c131c; color: #d8e4f5; border: 1px solid var(--border);
  padding: 12px; border-radius: 10px; overflow: auto;
}

/* ---- Footer ---- */
footer { opacity: .8; }

/* ---- Optional: subtle hover lift for cards ---- */
.card:hover { transform: translateY(-1px); transition: transform .12s ease; }
