:root {
  --red: #9a1010;
  --red-2: #d42b2b;
  --red-3: #6e0a0a;
  --tint: #fcedee;
  --tint-2: #fff6f6;
  --ink: #1a1214;
  --muted: #7a6e70;
  --line: #f0e4e4;
  --bg: #fbf6f6;
  --card: #ffffff;
  --green: #14925a;
  --green-bg: #e6f6ee;
  --amber: #d98a00;
  --radius: 22px;
  --shadow: 0 10px 34px rgba(154, 16, 16, .08);
  --shadow-sm: 0 4px 16px rgba(154, 16, 16, .06);
  --grad: linear-gradient(135deg, #d42b2b 0%, #9a1010 55%, #6e0a0a 100%);
  font-family: 'Poppins', 'Cairo', system-ui, sans-serif;
}
html[lang='ar'] { font-family: 'Cairo', 'Poppins', system-ui, sans-serif; }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font-size: 14px; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; display: inline-block; }

/* ------------------------------------------------------------------ layout */
.shell { display: grid; grid-template-columns: 264px 1fr; min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; background: #fff; border-inline-end: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 22px 16px; gap: 6px;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 22px; }
.brand img { width: 46px; height: 46px; border-radius: 50%; box-shadow: 0 6px 18px rgba(154,16,16,.25); }
.brand b { display: block; font-size: 17px; font-weight: 800; letter-spacing: .2px; }
.brand span { font-size: 11.5px; color: var(--muted); }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; font-weight: 600;
  color: var(--muted); transition: .18s; margin-bottom: 4px;
}
.nav a svg { width: 20px; height: 20px; flex: none; }
.nav a:hover { background: var(--tint-2); color: var(--red); }
.nav a.active { background: var(--grad); color: #fff; box-shadow: 0 8px 22px rgba(154,16,16,.3); }
.side .grow { flex: 1; }
.me { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 16px; background: var(--tint-2); border: 1px solid var(--line); }
.me .meta { min-width: 0; flex: 1; }
.me b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me span { font-size: 11px; color: var(--muted); }

.main { min-width: 0; padding: 0 30px 40px; }
.top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; padding: 18px 0 14px;
  background: linear-gradient(var(--bg) 78%, transparent);
}
.top h1 { margin: 0; font-size: 24px; font-weight: 800; flex: 1; letter-spacing: .1px; }
.top .sub { font-size: 12.5px; color: var(--muted); font-weight: 500; margin-top: 2px; display: block; }
.pill-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; background: #fff; border: 1px solid var(--line);
  border-radius: 14px; cursor: pointer; font-weight: 600; font-size: 13px; transition: .15s; box-shadow: var(--shadow-sm);
}
.pill-btn:hover { border-color: var(--red-2); color: var(--red); }
.pill-btn svg { width: 17px; height: 17px; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(20,146,90,.6); animation: pulse 1.8s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(20,146,90,0); } 100% { box-shadow: 0 0 0 0 rgba(20,146,90,0); } }

/* ------------------------------------------------------------------- cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 20px; }
.card h3 { margin: 0 0 4px; font-size: 16px; font-weight: 700; }
.card .hint { font-size: 12.5px; color: var(--muted); margin-bottom: 14px; }
.card-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head > div:first-child { flex: 1; min-width: 160px; }
.card-head h3 { margin: 0; }
.card-head .hint { margin: 2px 0 0; }

.grid { display: grid; gap: 18px; }
.kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 18px; }
@media (min-width: 1760px) { .kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (max-width: 640px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .kpi .value { font-size: 26px; } }
.two { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); margin-bottom: 18px; }
.two-eq { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 18px; }
.three { grid-template-columns: 1.1fr 1fr 1fr; margin-bottom: 18px; }
@media (max-width: 1180px) { .two, .two-eq, .three { grid-template-columns: 1fr; } }

.kpi { position: relative; overflow: hidden; }
.kpi .ico {
  width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--tint); color: var(--red);
}
.kpi .ico svg { width: 22px; height: 22px; }
.kpi .label { color: var(--muted); font-size: 12.5px; font-weight: 600; margin-top: 14px; }
.kpi .value { font-size: 32px; font-weight: 800; letter-spacing: -.5px; line-height: 1.15; margin-top: 2px; }
.kpi .value small { font-size: 14px; color: var(--muted); font-weight: 600; letter-spacing: 0; margin-inline-start: 4px; }
.kpi::after {
  content: ''; position: absolute; inset-inline-end: -26px; top: -26px; width: 100px; height: 100px; border-radius: 50%;
  background: radial-gradient(circle, rgba(212,43,43,.10), transparent 70%);
}
.delta { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 20px; font-size: 12px; font-weight: 700; margin-top: 8px; }
.delta.up { background: var(--green-bg); color: var(--green); }
.delta.down { background: var(--tint); color: var(--red); }
.delta.flat { background: #f3efef; color: var(--muted); }

/* hero */
.hero {
  background: var(--grad); color: #fff; border: none; position: relative; overflow: hidden;
  box-shadow: 0 18px 44px rgba(154,16,16,.32);
}
.hero::before, .hero::after { content: ''; position: absolute; border-radius: 50%; background: rgba(255,255,255,.07); }
.hero::before { width: 260px; height: 260px; inset-inline-end: -70px; top: -90px; }
.hero::after { width: 160px; height: 160px; inset-inline-end: 80px; bottom: -80px; }
.hero > * { position: relative; z-index: 1; }
.hero .eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; opacity: .8; display: flex; align-items: center; gap: 8px; }
.hero .who { display: flex; align-items: center; gap: 16px; margin-top: 18px; }
.hero .who .avatar { width: 64px; height: 64px; font-size: 26px; background: #fff; color: var(--red); }
.hero h2 { margin: 0; font-size: 24px; font-weight: 800; }
.hero .big { font-size: 40px; font-weight: 800; line-height: 1; }
.hero .big small { font-size: 14px; font-weight: 600; opacity: .85; margin-inline-start: 6px; }
.hero.alt { background: linear-gradient(135deg, #1a1214 0%, #3a1417 60%, #6e0a0a 100%); box-shadow: 0 18px 44px rgba(26,18,20,.3); }

/* podium */
.podium { display: flex; align-items: flex-end; justify-content: center; gap: 12px; height: 210px; padding-top: 8px; }
.podium .pl { flex: 1; max-width: 120px; text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; }
.podium .pl .avatar { margin-bottom: 8px; }
.podium .pl .nm { font-weight: 700; font-size: 12.5px; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.podium .pl .sc { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.podium .bar { width: 100%; border-radius: 14px 14px 6px 6px; display: grid; place-items: start center; padding-top: 8px; color: #fff; font-weight: 800; font-size: 20px; }
.podium .p1 .bar { height: 96px; background: var(--grad); }
.podium .p2 .bar { height: 68px; background: linear-gradient(180deg, #e46a6a, #c43d3d); }
.podium .p3 .bar { height: 48px; background: linear-gradient(180deg, #f1a3a3, #e07a7a); }
.crown { color: #e8a400; width: 20px; height: 20px; margin-bottom: -2px; }

/* avatar */
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; flex: none; font-size: 15px; background: var(--grad); }
img.avatar { object-fit: cover; background: #f6ecec; }
.avatar.lg { width: 76px; height: 76px; font-size: 30px; }
.avatar.sm { width: 30px; height: 30px; font-size: 12.5px; }
.avatar.c1 { background: linear-gradient(135deg, #d42b2b, #9a1010); }
.avatar.c2 { background: linear-gradient(135deg, #e0574f, #b32323); }
.avatar.c3 { background: linear-gradient(135deg, #c0392b, #7d0e0e); }
.avatar.c4 { background: linear-gradient(135deg, #ef7b6c, #c43d3d); }
.avatar.c5 { background: linear-gradient(135deg, #a61c1c, #5e0808); }
.avatar-wrap { position: relative; display: inline-flex; }
.avatar-wrap .dot { position: absolute; inset-inline-end: -1px; bottom: -1px; width: 12px; height: 12px; border-radius: 50%; background: #c9bcbc; border: 2.5px solid #fff; }
.avatar-wrap .dot.on { background: var(--green); }

/* --------------------------------------------------------------- tabs/chips */
.seg { display: inline-flex; background: var(--tint-2); border: 1px solid var(--line); border-radius: 14px; padding: 4px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 7px 14px; border-radius: 10px; cursor: pointer; font-weight: 600; font-size: 12.5px; color: var(--muted); transition: .15s; }
.seg button.on { background: var(--grad); color: #fff; box-shadow: 0 4px 12px rgba(154,16,16,.28); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 700; background: var(--tint); color: var(--red); }
.chip.green { background: var(--green-bg); color: var(--green); }
.chip.gray { background: #f3efef; color: var(--muted); }
.chip svg { width: 13px; height: 13px; }

/* ------------------------------------------------------------------ tables */
.table-wrap { overflow-x: auto; margin: 0 -6px; }
table { width: 100%; border-collapse: separate; border-spacing: 0 6px; }
th { text-align: start; font-size: 11.5px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); font-weight: 700; padding: 6px 12px; white-space: nowrap; }
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover, th.sorted { color: var(--red); }
td { padding: 11px 12px; background: #fff; border-block: 1px solid var(--line); vertical-align: middle; }
td:first-child { border-inline-start: 1px solid var(--line); border-start-start-radius: 14px; border-end-start-radius: 14px; }
td:last-child { border-inline-end: 1px solid var(--line); border-start-end-radius: 14px; border-end-end-radius: 14px; }
tr.row-link { cursor: pointer; }
tr.row-link:hover td { background: var(--tint-2); }
.cell-user { display: flex; align-items: center; gap: 12px; min-width: 150px; }
.cell-user b { display: block; font-weight: 700; }
.cell-user span { font-size: 12px; color: var(--muted); }
.rank { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; background: #f6efef; color: var(--muted); font-size: 13px; }
.rank.r1 { background: var(--grad); color: #fff; }
.rank.r2 { background: #f3b4b4; color: #7d0e0e; }
.rank.r3 { background: #f9d6d6; color: #9a1010; }
.meter { height: 8px; border-radius: 6px; background: #f6ecec; overflow: hidden; min-width: 90px; }
.meter i { display: block; height: 100%; border-radius: 6px; background: var(--grad); transition: width .6s cubic-bezier(.2,.8,.2,1); }
.score { display: flex; align-items: center; gap: 10px; }
.score b { min-width: 38px; text-align: end; font-weight: 800; }
.streak { display: inline-flex; align-items: center; gap: 5px; font-weight: 800; color: var(--red); }
.streak svg { width: 16px; height: 16px; color: #ee6b1d; }

/* heatmap */
.heat { display: grid; gap: 4px; overflow-x: auto; padding-bottom: 6px; }
.heat .hrow { display: grid; grid-template-columns: 130px 1fr; gap: 12px; align-items: center; }
.heat .hname { font-weight: 600; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.heat .cells { direction: ltr; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(12px, 1fr); gap: 3px; }
.heat .c { height: 22px; border-radius: 6px; background: #f6ecec; }
.heat .c.a { background: #f6c9c9; }
.heat .c.l1 { background: #efa5a5; } .heat .c.l2 { background: #e06666; } .heat .c.l3 { background: #c43d3d; } .heat .c.l4 { background: #9a1010; }
.legend { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); }
.legend i { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }

/* feed */
.feed { display: flex; flex-direction: column; gap: 10px; max-height: 520px; overflow-y: auto; padding-inline-end: 4px; }
.feed .it { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 16px; background: #fff; animation: slidein .35s ease; }
@keyframes slidein { from { opacity: 0; transform: translateY(-8px); } }
.feed .it .t { flex: 1; min-width: 0; }
.feed .it b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed .it span { font-size: 11.5px; color: var(--muted); }
.ok-ic, .bad-ic { width: 34px; height: 34px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.ok-ic { background: var(--green-bg); color: var(--green); } .bad-ic { background: var(--tint); color: var(--red); }
.ok-ic svg, .bad-ic svg { width: 18px; height: 18px; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.list-row:last-child { border-bottom: 0; }
.list-row .t { flex: 1; min-width: 0; }
.list-row b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-row span.s { font-size: 11.5px; color: var(--muted); }

.chart-box { position: relative; height: 290px; }
.chart-box.sm { height: 220px; }

/* ------------------------------------------------------------------- forms */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.input, select.input, textarea.input {
  width: 100%; padding: 12px 14px; border-radius: 14px; border: 1.5px solid var(--line); background: #fff; outline: none; transition: .15s;
}
.input:focus { border-color: var(--red-2); box-shadow: 0 0 0 4px rgba(212,43,43,.10); }
textarea.input { resize: vertical; min-height: 80px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border: 0; border-radius: 14px; cursor: pointer;
  font-weight: 700; background: var(--grad); color: #fff; box-shadow: 0 8px 22px rgba(154,16,16,.28); transition: .15s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(154,16,16,.34); }
.btn:disabled { opacity: .6; cursor: wait; transform: none; }
.btn.ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); box-shadow: none; }
.btn.ghost:hover { border-color: var(--red-2); color: var(--red); }
.btn.danger { background: #fff; color: var(--red); border: 1px solid #f1c4c4; box-shadow: none; }
.btn.sm { padding: 8px 12px; font-size: 12.5px; border-radius: 11px; }
.btn svg { width: 17px; height: 17px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; align-items: center; }
.toolbar .input { width: auto; min-width: 150px; padding: 10px 12px; }

.switch { position: relative; width: 48px; height: 28px; flex: none; }
.switch input { opacity: 0; width: 100%; height: 100%; position: absolute; margin: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 20px; background: #e6dcdc; transition: .2s; }
.switch i::after { content: ''; position: absolute; width: 22px; height: 22px; border-radius: 50%; background: #fff; top: 3px; inset-inline-start: 3px; transition: .2s; box-shadow: 0 2px 6px rgba(0,0,0,.2); }
.switch input:checked + i { background: var(--grad); }
.switch input:checked + i::after { inset-inline-start: 23px; }
.setting { display: flex; align-items: center; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.setting:last-child { border-bottom: 0; }
.setting .t { flex: 1; }
.setting b { display: block; }
.setting span { font-size: 12.5px; color: var(--muted); }

/* ------------------------------------------------------------------- modal */
.overlay { position: fixed; inset: 0; background: rgba(26,18,20,.45); backdrop-filter: blur(4px); display: grid; place-items: center; z-index: 100; padding: 20px; animation: fade .18s; }
@keyframes fade { from { opacity: 0; } }
.modal { background: #fff; border-radius: 26px; padding: 26px; width: min(460px, 100%); max-height: 92vh; overflow: auto; box-shadow: 0 30px 80px rgba(0,0,0,.3); animation: pop .22s cubic-bezier(.2,.9,.3,1.2); }
@keyframes pop { from { transform: scale(.94); opacity: 0; } }
.modal h3 { margin: 0 0 18px; font-size: 19px; }
.modal .actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; }

#toasts { position: fixed; inset-inline-end: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 10px; z-index: 200; }
.toast { background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 14px; font-weight: 600; box-shadow: 0 12px 30px rgba(0,0,0,.3); animation: slidein .25s; }
.toast.err { background: var(--red); }

/* ------------------------------------------------------------------- login */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.login-art {
  background: var(--grad); color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden;
}
.login-art::before, .login-art::after { content: ''; position: absolute; border-radius: 50%; background: rgba(255,255,255,.07); }
.login-art::before { width: 520px; height: 520px; inset-inline-end: -160px; top: -140px; }
.login-art::after { width: 340px; height: 340px; inset-inline-start: -110px; bottom: -120px; }
.login-art > * { position: relative; z-index: 1; }
.login-art h2 { font-size: 40px; font-weight: 800; line-height: 1.2; margin: 0 0 14px; max-width: 460px; }
.login-art p { opacity: .85; max-width: 440px; line-height: 1.8; margin: 0; }
.login-art .logo { width: 84px; height: 84px; border-radius: 50%; box-shadow: 0 12px 36px rgba(0,0,0,.3); }
.login-feats { display: grid; gap: 12px; margin-top: 28px; }
.login-feats div { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.login-feats i { width: 34px; height: 34px; border-radius: 11px; background: rgba(255,255,255,.16); display: grid; place-items: center; }
.login-feats svg { width: 18px; height: 18px; }
.login-form { display: grid; place-items: center; padding: 40px; background: #fff; }
.login-form form { width: min(380px, 100%); }
.login-form h1 { margin: 0 0 6px; font-size: 28px; font-weight: 800; }
.login-form .sub { color: var(--muted); margin-bottom: 28px; }
.err-box { background: var(--tint); color: var(--red); padding: 11px 14px; border-radius: 12px; font-weight: 600; margin-bottom: 14px; font-size: 13px; }
@media (max-width: 900px) { .login-wrap { grid-template-columns: 1fr; } .login-art { display: none; } }

/* ----------------------------------------------------------------- mobile */
.menu-btn { display: none; }
@media (max-width: 980px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset-block: 0; inset-inline-start: 0; width: 264px; z-index: 60; transform: translateX(-110%); transition: .25s; box-shadow: 20px 0 60px rgba(0,0,0,.2); }
  html[dir='rtl'] .side { transform: translateX(110%); }
  .side.open { transform: none !important; }
  .menu-btn { display: inline-flex; }
  .main { padding: 0 16px 40px; }
}
.skeleton { background: linear-gradient(90deg, #f6ecec 25%, #fbf3f3 50%, #f6ecec 75%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 12px; }
@keyframes sk { to { background-position: -200% 0; } }
.empty { text-align: center; padding: 34px 10px; color: var(--muted); }
.stat-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 18px; }
.tile { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 16px; box-shadow: var(--shadow-sm); }
.tile .l { font-size: 12px; color: var(--muted); font-weight: 600; }
.tile .v { font-size: 26px; font-weight: 800; margin-top: 4px; }
.back { margin-bottom: 14px; }
.nav-badge { margin-inline-start: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; background: #ffb020; color: #3a2600; font-size: 12px; font-weight: 800; display: grid; place-items: center; animation: pulse 1.8s infinite; }
.nav a.active .nav-badge { background: #fff; color: var(--red); }
.search { position: relative; min-width: 240px; flex: 1; max-width: 360px; }
.search svg { position: absolute; inset-inline-start: 13px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); }
.search .input { padding-inline-start: 40px; }
.photo-pick { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.photo-pick .avatar { width: 72px; height: 72px; font-size: 28px; }
.photo-pick .btns { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }

/* ------------------------------------------------------------ control center */
.cc-strip { display: grid; grid-template-columns: 1.3fr 1fr 1.3fr 1fr; gap: 16px; margin-bottom: 18px; }
@media (max-width: 1100px) { .cc-strip { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .cc-strip { grid-template-columns: 1fr; } }
.cc-k { font-size: 12.5px; font-weight: 700; }
.cc-big { font-size: 34px; font-weight: 800; line-height: 1.1; margin-top: 6px; }
.cc-big small { font-size: 15px; color: var(--muted); font-weight: 600; }
.cc-state { display: flex; align-items: center; gap: 14px; }
.cc-state b { display: block; font-size: 16px; }
.cc-state span { font-size: 12.5px; color: var(--muted); }
.cc-state .cc-pulse { width: 14px; height: 14px; border-radius: 50%; flex: none; }
.cc-state.green { background: linear-gradient(135deg, #f0fbf5, #fff); border-color: #bfe6d1; }
.cc-state.green .cc-pulse { background: var(--green); animation: pulse 1.8s infinite; }
.cc-state.red { background: linear-gradient(135deg, #fdeaea, #fff); border-color: #f1b8b8; }
.cc-state.red .cc-pulse { background: var(--red-2); box-shadow: 0 0 0 0 rgba(212,43,43,.6); animation: pulse 1.4s infinite; }
.cc-state.amber { background: linear-gradient(135deg, #fff6e0, #fff); border-color: #f3d48f; }
.cc-state.amber .cc-pulse { background: #e8a400; }
.vbar { display: grid; grid-template-columns: 56px 1fr 26px; gap: 8px; align-items: center; margin-top: 8px; font-size: 12.5px; }
.cc-tools { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.cc-tabs { overflow-x: auto; max-width: 100%; }
.cc-tabs button { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.cc-tabs svg { width: 15px; height: 15px; }
.setting.col { flex-direction: column; align-items: stretch; gap: 10px; }
.setting.dis { opacity: .42; }
.setting.dirty { box-shadow: inset 3px 0 0 var(--red-2); background: linear-gradient(90deg, rgba(212,43,43,.05), transparent 40%); padding-inline-start: 12px; border-radius: 8px; }
html[dir='rtl'] .setting.dirty { box-shadow: inset -3px 0 0 var(--red-2); background: linear-gradient(270deg, rgba(212,43,43,.05), transparent 40%); }
.savebar {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 70; display: flex; align-items: center; gap: 14px;
  background: #1a1214; color: #fff; padding: 12px 16px 12px 22px; border-radius: 20px; box-shadow: 0 18px 50px rgba(0,0,0,.35); animation: slidein .25s;
}
.savebar .btn.ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.3); }
.phone { width: 250px; margin: 6px auto 0; border: 8px solid #1a1214; border-radius: 36px; background: #fff; padding: 0; overflow: hidden; box-shadow: 0 18px 40px rgba(0,0,0,.18); }
.phone-notch { height: 22px; background: #1a1214; width: 90px; margin: 0 auto; border-radius: 0 0 14px 14px; }
.phone-screen { padding: 12px 10px 16px; min-height: 270px; background: #fbf6f6; }
.phone-card { background: var(--grad); border-radius: 18px; height: 70px; margin: 10px 4px; display: flex; align-items: center; gap: 10px; padding: 0 12px; }
.phone-card.slim { background: #fff; border: 1px solid var(--line); height: 54px; }
.pc-logo { width: 34px; height: 34px; border-radius: 50%; background: #fff; flex: none; }
.pc-lines { flex: 1; } .pc-lines i { display: block; height: 7px; border-radius: 4px; background: rgba(255,255,255,.55); margin: 6px 0; } .pc-lines i + i { width: 60%; }
.pv-banner { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-radius: 14px; font-weight: 600; font-size: 12px; margin: 4px; line-height: 1.5; }
.pv-banner svg { width: 18px; height: 18px; flex: none; }
.maint-prev { display: grid; justify-items: center; gap: 8px; text-align: center; padding: 22px 16px; background: var(--tint-2); border-radius: 18px; border: 1px dashed #f1c4c4; }
.maint-prev svg { width: 42px; height: 42px; color: var(--red); }
.maint-prev span { color: var(--muted); font-size: 13px; line-height: 1.6; }
