/* YSFX enterprise admin */
:root {
  color-scheme: dark;
  --bg: #080b14;
  --bg-2: #0c111e;
  --sidebar: #0b0f1a;
  --panel: #101726;
  --panel-2: #141c2e;
  --line: rgba(148,163,184,.13);
  --line-2: rgba(148,163,184,.23);
  --text: #eef2fb;
  --muted: #919db4;
  --subtle: #65718a;
  --violet: #8b5cf6;
  --pink: #ec4899;
  --green: #10b981;
  --red: #f43f5e;
  --amber: #f59e0b;
  --cyan: #06b6d4;
  --radius: 16px;
  --font: "Inter", "SF Pro Display", "Segoe UI", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 14px; line-height: 1.65; -webkit-font-smoothing: antialiased; }
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; background: radial-gradient(700px 420px at 85% -8%, rgba(139,92,246,.075), transparent 65%), radial-gradient(560px 400px at 10% 100%, rgba(6,182,212,.035), transparent 70%); z-index: 0; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
img { max-width: 100%; }
::selection { background: rgba(139,92,246,.45); }
:focus-visible { outline: 2px solid #a78bfa; outline-offset: 2px; }
h1,h2,h3,h4,p { margin-top: 0; }
.icon { width: 19px; height: 19px; flex: 0 0 auto; display: inline-block; vertical-align: -4px; }
.sr-only { position:absolute!important; width:1px!important; height:1px!important; padding:0!important; margin:-1px!important; overflow:hidden!important; clip:rect(0,0,0,0)!important; white-space:nowrap!important; border:0!important; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.admin-body { background: var(--bg); }
.admin-shell { min-height: 100vh; display: grid; grid-template-columns: 254px minmax(0, 1fr); position: relative; z-index: 1; }
.admin-sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 20px 14px; border-right: 1px solid var(--line); background: rgba(9,13,23,.92); backdrop-filter: blur(20px); z-index: 40; }
.admin-brand { display: flex; align-items: center; gap: 11px; min-height: 42px; padding: 2px 9px 18px; border-bottom: 1px solid var(--line); }
.brand-mark { width: 36px; height: 36px; flex: 0 0 auto; display: inline-grid; place-items: center; border-radius: 11px; color: #fff; background: linear-gradient(145deg, var(--violet), var(--pink)); box-shadow: 0 8px 24px rgba(139,92,246,.28), inset 0 1px rgba(255,255,255,.22); }
.brand-mark .icon { width: 20px; height: 20px; }
.admin-brand > span:last-child { display: flex; flex-direction: column; line-height: 1.25; }
.admin-brand strong { font-size: 15px; letter-spacing: .04em; }
.admin-brand small { color: var(--subtle); font-size: 9px; letter-spacing: .14em; }
.admin-nav { flex: 1; overflow-y: auto; padding: 13px 0; }
.nav-caption { display: block; padding: 13px 11px 6px; color: var(--subtle); font-size: 9px; font-weight: 750; letter-spacing: .15em; text-transform: uppercase; }
.admin-nav-item { display: flex; align-items: center; gap: 10px; min-height: 41px; margin-bottom: 3px; padding: 9px 11px; border: 1px solid transparent; border-radius: 9px; color: #98a4ba; font-size: 13px; transition: .18s; }
.admin-nav-item .icon { width: 18px; height: 18px; color: #7e8aa2; }
.admin-nav-item small { margin-left: auto; color: #5d6880; font-size: 9px; border: 1px solid var(--line); border-radius: 5px; padding: 0 4px; }
.admin-nav-item:hover { color: #fff; background: rgba(255,255,255,.035); }
.admin-nav-item.active { color: #fff; border-color: rgba(139,92,246,.16); background: linear-gradient(90deg, rgba(139,92,246,.18), rgba(139,92,246,.055)); box-shadow: inset 2px 0 #8b5cf6; }
.admin-nav-item.active .icon { color: #b59bff; }
.admin-sidebar-foot { padding-top: 13px; border-top: 1px solid var(--line); }
.admin-user-mini { display: flex; align-items: center; gap: 9px; padding: 5px 8px 10px; }
.admin-user-mini > span:last-child { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.admin-user-mini strong { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-user-mini small { color: var(--subtle); font-size: 10px; }
.avatar { width: 32px; height: 32px; flex: 0 0 auto; display: inline-grid; place-items: center; border-radius: 9px; color: #d9d0ff; background: linear-gradient(145deg, rgba(139,92,246,.34), rgba(236,72,153,.14)); border: 1px solid rgba(167,139,250,.18); font-size: 13px; font-weight: 750; }
.sidebar-foot-link { width: 100%; display: flex; align-items: center; gap: 8px; padding: 7px 9px; border: 0; border-radius: 7px; color: #8490a7; background: transparent; cursor: pointer; font-size: 11px; text-align: left; }
.sidebar-foot-link:hover { color: #fff; background: rgba(255,255,255,.04); }
.sidebar-foot-link .icon { width: 15px; height: 15px; }
.admin-main { min-width: 0; display: flex; flex-direction: column; }
.admin-topbar { height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 31px; border-bottom: 1px solid var(--line); background: rgba(8,11,20,.75); backdrop-filter: blur(18px); position: sticky; top: 0; z-index: 30; }
.topbar-left { display: flex; align-items: center; gap: 13px; }
.topbar-kicker { display: block; color: #665f84; font-size: 9px; font-weight: 800; letter-spacing: .16em; }
.admin-topbar h1 { margin: 1px 0 0; font-size: 17px; letter-spacing: -.02em; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.topbar-user { display: flex; align-items: center; gap: 8px; padding: 5px 10px 5px 6px; border: 1px solid var(--line); border-radius: 9px; color: #bcc5d7; font-size: 12px; }
.topbar-user:hover { border-color: var(--line-2); }
.admin-menu-toggle { display: none; }
.admin-content { flex: 1; width: 100%; max-width: 1480px; margin: 0 auto; padding: 28px 31px 40px; }
.admin-footer { display: flex; justify-content: space-between; padding: 14px 31px; border-top: 1px solid var(--line); color: var(--subtle); font-size: 10px; }
.admin-overlay { display: none; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.page-heading h2 { margin: 5px 0 4px; font-size: 26px; line-height: 1.2; letter-spacing: -.035em; }
.page-heading p { margin: 0; color: var(--muted); font-size: 13px; }
.eyebrow { display: inline-flex; align-items: center; gap: 5px; color: #9e86e8; font-size: 9px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.eyebrow .icon { width: 13px; height: 13px; }
.heading-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; padding: 9px 15px; border: 1px solid transparent; border-radius: 9px; font-weight: 700; font-size: 12px; cursor: pointer; white-space: nowrap; transition: .18s; }
.button .icon { width: 16px; height: 16px; }
.button:hover { transform: translateY(-1px); }
.button.primary { color: #fff; background: linear-gradient(135deg, #8b5cf6, #a855f7 55%, #ec4899); box-shadow: 0 8px 24px rgba(139,92,246,.23); }
.button.primary:hover { box-shadow: 0 10px 30px rgba(139,92,246,.32); }
.button.ghost { color: #bec8d9; border-color: var(--line-2); background: rgba(255,255,255,.035); }
.button.ghost:hover { color: #fff; border-color: rgba(167,139,250,.4); background: rgba(139,92,246,.09); }
.button.danger { color: #ffd7de; border-color: rgba(244,63,94,.24); background: rgba(244,63,94,.12); }
.button.sm { min-height: 33px; padding: 6px 11px; font-size: 11px; border-radius: 7px; }
.button.lg { min-height: 49px; padding-inline: 22px; font-size: 13px; }
.button.full { width: 100%; }
.button:disabled, .button.disabled { opacity: .45; cursor: not-allowed; transform: none; }
.icon-button { width: 32px; height: 32px; display: inline-grid; place-items: center; flex: 0 0 auto; border: 1px solid var(--line); border-radius: 7px; color: #98a5bb; background: rgba(255,255,255,.025); cursor: pointer; transition: .18s; }
.icon-button:hover { color: #fff; border-color: var(--line-2); background: rgba(255,255,255,.06); }
.icon-button.danger:hover { color: #ffa3b4; border-color: rgba(244,63,94,.3); background: rgba(244,63,94,.09); }
.icon-button .icon { width: 16px; height: 16px; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(155deg, rgba(17,24,39,.82), rgba(13,18,31,.82)); box-shadow: inset 0 1px rgba(255,255,255,.025); }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 20px 22px 16px; }
.panel-heading h3 { margin: 2px 0 0; font-size: 16px; letter-spacing: -.02em; }
.panel-heading p { margin: 3px 0 0; color: var(--subtle); font-size: 11px; }
.panel-kicker { color: #6f648f; font-size: 8px; font-weight: 800; letter-spacing: .17em; }
.panel-badge { display: inline-flex; align-items: center; padding: 3px 8px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: rgba(255,255,255,.025); font-size: 9px; white-space: nowrap; }
.table-heading { align-items: center; }
.table-wrap { width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.data-table th { padding: 10px 14px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: #6f7b92; background: rgba(5,8,15,.24); font-size: 9px; font-weight: 750; letter-spacing: .08em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.data-table td { padding: 13px 14px; border-bottom: 1px solid rgba(148,163,184,.075); color: #b4bed0; vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: rgba(139,92,246,.025); }
.data-table strong { color: #e7ecf6; font-weight: 650; }
.data-table small { display: block; color: var(--subtle); font-size: 10px; }
.actions-col { width: 1%; white-space: nowrap; }
.row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 5px; }
.table-app { display: flex; align-items: center; gap: 10px; min-width: 160px; }
.table-app img { width: 42px; height: 42px; border-radius: 10px; object-fit: cover; background: var(--panel-2); }
.table-app > span { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.table-app strong { display: flex; align-items: center; gap: 5px; }
.table-app small { max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.table-sub { display: block; }
.featured-dot { display: inline-flex; padding: 0 4px; border-radius: 4px; color: #ffb1c1; background: rgba(244,63,94,.12); font-size: 8px; font-style: normal; font-weight: 700; vertical-align: 1px; }
.count-chip { display: inline-flex; padding: 2px 7px; border: 1px solid var(--line); border-radius: 5px; color: #aab5c8; background: rgba(255,255,255,.025); font-size: 10px; }
.status-pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; border-radius: 999px; font-size: 9px; font-weight: 750; white-space: nowrap; }
.status-pill::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.status-published, .notice-success { color: #57d9ae; border: 1px solid rgba(16,185,129,.18); background: rgba(16,185,129,.09); }
.status-draft, .notice-warning { color: #f5c45b; border: 1px solid rgba(245,158,11,.18); background: rgba(245,158,11,.09); }
.status-hidden, .notice-info { color: #91a4c5; border: 1px solid rgba(148,163,184,.15); background: rgba(148,163,184,.07); }
.notice-danger { color: #ff8ca2; border: 1px solid rgba(244,63,94,.19); background: rgba(244,63,94,.09); }
.status-pill.status-published::before { box-shadow: 0 0 8px rgba(16,185,129,.5); }
.code-chip { display: inline-flex; padding: 2px 6px; border: 1px solid var(--line); border-radius: 5px; color: #a8b3c6; background: rgba(5,8,15,.4); font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 10px; }
.drag-col { cursor: grab; color: var(--subtle)!important; }
.drag-col .drag-handle { display: inline-flex; margin-right: 6px; color: #5f6b83; }
.drag-col .drag-handle .icon { width: 14px; height: 14px; }
tr.dragging { opacity: .42; outline: 1px dashed rgba(139,92,246,.5); }
.filter-panel { padding: 14px 16px; margin-bottom: 15px; }
.filter-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.search-box { display: flex; align-items: center; gap: 8px; flex: 1 1 260px; min-height: 37px; padding: 0 11px; border: 1px solid var(--line); border-radius: 8px; background: rgba(5,8,15,.36); }
.search-box .icon { width: 16px; height: 16px; color: var(--subtle); }
.search-box input { width: 100%; border: 0; outline: none; color: #dbe3f0; background: transparent; font-size: 12px; }
.search-box input::placeholder, input::placeholder, textarea::placeholder { color: #566178; }
.filter-form select, .filter-form input, .filter-bar input { min-height: 37px; }
select, input[type="text"], input[type="password"], input[type="email"], input[type="url"], input[type="number"], input[type="search"], input[type="datetime-local"], input[type="color"], textarea { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; outline: none; color: #dbe3f0; background: rgba(5,8,15,.4); transition: border-color .18s, box-shadow .18s; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #7c89a1 50%), linear-gradient(135deg, #7c89a1 50%, transparent 50%); background-position: calc(100% - 15px) 50%, calc(100% - 10px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 31px; }
textarea { resize: vertical; min-height: 84px; line-height: 1.7; }
select:focus, input:focus, textarea:focus { border-color: rgba(139,92,246,.6); box-shadow: 0 0 0 3px rgba(139,92,246,.1); }
input[type="color"] { padding: 3px; cursor: pointer; }
input[type="checkbox"] { accent-color: var(--violet); }
.form-grid { display: grid; gap: 14px; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid .full, .field.full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; color: #bbc5d6; font-size: 11px; font-weight: 650; }
.field > span { color: #b7c1d2; }
.field > small { color: var(--subtle); font-size: 10px; font-weight: 400; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: rgba(244,63,94,.55); }
.field-error { color: #ff879d!important; font-size: 10px!important; }
.form-panel { overflow: hidden; }
.form-panel > form, .form-panel > .form-grid, .form-panel > .compact-form, .form-panel > .profile-form { padding: 0 22px 22px; }
.form-panel > .form-grid.two { padding-bottom: 22px; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.form-help { margin: 9px 0 0; color: var(--subtle); font-size: 10px; line-height: 1.7; }
.alert { display: flex; align-items: flex-start; gap: 9px; margin-bottom: 16px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; font-size: 12px; }
.alert .icon { width: 17px; height: 17px; margin-top: 1px; }
.alert p { margin: 4px 0 0; }
.alert.success { color: #b9f4df; border-color: rgba(16,185,129,.19); background: rgba(16,185,129,.08); }
.alert.danger, .alert.alert-error { color: #ffd3db; border-color: rgba(244,63,94,.2); background: rgba(244,63,94,.09); }
.alert.warning { color: #ffe5ae; border-color: rgba(245,158,11,.2); background: rgba(245,158,11,.09); }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat-card { position: relative; display: flex; align-items: center; gap: 14px; padding: 19px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(145deg, rgba(19,27,44,.88), rgba(13,18,31,.8)); }
.stat-card::after { content: ""; position: absolute; width: 90px; height: 90px; right: -30px; top: -35px; border-radius: 50%; background: currentColor; opacity: .06; }
.stat-icon { width: 43px; height: 43px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 12px; background: rgba(139,92,246,.1); color: #ae91ff; }
.stat-icon .icon { width: 20px; height: 20px; }
.stat-card.tone-cyan .stat-icon { color: #55d7ec; background: rgba(6,182,212,.1); }
.stat-card.tone-emerald .stat-icon { color: #52d8aa; background: rgba(16,185,129,.1); }
.stat-card.tone-amber .stat-icon { color: #f3c15d; background: rgba(245,158,11,.1); }
.stat-copy { display: flex; flex-direction: column; min-width: 0; }
.stat-copy > span { color: var(--muted); font-size: 10px; }
.stat-copy strong { margin: 2px 0 0; font-size: 25px; line-height: 1.2; letter-spacing: -.035em; }
.stat-copy small { color: var(--subtle); font-size: 9px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, .55fr); gap: 16px; margin-bottom: 16px; }
.chart { height: 245px; display: flex; align-items: flex-end; gap: 7px; padding: 21px 22px 15px; }
.chart-column { flex: 1; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; min-width: 0; }
.chart-value { color: #7e8aa2; font-size: 8px; }
.chart-bar { width: min(26px, 80%); min-height: 4px; border-radius: 5px 5px 2px 2px; background: linear-gradient(to top, rgba(139,92,246,.42), #a78bfa); box-shadow: 0 0 14px rgba(139,92,246,.13); transition: height .5s ease; }
.chart-label { color: var(--subtle); font-size: 8px; white-space: nowrap; }
.rank-list { padding: 0 22px 18px; }
.rank-item { display: flex; align-items: center; gap: 9px; padding: 8px 0; border-bottom: 1px solid rgba(148,163,184,.09); font-size: 11px; }
.rank-item:last-child { border-bottom: 0; }
.rank-item img { width: 28px; height: 28px; border-radius: 7px; object-fit: cover; }
.rank-number { width: 18px; color: #6c7891; font-size: 9px; font-weight: 750; text-align: center; }
.rank-name { flex: 1; color: #b9c4d6; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-item strong { color: #dce5f4; font-size: 11px; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 14px 18px; border-top: 1px solid var(--line); font-size: 11px; }
.page-numbers { display: flex; gap: 4px; }
.page-link { display: inline-flex; align-items: center; gap: 4px; min-height: 29px; padding: 4px 9px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); }
.page-link:hover { color: #fff; border-color: var(--line-2); }
.page-link.active { color: #fff; border-color: rgba(139,92,246,.42); background: rgba(139,92,246,.18); }
.page-link.disabled { opacity: .35; pointer-events: none; }
.page-link .icon { width: 13px; height: 13px; }
.empty-state { display: flex; flex-direction: column; align-items: center; padding: 35px 20px; text-align: center; color: var(--muted); }
.empty-state.compact { padding: 16px; }
.empty-state h3 { margin: 7px 0 3px; color: var(--text); font-size: 15px; }
.empty-state p { margin: 0 0 12px; font-size: 11px; }
.empty-icon .icon { width: 37px; height: 37px; color: #675b8a; }
.app-editor { margin-bottom: 20px; }
.editor-grid { display: grid; grid-template-columns: minmax(0, 1fr) 315px; gap: 16px; align-items: start; }
.editor-main, .editor-side { display: grid; gap: 16px; min-width: 0; }
.editor-side { position: sticky; top: 92px; }
.form-panel .panel-heading { padding-bottom: 18px; }
.repeater { padding: 0 18px 18px; display: grid; gap: 12px; }
.repeater-item { border: 1px solid var(--line); border-radius: 11px; background: rgba(5,8,15,.27); overflow: hidden; }
.repeater-head { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.015); }
.repeater-head strong { font-size: 11px; }
.repeater-index { width: 19px; height: 19px; display: grid; place-items: center; border-radius: 5px; color: #bca8ff; background: rgba(139,92,246,.13); font-size: 9px; }
.repeater-head .icon-button { margin-left: auto; }
.platform-preview { display: inline-flex; align-items: center; gap: 4px; color: #8f9bb2; font-size: 9px; }
.platform-preview .icon { width: 14px; height: 14px; }
.repeater-item > .form-grid { padding: 13px; }
.input-with-icon { position: relative; display: flex; align-items: center; }
.input-with-icon > .icon { position: absolute; left: 11px; width: 16px; height: 16px; color: #66728a; pointer-events: none; }
.input-with-icon input { padding-left: 34px; }
.guide-repeater { padding: 0 22px 22px; display: grid; gap: 8px; }
.guide-row { display: flex; align-items: flex-start; gap: 8px; }
.guide-index { width: 22px; height: 22px; flex: 0 0 auto; display: grid; place-items: center; margin-top: 7px; border-radius: 6px; color: #aa91ff; background: rgba(139,92,246,.12); font-size: 9px; }
.guide-row textarea { min-height: 48px; flex: 1; }
.guide-row .icon-button { margin-top: 6px; }
.sticky-panel { position: relative; }
.switch-field { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 9px 0; cursor: pointer; }
.switch-field > span { display: flex; flex-direction: column; font-size: 11px; }
.switch-field strong { color: #c3ccdc; }
.switch-field small { color: var(--subtle); font-size: 9px; }
.switch-field input { position: absolute; opacity: 0; pointer-events: none; }
.switch-field i { width: 35px; height: 20px; flex: 0 0 auto; border-radius: 999px; border: 1px solid var(--line-2); background: #171f31; position: relative; transition: .2s; }
.switch-field i::after { content: ""; position: absolute; width: 14px; height: 14px; top: 2px; left: 2px; border-radius: 50%; background: #7d899f; transition: .2s; }
.switch-field input:checked + i { border-color: rgba(139,92,246,.55); background: rgba(139,92,246,.55); }
.switch-field input:checked + i::after { left: 17px; background: #fff; }
.switch-field.inline { padding: 7px 0; }
.switch-field.full { grid-column: 1 / -1; }
.color-input { display: flex; gap: 7px; }
.color-input input[type="color"] { width: 43px; flex: 0 0 auto; }
.color-input input[type="text"] { flex: 1; font-family: ui-monospace, Consolas, monospace; text-transform: uppercase; }
.icon-editor { display: flex; align-items: center; gap: 15px; padding: 0 22px 17px; }
.icon-editor > img { width: 77px; height: 77px; flex: 0 0 auto; border-radius: 18px; object-fit: cover; background: var(--panel-2); border: 1px solid var(--line); }
.icon-editor > div { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; }
.icon-editor small { color: var(--subtle); font-size: 9px; line-height: 1.55; }
.upload-button { cursor: pointer; }
.form-panel > .field, .form-panel > .checkbox-field, .form-panel > .form-help { margin-left: 22px; margin-right: 22px; }
.checkbox-field { display: flex; flex-direction: row; align-items: center; gap: 7px; padding: 12px 0 0; }
.checkbox-field small { color: var(--subtle); font-size: 9px; }
.tag-selector { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 22px 22px; }
.tag-option { cursor: pointer; }
.tag-option input { position: absolute; opacity: 0; pointer-events: none; }
.tag-option span { display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; border: 1px solid var(--line); border-radius: 999px; color: #97a3b9; background: rgba(255,255,255,.025); font-size: 10px; transition: .18s; }
.tag-option i { width: 5px; height: 5px; border-radius: 50%; background: var(--tag-color, #8b5cf6); }
.tag-option input:checked + span { color: #fff; border-color: color-mix(in srgb, var(--tag-color, #8b5cf6) 50%, transparent); background: color-mix(in srgb, var(--tag-color, #8b5cf6) 15%, transparent); }
.text-link { display: inline-flex; align-items: center; gap: 3px; color: #a58ae8; font-size: 10px; font-weight: 650; }
.text-link:hover { color: #fff; }
.text-link .icon { width: 13px; height: 13px; }
.two-column-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.stack { display: grid; gap: 16px; align-content: start; min-width: 0; }
.compact-form { display: grid; gap: 12px; }
.content-list { padding: 0 22px 20px; display: grid; gap: 9px; }
.content-item { padding: 13px; border: 1px solid var(--line); border-radius: 9px; background: rgba(5,8,15,.24); }
.content-item-head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 11px; }
.content-item-head strong { flex: 1; color: #dbe4f2; font-size: 12px; }
.content-item p { margin: 7px 0; color: var(--muted); font-size: 10px; line-height: 1.7; }
.content-item-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.content-item-foot small { color: var(--subtle); font-size: 9px; }
.tag-manage-list { padding: 0 22px 20px; display: grid; gap: 7px; }
.tag-manage-item { display: flex; align-items: center; gap: 9px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; background: rgba(5,8,15,.23); }
.tag-manage-item > .muted { flex: 1; font-size: 9px; }
.tag { --tag-color: #8b5cf6; display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 999px; color: color-mix(in srgb, var(--tag-color) 55%, white); border: 1px solid color-mix(in srgb, var(--tag-color) 28%, transparent); background: color-mix(in srgb, var(--tag-color) 10%, transparent); font-size: 9px; font-weight: 700; }
.mini-icon { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 7px; color: #a993f5; background: rgba(139,92,246,.1); }
.mini-icon .icon { width: 15px; height: 15px; }
.inline-name { display: flex; align-items: center; gap: 8px; }
.settings-layout { display: grid; grid-template-columns: 205px minmax(0, 1fr); gap: 18px; align-items: start; }
.settings-nav { position: sticky; top: 94px; display: grid; gap: 4px; padding: 9px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(13,18,31,.7); }
.settings-nav a { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border: 1px solid transparent; border-radius: 8px; color: #8995ad; font-size: 11px; }
.settings-nav a:hover { color: #fff; background: rgba(255,255,255,.035); }
.settings-nav a.active { color: #fff; border-color: rgba(139,92,246,.17); background: rgba(139,92,246,.13); }
.settings-nav .icon { width: 15px; height: 15px; }
.settings-sections, .settings-content { display: grid; gap: 16px; min-width: 0; }
.settings-section { scroll-margin-top: 95px; }
.settings-section > .form-grid { padding: 0 22px 22px; }
.settings-section-icon { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 8px; color: #9b84e8; background: rgba(139,92,246,.09); }
.settings-section-icon .icon { width: 16px; height: 16px; }
.settings-submit { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 22px; }
.settings-submit strong { font-size: 13px; }
.settings-submit p { margin: 2px 0 0; color: var(--subtle); font-size: 10px; }
.code-input { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 11px; }
.profile-facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; padding: 0 22px 17px; }
.profile-facts div { padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: rgba(5,8,15,.23); }
.profile-facts dt { color: var(--subtle); font-size: 9px; }
.profile-facts dd { margin: 2px 0 0; font-size: 11px; }
.profile-form { padding: 0 22px 22px; }
.narrow-panel { max-width: 690px; }
.filter-bar { display: flex; align-items: flex-end; gap: 8px; padding: 15px 18px; flex-wrap: wrap; }
.search-field { flex: 1 1 260px; }
.summary-cell { max-width: 280px; }
.ua-cell { max-width: 180px; }
.auth-body { min-height: 100vh; display: grid; place-items: center; overflow: hidden; background: radial-gradient(900px 600px at 15% 25%, rgba(139,92,246,.18), transparent 65%), radial-gradient(800px 600px at 85% 80%, rgba(236,72,153,.11), transparent 65%), #080b14; }
.auth-shell { position: relative; z-index: 2; width: min(980px, calc(100% - 32px)); min-height: 600px; display: grid; grid-template-columns: 1fr .95fr; border: 1px solid var(--line-2); border-radius: 24px; overflow: hidden; background: rgba(12,17,30,.79); box-shadow: 0 50px 140px rgba(0,0,0,.5); backdrop-filter: blur(24px); }
.auth-panel { display: flex; flex-direction: column; justify-content: center; padding: 48px 52px; }
.auth-heading { margin-bottom: 25px; }
.auth-brand { display: inline-flex; gap: 10px; margin-bottom: 37px; }
.auth-brand > span:last-child { display: flex; flex-direction: column; line-height: 1.3; }
.auth-brand small { color: var(--subtle); font-size: 8px; letter-spacing: .13em; }
.auth-heading h1 { margin: 9px 0 7px; font-size: 31px; letter-spacing: -.04em; }
.auth-heading p { color: var(--muted); font-size: 12px; }
.auth-form { display: grid; gap: 13px; }
.auth-form .field { gap: 6px; }
.auth-form input { min-height: 44px; }
.auth-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 27px; padding-top: 17px; border-top: 1px solid var(--line); color: var(--subtle); font-size: 9px; }
.auth-foot span, .auth-foot a { display: inline-flex; align-items: center; gap: 4px; }
.auth-foot .icon { width: 13px; height: 13px; }
.auth-showcase { position: relative; display: flex; align-items: flex-end; padding: 45px; overflow: hidden; background: radial-gradient(500px 440px at 90% 5%, rgba(236,72,153,.24), transparent 65%), radial-gradient(600px 500px at 5% 75%, rgba(139,92,246,.32), transparent 65%), linear-gradient(145deg, #151a2a, #0b0f1a); }
.auth-showcase::before { content: ""; position: absolute; width: 460px; height: 460px; top: -170px; right: -210px; border-radius: 50%; border: 1px solid rgba(255,255,255,.09); box-shadow: 0 0 0 55px rgba(255,255,255,.018), 0 0 0 110px rgba(255,255,255,.012); }
.showcase-content { position: relative; z-index: 1; }
.showcase-content h2 { margin: 12px 0; font-size: 32px; line-height: 1.15; letter-spacing: -.045em; text-wrap: balance; }
.showcase-content > p { color: #9ba7bd; font-size: 12px; line-height: 1.8; }
.showcase-grid { display: grid; gap: 9px; margin-top: 28px; }
.showcase-grid > div { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid rgba(255,255,255,.07); border-radius: 9px; background: rgba(255,255,255,.035); }
.showcase-grid .icon { width: 19px; height: 19px; color: #c3afff; }
.showcase-grid span { display: flex; flex-direction: column; line-height: 1.35; }
.showcase-grid strong { font-size: 10px; }
.showcase-grid small { color: #7e8ba2; font-size: 8px; }
.auth-orb { position: fixed; border-radius: 50%; filter: blur(1px); pointer-events: none; }
.auth-orb-a { width: 350px; height: 350px; top: -190px; left: -120px; background: rgba(139,92,246,.1); }
.auth-orb-b { width: 250px; height: 250px; bottom: -120px; right: -100px; background: rgba(236,72,153,.07); }
.install-body { min-height: 100vh; padding: 35px 20px 60px; color: var(--text); background: radial-gradient(800px 500px at 50% -10%, rgba(139,92,246,.18), transparent 65%), #080b14; font-family: var(--font, "Segoe UI", sans-serif); }
.install-shell { max-width: 880px; margin: 0 auto; }
.install-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 20px; }
.install-brand > div { display: flex; flex-direction: column; line-height: 1.25; }
.install-brand small { color: var(--muted); font-size: 10px; }
.install-card { padding: 30px; border: 1px solid var(--line); border-radius: 20px; background: rgba(16,23,38,.82); box-shadow: 0 30px 90px rgba(0,0,0,.35); }
.install-heading h1 { margin: 9px 0 7px; font-size: 28px; letter-spacing: -.035em; }
.install-heading p { color: var(--muted); font-size: 12px; }
.requirements { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin: 21px 0; }
.requirement { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 7px; font-size: 10px; }
.requirement small { margin-left: auto; color: var(--subtle); font-size: 9px; }
.req-status { width: 17px; height: 17px; display: grid; place-items: center; border-radius: 50%; color: #6ee7b7; background: rgba(16,185,129,.12); font-size: 9px; }
.requirement.bad .req-status { color: #ff9eb0; background: rgba(244,63,94,.12); }
.install-form { display: grid; gap: 17px; }
.form-section { padding-top: 18px; border-top: 1px solid var(--line); }
.form-section h2 { margin: 0 0 12px; font-size: 14px; }
.db-fields { margin-top: 9px; }
.install-submit { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.install-submit p { margin: 0; color: var(--subtle); font-size: 10px; }
@media (max-width: 1100px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .editor-grid { grid-template-columns: minmax(0,1fr) 290px; }
  .form-grid.three { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-sidebar { position: fixed; left: 0; top: 0; width: 260px; transform: translateX(-100%); transition: transform .22s ease; box-shadow: 20px 0 60px rgba(0,0,0,.4); }
  .admin-shell.menu-open .admin-sidebar { transform: none; }
  .admin-overlay { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(2,5,10,.68); opacity: 0; visibility: hidden; transition: .22s; }
  .admin-shell.menu-open .admin-overlay { opacity: 1; visibility: visible; }
  .admin-menu-toggle { display: inline-grid; }
  .admin-topbar { padding-inline: 20px; }
  .topbar-user > span:last-child { display: none; }
  .admin-content { padding: 23px 20px 35px; }
  .editor-grid, .dashboard-grid, .two-column-grid, .settings-layout { grid-template-columns: 1fr; }
  .editor-side, .settings-nav { position: static; }
  .settings-nav { display: flex; overflow-x: auto; }
  .settings-nav a { white-space: nowrap; }
  .auth-shell { grid-template-columns: 1fr; min-height: 0; }
  .auth-showcase { display: none; }
  .detail-side { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .admin-topbar { height: 65px; padding-inline: 14px; }
  .topbar-kicker { display: none; }
  .admin-topbar h1 { font-size: 15px; }
  .topbar-actions .button { display: none; }
  .admin-content { padding: 18px 13px 28px; }
  .admin-footer { padding-inline: 14px; flex-direction: column; gap: 2px; }
  .page-heading { align-items: flex-start; flex-direction: column; margin-bottom: 18px; gap: 12px; }
  .page-heading h2 { font-size: 23px; }
  .page-heading .heading-actions { width: 100%; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .stat-card { padding: 13px; gap: 9px; }
  .stat-icon { width: 35px; height: 35px; }
  .stat-copy strong { font-size: 20px; }
  .form-grid.two, .form-grid.three, .profile-facts { grid-template-columns: 1fr; }
  .panel-heading { padding-inline: 15px; }
  .form-panel > form, .form-panel > .form-grid, .form-panel > .compact-form, .form-panel > .profile-form { padding-inline: 15px; }
  .form-panel > .field, .form-panel > .checkbox-field, .form-panel > .form-help { margin-left: 15px; margin-right: 15px; }
  .repeater { padding-inline: 12px; }
  .tag-selector, .guide-repeater, .icon-editor { padding-inline: 15px; }
  .settings-section > .form-grid { padding-inline: 15px; }
  .pagination { flex-wrap: wrap; }
  .page-numbers { order: 3; width: 100%; justify-content: center; }
  .filter-form { align-items: stretch; }
  .filter-form select { flex: 1 1 40%; }
  .filter-form .button { flex: 1; }
  .auth-body { display: block; padding: 16px; overflow: auto; }
  .auth-shell { width: 100%; border-radius: 18px; }
  .auth-panel { padding: 32px 22px; }
  .auth-brand { margin-bottom: 26px; }
  .install-body { padding: 18px 12px 35px; }
  .install-card { padding: 20px 16px; border-radius: 15px; }
  .requirements { grid-template-columns: 1fr; }
  .install-submit { align-items: stretch; flex-direction: column; }
  .install-submit .button { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms!important; animation-iteration-count: 1!important; transition-duration: .01ms!important; }
}


/* ==========================================================================
   Enterprise light theme (admin default) and dark theme
   ========================================================================== */
html[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f7fb;
  --bg-2: #ffffff;
  --sidebar: #ffffff;
  --panel: #ffffff;
  --panel-2: #f3f6fb;
  --line: rgba(15,23,42,.09);
  --line-2: rgba(15,23,42,.16);
  --text: #172033;
  --muted: #617089;
  --subtle: #8a96aa;
}
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #080b14;
  --bg-2: #0c111e;
  --sidebar: #0b0f1a;
  --panel: #101726;
  --panel-2: #141c2e;
  --line: rgba(148,163,184,.13);
  --line-2: rgba(148,163,184,.23);
  --text: #eef2fb;
  --muted: #919db4;
  --subtle: #65718a;
}
html[data-theme="light"] body {
  background:
    radial-gradient(780px 460px at 88% -8%, rgba(139,92,246,.065), transparent 68%),
    radial-gradient(620px 420px at 8% 105%, rgba(6,182,212,.035), transparent 72%),
    var(--bg);
}
html[data-theme="light"] body::before {
  background:
    radial-gradient(700px 420px at 85% -8%, rgba(139,92,246,.045), transparent 65%),
    radial-gradient(560px 400px at 10% 100%, rgba(6,182,212,.025), transparent 70%);
}
html[data-theme="light"] .admin-sidebar {
  background: rgba(255,255,255,.94);
  box-shadow: 8px 0 30px rgba(31,41,55,.025);
}
html[data-theme="light"] .admin-brand small { color: #8c97aa; }
html[data-theme="light"] .admin-nav-item { color: #5e6c83; }
html[data-theme="light"] .admin-nav-item .icon { color: #8b96a8; }
html[data-theme="light"] .admin-nav-item small { color: #8d98aa; background: rgba(255,255,255,.6); }
html[data-theme="light"] .admin-nav-item:hover { color: #26334b; background: rgba(15,23,42,.04); }
html[data-theme="light"] .admin-nav-item.active {
  color: #4d2ba4;
  border-color: rgba(124,58,237,.14);
  background: linear-gradient(90deg, rgba(139,92,246,.12), rgba(139,92,246,.035));
}
html[data-theme="light"] .admin-nav-item.active .icon { color: #7654c8; }
html[data-theme="light"] .avatar {
  color: #6041ad;
  border-color: rgba(124,58,237,.14);
  background: linear-gradient(145deg, rgba(139,92,246,.18), rgba(236,72,153,.08));
}
html[data-theme="light"] .sidebar-foot-link { color: #6d7a90; }
html[data-theme="light"] .sidebar-foot-link:hover { color: #29364e; background: rgba(15,23,42,.045); }
html[data-theme="light"] .admin-topbar {
  background: rgba(255,255,255,.82);
  box-shadow: 0 8px 30px rgba(31,41,55,.035);
}
html[data-theme="light"] .topbar-kicker { color: #8a75b5; }
html[data-theme="light"] .topbar-user { color: #536179; background: rgba(255,255,255,.65); }
html[data-theme="light"] .admin-footer { color: #8d98aa; }
html[data-theme="light"] .eyebrow { color: #7253bf; }
html[data-theme="light"] .button.ghost {
  color: #526078;
  border-color: rgba(15,23,42,.13);
  background: rgba(255,255,255,.72);
}
html[data-theme="light"] .button.ghost:hover {
  color: #4d2ba4;
  border-color: rgba(124,58,237,.32);
  background: rgba(139,92,246,.075);
}
html[data-theme="light"] .button.danger { color: #be123c; background: rgba(244,63,94,.075); }
html[data-theme="light"] .icon-button {
  color: #69768b;
  background: rgba(255,255,255,.58);
}
html[data-theme="light"] .icon-button:hover {
  color: #172033;
  background: rgba(15,23,42,.055);
}
html[data-theme="light"] .panel {
  background: rgba(255,255,255,.96);
  box-shadow: 0 12px 38px rgba(31,41,55,.055), inset 0 1px rgba(255,255,255,.9);
}
html[data-theme="light"] .panel-heading p { color: #8793a7; }
html[data-theme="light"] .panel-kicker { color: #8d79b7; }
html[data-theme="light"] .panel-badge {
  color: #69778c;
  background: #f8fafc;
}
html[data-theme="light"] .data-table th {
  color: #7a879b;
  background: #f7f9fc;
}
html[data-theme="light"] .data-table td {
  color: #536178;
  border-color: rgba(15,23,42,.065);
}
html[data-theme="light"] .data-table tbody tr:hover { background: rgba(139,92,246,.035); }
html[data-theme="light"] .data-table strong { color: #243149; }
html[data-theme="light"] .featured-dot { color: #c52c55; background: rgba(244,63,94,.08); }
html[data-theme="light"] .count-chip { color: #68758a; background: #f8fafc; }
html[data-theme="light"] .code-chip {
  color: #56647a;
  background: #f6f8fb;
}
html[data-theme="light"] .drag-col .drag-handle { color: #919cae; }
html[data-theme="light"] tr.dragging { outline-color: rgba(124,58,237,.38); }
html[data-theme="light"] .search-box {
  background: #f8fafc;
}
html[data-theme="light"] .search-box input { color: #26334a; }
html[data-theme="light"] .search-box input::placeholder,
html[data-theme="light"] input::placeholder,
html[data-theme="light"] textarea::placeholder { color: #9aa5b6; }
html[data-theme="light"] select,
html[data-theme="light"] input[type="text"],
html[data-theme="light"] input[type="password"],
html[data-theme="light"] input[type="email"],
html[data-theme="light"] input[type="url"],
html[data-theme="light"] input[type="number"],
html[data-theme="light"] input[type="search"],
html[data-theme="light"] input[type="datetime-local"],
html[data-theme="light"] input[type="color"],
html[data-theme="light"] textarea {
  color: #26334a;
  background-color: #fbfcfe;
}
html[data-theme="light"] select {
  background-image:
    linear-gradient(45deg, transparent 50%, #7f8b9f 50%),
    linear-gradient(135deg, #7f8b9f 50%, transparent 50%);
  background-color: #fbfcfe;
}
html[data-theme="light"] .field { color: #56647a; }
html[data-theme="light"] .field > span { color: #4a5870; }
html[data-theme="light"] .field > small { color: #8b96a8; }
html[data-theme="light"] .alert.success { color: #047857; background: rgba(16,185,129,.065); }
html[data-theme="light"] .alert.danger,
html[data-theme="light"] .alert.alert-error { color: #be123c; background: rgba(244,63,94,.06); }
html[data-theme="light"] .alert.warning { color: #a16207; background: rgba(245,158,11,.07); }
html[data-theme="light"] .stat-card {
  background: linear-gradient(145deg, #ffffff, #f9fbfe);
  box-shadow: 0 10px 34px rgba(31,41,55,.045);
}
html[data-theme="light"] .stat-icon { color: #7250c4; background: rgba(139,92,246,.09); }
html[data-theme="light"] .stat-card.tone-cyan .stat-icon { color: #0891b2; background: rgba(6,182,212,.085); }
html[data-theme="light"] .stat-card.tone-emerald .stat-icon { color: #059669; background: rgba(16,185,129,.085); }
html[data-theme="light"] .stat-card.tone-amber .stat-icon { color: #b45309; background: rgba(245,158,11,.09); }
html[data-theme="light"] .chart-value,
html[data-theme="light"] .rank-number { color: #8c97aa; }
html[data-theme="light"] .rank-item { border-color: rgba(15,23,42,.07); }
html[data-theme="light"] .rank-name { color: #526078; }
html[data-theme="light"] .rank-item strong { color: #2a3850; }
html[data-theme="light"] .page-link:hover,
html[data-theme="light"] .page-link.active { color: #4e2ba7; }
html[data-theme="light"] .empty-icon .icon { color: #8c76bb; }
html[data-theme="light"] .repeater-item {
  background: #f9fbfd;
  box-shadow: inset 0 1px rgba(255,255,255,.85);
}
html[data-theme="light"] .repeater-head {
  background: #f4f7fb;
}
html[data-theme="light"] .repeater-index { color: #6442b6; background: rgba(139,92,246,.1); }
html[data-theme="light"] .platform-preview { color: #758298; }
html[data-theme="light"] .input-with-icon > .icon { color: #8995a8; }
html[data-theme="light"] .guide-index { color: #6643b5; background: rgba(139,92,246,.095); }
html[data-theme="light"] .switch-field strong { color: #46556d; }
html[data-theme="light"] .switch-field i { background: #dce3ec; }
html[data-theme="light"] .switch-field input:checked + i { background: #8b5cf6; }
html[data-theme="light"] .tag-option span {
  color: #67758b;
  background: #f8fafc;
}
html[data-theme="light"] .tag-option input:checked + span { color: #4e2ba7; }
html[data-theme="light"] .text-link { color: #6f4bc2; }
html[data-theme="light"] .text-link:hover { color: #39216f; }
html[data-theme="light"] .content-item,
html[data-theme="light"] .tag-manage-item,
html[data-theme="light"] .profile-facts div {
  background: #f9fbfd;
}
html[data-theme="light"] .content-item-head strong { color: #2b3952; }
html[data-theme="light"] .tag { color: color-mix(in srgb, var(--tag-color) 62%, #111827); }
html[data-theme="light"] .mini-icon { color: #6f4bc2; background: rgba(139,92,246,.09); }
html[data-theme="light"] .settings-nav { background: rgba(255,255,255,.95); }
html[data-theme="light"] .settings-nav a { color: #6b788d; }
html[data-theme="light"] .settings-nav a:hover { color: #26334b; background: rgba(15,23,42,.04); }
html[data-theme="light"] .settings-nav a.active {
  color: #4d2ba4;
  border-color: rgba(124,58,237,.14);
  background: rgba(139,92,246,.09);
}
html[data-theme="light"] .settings-section-icon { color: #6d4abd; background: rgba(139,92,246,.08); }
html[data-theme="light"] .warning,
html[data-theme="light"] .form-help { color: #8995a8; }
html[data-theme="light"] .image-setting-preview { border-color: var(--line); }
html[data-theme="light"] .content-item p { color: #68758a; }
html[data-theme="light"] .admin-overlay { background: rgba(15,23,42,.36); }
html[data-theme="light"] .toast {
  color: #26334a;
  background: #ffffff;
  box-shadow: 0 18px 55px rgba(31,41,55,.18);
}
html[data-theme="light"] .toast-success { color: #047857; }
html[data-theme="light"] .toast-error { color: #be123c; }

/* Login */
html[data-theme="light"] .auth-body {
  background:
    radial-gradient(900px 600px at 15% 25%, rgba(139,92,246,.10), transparent 65%),
    radial-gradient(800px 600px at 85% 80%, rgba(236,72,153,.07), transparent 65%),
    #f5f8fc;
}
html[data-theme="light"] .auth-shell {
  background: rgba(255,255,255,.88);
  box-shadow: 0 50px 140px rgba(31,41,55,.16);
}
html[data-theme="light"] .auth-showcase {
  background:
    radial-gradient(500px 440px at 90% 5%, rgba(236,72,153,.17), transparent 65%),
    radial-gradient(600px 500px at 5% 75%, rgba(139,92,246,.23), transparent 65%),
    linear-gradient(145deg, #f0eaff, #f8fafc);
}
html[data-theme="light"] .auth-showcase::before {
  border-color: rgba(86,64,140,.10);
  box-shadow: 0 0 0 55px rgba(124,58,237,.025), 0 0 0 110px rgba(124,58,237,.016);
}
html[data-theme="light"] .showcase-content > p { color: #66748a; }
html[data-theme="light"] .showcase-grid > div {
  border-color: rgba(15,23,42,.07);
  background: rgba(255,255,255,.54);
}
html[data-theme="light"] .showcase-grid .icon { color: #7253bd; }
html[data-theme="light"] .showcase-grid small { color: #7e8a9d; }
html[data-theme="light"] .auth-foot { color: #8a96a8; }

/* Installer */
html[data-theme="light"] .install-body {
  color: var(--text);
  background:
    radial-gradient(800px 500px at 50% -10%, rgba(139,92,246,.11), transparent 65%),
    #f6f8fc;
}
html[data-theme="light"] .install-card {
  background: rgba(255,255,255,.97);
  box-shadow: 0 30px 90px rgba(31,41,55,.12);
}
html[data-theme="light"] .requirement { background: rgba(248,250,252,.76); }
html[data-theme="light"] .req-status { color: #047857; }
html[data-theme="light"] .requirement.bad .req-status { color: #be123c; }

/* Dark theme explicit component restoration */
html[data-theme="dark"] .admin-sidebar { background: rgba(9,13,23,.92); }
html[data-theme="dark"] .admin-topbar { background: rgba(8,11,20,.75); }
html[data-theme="dark"] .panel { background: linear-gradient(155deg, rgba(17,24,39,.82), rgba(13,18,31,.82)); }
html[data-theme="dark"] .data-table th { color: #6f7b92; background: rgba(5,8,15,.24); }
html[data-theme="dark"] .data-table td { color: #b4bed0; border-color: rgba(148,163,184,.075); }
html[data-theme="dark"] .data-table strong { color: #e7ecf6; }
html[data-theme="dark"] .repeater-item { background: rgba(5,8,15,.27); }
html[data-theme="dark"] .repeater-head { background: rgba(255,255,255,.015); }
html[data-theme="dark"] .search-box,
html[data-theme="dark"] select,
html[data-theme="dark"] input[type="text"],
html[data-theme="dark"] input[type="password"],
html[data-theme="dark"] input[type="email"],
html[data-theme="dark"] input[type="url"],
html[data-theme="dark"] input[type="number"],
html[data-theme="dark"] input[type="search"],
html[data-theme="dark"] input[type="datetime-local"],
html[data-theme="dark"] input[type="color"],
html[data-theme="dark"] textarea { color: #dbe3f0; background-color: rgba(5,8,15,.4); }
html[data-theme="dark"] .content-item,
html[data-theme="dark"] .tag-manage-item,
html[data-theme="dark"] .profile-facts div { background: rgba(5,8,15,.23); }
html[data-theme="dark"] .settings-nav { background: rgba(13,18,31,.7); }
html[data-theme="dark"] .auth-body { background: radial-gradient(900px 600px at 15% 25%, rgba(139,92,246,.18), transparent 65%), radial-gradient(800px 600px at 85% 80%, rgba(236,72,153,.11), transparent 65%), #080b14; }
html[data-theme="dark"] .auth-shell { background: rgba(12,17,30,.79); box-shadow: 0 50px 140px rgba(0,0,0,.5); }
html[data-theme="dark"] .auth-showcase { background: radial-gradient(500px 440px at 90% 5%, rgba(236,72,153,.24), transparent 65%), radial-gradient(600px 500px at 5% 75%, rgba(139,92,246,.32), transparent 65%), linear-gradient(145deg, #151a2a, #0b0f1a); }
html[data-theme="dark"] .install-body { color: var(--text); background: radial-gradient(800px 500px at 50% -10%, rgba(139,92,246,.18), transparent 65%), #080b14; }
html[data-theme="dark"] .install-card { background: rgba(16,23,38,.82); box-shadow: 0 30px 90px rgba(0,0,0,.35); }
html[data-theme="dark"] .toast { color: #eef2fb; background: #111827; box-shadow: 0 18px 55px rgba(0,0,0,.4); }

/* Theme controls and feedback */
.admin-theme-toggle,
.auth-theme-toggle {
  color: var(--muted);
  background: rgba(255,255,255,.045);
}
html[data-theme="light"] .admin-theme-toggle,
html[data-theme="light"] .auth-theme-toggle { background: rgba(255,255,255,.7); }
.auth-theme-toggle { position: fixed; top: 20px; right: 22px; z-index: 20; }
.copy-feedback { font-weight: 700; }
.copy-code.is-copied { color: #047857!important; background: rgba(16,185,129,.10)!important; }
.copy-code.is-copy-failed { color: #be123c!important; background: rgba(244,63,94,.09)!important; }
