/* ============================================================
   HolyJournal — современная тёмная тема (палитра сохранена)
   Переменные на :root; светлая тема [data-theme="light"];
   акцент [data-accent="..."]. Переключение — theme.js.
   ============================================================ */
:root {
    --bg: #0d0d0d;
    --bg-2: #141414;
    --surface: #1a1a1a;
    --surface-2: #202020;
    --border: #2a2a2a;
    --border-soft: #232323;
    --text: #ffffff;
    --muted: #9a9a9a;
    --green: #3fb950;
    --red: #f85149;
    --orange: #d29922;
    --accent: #3fb950;
    --accent-2: #2ea043;
    --accent-soft: rgba(63, 185, 80, 0.14);
    --accent-glow: rgba(63, 185, 80, 0.35);
    --radius: 16px;
    --radius-sm: 11px;
    --sidebar-w: 264px;
    --shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.5);
}
[data-accent="blue"]   { --accent:#4aa3ff; --accent-2:#2d8fff; --accent-soft:rgba(74,163,255,.14); --accent-glow:rgba(74,163,255,.35); }
[data-accent="purple"] { --accent:#8b7bff; --accent-2:#7059ff; --accent-soft:rgba(139,123,255,.14); --accent-glow:rgba(139,123,255,.35); }
[data-accent="orange"] { --accent:#d29922; --accent-2:#bd8410; --accent-soft:rgba(210,153,34,.14); --accent-glow:rgba(210,153,34,.35); }
[data-accent="green"]  { --accent:#3fb950; --accent-2:#2ea043; --accent-soft:rgba(63,185,80,.14); --accent-glow:rgba(63,185,80,.35); }

[data-theme="light"] {
    --bg:#eef0f4; --bg-2:#ffffff; --surface:#ffffff; --surface-2:#f3f4f7;
    --border:#e0e3e9; --border-soft:#eaecf0; --text:#14161a; --muted:#5c6370;
    --shadow:0 8px 30px rgba(20,30,60,.08); --shadow-lg:0 20px 60px rgba(20,30,60,.14);
}

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

body {
    font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
    background:
        radial-gradient(900px 500px at 100% -5%, var(--accent-soft), transparent 60%),
        var(--bg);
    background-attachment: fixed;
    color: var(--text);
    min-height: 100vh;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    font-feature-settings: "cv02", "cv03", "cv04", "tnum";
    transition: background .25s, color .25s;
}
a { color: var(--accent); text-decoration: none; }
a:hover { opacity: .85; }
h1, h2, h3 { font-family: "Manrope", "Inter", sans-serif; }
h1 { font-size: 26px; letter-spacing: -0.6px; font-weight: 800; }
h2 { font-size: 18px; letter-spacing: -0.4px; font-weight: 700; }
small { font-size: 12px; }
.muted { color: var(--muted); }
.green { color: var(--green); } .red { color: var(--red); } .orange { color: var(--orange); }
.hint { font-weight: 400; }
/* Табличные цифры + Manrope для числовых данных (топы, выработка, статы) */
.tile .value, .rank, table td, .cal-cell, .circle-center, .badge-count, .notif-dot {
    font-variant-numeric: tabular-nums;
}
.tile .value, .rank { font-family: "Manrope", "Inter", sans-serif; }
/* Ники и должности — чуть плотнее и заметнее */
.member-name, .review-user b, .sidebar-profile .who b, td b { letter-spacing: -0.2px; }

/* ---------- Layout ---------- */
.layout { display: flex; min-height: 100vh; }
.sidebar {
    width: var(--sidebar-w);
    background: color-mix(in srgb, var(--bg-2) 82%, transparent);
    backdrop-filter: blur(14px);
    border-right: 1px solid var(--border);
    display: flex; flex-direction: column;
    position: fixed; inset: 0 auto 0 0;
    padding: 20px 14px; overflow-y: auto; z-index: 40;
}
.sidebar-logo { display: flex; align-items: center; gap: 12px; padding: 4px 8px 20px; }
.logo-mark {
    display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff; font-weight: 800; font-size: 16px;
    box-shadow: 0 6px 18px var(--accent-glow);
}
.logo-text { font-weight: 800; font-size: 15px; }
.logo-text .beta { color: var(--muted); font-weight: 600; font-size: 11px; }

.nav-group { margin-bottom: 16px; }
.nav-group-title { color: var(--muted); font-size: 10.5px; text-transform: uppercase; letter-spacing: 1px; padding: 6px 12px; font-weight: 700; }
.nav-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px; border-radius: 11px; color: var(--text);
    font-size: 14px; font-weight: 600; margin-bottom: 3px;
    position: relative; transition: background .15s, color .15s;
}
.nav-item:hover { background: var(--surface); opacity: 1; }
.nav-item.active { background: var(--accent-soft); color: var(--accent); }
.nav-item.active::before {
    content: ""; position: absolute; left: -14px; top: 50%; transform: translateY(-50%);
    width: 4px; height: 22px; border-radius: 0 4px 4px 0; background: var(--accent);
}
.nav-item .ico { width: 20px; text-align: center; font-size: 15px; }
.nav-item .badge-count { margin-left: auto; background: var(--surface-2); color: var(--muted); font-size: 11px; padding: 1px 8px; border-radius: 999px; font-weight: 700; }
.nav-item.active .badge-count { background: var(--accent); color: #fff; }

.sidebar-cta {
    margin: 8px 0 16px; width: 100%;
    background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; border: none;
    padding: 12px; border-radius: 11px; font-weight: 700; cursor: pointer; font-family: inherit;
    box-shadow: 0 6px 18px var(--accent-glow); transition: filter .15s, transform .08s;
}
.sidebar-cta:hover { filter: brightness(1.08); }
.sidebar-cta:active { transform: translateY(1px); }
.sidebar-profile {
    margin-top: auto; display: flex; align-items: center; gap: 11px;
    padding: 11px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border);
    transition: border-color .15s;
}
.sidebar-profile:hover { border-color: var(--accent); }
.sidebar-profile .who { overflow: hidden; }
.sidebar-profile .who b { display: block; font-size: 13px; }
.sidebar-profile .who small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }

/* ---------- Main ---------- */
.main-area { flex: 1; margin-left: var(--sidebar-w); display: flex; flex-direction: column; min-width: 0; }
.topbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 15px 28px; border-bottom: 1px solid var(--border);
    background: color-mix(in srgb, var(--bg) 75%, transparent);
    backdrop-filter: blur(12px); position: sticky; top: 0; z-index: 30;
}
.topbar-title { font-size: 14px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
    width: 40px; height: 40px; border-radius: 11px; border: 1px solid var(--border);
    background: var(--surface); color: var(--text); font-size: 16px; cursor: pointer;
    display: grid; place-items: center; transition: background .15s, border-color .15s;
}
.icon-btn:hover { background: var(--surface-2); border-color: var(--accent); }
.content { padding: 28px; max-width: 1240px; width: 100%; }

/* ---------- Cards ---------- */
.card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow);
    transition: border-color .15s, transform .15s;
}
.card h2 { margin-bottom: 16px; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.page-head { margin-bottom: 24px; }
.page-head h1 { margin-bottom: 5px; }

.info-plate { background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); color: var(--text); padding: 11px 15px; border-radius: 11px; font-size: 13px; margin-bottom: 14px; }
.warn-plate { background: rgba(248,81,73,.1); border: 1px solid rgba(248,81,73,.32); color: #ff9d97; padding: 11px 15px; border-radius: 11px; font-size: 13px; margin: 12px 0; }

/* ---------- Stat tiles ---------- */
.tile {
    background: linear-gradient(160deg, var(--surface), color-mix(in srgb, var(--surface) 92%, var(--accent)));
    border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow);
}
.tile .label { color: var(--muted); font-size: 13px; margin-bottom: 6px; }
.tile .value { font-size: 26px; font-weight: 800; letter-spacing: -0.5px; }
.tile .sub { color: var(--muted); font-size: 12px; margin-top: 4px; }

/* ---------- Avatar / badges ---------- */
.avatar { display: grid; place-items: center; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; font-weight: 700; width: 40px; height: 40px; flex-shrink: 0; box-shadow: 0 4px 12px var(--accent-glow); }
.avatar.lg { width: 68px; height: 68px; font-size: 27px; }
.badge { display: inline-block; padding: 3px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.badge-role { background: var(--accent-soft); color: var(--accent); }
.badge-soft { background: var(--surface-2); color: var(--muted); }
.badge-green { background: rgba(63,185,80,.15); color: var(--green); }
.badge-red { background: rgba(248,81,73,.15); color: var(--red); }
.badge-orange { background: rgba(210,153,34,.15); color: var(--orange); }
.badge-admin { background: linear-gradient(90deg, #8b7bff, #4aa3ff); color: #fff; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 12px 15px; border-bottom: 1px solid var(--border-soft); white-space: nowrap; }
th { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .5px; background: var(--bg-2); position: sticky; top: 0; }
tbody tr { transition: background .12s; }
tbody tr:hover { background: var(--surface-2); }
tr:last-child td { border-bottom: none; }
.click-row { cursor: pointer; }
.rank { font-weight: 800; color: var(--muted); }
.row-payout { background: rgba(63,185,80,.06); }
.row-payout td:first-child { box-shadow: inset 3px 0 0 var(--green); }

/* ---------- Progress circles ---------- */
.circles { display: flex; gap: 22px; flex-wrap: wrap; justify-content: space-around; }
.circle-widget { text-align: center; }
.circle-widget svg { transform: rotate(-90deg); }
.circle-widget .track { stroke: var(--border); }
.circle-widget .fill { stroke: var(--accent); stroke-linecap: round; transition: stroke-dashoffset .5s ease; filter: drop-shadow(0 0 4px var(--accent-glow)); }
.circle-label { margin-top: 8px; font-size: 13px; color: var(--muted); }
.circle-center { font-size: 15px; font-weight: 800; fill: var(--text); }

/* ---------- Heatmap ---------- */
.month-nav { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.month-nav .name { font-weight: 700; min-width: 140px; text-align: center; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal .dow { text-align: center; color: var(--muted); font-size: 11px; padding-bottom: 4px; }
.cal-cell { aspect-ratio: 1; border-radius: 9px; display: grid; place-items: center; font-size: 12px; font-weight: 700; border: 1px solid var(--border); background: var(--surface-2); color: var(--muted); transition: transform .1s; }
.cal-cell:hover { transform: scale(1.08); }
.cal-cell.has { background: rgba(63,185,80,.18); color: var(--green); border-color: rgba(63,185,80,.4); }
.cal-cell.zero { background: rgba(248,81,73,.14); color: var(--red); border-color: rgba(248,81,73,.35); }
.cal-cell.empty { background: transparent; border: none; }

/* ---------- Forms ---------- */
.form { display: flex; flex-direction: column; gap: 15px; }
.form label, .field-row label, .role-map label, .stat-form label { display: flex; flex-direction: column; gap: 7px; font-size: 13px; font-weight: 600; color: var(--muted); }
input, select, textarea {
    background: var(--bg); border: 1px solid var(--border); border-radius: 11px;
    padding: 11px 13px; color: var(--text); font-size: 14px; font-family: inherit; width: 100%;
    transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea { resize: vertical; min-height: 90px; }
.field-row { display: flex; gap: 12px; flex-wrap: wrap; }
.field-row > label { flex: 1; min-width: 150px; }
.check-label { flex-direction: row !important; align-items: center; gap: 8px !important; }
.check-label input { width: auto; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: none; border-radius: 11px; padding: 11px 18px; font-size: 14px; font-weight: 700; cursor: pointer; font-family: inherit; transition: filter .15s, background .15s, transform .08s; }
.btn:active { transform: translateY(1px); }
.btn-sm { padding: 8px 13px; font-size: 13px; }
.btn-block { width: 100%; }
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; box-shadow: 0 6px 16px var(--accent-glow); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-danger { background: rgba(248,81,73,.14); color: var(--red); border: 1px solid rgba(248,81,73,.4); }
.btn-danger:hover { background: rgba(248,81,73,.24); }
.btn-ghost { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--border); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.inline { display: inline; }

/* ---------- Flash / toast ---------- */
.flashes { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.flash { padding: 12px 16px; border-radius: 11px; font-size: 14px; font-weight: 600; border: 1px solid; }
.flash-error { background: rgba(248,81,73,.12); color: #ff9d97; border-color: rgba(248,81,73,.35); }
.flash-success { background: rgba(63,185,80,.12); color: #7ee787; border-color: rgba(63,185,80,.35); }
.toast { position: fixed; bottom: 22px; right: 22px; z-index: 100; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; padding: 14px 20px; border-radius: 12px; font-weight: 700; box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(20px); transition: all .3s; }
.toast.show { opacity: 1; transform: translateY(0); }

/* ---------- Modal ---------- */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.65); backdrop-filter: blur(3px); z-index: 90; display: none; align-items: center; justify-content: center; padding: 20px; }
.modal-overlay.open { display: flex; animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); width: 100%; max-width: 480px; padding: 26px; max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-lg); }
.modal h2 { margin-bottom: 8px; }
.modal .close-x { float: right; cursor: pointer; color: var(--muted); font-size: 22px; background: none; border: none; line-height: 1; }

/* ---------- Auth ---------- */
.auth-wrap { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 24px; }
.auth-card { width: 100%; max-width: 410px; background: color-mix(in srgb, var(--surface) 90%, transparent); backdrop-filter: blur(16px); border: 1px solid var(--border); border-radius: 20px; padding: 38px 32px; box-shadow: var(--shadow-lg); position: relative; overflow: hidden; }
.auth-card::before { content: ""; position: absolute; top: -60px; right: -60px; width: 180px; height: 180px; background: radial-gradient(circle, var(--accent-glow), transparent 70%); }
.auth-card.center { text-align: center; }
.auth-head { text-align: center; margin-bottom: 24px; position: relative; }
.auth-head .logo-mark { width: 58px; height: 58px; font-size: 22px; margin: 0 auto 16px; border-radius: 16px; }
.auth-head h1 { margin-bottom: 4px; }
.auth-alt { text-align: center; margin-top: 18px; color: var(--muted); font-size: 14px; }
.status-icon { width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center; font-size: 32px; margin: 0 auto 18px; }
.status-icon.pending { background: rgba(210,153,34,.15); color: var(--orange); }
.status-icon.rejected { background: rgba(248,81,73,.15); color: var(--red); font-weight: 800; }

/* ---------- Manuals ---------- */
.manual-card { display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: var(--text); }
.manual-card:hover { transform: translateY(-3px); border-color: var(--accent); opacity: 1; }
.manual-card .cat { align-self: flex-start; }
.manual-meta { color: var(--muted); font-size: 12px; display: flex; gap: 12px; flex-wrap: wrap; margin-top: auto; padding-top: 10px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.chip { padding: 8px 15px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer; transition: all .15s; }
.chip:hover { border-color: var(--accent); opacity: 1; }
.chip.active { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; border-color: transparent; }
.manual-body { white-space: normal; line-height: 1.7; overflow-wrap: anywhere; }
.manual-body p, .manual-body div { margin: 0 0 10px; }
.manual-body ul, .manual-body ol { padding-left: 24px; margin: 8px 0 12px; }
.manual-body blockquote { margin: 12px 0; padding: 10px 14px; border-left: 3px solid var(--accent); background: var(--bg-2); border-radius: 8px; }
.manual-body pre { white-space: pre-wrap; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 12px; }
.manual-nocopy { user-select: none; -webkit-user-select: none; border-bottom: 1px dashed var(--orange); cursor: not-allowed; }
.manual-editor-widget { display: grid; gap: 8px; }
.manual-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-2); }
.manual-toolbar > .manual-tool-heading { order: -40; }
.manual-toolbar > .manual-tool-select:not(.manual-tool-heading) { order: -39; }
.manual-toolbar > .manual-color { order: -38; }
.manual-toolbar > .manual-tool-group:first-of-type { order: -37; }
.manual-toolbar > .manual-tool-group { align-self: stretch; }
.manual-tool-group { display: flex; gap: 4px; padding-right: 6px; border-right: 1px solid var(--border); }
.manual-tool-group:last-child { border-right: none; }
.manual-tool { min-width: 34px; height: 34px; padding: 0 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); font-family: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.manual-tool:hover { border-color: var(--accent); }
.manual-tool-lock { color: var(--orange); }
.manual-tool-select, .manual-color { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 700; }
.manual-tool-select select { width: 132px; height: 34px; padding: 0 8px; }
.manual-tool-select input { width: 70px; height: 34px; padding: 0 8px; }
.manual-color input { width: 42px; height: 34px; padding: 3px; border-radius: 8px; }
.manual-rich-editor { min-height: 420px; padding: 18px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); outline: none; line-height: 1.7; overflow-wrap: anywhere; white-space: normal; }
.manual-rich-editor:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.manual-rich-editor:empty::before { content: attr(data-placeholder); color: var(--muted); }
.manual-rich-editor ul, .manual-rich-editor ol { padding-left: 24px; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 4px; margin-bottom: 22px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.tab { background: none; border: none; color: var(--muted); padding: 12px 16px; font-size: 14px; font-weight: 700; cursor: pointer; border-bottom: 2px solid transparent; font-family: inherit; display: flex; gap: 7px; align-items: center; transition: color .15s; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); border-bottom-color: var(--accent); }
.tab .badge-count { background: var(--surface-2); color: var(--muted); font-size: 11px; padding: 1px 8px; border-radius: 999px; }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fade .2s ease; }
.attestations-only .tab-panel { display: block; }

.empty { text-align: center; color: var(--muted); padding: 40px; border: 1px dashed var(--border); border-radius: var(--radius); }
.dl { display: grid; gap: 11px; }
.dl .row { display: flex; justify-content: space-between; border-top: 1px solid var(--border-soft); padding-top: 10px; font-size: 14px; }
.dl .row:first-child { border-top: none; padding-top: 0; }
.dl dt { color: var(--muted); } .dl dd { font-weight: 600; }

.review-card { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 16px; margin-bottom: 11px; }
.review-user { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 160px; }
.review-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.review-actions select, .review-actions input { width: auto; }
.member-list { display: grid; gap: 11px; }
.member-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 16px; }

/* ---------- User config page ---------- */
.user-config-head { display: flex; align-items: center; gap: 18px; margin-bottom: 16px; }
.chips-inline { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.config-grid { display: grid; gap: 16px; }
.config-actions { display: flex; gap: 10px; }
.role-map { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }

/* ---------- Punishment actions ---------- */
.punish-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.punish-form { display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-2); }

/* ---------- Manual access picker ---------- */
.access-picker { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; background: var(--bg-2); }
.access-radios { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 10px; }
.role-checks { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; margin-top: 4px; }

/* ---------- Form command block ---------- */
.form-command { font-family: "JetBrains Mono", "Consolas", monospace; font-size: 13px; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 8px 11px; margin: 8px 0; word-break: break-word; }

/* ---------- Media details page-modal ---------- */
.media-split { display: grid; gap: 16px; }
.media-detail-card {
    position: fixed;
    top: 50%;
    left: calc(var(--sidebar-w) + (100vw - var(--sidebar-w)) / 2);
    width: min(860px, calc(100vw - var(--sidebar-w) - 56px));
    max-width: calc(100vw - 56px);
    max-height: calc(100vh - 80px);
    border-radius: var(--radius);
    z-index: 80;
    overflow-y: auto;
    transform: translate(-50%, -46%) scale(.98);
    opacity: 0;
    pointer-events: none;
    transition: transform .22s ease, opacity .18s ease;
    box-shadow: var(--shadow-lg);
}
.media-detail-card.open {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    pointer-events: auto;
}
.media-detail-close {
    float: right;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    margin: -8px -8px 8px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-2);
    color: var(--muted);
    font-size: 22px;
    line-height: 1;
}
.media-detail-close:hover {
    color: var(--text);
    opacity: 1;
    border-color: var(--accent);
}

/* ---------- Timeline (histories) ---------- */
.timeline { display: flex; flex-direction: column; gap: 12px; }
.timeline-item { position: relative; padding-left: 18px; border-left: 2px solid var(--border); padding-bottom: 4px; }
.timeline-item::before { content: ""; position: absolute; left: -6px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }

/* ---------- Notifications ---------- */
.notif-bell { position: relative; text-decoration: none; }
.notif-dot { position: absolute; top: -4px; right: -4px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: var(--red); color: #fff; font-size: 10px; font-weight: 800; display: grid; place-items: center; line-height: 1; }
.notif-list { display: flex; flex-direction: column; gap: 11px; }
.notif-item { display: flex; gap: 14px; align-items: flex-start; padding: 16px; }
.notif-item.unread { border-color: var(--accent); background: linear-gradient(90deg, var(--accent-soft), var(--surface) 40%); }
.notif-icon { font-size: 22px; line-height: 1; flex-shrink: 0; }
.notif-body { display: flex; flex-direction: column; gap: 3px; }

/* ---------- Workload / tops readability ---------- */
#tab-forms .badge, .form-command { user-select: text; }
.workload-table td, .tops-table td { font-size: 13.5px; }

/* ---------- Pager (истории по страницам) ---------- */
.pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 14px; }
.pager-btn { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font-size: 16px; font-weight: 800; cursor: pointer; display: grid; place-items: center; transition: background .15s, border-color .15s; }
.pager-btn:hover:not(:disabled) { border-color: var(--accent); background: var(--surface); }
.pager-btn:disabled { opacity: .35; cursor: not-allowed; }
.pager-info { font-size: 13px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 46px; text-align: center; }

/* ---------- Магазин ---------- */
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.shop-item { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; background: var(--bg-2); display: flex; flex-direction: column; gap: 10px; transition: border-color .15s, transform .12s; }
.shop-item:hover { border-color: var(--accent); transform: translateY(-2px); }
.shop-item-name { font-weight: 600; font-size: 14px; flex: 1; }
.shop-item-price { font-family: "Manrope", "Inter", sans-serif; font-weight: 800; font-size: 20px; letter-spacing: -0.5px; font-variant-numeric: tabular-nums; }

/* ---------- Mobile ---------- */
.hamburger { display: none; }
@media (max-width: 900px) {
    .sidebar { transform: translateX(-100%); transition: transform .25s; box-shadow: var(--shadow-lg); }
    .sidebar.open { transform: translateX(0); }
    .main-area { margin-left: 0; }
    .hamburger { display: grid; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .content { padding: 20px; }
    .punish-actions { grid-template-columns: 1fr; }
    .media-detail-card {
        left: 50%;
        width: calc(100vw - 24px);
        max-width: calc(100vw - 24px);
        max-height: calc(100vh - 32px);
    }
}

/* ============================================================
   UI refresh 2026
   One calm accent, new Onest type, softer surfaces, more spacing.
   ============================================================ */
:root,
[data-accent="green"],
[data-accent="blue"],
[data-accent="purple"],
[data-accent="orange"] {
    --bg: #0f1512;
    --bg-2: #131b17;
    --surface: #18221d;
    --surface-2: #202c26;
    --surface-3: #27362f;
    --border: rgba(224, 238, 230, .10);
    --border-soft: rgba(224, 238, 230, .07);
    --text: #edf7f1;
    --muted: #9fb0a7;
    --green: #6ee7b7;
    --red: #fb7185;
    --orange: #fbbf24;
    --accent: #6ee7b7;
    --accent-2: #34d399;
    --accent-soft: rgba(110, 231, 183, .13);
    --accent-glow: rgba(52, 211, 153, .24);
    --accent-ink: #06251a;
    --radius: 14px;
    --radius-sm: 10px;
    --sidebar-w: 284px;
    --shadow: 0 18px 42px rgba(0, 0, 0, .24);
    --shadow-lg: 0 28px 76px rgba(0, 0, 0, .45);
}

[data-theme="light"] {
    --bg: #f4f7f5;
    --bg-2: #edf3ef;
    --surface: #ffffff;
    --surface-2: #f5faf7;
    --surface-3: #ebf3ef;
    --border: rgba(22, 53, 40, .11);
    --border-soft: rgba(22, 53, 40, .08);
    --text: #17211d;
    --muted: #687870;
    --accent: #0f9f72;
    --accent-2: #0b8a63;
    --accent-soft: rgba(15, 159, 114, .12);
    --accent-glow: rgba(15, 159, 114, .20);
    --accent-ink: #ffffff;
    --shadow: 0 18px 42px rgba(30, 56, 45, .08);
    --shadow-lg: 0 28px 76px rgba(30, 56, 45, .16);
}

html { scroll-behavior: smooth; }
body {
    font-family: "Onest", "Segoe UI", system-ui, -apple-system, sans-serif;
    font-size: 15px;
    line-height: 1.62;
    background:
        linear-gradient(135deg, rgba(110, 231, 183, .08), transparent 34%),
        linear-gradient(180deg, var(--bg-2), var(--bg));
    background-attachment: fixed;
    font-feature-settings: "tnum";
}

h1, h2, h3 { font-family: "Onest", "Segoe UI", system-ui, sans-serif; letter-spacing: 0; line-height: 1.12; }
h1 { font-size: clamp(27px, 2.3vw, 36px); font-weight: 800; }
h2 { font-size: 19px; font-weight: 800; }
h3 { font-size: 16px; font-weight: 800; }
a { transition: color .15s ease, opacity .15s ease; }

.sidebar {
    width: var(--sidebar-w);
    padding: 22px 16px;
    gap: 6px;
    background: color-mix(in srgb, var(--bg-2) 90%, transparent);
    border-right: 1px solid var(--border);
    backdrop-filter: blur(18px);
}
.sidebar-logo { gap: 13px; padding: 3px 8px 24px; }
.logo-mark {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    color: var(--accent-ink);
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 12px 28px var(--accent-glow);
    font-weight: 800;
}
.logo-text { font-size: 16px; color: var(--text); }
.nav-group { margin-bottom: 18px; }
.nav-group-title {
    padding: 8px 12px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
}
.nav-item {
    min-height: 42px;
    margin-bottom: 5px;
    padding: 10px 12px;
    border-radius: 12px;
    color: var(--muted);
    font-weight: 700;
    transition: background .15s ease, color .15s ease, transform .15s ease;
}
.nav-item:hover { color: var(--text); background: var(--surface); }
.nav-item.active {
    color: var(--text);
    background: linear-gradient(135deg, var(--accent-soft), color-mix(in srgb, var(--surface) 88%, var(--accent)));
}
.nav-item.active::before {
    left: -16px;
    top: 10px;
    bottom: 10px;
    height: auto;
    border-radius: 0 999px 999px 0;
}
.nav-item .badge-count,
.badge-count {
    min-width: 24px;
    padding: 2px 8px;
    border-radius: 999px;
    font-weight: 800;
}
.nav-item.active .badge-count { color: var(--accent-ink); background: var(--accent); }
.sidebar-cta {
    margin: 4px 0 18px;
    padding: 13px 14px;
    border-radius: 12px;
    color: var(--accent-ink);
    box-shadow: 0 14px 26px var(--accent-glow);
    font-weight: 800;
}
.sidebar-profile {
    gap: 12px;
    padding: 12px;
    border-radius: 14px;
    background: var(--surface);
}

.main-area { margin-left: var(--sidebar-w); }
.topbar {
    min-height: 74px;
    padding: 16px 34px;
    gap: 16px;
    background: color-mix(in srgb, var(--bg) 74%, transparent);
    backdrop-filter: blur(18px);
}
.topbar-title {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .08em;
}
.topbar-actions { gap: 9px; }
.content {
    max-width: 1280px;
    padding: 34px;
}

.icon-btn {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--surface);
    transition: background .15s ease, border-color .15s ease, transform .12s ease;
}
.icon-btn:hover {
    background: var(--surface-2);
    border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
}

.page-head { margin-bottom: 28px; }
.page-head h1 { margin-bottom: 9px; }
.page-head p { max-width: 850px; }
.grid { gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.card,
.tile {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--surface) 94%, var(--accent));
    box-shadow: var(--shadow);
}
.card {
    padding: 24px;
    transition: border-color .15s ease, transform .15s ease, background .15s ease;
}
.card h2 { margin-bottom: 18px; }
.tile {
    min-height: 118px;
    padding: 22px;
    background: linear-gradient(145deg, color-mix(in srgb, var(--surface) 95%, var(--accent)), var(--surface));
}
.tile .label { margin-bottom: 8px; font-weight: 700; }
.tile .value {
    font-family: "Onest", "Segoe UI", system-ui, sans-serif;
    font-size: 29px;
    line-height: 1.18;
    letter-spacing: 0;
}
.tile .sub { margin-top: 7px; }

.info-plate,
.warn-plate {
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: 12px;
}
.info-plate {
    background: var(--accent-soft);
    border-color: color-mix(in srgb, var(--accent) 28%, transparent);
}
.warn-plate {
    color: #fecdd3;
    background: rgba(251, 113, 133, .12);
    border-color: rgba(251, 113, 133, .28);
}
[data-theme="light"] .warn-plate { color: #9f1239; }

.avatar {
    width: 42px;
    height: 42px;
    color: var(--accent-ink);
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 10px 22px var(--accent-glow);
    font-weight: 800;
}
.avatar.lg { width: 72px; height: 72px; font-size: 28px; }
.badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 4px 11px;
    font-weight: 800;
}
.badge-admin,
.chip.active,
.tab.active,
.btn-primary {
    color: var(--accent-ink);
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.badge-role { color: var(--accent); background: var(--accent-soft); }
.badge-green { color: var(--green); background: rgba(110, 231, 183, .14); }
.badge-red { color: var(--red); background: rgba(251, 113, 133, .14); }
.badge-orange { color: var(--orange); background: rgba(251, 191, 36, .14); }

.table-wrap {
    border-radius: var(--radius);
    background: var(--surface);
}
th, td { padding: 14px 16px; }
th {
    background: var(--surface-2);
    font-weight: 800;
    letter-spacing: .06em;
}
tbody tr:hover { background: color-mix(in srgb, var(--surface-2) 82%, var(--accent)); }

.form { gap: 16px; }
.form label,
.field-row label,
.role-map label,
.stat-form label {
    gap: 8px;
    font-weight: 700;
}
input,
select,
textarea {
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--bg);
    font-family: "Onest", "Segoe UI", system-ui, sans-serif;
}
input:focus,
select:focus,
textarea:focus {
    border-color: color-mix(in srgb, var(--accent) 60%, var(--border));
    box-shadow: 0 0 0 4px var(--accent-soft);
}
textarea { min-height: 100px; }
.field-row { gap: 14px; }
.field-row > label { min-width: 170px; }

.btn {
    min-height: 42px;
    padding: 11px 18px;
    border-radius: 12px;
    font-family: "Onest", "Segoe UI", system-ui, sans-serif;
    font-weight: 800;
}
.btn-sm { min-height: 36px; padding: 8px 13px; }
.btn-primary { box-shadow: 0 13px 24px var(--accent-glow); }
.btn-ghost { background: var(--surface-2); }
.btn-ghost:hover {
    background: var(--surface-3);
    border-color: color-mix(in srgb, var(--accent) 36%, var(--border));
}
.btn-danger {
    color: var(--red);
    background: rgba(251, 113, 133, .11);
    border-color: rgba(251, 113, 133, .28);
}

.flashes { gap: 11px; margin-bottom: 22px; }
.flash { padding: 13px 16px; border-radius: 12px; font-weight: 700; }
.flash-success {
    color: var(--accent);
    background: var(--accent-soft);
    border-color: color-mix(in srgb, var(--accent) 30%, transparent);
}
.flash-error {
    color: #fecdd3;
    background: rgba(251, 113, 133, .12);
    border-color: rgba(251, 113, 133, .30);
}
[data-theme="light"] .flash-error { color: #9f1239; }

.modal { max-width: 500px; padding: 28px; border-radius: 18px; }
.modal-overlay { background: rgba(3, 10, 7, .68); backdrop-filter: blur(5px); }
.auth-card {
    max-width: 430px;
    padding: 42px 34px;
    border-radius: 22px;
}
.auth-card::before {
    top: 0;
    right: 0;
    left: 0;
    width: auto;
    height: 5px;
    background: linear-gradient(90deg, var(--accent), transparent);
}
.auth-head .logo-mark { width: 60px; height: 60px; border-radius: 17px; }

.tabs {
    gap: 8px;
    margin-bottom: 24px;
    padding: 6px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
}
.tab {
    min-height: 40px;
    padding: 10px 14px;
    border-radius: 10px;
    font-weight: 800;
    border-bottom: 0;
}
.tab.active { border-bottom-color: transparent; }
.tab.active .badge-count { color: var(--text); background: rgba(0, 0, 0, .18); }

.empty {
    padding: 44px 24px;
    background: color-mix(in srgb, var(--surface) 70%, transparent);
}
.review-card,
.member-row { padding: 18px; gap: 16px; }
.review-user { gap: 13px; min-width: 180px; }
.review-actions { gap: 9px; }
.member-list { gap: 12px; }
.chips { gap: 9px; margin-bottom: 20px; }
.chip {
    padding: 9px 15px;
    font-family: "Onest", "Segoe UI", system-ui, sans-serif;
    font-weight: 800;
}
.manual-card:hover,
.shop-item:hover {
    border-color: color-mix(in srgb, var(--accent) 38%, var(--border));
}
.manual-toolbar,
.manual-rich-editor,
.punish-form,
.access-picker,
.form-command { border-radius: var(--radius-sm); }

.media-detail-card {
    width: min(880px, calc(100vw - var(--sidebar-w) - 60px));
    max-width: calc(100vw - 60px);
    border-radius: 18px;
}
.shop-grid { gap: 14px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.shop-item { gap: 11px; padding: 16px; }
.shop-item-price {
    font-family: "Onest", "Segoe UI", system-ui, sans-serif;
    font-size: 21px;
    letter-spacing: 0;
}

@media (max-width: 1100px) {
    .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
    .main-area { margin-left: 0; }
    .topbar { min-height: 66px; padding: 12px 18px; }
    .content { padding: 22px; }
    .grid-2,
    .grid-3,
    .grid-4 { grid-template-columns: 1fr; }
    .review-actions select,
    .review-actions input { width: 100%; }
    .media-detail-card {
        width: calc(100vw - 24px);
        max-width: calc(100vw - 24px);
    }
}

@media (max-width: 560px) {
    body { font-size: 14px; }
    .content { padding: 18px; }
    .card,
    .tile { padding: 18px; }
    .auth-card { padding: 34px 24px; }
    .topbar-title { display: none; }
    .icon-btn { width: 39px; height: 39px; }
    .btn { width: 100%; }
    .topbar .btn { width: auto; }
    .dl .row { flex-direction: column; gap: 4px; }
    .dl dd { text-align: left; }
}

/* Manual editor reliability: scalable page, paragraph ruler, image handles and colors. */
.page-manual_edit .manual-editor-widget { min-width: 0; }
.page-manual_edit .manual-toolbar {
    position: sticky;
    top: 68px;
    z-index: 30;
    flex-wrap: wrap;
    overflow: visible;
    max-width: 100%;
}
.page-manual_edit .manual-document-workarea {
    position: relative;
    width: 100%;
    max-width: 980px;
    margin-inline: auto;
}
.page-manual_edit .manual-rich-editor {
    box-sizing: border-box;
    height: auto !important;
    max-width: 900px;
    margin-inline: auto;
    overflow: visible;
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: normal;
    caret-color: currentColor;
}
.manual-rich-editor > * { max-width: 100%; }
.manual-rich-editor img { box-sizing: border-box; }

.manual-ruler {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto;
    gap: 12px;
    overflow-x: auto;
    padding: 13px 16px 9px;
}
.manual-ruler-scale {
    position: relative;
    min-width: 260px;
    height: 28px;
    border-block: 1px solid var(--border);
    background: var(--surface);
}
.manual-ruler-ticks {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(90deg, transparent 0 23px, var(--border) 23px 24px);
    pointer-events: none;
}
.manual-ruler-marker {
    position: absolute;
    z-index: 2;
    width: 13px;
    height: 13px;
    padding: 0;
    border: 1px solid #8ecbff;
    background: #1599f6;
    transform: translateX(-50%) rotate(45deg);
    cursor: ew-resize;
}
.manual-ruler-marker.marker-first,
.manual-ruler-marker.marker-page-left,
.manual-ruler-marker.marker-page-right { top: -7px; }
.manual-ruler-marker.marker-left,
.manual-ruler-marker.marker-hanging,
.manual-ruler-marker.marker-right { bottom: -7px; }
.manual-ruler-marker.marker-page-left,
.manual-ruler-marker.marker-page-right { background: #e8e8ec; border-color: #fff; }
.manual-ruler-marker.marker-hanging { background: var(--accent); border-color: var(--accent-2); }
.manual-ruler-value { color: var(--muted); font-size: 11px; white-space: nowrap; }

.manual-image-resizer {
    position: absolute;
    z-index: 25;
    box-sizing: border-box;
    border: 2px solid #1599f6;
    pointer-events: none;
}
.manual-image-resizer[hidden] { display: none; }
.manual-image-handle {
    position: absolute;
    width: 12px;
    height: 12px;
    padding: 0;
    border: 2px solid #1599f6;
    border-radius: 2px;
    background: #fff;
    transform: translate(-50%, -50%);
    pointer-events: auto;
}
.manual-image-handle.handle-nw { left:0; top:0; cursor:nwse-resize; }
.manual-image-handle.handle-n { left:50%; top:0; cursor:ns-resize; }
.manual-image-handle.handle-ne { left:100%; top:0; cursor:nesw-resize; }
.manual-image-handle.handle-e { left:100%; top:50%; cursor:ew-resize; }
.manual-image-handle.handle-se { left:100%; top:100%; cursor:nwse-resize; }
.manual-image-handle.handle-s { left:50%; top:100%; cursor:ns-resize; }
.manual-image-handle.handle-sw { left:0; top:100%; cursor:nesw-resize; }
.manual-image-handle.handle-w { left:0; top:50%; cursor:ew-resize; }
.manual-image-size {
    position: absolute;
    left: 50%;
    bottom: -31px;
    transform: translateX(-50%);
    padding: 4px 7px;
    border-radius: 5px;
    background: #101318;
    color: #fff;
    font-size: 11px;
    white-space: nowrap;
}

.manual-color-picker { position: relative; }
.manual-color-trigger {
    min-height: 34px;
    padding: 6px 10px 6px 30px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: linear-gradient(90deg, var(--picked-color) 0 20px, var(--surface-2) 20px);
    color: var(--text);
    font: inherit;
    font-size: 12px;
    cursor: pointer;
}
.manual-color-popover {
    position: absolute;
    z-index: 60;
    top: calc(100% + 7px);
    left: 0;
    width: 250px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg-2);
    box-shadow: 0 18px 48px rgba(0,0,0,.45);
}
.manual-color-popover[hidden] { display:none; }
.manual-color-popover label { display:grid; grid-template-columns:60px 1fr; gap:7px; align-items:center; margin-top:8px; font-size:11px; }
.manual-color-popover input { min-width:0; min-height:30px !important; padding:4px 7px !important; }
.manual-color-palette, .manual-recent-colors { display:flex; flex-wrap:wrap; gap:6px; }
.manual-color-palette button, .manual-recent-colors button {
    width:24px; height:24px; padding:0; border:1px solid #555; border-radius:5px;
    background:var(--palette-color); cursor:pointer;
}
.manual-recent-colors { margin-top:10px; align-items:center; }
.manual-recent-colors > span { width:100%; color:var(--muted); font-size:11px; }
.manual-color-rgb { display:grid; grid-template-columns:repeat(3,1fr); gap:5px; }
.manual-color-rgb label { display:grid; grid-template-columns:16px 1fr; }

.manual-category-manager .section-head { display:flex; justify-content:space-between; gap:16px; align-items:end; }
.manual-category-create, .manual-category-name, .manual-category-actions, .manual-category-delete { display:flex; gap:7px; align-items:center; }
.manual-category-list { display:grid; gap:8px; margin-top:14px; }
.manual-category-row { display:grid; grid-template-columns:minmax(240px,1fr) auto; gap:10px; padding:10px; border:1px solid var(--border); border-radius:8px; }
.manual-category-row.is-disabled { opacity:.58; }
.manual-category-name input { flex:1; }
.manual-category-delete select { min-width:140px; }

@media (max-width: 760px) {
    .page-manual_edit .manual-toolbar { flex-wrap:nowrap; overflow-x:auto; overflow-y:hidden; top:56px; }
    .page-manual_edit .manual-toolbar > * { flex:0 0 auto; }
    .manual-ruler { grid-template-columns:minmax(420px,1fr); }
    .manual-ruler-value { display:none; }
    .manual-category-manager .section-head, .manual-category-row { display:grid; grid-template-columns:1fr; }
    .manual-category-create, .manual-category-name, .manual-category-actions, .manual-category-delete { flex-wrap:wrap; }
}

/* ============================================================
   Premium dark fintech theme
   Oil-black base, warm gold accent, minimal SaaS surfaces.
   ============================================================ */
:root,
[data-theme="light"],
[data-theme="dark"],
[data-accent="green"],
[data-accent="blue"],
[data-accent="purple"],
[data-accent="orange"] {
    --bg: #0d0d0f;
    --bg-2: #111113;
    --surface: #141416;
    --surface-2: #1a1a1d;
    --surface-3: #222226;
    --border: rgba(255, 255, 255, .085);
    --border-soft: rgba(255, 255, 255, .055);
    --text: #f7f7f5;
    --muted: #9a9a9f;
    --green: #f5b301;
    --red: #ff6b6b;
    --orange: #ffc93c;
    --accent: #f5b301;
    --accent-2: #ffc93c;
    --accent-soft: rgba(245, 179, 1, .12);
    --accent-glow: rgba(245, 179, 1, .25);
    --accent-ink: #11100a;
    --radius: 12px;
    --radius-sm: 9px;
    --sidebar-w: 286px;
    --shadow: 0 18px 44px rgba(0, 0, 0, .36);
    --shadow-lg: 0 30px 90px rgba(0, 0, 0, .58);
}

body {
    color: var(--text);
    background:
        radial-gradient(820px 360px at 84% -12%, rgba(245, 179, 1, .10), transparent 62%),
        linear-gradient(180deg, #141416 0%, #0d0d0f 46%, #09090a 100%);
    background-attachment: fixed;
}

a { color: var(--accent-2); }
h1, h2, h3 { color: #ffffff; }
.muted, small { color: var(--muted); }

.sidebar {
    background: rgba(13, 13, 15, .88);
    border-right-color: var(--border);
    box-shadow: inset -1px 0 0 rgba(255, 201, 60, .03);
}
.logo-mark,
.avatar,
.btn-primary,
.sidebar-cta,
.badge-admin,
.chip.active,
.tab.active {
    color: var(--accent-ink);
    background: linear-gradient(135deg, #f5b301 0%, #ffc93c 100%);
    box-shadow: 0 14px 34px rgba(245, 179, 1, .24);
}
.logo-text { color: #ffffff; }

.nav-group-title,
.topbar-title {
    color: #7f7f86;
}
.nav-item {
    color: #a4a4aa;
    border: 1px solid transparent;
}
.nav-item:hover {
    color: #ffffff;
    background: #171719;
    border-color: rgba(255, 255, 255, .06);
}
.nav-item.active {
    color: #ffffff;
    background: linear-gradient(135deg, rgba(245, 179, 1, .13), rgba(255, 201, 60, .055));
    border-color: rgba(245, 179, 1, .18);
}
.nav-item.active::before {
    background: linear-gradient(180deg, #ffc93c, #f5b301);
    box-shadow: 0 0 20px rgba(245, 179, 1, .36);
}
.nav-item .badge-count,
.badge-count {
    color: #b8b8bd;
    background: #202024;
}
.nav-item.active .badge-count {
    color: var(--accent-ink);
    background: #ffc93c;
}
.sidebar-profile {
    background: linear-gradient(180deg, #171719, #121214);
    border-color: rgba(255, 255, 255, .08);
}
.sidebar-profile:hover {
    border-color: rgba(245, 179, 1, .32);
}

.topbar {
    background: rgba(13, 13, 15, .76);
    border-bottom-color: var(--border);
}
.icon-btn {
    color: #f2f2f0;
    background: #151517;
    border-color: rgba(255, 255, 255, .08);
}
.icon-btn:hover {
    background: #1d1d20;
    border-color: rgba(245, 179, 1, .34);
}

.card,
.tile {
    background: linear-gradient(180deg, rgba(24, 24, 27, .96), rgba(18, 18, 20, .96));
    border-color: rgba(255, 255, 255, .08);
    box-shadow: 0 18px 42px rgba(0, 0, 0, .32);
}
.card:hover,
.tile:hover {
    border-color: rgba(245, 179, 1, .16);
}
.tile {
    background:
        linear-gradient(145deg, rgba(245, 179, 1, .075), transparent 36%),
        linear-gradient(180deg, #18181b, #121214);
}
.tile .label {
    color: #929299;
}
.tile .value {
    color: #ffffff;
}
.tile .sub {
    color: #8b8b91;
}

.info-plate {
    color: #f7f2df;
    background: rgba(245, 179, 1, .10);
    border-color: rgba(245, 179, 1, .22);
}
.warn-plate {
    color: #ffd6d6;
    background: rgba(255, 107, 107, .11);
    border-color: rgba(255, 107, 107, .24);
}

.badge-role {
    color: #ffc93c;
    background: rgba(245, 179, 1, .12);
}
.badge-soft {
    color: #a7a7ad;
    background: #202024;
}
.badge-green {
    color: #ffc93c;
    background: rgba(245, 179, 1, .13);
}
.badge-orange {
    color: #ffd76a;
    background: rgba(255, 201, 60, .12);
}
.badge-red {
    color: #ff8585;
    background: rgba(255, 107, 107, .13);
}

.table-wrap {
    background: #141416;
    border-color: rgba(255, 255, 255, .08);
}
th {
    color: #8d8d94;
    background: #19191c;
}
td {
    color: #e9e9e6;
}
tbody tr:hover {
    background: rgba(245, 179, 1, .045);
}

input,
select,
textarea,
.manual-rich-editor {
    color: #f4f4f1;
    background: #0f0f11;
    border-color: rgba(255, 255, 255, .09);
}
input:focus,
select:focus,
textarea:focus,
.manual-rich-editor:focus {
    border-color: rgba(245, 179, 1, .48);
    box-shadow: 0 0 0 4px rgba(245, 179, 1, .11);
}

.btn-primary:hover,
.sidebar-cta:hover {
    filter: brightness(1.06);
}
.btn-ghost {
    color: #f0f0ee;
    background: #1a1a1d;
    border-color: rgba(255, 255, 255, .08);
}
.btn-ghost:hover {
    background: #222226;
    border-color: rgba(245, 179, 1, .28);
}
.btn-danger {
    color: #ff8585;
    background: rgba(255, 107, 107, .10);
    border-color: rgba(255, 107, 107, .25);
}

.tabs {
    background: #141416;
    border-color: rgba(255, 255, 255, .08);
}
.tab {
    color: #9b9ba1;
}
.tab:hover {
    color: #ffffff;
    background: #1b1b1e;
}
.tab.active .badge-count {
    color: #ffffff;
    background: rgba(0, 0, 0, .24);
}

.empty {
    color: #8f8f96;
    background: rgba(255, 255, 255, .018);
    border-color: rgba(255, 255, 255, .08);
}
.chip {
    color: #a2a2a8;
    background: #151517;
    border-color: rgba(255, 255, 255, .08);
}
.chip:hover {
    color: #ffffff;
    border-color: rgba(245, 179, 1, .26);
}

.auth-card {
    background: linear-gradient(180deg, rgba(24, 24, 27, .96), rgba(16, 16, 18, .96));
    border-color: rgba(255, 255, 255, .09);
}
.auth-card::before {
    background: linear-gradient(90deg, #f5b301, #ffc93c, transparent);
}

.modal {
    background: #141416;
    border-color: rgba(255, 255, 255, .10);
}
.modal-overlay {
    background: rgba(0, 0, 0, .72);
}

.flash-success {
    color: #ffda6b;
    background: rgba(245, 179, 1, .10);
    border-color: rgba(245, 179, 1, .24);
}
.flash-error {
    color: #ffb3b3;
}
.toast {
    color: var(--accent-ink);
    background: linear-gradient(135deg, #f5b301, #ffc93c);
}

.cal-cell,
.manual-toolbar,
.manual-tool,
.punish-form,
.access-picker,
.form-command,
.shop-item {
    background: #141416;
    border-color: rgba(255, 255, 255, .08);
}
.cal-cell.has {
    color: #ffc93c;
    background: rgba(245, 179, 1, .12);
    border-color: rgba(245, 179, 1, .25);
}
.circle-widget .fill {
    stroke: #f5b301;
    filter: drop-shadow(0 0 5px rgba(245, 179, 1, .34));
}
.timeline-item::before {
    background: #f5b301;
    box-shadow: 0 0 18px rgba(245, 179, 1, .34);
}
.notif-item.unread {
    border-color: rgba(245, 179, 1, .24);
    background: linear-gradient(90deg, rgba(245, 179, 1, .10), #141416 46%);
}
.shop-item:hover,
.manual-card:hover,
.media-detail-close:hover {
    border-color: rgba(245, 179, 1, .28);
}

/* Staff and workload split by mode */
.mode-sections {
    display: grid;
    gap: 22px;
}

.mode-section {
    overflow: hidden;
}

.mode-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.mode-section-head h2 {
    margin-bottom: 5px;
}

.premium-table-wrap {
    scrollbar-width: thin;
    scrollbar-color: rgba(245, 179, 1, .62) rgba(255, 255, 255, .055);
}

.premium-table-wrap::-webkit-scrollbar {
    height: 12px;
    width: 12px;
}

.premium-table-wrap::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, .045);
    border-radius: 999px;
    margin: 8px;
}

.premium-table-wrap::-webkit-scrollbar-thumb {
    border: 3px solid transparent;
    border-radius: 999px;
    background:
        linear-gradient(135deg, #f5b301, #ffc93c) border-box;
}

.premium-table-wrap::-webkit-scrollbar-thumb:hover {
    background:
        linear-gradient(135deg, #ffc93c, #ffe08a) border-box;
}

.premium-table {
    border-collapse: separate;
    border-spacing: 0;
}

.premium-table th,
.premium-table td {
    height: 50px;
    vertical-align: middle;
}

.staff-table th,
.staff-table td {
    white-space: nowrap;
}

.workload-scroll {
    max-width: 100%;
    border-radius: 14px;
}

.workload-table {
    min-width: 1320px;
}

.workload-table th,
.workload-table td {
    text-align: center;
}

.workload-table .user-cell,
.workload-table .sticky-name {
    text-align: left;
}

.sticky-col {
    position: sticky;
    z-index: 3;
    background: #141416;
}

th.sticky-col {
    z-index: 5;
    background: #19191c;
}

.sticky-name {
    left: 0;
    min-width: 180px;
    width: 180px;
}

.sticky-group {
    left: 180px;
    min-width: 92px;
    width: 92px;
    box-shadow: 1px 0 0 rgba(255, 255, 255, .07);
}

.day-head {
    min-width: 46px;
    color: #a5a5ab;
}

.day-cell {
    min-width: 46px;
    font-weight: 800;
}

.day-empty {
    color: #5f5f66;
}

.day-zero {
    color: #ff8585;
    background: rgba(255, 107, 107, .055);
}

.day-ok {
    color: #ffc93c;
    background: rgba(245, 179, 1, .045);
}

.nd-head,
.nd-cell {
    min-width: 58px;
}

.nd-cell {
    color: #ffd76a;
    font-weight: 900;
    background: rgba(245, 179, 1, .075);
}

.workload-table tbody tr:hover .sticky-col {
    background: #181817;
}

.workload-table tbody tr:hover .day-ok {
    background: rgba(245, 179, 1, .08);
}

@media (max-width: 900px) {
    .mode-sections { gap: 18px; }
    .mode-section-head { align-items: center; }
    .sticky-name {
        min-width: 150px;
        width: 150px;
    }
    .sticky-group {
        left: 150px;
        min-width: 78px;
        width: 78px;
    }
}

/* ============================================================
   Premium motion polish
   Smooth, restrained animation for a cleaner SaaS feel.
   ============================================================ */
:root {
    --ease-premium: cubic-bezier(.22, 1, .36, 1);
    --ease-snappy: cubic-bezier(.2, .8, .2, 1);
    --motion-fast: 140ms;
    --motion: 240ms;
    --motion-slow: 520ms;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        linear-gradient(115deg, transparent 0%, rgba(245, 179, 1, .035) 34%, transparent 58%),
        radial-gradient(520px 260px at 18% 14%, rgba(255, 201, 60, .035), transparent 70%);
    opacity: .82;
    transform: translateZ(0);
    animation: premium-ambient 18s var(--ease-premium) infinite alternate;
}

@keyframes premium-ambient {
    from { opacity: .58; transform: translate3d(-10px, -8px, 0) scale(1); }
    to { opacity: .9; transform: translate3d(10px, 8px, 0) scale(1.025); }
}

@keyframes premium-enter {
    from { opacity: 0; transform: translate3d(0, 10px, 0); }
    to { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes premium-modal {
    from { opacity: 0; transform: translate3d(0, 12px, 0) scale(.985); }
    to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}

.content > *,
.auth-card {
    animation: premium-enter var(--motion-slow) var(--ease-premium) both;
}

.content > *:nth-child(2) { animation-delay: 45ms; }
.content > *:nth-child(3) { animation-delay: 90ms; }
.content > *:nth-child(4) { animation-delay: 135ms; }

.card,
.tile,
.shop-item,
.manual-card,
.notif-item,
.review-card,
.member-row,
.icon-btn,
.btn,
.chip,
.tab,
.nav-item,
input,
select,
textarea {
    transition:
        transform var(--motion) var(--ease-premium),
        border-color var(--motion) var(--ease-premium),
        background var(--motion) var(--ease-premium),
        box-shadow var(--motion) var(--ease-premium),
        color var(--motion-fast) ease,
        opacity var(--motion-fast) ease,
        filter var(--motion-fast) ease;
}

.card,
.tile,
.shop-item,
.manual-card,
.review-card,
.member-row {
    will-change: transform;
}

.card:hover,
.tile:hover,
.shop-item:hover,
.manual-card:hover {
    transform: translate3d(0, -3px, 0);
    box-shadow:
        0 22px 54px rgba(0, 0, 0, .42),
        0 0 0 1px rgba(245, 179, 1, .045);
}

.tile:hover {
    box-shadow:
        0 22px 58px rgba(0, 0, 0, .44),
        0 0 34px rgba(245, 179, 1, .055);
}

.btn:hover,
.icon-btn:hover,
.chip:hover,
.tab:hover,
.nav-item:hover {
    transform: translate3d(0, -1px, 0);
}

.btn:active,
.icon-btn:active,
.chip:active,
.tab:active,
.nav-item:active {
    transform: translate3d(0, 0, 0) scale(.985);
}

.btn-primary,
.sidebar-cta,
.tab.active,
.chip.active {
    position: relative;
    overflow: hidden;
}

.btn-primary::after,
.sidebar-cta::after,
.tab.active::after,
.chip.active::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, transparent 0%, rgba(255, 255, 255, .22) 42%, transparent 68%);
    transform: translateX(-120%);
    transition: transform 680ms var(--ease-premium);
}

.btn-primary:hover::after,
.sidebar-cta:hover::after,
.tab.active:hover::after,
.chip.active:hover::after {
    transform: translateX(120%);
}

.nav-item.active {
    box-shadow: inset 0 0 0 1px rgba(245, 179, 1, .06);
}

.nav-item.active::before {
    animation: premium-accent-line 2.8s ease-in-out infinite alternate;
}

@keyframes premium-accent-line {
    from { opacity: .72; box-shadow: 0 0 10px rgba(245, 179, 1, .20); }
    to { opacity: 1; box-shadow: 0 0 22px rgba(245, 179, 1, .40); }
}

.modal-overlay.open {
    animation: fade var(--motion) ease both;
}

.modal-overlay.open .modal {
    animation: premium-modal var(--motion-slow) var(--ease-premium) both;
}

.tab-panel.active {
    animation: premium-enter 360ms var(--ease-premium) both;
}

.media-detail-card {
    transition:
        transform 300ms var(--ease-premium),
        opacity 220ms ease,
        border-color var(--motion) var(--ease-premium),
        box-shadow var(--motion) var(--ease-premium);
}

.media-detail-card.open {
    box-shadow:
        0 32px 90px rgba(0, 0, 0, .62),
        0 0 0 1px rgba(245, 179, 1, .07);
}

input:hover,
select:hover,
textarea:hover,
.manual-rich-editor:hover {
    border-color: rgba(255, 255, 255, .15);
}

input:focus,
select:focus,
textarea:focus,
.manual-rich-editor:focus {
    transform: translate3d(0, -1px, 0);
}

tbody tr {
    transition:
        background var(--motion) var(--ease-premium),
        color var(--motion-fast) ease;
}

.circle-widget .fill {
    transition: stroke-dashoffset 720ms var(--ease-premium), filter var(--motion) ease;
}

.notif-dot {
    animation: premium-pulse 2.4s ease-in-out infinite;
}

@keyframes premium-pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 107, 107, .28); }
    50% { transform: scale(1.04); box-shadow: 0 0 0 6px rgba(255, 107, 107, 0); }
}

.flash,
.toast {
    animation: premium-enter 360ms var(--ease-premium) both;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 1ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 1ms !important;
    }
}

/* ============================================================
   Modern monochrome polish
   No emoji, no loud background spot, soft 1px #2A2A30 borders.
   ============================================================ */
:root,
[data-theme="light"],
[data-theme="dark"],
[data-accent="green"],
[data-accent="blue"],
[data-accent="purple"],
[data-accent="orange"] {
    --bg: #0d0d0f;
    --bg-2: #111114;
    --surface: #151519;
    --surface-2: #1a1a1f;
    --surface-3: #202026;
    --border: #2a2a30;
    --border-soft: rgba(42, 42, 48, .72);
    --text: #f4f4f2;
    --muted: #9b9ba3;
    --accent: #f5b301;
    --accent-2: #ffc93c;
    --accent-soft: rgba(245, 179, 1, .105);
    --accent-glow: rgba(245, 179, 1, .22);
}

body {
    background:
        linear-gradient(180deg, #141416 0%, #101012 38%, #0d0d0f 100%);
    background-attachment: fixed;
}

body::before {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .018), transparent 42%),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, .012) 0 1px, transparent 1px 80px);
    opacity: .52;
    animation: none;
}

.sidebar,
.topbar {
    border-color: var(--border);
}

.card,
.tile,
.auth-card,
.modal,
.table-wrap,
.tabs,
.shop-item,
.manual-toolbar,
.manual-rich-editor,
.punish-form,
.access-picker,
.form-command,
input,
select,
textarea {
    border-color: var(--border);
}

.card,
.tile,
.auth-card,
.modal {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .026), transparent 42%),
        linear-gradient(180deg, #17171b, #121215);
    box-shadow:
        0 18px 46px rgba(0, 0, 0, .34),
        inset 0 1px 0 rgba(255, 255, 255, .035);
}

.card:hover,
.tile:hover,
.shop-item:hover,
.manual-card:hover {
    border-color: #36363d;
    box-shadow:
        0 24px 62px rgba(0, 0, 0, .42),
        0 0 0 1px rgba(245, 179, 1, .035),
        inset 0 1px 0 rgba(255, 255, 255, .045);
}

.logo-mark,
.avatar,
.feature-ring,
.circle-widget svg {
    border: 1px solid rgba(255, 201, 60, .38);
    box-shadow:
        0 0 0 1px rgba(245, 179, 1, .10),
        0 0 28px rgba(245, 179, 1, .18);
}

.feature-ring {
    display: inline-grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background:
        radial-gradient(circle at center, rgba(245, 179, 1, .16), transparent 58%),
        #141416;
}

.feature-ring::before {
    content: "";
    width: 24px;
    height: 24px;
    border: 2px solid #ffc93c;
    border-radius: 50%;
    box-shadow: inset 0 0 14px rgba(245, 179, 1, .18);
}

.birthday-card {
    display: grid;
    justify-items: center;
    gap: 10px;
    margin-bottom: 16px;
    text-align: center;
}

.ico,
.top-icon,
.notif-icon,
.meta-eye {
    position: relative;
    display: inline-block;
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    color: currentColor;
}

.nav-item .ico {
    color: #c8c8cb;
    opacity: .9;
}

.nav-item.active .ico {
    color: #ffc93c;
    filter: drop-shadow(0 0 8px rgba(245, 179, 1, .30));
}

.ico::before,
.ico::after,
.top-icon::before,
.top-icon::after,
.notif-icon::before,
.notif-icon::after,
.meta-eye::before,
.meta-eye::after {
    content: "";
    position: absolute;
    box-sizing: border-box;
}

.ico-home::before {
    left: 4px;
    top: 8px;
    width: 12px;
    height: 9px;
    border: 1.7px solid currentColor;
    border-top: 0;
    border-radius: 2px;
}
.ico-home::after {
    left: 4px;
    top: 3px;
    width: 12px;
    height: 12px;
    border-left: 1.7px solid currentColor;
    border-top: 1.7px solid currentColor;
    transform: rotate(45deg);
    border-radius: 2px 0 0 0;
}

.ico-user::before {
    left: 7px;
    top: 3px;
    width: 7px;
    height: 7px;
    border: 1.7px solid currentColor;
    border-radius: 50%;
}
.ico-user::after {
    left: 4px;
    bottom: 2px;
    width: 13px;
    height: 7px;
    border: 1.7px solid currentColor;
    border-radius: 9px 9px 3px 3px;
}

.ico-card::before {
    inset: 4px 2px 5px;
    border: 1.7px solid currentColor;
    border-radius: 3px;
}
.ico-card::after {
    left: 4px;
    right: 4px;
    top: 8px;
    border-top: 1.7px solid currentColor;
}

.ico-shop::before {
    left: 4px;
    top: 7px;
    width: 12px;
    height: 10px;
    border: 1.7px solid currentColor;
    border-radius: 3px;
}
.ico-shop::after {
    left: 7px;
    top: 3px;
    width: 6px;
    height: 6px;
    border: 1.7px solid currentColor;
    border-bottom: 0;
    border-radius: 8px 8px 0 0;
}

.ico-users::before {
    left: 2px;
    top: 5px;
    width: 7px;
    height: 7px;
    border: 1.6px solid currentColor;
    border-radius: 50%;
    box-shadow: 8px 0 0 -1.6px #151519, 8px 0 0 0 currentColor;
}
.ico-users::after {
    left: 1px;
    bottom: 3px;
    width: 18px;
    height: 6px;
    border: 1.6px solid currentColor;
    border-radius: 8px 8px 3px 3px;
}

.ico-settings::before {
    inset: 4px;
    border: 1.7px solid currentColor;
    border-radius: 50%;
}
.ico-settings::after {
    left: 9px;
    top: 1px;
    width: 2px;
    height: 18px;
    background: currentColor;
    box-shadow: -6px 6px 0 -1px currentColor, 6px 6px 0 -1px currentColor;
    transform: rotate(45deg);
    opacity: .9;
}

.ico-media::before {
    inset: 3px;
    border: 1.7px solid currentColor;
    border-radius: 4px;
}
.ico-media::after {
    left: 8px;
    top: 6px;
    width: 0;
    height: 0;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    border-left: 6px solid currentColor;
}

.ico-chart::before {
    left: 4px;
    bottom: 4px;
    width: 13px;
    height: 12px;
    border-left: 1.7px solid currentColor;
    border-bottom: 1.7px solid currentColor;
}
.ico-chart::after {
    left: 6px;
    top: 5px;
    width: 10px;
    height: 8px;
    border-left: 1.7px solid currentColor;
    border-top: 1.7px solid currentColor;
    transform: skew(-20deg) rotate(135deg);
}

.ico-top::before {
    left: 5px;
    top: 3px;
    width: 10px;
    height: 9px;
    border: 1.7px solid currentColor;
    border-radius: 3px 3px 7px 7px;
}
.ico-top::after {
    left: 7px;
    bottom: 3px;
    width: 6px;
    height: 6px;
    border-bottom: 1.7px solid currentColor;
    border-left: 1.7px solid currentColor;
    border-right: 1.7px solid currentColor;
}

.ico-doc::before {
    inset: 3px 5px 2px 4px;
    border: 1.7px solid currentColor;
    border-radius: 3px;
}
.ico-doc::after {
    right: 5px;
    top: 3px;
    width: 5px;
    height: 5px;
    border-left: 1.7px solid currentColor;
    border-bottom: 1.7px solid currentColor;
}

.ico-date::before {
    inset: 4px 3px 3px;
    border: 1.7px solid currentColor;
    border-radius: 3px;
}
.ico-date::after {
    left: 6px;
    right: 6px;
    top: 8px;
    border-top: 1.7px solid currentColor;
    box-shadow: 0 5px 0 -0.5px currentColor;
}

.top-icon-menu::before,
.top-icon-menu::after {
    left: 4px;
    width: 12px;
    border-top: 1.8px solid currentColor;
}
.top-icon-menu::before {
    top: 6px;
    box-shadow: 0 4px 0 currentColor;
}
.top-icon-menu::after { top: 14px; }

.top-icon-bell::before {
    left: 5px;
    top: 3px;
    width: 10px;
    height: 12px;
    border: 1.7px solid currentColor;
    border-radius: 8px 8px 4px 4px;
}
.top-icon-bell::after {
    left: 8px;
    bottom: 2px;
    width: 4px;
    height: 4px;
    border-bottom: 1.7px solid currentColor;
    border-radius: 50%;
}

.top-icon-theme::before {
    left: 4px;
    top: 3px;
    width: 13px;
    height: 13px;
    border: 1.7px solid currentColor;
    border-radius: 50%;
}
.top-icon-theme::after {
    left: 9px;
    top: 2px;
    width: 9px;
    height: 15px;
    background: #151519;
    border-radius: 50%;
}

.notif-icon {
    width: 38px;
    height: 38px;
    border: 1px solid rgba(255, 201, 60, .26);
    border-radius: 50%;
    color: #ffc93c;
    background: rgba(245, 179, 1, .08);
    box-shadow: 0 0 22px rgba(245, 179, 1, .12);
}
.notif-icon::before {
    inset: 10px;
    border: 1.8px solid currentColor;
    border-radius: 4px;
}
.notif-icon-status::before {
    left: 11px;
    top: 10px;
    width: 15px;
    height: 9px;
    border: 0;
    border-left: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(-45deg);
}
.notif-icon-punishment::before {
    left: 18px;
    top: 9px;
    width: 2px;
    height: 14px;
    background: currentColor;
    box-shadow: 0 18px 0 -0.5px currentColor;
}

.meta-eye {
    width: 16px;
    height: 12px;
    margin-right: 4px;
    vertical-align: -2px;
}
.meta-eye::before {
    inset: 1px 0;
    border: 1.4px solid currentColor;
    border-radius: 50%;
}
.meta-eye::after {
    left: 6px;
    top: 4px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: currentColor;
}

.alert-line-icon {
    position: relative;
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 8px;
    color: #ffc93c;
    vertical-align: -3px;
}

.alert-line-icon::before {
    content: "";
    position: absolute;
    left: 3px;
    top: 2px;
    width: 14px;
    height: 14px;
    border-left: 1.8px solid currentColor;
    border-bottom: 1.8px solid currentColor;
    transform: rotate(135deg);
    border-radius: 2px;
}

.alert-line-icon::after {
    content: "";
    position: absolute;
    left: 9px;
    top: 6px;
    width: 2px;
    height: 7px;
    background: currentColor;
    box-shadow: 0 9px 0 currentColor;
    border-radius: 2px;
}

.cal-cell {
    border-color: #2a2a30;
    background: #151519;
}
.cal-cell.has {
    color: #ffc93c;
    background:
        radial-gradient(circle at center, rgba(255, 201, 60, .18), rgba(245, 179, 1, .07));
    border-color: rgba(255, 201, 60, .30);
    box-shadow: 0 0 18px rgba(245, 179, 1, .10);
}
.cal-cell.zero {
    color: #7f7f86;
    background: #111114;
    border-color: #2a2a30;
}

.circle-widget .fill {
    stroke: #ffc93c;
    filter: drop-shadow(0 0 7px rgba(245, 179, 1, .36));
}

.circle-widget .track {
    stroke: #2a2a30;
}

.btn,
.icon-btn,
.tab,
.chip,
.nav-item {
    border-color: #2a2a30;
}

.btn-ghost,
.icon-btn,
.chip {
    background: linear-gradient(180deg, #18181c, #141417);
}

.btn-primary,
.sidebar-cta,
.tab.active,
.chip.active {
    box-shadow:
        0 12px 28px rgba(245, 179, 1, .18),
        inset 0 1px 0 rgba(255, 255, 255, .24);
}

/* Sidebar refinement */
.sidebar {
    padding: 20px 14px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .026), transparent 24%),
        linear-gradient(180deg, rgba(18, 18, 21, .96), rgba(10, 10, 12, .96));
    box-shadow:
        inset -1px 0 0 #2a2a30,
        18px 0 46px rgba(0, 0, 0, .18);
}

.sidebar::before {
    content: "";
    position: sticky;
    top: 0;
    display: block;
    height: 1px;
    margin: -20px -14px 18px;
    background: linear-gradient(90deg, transparent, rgba(255, 201, 60, .28), transparent);
}

.sidebar-logo {
    margin: 0 2px 18px;
    padding: 10px 10px 18px;
    border: 1px solid #24242a;
    border-radius: 16px;
    background:
        linear-gradient(135deg, rgba(245, 179, 1, .08), transparent 44%),
        rgba(255, 255, 255, .018);
}

.sidebar-logo .logo-mark {
    width: 38px;
    height: 38px;
    border-radius: 12px;
}

.nav-group {
    margin-bottom: 14px;
    padding: 6px;
    border: 1px solid rgba(42, 42, 48, .58);
    border-radius: 16px;
    background: rgba(255, 255, 255, .014);
}

.nav-group-title {
    padding: 8px 10px 7px;
}

.nav-item {
    min-height: 43px;
    padding: 10px 11px;
    margin-bottom: 3px;
    border-radius: 12px;
    background: transparent;
}

.nav-item:hover {
    color: #ffffff;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .018));
    border-color: #2f2f36;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035);
}

.nav-item.active {
    color: #ffffff;
    background:
        radial-gradient(circle at 18px 50%, rgba(255, 201, 60, .18), transparent 42%),
        linear-gradient(135deg, rgba(245, 179, 1, .16), rgba(245, 179, 1, .045));
    border-color: rgba(255, 201, 60, .24);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .06),
        0 0 0 1px rgba(245, 179, 1, .04),
        0 10px 26px rgba(245, 179, 1, .045);
}

.nav-item.active:hover {
    color: #ffffff;
    background:
        radial-gradient(circle at 20px 50%, rgba(255, 201, 60, .24), transparent 44%),
        linear-gradient(135deg, rgba(245, 179, 1, .20), rgba(245, 179, 1, .07));
    border-color: rgba(255, 201, 60, .34);
    transform: translate3d(2px, 0, 0);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .08),
        0 0 0 1px rgba(245, 179, 1, .06),
        0 12px 30px rgba(245, 179, 1, .075);
}

.nav-item.active::before {
    left: -7px;
    top: 9px;
    bottom: 9px;
    width: 3px;
    border-radius: 999px;
}

.sidebar-cta {
    margin: 2px 6px 16px;
    width: calc(100% - 12px);
    border: 1px solid rgba(255, 201, 60, .26);
}

.sidebar-profile {
    margin: auto 6px 0;
    background:
        linear-gradient(135deg, rgba(255, 201, 60, .055), transparent 38%),
        linear-gradient(180deg, #17171b, #111114);
    border-color: #2a2a30;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035);
}

.sidebar-profile:hover {
    transform: translate3d(0, -1px, 0);
    border-color: rgba(255, 201, 60, .26);
}

/* ============================================================
   Full redesign layer
   Obsidian command dashboard: cleaner hierarchy, deeper surfaces,
   refined gold accent, modern spacing and motion.
   ============================================================ */
:root,
[data-theme="light"],
[data-theme="dark"],
[data-accent="green"],
[data-accent="blue"],
[data-accent="purple"],
[data-accent="orange"] {
    --bg: #09090b;
    --bg-2: #0d0d10;
    --surface: #121216;
    --surface-2: #18181d;
    --surface-3: #202027;
    --border: #2a2a30;
    --border-soft: rgba(42, 42, 48, .62);
    --text: #f7f7f4;
    --muted: #9d9da6;
    --accent: #f2b705;
    --accent-2: #ffd76a;
    --accent-soft: rgba(242, 183, 5, .12);
    --accent-glow: rgba(242, 183, 5, .23);
    --accent-ink: #151106;
    --red: #ff6b72;
    --orange: #ffd76a;
    --green: #ffd76a;
    --radius: 18px;
    --radius-sm: 12px;
    --sidebar-w: 300px;
    --shadow: 0 22px 64px rgba(0, 0, 0, .36);
    --shadow-lg: 0 34px 100px rgba(0, 0, 0, .58);
    --ease-premium: cubic-bezier(.22, 1, .36, 1);
}

* {
    scrollbar-width: thin;
    scrollbar-color: rgba(242, 183, 5, .55) rgba(255, 255, 255, .05);
}

body {
    color: var(--text);
    background:
        linear-gradient(180deg, #101014 0%, #0b0b0e 48%, #080809 100%);
    letter-spacing: 0;
}

body::before {
    background:
        linear-gradient(90deg, rgba(255, 255, 255, .018) 1px, transparent 1px),
        linear-gradient(180deg, rgba(255, 255, 255, .014) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, .55), transparent 70%);
    opacity: .42;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(520px 220px at 50% -8%, rgba(242, 183, 5, .07), transparent 70%),
        linear-gradient(180deg, transparent, rgba(0, 0, 0, .22));
}

h1 {
    font-size: clamp(30px, 2.5vw, 42px);
    letter-spacing: -.01em;
}

h2 {
    font-size: 20px;
    letter-spacing: -.005em;
}

.layout {
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-w);
    padding: 18px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .04), transparent 18%),
        rgba(10, 10, 12, .94);
    border-right: 1px solid var(--border);
    box-shadow:
        inset -1px 0 0 rgba(255, 255, 255, .025),
        24px 0 70px rgba(0, 0, 0, .30);
}

.sidebar::before {
    display: none;
}

.sidebar-logo {
    min-height: 76px;
    margin: 0 0 18px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background:
        radial-gradient(circle at 18% 20%, rgba(242, 183, 5, .16), transparent 38%),
        linear-gradient(135deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .018));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .06),
        0 18px 44px rgba(0, 0, 0, .24);
}

.logo-mark {
    width: 44px;
    height: 44px;
    border-radius: 15px;
    background:
        linear-gradient(135deg, #ffd76a 0%, #f2b705 58%, #b97a00 100%);
    box-shadow:
        0 0 0 1px rgba(255, 215, 106, .22),
        0 16px 32px rgba(242, 183, 5, .18);
}

.logo-text {
    font-size: 16px;
    letter-spacing: -.01em;
}

.logo-text .beta {
    display: inline-flex;
    margin-left: 4px;
    padding: 2px 6px;
    border: 1px solid rgba(255, 215, 106, .18);
    border-radius: 999px;
    color: #ffd76a;
    background: rgba(242, 183, 5, .08);
    font-size: 10px;
}

.nav-group {
    margin-bottom: 12px;
    padding: 8px;
    border: 1px solid rgba(42, 42, 48, .72);
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .026), rgba(255, 255, 255, .01));
}

.nav-group-title {
    padding: 7px 10px 9px;
    color: #73737d;
    font-size: 10px;
    letter-spacing: .12em;
}

.nav-item {
    min-height: 44px;
    margin: 0 0 4px;
    padding: 10px 12px;
    border: 1px solid transparent;
    border-radius: 14px;
    color: #b7b7bf;
    background: transparent;
}

.nav-item:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, .045);
    border-color: rgba(255, 255, 255, .06);
    transform: translate3d(2px, 0, 0);
}

.nav-item.active,
.nav-item.active:hover {
    color: #ffffff;
    background:
        linear-gradient(135deg, rgba(242, 183, 5, .20), rgba(242, 183, 5, .075)),
        rgba(255, 255, 255, .018);
    border-color: rgba(255, 215, 106, .28);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .07),
        0 14px 34px rgba(242, 183, 5, .075);
}

.nav-item.active::before {
    left: -9px;
    top: 10px;
    bottom: 10px;
    width: 4px;
    background: linear-gradient(180deg, #ffd76a, #f2b705);
    box-shadow: 0 0 22px rgba(242, 183, 5, .45);
}

.nav-item .ico {
    opacity: .92;
}

.nav-item.active .ico {
    color: #ffd76a;
}

.sidebar-cta {
    width: 100%;
    margin: 2px 0 16px;
    min-height: 48px;
    border-radius: 16px;
    background:
        linear-gradient(135deg, #ffd76a, #f2b705);
    box-shadow:
        0 16px 36px rgba(242, 183, 5, .16),
        inset 0 1px 0 rgba(255, 255, 255, .35);
}

.sidebar-profile {
    margin: auto 0 0;
    padding: 13px;
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(242, 183, 5, .07), transparent 42%),
        rgba(255, 255, 255, .026);
}

.main-area {
    margin-left: var(--sidebar-w);
}

.topbar {
    min-height: 76px;
    padding: 16px 36px;
    background: rgba(9, 9, 11, .72);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 18px 46px rgba(0, 0, 0, .18);
}

.topbar-title {
    color: #7b7b84;
    font-size: 12px;
    letter-spacing: .14em;
}

.content {
    max-width: 1360px;
    padding: 38px;
}

.page-head {
    margin-bottom: 30px;
}

.page-head h1 {
    margin-bottom: 10px;
}

.page-head p {
    color: #a2a2aa;
}

.icon-btn {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .018));
    border-color: var(--border);
}

.icon-btn:hover {
    border-color: rgba(255, 215, 106, .24);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .065), rgba(255, 255, 255, .024));
    box-shadow: 0 12px 28px rgba(0, 0, 0, .22);
}

.grid {
    gap: 22px;
}

.card,
.tile,
.auth-card,
.modal {
    border-radius: 22px;
    border: 1px solid var(--border);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .018)),
        #121216;
    box-shadow:
        0 22px 70px rgba(0, 0, 0, .34),
        inset 0 1px 0 rgba(255, 255, 255, .045);
}

.card {
    padding: 26px;
}

.card h2 {
    margin-bottom: 20px;
}

.card:hover,
.tile:hover {
    transform: translate3d(0, -2px, 0);
    border-color: #36363f;
}

.tile {
    min-height: 128px;
    padding: 24px;
    background:
        radial-gradient(circle at 18% 18%, rgba(242, 183, 5, .13), transparent 36%),
        linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .014)),
        #121216;
}

.tile .label {
    color: #92929c;
    font-size: 12px;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.tile .value {
    margin-top: 2px;
    font-size: clamp(24px, 2vw, 32px);
}

.table-wrap {
    border-radius: 18px;
    border: 1px solid var(--border);
    background: #111115;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035);
}

table {
    font-size: 14px;
}

th {
    height: 48px;
    color: #85858f;
    background: #17171c;
}

td {
    height: 52px;
    border-bottom-color: rgba(42, 42, 48, .70);
}

tbody tr:hover {
    background: rgba(242, 183, 5, .045);
}

input,
select,
textarea,
.manual-rich-editor {
    min-height: 44px;
    border-radius: 14px;
    border-color: var(--border);
    background: #0d0d10;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .025);
}

input:hover,
select:hover,
textarea:hover {
    border-color: #373740;
}

input:focus,
select:focus,
textarea:focus,
.manual-rich-editor:focus {
    border-color: rgba(255, 215, 106, .42);
    box-shadow:
        0 0 0 4px rgba(242, 183, 5, .10),
        inset 0 1px 0 rgba(255, 255, 255, .04);
}

.btn {
    min-height: 44px;
    border-radius: 14px;
}

.btn-sm {
    min-height: 38px;
    border-radius: 12px;
}

.btn-primary {
    color: var(--accent-ink);
    background: linear-gradient(135deg, #ffd76a, #f2b705);
    box-shadow:
        0 16px 34px rgba(242, 183, 5, .17),
        inset 0 1px 0 rgba(255, 255, 255, .32);
}

.btn-ghost {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .016));
    border-color: var(--border);
}

.btn-ghost:hover {
    border-color: rgba(255, 215, 106, .22);
}

.tabs {
    gap: 7px;
    padding: 7px;
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, .012)),
        #111115;
}

.tab {
    border-radius: 13px;
}

.tab.active {
    background:
        linear-gradient(135deg, #ffd76a, #f2b705);
    box-shadow: 0 12px 28px rgba(242, 183, 5, .13);
}

.badge {
    border: 1px solid rgba(255, 255, 255, .055);
}

.badge-role,
.badge-green,
.badge-orange {
    color: #ffd76a;
    background: rgba(242, 183, 5, .10);
    border-color: rgba(255, 215, 106, .16);
}

.badge-admin {
    color: var(--accent-ink);
    border-color: rgba(255, 215, 106, .26);
}

.empty {
    border-radius: 20px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, .012));
}

.modal-overlay {
    background: rgba(0, 0, 0, .76);
}

.modal {
    border-radius: 24px;
}

.auth-card {
    border-radius: 26px;
}

.mode-sections {
    gap: 24px;
}

.mode-section-head {
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(42, 42, 48, .72);
}

.workload-table .sticky-col,
.sticky-col {
    background: #121216;
}

th.sticky-col {
    background: #17171c;
}

.day-ok {
    color: #ffd76a;
    background: rgba(242, 183, 5, .055);
}

.nd-cell {
    background: rgba(242, 183, 5, .09);
}

.cal {
    gap: 8px;
}

.cal-cell {
    border-radius: 12px;
    background: #121216;
}

.cal-cell.has {
    color: #ffd76a;
    background:
        radial-gradient(circle at 50% 50%, rgba(255, 215, 106, .22), rgba(242, 183, 5, .08));
    box-shadow: 0 0 20px rgba(242, 183, 5, .11);
}

.notif-icon,
.feature-ring {
    background:
        radial-gradient(circle at center, rgba(255, 215, 106, .16), rgba(242, 183, 5, .055));
}

.flash,
.toast {
    border-radius: 16px;
}

@media (max-width: 900px) {
    .sidebar {
        width: 292px;
    }

    .main-area {
        margin-left: 0;
    }

    .content {
        padding: 24px;
    }

    .topbar {
        padding: 12px 18px;
    }
}

@media (max-width: 560px) {
    .content {
        padding: 18px;
    }

    .card,
    .tile {
        padding: 20px;
        border-radius: 20px;
    }

    h1 {
        font-size: 28px;
    }
}

/* ============================================================
   Clean UI pass
   Removes gold blobs from navigation, simplifies icons,
   improves overall premium minimalism.
   ============================================================ */
.sidebar {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .028), transparent 20%),
        rgba(10, 10, 12, .96);
    box-shadow:
        inset -1px 0 0 #2a2a30,
        18px 0 52px rgba(0, 0, 0, .24);
}

.sidebar-logo {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .016)),
        #111115;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .045);
}

.logo-mark {
    color: #f7f7f4;
    background:
        linear-gradient(180deg, #1c1c21, #131317);
    border-color: #34343c;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .08),
        0 10px 24px rgba(0, 0, 0, .24);
}

.logo-text .beta {
    color: #bdbdc5;
    background: #18181d;
    border-color: #2a2a30;
}

.nav-group {
    background: rgba(255, 255, 255, .012);
    box-shadow: none;
}

.nav-item,
.nav-item:hover,
.nav-item.active,
.nav-item.active:hover {
    box-shadow: none;
}

.nav-item:hover {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .02));
    border-color: #34343b;
}

.nav-item.active,
.nav-item.active:hover {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .065), rgba(255, 255, 255, .026));
    border-color: #44444d;
}

.nav-item.active::before {
    background: #f2b705;
    box-shadow: none;
}

.nav-item.active .ico {
    color: #f2b705;
    filter: none;
}

.sidebar-cta {
    background:
        linear-gradient(180deg, #f2b705, #d79c00);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .30),
        0 12px 24px rgba(0, 0, 0, .18);
}

.sidebar-profile {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .016)),
        #111115;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}

.ico,
.top-icon,
.notif-icon,
.meta-eye,
.alert-line-icon {
    stroke: currentColor;
    stroke-width: 1.8px;
}

.nav-item .ico {
    width: 21px;
    height: 21px;
    color: #a9a9b2;
    opacity: 1;
}

.ico::before,
.ico::after,
.top-icon::before,
.top-icon::after,
.notif-icon::before,
.notif-icon::after,
.meta-eye::before,
.meta-eye::after {
    border-color: currentColor;
    background-color: transparent;
}

.ico-settings::after,
.ico-chart::after {
    background: currentColor;
}

.ico-users::before {
    box-shadow: 8px 0 0 -1.6px #111115, 8px 0 0 0 currentColor;
}

.top-icon-theme {
    display: none;
}

.topbar-actions {
    gap: 10px;
}

.card,
.tile,
.auth-card,
.modal {
    box-shadow:
        0 20px 58px rgba(0, 0, 0, .30),
        inset 0 1px 0 rgba(255, 255, 255, .045);
}

.card:hover,
.tile:hover,
.shop-item:hover,
.manual-card:hover {
    box-shadow:
        0 22px 62px rgba(0, 0, 0, .34),
        inset 0 1px 0 rgba(255, 255, 255, .055);
}

.btn-primary,
.tab.active,
.chip.active {
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .28),
        0 12px 26px rgba(0, 0, 0, .18);
}

.tile,
.notif-icon,
.feature-ring,
.cal-cell.has {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}

body::after {
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .18));
}

/* ============================================================
   Violet accent pass
   Purple accent, cleaner notification icon, no glow on stat tiles.
   ============================================================ */
:root,
[data-theme="light"],
[data-theme="dark"],
[data-accent="green"],
[data-accent="blue"],
[data-accent="purple"],
[data-accent="orange"] {
    --accent: #8b5cf6;
    --accent-2: #a78bfa;
    --accent-soft: rgba(139, 92, 246, .12);
    --accent-glow: rgba(139, 92, 246, .18);
    --accent-ink: #f7f3ff;
    --green: #a78bfa;
    --orange: #c4b5fd;
}

a {
    color: #a78bfa;
}

.logo-text .beta,
.badge-role,
.badge-green,
.badge-orange,
.day-ok,
.nd-cell,
.cal-cell.has,
.circle-widget .fill,
.nav-item.active .ico,
.alert-line-icon,
.notif-icon,
.green,
.orange {
    color: #a78bfa;
}

.logo-mark,
.btn-primary,
.sidebar-cta,
.tab.active,
.chip.active,
.badge-admin {
    color: #f7f3ff;
    background: linear-gradient(135deg, #a78bfa, #7c3aed);
}

.btn-primary,
.sidebar-cta,
.tab.active,
.chip.active {
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .22),
        0 12px 26px rgba(0, 0, 0, .18);
}

.nav-item.active::before {
    background: #8b5cf6;
}

.nav-item.active,
.nav-item.active:hover {
    border-color: rgba(167, 139, 250, .28);
}

.sidebar-cta {
    border-color: rgba(167, 139, 250, .24);
}

.badge-role,
.badge-green,
.badge-orange,
.info-plate {
    background: rgba(139, 92, 246, .10);
    border-color: rgba(167, 139, 250, .16);
}

input:focus,
select:focus,
textarea:focus,
.manual-rich-editor:focus {
    border-color: rgba(167, 139, 250, .42);
    box-shadow:
        0 0 0 4px rgba(139, 92, 246, .10),
        inset 0 1px 0 rgba(255, 255, 255, .04);
}

.tile {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .042), rgba(255, 255, 255, .014)),
        #121216;
    box-shadow:
        0 18px 48px rgba(0, 0, 0, .28),
        inset 0 1px 0 rgba(255, 255, 255, .04);
}

.tile:hover {
    box-shadow:
        0 20px 52px rgba(0, 0, 0, .32),
        inset 0 1px 0 rgba(255, 255, 255, .05);
}

.tile .label {
    color: #8f8f99;
}

.tile .value {
    color: #f7f7f4;
}

.cal-cell.has {
    background:
        linear-gradient(180deg, rgba(139, 92, 246, .16), rgba(139, 92, 246, .06));
    border-color: rgba(167, 139, 250, .28);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}

.day-ok,
.nd-cell {
    background: rgba(139, 92, 246, .07);
}

.circle-widget .fill {
    stroke: #a78bfa;
    filter: none;
}

.notif-dot {
    background: #8b5cf6;
    box-shadow: 0 0 0 2px #101014;
}

.top-icon-bell {
    display: none;
}

.top-icon-inbox::before {
    left: 4px;
    top: 5px;
    width: 12px;
    height: 10px;
    border: 1.8px solid currentColor;
    border-radius: 3px;
}

.top-icon-inbox::after {
    left: 6px;
    top: 9px;
    width: 8px;
    height: 5px;
    border-left: 1.8px solid currentColor;
    border-bottom: 1.8px solid currentColor;
    border-right: 1.8px solid currentColor;
    border-radius: 0 0 5px 5px;
}

.notif-icon {
    color: #a78bfa;
    border-color: rgba(167, 139, 250, .24);
    background: rgba(139, 92, 246, .08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}

.feature-ring {
    border-color: rgba(167, 139, 250, .28);
    background:
        linear-gradient(180deg, rgba(139, 92, 246, .10), rgba(139, 92, 246, .035)),
        #141416;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}

.feature-ring::before {
    border-color: #a78bfa;
    box-shadow: none;
}

/* ============================================================
   Final violet cleanup + account progress redesign
   Removes remaining gold from avatars, scrollbars and widgets.
   ============================================================ */
:root,
[data-theme="light"],
[data-theme="dark"],
[data-accent="green"],
[data-accent="blue"],
[data-accent="purple"],
[data-accent="orange"] {
    --accent: #8b5cf6 !important;
    --accent-2: #a78bfa !important;
    --accent-soft: rgba(139, 92, 246, .12) !important;
    --accent-glow: rgba(139, 92, 246, .18) !important;
    --green: #a78bfa !important;
    --orange: #c4b5fd !important;
}

* {
    scrollbar-color: rgba(139, 92, 246, .58) rgba(255, 255, 255, .055);
}

*::-webkit-scrollbar-thumb,
.premium-table-wrap::-webkit-scrollbar-thumb,
.premium-table-wrap::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #8b5cf6, #a78bfa) border-box;
}

a,
.green,
.orange,
.badge-role,
.badge-green,
.badge-orange,
.nav-item.active .ico,
.day-ok,
.nd-cell,
.cal-cell.has,
.meta-eye,
.alert-line-icon,
.notif-icon {
    color: #a78bfa !important;
}

.logo-mark,
.avatar,
.avatar.lg,
.btn-primary,
.sidebar-cta,
.tab.active,
.chip.active,
.badge-admin {
    color: #f7f3ff !important;
    background:
        linear-gradient(135deg, #a78bfa 0%, #8b5cf6 58%, #6d28d9 100%) !important;
    border-color: rgba(167, 139, 250, .30) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .22),
        0 12px 28px rgba(0, 0, 0, .20) !important;
}

.avatar,
.avatar.lg {
    background:
        linear-gradient(135deg, #2a2238, #17141f) !important;
    color: #c4b5fd !important;
    border: 1px solid rgba(167, 139, 250, .28);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05) !important;
}

.nav-item.active::before,
.timeline-item::before {
    background: #8b5cf6 !important;
    box-shadow: none !important;
}

.nav-item.active,
.nav-item.active:hover {
    border-color: rgba(167, 139, 250, .30) !important;
}

.badge-role,
.badge-green,
.badge-orange,
.info-plate {
    background: rgba(139, 92, 246, .10) !important;
    border-color: rgba(167, 139, 250, .18) !important;
}

.tile {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .014)),
        #121216 !important;
    box-shadow:
        0 18px 48px rgba(0, 0, 0, .28),
        inset 0 1px 0 rgba(255, 255, 255, .04) !important;
}

.tile:hover {
    box-shadow:
        0 20px 52px rgba(0, 0, 0, .32),
        inset 0 1px 0 rgba(255, 255, 255, .05) !important;
}

.cal-cell.has {
    background:
        linear-gradient(180deg, rgba(139, 92, 246, .18), rgba(139, 92, 246, .065)) !important;
    border-color: rgba(167, 139, 250, .30) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04) !important;
}

.day-ok,
.nd-cell {
    background: rgba(139, 92, 246, .075) !important;
}

.circle-widget {
    display: none;
}

.circles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 14px;
    justify-content: stretch;
}

.progress-card {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 14px;
    padding: 15px;
    border: 1px solid #2a2a30;
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .016)),
        #111115;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .045);
}

.progress-orb {
    position: relative;
    display: grid;
    place-items: center;
    width: 66px;
    height: 66px;
    border-radius: 20px;
    background:
        conic-gradient(from 180deg, #8b5cf6 calc(var(--pct) * 1%), rgba(255, 255, 255, .08) 0),
        #15151a;
}

.progress-orb::before {
    content: "";
    position: absolute;
    inset: 6px;
    border-radius: 15px;
    background: #111115;
    border: 1px solid #2a2a30;
}

.progress-orb span {
    position: relative;
    z-index: 1;
    color: #f7f3ff;
    font-size: 15px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.progress-info {
    min-width: 0;
}

.progress-info b {
    display: block;
    margin-bottom: 2px;
    color: #f7f7f4;
    font-size: 14px;
}

.progress-track {
    height: 8px;
    margin-top: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, .065);
}

.progress-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #7c3aed, #a78bfa);
}

.notif-dot {
    background: #8b5cf6 !important;
}

.feature-ring,
.notif-icon {
    border-color: rgba(167, 139, 250, .28) !important;
    background: rgba(139, 92, 246, .08) !important;
}

.premium-table-wrap,
.table-wrap,
.sidebar,
.content {
    scrollbar-color: rgba(139, 92, 246, .58) rgba(255, 255, 255, .055) !important;
}

.premium-table-wrap::-webkit-scrollbar-thumb,
.table-wrap::-webkit-scrollbar-thumb,
.sidebar::-webkit-scrollbar-thumb,
.content::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #8b5cf6, #a78bfa) border-box !important;
}

.logo-mark,
.avatar,
.avatar.lg,
.sidebar-profile .avatar {
    background:
        linear-gradient(135deg, #2a2238, #17141f) !important;
    color: #c4b5fd !important;
    border-color: rgba(167, 139, 250, .28) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05) !important;
}

.fill,
.circle-widget .fill {
    stroke: #a78bfa !important;
    filter: none !important;
}

.progress-track span,
.progress-orb {
    filter: none !important;
}

.sidebar::before,
.auth-card::before {
    background: linear-gradient(90deg, transparent, rgba(139, 92, 246, .34), transparent) !important;
}

/* ============================================================
   Reference-inspired compact graphite UI
   Based on images/site: compact sidebar, graphite active states,
   large clean typography, no gold counters.
   ============================================================ */
:root,
[data-theme="light"],
[data-theme="dark"],
[data-accent="green"],
[data-accent="blue"],
[data-accent="purple"],
[data-accent="orange"] {
    --bg: #08080a !important;
    --bg-2: #0b0b0e !important;
    --surface: #111115 !important;
    --surface-2: #1b1b20 !important;
    --surface-3: #2b2b31 !important;
    --border: #24242a !important;
    --border-soft: #1d1d22 !important;
    --text: #f1f1f3 !important;
    --muted: #8d8d96 !important;
    --accent: #8f7cff !important;
    --accent-2: #b7a7ff !important;
    --accent-soft: rgba(143, 124, 255, .12) !important;
    --accent-glow: rgba(143, 124, 255, .14) !important;
    --sidebar-w: 218px !important;
    --radius: 12px !important;
    --radius-sm: 9px !important;
}

body {
    background: #08080a !important;
}

body::before,
body::after {
    opacity: 0 !important;
    display: none !important;
}

h1 {
    font-size: clamp(34px, 3vw, 52px) !important;
    font-weight: 800 !important;
    letter-spacing: -.025em !important;
}

h2 {
    font-size: 20px !important;
    letter-spacing: -.02em !important;
}

.sidebar {
    width: var(--sidebar-w) !important;
    padding: 8px !important;
    background: #151519 !important;
    border-right: 1px solid #27272d !important;
    box-shadow: none !important;
}

.main-area {
    margin-left: var(--sidebar-w) !important;
}

.sidebar-logo {
    min-height: 40px !important;
    margin: 0 0 14px !important;
    padding: 6px 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    gap: 8px !important;
}

.sidebar-logo .logo-mark {
    display: none !important;
}

.logo-text {
    font-size: 12px !important;
    font-weight: 800 !important;
}

.logo-text .beta {
    margin-left: 2px !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    color: #d8d8df !important;
    font-size: 11px !important;
}

.nav-group {
    margin-bottom: 14px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
}

.nav-group-title {
    padding: 7px 4px 6px !important;
    color: #e5e5ea !important;
    font-size: 15px !important;
    font-weight: 800 !important;
    letter-spacing: -.02em !important;
    text-transform: none !important;
}

.nav-item {
    min-height: 28px !important;
    margin: 0 0 3px !important;
    padding: 5px 7px !important;
    gap: 8px !important;
    border: 1px solid transparent !important;
    border-radius: 5px !important;
    color: #d1d1d7 !important;
    background: transparent !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    box-shadow: none !important;
    transform: none !important;
}

.nav-item:hover {
    color: #ffffff !important;
    background: #24242a !important;
    border-color: #303037 !important;
    transform: none !important;
    box-shadow: none !important;
}

.nav-item.active,
.nav-item.active:hover {
    color: #ffffff !important;
    background: #5b5b62 !important;
    border-color: #66666e !important;
    transform: none !important;
    box-shadow: none !important;
}

.nav-item.active::before {
    display: none !important;
}

.nav-item .ico {
    width: 15px !important;
    height: 15px !important;
    color: currentColor !important;
    filter: none !important;
}

.nav-item.active .ico {
    color: #ffffff !important;
}

.nav-item .badge-count,
.nav-item.active .badge-count,
.badge-count {
    min-width: 24px !important;
    height: 18px !important;
    margin-left: auto !important;
    padding: 1px 7px !important;
    border: 0 !important;
    border-radius: 999px !important;
    color: #ffffff !important;
    background: #34343a !important;
    box-shadow: none !important;
    font-size: 11px !important;
    font-weight: 800 !important;
}

.nav-item.active .badge-count {
    background: #3f3f46 !important;
}

.sidebar-cta {
    width: 100% !important;
    min-height: 34px !important;
    margin: auto 0 8px !important;
    border: 1px solid #303037 !important;
    border-radius: 8px !important;
    color: #f1f1f3 !important;
    background: #1d1d22 !important;
    box-shadow: none !important;
    font-size: 12px !important;
}

.sidebar-cta:hover {
    background: #26262c !important;
    border-color: #3a3a42 !important;
    filter: none !important;
}

.sidebar-profile {
    margin: 0 !important;
    padding: 8px !important;
    border: 0 !important;
    border-radius: 8px !important;
    background: transparent !important;
    box-shadow: none !important;
}

.sidebar-profile:hover {
    background: #202026 !important;
    transform: none !important;
}

.sidebar-profile .avatar {
    width: 22px !important;
    height: 22px !important;
    border-radius: 6px !important;
    font-size: 11px !important;
}

.sidebar-profile .who b {
    font-size: 12px !important;
}

.sidebar-profile .who small {
    font-size: 10px !important;
}

.topbar {
    min-height: 44px !important;
    padding: 6px 12px !important;
    background: transparent !important;
    border-bottom: 0 !important;
    box-shadow: none !important;
}

.topbar-title {
    display: none !important;
}

.topbar-actions {
    gap: 6px !important;
}

.icon-btn {
    width: 32px !important;
    height: 32px !important;
    border-radius: 7px !important;
    background: #151519 !important;
    border-color: #2a2a30 !important;
    box-shadow: none !important;
}

.icon-btn:hover {
    background: #222228 !important;
    border-color: #34343c !important;
    box-shadow: none !important;
}

.content {
    max-width: 1180px !important;
    padding: 28px 34px 42px !important;
    margin: 0 auto !important;
}

.page-head {
    margin: 0 0 22px !important;
    text-align: center !important;
}

.page-head p {
    margin: 6px auto 0 !important;
    color: #9a9aa3 !important;
}

.card,
.tile,
.auth-card,
.modal,
.table-wrap,
.tabs,
.shop-item,
.empty,
input,
select,
textarea {
    border-color: #24242a !important;
    border-radius: 10px !important;
    background: #111115 !important;
    box-shadow: none !important;
}

.card {
    padding: 18px !important;
}

.card:hover,
.tile:hover,
.shop-item:hover,
.manual-card:hover {
    border-color: #303037 !important;
    box-shadow: none !important;
    transform: none !important;
}

.tile {
    min-height: 104px !important;
    padding: 18px !important;
}

.tile .label {
    color: #8c8c95 !important;
    font-size: 12px !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
}

.tile .value {
    color: #f4f4f6 !important;
    font-size: 24px !important;
}

.grid {
    gap: 14px !important;
}

.table-wrap {
    overflow: auto !important;
}

th {
    background: #17171c !important;
    color: #8d8d96 !important;
}

td {
    border-bottom-color: #202026 !important;
}

tbody tr:hover {
    background: #17171c !important;
}

.btn {
    min-height: 36px !important;
    border-radius: 8px !important;
    box-shadow: none !important;
}

.btn-primary {
    color: #ffffff !important;
    background: #6d5dfc !important;
    border-color: #7c70ff !important;
    box-shadow: none !important;
}

.btn-primary:hover {
    background: #7c70ff !important;
    filter: none !important;
}

.btn-ghost {
    background: #1a1a1f !important;
    border-color: #2a2a30 !important;
}

.tabs {
    padding: 5px !important;
}

.tab {
    min-height: 32px !important;
    border-radius: 7px !important;
}

.tab.active {
    color: #ffffff !important;
    background: #5b5b62 !important;
    box-shadow: none !important;
}

.badge-role,
.badge-green,
.badge-orange,
.badge-soft,
.info-plate {
    color: #d7d2ff !important;
    background: #1a1824 !important;
    border-color: #2b2738 !important;
}

.avatar,
.avatar.lg,
.logo-mark {
    color: #d7d2ff !important;
    background: #1a1824 !important;
    border-color: #302a42 !important;
    box-shadow: none !important;
}

.premium-table-wrap,
.table-wrap,
.sidebar,
.content {
    scrollbar-color: #5b5b62 #151519 !important;
}

.premium-table-wrap::-webkit-scrollbar-thumb,
.table-wrap::-webkit-scrollbar-thumb,
.sidebar::-webkit-scrollbar-thumb,
.content::-webkit-scrollbar-thumb,
*::-webkit-scrollbar-thumb {
    background: #5b5b62 !important;
    border: 3px solid #151519 !important;
}

.progress-card {
    border-color: #24242a !important;
    border-radius: 10px !important;
    background: #111115 !important;
}

.progress-orb {
    border-radius: 10px !important;
    background:
        conic-gradient(from 180deg, #7568ff calc(var(--pct) * 1%), #292931 0),
        #151519 !important;
}

.progress-orb::before {
    border-radius: 7px !important;
    background: #111115 !important;
}

.progress-track span {
    background: #7568ff !important;
}

@media (max-width: 900px) {
    .sidebar {
        width: 218px !important;
    }
    .main-area {
        margin-left: 0 !important;
    }
    .content {
        padding: 22px 18px 34px !important;
    }
}

/* ============================================================
   Site reference pass
   Matches images/site layout while keeping existing templates alive.
   ============================================================ */
:root,
[data-theme="dark"],
[data-theme="light"] {
    --bg: #07070a !important;
    --bg-2: #111115 !important;
    --surface: #121216 !important;
    --surface-2: #1d1d22 !important;
    --surface-3: #37373d !important;
    --border: #2b2b31 !important;
    --border-soft: #202026 !important;
    --text: #f4f4f6 !important;
    --muted: #8b8b93 !important;
    --accent: #d8d6de !important;
    --accent-2: #ffffff !important;
    --accent-soft: rgba(255, 255, 255, .09) !important;
    --accent-glow: rgba(255, 255, 255, .10) !important;
    --sidebar-w: 160px !important;
    --radius: 9px !important;
    --radius-sm: 7px !important;
}

html,
body {
    min-width: 320px;
}

body {
    background: #07070a !important;
    color: #f4f4f6 !important;
    font-family: "Onest", "Inter", "Segoe UI", system-ui, sans-serif !important;
    font-size: 13px;
    letter-spacing: 0 !important;
}

.layout {
    background: #07070a;
}

.sidebar {
    width: var(--sidebar-w) !important;
    padding: 8px 6px !important;
    background: #17171b !important;
    border-right: 1px solid #2a2a31 !important;
}

.main-area {
    margin-left: var(--sidebar-w) !important;
}

.sidebar-logo {
    min-height: 28px !important;
    margin-bottom: 12px !important;
    padding: 0 2px !important;
}

.logo-text {
    color: #f7f7f8 !important;
    font-size: 10px !important;
    line-height: 1;
}

.logo-text .beta {
    color: #f7f7f8 !important;
    font-size: 10px !important;
}

.nav-group {
    margin-bottom: 12px !important;
}

.nav-group-title {
    padding: 5px 2px 5px !important;
    color: #f0f0f3 !important;
    font-size: 15px !important;
    font-weight: 800 !important;
    line-height: 1.1 !important;
}

.nav-item {
    min-height: 22px !important;
    margin-bottom: 2px !important;
    padding: 4px 7px !important;
    gap: 6px !important;
    border-radius: 5px !important;
    color: #e2e2e7 !important;
    font-size: 10px !important;
    font-weight: 700 !important;
}

.nav-item:hover,
.nav-item.active,
.nav-item.active:hover {
    background: #5c5c63 !important;
    border-color: #696970 !important;
    color: #ffffff !important;
}

.nav-item .ico {
    width: 12px !important;
    height: 12px !important;
    opacity: .9;
}

.nav-item .badge-count,
.badge-count {
    min-width: 24px !important;
    height: 17px !important;
    padding: 1px 6px !important;
    background: #34343a !important;
    color: #fff !important;
    font-size: 10px !important;
}

.sidebar-cta {
    min-height: 30px !important;
    margin: auto 0 8px !important;
    background: #202026 !important;
    border: 1px solid #36363e !important;
    border-radius: 7px !important;
    color: #f5f5f7 !important;
    font-size: 10px !important;
    font-weight: 800 !important;
}

.sidebar-profile {
    padding: 6px 2px !important;
    gap: 7px !important;
}

.sidebar-profile .avatar {
    width: 22px !important;
    height: 22px !important;
    border-radius: 6px !important;
}

.sidebar-profile .who b {
    color: #f4f4f6 !important;
    font-size: 11px !important;
}

.sidebar-profile .who small {
    color: #d2d2d8 !important;
    font-size: 9px !important;
}

.topbar {
    min-height: 34px !important;
    padding: 4px 10px !important;
}

.content {
    max-width: 1120px !important;
    padding: 18px 34px 34px !important;
}

h1 {
    color: #f5f5f7 !important;
    font-size: clamp(30px, 3.1vw, 46px) !important;
    font-weight: 900 !important;
    letter-spacing: 0 !important;
    line-height: 1.04 !important;
}

h2 {
    color: #f0f0f4 !important;
    font-size: 17px !important;
    font-weight: 900 !important;
    letter-spacing: 0 !important;
}

.page-head {
    margin-bottom: 14px !important;
    text-align: center !important;
}

.page-head p,
.muted {
    color: #92929b !important;
}

.card,
.tile,
.auth-card,
.modal,
.table-wrap,
.shop-item,
.empty {
    position: relative;
    overflow: hidden;
    border: 1px solid #2c2c33 !important;
    border-radius: 9px !important;
    background:
        linear-gradient(rgba(255, 255, 255, .018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .018) 1px, transparent 1px),
        #101014 !important;
    background-size: 18px 18px, 18px 18px, auto !important;
    box-shadow: none !important;
}

.card,
.tile {
    padding: 15px !important;
}

.tile .label {
    color: #9a9aa2 !important;
    font-size: 11px !important;
    font-weight: 700 !important;
}

.tile .value {
    color: #f5f5f7 !important;
    font-size: 32px !important;
    font-weight: 900 !important;
}

.grid {
    gap: 8px !important;
}

.grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

.grid-3,
.grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

input,
select,
textarea {
    min-height: 32px;
    border-color: #2f2f37 !important;
    border-radius: 6px !important;
    background: #17171c !important;
    color: #f2f2f5 !important;
    font-size: 12px !important;
}

input::placeholder,
textarea::placeholder {
    color: #777780 !important;
}

input:focus,
select:focus,
textarea:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, .22) !important;
}

.btn {
    min-height: 30px !important;
    padding: 7px 13px !important;
    border-radius: 6px !important;
    font-size: 11px !important;
    font-weight: 900 !important;
}

.btn-primary {
    background: #e6e6ea !important;
    border: 1px solid #f1f1f4 !important;
    color: #24242a !important;
}

.btn-ghost {
    background: #202026 !important;
    border-color: #373740 !important;
    color: #f2f2f5 !important;
}

.info-plate,
.warn-plate {
    border-radius: 7px !important;
    background: #121217 !important;
    border-color: #303038 !important;
    color: #a7a7af !important;
    font-size: 11px !important;
}

.table-wrap {
    border-radius: 8px !important;
}

table {
    font-size: 11px !important;
}

th,
td {
    padding: 8px 9px !important;
    border-color: #24242a !important;
}

th {
    background: rgba(20, 20, 25, .96) !important;
    color: #a1a1aa !important;
    font-size: 9px !important;
}

td,
td b {
    color: #eeeeF2 !important;
    font-weight: 800;
}

tbody tr:hover {
    background: rgba(255, 255, 255, .035) !important;
}

.badge,
.chip {
    border-radius: 6px !important;
    font-size: 11px !important;
}

.badge-role,
.badge-soft,
.badge-green,
.badge-orange,
.badge-admin {
    color: #f4f4f6 !important;
    background: #34343a !important;
    border: 1px solid #46464e !important;
}

.empty {
    display: grid;
    min-height: 160px;
    place-items: center;
    color: #e5e5e8 !important;
    text-align: center;
    font-weight: 700;
}

.modal {
    max-width: 460px !important;
    padding: 20px !important;
}

.modal-overlay {
    background: rgba(0, 0, 0, .72) !important;
}

.flash {
    border-radius: 7px !important;
}

/* Main */
.page-main .content {
    display: grid;
    grid-template-columns: 350px minmax(0, 1fr);
    align-items: start;
    gap: 8px;
    max-width: 1060px !important;
}

.page-main .page-head {
    grid-column: 1;
    text-align: center !important;
    margin: 8px 0 4px !important;
}

.page-main .page-head h1 {
    font-size: clamp(38px, 4.8vw, 58px) !important;
    color: #bdbdc3 !important;
}

.page-main .grid-4 {
    grid-column: 1;
    grid-template-columns: 1fr !important;
}

.page-main .grid-4 .tile {
    min-height: 46px !important;
    display: grid;
    grid-template-columns: 38px 1fr;
    align-items: center;
    column-gap: 9px;
}

.page-main .grid-4 .tile::before {
    content: "";
    width: 24px;
    height: 24px;
    grid-row: 1 / span 3;
    border-radius: 7px;
    background: rgba(255, 255, 255, .08);
    box-shadow: 0 0 18px rgba(255, 255, 255, .10);
}

.page-main .grid-4 .tile .value {
    font-size: 12px !important;
}

.page-main .content > .grid-4 + .grid-2 {
    grid-column: 2;
    grid-row: 1;
    margin-top: 10px !important;
}

.page-main .content > .grid-4 + .grid-2 .tile {
    min-height: 122px !important;
}

.page-main .content > .grid-4 + .grid-2 .tile .label {
    color: #f1f1f4 !important;
    font-size: 17px !important;
}

.page-main .content > .grid-4 + .grid-2 .tile .value {
    margin-top: 12px;
    font-size: 42px !important;
}

.page-main .content > .grid-4 + .grid-2 + .grid-2 {
    grid-column: 1 / -1;
}

.page-main .content > .grid-4 + .grid-2 + .grid-2 .card:last-child {
    min-height: 310px;
}

/* Account */
.page-account .page-head {
    display: none !important;
}

.page-account .info-plate {
    width: fit-content;
    margin: 4px 0 8px;
}

.page-account .content > .grid-2 {
    grid-template-columns: 280px minmax(0, 1fr) !important;
    gap: 8px !important;
}

.page-account .card:first-child h1 {
    color: #c7c7cd !important;
    font-size: 34px !important;
}

.dl .row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 5px 0;
    border-bottom: 1px solid #24242a;
}

.dl dt {
    color: #8f8f98;
}

.dl dd {
    color: #f2f2f5;
    font-weight: 800;
}

.circles {
    grid-template-columns: repeat(3, minmax(110px, 1fr)) !important;
}

.progress-card {
    padding: 12px !important;
}

/* Staff and workload */
.page-staff .content,
.page-workload .content {
    max-width: none !important;
}

.page-staff .page-head,
.page-workload .page-head {
    display: block !important;
}

.page-staff .page-head h1,
.page-workload .page-head h1 {
    text-align: left;
    font-size: 32px !important;
}

.mode-sections {
    display: grid;
    gap: 8px;
}

.mode-section {
    padding: 0 !important;
}

.mode-section-head {
    padding: 10px 12px;
    border-bottom: 1px solid #24242a;
}

.mode-section-head p {
    display: none;
}

.premium-table-wrap,
.workload-scroll {
    max-height: calc(100vh - 160px);
}

.workload-table .day-cell,
.workload-table .day-head {
    min-width: 24px;
    text-align: center;
}

.day-ok,
.nd-cell {
    color: #22c55e !important;
    background: transparent !important;
}

.day-zero {
    color: #e11d48 !important;
}

/* Manuals */
.page-manuals .content {
    max-width: 1060px !important;
}

.page-manuals .chips {
    justify-content: flex-end;
    margin: -8px 0 14px;
}

.page-manuals .grid-3 {
    grid-template-columns: 1fr !important;
}

.page-manuals .manual-card {
    min-height: 92px;
    padding: 12px 14px !important;
}

.manual-meta {
    padding-top: 8px !important;
    border-top: 1px solid #24242a;
}

/* Tops */
.page-tops .main-area {
    position: relative;
}

.page-tops .main-area::before {
    content: "TOPS TOPS TOPS TOPS TOPS TOPS";
    position: fixed;
    top: -20px;
    right: -70px;
    width: 540px;
    color: rgba(255, 255, 255, .055);
    font-size: 42px;
    font-weight: 900;
    line-height: .95;
    transform: rotate(-16deg);
    pointer-events: none;
}

.page-tops .content {
    max-width: 520px !important;
    margin-right: 48px !important;
}

.page-tops .page-head {
    text-align: center !important;
}

.page-tops .page-head h1 {
    font-size: 42px !important;
}

.page-tops .info-plate {
    margin-bottom: 8px !important;
}

/* Wallet */
.page-wallet .content {
    max-width: 620px !important;
    text-align: center;
}

.page-wallet .page-head h1 {
    font-size: 42px !important;
}

.page-wallet .content > .tile {
    border: 0 !important;
    background: transparent !important;
}

.page-wallet .content > .tile .label {
    display: none;
}

.page-wallet .content > .tile .value {
    font-size: clamp(70px, 9vw, 94px) !important;
    line-height: .9;
}

.page-wallet .grid-2 .card {
    min-height: 130px;
    display: grid;
    place-items: center;
}

.page-wallet .grid-2 .card > div {
    color: #aaaab2;
    font-size: 54px !important;
    line-height: 1;
}

.page-wallet .warn-plate {
    border: 0 !important;
    background: transparent !important;
}

.page-wallet .content > .card {
    background: #333338 !important;
}

/* Auth */
.auth-wrap {
    background: #07070a;
}

.auth-card {
    max-width: 390px !important;
    padding: 28px !important;
}

.auth-head .logo-mark {
    display: none;
}

@media (max-width: 900px) {
    :root,
    [data-theme="dark"],
    [data-theme="light"] {
        --sidebar-w: 160px !important;
    }

    .main-area {
        margin-left: 0 !important;
    }

    .content,
    .page-tops .content,
    .page-wallet .content {
        max-width: 100% !important;
        margin: 0 !important;
        padding: 16px !important;
    }

    .page-main .content,
    .page-account .content > .grid-2 {
        display: block;
    }

    .grid-2,
    .grid-3,
    .grid-4,
    .page-main .grid-4 {
        grid-template-columns: 1fr !important;
    }

    h1 {
        font-size: 30px !important;
    }
}

/* ============================================================
   Readability polish pass
   Wider static sidebar, even cards, calmer readable surfaces.
   ============================================================ */
:root,
[data-theme="dark"],
[data-theme="light"] {
    --bg: #09090c !important;
    --bg-2: #121217 !important;
    --surface: #15151a !important;
    --surface-2: #1e1e25 !important;
    --surface-3: #2a2a32 !important;
    --border: #303039 !important;
    --border-soft: #25252d !important;
    --text: #f6f6f8 !important;
    --muted: #a2a2ac !important;
    --accent: #ececf1 !important;
    --accent-2: #ffffff !important;
    --accent-soft: rgba(255, 255, 255, .10) !important;
    --accent-glow: rgba(255, 255, 255, .08) !important;
    --sidebar-w: 236px !important;
    --radius: 12px !important;
    --radius-sm: 9px !important;
}

* {
    scrollbar-color: #6a6a73 #15151a !important;
}

body {
    background:
        linear-gradient(180deg, #0b0b0f 0%, #08080b 100%) !important;
    font-size: 14px !important;
    line-height: 1.48 !important;
}

a {
    color: #f1f1f5 !important;
    text-underline-offset: 3px;
}

a:hover {
    opacity: 1 !important;
    color: #ffffff !important;
}

.layout {
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-w) !important;
    padding: 14px 12px !important;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, .012)),
        #17171d !important;
    border-right: 1px solid #303038 !important;
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, .025) !important;
}

.main-area {
    margin-left: var(--sidebar-w) !important;
}

.sidebar-logo {
    min-height: 44px !important;
    margin: 0 0 18px !important;
    padding: 6px 8px !important;
    gap: 10px !important;
}

.sidebar-logo .logo-mark {
    display: grid !important;
    width: 30px !important;
    height: 30px !important;
    border-radius: 8px !important;
    color: #f7f7fa !important;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .10), rgba(255, 255, 255, .035)),
        #24242c !important;
    border: 1px solid #3a3a45 !important;
    font-size: 11px !important;
}

.logo-text,
.logo-text .beta {
    color: #f5f5f7 !important;
    font-size: 13px !important;
    font-weight: 900 !important;
}

.nav-group {
    margin-bottom: 18px !important;
}

.nav-group-title {
    padding: 0 8px 8px !important;
    color: #f2f2f5 !important;
    font-size: 14px !important;
    font-weight: 900 !important;
    line-height: 1.2 !important;
}

.nav-item {
    min-height: 36px !important;
    margin-bottom: 5px !important;
    padding: 8px 10px !important;
    gap: 10px !important;
    border: 1px solid transparent !important;
    border-radius: 8px !important;
    color: #d9d9df !important;
    background: transparent !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    line-height: 1.15 !important;
    transition: none !important;
}

.nav-item:hover {
    background: #222229 !important;
    border-color: #363640 !important;
    color: #ffffff !important;
}

.nav-item.active,
.nav-item.active:hover {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .11), rgba(255, 255, 255, .055)),
        #4b4b53 !important;
    border-color: #606069 !important;
    color: #ffffff !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08) !important;
}

.nav-item .ico {
    width: 18px !important;
    height: 18px !important;
    opacity: .96 !important;
    flex: 0 0 18px !important;
}

.nav-item .badge-count,
.badge-count {
    min-width: 30px !important;
    height: 20px !important;
    padding: 2px 8px !important;
    background: #33333b !important;
    color: #ffffff !important;
    font-size: 11px !important;
    line-height: 16px !important;
}

.sidebar-cta {
    min-height: 40px !important;
    margin: auto 0 10px !important;
    padding: 10px 12px !important;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .035)),
        #222229 !important;
    border: 1px solid #3b3b45 !important;
    border-radius: 10px !important;
    color: #f7f7fa !important;
    font-size: 13px !important;
    font-weight: 900 !important;
    transition: none !important;
}

.sidebar-profile {
    padding: 9px 8px !important;
    gap: 9px !important;
    border: 1px solid #2f2f38 !important;
    border-radius: 10px !important;
    background: #141419 !important;
}

.sidebar-profile .avatar {
    width: 30px !important;
    height: 30px !important;
    border-radius: 8px !important;
    font-size: 12px !important;
}

.sidebar-profile .who b {
    font-size: 13px !important;
}

.sidebar-profile .who small {
    font-size: 11px !important;
    color: #a9a9b2 !important;
}

.topbar {
    min-height: 50px !important;
    padding: 8px 22px !important;
    background: rgba(9, 9, 12, .72) !important;
    border-bottom: 1px solid rgba(255, 255, 255, .045) !important;
    backdrop-filter: blur(12px) !important;
}

.topbar-title {
    display: inline !important;
    color: #b8b8c1 !important;
    font-size: 12px !important;
}

.icon-btn {
    width: 36px !important;
    height: 36px !important;
    border-radius: 9px !important;
    background: #17171d !important;
    border-color: #33333c !important;
    transition: none !important;
}

.content {
    max-width: 1240px !important;
    padding: 28px 34px 44px !important;
}

h1 {
    font-size: clamp(32px, 3vw, 48px) !important;
    line-height: 1.08 !important;
    color: #f7f7f9 !important;
}

h2 {
    margin-bottom: 14px !important;
    font-size: 18px !important;
    line-height: 1.2 !important;
    color: #f3f3f6 !important;
}

.page-head {
    margin: 0 0 22px !important;
}

.page-head p {
    font-size: 14px !important;
}

.grid {
    gap: 14px !important;
}

.card,
.tile,
.auth-card,
.modal,
.table-wrap,
.tabs,
.shop-item,
.manual-card,
.empty,
.progress-card {
    border: 1px solid #303039 !important;
    border-radius: 12px !important;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .016)),
        #141419 !important;
    background-size: auto !important;
    box-shadow: none !important;
    transform: none !important;
    transition: none !important;
}

.card,
.tile,
.shop-item,
.manual-card {
    min-height: 124px;
    padding: 20px !important;
}

.card:hover,
.tile:hover,
.shop-item:hover,
.manual-card:hover {
    border-color: #3b3b45 !important;
    box-shadow: none !important;
    transform: none !important;
}

.tile {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.tile .label {
    margin-bottom: 8px !important;
    color: #adadb7 !important;
    font-size: 13px !important;
}

.tile .value {
    color: #f7f7fa !important;
    font-size: 30px !important;
    line-height: 1.12 !important;
}

.tile .sub {
    color: #a5a5ae !important;
    font-size: 12px !important;
}

.empty {
    min-height: 190px;
    padding: 24px !important;
    color: #dedee4 !important;
}

input,
select,
textarea {
    min-height: 38px !important;
    padding: 10px 12px !important;
    border-radius: 9px !important;
    border-color: #34343e !important;
    background: #101014 !important;
    color: #f5f5f8 !important;
    font-size: 13px !important;
}

.btn {
    min-height: 38px !important;
    padding: 9px 15px !important;
    border-radius: 9px !important;
    font-size: 13px !important;
    transition: none !important;
}

.btn-primary {
    color: #16161a !important;
    background: #f0f0f4 !important;
    border-color: #ffffff !important;
}

.btn-ghost {
    color: #f3f3f6 !important;
    background: #202027 !important;
    border-color: #383842 !important;
}

.badge,
.chip {
    border-radius: 8px !important;
    font-size: 12px !important;
    font-weight: 800 !important;
}

.info-plate,
.warn-plate,
.flash {
    padding: 12px 14px !important;
    border-radius: 10px !important;
    font-size: 13px !important;
}

table {
    font-size: 13px !important;
}

th,
td {
    padding: 10px 12px !important;
}

th {
    font-size: 11px !important;
}

/* Stable page layouts */
.page-main .content {
    grid-template-columns: minmax(330px, 380px) minmax(0, 1fr) !important;
    gap: 14px !important;
    max-width: 1180px !important;
}

.page-main .grid-4 {
    gap: 10px !important;
}

.page-main .grid-4 .tile {
    min-height: 82px !important;
    grid-template-columns: 44px 1fr !important;
}

.page-main .grid-4 .tile::before {
    width: 32px;
    height: 32px;
    border-radius: 9px;
}

.page-main .grid-4 .tile .label {
    font-size: 12px !important;
}

.page-main .grid-4 .tile .value {
    font-size: 16px !important;
}

.page-main .content > .grid-4 + .grid-2 .tile {
    min-height: 150px !important;
}

.page-main .content > .grid-4 + .grid-2 .tile .label {
    font-size: 18px !important;
}

.page-main .content > .grid-4 + .grid-2 .tile .value {
    font-size: 44px !important;
}

.page-main .content > .grid-4 + .grid-2 + .grid-2 .card {
    min-height: 330px;
}

.page-account .content > .grid-2 {
    grid-template-columns: minmax(320px, 390px) minmax(0, 1fr) !important;
    gap: 14px !important;
}

.page-account .card:first-child h1 {
    font-size: 38px !important;
}

.page-staff .content,
.page-workload .content {
    padding-top: 24px !important;
}

.mode-sections {
    gap: 14px !important;
}

.mode-section-head {
    padding: 14px 16px !important;
}

.premium-table-wrap,
.workload-scroll {
    max-height: calc(100vh - 190px);
}

.page-manuals .grid-3 {
    gap: 10px !important;
}

.page-manuals .manual-card {
    min-height: 118px;
}

.page-tops .content {
    max-width: 620px !important;
    margin-right: 70px !important;
}

.page-wallet .content {
    max-width: 700px !important;
}

.page-wallet .grid-2 {
    gap: 12px !important;
}

.page-wallet .grid-2 .card {
    min-height: 150px !important;
}

.page-wallet .content > .card {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .03)),
        #2d2d34 !important;
}

@media (max-width: 1100px) {
    :root,
    [data-theme="dark"],
    [data-theme="light"] {
        --sidebar-w: 220px !important;
    }

    .content {
        padding: 24px !important;
    }

    .page-main .content,
    .page-account .content > .grid-2 {
        grid-template-columns: 1fr !important;
    }

    .page-main .content > .grid-4 + .grid-2,
    .page-main .content > .grid-4 + .grid-2 + .grid-2 {
        grid-column: 1 !important;
        grid-row: auto !important;
    }
}

@media (max-width: 900px) {
    :root,
    [data-theme="dark"],
    [data-theme="light"] {
        --sidebar-w: 236px !important;
    }

    .sidebar {
        width: var(--sidebar-w) !important;
    }

    .main-area {
        margin-left: 0 !important;
    }

    .content,
    .page-tops .content,
    .page-wallet .content {
        padding: 18px !important;
    }

    .card,
    .tile,
    .shop-item,
    .manual-card {
        min-height: 112px;
        padding: 16px !important;
    }
}

/* ============================================================
   Fit and alignment pass
   Prevent progress, heatmaps and main-page stat cards from drifting.
   ============================================================ */
.content,
.card,
.tile,
.progress-card,
.progress-info,
.table-wrap,
.cal,
.month-nav {
    min-width: 0 !important;
}

.card,
.tile {
    overflow: hidden !important;
}

.card > *,
.tile > * {
    min-width: 0;
}

.tile .label,
.tile .value,
.tile .sub,
.progress-info b,
.progress-info small,
.page-head h1 {
    overflow-wrap: anywhere;
    word-break: normal;
}

/* Main page: stop the split layout from forcing cards into the center. */
.page-main .content {
    display: block !important;
    max-width: 1180px !important;
}

.page-main .page-head {
    display: block !important;
    margin: 0 0 20px !important;
    text-align: left !important;
}

.page-main .page-head h1 {
    max-width: 100% !important;
    color: #f7f7f9 !important;
    font-size: clamp(28px, 3.2vw, 44px) !important;
}

.page-main .grid-4 {
    grid-column: auto !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 12px !important;
    margin-bottom: 14px !important;
}

.page-main .grid-2 {
    grid-column: auto !important;
    grid-row: auto !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
    margin-top: 0 !important;
    margin-bottom: 14px !important;
}

.page-main .grid-4 .tile,
.page-main .content > .grid-4 + .grid-2 .tile,
.page-main .content > .grid-4 + .grid-2 + .grid-2 .card {
    min-height: 118px !important;
}

.page-main .grid-4 .tile {
    display: flex !important;
    grid-template-columns: none !important;
}

.page-main .grid-4 .tile::before {
    display: none !important;
}

.page-main .grid-4 .tile .label,
.page-main .content > .grid-4 + .grid-2 .tile .label {
    font-size: clamp(11px, 1.1vw, 13px) !important;
}

.page-main .grid-4 .tile .value,
.page-main .grid-4 .tile .value[style],
.page-main .content > .grid-4 + .grid-2 .tile .value {
    margin-top: 0 !important;
    font-size: clamp(18px, 2vw, 28px) !important;
    line-height: 1.12 !important;
}

.page-main .grid-4 .tile .sub {
    margin-top: 6px !important;
}

.page-main .content > .grid-4 + .grid-2 + .grid-2 .empty {
    min-height: 180px !important;
}

/* Account page: give the right column room and make progress stack instead of squeezing. */
.page-account .content {
    max-width: 1280px !important;
}

.page-account .content > .grid-2 {
    grid-template-columns: minmax(300px, 360px) minmax(560px, 1fr) !important;
    align-items: start !important;
    gap: 14px !important;
}

.page-account .content > .grid-2 > .grid {
    min-width: 0 !important;
}

.page-account .circles {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
}

.progress-card {
    display: grid !important;
    grid-template-columns: 52px minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 10px !important;
    min-height: 76px !important;
    padding: 10px !important;
    overflow: hidden !important;
}

.progress-orb {
    width: 52px !important;
    height: 52px !important;
    border-radius: 12px !important;
}

.progress-orb::before {
    inset: 5px !important;
    border-radius: 9px !important;
}

.progress-orb span {
    font-size: 12px !important;
    line-height: 1 !important;
}

.progress-info {
    overflow: hidden !important;
}

.progress-info b {
    display: block !important;
    margin-bottom: 1px !important;
    color: #f4f4f7 !important;
    font-size: 13px !important;
    line-height: 1.15 !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.progress-info small {
    display: block !important;
    color: #aaaab3 !important;
    font-size: 11px !important;
    line-height: 1.2 !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.progress-track {
    height: 6px !important;
    margin-top: 8px !important;
}

/* Heatmap: fixed equal cells that shrink with the card. */
.month-nav {
    display: grid !important;
    grid-template-columns: minmax(74px, auto) minmax(0, 1fr) minmax(74px, auto) !important;
    gap: 8px !important;
    align-items: center !important;
    margin-bottom: 12px !important;
}

.month-nav .name {
    min-width: 0 !important;
    color: #f1f1f4 !important;
    font-size: clamp(12px, 1.2vw, 14px) !important;
    text-align: center !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.month-nav .btn {
    width: auto !important;
    min-width: 0 !important;
    min-height: 30px !important;
    padding: 6px 9px !important;
    font-size: 11px !important;
    white-space: nowrap;
}

.cal {
    display: grid !important;
    grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
    gap: clamp(3px, .55vw, 7px) !important;
    width: 100% !important;
}

.cal .dow {
    min-width: 0 !important;
    padding-bottom: 2px !important;
    color: #9d9da7 !important;
    font-size: clamp(9px, .9vw, 11px) !important;
    text-align: center !important;
}

.cal-cell {
    min-width: 0 !important;
    width: 100% !important;
    aspect-ratio: 1 / 1 !important;
    border-radius: clamp(5px, .7vw, 9px) !important;
    font-size: clamp(10px, 1vw, 12px) !important;
    line-height: 1 !important;
    transform: none !important;
}

.cal-cell:hover {
    transform: none !important;
}

/* Workload table: keep day columns narrow and predictable. */
.workload-table {
    table-layout: fixed !important;
}

.workload-table th,
.workload-table td {
    overflow: hidden;
    text-overflow: ellipsis;
}

.workload-table .day-head,
.workload-table .day-cell {
    width: 28px !important;
    min-width: 28px !important;
    max-width: 28px !important;
    padding: 7px 4px !important;
    text-align: center !important;
}

.workload-table .nd-head,
.workload-table .nd-cell {
    width: 38px !important;
    min-width: 38px !important;
    max-width: 38px !important;
    text-align: center !important;
}

@media (max-width: 1280px) {
    .page-account .content > .grid-2 {
        grid-template-columns: minmax(280px, 340px) minmax(480px, 1fr) !important;
    }

    .page-main .grid-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 1050px) {
    .page-account .content > .grid-2 {
        grid-template-columns: 1fr !important;
    }

    .page-account .circles {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }

    .progress-card {
        grid-template-columns: 46px minmax(0, 1fr) !important;
    }

    .progress-orb {
        width: 46px !important;
        height: 46px !important;
    }
}

@media (max-width: 760px) {
    .page-main .grid-4,
    .page-main .grid-2,
    .page-account .circles {
        grid-template-columns: 1fr !important;
    }

    .tile .value,
    .page-main .grid-4 .tile .value,
    .page-main .grid-4 .tile .value[style],
    .page-main .content > .grid-4 + .grid-2 .tile .value {
        font-size: 22px !important;
    }

    .month-nav {
        grid-template-columns: 1fr !important;
    }

    .month-nav .btn {
        width: 100% !important;
    }
}

/* ============================================================
   Workload/tops/manual detail cleanup
   Compact equal day cells, centered tops, optional nocopy marks.
   ============================================================ */
.page-workload .content {
    max-width: none !important;
    padding-left: 24px !important;
    padding-right: 24px !important;
}

.page-workload .mode-section {
    overflow: hidden !important;
}

.page-workload .premium-table-wrap,
.page-workload .workload-scroll {
    max-height: calc(100vh - 180px) !important;
    overflow: auto !important;
}

.workload-table {
    width: max-content !important;
    min-width: 1040px !important;
    table-layout: fixed !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
}

.workload-table th,
.workload-table td {
    height: 26px !important;
    padding: 0 6px !important;
    font-size: 11px !important;
    line-height: 26px !important;
    vertical-align: middle !important;
}

.workload-table .sticky-name {
    width: 132px !important;
    min-width: 132px !important;
    max-width: 132px !important;
}

.workload-table .sticky-group {
    width: 58px !important;
    min-width: 58px !important;
    max-width: 58px !important;
}

.workload-table th:nth-child(3),
.workload-table td:nth-child(3) {
    width: 92px !important;
    min-width: 92px !important;
    max-width: 92px !important;
}

.workload-table .day-head,
.workload-table .day-cell {
    width: 24px !important;
    min-width: 24px !important;
    max-width: 24px !important;
    height: 24px !important;
    padding: 0 !important;
    text-align: center !important;
    line-height: 24px !important;
    font-size: 10px !important;
    font-weight: 800 !important;
}

.workload-table .day-cell {
    background-clip: padding-box !important;
}

.workload-table .day-ok,
.workload-table .day-zero,
.workload-table .day-empty {
    color: inherit;
    border-radius: 0 !important;
}

.workload-table .day-ok {
    color: #33d17a !important;
}

.workload-table .day-zero {
    color: #ef476f !important;
}

.workload-table .day-empty {
    color: #676773 !important;
}

.workload-table .nd-head,
.workload-table .nd-cell {
    width: 34px !important;
    min-width: 34px !important;
    max-width: 34px !important;
    height: 24px !important;
    padding: 0 !important;
    line-height: 24px !important;
    font-size: 10px !important;
}

.workload-table .user-cell,
.workload-table .user-cell b {
    font-size: 11px !important;
}

.page-tops .main-area::before {
    content: none !important;
    display: none !important;
}

.page-tops .content {
    max-width: 760px !important;
    margin: 0 auto !important;
    padding-left: 28px !important;
    padding-right: 28px !important;
}

.page-tops .page-head {
    display: block !important;
    text-align: center !important;
    margin-bottom: 18px !important;
}

.page-tops .page-head h1 {
    font-size: clamp(34px, 4vw, 48px) !important;
}

.page-tops .page-head .btn,
.page-tops .page-head button {
    margin-top: 12px !important;
}

.page-tops .info-plate {
    display: block !important;
    margin: 0 0 10px !important;
    padding: 13px 15px !important;
    text-align: left !important;
}

.page-tops .card {
    margin-top: 16px !important;
}

.page-tops .table-wrap {
    border-radius: 10px !important;
}

.page-tops table {
    table-layout: fixed !important;
}

.page-tops th,
.page-tops td {
    white-space: nowrap !important;
}

.manual-view-controls {
    display: flex;
    justify-content: flex-end;
    margin: 0 0 14px;
}

.manual-view-controls .btn {
    width: auto !important;
}

.manual-body.hide-nocopy-marks .manual-nocopy {
    border-bottom-color: transparent !important;
    background: transparent !important;
    box-shadow: none !important;
}

@media (max-width: 900px) {
    .page-workload .content,
    .page-tops .content {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    .page-tops .page-head .btn,
    .page-tops .page-head button,
    .manual-view-controls .btn {
        width: 100% !important;
    }

    .manual-view-controls {
        justify-content: stretch;
    }
}

/* ============================================================
   Tiny workload + no purple pass
   Smaller production grids, visible dates, neutral accents only.
   ============================================================ */
:root,
[data-theme="dark"],
[data-theme="light"],
[data-accent="green"],
[data-accent="blue"],
[data-accent="purple"],
[data-accent="orange"] {
    --accent: #d7d7dc !important;
    --accent-2: #f4f4f6 !important;
    --accent-soft: rgba(255, 255, 255, .075) !important;
    --accent-glow: rgba(255, 255, 255, .06) !important;
    --green: #7ee0a1 !important;
    --orange: #c9c9d1 !important;
}

.logo-mark,
.avatar,
.avatar.lg,
.btn-primary,
.sidebar-cta,
.tab.active,
.chip.active,
.badge-admin,
.progress-track span,
.progress-orb {
    background: #e8e8ec !important;
    color: #151519 !important;
    border-color: #f4f4f6 !important;
    box-shadow: none !important;
}

.avatar,
.avatar.lg,
.sidebar-profile .avatar,
.badge-role,
.badge-green,
.badge-orange,
.badge-soft,
.info-plate,
.feature-ring,
.notif-icon {
    color: #eeeeF2 !important;
    background: #24242b !important;
    border-color: #3a3a43 !important;
}

a,
.green,
.orange,
.nav-item.active .ico,
.day-ok,
.nd-cell,
.cal-cell.has,
.meta-eye,
.alert-line-icon {
    color: #eeeeF2 !important;
}

input:focus,
select:focus,
textarea:focus,
.manual-rich-editor:focus {
    border-color: #cfcfd6 !important;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, .08) !important;
}

.page-workload .premium-table-wrap,
.page-workload .workload-scroll {
    max-height: calc(100vh - 158px) !important;
}

.workload-table {
    min-width: 850px !important;
}

.workload-table th,
.workload-table td {
    height: 18px !important;
    padding: 0 4px !important;
    font-size: 9px !important;
    line-height: 18px !important;
}

.workload-table .sticky-name {
    width: 108px !important;
    min-width: 108px !important;
    max-width: 108px !important;
}

.workload-table .sticky-group {
    width: 42px !important;
    min-width: 42px !important;
    max-width: 42px !important;
}

.workload-table th:nth-child(3),
.workload-table td:nth-child(3) {
    width: 74px !important;
    min-width: 74px !important;
    max-width: 74px !important;
}

.workload-table .day-head,
.workload-table .day-cell {
    width: 17px !important;
    min-width: 17px !important;
    max-width: 17px !important;
    height: 17px !important;
    padding: 0 !important;
    font-size: 8px !important;
    line-height: 17px !important;
}

.workload-table .nd-head,
.workload-table .nd-cell {
    width: 24px !important;
    min-width: 24px !important;
    max-width: 24px !important;
    height: 17px !important;
    padding: 0 !important;
    font-size: 8px !important;
    line-height: 17px !important;
}

.workload-table .day-empty {
    color: transparent !important;
    background: transparent !important;
    border-color: transparent !important;
}

.workload-table .day-empty::selection {
    color: transparent;
}

.workload-table .user-cell,
.workload-table .user-cell b {
    font-size: 9px !important;
}

.workload-table tbody tr:hover,
.workload-table tbody tr:hover .sticky-col,
.workload-table tbody tr:hover .day-empty {
    background: rgba(255, 255, 255, .025) !important;
}

.page-account .cal {
    grid-template-columns: repeat(7, 22px) !important;
    justify-content: center !important;
    gap: 4px !important;
}

.page-account .cal .dow {
    width: 22px !important;
    height: 12px !important;
    padding: 0 !important;
    font-size: 8px !important;
    line-height: 12px !important;
}

.page-account .cal-cell {
    width: 22px !important;
    min-width: 22px !important;
    max-width: 22px !important;
    height: 22px !important;
    min-height: 22px !important;
    aspect-ratio: auto !important;
    padding: 1px !important;
    border-radius: 5px !important;
    font-size: 8px !important;
    line-height: 1 !important;
}

.cal-cell.empty {
    visibility: hidden !important;
    border-color: transparent !important;
    background: transparent !important;
}

.cal-cell:not(.has):not(.zero) {
    border-color: transparent !important;
    background: transparent !important;
    color: #70707a !important;
}

.cal-date,
.cal-count {
    display: block;
    text-align: center;
    line-height: 1;
}

.cal-date {
    color: #9b9ba5;
    font-size: 7px;
    font-weight: 800;
}

.cal-count {
    margin-top: 1px;
    color: #f2f2f5;
    font-size: 9px;
    font-weight: 900;
}

.cal-cell.zero .cal-count {
    color: #ef476f;
}

.cal-cell.has .cal-count {
    color: #7ee0a1;
}

@media (max-width: 760px) {
    .page-account .cal {
        grid-template-columns: repeat(7, 20px) !important;
        gap: 3px !important;
    }

    .page-account .cal .dow,
    .page-account .cal-cell {
        width: 20px !important;
        min-width: 20px !important;
        max-width: 20px !important;
    }

    .page-account .cal-cell {
        height: 20px !important;
        min-height: 20px !important;
    }
}

/* Final neutral override for old violet declarations kept earlier in the file. */
*::-webkit-scrollbar-thumb,
.premium-table-wrap::-webkit-scrollbar-thumb,
.premium-table-wrap::-webkit-scrollbar-thumb:hover,
.table-wrap::-webkit-scrollbar-thumb,
.sidebar::-webkit-scrollbar-thumb,
.content::-webkit-scrollbar-thumb {
    background: #6a6a73 !important;
    border-color: #15151a !important;
}

.nav-item.active::before,
.timeline-item::before,
.notif-dot {
    background: #d7d7dc !important;
    box-shadow: none !important;
}

.circle-widget .fill,
.fill {
    stroke: #d7d7dc !important;
    filter: none !important;
}

.cal-cell.has,
.day-ok,
.nd-cell {
    color: #7ee0a1 !important;
}

.feature-ring::before,
.feature-ring,
.notif-icon {
    border-color: #3a3a43 !important;
    background: #24242b !important;
    color: #eeeeF2 !important;
    box-shadow: none !important;
}

.btn-primary:hover,
.chip.active,
.tab.active,
.sidebar-cta:hover {
    background: #f4f4f6 !important;
    color: #151519 !important;
    border-color: #ffffff !important;
}

/* ============================================================
   Account page final layout
   No tops/workload here, aligned cards, cleaner progress.
   ============================================================ */
.page-account .content {
    max-width: 1180px !important;
    padding-top: 28px !important;
}

.page-account .page-head {
    display: block !important;
    margin-bottom: 18px !important;
    text-align: left !important;
}

.page-account .page-head h1 {
    font-size: clamp(32px, 3vw, 44px) !important;
}

.page-account .info-plate {
    width: 100% !important;
    margin: 0 0 16px !important;
}

.account-layout {
    display: grid;
    grid-template-columns: minmax(360px, 430px) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.account-column {
    display: grid;
    gap: 16px;
    min-width: 0;
}

.page-account .card {
    min-height: auto !important;
    padding: 20px !important;
}

.page-account .card h2 {
    margin-bottom: 14px !important;
}

.page-account .dl {
    gap: 0 !important;
}

.page-account .dl .row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(110px, auto) !important;
    gap: 14px !important;
    align-items: center;
    min-height: 34px;
    padding: 8px 0 !important;
    border-top: 0 !important;
    border-bottom: 1px solid #282831 !important;
}

.page-account .dl .row:last-child {
    border-bottom: 0 !important;
}

.page-account .dl dt {
    color: #a7a7b0 !important;
    font-size: 13px !important;
}

.page-account .dl dd {
    color: #f5f5f8 !important;
    font-size: 13px !important;
    font-weight: 900 !important;
    text-align: right;
    overflow-wrap: anywhere;
}

.account-progress-card {
    overflow: visible !important;
}

.account-progress-card .circles {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
}

.account-progress-card .progress-card {
    display: grid !important;
    grid-template-columns: 58px minmax(0, 1fr) !important;
    align-items: center !important;
    min-height: 74px !important;
    padding: 12px !important;
    border-radius: 10px !important;
    border-color: #34343d !important;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .014)),
        #111116 !important;
}

.account-progress-card .progress-orb {
    width: 46px !important;
    height: 46px !important;
    border-radius: 10px !important;
    background: #23232a !important;
    border: 1px solid #3a3a43 !important;
    color: #f5f5f8 !important;
}

.account-progress-card .progress-orb::before {
    display: none !important;
}

.account-progress-card .progress-orb span {
    color: #f5f5f8 !important;
    font-size: 12px !important;
    font-weight: 900 !important;
}

.account-progress-card .progress-info b {
    color: #f5f5f8 !important;
    font-size: 14px !important;
    line-height: 1.2 !important;
}

.account-progress-card .progress-info small {
    color: #a9a9b2 !important;
    font-size: 12px !important;
}

.account-progress-card .progress-track {
    height: 7px !important;
    margin-top: 9px !important;
    border-radius: 999px !important;
    background: #25252d !important;
}

.account-progress-card .progress-track span {
    background: #e6e6eb !important;
    border-radius: inherit !important;
}

.account-column-side .empty {
    min-height: 150px !important;
}

.account-column-side .timeline {
    min-height: 0 !important;
}

.account-column-side .timeline-item {
    padding: 11px 0 11px 16px !important;
}

@media (max-width: 1120px) {
    .account-layout {
        grid-template-columns: 1fr !important;
    }

    .account-progress-card .circles {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }

    .account-progress-card .progress-card {
        grid-template-columns: 48px minmax(0, 1fr) !important;
    }

    .account-progress-card .progress-orb {
        width: 42px !important;
        height: 42px !important;
    }
}

@media (max-width: 760px) {
    .page-account .content {
        padding: 18px !important;
    }

    .account-progress-card .circles {
        grid-template-columns: 1fr !important;
    }

    .page-account .dl .row {
        grid-template-columns: 1fr !important;
        gap: 3px !important;
    }

    .page-account .dl dd {
        text-align: left;
    }
}

/* ============================================================
   Workload readable restore
   Restore horizontal scrolling and readable day columns on workload page.
   ============================================================ */
.page-workload .content {
    max-width: none !important;
    padding-left: 28px !important;
    padding-right: 28px !important;
}

.page-workload .premium-table-wrap,
.page-workload .workload-scroll {
    width: 100% !important;
    max-height: calc(100vh - 178px) !important;
    overflow: auto !important;
    scrollbar-gutter: stable both-edges;
}

.page-workload .workload-table {
    width: max-content !important;
    min-width: 1320px !important;
    table-layout: auto !important;
    border-collapse: collapse !important;
}

.page-workload .workload-table th,
.page-workload .workload-table td {
    height: 30px !important;
    padding: 7px 8px !important;
    font-size: 12px !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
}

.page-workload .workload-table .sticky-name {
    width: 150px !important;
    min-width: 150px !important;
    max-width: 150px !important;
}

.page-workload .workload-table .sticky-group {
    width: 72px !important;
    min-width: 72px !important;
    max-width: 72px !important;
}

.page-workload .workload-table th:nth-child(3),
.page-workload .workload-table td:nth-child(3) {
    width: 118px !important;
    min-width: 118px !important;
    max-width: 118px !important;
}

.page-workload .workload-table .day-head,
.page-workload .workload-table .day-cell {
    width: 34px !important;
    min-width: 34px !important;
    max-width: 34px !important;
    height: 30px !important;
    padding: 7px 4px !important;
    font-size: 11px !important;
    line-height: 1.2 !important;
    text-align: center !important;
}

.page-workload .workload-table .nd-head,
.page-workload .workload-table .nd-cell {
    width: 44px !important;
    min-width: 44px !important;
    max-width: 44px !important;
    height: 30px !important;
    padding: 7px 4px !important;
    font-size: 11px !important;
    line-height: 1.2 !important;
    text-align: center !important;
}

.page-workload .workload-table .day-empty {
    color: #60606a !important;
    background: transparent !important;
    border-color: #24242a !important;
}

.page-workload .workload-table .day-ok {
    color: #33d17a !important;
}

.page-workload .workload-table .day-zero {
    color: #ef476f !important;
}

.page-workload .workload-table .user-cell,
.page-workload .workload-table .user-cell b {
    font-size: 12px !important;
}

.page-workload .workload-table tbody tr:hover,
.page-workload .workload-table tbody tr:hover .sticky-col {
    background: #17171c !important;
}

@media (max-width: 900px) {
    .page-workload .content {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }
}

/* ============================================================
   Notifications and topbar polish
   Cleaner right-side actions and notification list.
   ============================================================ */
.topbar-actions {
    gap: 8px !important;
}

.topbar-action-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 36px;
    padding: 8px 12px;
    border: 1px solid #34343d;
    border-radius: 10px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .018)),
        #15151a;
    color: #f3f3f6 !important;
    font-family: inherit;
    font-size: 13px;
    font-weight: 850;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    box-shadow: none !important;
    transition: none !important;
}

.topbar-action-btn:hover {
    border-color: #484852;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .075), rgba(255, 255, 255, .025)),
        #1d1d23;
    color: #ffffff !important;
}

.topbar-action-btn .top-icon {
    width: 18px !important;
    height: 18px !important;
    color: currentColor;
}

.topbar-logout-btn {
    min-width: 76px;
}

.notif-bell .notif-dot {
    top: -6px !important;
    right: -6px !important;
    min-width: 20px !important;
    height: 20px !important;
    padding: 0 6px !important;
    border: 2px solid #09090c !important;
    background: #e6e6eb !important;
    color: #151519 !important;
    font-size: 10px !important;
}

.page-notifications .content {
    max-width: 860px !important;
}

.notif-page-head {
    display: flex !important;
    align-items: flex-end !important;
    justify-content: space-between !important;
    gap: 16px !important;
    margin-bottom: 18px !important;
    text-align: left !important;
}

.notif-page-head h1 {
    margin: 0 0 5px !important;
}

.notif-page-head .badge {
    min-width: 42px;
    height: 30px;
    display: inline-grid;
    place-items: center;
    border-radius: 9px !important;
}

.notif-list {
    display: grid !important;
    gap: 10px !important;
}

.notif-item {
    display: grid !important;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 12px !important;
    align-items: start !important;
    min-height: 76px;
    padding: 14px !important;
    border: 1px solid #303039 !important;
    border-radius: 12px !important;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .014)),
        #141419 !important;
    box-shadow: none !important;
}

.notif-item.unread {
    border-color: #4a4a54 !important;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .018) 55%),
        #17171d !important;
}

.notif-icon {
    width: 42px !important;
    height: 42px !important;
    display: grid !important;
    place-items: center !important;
    border-radius: 11px !important;
    border: 1px solid #3a3a43 !important;
    background: #202027 !important;
    color: #eeeeF2 !important;
    box-shadow: none !important;
}

.notif-body {
    min-width: 0;
    display: grid !important;
    gap: 6px !important;
}

.notif-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.notif-title-row b {
    color: #f5f5f8;
    font-size: 15px;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.notif-status {
    flex: 0 0 auto;
    padding: 3px 8px;
    border: 1px solid #4a4a54;
    border-radius: 999px;
    background: #25252d;
    color: #f5f5f8;
    font-size: 11px;
    font-weight: 900;
}

.notif-text {
    white-space: pre-wrap;
    color: #b8b8c1;
    font-size: 13px;
    line-height: 1.45;
}

.notif-body small {
    color: #8f8f99;
    font-size: 11px;
}

.staff-table th:last-child,
.staff-table td:last-child {
    width: 160px;
}

.staff-table td:last-child a {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 9px;
    border: 1px solid #383842;
    border-radius: 8px;
    background: #1b1b21;
    color: #f3f3f6 !important;
    font-size: 12px;
    font-weight: 850;
}

@media (max-width: 760px) {
    .topbar-action-btn {
        min-width: 36px;
        padding: 8px 10px;
    }

    .topbar-action-btn span:not(.top-icon):not(.notif-dot) {
        display: none;
    }

    .topbar-logout-btn {
        min-width: 54px;
    }

    .topbar-logout-btn {
        font-size: 0;
    }

    .topbar-logout-btn::before {
        content: "Выйти";
        font-size: 12px;
    }

    .notif-page-head {
        align-items: flex-start !important;
    }

    .notif-item {
        grid-template-columns: 36px minmax(0, 1fr);
    }

    .notif-icon {
        width: 36px !important;
        height: 36px !important;
    }
}

/* ============================================================
   Manual reader/editor upgrades
   Full-width reader, copy fields and uploaded images.
   ============================================================ */
.page-manual_detail .content {
    max-width: none !important;
    width: 100% !important;
    padding: 24px 34px 44px !important;
}

.page-manual_detail .content > .card {
    width: 100% !important;
    max-width: none !important;
    min-height: calc(100vh - 120px) !important;
    padding: clamp(22px, 2.4vw, 34px) !important;
}

.page-manual_detail .manual-body {
    max-width: none !important;
    font-size: 15px;
}

.manual-view-controls {
    justify-content: flex-start !important;
    margin: 0 0 12px !important;
}

.manual-view-controls .btn {
    min-height: 30px !important;
    width: auto !important;
    padding: 6px 10px !important;
    border-radius: 8px !important;
    font-size: 11px !important;
}

.manual-copy-field {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: start;
    margin: 14px 0;
    padding: 12px;
    border: 1px solid #34343d;
    border-radius: 12px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .014)),
        #111116;
}

.manual-copy-text {
    min-height: 38px;
    margin: 0 !important;
    padding: 10px 12px !important;
    border: 1px solid #292931 !important;
    border-radius: 9px !important;
    background: #0c0c10 !important;
    color: #f4f4f7;
    white-space: pre-wrap !important;
    overflow-wrap: anywhere;
    font-family: "Courier New", monospace;
    font-size: 13px;
    line-height: 1.45;
}

.manual-copy-btn {
    min-height: 38px;
    padding: 8px 12px;
    border: 1px solid #3d3d46;
    border-radius: 9px;
    background: #e8e8ec;
    color: #151519;
    font-family: inherit;
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
}

.manual-copy-btn:hover {
    background: #f4f4f6;
}

.manual-body img,
.manual-rich-editor img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 14px 0;
    border: 1px solid #303039;
    border-radius: 12px;
    background: #101014;
}

.manual-rich-editor .manual-copy-field {
    user-select: text;
}

.manual-rich-editor .manual-copy-btn {
    pointer-events: none;
}

.manual-editor-widget .manual-tool[data-manual-copy-field],
.manual-editor-widget .manual-tool[data-manual-image] {
    min-width: 86px;
}

.manual-rich-editor img.is-selected {
    outline: 2px solid #e8e8ec;
    outline-offset: 3px;
}

.manual-image-panel {
    display: none;
    grid-template-columns: minmax(120px, 180px) minmax(120px, 170px) auto auto;
    gap: 8px;
    align-items: end;
    padding: 10px;
    border: 1px solid #34343d;
    border-radius: 10px;
    background: #111116;
}

.manual-image-panel.open {
    display: grid;
}

.manual-image-panel label {
    display: grid;
    gap: 5px;
    color: #a9a9b2;
    font-size: 12px;
    font-weight: 800;
}

.manual-image-panel input,
.manual-image-panel select {
    min-height: 34px !important;
    padding: 7px 9px !important;
    font-size: 12px !important;
}

.manual-tool-danger {
    color: #ffb4b4 !important;
    border-color: rgba(239, 71, 111, .42) !important;
    background: rgba(239, 71, 111, .10) !important;
}

.page-manual_edit .content > .card {
    max-width: 980px !important;
}

@media (max-width: 760px) {
    .page-manual_detail .content {
        padding: 16px !important;
    }

    .manual-copy-field {
        grid-template-columns: 1fr;
    }

    .manual-copy-btn {
        width: 100%;
    }

    .manual-image-panel {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   UI refresh pass
   Cleaner navigation, clearer icons and fixed workload scrolling.
   ============================================================ */
:root,
[data-theme="dark"] {
    --bg: #0b0d10;
    --bg-2: #101318;
    --surface: #151922;
    --surface-2: #1b202a;
    --border: #2a303a;
    --border-soft: #222832;
    --text: #f4f7fb;
    --muted: #9aa6b5;
    --accent: #49d17d;
    --accent-2: #22b86a;
    --accent-soft: rgba(73, 209, 125, .13);
    --accent-glow: rgba(73, 209, 125, .24);
    --sidebar-w: 276px;
    --radius: 12px;
    --radius-sm: 9px;
}

body {
    background:
        linear-gradient(135deg, rgba(73, 209, 125, .08), transparent 28%),
        radial-gradient(820px 520px at 96% 4%, rgba(67, 139, 255, .11), transparent 58%),
        #0b0d10 !important;
    font-family: "Onest", "Segoe UI", system-ui, -apple-system, sans-serif !important;
}

.layout {
    background: linear-gradient(180deg, rgba(255, 255, 255, .018), transparent 220px);
}

.sidebar {
    width: var(--sidebar-w) !important;
    padding: 18px 12px !important;
    gap: 8px !important;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .018)),
        rgba(11, 13, 16, .92) !important;
    border-right: 1px solid rgba(255, 255, 255, .08) !important;
    box-shadow: 18px 0 42px rgba(0, 0, 0, .24) !important;
}

.sidebar-logo {
    padding: 4px 8px 18px !important;
}

.logo-mark {
    width: 42px !important;
    height: 42px !important;
    border-radius: 10px !important;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .22), transparent),
        linear-gradient(135deg, #49d17d, #36a3ff) !important;
    color: #07100b !important;
    box-shadow: 0 10px 26px rgba(73, 209, 125, .22) !important;
}

.logo-text {
    color: #f8fafc !important;
    font-size: 14px !important;
    letter-spacing: 0 !important;
}

.logo-text .beta {
    color: #7f8b99 !important;
}

.nav-group {
    margin: 0 0 10px !important;
    padding: 6px !important;
    border: 1px solid rgba(255, 255, 255, .045);
    border-radius: 13px;
    background: rgba(255, 255, 255, .018);
}

.nav-group-title {
    padding: 5px 8px 7px !important;
    color: #7f8b99 !important;
    font-size: 10px !important;
    letter-spacing: .08em !important;
}

.nav-item {
    min-height: 40px !important;
    gap: 10px !important;
    padding: 8px 10px !important;
    border: 1px solid transparent !important;
    border-radius: 10px !important;
    color: #dce3ec !important;
    font-size: 13px !important;
    font-weight: 760 !important;
    line-height: 1.2 !important;
    transition: background .16s ease, border-color .16s ease, color .16s ease, transform .12s ease !important;
}

.nav-item:hover {
    background: rgba(255, 255, 255, .055) !important;
    border-color: rgba(255, 255, 255, .08) !important;
    color: #ffffff !important;
    opacity: 1 !important;
}

.nav-item.active {
    background:
        linear-gradient(135deg, rgba(73, 209, 125, .20), rgba(54, 163, 255, .10)),
        rgba(255, 255, 255, .035) !important;
    border-color: rgba(73, 209, 125, .34) !important;
    color: #f7fff9 !important;
}

.nav-item.active::before {
    left: -7px !important;
    width: 3px !important;
    height: 20px !important;
    border-radius: 99px !important;
    background: #49d17d !important;
}

.nav-item .badge-count {
    min-width: 26px !important;
    height: 22px !important;
    display: inline-grid !important;
    place-items: center !important;
    padding: 0 8px !important;
    border: 1px solid rgba(255, 255, 255, .08) !important;
    background: rgba(255, 255, 255, .055) !important;
    color: #c8d1dc !important;
}

.nav-item.active .badge-count {
    background: rgba(73, 209, 125, .16) !important;
    color: #8ff0b1 !important;
}

.sidebar-cta {
    min-height: 42px !important;
    margin: 2px 6px 10px !important;
    border: 1px solid rgba(73, 209, 125, .32) !important;
    border-radius: 10px !important;
    background:
        linear-gradient(135deg, #49d17d, #36a3ff) !important;
    color: #07100b !important;
    font-weight: 850 !important;
    box-shadow: 0 12px 28px rgba(73, 209, 125, .20) !important;
}

.sidebar-cta:hover {
    filter: brightness(1.05) !important;
    background: linear-gradient(135deg, #64e693, #58b4ff) !important;
    color: #06100a !important;
}

.sidebar-profile {
    margin: auto 6px 0 !important;
    padding: 10px !important;
    border-radius: 12px !important;
    background: rgba(255, 255, 255, .045) !important;
    border-color: rgba(255, 255, 255, .08) !important;
}

.sidebar-profile:hover {
    border-color: rgba(73, 209, 125, .35) !important;
}

.main-area {
    margin-left: var(--sidebar-w) !important;
}

.topbar {
    min-height: 66px !important;
    padding: 12px 26px !important;
    background: rgba(11, 13, 16, .78) !important;
    border-bottom-color: rgba(255, 255, 255, .075) !important;
}

.topbar-title {
    color: #c3ccd8 !important;
    font-size: 12px !important;
    letter-spacing: .08em !important;
}

.content {
    padding: 26px !important;
}

.card,
.tile,
.table-wrap,
.auth-card {
    border-color: rgba(255, 255, 255, .075) !important;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .016)),
        var(--surface) !important;
    box-shadow: 0 18px 46px rgba(0, 0, 0, .22) !important;
}

.btn,
.topbar-action-btn,
.icon-btn,
input,
select,
textarea {
    border-radius: 10px !important;
}

.topbar-action-btn,
.icon-btn {
    background: rgba(255, 255, 255, .055) !important;
    border-color: rgba(255, 255, 255, .09) !important;
    color: #edf3fa !important;
}

.topbar-action-btn:hover,
.icon-btn:hover {
    background: rgba(255, 255, 255, .09) !important;
    border-color: rgba(73, 209, 125, .35) !important;
}

.ico,
.top-icon {
    width: 20px !important;
    height: 20px !important;
}

.nav-item .ico {
    width: 28px !important;
    height: 28px !important;
    display: inline-grid !important;
    place-items: center !important;
    border: 1px solid rgba(255, 255, 255, .07) !important;
    border-radius: 8px !important;
    background: rgba(255, 255, 255, .045) !important;
    color: #cbd5e1 !important;
    opacity: 1 !important;
}

.nav-item.active .ico {
    color: #49d17d !important;
    border-color: rgba(73, 209, 125, .28) !important;
    background: rgba(73, 209, 125, .11) !important;
    filter: none !important;
}

.ico::before,
.top-icon::before {
    content: "" !important;
    position: static !important;
    display: block !important;
    width: 17px !important;
    height: 17px !important;
    background: currentColor !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    transform: none !important;
    -webkit-mask: var(--icon-mask) center / contain no-repeat;
    mask: var(--icon-mask) center / contain no-repeat;
}

.ico::after,
.top-icon::after {
    display: none !important;
}

.ico-home { --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M3 10.8 12 3l9 7.8V21h-6v-6H9v6H3V10.8Z'/%3E%3C/svg%3E"); }
.ico-user { --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 12a5 5 0 1 0 0-10 5 5 0 0 0 0 10Zm-9 9a9 9 0 0 1 18 0v1H3v-1Z'/%3E%3C/svg%3E"); }
.ico-card { --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M3 6h18a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2Zm0 4h18V8H3v2Zm3 5h5v-2H6v2Z'/%3E%3C/svg%3E"); }
.ico-shop { --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M7 4h10l1 4h3v2l-2 10H5L3 10V8h3l1-4Zm2 4h6l-.5-2h-5L9 8Zm-3 2 1.6 8h8.8L18 10H6Z'/%3E%3C/svg%3E"); }
.ico-users { --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M9 11a4 4 0 1 0 0-8 4 4 0 0 0 0 8Zm6.5 1a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7ZM2 21a7 7 0 0 1 14 0v1H2v-1Zm13.4-3.8A7.8 7.8 0 0 1 18 22h4v-1a6 6 0 0 0-6.6-5.97v2.17Z'/%3E%3C/svg%3E"); }
.ico-settings { --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='m19.4 13.5.1-1.5-.1-1.5 2.1-1.6-2-3.5-2.6 1a8 8 0 0 0-2.6-1.5L14 2h-4l-.4 2.9A8 8 0 0 0 7 6.4l-2.6-1-2 3.5 2.1 1.6-.1 1.5.1 1.5-2.1 1.6 2 3.5 2.6-1a8 8 0 0 0 2.6 1.5L10 22h4l.4-2.9a8 8 0 0 0 2.6-1.5l2.6 1 2-3.5-2.2-1.6ZM12 15.5a3.5 3.5 0 1 1 0-7 3.5 3.5 0 0 1 0 7Z'/%3E%3C/svg%3E"); }
.ico-media { --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 5h16a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2Zm6 4v6l6-3-6-3Z'/%3E%3C/svg%3E"); }
.ico-chart { --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 19h17v2H2V3h2v16Zm3-2V9h3v8H7Zm5 0V5h3v12h-3Zm5 0v-6h3v6h-3Z'/%3E%3C/svg%3E"); }
.ico-top { --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M7 3h10v3h4v3a6 6 0 0 1-5.4 6A5.8 5.8 0 0 1 13 16.7V20h4v2H7v-2h4v-3.3A5.8 5.8 0 0 1 8.4 15 6 6 0 0 1 3 9V6h4V3Zm0 5H5v1a4 4 0 0 0 2.3 3.6A9 9 0 0 1 7 10.4V8Zm12 0h-2v2.4a9 9 0 0 1-.3 2.2A4 4 0 0 0 19 9V8Z'/%3E%3C/svg%3E"); }
.ico-doc { --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M6 2h9l5 5v15H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2Zm8 1.5V8h4.5L14 3.5ZM8 12h8v2H8v-2Zm0 4h8v2H8v-2Z'/%3E%3C/svg%3E"); }
.ico-date { --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M7 2h2v3h6V2h2v3h4v17H3V5h4V2Zm12 9H5v9h14v-9ZM5 7v2h14V7H5Z'/%3E%3C/svg%3E"); }
.top-icon-menu { --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M3 6h18v2H3V6Zm0 5h18v2H3v-2Zm0 5h18v2H3v-2Z'/%3E%3C/svg%3E"); }
.top-icon-inbox { --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 4h16l2 10v6H2v-6L4 4Zm1.6 2-1.4 7H8l1.5 2h5L16 13h3.8l-1.4-7H5.6Z'/%3E%3C/svg%3E"); }

.page-workload .content {
    max-width: none !important;
    padding: 22px !important;
}

.page-workload .page-head {
    padding: 18px !important;
    border: 1px solid rgba(255, 255, 255, .075) !important;
    border-radius: 14px !important;
    background: rgba(255, 255, 255, .035) !important;
}

.page-workload .page-head form {
    align-items: center !important;
}

.page-workload .workload-section {
    padding: 16px !important;
    overflow: hidden !important;
}

.page-workload .premium-table-wrap,
.page-workload .workload-scroll {
    position: relative !important;
    width: 100% !important;
    max-height: calc(100vh - 210px) !important;
    overflow: auto !important;
    border-radius: 12px !important;
    border: 1px solid rgba(255, 255, 255, .075) !important;
    background: #0f1217 !important;
    scrollbar-gutter: stable !important;
}

.page-workload .workload-table {
    width: max-content !important;
    min-width: 1360px !important;
    table-layout: fixed !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
}

.page-workload .workload-table th,
.page-workload .workload-table td {
    height: 32px !important;
    padding: 0 8px !important;
    border-right: 1px solid rgba(255, 255, 255, .045) !important;
    border-bottom: 1px solid rgba(255, 255, 255, .045) !important;
    background: #11151c !important;
    color: #d7dee8 !important;
    font-size: 12px !important;
    line-height: 32px !important;
    white-space: nowrap !important;
}

.page-workload .workload-table thead th {
    position: sticky !important;
    top: 0 !important;
    z-index: 8 !important;
    background: #1a202a !important;
    color: #aeb8c6 !important;
}

.page-workload .workload-table .sticky-col {
    position: sticky !important;
    z-index: 7 !important;
    background: #151a22 !important;
}

.page-workload .workload-table th.sticky-col {
    z-index: 12 !important;
    background: #1d2430 !important;
}

.page-workload .workload-table .sticky-name {
    left: 0 !important;
    width: 168px !important;
    min-width: 168px !important;
    max-width: 168px !important;
    text-align: left !important;
}

.page-workload .workload-table .sticky-group {
    left: 168px !important;
    width: 74px !important;
    min-width: 74px !important;
    max-width: 74px !important;
    box-shadow: 8px 0 16px rgba(0, 0, 0, .22), 1px 0 0 rgba(255, 255, 255, .08) !important;
}

.page-workload .workload-table th:nth-child(3),
.page-workload .workload-table td:nth-child(3) {
    width: 132px !important;
    min-width: 132px !important;
    max-width: 132px !important;
    text-align: left !important;
}

.page-workload .workload-table .day-head,
.page-workload .workload-table .day-cell {
    width: 34px !important;
    min-width: 34px !important;
    max-width: 34px !important;
    padding: 0 !important;
    text-align: center !important;
    font-weight: 820 !important;
}

.page-workload .workload-table .nd-head,
.page-workload .workload-table .nd-cell {
    width: 48px !important;
    min-width: 48px !important;
    max-width: 48px !important;
    text-align: center !important;
}

.page-workload .workload-table .user-cell,
.page-workload .workload-table .user-cell b {
    color: #f4f7fb !important;
    font-size: 12px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.page-workload .workload-table .day-ok {
    color: #68e79d !important;
    background: rgba(73, 209, 125, .07) !important;
}

.page-workload .workload-table .day-zero {
    color: #ff7d8c !important;
    background: rgba(255, 90, 113, .08) !important;
}

.page-workload .workload-table .day-empty {
    color: #566171 !important;
    background: #10141b !important;
}

.page-workload .workload-table .nd-cell {
    color: #81b8ff !important;
    background: rgba(54, 163, 255, .10) !important;
    font-weight: 900 !important;
}

.page-workload .workload-table tbody tr:hover td,
.page-workload .workload-table tbody tr:hover .sticky-col {
    background: #18202a !important;
}

@media (max-width: 900px) {
    .sidebar {
        transform: translateX(-102%) !important;
    }

    .sidebar.open {
        transform: translateX(0) !important;
    }

    .main-area {
        margin-left: 0 !important;
    }

    .topbar {
        padding: 10px 14px !important;
    }

    .content,
    .page-workload .content {
        padding: 16px !important;
    }

    .page-workload .workload-table .sticky-name {
        width: 142px !important;
        min-width: 142px !important;
        max-width: 142px !important;
    }

    .page-workload .workload-table .sticky-group {
        left: 142px !important;
        width: 62px !important;
        min-width: 62px !important;
        max-width: 62px !important;
    }
}

@media (max-width: 640px) {
    .topbar-title {
        max-width: 42vw;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .page-workload .page-head form {
        width: 100%;
        display: grid !important;
        grid-template-columns: 1fr auto;
    }

    .page-workload .page-head form input {
        width: 100% !important;
    }
}

/* ============================================================
   Monochrome sidebar pass
   Strict black/white navigation without green accents.
   ============================================================ */
:root,
[data-theme="dark"] {
    --accent: #f4f4f5;
    --accent-2: #d4d4d8;
    --accent-soft: rgba(255, 255, 255, .10);
    --accent-glow: rgba(255, 255, 255, .12);
}

body {
    background:
        radial-gradient(900px 520px at 88% -10%, rgba(255, 255, 255, .055), transparent 62%),
        linear-gradient(180deg, #08080a, #0d0d10 42%, #09090b) !important;
}

.sidebar {
    width: 272px !important;
    padding: 16px 10px !important;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .018)),
        #08080a !important;
    border-right: 1px solid #242428 !important;
    box-shadow: 14px 0 36px rgba(0, 0, 0, .34) !important;
}

.sidebar-logo {
    padding: 6px 8px 14px !important;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
    margin-bottom: 6px;
}

.logo-mark {
    width: 40px !important;
    height: 40px !important;
    border-radius: 9px !important;
    background:
        linear-gradient(180deg, #ffffff, #c9c9cf) !important;
    color: #08080a !important;
    box-shadow: none !important;
}

.logo-text {
    color: #f5f5f6 !important;
    font-size: 14px !important;
}

.logo-text .beta {
    color: #8b8b91 !important;
}

.nav-group {
    padding: 4px !important;
    margin-bottom: 8px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
}

.nav-group-title {
    padding: 9px 10px 6px !important;
    color: #77777f !important;
    font-size: 10px !important;
    letter-spacing: .09em !important;
}

.nav-item {
    min-height: 39px !important;
    padding: 7px 9px !important;
    margin-bottom: 3px !important;
    border: 1px solid transparent !important;
    border-radius: 9px !important;
    color: #cfcfd4 !important;
    background: transparent !important;
    font-size: 13px !important;
    font-weight: 760 !important;
}

.nav-item:hover {
    background: #18181c !important;
    border-color: #2c2c31 !important;
    color: #ffffff !important;
    transform: none !important;
}

.nav-item.active {
    background: #f2f2f4 !important;
    border-color: #ffffff !important;
    color: #09090b !important;
    box-shadow: none !important;
}

.nav-item.active::before {
    display: none !important;
}

.nav-item .ico {
    width: 28px !important;
    height: 28px !important;
    border-radius: 8px !important;
    border: 1px solid #2b2b30 !important;
    background: #141417 !important;
    color: #e7e7ea !important;
}

.nav-item:hover .ico {
    border-color: #3a3a40 !important;
    background: #202025 !important;
    color: #ffffff !important;
}

.nav-item.active .ico {
    border-color: #d9d9de !important;
    background: #0b0b0d !important;
    color: #ffffff !important;
}

.nav-item .badge-count {
    border-color: #2f2f35 !important;
    background: #17171b !important;
    color: #d8d8dc !important;
}

.nav-item.active .badge-count {
    border-color: #0b0b0d !important;
    background: #0b0b0d !important;
    color: #ffffff !important;
}

.sidebar-cta {
    min-height: 40px !important;
    margin: 4px 4px 10px !important;
    border: 1px solid #ffffff !important;
    border-radius: 9px !important;
    background: #f2f2f4 !important;
    color: #09090b !important;
    box-shadow: none !important;
}

.sidebar-cta:hover {
    background: #ffffff !important;
    color: #050506 !important;
    border-color: #ffffff !important;
    filter: none !important;
}

.sidebar-profile {
    margin: auto 4px 0 !important;
    padding: 10px !important;
    border-radius: 10px !important;
    background: #111114 !important;
    border-color: #2a2a2f !important;
    box-shadow: none !important;
}

.sidebar-profile:hover {
    border-color: #f0f0f2 !important;
}

.sidebar-profile .avatar,
.avatar {
    background: #f2f2f4 !important;
    color: #09090b !important;
    box-shadow: none !important;
}

.topbar,
.card,
.tile,
.table-wrap,
.auth-card {
    border-color: #28282d !important;
}

.btn-primary,
.chip.active,
.tab.active {
    background: #f2f2f4 !important;
    color: #09090b !important;
    border-color: #ffffff !important;
    box-shadow: none !important;
}

.btn-primary:hover,
.chip.active:hover,
.tab.active:hover {
    background: #ffffff !important;
    color: #050506 !important;
}

.page-workload .workload-table .day-ok,
.green {
    color: #f1f1f3 !important;
}

.page-workload .workload-table .day-ok {
    background: rgba(255, 255, 255, .065) !important;
}

/* ============================================================
   Compact monochrome sidebar
   More room for page content and simpler navigation icons.
   ============================================================ */
:root,
[data-theme="dark"] {
    --sidebar-w: 228px;
}

.sidebar {
    width: var(--sidebar-w) !important;
    padding: 14px 8px !important;
}

.main-area {
    margin-left: var(--sidebar-w) !important;
    min-width: 0 !important;
}

.sidebar-logo {
    gap: 9px !important;
    padding: 5px 7px 12px !important;
}

.logo-mark {
    width: 34px !important;
    height: 34px !important;
    border-radius: 8px !important;
    font-size: 13px !important;
}

.logo-text {
    min-width: 0 !important;
    font-size: 13px !important;
    line-height: 1.1 !important;
}

.logo-text .beta {
    display: block;
    margin-top: 2px;
}

.nav-group {
    margin-bottom: 6px !important;
    padding: 2px !important;
}

.nav-group-title {
    padding: 8px 8px 5px !important;
    font-size: 9px !important;
}

.nav-item {
    min-height: 36px !important;
    gap: 8px !important;
    padding: 6px 8px !important;
    border-radius: 8px !important;
    font-size: 12.5px !important;
    overflow: hidden !important;
}

.nav-item .ico {
    width: 24px !important;
    height: 24px !important;
    border-radius: 7px !important;
}

.nav-item .ico::before {
    width: 15px !important;
    height: 15px !important;
}

.nav-item .badge-count {
    min-width: 22px !important;
    height: 20px !important;
    padding: 0 6px !important;
    font-size: 10px !important;
}

.sidebar-cta {
    min-height: 36px !important;
    margin: 3px 2px 8px !important;
    padding: 8px 10px !important;
    font-size: 12.5px !important;
}

.sidebar-profile {
    margin: auto 2px 0 !important;
    gap: 8px !important;
    padding: 8px !important;
}

.sidebar-profile .avatar {
    width: 32px !important;
    height: 32px !important;
}

.sidebar-profile .who {
    min-width: 0 !important;
}

.sidebar-profile .who b {
    font-size: 12px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

.sidebar-profile .who small {
    font-size: 10.5px !important;
}

.content {
    max-width: none !important;
    width: 100% !important;
}

.topbar {
    padding-left: 22px !important;
    padding-right: 22px !important;
}

/* Replace the heavier filled symbols with clearer simple glyph masks. */
.ico-home { --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 3 3 10v11h7v-6h4v6h7V10l-9-7Zm0 2.6 7 5.45V19h-3v-6H8v6H5v-7.95l7-5.45Z'/%3E%3C/svg%3E"); }
.ico-user { --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 4a4 4 0 1 1 0 8 4 4 0 0 1 0-8Zm0 2a2 2 0 1 0 0 4 2 2 0 0 0 0-4Zm0 8c4.42 0 8 2.24 8 5v1H4v-1c0-2.76 3.58-5 8-5Zm0 2c-2.76 0-5.16.9-5.82 2h11.64c-.66-1.1-3.06-2-5.82-2Z'/%3E%3C/svg%3E"); }
.ico-card { --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 6h16a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2Zm0 2v2h16V8H4Zm0 4v4h16v-4H4Zm2 2h5v1.5H6V14Z'/%3E%3C/svg%3E"); }
.ico-shop { --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M7 5h10l1 3h3v2H3V8h3l1-3Zm1.45 2-.33 1h7.76l-.33-1h-7.1ZM5 11h14l-1.2 8H6.2L5 11Zm2.32 2 .6 4h8.16l.6-4H7.32Z'/%3E%3C/svg%3E"); }
.ico-users { --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M9 5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 0 1 0-7Zm7 1a3 3 0 1 1 0 6 3 3 0 0 1 0-6ZM9 7a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3Zm7 1a1 1 0 1 0 0 2 1 1 0 0 0 0-2ZM9 14c3.87 0 7 1.8 7 4v1H2v-1c0-2.2 3.13-4 7-4Zm7.8 1.18c2.94.26 5.2 1.8 5.2 3.82h-4.2a3.98 3.98 0 0 0-1-3.82ZM9 16c-2.06 0-3.82.45-4.6 1h9.2c-.78-.55-2.54-1-4.6-1Z'/%3E%3C/svg%3E"); }
.ico-settings { --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M13 2v3.13a7.02 7.02 0 0 1 2.1.87l2.2-2.2 2.9 2.9-2.2 2.2c.4.65.7 1.36.87 2.1H22v4h-3.13a7.02 7.02 0 0 1-.87 2.1l2.2 2.2-2.9 2.9-2.2-2.2c-.65.4-1.36.7-2.1.87V22H9v-3.13a7.02 7.02 0 0 1-2.1-.87l-2.2 2.2-2.9-2.9 2.2-2.2A7.02 7.02 0 0 1 3.13 15H0v-4h3.13c.17-.74.47-1.45.87-2.1L1.8 6.7l2.9-2.9L6.9 6c.65-.4 1.36-.7 2.1-.87V2h4Zm-2 2v2.78l-.82.16a5.05 5.05 0 0 0-2.46 1.02l-.7.47-1.96-1.96-.76.76 1.96 1.96-.47.7a5.05 5.05 0 0 0-1.02 2.46l-.16.82H2v1h2.78l.16.82c.17.91.52 1.75 1.02 2.46l.47.7-1.96 1.96.76.76 1.96-1.96.7.47c.71.5 1.55.85 2.46 1.02l.82.16V20h1v-2.78l.82-.16a5.05 5.05 0 0 0 2.46-1.02l.7-.47 1.96 1.96.76-.76-1.96-1.96.47-.7c.5-.71.85-1.55 1.02-2.46l.16-.82H20v-1h-2.78l-.16-.82a5.05 5.05 0 0 0-1.02-2.46l-.47-.7 1.96-1.96-.76-.76-1.96 1.96-.7-.47a5.05 5.05 0 0 0-2.46-1.02L11 6.78V4h-1Zm1 6a2 2 0 1 1 0 4 2 2 0 0 1 0-4Z'/%3E%3C/svg%3E"); }
.ico-media { --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 5h16a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2Zm0 2v10h16V7H4Zm6 2 6 3-6 3V9Zm2 3.24 1.52-.76L12 10.72v1.52Z'/%3E%3C/svg%3E"); }
.ico-chart { --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 19h17v2H2V3h2v16Zm3-2V9h3v8H7Zm2-2V11H8v4h1Zm4 2V5h3v12h-3Zm2-2V7h-1v8h1Zm4 2v-6h3v6h-3Zm2-2v-2h-1v2h1Z'/%3E%3C/svg%3E"); }
.ico-top { --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M8 4h8v3h4v2a5 5 0 0 1-4.44 4.97A4.9 4.9 0 0 1 13 16.58V19h4v2H7v-2h4v-2.42a4.9 4.9 0 0 1-2.56-2.61A5 5 0 0 1 4 9V7h4V4Zm2 2v5.5a2 2 0 1 0 4 0V6h-4ZM6 9a3 3 0 0 0 2 2.83V9H6Zm10 2.83A3 3 0 0 0 18 9h-2v2.83Z'/%3E%3C/svg%3E"); }
.ico-doc { --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M6 3h8l4 4v14H6a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2Zm7 2H6v14h10V8h-3V5Zm2 1.4V7h.6L15 6.4ZM8 11h6v2H8v-2Zm0 4h6v2H8v-2Z'/%3E%3C/svg%3E"); }
.ico-date { --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M7 2h2v3h6V2h2v3h4v17H3V5h4V2Zm12 8H5v10h14V10ZM5 7v1h14V7H5Zm3 5h3v3H8v-3Zm5 0h3v3h-3v-3Z'/%3E%3C/svg%3E"); }

@media (max-width: 900px) {
    :root,
    [data-theme="dark"] {
        --sidebar-w: 228px;
    }

    .main-area {
        margin-left: 0 !important;
    }
}

/* Final monochrome safety net for old green utility classes. */
:root,
[data-theme="dark"] {
    --green: #f1f1f3;
}

.badge-green,
.cal-cell.has,
.day-ok,
.green {
    color: #f1f1f3 !important;
}

.badge-green,
.cal-cell.has {
    background: rgba(255, 255, 255, .075) !important;
    border-color: rgba(255, 255, 255, .16) !important;
}

.row-payout td:first-child {
    box-shadow: inset 3px 0 0 #f1f1f3 !important;
}

/* ============================================================
   Sidebar line icons and neutral navigation states
   ============================================================ */
.nav-group-title {
    padding: 9px 10px 6px !important;
    color: #7a7a82 !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    letter-spacing: .105em !important;
    text-transform: uppercase !important;
}

.nav-item {
    min-height: 38px !important;
    padding: 7px 9px !important;
    border-radius: 10px !important;
    border: 1px solid transparent !important;
    background: transparent !important;
    color: #d7d7dc !important;
    transition:
        background-color .18s ease,
        border-color .18s ease,
        color .18s ease,
        box-shadow .18s ease !important;
}

.nav-item:hover {
    background: #1a1a1f !important;
    border-color: #303036 !important;
    color: #ffffff !important;
    opacity: 1 !important;
}

.nav-item.active {
    background: #242429 !important;
    border-color: #3a3a42 !important;
    color: #ffffff !important;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .035) !important;
}

.nav-item.active::before {
    display: none !important;
}

.nav-item .ico {
    width: 26px !important;
    height: 26px !important;
    display: inline-grid !important;
    place-items: center !important;
    border-radius: 10px !important;
    border: 1px solid #303036 !important;
    background: #121216 !important;
    color: #bfc0c7 !important;
    transition:
        background-color .18s ease,
        border-color .18s ease,
        color .18s ease !important;
}

.nav-item:hover .ico {
    background: #202026 !important;
    border-color: #45454d !important;
    color: #f3f3f5 !important;
}

.nav-item.active .ico {
    background: #efeff1 !important;
    border-color: #efeff1 !important;
    color: #111114 !important;
}

.nav-item .ico::before {
    width: 16px !important;
    height: 16px !important;
    background: currentColor !important;
    -webkit-mask: var(--icon-mask) center / contain no-repeat !important;
    mask: var(--icon-mask) center / contain no-repeat !important;
}

.nav-item .ico::after {
    display: none !important;
}

.nav-item .badge-count {
    min-width: 24px !important;
    height: 20px !important;
    padding: 0 7px !important;
    border-radius: 999px !important;
    border: 1px solid #3a3a42 !important;
    background: #202026 !important;
    color: #d6d6dc !important;
    font-size: 10px !important;
    font-weight: 850 !important;
}

.nav-item:hover .badge-count {
    border-color: #4a4a52 !important;
    background: #2a2a30 !important;
    color: #ffffff !important;
}

.nav-item.active .badge-count {
    border-color: #d9d9de !important;
    background: #d9d9de !important;
    color: #111114 !important;
}

.ico-home { --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 10.5 12 3l9 7.5'/%3E%3Cpath d='M5 9.5V21h5v-6h4v6h5V9.5'/%3E%3C/svg%3E"); }
.ico-user { --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21c0-4 3.6-7 8-7s8 3 8 7'/%3E%3C/svg%3E"); }
.ico-card { --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='M3 10h18'/%3E%3Cpath d='M7 15h4'/%3E%3C/svg%3E"); }
.ico-shop { --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 8h12l-1 12H7L6 8Z'/%3E%3Cpath d='M9 8a3 3 0 0 1 6 0'/%3E%3Cpath d='M8 13h8'/%3E%3C/svg%3E"); }
.ico-users { --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='8' r='3'/%3E%3Cpath d='M3 20c0-3.2 2.7-5.5 6-5.5s6 2.3 6 5.5'/%3E%3Cpath d='M16 11a2.7 2.7 0 1 0 0-5.4'/%3E%3Cpath d='M17 15c2.4.5 4 2.2 4 5'/%3E%3C/svg%3E"); }
.ico-settings { --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v3'/%3E%3Cpath d='M12 18v3'/%3E%3Cpath d='M4.8 6.8 7 9'/%3E%3Cpath d='m17 15 2.2 2.2'/%3E%3Cpath d='M3 12h3'/%3E%3Cpath d='M18 12h3'/%3E%3Cpath d='m4.8 17.2 2.2-2.2'/%3E%3Cpath d='M17 9l2.2-2.2'/%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3C/svg%3E"); }
.ico-media { --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='m10 9 5 3-5 3V9Z'/%3E%3C/svg%3E"); }
.ico-chart { --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20V4'/%3E%3Cpath d='M4 20h16'/%3E%3Cpath d='M8 16v-5'/%3E%3Cpath d='M12 16V8'/%3E%3Cpath d='M16 16v-3'/%3E%3C/svg%3E"); }
.ico-top { --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 4h8v5a4 4 0 0 1-8 0V4Z'/%3E%3Cpath d='M8 7H4v2a4 4 0 0 0 4 4'/%3E%3Cpath d='M16 7h4v2a4 4 0 0 1-4 4'/%3E%3Cpath d='M12 13v5'/%3E%3Cpath d='M9 21h6'/%3E%3Cpath d='M10 18h4'/%3E%3C/svg%3E"); }
.ico-doc { --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 3h7l4 4v14H7a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2Z'/%3E%3Cpath d='M14 3v5h4'/%3E%3Cpath d='M8 13h8'/%3E%3Cpath d='M8 17h6'/%3E%3C/svg%3E"); }
.ico-date { --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='5' width='16' height='16' rx='2'/%3E%3Cpath d='M16 3v4'/%3E%3Cpath d='M8 3v4'/%3E%3Cpath d='M4 10h16'/%3E%3Cpath d='M8 14h.01'/%3E%3Cpath d='M12 14h.01'/%3E%3Cpath d='M16 14h.01'/%3E%3Cpath d='M8 18h.01'/%3E%3Cpath d='M12 18h.01'/%3E%3C/svg%3E"); }

/* Text-only sidebar navigation. */
.sidebar .nav-item .ico {
    display: none !important;
}

.sidebar .nav-item {
    gap: 0 !important;
    padding-left: 12px !important;
    padding-right: 10px !important;
}

.sidebar .nav-item .badge-count {
    margin-left: auto !important;
}

/* ============================================================
   Stability/performance fixes
   Center media edit cards and remove heavy page effects.
   ============================================================ */
.media-detail-card {
    position: fixed !important;
    top: 50% !important;
    left: calc(var(--sidebar-w) + ((100vw - var(--sidebar-w)) / 2)) !important;
    width: min(880px, calc(100vw - var(--sidebar-w) - 48px)) !important;
    max-width: calc(100vw - var(--sidebar-w) - 48px) !important;
    max-height: calc(100vh - 56px) !important;
    transform: translate(-50%, -50%) scale(.985) !important;
    opacity: 0 !important;
    pointer-events: none !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
}

.media-detail-card.open {
    transform: translate(-50%, -50%) scale(1) !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

.shop-comment {
    min-height: 58px !important;
    padding: 8px 10px !important;
    font-size: 12px !important;
    line-height: 1.35 !important;
    resize: vertical !important;
}

.shop-admin-comment {
    margin: 10px 0 0 !important;
    padding: 9px 11px !important;
    font-size: 13px !important;
    white-space: pre-wrap !important;
}

body,
.topbar,
.sidebar {
    background-attachment: scroll !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

body::before,
body::after,
.main-area::before,
.main-area::after {
    animation: none !important;
    transform: none !important;
}

.content > *,
.auth-card,
.review-card,
.card,
.tile,
.shop-item,
.manual-card,
.nav-item,
.btn,
.tab,
.chip,
input,
select,
textarea {
    animation: none !important;
    transition-duration: .08s !important;
}

.card:hover,
.tile:hover,
.shop-item:hover,
.manual-card:hover,
.nav-item:hover,
input:focus,
select:focus,
textarea:focus {
    transform: none !important;
}

@media (max-width: 900px) {
    .media-detail-card {
        left: 50% !important;
        width: calc(100vw - 24px) !important;
        max-width: calc(100vw - 24px) !important;
        max-height: calc(100vh - 24px) !important;
    }
}

/* Media panel no-jump overlay. */
.page-media_partners .media-split {
    display: block !important;
}

.page-media_partners .media-split > .card:first-child {
    width: 100% !important;
}

.page-media_partners .media-detail-card {
    position: fixed !important;
    top: 50% !important;
    left: calc(var(--sidebar-w) + ((100vw - var(--sidebar-w)) / 2)) !important;
    width: min(900px, calc(100vw - var(--sidebar-w) - 56px)) !important;
    max-width: calc(100vw - var(--sidebar-w) - 56px) !important;
    max-height: calc(100vh - 64px) !important;
    margin: 0 !important;
    transform: translate(-50%, -50%) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    z-index: 120 !important;
    contain: layout paint !important;
    transition: opacity .08s linear, visibility 0s linear .08s !important;
    will-change: opacity !important;
}

.page-media_partners .media-detail-card.open {
    transform: translate(-50%, -50%) !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transition: opacity .08s linear !important;
}

.page-media_partners .media-detail-card:not(.open) {
    display: block !important;
}

body.page-media_partners:has(.media-detail-card.open)::after {
    content: "" !important;
    position: fixed !important;
    inset: 0 !important;
    z-index: 110 !important;
    background: rgba(0, 0, 0, .46) !important;
    pointer-events: none !important;
    animation: none !important;
    transform: none !important;
}

/* Checks UI and smoother neutral motion. */
.sidebar-actions {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    margin: 4px 4px 10px !important;
}

.sidebar-actions .sidebar-cta {
    margin: 0 !important;
    width: 100% !important;
    min-height: 40px !important;
    padding: 10px 12px !important;
    font-size: 12.5px !important;
}

.sidebar-actions > .sidebar-cta:only-child {
    grid-column: 1 / -1;
}

.sidebar-cta-secondary {
    background: #18181c !important;
    border-color: #34343a !important;
    color: #f1f1f3 !important;
}

.sidebar-cta-secondary:hover {
    background: #24242a !important;
    border-color: #484850 !important;
    color: #ffffff !important;
}

.sidebar-check-active {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px;
    align-items: center;
    padding: 8px;
    border: 1px solid #34343a;
    border-radius: 10px;
    background: #121216;
}

.check-live-label {
    color: #9a9aa2;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.check-live-timer {
    color: #f3f3f5;
    font-size: 13px;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
}

.sidebar-check-active .sidebar-cta {
    grid-column: 1 / -1;
}

.check-modal {
    width: min(440px, calc(100vw - 28px)) !important;
}

.modal-overlay {
    align-items: center !important;
    justify-content: center !important;
}

.modal-overlay.open {
    animation: modalFadeIn .16s ease both !important;
}

.modal-overlay.open .modal {
    animation: modalPopIn .18s ease both !important;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalPopIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.page-media_partners .media-detail-card {
    left: 50% !important;
    width: min(900px, calc(100vw - 48px)) !important;
    max-width: calc(100vw - 48px) !important;
    transition: opacity .14s ease, visibility 0s linear .14s !important;
}

.page-media_partners .media-detail-card.open {
    transition: opacity .14s ease !important;
}

.content > *,
.auth-card,
.review-card,
.card,
.tile,
.shop-item,
.manual-card,
.nav-item,
.btn,
.tab,
.chip,
input,
select,
textarea,
.topbar-action-btn,
.icon-btn {
    transition-duration: .16s !important;
    transition-timing-function: ease !important;
}

@media (max-width: 760px) {
    .sidebar-actions {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 900px) {
    .page-media_partners .media-detail-card {
        left: 50% !important;
        width: calc(100vw - 24px) !important;
        max-width: calc(100vw - 24px) !important;
        max-height: calc(100vh - 24px) !important;
    }
}

/* Manual editor block controls */
.manual-rich-editor .manual-form-block,
.manual-body .manual-form-block {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 14px;
    margin: 10px 0;
    background: var(--bg-2);
}
.manual-rich-editor .manual-form-block.is-selected {
    border-color: var(--text);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, .08);
}
.manual-form-question {
    font-weight: 800;
    font-size: 16px;
    margin-bottom: 6px;
}
.manual-form-help {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
}
.manual-form-options {
    margin: 8px 0 0;
    padding-left: 20px;
    color: var(--text);
}
.manual-form-options li {
    margin: 4px 0;
}
.manual-form-divider {
    height: 1px;
    background: var(--border);
    margin: 2px 0 10px;
}
.manual-rich-editor .manual-callout,
.manual-body .manual-callout {
    border: 1px solid var(--border);
    border-left: 4px solid #3fb950;
    border-radius: 10px;
    padding: 14px 16px;
    margin: 12px 0;
    background: var(--bg-2);
}
.manual-callout-title {
    font-weight: 800;
    font-size: 16px;
    margin-bottom: 6px;
    color: #3fb950;
}
.manual-callout-body {
    color: var(--text);
    font-size: 14px;
    line-height: 1.6;
}
.manual-callout-tools {
    display: flex;
    align-items: center;
    gap: 8px;
}
.manual-callout-tools-label {
    color: var(--muted);
    font-size: 13px;
}
.manual-callout-color input[type="color"] {
    width: 30px;
    height: 26px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: none;
    cursor: pointer;
}
.manual-callout-swatches {
    display: inline-flex;
    gap: 4px;
}
.manual-callout-swatch {
    width: 20px;
    height: 20px;
    border-radius: 5px;
    border: 1px solid var(--border);
    background: var(--swatch);
    cursor: pointer;
    padding: 0;
}
.manual-callout-swatch:hover {
    transform: scale(1.12);
}
/* TZ 2026-07-10: norms, attestations, centered main cards */
.page-main .grid-4 .tile:nth-child(n+2) {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: 118px;
}

.calendar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.norm-calendar {
    display: grid;
    grid-template-columns: repeat(7, minmax(56px, 1fr));
    gap: 8px;
}

.norm-day {
    min-height: 58px;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    background: var(--surface-2);
}

.norm-day small {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.15;
}

.norm-ok {
    border-color: rgba(57, 217, 138, .45);
    background: rgba(57, 217, 138, .12);
}

.norm-fail {
    border-color: rgba(255, 91, 91, .5);
    background: rgba(255, 91, 91, .12);
}

.norm-vacation,
.day-vacation {
    border-color: var(--accent-glow) !important;
    background: var(--accent-soft) !important;
    color: var(--accent-2) !important;
}

.norm-none {
    opacity: .75;
}

.attestation-list {
    display: grid;
    gap: 10px;
}

.attestation-list div {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-2);
}

@media (max-width: 760px) {
    .norm-calendar {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

/* Account layout fix: vacation on the right, compact norm calendar */
.page-account .account-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, .85fr);
    align-items: start;
    gap: 18px;
}

.page-account .account-column {
    min-width: 0;
    display: grid;
    gap: 16px;
}

.page-account .card {
    min-width: 0;
}

.page-account .calendar-head {
    align-items: center;
    margin-bottom: 14px;
}

.page-account .calendar-head h2 {
    margin: 0;
    min-width: 0;
}

.page-account .norm-calendar {
    width: 100%;
    max-width: 100%;
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 6px;
    overflow: hidden;
}

.page-account .norm-day {
    min-width: 0;
    min-height: 48px;
    padding: 6px 4px;
    border-radius: 7px;
    text-align: center;
    overflow: hidden;
}

.page-account .norm-day b {
    font-size: 13px;
    line-height: 1;
}

.page-account .norm-day small {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 10px;
}

.page-account .account-column-side .field-row {
    grid-template-columns: 1fr;
}

.page-account .account-column-side .btn {
    width: 100%;
}

@media (max-width: 980px) {
    .page-account .account-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .page-account .norm-calendar {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .page-account .calendar-head {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* 2026-07-10 polish: account password modal, wallet actions, manual image tools */
.topbar-actions {
    align-items: center;
}

.topbar-actions .topbar-action-btn {
    min-height: 38px;
}

.page-wallet .content {
    max-width: 920px !important;
    text-align: left !important;
}

.page-wallet .page-head,
.page-wallet .content > .tile {
    text-align: center;
}

.page-wallet .content > .tile .value {
    font-size: clamp(42px, 6vw, 72px) !important;
}

.wallet-actions {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(260px, .55fr);
    gap: 14px;
    margin-bottom: 16px;
    align-items: stretch;
}

.wallet-panel {
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    padding: 16px;
    min-width: 0;
}

.wallet-panel-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.wallet-panel-head h2 {
    margin: 0 0 2px;
    font-size: 18px;
}

.wallet-panel-head p {
    margin: 0;
}

.wallet-action-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 22px;
    font-weight: 800;
    flex: 0 0 auto;
}

.wallet-transfer-form {
    display: grid;
    grid-template-columns: minmax(150px, 1fr) minmax(110px, .45fr);
    gap: 10px;
    align-items: end;
}

.wallet-transfer-form label {
    display: grid;
    gap: 6px;
}

.wallet-transfer-form label:nth-of-type(3) {
    grid-column: 1 / -1;
}

.wallet-transfer-form button {
    justify-self: start;
}

.wallet-claim {
    display: grid;
    align-content: space-between;
}

.wallet-claim .btn {
    width: 100%;
}

.page-wallet .content > .card {
    background: var(--surface) !important;
}

.manual-image-panel {
    grid-template-columns: repeat(4, minmax(120px, 1fr)) auto auto !important;
    margin: 10px 0;
}

.manual-rich-editor img.manual-img-inline {
    display: inline-block;
    vertical-align: middle;
}

.manual-rich-editor img.manual-img-wrap {
    float: left;
    margin: 0 14px 10px 0;
}

.manual-rich-editor img.manual-img-block {
    display: block;
    clear: both;
}

.manual-rich-editor img.manual-img-cover,
.manual-body img.manual-img-cover {
    display: block;
    width: 100%;
    max-width: 100%;
    height: 320px;
    object-fit: cover;
    object-position: center center;
    overflow: hidden;
    border-radius: 12px;
    margin: 14px 0;
}

.manual-rich-editor img.manual-img-behind {
    position: relative;
    z-index: 0;
    opacity: .65;
}

.manual-rich-editor img.manual-img-front {
    position: relative;
    z-index: 3;
    box-shadow: 0 16px 40px rgba(0,0,0,.28);
}

.manual-rich-editor img.is-selected {
    cursor: nwse-resize;
    border-radius: 6px;
    box-shadow: 0 0 0 1px rgba(255,255,255,.35), 0 0 0 5px rgba(74,163,255,.18);
}

.blacklist-warning {
    border-color: rgba(248, 81, 73, .45) !important;
}

.blacklist-warning-item {
    display: grid;
    gap: 5px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,.12);
}

.page-admin .tabs {
    gap: 6px;
}

.page-admin .tab {
    border-radius: 8px 8px 0 0;
}

.page-admin .card {
    border-color: rgba(255,255,255,.12);
}

.page-manual_edit .content {
    max-width: none !important;
    width: 100% !important;
}

.page-manual_edit .manual-edit-card,
.page-manual_edit .content > .card {
    width: 100% !important;
    max-width: none !important;
}

.page-manual_edit .manual-rich-editor {
    min-height: calc(100vh - 420px);
}

.manual-document-shell {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
}

.manual-reader-shell {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.manual-document-shell.outline-hidden,
.manual-reader-shell.outline-hidden {
    grid-template-columns: 0 minmax(0, 1fr) !important;
    gap: 0;
}

.manual-document-shell.outline-hidden .manual-document-outline,
.manual-reader-shell.outline-hidden .manual-document-outline {
    width: 0;
    min-width: 0;
    padding: 0;
    border: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

.manual-document-outline {
    position: sticky;
    top: 86px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-2);
    padding: 12px;
}

.manual-outline-title {
    font-weight: 900;
    overflow-wrap: anywhere;
}

.manual-outline-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

.manual-outline-toggle {
    width: 26px;
    height: 26px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--surface-2);
    color: var(--muted);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    flex: 0 0 auto;
}

.manual-outline-toggle:hover {
    color: var(--text);
}

.manual-outline-list {
    display: grid;
    gap: 5px;
}

.manual-outline-item {
    width: 100%;
    border: 0;
    border-radius: 7px;
    padding: 8px 9px;
    background: transparent;
    color: var(--muted);
    text-align: left;
    font: inherit;
    font-size: 13px;
    cursor: pointer;
    overflow-wrap: anywhere;
}

.manual-outline-item:hover {
    background: var(--surface-2);
    color: var(--text);
}

.manual-outline-item.level-h2 { padding-left: 16px; }
.manual-outline-item.level-h3,
.manual-outline-item.level-h4,
.manual-outline-item.level-block { padding-left: 24px; }

.manual-outline-empty {
    color: var(--muted);
    font-size: 13px;
}

.manual-outline-resize {
    position: absolute;
    top: 0;
    right: -6px;
    width: 10px;
    height: 100%;
    cursor: col-resize;
}

.manual-document-workarea {
    min-width: 0;
}

.manual-reader-content {
    min-width: 0;
}

.manual-outline-show {
    display: none;
    width: auto !important;
    margin: 0 0 8px;
    padding: 7px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-2);
    color: var(--text);
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.manual-document-shell.outline-hidden .manual-outline-show,
.manual-reader-shell.outline-hidden .manual-outline-show {
    display: inline-flex;
}

.manual-ruler {
    display: grid;
    grid-template-columns: auto minmax(120px, 1fr) auto auto;
    gap: 10px;
    align-items: center;
    margin-bottom: 8px;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-2);
}

.manual-ruler-line {
    height: 1px;
    background: repeating-linear-gradient(90deg, var(--border) 0 1px, transparent 1px 24px);
}

.manual-ruler-label,
.manual-ruler-control {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.manual-ruler-control {
    display: grid;
    grid-template-columns: auto 96px 56px;
    gap: 6px;
    align-items: center;
}

.manual-ruler-control input[type="number"] {
    min-height: 28px !important;
    padding: 4px 6px !important;
}

.manual-indent-block {
    display: block;
}

.manual-tool-heading select {
    min-width: 170px;
}

.page-manual_edit .manual-rich-editor {
    min-height: min(680px, calc(100vh - 300px)) !important;
    padding: 22px !important;
}

@media (max-width: 900px) {
    .wallet-actions {
        grid-template-columns: 1fr;
    }

    .manual-image-panel {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .manual-document-shell {
        grid-template-columns: 1fr;
    }

    .manual-reader-shell {
        grid-template-columns: 1fr;
    }

    .manual-document-outline {
        position: static;
        max-height: 170px;
    }

    .manual-outline-resize {
        display: none;
    }

    .manual-document-shell.outline-hidden,
    .manual-reader-shell.outline-hidden {
        grid-template-columns: 1fr !important;
    }

    .manual-ruler {
        grid-template-columns: 1fr;
    }

    .manual-ruler-control {
        grid-template-columns: 56px minmax(0, 1fr) 58px;
    }
}

@media (max-width: 560px) {
    .wallet-transfer-form {
        grid-template-columns: 1fr;
    }

    .wallet-transfer-form button {
        width: 100%;
    }
}

/* Keep the final manual-editor rules after legacy theme blocks. */
.page-manual_edit .manual-document-workarea { position:relative; width:100%; max-width:980px; margin-inline:auto; }
.page-manual_edit .manual-rich-editor { box-sizing:border-box; height:auto !important; width:100%; max-width:900px; margin-inline:auto; overflow:visible; overflow-wrap:anywhere; word-break:break-word; }
.page-manual_edit .manual-ruler { display:grid; grid-template-columns:minmax(260px,1fr) auto; gap:12px; overflow-x:auto; padding:13px 16px 9px; }
.page-manual_edit .manual-ruler-scale { position:relative; min-width:260px; height:28px; border-block:1px solid var(--border); background:var(--surface); }
.page-manual_edit .manual-toolbar { position:sticky; top:68px; z-index:30; flex-wrap:wrap; overflow:visible; }
@media (max-width:760px) {
    .page-manual_edit .manual-toolbar { flex-wrap:nowrap; overflow-x:auto; overflow-y:hidden; top:56px; }
    .page-manual_edit .manual-toolbar > * { flex:0 0 auto; }
    .page-manual_edit .manual-ruler { grid-template-columns:minmax(420px,1fr); }
}
