/* FixTand admin — neon dark */
html.adm {
  --brand: #ff3b5c;
  --brand-hover: #ff5f7a;
  --brand-tint: rgba(255, 59, 92, 0.22);
  --bg: #060a14;
  --bg-accent: #0b1222;
  --surface: #0e1527;
  --surface-2: #121b31;
  --text: #e7ecff;
  --text-muted: #8d9abb;
  --border: #1d2944;
  --shadow: 0 18px 40px -24px rgba(0, 0, 0, 0.9);
  --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.4);
  --n-cyan: #22e3ff;
  --n-violet: #a06bff;
  --n-pink: #ff3b9a;
  --n-lime: #3dffa8;
  --n-amber: #ffc53d;
  --n-red: #ff4d6a;
  color-scheme: dark;
  background: var(--bg);
}
html.adm body {
  background:
    radial-gradient(900px 520px at 100% -10%, rgba(160, 107, 255, 0.16), transparent 60%),
    radial-gradient(800px 480px at -10% 30%, rgba(34, 227, 255, 0.10), transparent 60%),
    radial-gradient(700px 500px at 60% 120%, rgba(255, 59, 92, 0.10), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
}
html.adm body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(120, 150, 255, 0.045) 1px, transparent 1px), linear-gradient(90deg, rgba(120, 150, 255, 0.045) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 30%, transparent 75%);
  z-index: 0;
}
html.adm-lock { overflow: hidden; }
html.adm [hidden] { display: none !important; }
html.adm ::selection { background: rgba(34, 227, 255, 0.35); }
html.adm ::-webkit-scrollbar { width: 9px; height: 9px; }
html.adm ::-webkit-scrollbar-thumb { background: #22304f; border-radius: 9px; }
html.adm ::-webkit-scrollbar-track { background: transparent; }

/* ---------- Shell ---------- */
.adm-shell { position: relative; z-index: 1; display: grid; grid-template-columns: 268px minmax(0, 1fr); min-height: 100vh; }
.adm-aside {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; overscroll-behavior: contain;
  display: flex; flex-direction: column; gap: 0.75rem; padding: 1.1rem 0.8rem 1rem;
  background: linear-gradient(180deg, rgba(10, 16, 32, 0.96), rgba(7, 11, 22, 0.96));
  border-inline-start: 1px solid rgba(34, 227, 255, 0.12);
  box-shadow: inset 1px 0 0 rgba(160, 107, 255, 0.12), 10px 0 40px -30px rgba(34, 227, 255, 0.5);
}
.adm-brand { display: flex; align-items: center; gap: 0.7rem; padding: 0.35rem 0.5rem 0.9rem; border-bottom: 1px solid var(--border); text-decoration: none; }
.adm-brand__logo {
  display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 14px; color: #fff; font-weight: 800; font-size: 1.25rem;
  background: linear-gradient(135deg, var(--n-pink), var(--n-violet) 55%, var(--n-cyan));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12) inset, 0 0 22px rgba(160, 107, 255, 0.55);
}
.adm-brand__text { display: grid; line-height: 1.2; }
.adm-brand__text b { color: #fff; font-size: 1.15rem; letter-spacing: 0.3px; direction: ltr; text-align: right; }
.adm-brand__text b span { color: var(--brand); text-shadow: 0 0 12px rgba(255, 59, 92, 0.7); }
.adm-brand__text small { color: var(--text-muted); font-size: 0.75rem; }

.adm-nav { display: grid; gap: 0.25rem; }
.adm-nav__group { border-radius: 14px; }
.adm-nav__group > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 0.6rem;
  padding: 0.6rem 0.7rem; border-radius: 12px; color: #c4cdea; font-weight: 700; font-size: 0.9rem; user-select: none;
  transition: background 0.2s, color 0.2s;
}
.adm-nav__group > summary::-webkit-details-marker { display: none; }
.adm-nav__group > summary:hover { background: rgba(120, 150, 255, 0.08); color: #fff; }
.adm-nav__group > summary svg { width: 1.2rem; height: 1.2rem; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.adm-nav__group > summary span { flex: 1; }
.adm-nav__group.is-current > summary { color: #fff; }
.adm-nav__group.is-current > summary svg { color: var(--n-cyan); filter: drop-shadow(0 0 6px rgba(34, 227, 255, 0.8)); }
.adm-nav__chev { width: 0.5rem; height: 0.5rem; border-inline-start: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); opacity: 0.55; transition: transform 0.2s; margin-inline-start: 0.2rem; }
.adm-nav__group[open] > summary .adm-nav__chev { transform: rotate(-135deg) translate(-2px, -2px); }
.adm-nav__items { display: grid; gap: 0.1rem; padding: 0.15rem 0.6rem 0.45rem 0; margin-inline-start: 1.25rem; border-inline-start: 1px dashed rgba(120, 150, 255, 0.18); }
.adm-nav__items a {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 0.4rem;
  padding: 0.45rem 0.75rem; border-radius: 10px; color: #9aa6c8; font-size: 0.86rem; font-weight: 500; text-decoration: none;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
.adm-nav__items a:hover { color: #fff; background: rgba(120, 150, 255, 0.08); }
.adm-nav__items a span { white-space: nowrap; }
.adm-nav__items a.is-active {
  color: #fff; font-weight: 700;
  background: linear-gradient(90deg, rgba(34, 227, 255, 0.04), rgba(160, 107, 255, 0.22));
  box-shadow: inset 0 0 0 1px rgba(160, 107, 255, 0.35), 0 0 18px -6px rgba(160, 107, 255, 0.7);
}
.adm-nav__items a.is-active::before {
  content: ""; position: absolute; inset-inline-start: -0.66rem; top: 22%; bottom: 22%; width: 3px; border-radius: 3px;
  background: var(--n-cyan); box-shadow: 0 0 10px var(--n-cyan);
}
.adm-nav__items a.is-hot span::after { content: "جدید"; display: inline-block; margin-inline-start: 0.4rem; padding: 0 0.35rem; border-radius: 6px; font-size: 0.65rem; font-weight: 800; color: #04131a; background: var(--n-lime); box-shadow: 0 0 10px rgba(61, 255, 168, 0.6); }
.adm-badge { display: inline-grid; place-items: center; min-width: 1.35rem; height: 1.35rem; padding: 0 0.35rem; border-radius: 999px; font-size: 0.7rem; font-weight: 800; color: #fff; background: var(--n-red); box-shadow: 0 0 12px rgba(255, 77, 106, 0.75); }

.adm-aside__foot { margin-top: auto; display: grid; gap: 0.4rem; padding-top: 0.75rem; border-top: 1px solid var(--border); }
.adm-aside__foot form { margin: 0; }
.adm-aside__site, .adm-aside__logout {
  display: flex; align-items: center; gap: 0.5rem; width: 100%; padding: 0.55rem 0.75rem; border-radius: 11px; font: inherit; font-size: 0.86rem;
  color: #c4cdea; background: rgba(120, 150, 255, 0.06); border: 1px solid var(--border); cursor: pointer; text-decoration: none;
}
.adm-aside__site svg, .adm-aside__logout svg { width: 1.05rem; height: 1.05rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.adm-aside__site:hover { color: var(--n-cyan); border-color: rgba(34, 227, 255, 0.4); }
.adm-aside__logout:hover { color: #fff; border-color: rgba(255, 77, 106, 0.6); background: rgba(255, 77, 106, 0.14); }

.adm-main { min-width: 0; display: flex; flex-direction: column; }
.adm-topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 0.75rem;
  padding: 0.7rem 1.5rem; background: rgba(6, 10, 20, 0.72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(120, 150, 255, 0.1);
}
.adm-topbar__title { flex: 1; min-width: 0; color: var(--text-muted); font-size: 0.85rem; }
.adm-topbar__actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.adm-chip {
  display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.4rem 0.85rem; border-radius: 999px; font-size: 0.8rem; font-weight: 700; text-decoration: none;
  color: #e7ecff; background: rgba(160, 107, 255, 0.12); border: 1px solid rgba(160, 107, 255, 0.4);
  transition: box-shadow 0.2s, transform 0.2s;
}
.adm-chip:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 0 18px -4px rgba(160, 107, 255, 0.8); }
.adm-chip--cyan { background: rgba(34, 227, 255, 0.1); border-color: rgba(34, 227, 255, 0.45); }
.adm-chip--cyan:hover { box-shadow: 0 0 18px -4px rgba(34, 227, 255, 0.9); }
.adm-burger { display: none; width: 2.5rem; height: 2.5rem; padding: 0.6rem; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; flex-direction: column; justify-content: space-between; }
.adm-burger span { display: block; height: 2px; border-radius: 2px; background: var(--n-cyan); box-shadow: 0 0 6px var(--n-cyan); }
.adm-scrim { position: fixed; inset: 0; z-index: 55; background: rgba(2, 4, 10, 0.6); backdrop-filter: blur(2px); }
.adm-content { padding: 1.4rem 1.5rem 3rem; min-width: 0; }

.adm-flash { margin-bottom: 1rem; padding: 0.8rem 1rem; border-radius: 14px; border: 1px solid rgba(34, 227, 255, 0.35); background: rgba(34, 227, 255, 0.08); color: #dff9ff; box-shadow: 0 0 22px -12px rgba(34, 227, 255, 0.9); }
.adm-flash--success { border-color: rgba(61, 255, 168, 0.4); background: rgba(61, 255, 168, 0.08); color: #dcffef; box-shadow: 0 0 22px -12px rgba(61, 255, 168, 0.9); }
.adm-flash--error, .adm-flash--danger { border-color: rgba(255, 77, 106, 0.5); background: rgba(255, 77, 106, 0.1); color: #ffe1e6; box-shadow: 0 0 22px -12px rgba(255, 77, 106, 0.9); }
.adm-flash--warning { border-color: rgba(255, 197, 61, 0.5); background: rgba(255, 197, 61, 0.1); color: #fff3d6; }

@media (max-width: 960px) {
  .adm-shell { grid-template-columns: 1fr; }
  .adm-aside { position: fixed; inset-block: 0; inset-inline-start: 0; z-index: 60; width: min(300px, 86vw); transform: translateX(105%); transition: transform 0.28s ease; }
  .adm-aside.is-open { transform: none; }
  .adm-burger { display: flex; }
  .adm-topbar { padding: 0.6rem 0.9rem; }
  .adm-content { padding: 1rem 0.85rem 2.5rem; }
  .adm-topbar__actions .adm-chip { padding: 0.35rem 0.65rem; font-size: 0.75rem; }
}

/* ---------- Shared admin components (dark) ---------- */
html.adm a:hover { color: var(--n-cyan); }
html.adm h1, html.adm h2, html.adm h3 { color: #f3f6ff; }
html.adm .card, html.adm .form-card, html.adm .course-card, html.adm .table-wrap {
  background: linear-gradient(180deg, rgba(20, 29, 52, 0.82), rgba(13, 20, 37, 0.82));
  border: 1px solid var(--border);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.02) inset, var(--shadow);
  color: var(--text);
}
html.adm .muted, html.adm .hint { color: var(--text-muted); }
html.adm input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="color"]):not([type="range"]),
html.adm select, html.adm textarea {
  background-color: #0a1120; color: var(--text); border: 1px solid #22304f; border-radius: 12px;
}
html.adm input::placeholder, html.adm textarea::placeholder { color: #5e6b8c; }
html.adm input:focus, html.adm select:focus, html.adm textarea:focus { outline: none; border-color: var(--n-cyan); box-shadow: 0 0 0 3px rgba(34, 227, 255, 0.16), 0 0 18px -6px rgba(34, 227, 255, 0.8); }
html.adm input[type="checkbox"], html.adm input[type="radio"] { accent-color: var(--n-violet); }
html.adm select option { background: #0e1527; color: var(--text); }
html.adm .btn--primary {
  color: #fff; border: 0;
  background: linear-gradient(135deg, var(--n-pink), var(--brand) 45%, #ff6a3d);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08) inset, 0 10px 26px -12px rgba(255, 59, 92, 0.9);
}
html.adm .btn--primary:hover { color: #fff; filter: brightness(1.08); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12) inset, 0 0 26px -6px rgba(255, 59, 92, 0.95); }
html.adm .btn--ghost, html.adm .btn--outline { color: #d6ddf5; background: rgba(120, 150, 255, 0.06); border: 1px solid #2a3a60; }
html.adm .btn--ghost:hover, html.adm .btn--outline:hover { color: #fff; border-color: var(--n-cyan); box-shadow: 0 0 16px -6px rgba(34, 227, 255, 0.8); }
html.adm .btn--danger, html.adm .btn.danger { color: #fff; background: rgba(255, 77, 106, 0.2); border: 1px solid rgba(255, 77, 106, 0.6); }
html.adm hr { border-color: var(--border); }
html.adm code, html.adm kbd { background: rgba(120, 150, 255, 0.12); color: #cfe0ff; border-radius: 6px; padding: 0 0.3rem; }
html.adm details > summary { color: var(--text); }

.admin-top { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.75rem 1rem; margin-bottom: 1.25rem; }
.admin-top h1 { margin: 0; font-size: 1.4rem; }
html.adm .admin-top h1 { background: linear-gradient(90deg, #fff, #c9d6ff 60%, var(--n-cyan)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

.table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; overflow: auto; box-shadow: var(--shadow); }
table.admin-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
table.admin-table th, table.admin-table td { padding: 0.7rem 0.85rem; text-align: right; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.admin-table thead th { position: sticky; top: 0; z-index: 1; font-weight: 700; background: #fafafa; }
table.admin-table tbody tr { transition: background 0.15s; }
table.admin-table tbody tr:hover { background: #fafafa; }
html.adm table.admin-table thead th { font-size: 0.8rem; color: #aab6d8; background: #0d1528; letter-spacing: 0.2px; }
html.adm table.admin-table tbody tr:hover { background: rgba(34, 227, 255, 0.05); }
table.admin-table tbody tr:last-child td { border-bottom: 0; }

.form-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 1.25rem; box-shadow: var(--shadow); max-width: 860px; }
.form-grid { display: grid; gap: 1rem; }
.form-grid.row-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 800px) { .form-grid.row-3 { grid-template-columns: 1fr; } }

.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 0.65rem; }
.gallery-tile { aspect-ratio: 1; border: 1px dashed var(--border); border-radius: 12px; background: var(--bg-accent); display: grid; place-items: center; font-size: 0.75rem; color: var(--text-muted); overflow: hidden; position: relative; }
.gallery-tile img { width: 100%; height: 100%; object-fit: cover; }
.gallery-tile--add { cursor: pointer; border-style: solid; }

.status-badge { display: inline-block; padding: 0.15rem 0.55rem; border-radius: 999px; font-size: 0.75rem; font-weight: 600; background: #e5e7eb; color: #374151; }
.status-badge--pending { background: #fef3c7; color: #92400e; }
.status-badge--paid { background: #dbeafe; color: #1e40af; }
.status-badge--processing { background: #e0e7ff; color: #3730a3; }
.status-badge--shipped { background: #cffafe; color: #155e75; }
.status-badge--completed { background: #dcfce7; color: #166534; }
.status-badge--cancelled { background: #fee2e2; color: #991b1b; }
html.adm .status-badge { padding: 0.18rem 0.6rem; font-weight: 700; background: rgba(148, 163, 184, 0.16); color: #cbd5e1; border: 1px solid rgba(148, 163, 184, 0.3); }
html.adm .status-badge--pending { background: rgba(255, 197, 61, 0.12); color: #ffd978; border-color: rgba(255, 197, 61, 0.4); }
html.adm .status-badge--paid { background: rgba(34, 227, 255, 0.12); color: #8cf0ff; border-color: rgba(34, 227, 255, 0.4); }
html.adm .status-badge--processing { background: rgba(160, 107, 255, 0.14); color: #cdb4ff; border-color: rgba(160, 107, 255, 0.45); }
html.adm .status-badge--shipped { background: rgba(56, 189, 248, 0.14); color: #93dcff; border-color: rgba(56, 189, 248, 0.4); }
html.adm .status-badge--completed { background: rgba(61, 255, 168, 0.12); color: #8dffcc; border-color: rgba(61, 255, 168, 0.4); }
html.adm .status-badge--cancelled { background: rgba(255, 77, 106, 0.12); color: #ff9aac; border-color: rgba(255, 77, 106, 0.4); }

.path-badge { display: inline-block; background: #e5e7eb; color: #4b5563; font-size: 0.75rem; font-weight: 600; padding: 0.15rem 0.5rem; border-radius: 999px; }
html.adm .path-badge { background: rgba(160, 107, 255, 0.14); color: #cdb4ff; }
.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.course-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.15rem; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 0.65rem; }
.course-card h3 { margin: 0; font-size: 1.05rem; }
.course-detail { display: grid; gap: 1.5rem; }
@media (min-width: 900px) { .course-detail { grid-template-columns: 1.6fr 0.9fr; align-items: start; } }
.course-hero { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.75rem 1.5rem; margin-bottom: 0.5rem; }
.course-sidebar { position: sticky; top: 5rem; }
.instructor-card { display: flex; gap: 1rem; align-items: flex-start; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem 1.2rem; box-shadow: var(--shadow); }
.instructor-card + .instructor-card { margin-top: 0.85rem; }
.avatar { width: 64px; height: 64px; border-radius: 50%; background: var(--bg); border: 1px solid var(--border); object-fit: cover; flex-shrink: 0; display: grid; place-items: center; color: var(--text-muted); font-weight: 700; }
.meta-row { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; color: var(--text-muted); font-size: 0.9rem; margin: 0.75rem 0 0; }

/* Searchable picker (admin images → target product) */
.admin-search { position: relative; }
.admin-search__input { width: 100%; }
.admin-search__list { position: absolute; inset-inline: 0; top: calc(100% + 4px); z-index: 40; margin: 0; padding: 0.3rem; list-style: none; max-height: 18rem; overflow-y: auto; background: var(--surface, #fff); border: 1px solid var(--border, #e5e7eb); border-radius: 12px; box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5); }
.admin-search__item { display: flex; align-items: center; gap: 0.6rem; padding: 0.45rem 0.55rem; border-radius: 9px; cursor: pointer; }
.admin-search__item.is-active { background: rgba(34, 227, 255, 0.1); }
.admin-search__item.is-off { opacity: 0.6; }
.admin-search__item img, .admin-search__ph { width: 38px; height: 38px; flex-shrink: 0; border-radius: 8px; object-fit: cover; background: #18223a; }
.admin-search__body { display: grid; min-width: 0; }
.admin-search__body strong { font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-search__body small { color: var(--text-muted, #6b7280); font-size: 0.75rem; }
.admin-search__empty { padding: 0.6rem; color: var(--text-muted, #6b7280); font-size: 0.85rem; }
.admin-search__picked { margin: 0.4rem 0 0; font-size: 0.85rem; color: var(--n-lime); }

/* ---------- Staff permissions ---------- */
.perm-box { display: grid; gap: 1.1rem; margin-top: 0.75rem; }
.perm-group {
  background: rgba(120, 150, 255, 0.04); border: 1px solid var(--border); border-radius: 14px; padding: 0.9rem 1rem;
}
.perm-group h3 { margin: 0 0 0.6rem; font-size: 0.92rem; color: #c4cdea; }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 0.5rem 0.9rem; }
.perm-chip {
  display: flex; align-items: center; gap: 0.5rem; padding: 0.45rem 0.6rem; border-radius: 10px;
  background: rgba(120, 150, 255, 0.05); border: 1px solid transparent; font-size: 0.86rem; cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.perm-chip:has(input:checked) {
  border-color: rgba(34, 227, 255, 0.45); background: rgba(34, 227, 255, 0.08); color: #fff;
}

/* Page-level light leftovers inside individual admin templates */
html.adm .ai-summary { background: rgba(160, 107, 255, 0.1) !important; border-color: rgba(160, 107, 255, 0.35) !important; color: var(--text); }
html.adm .sl-pre { background: #0a1120 !important; color: var(--text); }
html.adm .sl-cats a small { background: rgba(120, 150, 255, 0.14) !important; color: #c4cdea !important; }
html.adm .amz-mode:has(input:checked) { background: rgba(61, 255, 168, 0.08) !important; }
html.adm .ai-up { color: var(--n-lime) !important; }
html.adm .admin-review__stars span { color: #3a4666 !important; }

/* ---------- Login ---------- */
.login-wrap { position: relative; z-index: 1; min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; }
.login-card { width: min(410px, 100%); }
html.adm .login-card { padding: 1.75rem 1.5rem; border-radius: 22px; border: 1px solid rgba(160, 107, 255, 0.35); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.03) inset, 0 0 60px -20px rgba(160, 107, 255, 0.8), 0 30px 60px -30px rgba(0, 0, 0, 0.9); }
html.adm .login-card h1 { display: flex; align-items: center; gap: 0.6rem; }
html.adm .login-card .btn--block { width: 100%; margin-top: 0.5rem; }

/* ---------- Dashboard ---------- */
.dz-hero { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.2rem; }
.dz-hero h1 { margin: 0; font-size: clamp(1.3rem, 2.6vw, 1.75rem); background: linear-gradient(90deg, #fff, #d9c8ff 50%, var(--n-cyan)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.dz-hero p { margin: 0.25rem 0 0; color: var(--text-muted); font-size: 0.88rem; }
.dz-grid { display: grid; gap: 1rem; }
.dz-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.dz-kpi {
  --c: var(--n-cyan);
  position: relative; overflow: hidden; padding: 1.05rem 1.1rem 1rem; border-radius: 18px; text-decoration: none; color: var(--text);
  background: linear-gradient(160deg, color-mix(in srgb, var(--c) 16%, #0e1527), #0c1324 70%);
  border: 1px solid color-mix(in srgb, var(--c) 38%, transparent);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.02) inset, 0 18px 40px -26px color-mix(in srgb, var(--c) 90%, transparent);
  transition: transform 0.2s, box-shadow 0.2s;
}
.dz-kpi:hover { transform: translateY(-2px); color: var(--text); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04) inset, 0 0 34px -10px color-mix(in srgb, var(--c) 90%, transparent); }
.dz-kpi::after { content: ""; position: absolute; width: 140px; height: 140px; inset-inline-end: -50px; top: -60px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--c) 45%, transparent), transparent 70%); opacity: 0.55; }
.dz-kpi__label { display: flex; align-items: center; gap: 0.45rem; font-size: 0.8rem; color: #b5c0e0; }
.dz-kpi__label i { width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--c); box-shadow: 0 0 10px var(--c); }
.dz-kpi__value { margin: 0.45rem 0 0.15rem; font-size: clamp(1.2rem, 2.2vw, 1.6rem); font-weight: 800; color: #fff; text-shadow: 0 0 18px color-mix(in srgb, var(--c) 60%, transparent); white-space: nowrap; }
.dz-kpi__value small { font-size: 0.72rem; font-weight: 600; color: var(--text-muted); text-shadow: none; }
.dz-kpi__sub { font-size: 0.76rem; color: var(--text-muted); }
.dz-kpi--violet { --c: var(--n-violet); }
.dz-kpi--pink { --c: var(--n-pink); }
.dz-kpi--lime { --c: var(--n-lime); }
.dz-kpi--amber { --c: var(--n-amber); }
.dz-kpi--red { --c: var(--n-red); }

.dz-row { display: grid; gap: 1rem; margin-bottom: 1rem; }
.dz-row--2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.dz-row--1-1 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dz-row--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dz-panel {
  position: relative; min-width: 0; padding: 1.1rem 1.15rem; border-radius: 18px;
  background: linear-gradient(180deg, rgba(20, 29, 52, 0.85), rgba(12, 18, 34, 0.85));
  border: 1px solid var(--border);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.02) inset, var(--shadow);
}
.dz-panel__head { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; margin-bottom: 0.85rem; }
.dz-panel__head h2 { margin: 0; font-size: 0.98rem; display: flex; align-items: center; gap: 0.5rem; }
.dz-panel__head h2::before { content: ""; width: 4px; height: 1.05rem; border-radius: 4px; background: linear-gradient(var(--n-cyan), var(--n-violet)); box-shadow: 0 0 10px rgba(34, 227, 255, 0.8); }
.dz-panel__head a, .dz-panel__head span { font-size: 0.78rem; color: var(--text-muted); text-decoration: none; }
.dz-panel__head a:hover { color: var(--n-cyan); }

.dz-chart { position: relative; }
.dz-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.dz-chart .dz-grid-line { stroke: rgba(120, 150, 255, 0.12); stroke-dasharray: 3 5; }
.dz-chart .dz-line { fill: none; stroke: url(#dzLine); stroke-width: 2.6; stroke-linejoin: round; stroke-linecap: round; filter: drop-shadow(0 0 6px rgba(34, 227, 255, 0.7)); }
.dz-chart .dz-area { fill: url(#dzArea); }
.dz-chart .dz-dot { fill: #0b1222; stroke: var(--n-cyan); stroke-width: 2; }
.dz-chart .dz-dot:hover { fill: var(--n-cyan); }
.dz-chart text { fill: #7f8bad; font-size: 10px; font-family: inherit; }
.dz-chart__meta { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 0.4rem; font-size: 0.78rem; color: var(--text-muted); }
.dz-chart__meta b { color: #fff; }

.dz-status { display: grid; gap: 0.55rem; }
.dz-status__row { display: grid; grid-template-columns: 7.2rem minmax(0, 1fr) 2.2rem; align-items: center; gap: 0.6rem; font-size: 0.82rem; }
.dz-status__row span:first-child { color: #c4cdea; }
.dz-status__row b { text-align: left; color: #fff; }
.dz-bar { height: 0.55rem; border-radius: 999px; background: rgba(120, 150, 255, 0.1); overflow: hidden; }
.dz-bar i { display: block; height: 100%; min-width: 3px; border-radius: inherit; background: var(--c, var(--n-cyan)); box-shadow: 0 0 10px var(--c, var(--n-cyan)); }

.dz-svc { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.7rem; }
.dz-svc a {
  display: grid; gap: 0.2rem; padding: 0.8rem 0.85rem; border-radius: 14px; text-decoration: none; color: var(--text);
  background: rgba(120, 150, 255, 0.05); border: 1px solid var(--border); transition: border-color 0.2s, box-shadow 0.2s;
}
.dz-svc a:hover { border-color: rgba(34, 227, 255, 0.5); box-shadow: 0 0 20px -8px rgba(34, 227, 255, 0.8); color: var(--text); }
.dz-svc small { color: var(--text-muted); font-size: 0.76rem; }
.dz-svc strong { font-size: 1.35rem; color: #fff; }
.dz-svc em { font-style: normal; font-size: 0.72rem; color: var(--n-amber); }

.dz-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.dz-list li { display: grid; gap: 0.3rem; }
.dz-list__top { display: flex; justify-content: space-between; gap: 0.5rem; font-size: 0.84rem; }
.dz-list__top span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dz-list__top b { flex: 0 0 auto; color: #fff; }
.dz-empty { margin: 0; color: var(--text-muted); font-size: 0.85rem; }

.dz-mini { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; }
.dz-mini div { padding: 0.7rem 0.8rem; border-radius: 13px; background: rgba(120, 150, 255, 0.05); border: 1px solid var(--border); }
.dz-mini small { display: block; color: var(--text-muted); font-size: 0.74rem; }
.dz-mini b { font-size: 1.15rem; color: #fff; }
.dz-mini .is-warn b { color: var(--n-amber); text-shadow: 0 0 12px rgba(255, 197, 61, 0.6); }
.dz-mini .is-bad b { color: var(--n-red); text-shadow: 0 0 12px rgba(255, 77, 106, 0.6); }

.dz-acc { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.6rem; }
.dz-acc div { padding: 0.75rem 0.8rem; border-radius: 13px; border: 1px solid var(--border); background: rgba(120, 150, 255, 0.04); }
.dz-acc small { display: block; font-size: 0.74rem; color: var(--text-muted); }
.dz-acc b { font-size: 1.02rem; }
.dz-acc .is-in b { color: var(--n-lime); }
.dz-acc .is-out b { color: var(--n-red); }
.dz-acc .is-net b { color: var(--n-cyan); }

.dz-table { width: 100%; border-collapse: collapse; font-size: 0.83rem; }
.dz-table th, .dz-table td { padding: 0.5rem 0.4rem; border-bottom: 1px solid var(--border); text-align: right; }
.dz-table th { color: var(--text-muted); font-weight: 600; font-size: 0.76rem; }
.dz-table tr:last-child td { border-bottom: 0; }
.dz-table a { color: #cfe0ff; text-decoration: none; }

@media (max-width: 1200px) {
  .dz-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dz-row--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .dz-row--2-1, .dz-row--1-1, .dz-row--3 { grid-template-columns: 1fr; }
  .dz-svc { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  .dz-kpis { grid-template-columns: 1fr 1fr; gap: 0.6rem; }
  .dz-kpi { padding: 0.85rem 0.8rem; }
  .dz-acc { grid-template-columns: 1fr; }
}

/* ---------- Accounting ---------- */
.ac-periods { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; margin-bottom: 1rem; }
.ac-periods a { padding: 0.42rem 0.85rem; border-radius: 999px; font-size: 0.8rem; font-weight: 700; color: #c4cdea; text-decoration: none; border: 1px solid var(--border); background: rgba(120, 150, 255, 0.05); }
.ac-periods a.is-on { color: #fff; border-color: rgba(160, 107, 255, 0.6); background: rgba(160, 107, 255, 0.2); box-shadow: 0 0 16px -6px rgba(160, 107, 255, 0.9); }
.ac-range { display: inline-flex; gap: 0.35rem; align-items: center; flex-wrap: wrap; margin-inline-start: auto; }
.ac-range input { width: 7.6rem; padding: 0.38rem 0.6rem; font: inherit; font-size: 0.82rem; text-align: center; direction: ltr; }
.ac-range button { padding: 0.4rem 0.8rem; font-size: 0.8rem; }
.ac-bars { display: flex; align-items: flex-end; gap: 3px; height: 190px; padding: 0.4rem 0 0; border-bottom: 1px solid var(--border); position: relative; }
.ac-bars__col { flex: 1; min-width: 0; height: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 2px; position: relative; }
.ac-bars__col i { display: block; width: min(42%, 14px); border-radius: 5px 5px 0 0; min-height: 0; transition: filter 0.2s; }
.ac-bars__col i.inc { background: linear-gradient(var(--n-lime), rgba(61, 255, 168, 0.25)); box-shadow: 0 0 10px rgba(61, 255, 168, 0.45); }
.ac-bars__col i.exp { background: linear-gradient(var(--n-red), rgba(255, 77, 106, 0.25)); box-shadow: 0 0 10px rgba(255, 77, 106, 0.45); }
.ac-bars__col:hover i { filter: brightness(1.35); }
.ac-bars__tip { position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%); z-index: 3; display: none; white-space: nowrap; padding: 0.4rem 0.55rem; border-radius: 10px; font-size: 0.72rem; background: #050912; border: 1px solid rgba(34, 227, 255, 0.4); box-shadow: 0 0 18px -6px rgba(34, 227, 255, 0.8); }
.ac-bars__col:hover .ac-bars__tip { display: block; }
.ac-bars__axis { display: flex; gap: 3px; margin-top: 0.3rem; }
.ac-bars__axis span { flex: 1; min-width: 0; text-align: center; font-size: 0.66rem; color: #7f8bad; overflow: hidden; }
.ac-legend { display: flex; gap: 1rem; flex-wrap: wrap; font-size: 0.78rem; color: var(--text-muted); margin-top: 0.5rem; }
.ac-legend i { display: inline-block; width: 0.7rem; height: 0.7rem; border-radius: 3px; margin-inline-end: 0.3rem; vertical-align: -1px; }
.ac-filter { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-bottom: 0.8rem; }
.ac-filter input, .ac-filter select { padding: 0.45rem 0.65rem; font: inherit; font-size: 0.84rem; }
.ac-filter input[type="search"] { flex: 1 1 12rem; }
.ac-amount { font-weight: 800; white-space: nowrap; }
.ac-amount--in { color: var(--n-lime); }
.ac-amount--out { color: var(--n-red); }
.ac-tag { display: inline-block; padding: 0.1rem 0.5rem; border-radius: 999px; font-size: 0.72rem; font-weight: 700; border: 1px solid; white-space: nowrap; }
.ac-tag--in { color: #8dffcc; border-color: rgba(61, 255, 168, 0.4); background: rgba(61, 255, 168, 0.08); }
.ac-tag--out { color: #ff9aac; border-color: rgba(255, 77, 106, 0.4); background: rgba(255, 77, 106, 0.08); }
.ac-tag--open { color: #ffd978; border-color: rgba(255, 197, 61, 0.45); background: rgba(255, 197, 61, 0.08); }
.ac-actions { display: flex; gap: 0.3rem; flex-wrap: wrap; }
.ac-actions form { margin: 0; }
.ac-actions a, .ac-actions button { padding: 0.25rem 0.55rem; border-radius: 8px; font: inherit; font-size: 0.76rem; color: #c4cdea; background: rgba(120, 150, 255, 0.07); border: 1px solid var(--border); cursor: pointer; text-decoration: none; }
.ac-actions a:hover, .ac-actions button:hover { color: #fff; border-color: var(--n-cyan); }
.ac-actions .is-del:hover { border-color: var(--n-red); color: #ffb3c0; }

.ac-kind { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; margin-bottom: 1rem; }
.ac-kind label { display: flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.85rem; border-radius: 14px; cursor: pointer; font-weight: 800; border: 1px solid var(--border); background: rgba(120, 150, 255, 0.05); color: #c4cdea; transition: all 0.2s; }
.ac-kind input { position: absolute; opacity: 0; pointer-events: none; }
.ac-kind label:has(input[value="income"]:checked) { color: #04170f; background: linear-gradient(135deg, #7dffc8, var(--n-lime)); border-color: transparent; box-shadow: 0 0 24px -6px rgba(61, 255, 168, 0.9); }
.ac-kind label:has(input[value="expense"]:checked) { color: #fff; background: linear-gradient(135deg, var(--n-red), #ff7a45); border-color: transparent; box-shadow: 0 0 24px -6px rgba(255, 77, 106, 0.9); }
.ac-form { max-width: 820px; }
.ac-form .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ac-form .form-row--wide { grid-column: 1 / -1; }
.ac-form .ac-money { font-size: 1.15rem; font-weight: 800; letter-spacing: 0.5px; direction: ltr; text-align: left; }
.ac-form .ac-words { font-size: 0.78rem; color: var(--n-cyan); min-height: 1.1rem; }
@media (max-width: 700px) { .ac-form .form-grid { grid-template-columns: 1fr; } .ac-range { margin-inline-start: 0; } }
