/* FilsBook Admin — lavender glass, matches the app (light + dark). */
:root {
  --bg: #FFFFFF; --side: #F7F5FF; --card: rgba(246,243,255,0.7); --border: rgba(109,40,217,0.12);
  --ink: #1C1A27; --muted: #6B6880; --accent: #6D28D9; --accent-2: #5B21B6; --soft: #EDE9FE;
  --green: #15803D; --green-soft: #DCFCE7; --amber: #B45309; --amber-soft: #FEF3C7;
  --red: #B91C1C; --red-soft: #FEF2F2; --pink: #A21CAF; --pink-soft: #FAE8FF;
  --divider: rgba(15,23,42,0.07); --shadow: 0 8px 28px rgba(91,33,182,0.10);
  --hero: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(237,233,254,0.88) 48%, rgba(221,214,254,0.95));
  --bar-a: #6D28D9; --bar-b: #C4B5FD;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E0C16; --side: #13101E; --card: rgba(255,255,255,0.06); --border: rgba(196,181,253,0.16);
    --ink: #F4F2FA; --muted: #A9A4BF; --accent: #C4B5FD; --soft: rgba(167,139,250,0.16);
    --green: #4ADE80; --green-soft: rgba(74,222,128,0.14); --amber: #FBBF24; --amber-soft: rgba(251,191,36,0.14);
    --red: #FCA5A5; --red-soft: rgba(248,113,113,0.12); --pink: #F0ABFC; --pink-soft: rgba(240,171,252,0.14);
    --divider: rgba(255,255,255,0.08); --shadow: 0 8px 28px rgba(0,0,0,0.35);
    --hero: linear-gradient(135deg, rgba(91,33,182,0.55), rgba(59,24,112,0.6) 48%, rgba(30,18,58,0.8));
    --bar-a: #A78BFA; --bar-b: rgba(167,139,250,0.35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0E0C16; --side: #13101E; --card: rgba(255,255,255,0.06); --border: rgba(196,181,253,0.16);
  --ink: #F4F2FA; --muted: #A9A4BF; --accent: #C4B5FD; --soft: rgba(167,139,250,0.16);
  --green: #4ADE80; --green-soft: rgba(74,222,128,0.14); --amber: #FBBF24; --amber-soft: rgba(251,191,36,0.14);
  --red: #FCA5A5; --red-soft: rgba(248,113,113,0.12); --pink: #F0ABFC; --pink-soft: rgba(240,171,252,0.14);
  --divider: rgba(255,255,255,0.08); --shadow: 0 8px 28px rgba(0,0,0,0.35);
  --hero: linear-gradient(135deg, rgba(91,33,182,0.55), rgba(59,24,112,0.6) 48%, rgba(30,18,58,0.8));
  --bar-a: #A78BFA; --bar-b: rgba(167,139,250,0.35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 'Plus Jakarta Sans', system-ui, sans-serif; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 26px; margin: 0; font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: 16px; margin: 0 0 12px; font-weight: 700; }
p { margin: 0 0 8px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.sr { position: absolute; left: -9999px; }
.grow { flex: 1; min-width: 0; }
.small-print { font-size: 12px; margin-top: 12px; }

/* Layout */
.shell { display: flex; flex-wrap: wrap; min-height: 100vh; }
.side { flex: 1 1 220px; max-width: 260px; background: var(--side); border-right: 1px solid var(--border); padding: 20px 14px; display: flex; flex-direction: column; gap: 18px; }
.main { flex: 999 1 560px; min-width: 0; padding: 24px clamp(16px, 3vw, 36px) 48px; display: flex; flex-direction: column; gap: 18px; max-width: 1280px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; }
.brand small { color: var(--muted); font-weight: 600; }
.logo { width: 38px; height: 38px; border-radius: 12px; background: linear-gradient(135deg, #7C3AED, #5B21B6); color: #fff; display: grid; place-items: center; }
.side nav { display: flex; flex-direction: column; gap: 2px; }
.side nav a, .ghost { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; color: var(--ink); font-weight: 600; background: none; border: 0; font: inherit; cursor: pointer; width: 100%; text-align: left; }
.side nav a:hover, .ghost:hover { background: var(--soft); text-decoration: none; }
.side nav a.active { background: var(--soft); color: var(--accent); font-weight: 700; }
.side nav a svg, .ghost svg { color: var(--muted); }
.side nav a.active svg { color: var(--accent); }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 2px; }
.top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

@media (max-width: 760px) {
  .side { max-width: none; flex-basis: 100%; border-right: 0; border-bottom: 1px solid var(--border); padding: 14px 16px; gap: 10px; }
  .side nav { flex-direction: row; overflow-x: auto; }
  .side nav a { width: auto; white-space: nowrap; }
  .side-foot { flex-direction: row; margin-top: 0; }
  .side-foot .ghost { width: auto; }
}

/* Cards */
.card { background: var(--card); border: 1px solid var(--border); border-radius: 20px; padding: 18px; box-shadow: var(--shadow); backdrop-filter: blur(18px); }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.card-head h2 { margin: 0; }
.grid { display: grid; gap: 14px; }
.cards { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.cards.small { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.two { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.two.wide-left { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
@media (max-width: 980px) { .two.wide-left { grid-template-columns: 1fr; } }
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat strong { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; }
.stat strong.sm { font-size: 20px; }
.label { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.hero { background: var(--hero); display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.hero h2 { font-size: 22px; margin: 0; }
.meta { display: flex; gap: 22px; margin: 0; flex-wrap: wrap; }
.meta dt { font-size: 12px; color: var(--muted); }
.meta dd { margin: 0; font-weight: 700; }
.danger { border-color: rgba(185,28,28,0.3); }

/* Chart */
.legend { display: flex; gap: 16px; font-size: 13px; color: var(--muted); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.dot.a { background: var(--bar-a); }
.dot.b { background: var(--bar-b); }
.chart { width: 100%; height: auto; display: block; }
.chart .bar.a { fill: var(--bar-a); }
.chart .bar.b { fill: var(--bar-b); }
.chart text { fill: var(--muted); font-size: 12px; }
.row-bar { display: flex; justify-content: space-between; font-weight: 600; margin-top: 10px; }
.bar-track { height: 6px; border-radius: 999px; background: var(--soft); overflow: hidden; margin-top: 6px; }
.bar-track div { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #7C3AED, #5B21B6); }

/* Tables */
.table-wrap { padding: 4px 4px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 720px; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--divider); }
th { font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); font-weight: 700; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.user-cell { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.user-cell:hover { text-decoration: none; }
.user-cell:hover strong { color: var(--accent); }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--soft); color: var(--accent); display: grid; place-items: center; font-weight: 800; flex: none; }
.avatar.big { width: 64px; height: 64px; font-size: 26px; background: linear-gradient(135deg, #7C3AED, #5B21B6); color: #fff; }

/* Pills */
.pill { display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--soft); color: var(--accent); margin-right: 4px; }
.pill.green { background: var(--green-soft); color: var(--green); }
.pill.amber { background: var(--amber-soft); color: var(--amber); }
.pill.red { background: var(--red-soft); color: var(--red); }
.pill.pink { background: var(--pink-soft); color: var(--pink); }

/* Forms */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.search { display: flex; align-items: center; gap: 8px; padding: 0 14px; height: 46px; border-radius: 14px; background: var(--card); border: 1px solid var(--border); color: var(--muted); flex: 1 1 260px; max-width: 420px; }
.search input { border: 0; background: transparent; outline: none; flex: 1; font: inherit; color: var(--ink); }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
input, textarea, select { font: inherit; color: var(--ink); background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 11px 14px; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.inline { display: flex; gap: 8px; flex-wrap: wrap; }
.inline input { flex: 1 1 140px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; border-radius: 14px; border: 0; font: inherit; font-weight: 700; color: #fff; background: linear-gradient(135deg, #7C3AED, #5B21B6); cursor: pointer; box-shadow: 0 8px 18px rgba(91,33,182,0.22); }
.btn.small { min-height: 38px; padding: 0 14px; font-size: 13px; box-shadow: none; }
.btn.outline { background: transparent; color: var(--accent); border: 1px solid var(--border); box-shadow: none; }
.btn.red { background: #B91C1C; box-shadow: none; }
.btn.ghost-red { background: transparent; color: var(--red); box-shadow: none; }
.btn:hover { filter: brightness(1.06); }

/* Flash + lists */
.flash { padding: 12px 16px; border-radius: 14px; background: var(--green-soft); color: var(--green); font-weight: 600; }
.flash.err { background: var(--red-soft); color: var(--red); }
.list { list-style: none; padding: 0; margin: 0; }
.list li { padding: 10px 0; border-bottom: 1px solid var(--divider); }
.list li:last-child { border-bottom: 0; }
.announce { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.announce li { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--border); border-left-width: 1px; }
.announce li p { margin: 4px 0; color: var(--muted); }
.announce .kind-warning { background: var(--amber-soft); }
.announce .kind-success { background: var(--green-soft); }
.pager { display: flex; gap: 16px; align-items: center; justify-content: center; }
.back { font-weight: 600; }

/* Login */
.login-body { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: var(--bg); }
.login-card { width: 100%; max-width: 400px; background: var(--hero); border: 1px solid var(--border); border-radius: 24px; padding: 28px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px; }
.login-card .btn { width: 100%; margin-top: 6px; }

/* ───────── Laravel additions ───────── */
.three { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.stack-cards { display: flex; flex-direction: column; gap: 14px; }
.check { flex-direction: row !important; align-items: center; gap: 8px !important; }
.check input { width: auto; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; line-height: 1.55; }
.row-actions { display: flex; gap: 12px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.test-mail { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--divider); }
.kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; }
.kv dt { font-size: 12px; color: var(--muted); }
.kv dd { margin: 0; font-size: 20px; font-weight: 800; }
code { background: var(--soft); padding: 1px 6px; border-radius: 6px; font-size: 0.9em; }

/* Public pages */
.public { min-height: 100vh; display: flex; flex-direction: column; }
.public-head { padding: 18px clamp(16px, 4vw, 40px); border-bottom: 1px solid var(--border); }
.public-head .brand { color: var(--ink); }
.public-main { flex: 1; width: 100%; max-width: 760px; margin: 0 auto; padding: 32px 16px 48px; display: flex; flex-direction: column; gap: 18px; }
.public-main h1 { font-size: clamp(28px, 5vw, 40px); }
.hero-public { background: var(--hero); }
.hero-public h1 { margin: 6px 0 8px; }
.prose { line-height: 1.7; }
.prose h2 { font-size: 20px; margin: 28px 0 8px; }
.prose ul { padding-left: 22px; }
.prose li { margin: 4px 0; }
.public-foot { text-align: center; padding: 20px; color: var(--muted); border-top: 1px solid var(--border); }

.logo-img { width: 38px; height: 38px; border-radius: 11px; display: block; flex: none; }
