/* Native admin (admin/*.js). Built on the public site's tokens from common.css,
   so light and dark follow html.dark exactly like otv.today/v2. Text sizes only
   use the five --fs-* steps. Prefix: ak- (admin kit). */

body.ak-app {
  --ak-accent: #3b82f6;
  --ak-accent-strong: #2563eb;
  --ak-accent-soft: color-mix(in srgb, #3b82f6 12%, transparent);
  --ak-surface: var(--bg-card);
  --ak-subtle: color-mix(in srgb, var(--bg-main) 55%, var(--bg-card));
  --ak-line: var(--border-light);
  --ak-red: #ef4444;
  --ak-amber: #f59e0b;
  --ak-green: #10b981;
  --ak-violet: #8b5cf6;
  --ak-cyan: #06b6d4;
  --ak-radius: 14px;
  --ak-sidebar: 248px;

  /* The older proposal/televot styles in admin-new.css read these. */
  --admin-canvas: var(--bg-main);
  --admin-surface: var(--bg-card);
  --admin-subtle: var(--ak-subtle);
  --admin-hover: var(--bg-hover);
  --admin-line: var(--border-light);
  --admin-border: var(--border-medium);
  --admin-ink: var(--text-primary);
  --admin-ink-soft: var(--text-secondary);
  --admin-muted: var(--text-secondary);
  --admin-faint: var(--text-muted);

  margin: 0;
  height: 100dvh;
  overflow: hidden;
  background: var(--bg-main);
  color: var(--text-primary);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: var(--fs-sm);
}

html.dark body.ak-app {
  --ak-accent: #60a5fa;
  --ak-accent-soft: color-mix(in srgb, #60a5fa 16%, transparent);
  --ak-subtle: color-mix(in srgb, var(--bg-main) 50%, var(--bg-card));
}

.ak-app *:focus-visible { outline: 3px solid color-mix(in srgb, var(--ak-accent) 35%, transparent); outline-offset: 2px; }
.ak-app button { font: inherit; color: inherit; }
.ak-app [hidden] { display: none !important; }

/* ----------------------------------------------------------------- layout */

.ak-layout { display: grid; grid-template-columns: var(--ak-sidebar) minmax(0, 1fr); height: 100dvh; }

.ak-sidebar {
  display: flex; flex-direction: column; min-height: 0;
  background: var(--bg-sidebar); border-right: 1px solid var(--ak-line);
}
.ak-nav { flex: 1; overflow-y: auto; padding: 4px 10px 12px; display: flex; flex-direction: column; gap: 1px; }
.ak-nav-label { margin: 14px 10px 4px; color: var(--text-muted); font-size: var(--fs-xs); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.ak-nav-item {
  display: flex; align-items: center; flex: none; gap: 11px; width: 100%; min-height: 36px; box-sizing: border-box;
  padding: 8px 10px; border: 0; border-radius: 9px; background: none; color: var(--text-secondary);
  font-size: var(--fs-sm); font-weight: 500; line-height: 1.25rem; text-align: left; text-decoration: none; cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
}
.ak-nav-item i { width: 18px; text-align: center; color: var(--text-muted); transition: color var(--transition-fast); }
.ak-nav-item span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ak-nav-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.ak-nav-item.is-active { background: var(--ak-accent-soft); color: var(--ak-accent-strong); font-weight: 600; }
html.dark .ak-nav-item.is-active { color: var(--ak-accent); }
.ak-nav-item.is-active i { color: inherit; }
.ak-nav-item b {
  display: grid; place-items: center; flex: none; box-sizing: border-box; min-width: 1.25rem; height: 1.25rem;
  padding: 0 6px; border-radius: 999px; background: var(--ak-accent); color: #fff;
  font-size: var(--fs-xs); font-weight: 700; line-height: 1;
}
.ak-nav-item b.is-red { background: var(--ak-red); }
.ak-sidebar-foot { padding: 10px; border-top: 1px solid var(--ak-line); }

.ak-main { position: relative; min-width: 0; overflow-y: auto; overscroll-behavior: contain; }

.ak-topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px;
  padding: 14px 28px; min-height: 72px; box-sizing: border-box;
  background: color-mix(in srgb, var(--bg-main) 82%, transparent);
  backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid color-mix(in srgb, var(--ak-line) 70%, transparent);
}
.ak-title { flex: 1; min-width: 0; }
.ak-title h1 { margin: 0; font-family: "Poppins", sans-serif; font-size: var(--fs-lg); font-weight: 700; line-height: 1.2; }
.ak-title p { margin: 2px 0 0; color: var(--text-secondary); font-size: var(--fs-xs); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ak-icon-btn.ak-menu-btn { display: none; }

.ak-content { padding: 22px 28px 64px; max-width: 1320px; box-sizing: border-box; }
.ak-stack { display: flex; flex-direction: column; gap: 18px; }
.ak-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.ak-grid-2.is-top { align-items: start; }
.ak-scrim { display: none; }

/* --------------------------------------------------------------- controls */

.ak-icon-btn {
  display: inline-grid; place-items: center; width: 36px; height: 36px; flex: none; padding: 0;
  border: 1px solid var(--ak-line); border-radius: 10px; background: var(--ak-surface);
  color: var(--text-secondary); cursor: pointer; transition: background var(--transition-fast), color var(--transition-fast);
}
.ak-icon-btn:hover:not(:disabled) { background: var(--bg-hover); color: var(--text-primary); }
.ak-icon-btn:disabled { opacity: .4; cursor: default; }
.ak-icon-btn.is-danger:hover { color: var(--ak-red); border-color: color-mix(in srgb, var(--ak-red) 40%, transparent); }

.ak-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 15px;
  border: 1px solid var(--ak-line); border-radius: 10px; background: var(--ak-surface); color: var(--text-primary);
  font-size: var(--fs-sm); font-weight: 600; line-height: 1.2; text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
}
.ak-btn:hover:not(:disabled) { background: var(--bg-hover); }
.ak-btn:active:not(:disabled) { transform: translateY(1px); }
.ak-btn:disabled { opacity: .5; cursor: default; }
.ak-btn.is-small { padding: 6px 11px; font-size: var(--fs-xs); }
.ak-btn.is-ghost { background: transparent; }
.ak-btn.is-primary { background: var(--ak-accent-strong); border-color: var(--ak-accent-strong); color: #fff; }
.ak-btn.is-primary:hover:not(:disabled) { background: #1d4ed8; }
.ak-btn.is-danger { background: var(--ak-red); border-color: var(--ak-red); color: #fff; }
.ak-btn.is-danger:hover:not(:disabled) { background: #dc2626; }
.ak-btn.is-green { background: var(--ak-green); border-color: var(--ak-green); color: #fff; }
.ak-btn.is-green:hover:not(:disabled) { background: #059669; }
.ak-btn.is-amber { background: var(--ak-amber); border-color: var(--ak-amber); color: #111827; }
.ak-btn.is-red-soft { background: color-mix(in srgb, var(--ak-red) 10%, transparent); border-color: color-mix(in srgb, var(--ak-red) 25%, transparent); color: #dc2626; }
.ak-btn.is-amber-soft { background: color-mix(in srgb, var(--ak-amber) 12%, transparent); border-color: color-mix(in srgb, var(--ak-amber) 30%, transparent); color: #b45309; }
html.dark .ak-btn.is-red-soft { color: #fca5a5; }
html.dark .ak-btn.is-amber-soft { color: #fcd34d; }
.ak-btn.is-danger-ghost { background: transparent; border-color: transparent; color: var(--ak-red); }
.ak-btn.is-danger-ghost:hover:not(:disabled) { background: color-mix(in srgb, var(--ak-red) 10%, transparent); }

.ak-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ak-toolbar select, .ak-field select, .ak-field input, .ak-field textarea, .ak-text-input, .ak-num-input input {
  box-sizing: border-box; padding: 9px 12px; border: 1px solid var(--ak-line); border-radius: 10px;
  background: var(--ak-surface); color: var(--text-primary); font: inherit; font-size: var(--fs-sm);
}
.ak-toolbar select { padding-right: 30px; cursor: pointer; }
.ak-toolbar .ak-hint, .ak-toolbar .ak-export { margin-left: auto; }

.ak-search { position: relative; display: flex; align-items: center; flex: 1 1 260px; min-width: 200px; max-width: 420px; }
.ak-search > i { position: absolute; left: 13px; color: var(--text-muted); pointer-events: none; }
.ak-search input {
  width: 100%; box-sizing: border-box; padding: 9px 12px 9px 38px; border: 1px solid var(--ak-line); border-radius: 10px;
  background: var(--ak-surface); color: var(--text-primary); font: inherit; font-size: var(--fs-sm);
}
.ak-search input:focus, .ak-toolbar select:focus, .ak-field :is(input, select, textarea):focus, .ak-text-input:focus, .ak-num-input input:focus {
  outline: none; border-color: var(--ak-accent); box-shadow: 0 0 0 3px var(--ak-accent-soft);
}

.ak-segmented { display: inline-flex; max-width: 100%; padding: 3px; gap: 2px; border-radius: 11px; background: var(--bg-hover); overflow-x: auto; scrollbar-width: none; box-sizing: border-box; }
.ak-segmented button {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 0; border-radius: 8px;
  background: none; color: var(--text-secondary); font-size: var(--fs-xs); font-weight: 600; cursor: pointer; white-space: nowrap;
}
.ak-segmented button:hover { color: var(--text-primary); }
.ak-segmented button.is-active { background: var(--ak-surface); color: var(--text-primary); box-shadow: var(--shadow-sm); }
.ak-segmented b { padding: 0 6px; border-radius: 999px; background: color-mix(in srgb, var(--text-muted) 18%, transparent); font-size: var(--fs-xs); }
.ak-segmented button.is-active b { background: var(--ak-accent-soft); color: var(--ak-accent-strong); }
html.dark .ak-segmented button.is-active b { color: var(--ak-accent); }

.ak-badges { display: flex; flex-wrap: wrap; gap: 5px; }
.ak-badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 999px;
  font-size: var(--fs-xs); font-weight: 600; line-height: 1.6; white-space: nowrap;
  background: var(--bg-hover); color: var(--text-secondary);
}
.ak-badge i { font-size: 0.85em; }
.ak-badge.is-red { background: color-mix(in srgb, var(--ak-red) 12%, transparent); color: #dc2626; }
.ak-badge.is-amber { background: color-mix(in srgb, var(--ak-amber) 15%, transparent); color: #b45309; }
.ak-badge.is-green { background: color-mix(in srgb, var(--ak-green) 13%, transparent); color: #047857; }
.ak-badge.is-blue { background: var(--ak-accent-soft); color: var(--ak-accent-strong); }
html.dark .ak-badge.is-red { color: #fca5a5; }
html.dark .ak-badge.is-amber { color: #fcd34d; }
html.dark .ak-badge.is-green { color: #6ee7b7; }
html.dark .ak-badge.is-blue { color: #93c5fd; }

.ak-chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.ak-chip {
  padding: 5px 11px; border: 1px solid var(--ak-line); border-radius: 999px; background: var(--ak-surface);
  color: var(--text-secondary); font-size: var(--fs-xs); font-weight: 600; cursor: pointer;
}
.ak-chip:hover { color: var(--text-primary); border-color: var(--border-medium); }
.ak-chip.is-active { background: var(--ak-accent-soft); border-color: color-mix(in srgb, var(--ak-accent) 40%, transparent); color: var(--ak-accent-strong); }
html.dark .ak-chip.is-active { color: #93c5fd; }

.ak-switch { position: relative; display: inline-block; width: 42px; height: 24px; flex: none; cursor: pointer; }
.ak-switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.ak-switch i { position: absolute; inset: 0; border-radius: 999px; background: var(--border-medium); transition: background var(--transition-fast); pointer-events: none; }
.ak-switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform var(--transition-fast); }
.ak-switch input:checked + i { background: var(--ak-green); }
.ak-switch input:checked + i::after { transform: translateX(18px); }
.ak-switch input:focus-visible + i { outline: 3px solid var(--ak-accent-soft); outline-offset: 2px; }

.ak-hint { color: var(--text-muted); font-size: var(--fs-xs); }
.ak-label { display: block; margin-bottom: 4px; color: var(--text-muted); font-size: var(--fs-xs); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.ak-muted-note { display: flex; align-items: center; gap: 8px; margin: 6px 0; color: var(--text-secondary); font-size: var(--fs-sm); }

/* ------------------------------------------------------------ person/avatar */

.ak-avatar {
  width: var(--size, 36px); height: var(--size, 36px); flex: none; border-radius: 50%; object-fit: cover;
  background: var(--bg-hover);
}
.ak-avatar.is-initials {
  display: inline-grid; place-items: center; background: var(--avatar-fallback-bg); color: var(--text-primary);
  font-size: calc(var(--size, 36px) * .38); font-weight: 700;
}
.ak-person { display: inline-flex; align-items: center; gap: 10px; min-width: 0; max-width: 100%; padding: 0; border: 0; background: none; text-align: left; color: inherit; text-decoration: none; }
.ak-person.is-button { cursor: pointer; }
.ak-person.is-button:hover .ak-person-name { color: var(--ak-accent-strong); }
html.dark .ak-person.is-button:hover .ak-person-name { color: var(--ak-accent); }
.ak-person-text { display: flex; flex-direction: column; min-width: 0; }
.ak-person-name { font-weight: 600; font-size: var(--fs-sm); color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ak-person-handle { color: var(--text-muted); font-size: var(--fs-xs); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ak-verified { margin-left: 4px; color: var(--ak-accent); font-size: 0.85em; }

/* ------------------------------------------------------------ cards/tiles */

.ak-card { min-width: 0; border: 1px solid var(--ak-line); border-radius: var(--ak-radius); background: var(--ak-surface); box-shadow: var(--shadow-sm); }
.ak-card.is-flush { overflow: hidden; }
.ak-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 18px 0; }
.ak-card-head h3 { margin: 0; font-size: var(--fs-md); font-weight: 700; }
.ak-card-head p { margin: 2px 0 0; color: var(--text-muted); font-size: var(--fs-xs); }
.ak-card-body { padding: 14px 18px 18px; }
.ak-card-icon { color: var(--text-muted); font-size: var(--fs-md); }
.ak-subhead { margin: 18px 0 8px; color: var(--text-muted); font-size: var(--fs-xs); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }

.ak-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.ak-tiles.is-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ak-tile {
  position: relative; display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 16px 18px;
  border: 1px solid var(--ak-line); border-radius: var(--ak-radius); background: var(--ak-surface); box-shadow: var(--shadow-sm);
  text-align: left; overflow: hidden;
}
.ak-tile::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--tone, var(--ak-accent)); opacity: .85; }
.ak-tile.is-violet { --tone: var(--ak-violet); }
.ak-tile.is-green { --tone: var(--ak-green); }
.ak-tile.is-amber { --tone: var(--ak-amber); }
button.ak-tile { cursor: pointer; transition: transform var(--transition-fast), box-shadow var(--transition-fast); }
button.ak-tile:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.ak-tile-label { display: flex; align-items: center; gap: 7px; color: var(--text-secondary); font-size: var(--fs-xs); font-weight: 600; }
.ak-tile-label i { color: var(--tone, var(--ak-accent)); }
.ak-tile-value { font-family: "Poppins", sans-serif; font-size: var(--fs-xl); font-weight: 700; line-height: 1.1; letter-spacing: -.01em; }
.ak-tile-sub { color: var(--text-muted); font-size: var(--fs-xs); }
.ak-tile-sub .is-up { color: var(--ak-green); font-weight: 700; }
.ak-tiles.is-small .ak-tile { padding: 13px 16px; }
.ak-tiles.is-small .ak-tile::before { display: none; }
.ak-tiles.is-small .ak-tile-value { font-size: var(--fs-lg); }
.ak-tile.is-skeleton { gap: 12px; }

/* Sumar: "De rezolvat" */
.ak-todo-strip { padding: 16px 18px 18px; border: 1px solid var(--ak-line); border-radius: var(--ak-radius); background: var(--ak-surface); box-shadow: var(--shadow-sm); }
.ak-todo-strip > header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.ak-todo-strip h3 { margin: 0; font-size: var(--fs-md); }
.ak-todo-strip > header span { color: var(--text-muted); font-size: var(--fs-xs); }
.ak-todo-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.ak-todo {
  --tone: var(--ak-accent);
  display: flex; align-items: center; gap: 12px; padding: 11px 12px; border: 1px solid var(--ak-line); border-radius: 12px;
  background: var(--ak-subtle); text-align: left; cursor: pointer; transition: border-color var(--transition-fast), background var(--transition-fast);
}
.ak-todo:hover { border-color: color-mix(in srgb, var(--tone) 45%, transparent); background: color-mix(in srgb, var(--tone) 6%, var(--ak-surface)); }
.ak-todo.is-red { --tone: var(--ak-red); }
.ak-todo.is-amber { --tone: var(--ak-amber); }
.ak-todo.is-violet { --tone: var(--ak-violet); }
.ak-todo.is-green { --tone: var(--ak-green); }
.ak-todo.is-cyan { --tone: var(--ak-cyan); }
.ak-todo-icon { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 10px; background: color-mix(in srgb, var(--tone) 14%, transparent); color: var(--tone); }
.ak-todo-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.ak-todo-text strong { font-family: "Poppins", sans-serif; font-size: var(--fs-lg); line-height: 1.1; }
.ak-todo-text span { color: var(--text-secondary); font-size: var(--fs-xs); }
.ak-todo-go { color: var(--text-muted); font-size: var(--fs-xs); }
.ak-todo.is-done { opacity: .62; }
.ak-todo.is-done .ak-todo-icon { background: color-mix(in srgb, var(--ak-green) 14%, transparent); color: var(--ak-green); }

/* --------------------------------------------------------------- charts */

.ak-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 10px; color: var(--text-secondary); font-size: var(--fs-xs); }
.ak-legend span { display: inline-flex; align-items: center; gap: 6px; }
.ak-legend i { width: 9px; height: 9px; border-radius: 3px; }
.ak-chart { position: relative; }
.ak-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.ak-chart-grid { stroke: var(--ak-line); stroke-width: 1; stroke-dasharray: 3 4; }
.ak-chart-axis { fill: var(--text-muted); font-size: 11px; font-family: "Inter", sans-serif; }
.ak-chart-hit { fill: transparent; cursor: crosshair; }
.ak-chart-cursor { stroke: var(--text-muted); stroke-width: 1; stroke-dasharray: 2 3; }
.ak-chart-tip {
  position: absolute; top: 4px; z-index: 2; transform: translateX(-50%); min-width: 140px; padding: 9px 11px;
  border: 1px solid var(--ak-line); border-radius: 10px; background: var(--window-glass);
  backdrop-filter: var(--window-glass-filter); -webkit-backdrop-filter: var(--window-glass-filter);
  box-shadow: var(--shadow-lg); pointer-events: none; font-size: var(--fs-xs);
}
.ak-chart-tip strong { display: block; margin-bottom: 4px; }
.ak-chart-tip span { display: flex; align-items: center; gap: 6px; color: var(--text-secondary); }
.ak-chart-tip span i { width: 8px; height: 8px; border-radius: 2px; }
.ak-chart-tip span b { margin-left: auto; padding-left: 12px; color: var(--text-primary); }

.ak-shares { display: flex; flex-direction: column; gap: 14px; }
.ak-share-top { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 6px; font-size: var(--fs-sm); }
.ak-share-top b { white-space: nowrap; }
.ak-share-top small { margin-left: 4px; color: var(--text-muted); font-size: var(--fs-xs); font-weight: 500; }
.ak-share-track { height: 8px; border-radius: 999px; background: var(--bg-hover); overflow: hidden; }
.ak-share-track span { display: block; height: 100%; border-radius: inherit; transition: width .5s ease; }

/* --------------------------------------------------------------- tables */

.ak-table-wrap { overflow-x: auto; }
.ak-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.ak-table th {
  position: sticky; top: 0; padding: 11px 16px; border-bottom: 1px solid var(--ak-line); background: var(--ak-subtle);
  color: var(--text-muted); font-size: var(--fs-xs); font-weight: 600; text-align: left; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap;
}
.ak-table td { padding: 10px 16px; border-bottom: 1px solid var(--ak-line); vertical-align: middle; }
.ak-table tr:last-child td { border-bottom: 0; }
.ak-table .is-num { text-align: right; font-variant-numeric: tabular-nums; }
.ak-table td:first-child { max-width: 320px; }
.ak-table th.is-num, .ak-table td.is-num { width: 1%; white-space: nowrap; }
.ak-table th.is-num .ak-th-sort { margin-left: auto; }
.ak-table .is-date span { display: block; white-space: nowrap; }
.ak-table .is-date small { color: var(--text-muted); font-size: var(--fs-xs); }
.ak-row-link { cursor: pointer; transition: background var(--transition-fast); }
.ak-row-link:hover { background: var(--bg-hover); }
.ak-th-sort { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-transform: inherit; letter-spacing: inherit; cursor: pointer; }
.ak-th-sort i { opacity: .45; }
.ak-th-sort.is-active { color: var(--text-primary); }
.ak-th-sort.is-active i { opacity: 1; color: var(--ak-accent); }

.ak-pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; color: var(--text-muted); font-size: var(--fs-xs); }
.ak-pager-buttons { display: flex; gap: 6px; }

/* ---------------------------------------------------------------- states */

.ak-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 48px 20px; color: var(--text-secondary); text-align: center; }
.ak-empty strong { color: var(--text-primary); font-size: var(--fs-md); }
.ak-empty > span:not(.ak-empty-icon) { max-width: 380px; font-size: var(--fs-sm); }
.ak-empty-icon { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 6px; border-radius: 16px; background: var(--bg-hover); color: var(--text-muted); font-size: var(--fs-lg); }
.ak-empty.is-error .ak-empty-icon { background: color-mix(in srgb, var(--ak-red) 12%, transparent); color: var(--ak-red); }
.ak-empty .ak-btn { margin-top: 8px; }

.ak-skel { display: block; height: 12px; border-radius: 6px; background: linear-gradient(90deg, var(--bg-hover) 25%, color-mix(in srgb, var(--bg-hover) 50%, var(--ak-surface)) 50%, var(--bg-hover) 75%); background-size: 200% 100%; animation: ak-shimmer 1.2s infinite linear; }
.ak-skel.is-round { width: 36px; height: 36px; flex: none; border-radius: 50%; }
.ak-skel.is-big { height: 26px; }
.ak-skeleton-list { display: flex; flex-direction: column; padding: 8px 0; }
.ak-skeleton-row { display: flex; align-items: center; gap: 16px; padding: 12px 16px; }
@keyframes ak-shimmer { to { background-position: -200% 0; } }

/* ---------------------------------------------------------------- toasts */

.ak-toasts { position: fixed; right: 20px; bottom: 20px; z-index: 1000; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.ak-toast {
  display: flex; align-items: center; gap: 10px; max-width: 380px; padding: 11px 15px; border-radius: 12px;
  background: #0f172a; color: #f8fafc; box-shadow: var(--shadow-xl); font-size: var(--fs-sm); font-weight: 500;
  opacity: 0; transform: translateY(8px); transition: opacity .2s ease, transform .2s ease;
}
html.dark .ak-toast { background: #f8fafc; color: #0f172a; }
.ak-toast.is-in { opacity: 1; transform: none; }
.ak-toast.is-success i { color: var(--ak-green); }
.ak-toast.is-error i { color: var(--ak-red); }
.ak-toast.is-info i { color: var(--ak-accent); }

/* --------------------------------------------------------------- dialog */

.ak-dialog { position: fixed; inset: 0; width: min(460px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); margin: auto; padding: 0; border: 0; background: transparent; color: var(--text-primary); overflow: visible; }
.ak-dialog::backdrop { background: var(--window-scrim); backdrop-filter: var(--window-scrim-filter); -webkit-backdrop-filter: var(--window-scrim-filter); }
.ak-dialog-card {
  display: flex; flex-direction: column; gap: 14px; padding: 22px; border: 1px solid var(--ak-line); border-radius: 18px;
  background: var(--window-glass); backdrop-filter: var(--window-glass-filter); -webkit-backdrop-filter: var(--window-glass-filter);
  box-shadow: var(--shadow-xl);
}
.ak-dialog-card header h2 { margin: 0; font-family: "Poppins", sans-serif; font-size: var(--fs-lg); line-height: 1.25; }
.ak-dialog-card header p { margin: 6px 0 0; color: var(--text-secondary); font-size: var(--fs-sm); line-height: 1.5; }
.ak-dialog-icon { display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 12px; border-radius: 12px; background: var(--ak-accent-soft); color: var(--ak-accent); font-size: var(--fs-md); }
.ak-dialog-icon.is-danger { background: color-mix(in srgb, var(--ak-red) 13%, transparent); color: var(--ak-red); }
.ak-dialog-icon.is-amber { background: color-mix(in srgb, var(--ak-amber) 15%, transparent); color: var(--ak-amber); }
.ak-dialog-icon.is-green { background: color-mix(in srgb, var(--ak-green) 14%, transparent); color: var(--ak-green); }
.ak-dialog-card footer { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }

.ak-field { display: flex; flex-direction: column; gap: 6px; }
.ak-field > span { color: var(--text-secondary); font-size: var(--fs-xs); font-weight: 600; }
.ak-field textarea { resize: vertical; line-height: 1.5; }
.ak-field small { color: var(--text-muted); font-size: var(--fs-xs); }
.ak-field.is-inline { flex-direction: row; align-items: center; gap: 8px; }
.ak-field.is-chips { gap: 8px; margin-bottom: -6px; }

/* ---------------------------------------------------------------- drawer */

.ak-drawer-host { position: fixed; inset: 0; z-index: 200; pointer-events: none; }
.ak-drawer-scrim { position: absolute; inset: 0; background: var(--window-scrim); backdrop-filter: var(--window-scrim-filter); -webkit-backdrop-filter: var(--window-scrim-filter); opacity: 0; transition: opacity .2s ease; }
.ak-drawer {
  position: absolute; top: 10px; right: 10px; bottom: 10px; display: flex; flex-direction: column; width: min(460px, calc(100vw - 20px));
  border: 1px solid var(--ak-line); border-radius: 18px; background: var(--window-glass);
  backdrop-filter: var(--window-glass-filter); -webkit-backdrop-filter: var(--window-glass-filter);
  box-shadow: var(--shadow-xl); transform: translateX(calc(100% + 20px)); transition: transform .26s cubic-bezier(.2, .8, .2, 1);
}
.ak-drawer.is-wide { width: min(620px, calc(100vw - 20px)); }
.ak-drawer-host.is-open { pointer-events: auto; }
.ak-drawer-host.is-open .ak-drawer-scrim { opacity: 1; }
.ak-drawer-host.is-open .ak-drawer { transform: none; }
.ak-drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px 10px 20px; }
.ak-drawer-head h2 { margin: 0; font-size: var(--fs-md); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ak-drawer-body { flex: 1; overflow-y: auto; padding: 4px 20px 20px; display: flex; flex-direction: column; gap: 16px; }

.ak-profile-head { display: flex; align-items: center; gap: 16px; }
.ak-profile-head h3 { margin: 0; font-family: "Poppins", sans-serif; font-size: var(--fs-lg); line-height: 1.2; }
.ak-profile-head p { margin: 2px 0 8px; color: var(--text-secondary); font-size: var(--fs-sm); word-break: break-all; }

.ak-mini-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.ak-mini-stat { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px; border-radius: 12px; background: color-mix(in srgb, var(--bg-hover) 70%, transparent); text-align: center; }
.ak-mini-stat strong { font-family: "Poppins", sans-serif; font-size: var(--fs-md); }
.ak-mini-stat span { color: var(--text-muted); font-size: var(--fs-xs); }

.ak-details { display: grid; gap: 8px; margin: 0; }
.ak-details > div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 10px; font-size: var(--fs-sm); }
.ak-details dt { color: var(--text-muted); }
.ak-details dd { margin: 0; word-break: break-word; }
.ak-details a { color: var(--ak-accent); }

.ak-drawer-section { display: flex; flex-direction: column; gap: 4px; padding-top: 14px; border-top: 1px solid var(--ak-line); }
.ak-drawer-section h4 { margin: 0 0 6px; color: var(--text-muted); font-size: var(--fs-xs); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.ak-control-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 0; }
.ak-control-row > span { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.ak-control-row > span i { width: 16px; color: var(--text-muted); text-align: center; }
.ak-control-row select { padding: 7px 28px 7px 10px; border: 1px solid var(--ak-line); border-radius: 9px; background: var(--ak-surface); color: var(--text-primary); font: inherit; font-size: var(--fs-sm); }
.ak-action-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.ak-drawer-foot { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--ak-line); }

.ak-callout { display: flex; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--bg-hover); font-size: var(--fs-sm); }
.ak-callout > i { margin-top: 2px; color: var(--text-muted); }
.ak-callout div { display: flex; flex-direction: column; gap: 2px; }
.ak-callout span { color: var(--text-secondary); }
.ak-callout.is-red { background: color-mix(in srgb, var(--ak-red) 10%, transparent); }
.ak-callout.is-red > i { color: var(--ak-red); }
.ak-callout.is-amber { background: color-mix(in srgb, var(--ak-amber) 12%, transparent); }
.ak-callout.is-amber > i { color: var(--ak-amber); }

/* ---------------------------------------------------------------- posts */

.ak-post-filter { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-xs); cursor: pointer; }

.ak-post-list {
  border: 1px solid var(--ak-line);
  border-radius: var(--ak-radius);
  background: var(--ak-surface);
  overflow: hidden;
}
.ak-post {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  height: 84px;
  padding: 10px 14px;
  cursor: pointer;
}
.ak-post + .ak-post { border-top: 1px solid var(--ak-line); }
.ak-post:hover { background: var(--bg-hover); }
.ak-post:focus-visible { outline: 2px solid var(--ak-accent); outline-offset: -2px; }
.ak-post-media { position: relative; height: 54px; overflow: hidden; border-radius: 8px; background: var(--bg-hover); }
.ak-post-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ak-thumb-fallback { display: grid; place-items: center; width: 100%; height: 100%; color: var(--text-muted); font-size: var(--fs-md); }
.ak-post-type {
  position: absolute; right: 3px; bottom: 3px; display: grid; place-items: center; width: 18px; height: 18px;
  border-radius: 4px; background: rgba(15, 23, 42, .85); color: #fff; font-size: 10px;
}
.ak-post-body { display: grid; gap: 4px; min-width: 0; }
.ak-post-body h4 { margin: 0; font-size: var(--fs-sm); font-weight: 600; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ak-post-aside { display: grid; justify-items: end; gap: 5px; min-width: 0; }
.ak-post-flags,
.ak-post-foot { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ak-post-foot { color: var(--text-muted); font-size: var(--fs-xs); white-space: nowrap; }
.ak-post-foot > span:not(.ak-post-date) { display: inline-flex; align-items: center; gap: 4px; }
.ak-post-date { overflow: hidden; text-overflow: ellipsis; }
.ak-quality { padding: 2px 8px; border-radius: 999px; font-size: var(--fs-xs); font-weight: 600; background: var(--bg-hover); color: var(--text-secondary); white-space: nowrap; }
.ak-quality.is-great, .ak-quality.is-good { background: color-mix(in srgb, var(--ak-green) 13%, transparent); color: var(--ak-green); }
.ak-quality.is-low, .ak-quality.is-below_average { background: color-mix(in srgb, var(--ak-red) 11%, transparent); color: var(--ak-red); }

.ak-preview { display: block; width: 100%; max-height: 420px; object-fit: contain; border-radius: 14px; background: #000; }
.ak-post-detail { display: flex; flex-direction: column; gap: 12px; }
.ak-post-detail h3 { margin: 0; font-size: var(--fs-md); line-height: 1.4; }
.ak-post-text { margin: 0; color: var(--text-secondary); font-size: var(--fs-sm); line-height: 1.6; white-space: pre-line; }
.ak-post-byline { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--text-muted); font-size: var(--fs-xs); }

/* ------------------------------------------------------------- comments */

.ak-comment-list { display: flex; flex-direction: column; border: 1px solid var(--ak-line); border-radius: var(--ak-radius); background: var(--ak-surface); overflow: hidden; }
.ak-comment { display: flex; flex-direction: column; gap: 8px; padding: 14px 18px; border-bottom: 1px solid var(--ak-line); }
.ak-comment:last-child { border-bottom: 0; }
.ak-comment.is-deleted { background: color-mix(in srgb, var(--ak-red) 4%, transparent); }
.ak-comment.is-deleted .ak-comment-text { color: var(--text-muted); text-decoration: line-through; }
.ak-comment-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ak-comment-text { margin: 0 0 0 42px; font-size: var(--fs-sm); line-height: 1.55; white-space: pre-line; word-break: break-word; }
.ak-comment-foot { display: flex; align-items: center; gap: 14px; margin-left: 42px; color: var(--text-muted); font-size: var(--fs-xs); }
.ak-comment-post { display: inline-flex; align-items: center; gap: 6px; min-width: 0; flex: 1; color: var(--text-secondary); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ak-comment-post:hover { color: var(--ak-accent); }
.ak-comment-stats { display: inline-flex; gap: 12px; }
.ak-comment-stats span { display: inline-flex; align-items: center; gap: 5px; }
.ak-comment-foot .ak-icon-btn { width: 30px; height: 30px; }

/* ---------------------------------------------------------------- inbox */

.ak-inbox {
  display: grid; grid-template-columns: minmax(260px, 360px) minmax(0, 1fr); min-height: 560px; height: calc(100dvh - 200px);
  border: 1px solid var(--ak-line); border-radius: var(--ak-radius); background: var(--ak-surface); overflow: hidden;
}
.ak-inbox-list { overflow-y: auto; border-right: 1px solid var(--ak-line); }
.ak-inbox-item { display: flex; flex-direction: column; gap: 3px; width: 100%; padding: 12px 16px; border: 0; border-bottom: 1px solid var(--ak-line); background: none; text-align: left; cursor: pointer; }
.ak-inbox-item:hover { background: var(--bg-hover); }
.ak-inbox-item.is-active { background: var(--ak-accent-soft); box-shadow: inset 3px 0 var(--ak-accent); }
.ak-inbox-top { display: flex; justify-content: space-between; gap: 8px; font-size: var(--fs-sm); }
.ak-inbox-top strong { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ak-inbox-item.is-unread .ak-inbox-top strong { font-weight: 700; }
.ak-inbox-item.is-unread .ak-inbox-top strong::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: var(--ak-accent); vertical-align: middle; }
.ak-inbox-top time { flex: none; color: var(--text-muted); font-size: var(--fs-xs); }
.ak-inbox-snippet { color: var(--text-secondary); font-size: var(--fs-xs); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ak-inbox-detail { display: flex; flex-direction: column; min-width: 0; overflow-y: auto; }
.ak-inbox-detail > div { flex: 1; display: flex; flex-direction: column; }
.ak-inbox-back { display: none; align-self: flex-start; margin: 10px 12px 0; }
.ak-thread { display: flex; flex-direction: column; gap: 14px; flex: 1; padding: 18px 22px; }
.ak-thread-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--ak-line); }
.ak-bubble { max-width: 82%; padding: 12px 15px; border-radius: 16px; font-size: var(--fs-sm); line-height: 1.55; }
.ak-bubble p { margin: 0; white-space: pre-line; word-break: break-word; }
.ak-bubble time { display: block; margin-top: 6px; color: var(--text-muted); font-size: var(--fs-xs); }
.ak-bubble.is-them { align-self: flex-start; background: var(--bg-hover); border-bottom-left-radius: 5px; }
.ak-bubble.is-us { align-self: flex-end; background: var(--ak-accent-strong); color: #fff; border-bottom-right-radius: 5px; }
.ak-bubble.is-us time { color: rgba(255, 255, 255, .75); }
.ak-attachment-img { display: block; max-width: 100%; max-height: 320px; margin-top: 10px; border-radius: 10px; }
.ak-reply { display: flex; flex-direction: column; gap: 10px; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--ak-line); }
.ak-reply textarea { width: 100%; box-sizing: border-box; padding: 11px 13px; border: 1px solid var(--ak-line); border-radius: 12px; background: var(--ak-subtle); color: var(--text-primary); font: inherit; font-size: var(--fs-sm); line-height: 1.5; resize: vertical; }
.ak-reply textarea:focus { outline: none; border-color: var(--ak-accent); box-shadow: 0 0 0 3px var(--ak-accent-soft); }
.ak-reply-actions { display: flex; align-items: center; gap: 8px; }
.ak-reply-actions .ak-hint { flex: 1; }

/* -------------------------------------------------- reports & moderation */

.ak-report-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 14px; align-items: start; }
.ak-report, .ak-appeal { display: flex; flex-direction: column; gap: 12px; padding: 16px; border: 1px solid var(--ak-line); border-radius: var(--ak-radius); background: var(--ak-surface); box-shadow: var(--shadow-sm); }
.ak-report-target { display: flex; gap: 12px; align-items: center; padding: 0; border: 0; background: none; text-align: left; cursor: pointer; }
.ak-report-target img, .ak-report-target .ak-thumb-fallback { width: 76px; height: 54px; flex: none; border-radius: 9px; object-fit: cover; background: var(--bg-hover); font-size: var(--fs-md); }
.ak-report-target strong { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: var(--fs-sm); line-height: 1.4; }
.ak-report-target small { color: var(--text-muted); font-size: var(--fs-xs); }
.ak-report-target:hover strong { color: var(--ak-accent); }
.ak-report-count { color: var(--ak-red); font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.ak-report-list { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.ak-report-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 10px 12px; border-radius: 11px; background: var(--ak-subtle); font-size: var(--fs-xs); }
.ak-report-list li time { margin-left: auto; color: var(--text-muted); }
.ak-report-list li p { flex-basis: 100%; margin: 0; color: var(--text-secondary); font-size: var(--fs-sm); }
.ak-report-who .ak-person-name { font-size: var(--fs-xs); }
.ak-report-who .ak-person-handle { display: none; }
.ak-report-quote { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-left: 3px solid var(--border-medium); border-radius: 4px 10px 10px 4px; background: var(--ak-subtle); }
.ak-report-quote p { margin: 0; font-size: var(--fs-sm); line-height: 1.5; white-space: pre-line; }
.ak-report-actions { container-type: inline-size; display: flex; justify-content: flex-end; gap: 6px; }
.ak-report-actions .ak-btn { min-height: 34px; padding: 6px 8px; gap: 5px; border-radius: 8px; font-size: var(--fs-xs); }
.ak-report-label-short { display: none; }
@container (max-width: 350px) {
  .ak-report-actions .ak-report-label { display: none; }
  .ak-report-actions .ak-report-label-short { display: inline; }
}

.ak-sanction-list { display: flex; flex-direction: column; border: 1px solid var(--ak-line); border-radius: var(--ak-radius); background: var(--ak-surface); overflow: hidden; }
.ak-sanction { display: grid; grid-template-columns: minmax(200px, 280px) minmax(0, 1fr) auto; align-items: center; gap: 18px; padding: 14px 18px; border-bottom: 1px solid var(--ak-line); }
.ak-sanction:last-child { border-bottom: 0; }
.ak-sanction-why p { margin: 0 0 2px; font-size: var(--fs-sm); }
.ak-sanction-why span { color: var(--text-muted); font-size: var(--fs-xs); }
.ak-appeal header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ak-appeal-list, .ak-appeal-details { display: flex; flex-direction: column; gap: 12px; }
.ak-appeal-details > div { padding: 12px; border-radius: 11px; background: var(--ak-subtle); }
.ak-appeal-details p { margin: 0 0 6px; font-size: var(--fs-sm); line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; }
.ak-appeal-details small { color: var(--text-secondary); font-size: var(--fs-xs); }

/* -------------------------------------------- messages, newsletter, etc. */

.ak-live-box { display: flex; gap: 12px; align-items: flex-start; padding: 13px 15px; margin-bottom: 16px; border-radius: 12px; background: var(--ak-accent-soft); }
.ak-live-box.is-news { background: color-mix(in srgb, var(--ak-red) 10%, transparent); }
.ak-live-box strong { font-size: var(--fs-sm); }
.ak-live-box p { margin: 4px 0 0; color: var(--text-secondary); font-size: var(--fs-sm); }
.ak-live-dot { width: 9px; height: 9px; margin-top: 5px; flex: none; border-radius: 50%; background: var(--ak-green); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ak-green) 25%, transparent); animation: ak-pulse 1.8s infinite; }
.ak-live-box.is-news .ak-live-dot { background: var(--ak-red); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ak-red) 25%, transparent); }
@keyframes ak-pulse { 50% { box-shadow: 0 0 0 7px transparent; } }
.ak-live-empty { display: flex; align-items: center; gap: 10px; padding: 13px 15px; margin-bottom: 16px; border: 1px dashed var(--ak-line); border-radius: 12px; color: var(--text-muted); font-size: var(--fs-sm); }
.ak-form { display: flex; flex-direction: column; gap: 12px; }
.ak-form-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.ak-history { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.ak-history-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--ak-line); }
.ak-history-row:last-child { border-bottom: 0; }
.ak-history-row > div { flex: 1; min-width: 0; }
.ak-history-row strong { display: block; font-size: var(--fs-sm); font-weight: 500; }
.ak-history-row p { margin: 2px 0; color: var(--text-secondary); font-size: var(--fs-xs); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ak-history-row small { color: var(--text-muted); font-size: var(--fs-xs); }

.ak-cta { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 22px; border-radius: var(--ak-radius); background: linear-gradient(120deg, #1e3a8a, #6d28d9); color: #fff; }
.ak-cta h3 { margin: 0 0 4px; font-size: var(--fs-md); }
.ak-cta p { margin: 0; opacity: .85; font-size: var(--fs-sm); }
.ak-cta .ak-btn.is-primary { background: #fff; border-color: #fff; color: #1e3a8a; }

.ak-settings-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 370px), 1fr));
  gap: 16px; align-items: start; max-width: 1120px;
}
.ak-card.is-settings .ak-card-head {
  align-items: center; justify-content: flex-start; gap: 10px; padding: 13px 16px;
  border-bottom: 1px solid var(--ak-line);
}
.ak-card.is-settings .ak-card-icon {
  order: -1; display: grid; place-items: center; flex: none;
  width: 30px; height: 30px; border-radius: 8px;
  color: var(--ak-accent-strong); background: var(--ak-accent-soft); font-size: var(--fs-sm);
}
html.dark .ak-card.is-settings .ak-card-icon { color: var(--ak-accent); }
.ak-card.is-settings .ak-card-body { padding: 0 16px 4px; }
.ak-setting {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 54px; box-sizing: border-box; padding: 8px 0; border-bottom: 1px solid var(--ak-line);
}
.ak-setting:last-child { border-bottom: 0; }
.ak-setting-copy { display: grid; gap: 3px; min-width: 0; overflow-wrap: anywhere; }
.ak-setting-copy label { font-size: var(--fs-sm); font-weight: 550; line-height: 1.3; cursor: pointer; }
.ak-setting-copy span { color: var(--text-secondary); font-size: var(--fs-xs); line-height: 1.35; }
.ak-setting.is-text { flex-direction: column; align-items: stretch; gap: 7px; }
.ak-text-input { width: 100%; background: var(--ak-subtle); }
.ak-num-input {
  display: grid; grid-template-columns: minmax(0, 1fr) 4.875rem; align-items: center;
  flex: none; width: 9.5rem; min-height: 36px; box-sizing: border-box;
  border: 1px solid var(--ak-line); border-radius: 8px; background: var(--ak-subtle);
}
.ak-num-input:not(:has(small)) { grid-template-columns: minmax(0, 1fr); }
.ak-num-input input {
  width: 100%; min-width: 0; padding: 6px 5px; border: 0; background: transparent;
  text-align: right; font-size: var(--fs-md); font-variant-numeric: tabular-nums; appearance: textfield;
}
.ak-num-input input::-webkit-inner-spin-button { appearance: none; }
.ak-num-input small { padding-inline: 5px; color: var(--text-secondary); font-size: var(--fs-xs); white-space: nowrap; }
.ak-num-input:focus-within { border-color: var(--ak-accent); box-shadow: 0 0 0 3px var(--ak-accent-soft); }
.ak-num-input input:focus { outline: none; box-shadow: none; }
.ak-setting.is-saving { opacity: .6; }
.ak-setting.is-saved .ak-setting-copy label::after { content: " ✓ Salvat"; color: var(--text-secondary); font-size: var(--fs-xs); font-weight: 600; }
.ak-meter { margin-top: 12px; padding: 10px 12px; border-radius: 9px; background: var(--ak-subtle); }
.ak-meter-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 7px; font-size: var(--fs-xs); }
.ak-meter-top b { color: var(--ak-accent-strong); font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
html.dark .ak-meter-top b { color: var(--ak-accent); }
.ak-meter .ak-share-track > span { background: var(--ak-accent); }
.ak-meter small { display: block; margin-top: 6px; color: var(--text-secondary); font-size: var(--fs-xs); }

.ak-lock { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100dvh; gap: 8px; }

/* Older Nova sections (proposals, televot, clips) sit in the same content column. */
.ak-app .admin-proposals-view { padding: 22px 28px 64px; max-width: 1320px; height: auto; overflow: visible; box-sizing: border-box; }
.ak-app.admin-new-page .admin-proposals-toolbar { position: static; margin: 0 0 18px; padding: 0; background: none; backdrop-filter: none; -webkit-backdrop-filter: none; }

/* Televot search and creation, followed by list filters. */
.ak-app.admin-new-page .admin-televot-toolbar {
  display: flex; flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 12px;
  width: min(1060px, 100%); margin: 0 auto 20px;
}
.admin-televot-toolbar > * { width: 100%; box-sizing: border-box; }
.admin-televot-tools {
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  align-items: center; gap: 10px; min-width: 0;
}
#admin-televot .admin-proposals-search { max-width: none; min-width: 0; }
#admin-televot .admin-proposals-search input {
  height: 40px; border-radius: 10px; font-size: var(--fs-sm); font-weight: 400;
}
#admin-televot :is(.admin-televot-filter, .admin-poll-inflation) {
  position: relative; display: block; width: max-content; max-width: 100%;
}
#admin-televot :is(.admin-televot-filter, .admin-poll-inflation) > i {
  position: absolute; inset-inline-start: 9px; top: 50%; margin: 0; transform: translateY(-50%);
  color: var(--text-muted); font-size: var(--fs-xs); pointer-events: none; z-index: 1;
}
#admin-televot :is(#televot-inflation-filter, select[data-poll-inflation]) {
  box-sizing: border-box; width: 10rem; max-width: 100%; height: 34px; padding: 0 6px 0 28px;
  border: 1px solid var(--ak-line); border-radius: 8px; background: var(--ak-surface);
  color: var(--text-primary); font-size: var(--fs-xs); font-weight: 600; cursor: pointer; text-overflow: ellipsis;
}
#admin-televot select[data-poll-inflation] { width: 8rem; height: 32px; }
#admin-televot :is(#televot-inflation-filter, select[data-poll-inflation]):focus-visible {
  border-color: var(--ak-accent); box-shadow: 0 0 0 3px var(--ak-accent-soft); outline: 0;
}
#admin-televot .admin-televot-tools .btn-create {
  height: 40px; margin: 0; padding: 0 14px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  background: var(--ak-accent-strong); color: #fff; font-size: var(--fs-sm); font-weight: 600;
  box-shadow: none; white-space: nowrap;
}
#admin-televot .admin-televot-tools .btn-create:hover { background: #1d4ed8; }
.admin-televot-toolbar-meta {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center;
  gap: 8px 12px; min-width: 0; padding-bottom: 14px; border-bottom: 1px solid var(--ak-line);
}
#admin-televot .admin-filter-chips {
  justify-self: start; flex-basis: auto; flex-wrap: nowrap; min-width: 0; max-width: 100%; gap: 3px;
  padding: 3px; overflow-x: auto; box-sizing: border-box; border-radius: 10px; background: var(--ak-subtle);
}
#admin-televot .admin-filter-chip {
  flex-shrink: 0; min-height: 32px; padding: 6px 11px; gap: 7px; border: 1px solid transparent;
  border-radius: 8px; background: transparent; color: var(--text-secondary); font-size: var(--fs-xs); font-weight: 500;
}
#admin-televot .admin-filter-chip:hover { background: var(--bg-hover); color: var(--text-primary); }
#admin-televot .admin-filter-chip.active {
  border-color: var(--ak-line); background: var(--ak-surface); color: var(--ak-accent); box-shadow: 0 1px 3px rgb(0 0 0 / 4%);
}
#admin-televot .admin-filter-chip b { font-size: var(--fs-xs); opacity: .75; font-weight: 600; }
#admin-televot .admin-proposals-count { justify-self: end; font-size: var(--fs-xs); font-weight: 400; color: var(--text-secondary); white-space: nowrap; }

#admin-televot select { color-scheme: light; }
html.dark #admin-televot select { color-scheme: dark; }
@supports (appearance: base-select) {
  #admin-televot select, #admin-televot select::picker(select) { appearance: base-select; }
  #admin-televot select { align-items: center; }
  #admin-televot select::picker-icon { color: var(--text-muted); font-size: 11px; }
  #admin-televot select:open::picker-icon { transform: rotate(180deg); }
  #admin-televot .admin-proposal-status {
    padding-inline-end: 9px; gap: 8px;
    background-image: radial-gradient(circle at center, var(--status-color) 58%, transparent 64%);
  }
  #admin-televot select::picker(select) {
    margin-block: 5px; padding: 4px; min-width: 10rem; max-width: min(21rem, calc(100vw - 24px));
    border: 1px solid var(--ak-line); border-radius: 10px; background: var(--ak-surface);
    color: var(--text-primary); box-shadow: var(--shadow-xl);
  }
  #admin-televot option {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    min-height: 34px; padding: 7px 9px; border-radius: 6px;
    white-space: normal; overflow-wrap: anywhere; font-size: var(--fs-sm); cursor: pointer;
  }
  #admin-televot option::checkmark { order: 1; color: var(--ak-accent-strong); }
  html.dark #admin-televot option::checkmark { color: var(--ak-accent); }
  #admin-televot option:hover, #admin-televot option:focus-visible { background: var(--bg-hover); }
  #admin-televot option:checked { background: var(--ak-accent-soft); font-weight: 600; }
}
#admin-televot { container-type: inline-size; }
@container (max-width: 610px) {
  .admin-televot-toolbar-meta { grid-template-columns: minmax(0, 1fr) auto; }
  #admin-televot .admin-filter-chips { grid-column: 1 / -1; }
}
@container (max-width: 360px) {
  #admin-televot .admin-televot-tools .btn-create { padding-inline: 10px; }
  #admin-televot .admin-televot-tools .btn-create span { font-size: var(--fs-xs); }
  #admin-televot .admin-poll-delete span { display: none; }
}
.ak-app.admin-new-page .admin-skel { background: linear-gradient(90deg, var(--bg-hover) 25%, color-mix(in srgb, var(--bg-hover) 50%, var(--ak-surface)) 45%, var(--bg-hover) 65%); background-size: 200% 100%; }

/* ------------------------------------------------------------ responsive */

@media (max-width: 1180px) {
  .ak-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ak-todo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .ak-layout { grid-template-columns: 1fr; }
  .ak-sidebar {
    position: fixed; inset: 0 auto 0 0; z-index: 120; width: min(280px, 84vw);
    transform: translateX(-100%); transition: transform .25s ease; box-shadow: var(--shadow-xl);
  }
  body.ak-nav-open .ak-sidebar { transform: none; }
  .ak-scrim { position: fixed; inset: 0; z-index: 110; display: block; background: var(--window-scrim); opacity: 0; pointer-events: none; transition: opacity .25s ease; }
  body.ak-nav-open .ak-scrim { opacity: 1; pointer-events: auto; }
  .ak-icon-btn.ak-menu-btn { display: inline-grid; }
  .ak-topbar { padding: 10px 16px; min-height: 60px; gap: 8px; }
  .ak-title p { display: none; }
  .ak-content, .ak-app .admin-proposals-view { padding: 16px 16px 48px; }
  .ak-grid-2 { grid-template-columns: 1fr; }
  .ak-report-grid { grid-template-columns: 1fr; }
  .ak-sanction { grid-template-columns: 1fr; gap: 10px; }
  .ak-sanction .ak-btn { justify-self: start; }
  .ak-inbox { grid-template-columns: 1fr; height: calc(100dvh - 170px); }
  .ak-inbox-detail { display: none; }
  .ak-inbox.has-selection .ak-inbox-list { display: none; }
  .ak-inbox.has-selection .ak-inbox-detail { display: flex; }
  .ak-inbox-back { display: inline-flex; }
}

@media (max-width: 600px) {
  .ak-tiles, .ak-tiles.is-3, .ak-todo-grid { grid-template-columns: 1fr 1fr; }
  .ak-tile-value { font-size: var(--fs-lg); }
  .ak-search { min-width: 0; flex-basis: 100%; max-width: none; }
  .ak-post { grid-template-columns: 50px minmax(0, 1fr); grid-template-rows: auto auto; gap: 4px 8px; height: 106px; padding: 8px; align-content: center; }
  .ak-post-media { grid-row: 1 / 3; height: 52px; }
  .ak-post-aside { justify-items: start; gap: 3px; }
  .ak-post-foot { width: 100%; gap: 6px; }
  .ak-mini-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ak-comment-text, .ak-comment-foot { margin-left: 0; }
  .ak-cta { flex-direction: column; align-items: flex-start; }
  .ak-table th:nth-child(n+3), .ak-table td:nth-child(n+3) { display: none; }
  .ak-table td:first-child { max-width: 230px; }
  .ak-toolbar select { flex: 1 1 140px; }
  .ak-todo { gap: 10px; padding: 10px; }
  .ak-todo-go { display: none; }
  .ak-todo-icon { width: 32px; height: 32px; }
}
