/* ============================================================
   SLYM Agency — Klantportaal
   Hoofdkleur: zwart · Tekst: wit · Accent: neon geel/groen
   ============================================================ */

:root {
  --bg:          #000000;
  --surface:     #0b0b0b;
  --surface-2:   #141414;
  --surface-3:   #1c1c1c;
  --border:      rgba(255, 255, 255, 0.10);
  --border-soft: rgba(255, 255, 255, 0.06);

  --text:        #ffffff;
  --text-dim:    #9a9a9a;
  --text-faint:  #5f5f5f;

  --accent:      #ccff00;
  --accent-600:  #b4e600;
  --accent-glow: rgba(204, 255, 0, 0.15);

  --ok:          #33d17a;   /* succes: betaald, geaccepteerd, afgehandeld, positieve trend */
  --ok-border:   rgba(51, 209, 122, 0.32);
  --ok-bg:       rgba(51, 209, 122, 0.09);
  --warn:        #ffb020;
  --danger:      #ff4d4d;
  --info:        #63b3ff;

  --radius:      14px;
  --radius-sm:   10px;
  --maxw:        1240px;

  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-body:    "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

::selection { background: var(--accent); color: #000; }

/* ---------- Brand / logo ---------- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "Anton", var(--font-display);
  font-weight: 400;
  font-style: italic;
  font-size: 22px;
  letter-spacing: 0.03em;
  line-height: 1;
  color: var(--text);
  text-decoration: none;
}
.brand .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}
.brand small {
  font-family: var(--font-body);
  font-weight: 500;
  font-style: normal;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--text-faint);
  text-transform: uppercase;
}
.sidebar__brand .brand { font-size: 27px; }

/* ============================================================
   LOGIN
   ============================================================ */
.login-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
}

.login-aside {
  position: relative;
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid var(--border-soft);
  overflow: hidden;
}
.login-aside::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(600px 400px at 15% 10%, var(--accent-glow), transparent 60%),
    radial-gradient(500px 500px at 90% 100%, rgba(204,255,0,0.08), transparent 55%);
  pointer-events: none;
}
.login-aside__content { position: relative; z-index: 1; max-width: 460px; margin-top: 12vh; }
.login-aside h1 {
  font-size: clamp(32px, 4vw, 52px);
  margin: 24px 0 16px;
}
.login-aside h1 em {
  font-style: normal;
  color: var(--accent);
}
.login-aside p { color: var(--text-dim); font-size: 16px; }
.login-aside__meta {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 28px;
  color: var(--text-faint);
  font-size: 13px;
}

.login-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.login-card { width: 100%; max-width: 380px; }
.login-card h2 { font-size: 26px; margin-bottom: 6px; }
.login-card > p { color: var(--text-dim); margin-bottom: 32px; font-size: 14px; }

.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 8px;
}
.field input {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.field input::placeholder { color: var(--text-faint); }

.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  font-size: 13px;
}
.row-between label { display: flex; align-items: center; gap: 8px; color: var(--text-dim); cursor: pointer; }
.row-between a { color: var(--accent); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-weight: 600;
  cursor: pointer;
  transition: transform .12s ease, background .15s, border-color .15s, color .15s;
}
.btn:active { transform: translateY(1px); }
.btn--primary {
  width: 100%;
  background: var(--accent);
  color: #000;
}
.btn--primary:hover { background: var(--accent-600); }
.btn--ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn--sm { padding: 8px 14px; font-size: 13px; }

.login-note {
  margin-top: 22px;
  padding: 12px 14px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  color: var(--text-faint);
}
.login-note strong { color: var(--text-dim); }
.login-note a { color: var(--accent); font-weight: 600; white-space: nowrap; }

.login-lang {
  margin-top: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-faint);
}
.login-lang button {
  background: none;
  border: none;
  padding: 2px 4px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-faint);
  cursor: pointer;
}
.login-lang button:hover { color: var(--text); }
.login-lang button.is-active { color: var(--accent); }

/* ============================================================
   DASHBOARD SHELL
   ============================================================ */
.app {
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid var(--border-soft);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  background: var(--surface);
}
.sidebar__brand {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px 26px;
}

/* --- Laadscherm bij paginawissel / sessiecheck ---
   Dekt alleen het inhoudsgedeelte, niet het menu links. --- */
.main-loader {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 244px;                 /* = breedte van de sidebar */
  background: var(--bg);
  z-index: 45;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity .22s ease, visibility .22s;
}
.main-loader.is-on { opacity: 1; visibility: visible; }
.main-loader::before {
  content: "";
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 3px solid var(--surface-3);
  border-top-color: var(--accent);
  animation: i18n-spin .7s linear infinite;
}
@media (max-width: 820px) {
  .main-loader { left: 0; }
}

/* --- Foutmelding op de inlogpagina --- */
.login-error {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(255, 77, 77, 0.08);
  border: 1px solid rgba(255, 77, 77, 0.3);
  color: var(--danger);
  font-size: 13px;
}

/* --- Laadscherm bij taalwissel --- */
.i18n-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  opacity: 0;
  visibility: hidden;
  transition: opacity .28s ease, visibility .28s;
}
.i18n-loader.is-on { opacity: 1; visibility: visible; }
.i18n-loader__spinner {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 3px solid var(--surface-3);
  border-top-color: var(--accent);
  animation: i18n-spin .7s linear infinite;
}
@keyframes i18n-spin { to { transform: rotate(360deg); } }

/* --- Taalkeuze --- */
.langsel { position: relative; margin-left: auto; }
.langsel__btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: border-color .14s, color .14s;
}
.langsel__btn:hover { border-color: var(--accent); color: var(--text); }
.langsel__btn svg { transition: transform .2s ease; }
.langsel.is-open .langsel__btn svg { transform: rotate(180deg); }
.langsel.is-open .langsel__btn { border-color: var(--accent); color: var(--text); }

.langsel__menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 148px;
  list-style: none;
  margin: 0;
  padding: 4px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity .15s ease, transform .15s ease;
  z-index: 60;
}
.langsel.is-open .langsel__menu {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.langsel__menu li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 7px;
  font-size: 13px;
  color: var(--text-dim);
  cursor: pointer;
}
.langsel__menu li:hover { background: var(--surface-3); color: var(--text); }
.langsel__menu li.is-active { color: var(--accent); }
.langsel__menu li.is-active::after { content: "✓"; font-size: 12px; }

/* ============================================================
   TREE NAV  (vanilla herbouw van het animated-file-tree component)
   variant: "line"  ·  active color: neon accent
   ============================================================ */
.tree {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 4px;
  user-select: none;
  overflow-y: auto;
}

/* --- Gele lijn: geeft aan op welke tab je zit, glijdt mee --- */
.tree-rail {
  position: absolute;
  top: 0;
  left: 0;
  width: 11px;
  box-sizing: border-box;
  border-left: 1.5px solid var(--accent);
  border-bottom: 1.5px solid var(--accent);
  border-bottom-left-radius: 6px;
  z-index: 3;
  opacity: 0;
  pointer-events: none;
  transform: translateY(0);
  transition:
    transform .5s cubic-bezier(.45, 0, .25, 1),
    height .5s cubic-bezier(.45, 0, .25, 1),
    left .5s cubic-bezier(.45, 0, .25, 1),
    opacity .2s ease;
}
.tree-rail.is-visible { opacity: 1; }

/* "opkomen" als je naar een andere sectie navigeert */
.tree-rail.is-appearing { animation: tree-rail-appear .34s cubic-bezier(.3, .8, .38, 1); }
@keyframes tree-rail-appear {
  from { opacity: 0; clip-path: inset(0 0 100% 0); }
  to   { opacity: 1; clip-path: inset(0 0 -4px 0); }
}

/* geen animatie bij de eerste plaatsing */
.tree-rail.is-still { transition: none; }

/* --- Section ------------------------------------------------ */
.tree-section { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 2px; }
.tree-section + .tree-section { margin-top: 10px; }
.tree-section--admin { display: none; }
body.is-admin .tree-section--admin { display: flex; }

.tree-section__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 6px 8px;
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-faint);
  transition: color .14s;
}
.tree-section__toggle:hover { color: var(--text); }
.tree-section__toggle span {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.tree-section__toggle .chev {
  width: 14px; height: 14px;
  transition: transform .2s ease;
}
.tree-section[data-expanded="false"] .tree-section__toggle .chev { transform: rotate(-90deg); }

/* --- Collapsible panel (grid-rows animatie, zoals het component) --- */
.tree-panel {
  display: grid;
  grid-template-rows: 1fr;
  opacity: 1;
  transition: grid-template-rows .3s ease, opacity .3s ease;
}
.tree-panel > div { overflow: hidden; }
[data-expanded="false"] > .tree-panel {
  grid-template-rows: 0fr;
  opacity: 0;
  pointer-events: none;
}
.tree-folder > .tree-panel { padding-left: 16px; }

/* --- Tree list + SVG connector lines ----------------------- */
.tree-list { position: relative; display: flex; flex-direction: column; gap: 2px; }
.tree-lines {
  position: absolute;
  top: 0;
  left: 12.5px;
  z-index: 1;
  pointer-events: none;
  color: var(--border);
}

/* --- Tree item / folder row ------------------------------- */
.tree-item,
.tree-folder__toggle {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  height: 32px;
  padding: 0 10px 0 32px;
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  text-align: left;
  font-size: 13.5px;
  font-weight: 400;
  color: var(--text-dim);
  cursor: pointer;
  outline: none;
  text-decoration: none;
  transition: color .14s, background .14s;
}
.tree-item .row,
.tree-folder__toggle .row { display: flex; align-items: center; gap: 8px; min-width: 0; z-index: 2; }
.tree-item svg,
.tree-folder__toggle svg { width: 16px; height: 16px; flex-shrink: 0; }
.tree-item .lbl,
.tree-folder__toggle .lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.tree-item:hover,
.tree-folder__toggle:hover { color: var(--text); background: var(--surface-2); }
.tree-item:hover svg,
.tree-folder__toggle:hover svg { color: var(--text); }
.tree-item:focus-visible,
.tree-folder__toggle:focus-visible { box-shadow: 0 0 0 2px var(--accent-glow); }

.tree-item.is-active {
  font-weight: 600;
  color: var(--text);
}
.tree-item.is-active > .row > svg { color: var(--accent); }

.tree-folder.is-active > .tree-folder__toggle { color: var(--text); font-weight: 600; }
.tree-folder.is-active > .tree-folder__toggle > .row > svg:not(.chev) { color: var(--accent); }

.tree-item svg,
.tree-folder__toggle svg { color: var(--text-faint); transition: color .14s; }

.tree-folder__toggle .chev {
  width: 13px; height: 13px;
  transition: transform .2s ease;
}
.tree-folder[data-expanded="true"] > .tree-folder__toggle .chev { transform: rotate(90deg); }

.tree-badge {
  z-index: 2;
  flex-shrink: 0;
  border-radius: 5px;
  padding: 2px 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: var(--accent-glow);
  color: var(--accent);
}

.sidebar__foot {
  border-top: 1px solid var(--border-soft);
  padding-top: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent);
  color: #000;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-family: var(--font-display);
  font-size: 14px;
}
.sidebar__foot .who { font-size: 13px; line-height: 1.3; }
.sidebar__foot .who span { display: block; color: var(--text-faint); font-size: 11.5px; }
.sidebar__foot a { margin-left: auto; color: var(--text-faint); }
.sidebar__foot a:hover { color: var(--accent); }

/* ---------- Main ---------- */
.main { padding: 0 0 64px; min-width: 0; }
.grid > *, .card, .table-scroll { min-width: 0; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 32px;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
}
.topbar h1 { font-size: 20px; }
.topbar .spacer { flex: 1; }
.hamburger {
  display: none;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
  cursor: pointer;
}
.hamburger svg { width: 18px; height: 18px; display: block; }

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 14px;
  color: var(--text-faint);
  font-size: 13px;
  width: 240px;
}
.search svg { width: 15px; height: 15px; flex-shrink: 0; }
.search input { background: none; border: none; outline: none; width: 100%; min-width: 0; }
.icon-btn {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }

.view { padding: 28px 32px 0; max-width: var(--maxw); }
.view[hidden] { display: none; }
.view__head { margin-bottom: 22px; }
.view__head p { color: var(--text-dim); font-size: 14px; margin-top: 4px; }

/* ---------- Cards / grid ---------- */
.grid { display: grid; gap: 16px; }
.grid--stats { grid-template-columns: repeat(4, 1fr); }
.grid--2 { grid-template-columns: 1fr 1fr; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }

.card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 20px;
}
.card--pad-lg { padding: 24px; }
.card__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.card__title h3 { font-size: 15px; }
.card__title a { font-size: 13px; color: var(--accent); }

.stat .label {
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.stat .value {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 10px 0 6px;
}
.delta { font-size: 12.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.delta--up { color: var(--ok); }
.delta--down { color: var(--danger); }
.delta--flat { color: var(--text-faint); }

/* ---------- Table ---------- */
.table-scroll { overflow-x: auto; }
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 560px;
}
table.data th {
  text-align: left;
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
  font-weight: 600;
  padding: 0 16px 12px;
  border-bottom: 1px solid var(--border-soft);
}
table.data td {
  padding: 15px 16px;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text-dim);
}
table.data tr:last-child td { border-bottom: none; }
table.data td.strong { color: var(--text); font-weight: 500; white-space: nowrap; }
table.data tbody tr:hover td { background: var(--surface-2); }

/* Compacte tabellen in 2-koloms kaarten hoeven niet te scrollen */
.grid--2 table.data { min-width: 0; }

/* ---------- Bestandenlijst + upload ---------- */
.filelist { display: flex; flex-direction: column; }
.file-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 4px;
  border-bottom: 1px solid var(--border-soft);
}
.file-row:last-child { border-bottom: none; }
.file-row__ico {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 8px;
  background: var(--surface-3);
  color: var(--accent);
  display: grid;
  place-items: center;
}
.file-row__ico svg { width: 16px; height: 16px; }
.file-row__main { min-width: 0; flex: 1; }
.file-row__name { color: var(--text); font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-row__meta { color: var(--text-faint); font-size: 12px; margin-top: 2px; }
.file-row__act { display: flex; gap: 8px; flex-shrink: 0; }

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-faint);
  font-size: 14px;
}
.empty-state svg { width: 30px; height: 30px; margin-bottom: 10px; opacity: 0.5; }

.dropzone {
  border: 1.5px dashed var(--border);
  border-radius: var(--radius);
  padding: 32px 20px;
  text-align: center;
  color: var(--text-dim);
  font-size: 14px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.dropzone:hover,
.dropzone.is-drag { border-color: var(--accent); background: var(--accent-glow); }
.dropzone svg { width: 26px; height: 26px; margin-bottom: 8px; color: var(--accent); }
.dropzone input[type="file"] { display: none; }

.upload-queue { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.upload-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-dim);
  padding: 8px 10px;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
}
.upload-item .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--warn); flex-shrink: 0; }
.upload-item.is-done .dot { background: var(--ok); }
.upload-item.is-error .dot { background: var(--danger); }

.field-row {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 14px;
}
.field-row label { display: block; font-size: 12px; letter-spacing: .05em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 6px; }
.field-row select,
.field-row input {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 12px;
  color: var(--text);
}
.field-row select:focus,
.field-row input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }

@media (max-width: 560px) {
  .field-row { grid-template-columns: 1fr; }
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--border);
}
.tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tag--ok     { color: var(--ok);     border-color: var(--ok-border); background: var(--ok-bg); }
.tag--warn   { color: var(--warn);   border-color: rgba(255,176,32,0.3); background: rgba(255,176,32,0.06); }
.tag--danger { color: var(--danger); border-color: rgba(255,77,77,0.3); background: rgba(255,77,77,0.06); }
.tag--info   { color: var(--info);   border-color: rgba(99,179,255,0.3); background: rgba(99,179,255,0.06); }
.tag--muted  { color: var(--text-faint); }

.link-btn {
  color: var(--accent);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}
.link-btn:hover { text-decoration: underline; }
.link-btn--danger { color: var(--danger); }

/* ---------- Admin-paneel ---------- */
.admin-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-soft);
  overflow-x: auto;
}
.admin-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dim);
  cursor: pointer;
  white-space: nowrap;
  transition: color .14s, border-color .14s;
}
.admin-tab:hover { color: var(--text); }
.admin-tab.is-active { color: var(--text); border-bottom-color: var(--accent); }

.admin-inline {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.admin-inline input {
  flex: 1;
  min-width: 200px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 12px;
  color: var(--text);
}
.admin-inline input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }

.admin-actions { display: flex; gap: 12px; white-space: nowrap; }
.admin-check-cell { display: flex; align-items: flex-end; padding-bottom: 11px; }
.field-row .admin-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 13.5px;
  color: var(--text-dim);
  text-transform: none;
  letter-spacing: 0;
  cursor: pointer;
}
.field-row .admin-check span { margin: 0; }
.admin-mini {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 8px;
  color: var(--text);
  font-size: 13px;
  max-width: 180px;
}
.admin-mini:focus { outline: none; border-color: var(--accent); }
table.data td input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--accent); }

.admin-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 20px);
  background: var(--surface-3);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 11px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  z-index: 9999;
}
.admin-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.admin-toast.is-error { border-color: rgba(255,77,77,0.4); color: var(--danger); }

/* ---------- Bar chart (pure CSS) ---------- */
.chart {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  height: 180px;
  padding-top: 12px;
}
.chart .bar {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  height: 100%;
  justify-content: flex-end;
  color: var(--text-faint);
  font-size: 12px;
}
.chart .bar i {
  width: 100%;
  max-width: 52px;
  border-radius: 6px 6px 0 0;
  background: var(--surface-3);
  transition: background .2s;
}
.chart .bar:last-child i { background: var(--accent); }
.chart .bar:hover i { background: var(--accent-600); }

/* ---------- Insights list ---------- */
.insights { display: flex; flex-direction: column; gap: 14px; }
.insight {
  display: flex;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.insight .ico {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--accent-glow);
  color: var(--accent);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.insight .ico svg { width: 16px; height: 16px; }
.insight p { font-size: 13.5px; color: var(--text-dim); }
.insight p b { color: var(--text); }

/* ---------- Support ---------- */
.contact-list { display: flex; flex-direction: column; gap: 4px; }
.contact-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-soft);
  font-size: 14px;
}
.contact-row:last-child { border-bottom: none; }
.contact-row .ico { color: var(--accent); width: 18px; flex-shrink: 0; display: flex; }
.contact-row > span:last-child { color: var(--text-faint); margin-left: auto; font-size: 13px; }

textarea.input {
  width: 100%;
  min-height: 120px;
  resize: vertical;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
}
textarea.input:focus, .field-inline input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.field-inline {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 12px;
}
.field-inline input {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.form-sent {
  margin-top: 12px;
  font-size: 13px;
  color: var(--ok);
  display: none;
}
.form-sent.show { display: block; }

/* ---------- Misc ---------- */
.section-gap { height: 20px; }
.muted { color: var(--text-faint); }
.divider { height: 1px; background: var(--border-soft); margin: 20px 0; }

.scrim {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 40;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1600px) {
  .grid--2 { grid-template-columns: 1fr; }
}
table.data td + td { white-space: nowrap; }
table.data td:nth-child(2) { white-space: normal; }

@media (max-width: 1080px) {
  .grid--stats { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .login-wrap { grid-template-columns: 1fr; }
  .login-aside { display: none; }
}

@media (max-width: 820px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    position: fixed;
    left: 0; top: 0;
    width: 260px;
    z-index: 50;
    transform: translateX(-100%);
    transition: transform .22s ease;
  }
  .sidebar.is-open { transform: translateX(0); }
  .scrim.is-open { display: block; }
  .hamburger { display: block; }
  .grid--2, .grid--3 { grid-template-columns: 1fr; }
  .view, .topbar { padding-left: 18px; padding-right: 18px; }
  .search { display: none; }
}

@media (max-width: 520px) {
  .grid--stats { grid-template-columns: 1fr; }
  .field-inline { grid-template-columns: 1fr; }
}
