:root {
  --primary: #250D6E;
  --primary-2: #3B1FA0;
  --accent: #FB8912;
  --bg: #F4F5F9;
  --card: #FFFFFF;
  --ink: #1F2A37;
  --muted: #6B7585;
  --line: #E4E7EE;
  --green: #2E9D5C;
  --amber: #E39B1B;
  --amber-soft: #FDF1DC;
  --red: #D64545;
  --shadow: 0 2px 10px rgba(37, 13, 110, .08);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  font-family: "Cairo", "Segoe UI", Tahoma, system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
  overscroll-behavior-y: none;
}
[hidden] { display: none !important; }
button { font: inherit; color: inherit; cursor: pointer; }

/* ---------- login ---------- */
.login {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 24px 16px calc(24px + var(--safe-bottom));
  background: linear-gradient(160deg, var(--primary) 0%, var(--primary-2) 60%, #5B35C8 100%);
}
.login-card {
  width: min(100%, 380px);
  background: var(--surf);
  border-radius: 24px;
  padding: 28px 24px 26px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .28);
  animation: rise .5s ease both;
}
.login-logo { width: 220px; max-width: 80%; height: auto; margin: 0 auto 4px; display: block; }
.login h1 { margin: 6px 0 22px; font-size: 20px; color: var(--primary); }
.btn-google {
  width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px 16px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: var(--surf);
  font-weight: 600;
  transition: transform .12s, box-shadow .12s, border-color .12s;
}
.btn-google:active { transform: scale(.98); }
.btn-google:hover { border-color: var(--primary); box-shadow: 0 4px 14px rgba(37, 13, 110, .15); }
.btn-google:disabled { opacity: .6; }
.login-msg { min-height: 20px; margin: 14px 0 0; color: var(--red); font-size: 13.5px; }
.login-msg.info { color: var(--muted); }

/* ---------- shell ---------- */
.app { display: flex; flex-direction: column; height: 100dvh; max-width: 760px; margin: 0 auto; background: var(--bg); }
.top {
  display: flex; align-items: center; gap: 12px;
  padding: calc(10px + var(--safe-top)) 14px 12px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
  color: #fff;
  flex: none;
}
.top-logo { width: 38px; height: 38px; border-radius: 10px; background: var(--surf); padding: 3px; object-fit: contain; }
.top-title { flex: 1; display: flex; flex-direction: column; line-height: 1.2; }
.top-title strong { font-size: 17px; }
.top-title span { font-size: 12.5px; opacity: .8; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 50%;
  border: 0; background: rgba(255, 255, 255, .16); color: #fff;
  display: grid; place-items: center;
  transition: background .15s, transform .15s;
}
.icon-btn:active { transform: scale(.92); background: rgba(255, 255, 255, .28); }
.icon-btn.spin svg { animation: spin .9s linear infinite; }

.banner {
  flex: none;
  padding: 8px 14px;
  font-size: 13px;
  background: var(--amber-soft);
  color: #8A5A07;
  border-bottom: 1px solid #F3DDB0;
}
.banner.err { background: #FDECEC; color: #9B2C2C; border-color: #F5C6C6; }

.view { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 12px 12px 18px; }

.tabs {
  flex: none;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--surf);
  border-top: 1px solid var(--line);
  padding-bottom: var(--safe-bottom);
}
.tab {
  border: 0; background: transparent; padding: 9px 0 8px;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: 12.5px; font-weight: 600; color: var(--muted);
  position: relative;
  transition: color .15s;
}
.tab.on { color: var(--primary); }
.tab.on::before {
  content: ""; position: absolute; top: 0; left: 30%; right: 30%; height: 3px;
  border-radius: 0 0 4px 4px; background: var(--accent);
}

/* ---------- stages ---------- */
.stat-row { display: flex; gap: 8px; margin-bottom: 10px; }
.stat {
  flex: 1; background: var(--card); border-radius: 14px; padding: 8px 12px; box-shadow: var(--shadow);
}
.stat b { display: block; font-size: 20px; color: var(--primary); line-height: 1.2; }
.stat span { font-size: 12px; color: var(--muted); }
.stat.warn b { color: var(--amber); }

.chips {
  display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; margin: 0 -12px; padding-inline: 12px;
  scrollbar-width: none; scroll-snap-type: x proximity;
  position: sticky; top: -12px; z-index: 2; background: var(--bg);
  padding-top: 12px; margin-top: -12px;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; scroll-snap-align: center;
  display: flex; align-items: center; gap: 8px;
  padding: 7px 8px 7px 13px;
  border: 1.5px solid var(--line); border-radius: 999px; background: var(--surf);
  font-size: 13.5px; font-weight: 600; white-space: nowrap;
  transition: transform .12s, background .15s, color .15s, border-color .15s;
}
.chip:active { transform: scale(.96); }
.chip .n {
  min-width: 24px; height: 24px; padding: 0 7px; border-radius: 12px;
  display: grid; place-items: center; font-size: 12.5px; color: #fff; background: var(--c, var(--muted));
}
.chip.on { background: var(--c, var(--primary)); border-color: var(--c, var(--primary)); color: #fff; }
.chip.on .n { background: rgba(255, 255, 255, .28); }
.chip.zero { opacity: .55; }

.cards { display: flex; flex-direction: column; gap: 10px; }
.card {
  background: var(--card); border-radius: 16px; padding: 12px 14px 12px;
  box-shadow: var(--shadow);
  border: 1.5px solid transparent;
  border-inline-start: 5px solid var(--c, var(--muted));
  text-align: start; width: 100%;
  transition: transform .12s, box-shadow .12s;
  animation: rise .35s ease both;
}
.card:active { transform: scale(.985); box-shadow: 0 1px 4px rgba(37, 13, 110, .1); }
.card.stale { border-color: #F0C777; border-inline-start-color: var(--amber); background: #FFFCF5; }
.card-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.card .code { font-size: 17px; font-weight: 700; color: var(--primary); }
.card .days { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.card .days.hot { color: #B8650A; font-weight: 600; }
.card-mid { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 2px; color: var(--muted); font-size: 13.5px; }
.pill {
  display: inline-block; padding: 1px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  background: color-mix(in srgb, var(--c, var(--muted)) 14%, white); color: var(--c, var(--muted));
}
.len { font-size: 12.5px; font-weight: 600; color: #B8650A; background: #FFF1E0; border-radius: 8px; padding: 0 8px; }
.bar { height: 5px; border-radius: 3px; background: var(--surf-2); margin-top: 9px; overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--green), #52C084); }

.empty { text-align: center; color: var(--muted); padding: 40px 16px; }
.empty svg { opacity: .5; margin-bottom: 8px; }

/* ---------- list + search ---------- */
.search {
  position: sticky; top: -12px; z-index: 2; margin: -12px -12px 10px; padding: 12px 12px 8px; background: var(--bg);
}
.search label { display: block; position: relative; }
.search input {
  width: 100%; padding: 12px 42px 12px 14px; border: 1.5px solid var(--line); border-radius: 14px;
  background: var(--surf); font: inherit; color: var(--ink); outline: none; transition: border-color .15s, box-shadow .15s;
}
.search input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 13, 110, .1); }
.search svg { position: absolute; right: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.count { font-size: 12.5px; color: var(--muted); margin: 6px 4px 0; }
.more {
  width: 100%; margin-top: 12px; padding: 11px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surf); font-weight: 600; color: var(--primary);
}

/* ---------- sheet ---------- */
.sheet { position: fixed; inset: 0; z-index: 20; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(20, 10, 60, .45); animation: fade .2s ease both; }
.sheet-panel {
  position: absolute; left: 0; right: 0; bottom: 0; max-width: 760px; margin: 0 auto;
  max-height: 92dvh; overflow-y: auto;
  background: var(--bg); border-radius: 22px 22px 0 0;
  padding: 0 0 calc(18px + var(--safe-bottom));
  animation: slideUp .28s cubic-bezier(.2, .9, .3, 1) both;
}
.sheet-head {
  position: sticky; top: 0; z-index: 1; background: var(--surf); border-radius: 22px 22px 0 0;
  padding: 10px 16px 12px; border-bottom: 1px solid var(--line);
}
.grab { width: 40px; height: 4px; border-radius: 2px; background: #D5D9E2; margin: 0 auto 10px; }
.sheet-title { display: flex; align-items: center; gap: 10px; }
.sheet-title h2 { margin: 0; font-size: 22px; color: var(--primary); flex: 1; }
.x-btn { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--surf-2); display: grid; place-items: center; }
.sheet-body { padding: 14px 14px 0; display: flex; flex-direction: column; gap: 12px; }
.panel { background: var(--surf); border-radius: 16px; padding: 12px 14px; box-shadow: var(--shadow); }
.panel h3 { margin: 0 0 8px; font-size: 14px; color: var(--muted); font-weight: 600; }
.warn-box { background: var(--amber-soft); border: 1px solid #F3DDB0; color: #7A4E05; border-radius: 12px; padding: 8px 12px; font-weight: 600; font-size: 13.5px; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.fact span { display: block; font-size: 12px; color: var(--muted); }
.fact b { font-size: 14.5px; font-weight: 600; word-break: break-word; }
.fact.wide { grid-column: 1 / -1; }
.notes { white-space: pre-wrap; font-size: 14px; }
.map-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px; border-radius: 14px; background: var(--primary); color: #fff; text-decoration: none; font-weight: 700;
  transition: transform .12s;
}
.map-btn:active { transform: scale(.98); }

/* ---------- mini stage line ---------- */
.line { display: flex; overflow-x: auto; padding: 4px 0 6px; scrollbar-width: none; }
.line::-webkit-scrollbar { display: none; }
.node { flex: none; width: 82px; text-align: center; position: relative; }
.node .rail { height: 28px; position: relative; display: flex; align-items: center; justify-content: center; }
.node .rail::before, .node .rail::after { content: ""; position: absolute; top: 12.5px; height: 3px; width: 50%; background: #D5D9E2; }
.node .rail::before { right: 0; }
.node .rail::after { left: 0; }
.node.done .rail::before, .node.done .rail::after { background: var(--green); }
.node.cur .rail::before { background: var(--green); }
.node:first-child .rail::before { display: none; }
.node:last-child .rail::after { display: none; }
.dot {
  position: relative; z-index: 1; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; font-size: 12px; font-weight: 700;
  background: var(--surf); border: 2px solid #C9CED6; color: #B0B7C3;
}
.node.done .dot { background: var(--green); border-color: var(--green); color: #fff; }
.node.cur .dot { background: var(--accent); border-color: var(--accent); color: #fff; }
.node.cur.side .dot { background: var(--amber); border-color: var(--amber); }
.node.cur .dot::after {
  content: ""; position: absolute; inset: -2px; border-radius: 50%; background: var(--accent); opacity: .5;
  animation: ping 1.5s ease-out infinite; z-index: -1;
}
.node.cur.side .dot::after { background: var(--amber); }
.node .nm { display: block; margin-top: 4px; padding: 0 3px; font-size: 11.5px; font-weight: 600; color: #8C94A3; line-height: 1.3; }
.node.done .nm { color: var(--ink); }
.node.cur .nm { color: var(--primary); font-weight: 700; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(76px + var(--safe-bottom)); transform: translateX(-50%); z-index: 30;
  background: #1F2A37; color: #fff; padding: 9px 18px; border-radius: 999px; font-size: 13.5px; max-width: 90%;
  animation: rise .25s ease both;
}

@keyframes spin { to { transform: rotate(-360deg); } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: none; } }
@keyframes ping { 0% { transform: scale(1); opacity: .5; } 80%, 100% { transform: scale(1.9); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}


/* ---------- home ---------- */
.hello {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 70%, #5B35C8 100%);
  color: #fff; border-radius: 20px; padding: 16px 18px; margin-bottom: 14px;
  box-shadow: 0 8px 22px rgba(37, 13, 110, .28);
  animation: rise .45s ease both;
  position: relative; overflow: hidden;
}
.hello::after {
  content: ""; position: absolute; width: 150px; height: 150px; border-radius: 50%;
  left: -40px; top: -60px; background: radial-gradient(circle, rgba(251, 137, 18, .55), transparent 70%);
}
.hello-t { display: flex; flex-direction: column; position: relative; z-index: 1; }
.hello-t strong { font-size: 20px; }
.hello-t span { font-size: 13px; opacity: .85; }
.hello-s { display: flex; gap: 14px; position: relative; z-index: 1; }
.hello-s div { text-align: center; line-height: 1.15; }
.hello-s b { display: block; font-size: 22px; }
.hello-s span { font-size: 11.5px; opacity: .85; }
.hello-s .warn b { color: #FFD08A; }

.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile {
  position: relative; overflow: hidden; border: 0; text-align: right;
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  min-height: 132px; padding: 16px 14px 14px; border-radius: 20px; color: #fff;
  background: linear-gradient(145deg, var(--c1), var(--c2));
  box-shadow: 0 8px 18px rgba(0, 0, 0, .16);
  transition: transform .15s cubic-bezier(.2, .8, .3, 1.3), box-shadow .15s;
  animation: pop .5s cubic-bezier(.2, .8, .3, 1.2) both;
}
.tile:active { transform: scale(.94); box-shadow: 0 3px 8px rgba(0, 0, 0, .18); }
.tile::before {
  content: ""; position: absolute; width: 110px; height: 110px; border-radius: 50%;
  left: -34px; bottom: -44px; background: rgba(255, 255, 255, .13);
}
.tile-ico {
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 15px;
  background: rgba(255, 255, 255, .22); margin-bottom: 8px; backdrop-filter: blur(2px);
  animation: float 3.6s ease-in-out infinite;
}
.tile strong { font-size: 16px; line-height: 1.25; position: relative; }
.tile small { font-size: 12px; opacity: .88; line-height: 1.3; position: relative; }
.tile.soon { filter: saturate(.55) brightness(.97); }
.badge {
  position: absolute; top: 10px; left: 10px; min-width: 24px; height: 24px; padding: 0 7px;
  display: grid; place-items: center; border-radius: 12px; background: var(--surf); color: #C2410C;
  font-style: normal; font-weight: 800; font-size: 13px; box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
  animation: ping2 1.8s ease-in-out infinite;
}
.rip {
  position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .45); transform: scale(0);
  animation: ripple .6s ease-out forwards; pointer-events: none;
}
.tab:active svg { transform: scale(.85); }
.tab svg { transition: transform .15s; }
.card:active { transform: scale(.985); }

/* ---------- requests ---------- */
.req { margin-top: 0; }
.req-btns { display: flex; flex-direction: column; gap: 8px; }
.req-form { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; animation: rise .25s ease both; }
.req-form .req-btns { flex-direction: row; }
.req-form .req-btns .btn-main { flex: 1; }
.req-ask { font-weight: 600; font-size: 14px; }
.req-form textarea, .tool textarea {
  width: 100%; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px; font: inherit; resize: vertical; background: var(--surf);
}
.req-form textarea:focus { outline: 2px solid var(--accent); border-color: transparent; }
.req-open { background: var(--amber-soft); border: 1px solid #F3DDB0; color: #7A4E05; border-radius: 12px; padding: 8px 12px; font-weight: 600; font-size: 13.5px; }
.btn-main, .btn-ghost, .mini {
  border: 0; border-radius: 13px; padding: 12px 14px; font-weight: 700; font-size: 14.5px;
  transition: transform .12s, opacity .12s;
}
.btn-main { background: var(--primary); color: #fff; }
.btn-main:disabled { opacity: .4; }
.btn-ghost { background: var(--surf); color: var(--primary); border: 1.5px solid var(--line); }
.btn-ghost.warn { color: #B45309; border-color: #F3DDB0; background: #FFFBF3; }
.btn-main:active, .btn-ghost:active, .mini:active { transform: scale(.97); }
.mini { background: var(--accent); color: #fff; padding: 7px 14px; font-size: 13px; margin-top: 8px; }
.rq { background: var(--surf); border-radius: 16px; padding: 12px 14px; box-shadow: var(--shadow); animation: rise .3s ease both; }
.rq-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.rq-mid { margin-top: 4px; font-size: 14px; }
.rq-note { margin-top: 4px; font-size: 13px; color: var(--muted); }
.rq-note.dec { color: #7A2020; }
.rq-time { margin-top: 4px; font-size: 12px; color: var(--muted); }
.chip2 { font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 10px; background: var(--amber-soft); color: #9A5300; }
.chip2.ok { background: #DDF3E4; color: #14612E; }
.chip2.no { background: #FADDDD; color: #8B1A1A; }
.chip2.old { background: #ECECEC; color: #555; }
.chip2.queue { background: #E8EAF6; color: #3949AB; }

@keyframes pop { from { opacity: 0; transform: scale(.85) translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes ripple { to { transform: scale(2.4); opacity: 0; } }
@keyframes ping2 { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }
@media (prefers-reduced-motion: reduce) {
  .tile, .tile-ico, .badge, .hello, .rq { animation: none !important; }
}

/* ---------- tools (consultant / outage) ---------- */
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--surf-2); border-radius: 14px; padding: 4px; margin-bottom: 10px; }
.seg button { border: 0; background: transparent; padding: 9px 4px; border-radius: 11px; font-weight: 700; color: var(--muted); transition: background .18s, color .18s, box-shadow .18s; }
.seg button.on { background: var(--surf); color: var(--primary); box-shadow: var(--shadow); }
.daybar { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.daypick { flex: 1; position: relative; display: grid; place-items: center; background: var(--surf); border-radius: 14px; padding: 9px 8px; box-shadow: var(--shadow); font-weight: 700; color: var(--primary); }
.daypick input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; }
.icon-btn.dark { background: var(--surf); color: var(--primary); box-shadow: var(--shadow); border-radius: 14px; width: 42px; height: 42px; display: grid; place-items: center; border: 0; transition: transform .12s; }
.icon-btn.dark:active { transform: scale(.9); }
.icon-btn.sm { width: 34px; height: 34px; border-radius: 10px; box-shadow: none; background: var(--surf-2); }
.icon-btn.sm:disabled { opacity: .35; }
.icon-btn.del { color: var(--red); background: #FDECEC; }
.acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.acts .btn-main { grid-column: 1 / -1; }
.acts button { display: flex; align-items: center; justify-content: center; gap: 7px; }
.wide { width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; }
.export { margin-top: 14px; padding: 14px; }
.task { display: flex; align-items: stretch; gap: 6px; background: var(--surf); border-radius: 16px; box-shadow: var(--shadow); padding: 6px; animation: rise .3s ease both; }
.task-main { flex: 1; min-width: 0; border: 0; background: transparent; text-align: right; padding: 6px 8px; display: flex; flex-direction: column; gap: 2px; border-radius: 12px; transition: background .12s; }
.task-main:active { background: var(--surf-2); }
.task-main b { font-size: 15px; }
.task-main span { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-btns { display: flex; flex-direction: row; align-items: center; gap: 4px; }
.sec { font-style: normal; font-size: 12px; font-weight: 700; color: var(--accent); }
.pickrow { position: relative; display: flex; flex-direction: column; gap: 1px; width: 100%; text-align: right; border: 1.5px solid transparent; background: var(--surf); border-radius: 14px; padding: 10px 44px 10px 12px; box-shadow: var(--shadow); transition: transform .1s, border-color .15s, background .15s; }
.pickrow:active { transform: scale(.985); }
.pickrow span { font-size: 13px; color: var(--muted); }
.pickrow .tick { position: absolute; right: 12px; top: 50%; width: 22px; height: 22px; margin-top: -11px; border-radius: 7px; border: 2px solid var(--line); transition: all .15s; }
.pickrow.on { border-color: var(--primary); background: var(--tint); }
.pickrow.on .tick { background: var(--primary); border-color: var(--primary); }
.pickrow.on .tick::after { content: ""; position: absolute; left: 6px; top: 1px; width: 5px; height: 11px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.secsel { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; }
.secsel span { font-weight: 700; color: var(--muted); }
.secsel select, .fld select { flex: 1; width: 100%; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px; font: inherit; background: var(--surf); }

.ovl { position: fixed; inset: 0; z-index: 60; background: var(--bg); display: flex; flex-direction: column; animation: slideIn .22s ease both; }
.ovl.out { animation: slideOut .18s ease both; }
.ovl-head { flex: none; display: flex; align-items: center; gap: 8px; padding: calc(10px + var(--safe-top)) 12px 10px; background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff; }
.ovl-head strong { font-size: 17px; }
.ovl-head .icon-btn { background: rgba(255, 255, 255, .16); color: #fff; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; border: 0; }
.ovl-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 12px 12px 8px; }
.ovl-foot { position: sticky; bottom: 0; padding: 10px 0 calc(10px + var(--safe-bottom)); background: linear-gradient(to top, var(--bg) 70%, transparent); display: flex; gap: 8px; }
.ovl-foot.col { flex-direction: column; }
.form { display: flex; flex-direction: column; gap: 10px; }
.fld { display: flex; flex-direction: column; gap: 4px; }
.fld > span:first-child { font-size: 13px; font-weight: 700; color: var(--muted); }
.fld input, .fld textarea, .daypick, .search input { font: inherit; }
.fld input, .fld textarea { width: 100%; border: 1.5px solid var(--line); border-radius: 12px; padding: 11px 12px; background: var(--surf); font-size: 16px; }
.fld input:focus, .fld textarea:focus, .fld select:focus { outline: 2px solid var(--accent); border-color: transparent; }
.fld input.bad { border-color: var(--red); }
.sg { display: block; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.err { color: var(--red); font-weight: 600; min-height: 20px; margin-top: 8px; }
.count.bad { color: var(--red); }
.fileline { background: var(--surf); border-radius: 12px; padding: 12px; text-align: center; font-weight: 800; color: var(--primary); direction: ltr; }
@keyframes slideIn { from { transform: translateX(-30px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes slideOut { to { transform: translateX(-30px); opacity: 0; } }

/* ---- photos */
.photos .req-btns { display: flex; gap: 8px; }
.photos .req-btns > button { flex: 1; }
.ph-line { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 8px; font-size: 14px; }
.ph-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ph-th { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: #e8ecf3; animation: pop .25s ease; }
.ph-th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-th button { position: absolute; top: 4px; inset-inline-start: 4px; width: 26px; height: 26px; border: 0; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; font-size: 18px; line-height: 1; }
.ph-confirm { background: var(--amber-soft); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }

.seg3 { grid-template-columns: 1fr 1fr 1fr; margin: 8px 0 4px; }
.seg3 button { font-size: 13px; }

/* =====================================================================
   v2 theme: glass over a deep-violet field, one orange spark (the logo's)
   ===================================================================== */
:root {
  --primary: #2A1478; --primary-2: #4B2FD0; --accent: #FB8912;
  --bg: #ECEEF8; --ink: #17172E; --muted: #667089; --line: rgba(40, 30, 110, .12);
  --surf: #FFFFFF; --surf-2: #EEF0F9; --tint: #F1EDFF;
  --glass: rgba(255, 255, 255, .66); --glass-line: rgba(255, 255, 255, .85);
  --shadow: 0 1px 2px rgba(30, 20, 90, .06), 0 8px 24px rgba(30, 20, 90, .08);
  --blob1: rgba(111, 76, 255, .30); --blob2: rgba(251, 137, 18, .22); --blob3: rgba(46, 157, 92, .12);
  --amber-soft: #FDF1DC;
}
html[data-theme="dark"] {
    --primary: #B9A8FF; --primary-2: #4B2FD0; --bg: #0E0B24; --ink: #ECEBFA; --muted: #9A97BC; --line: rgba(255, 255, 255, .10);
    --surf: #1A1638; --surf-2: #252049; --tint: #2A2358; --amber-soft: #3A2A0B;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
    --blob1: rgba(111, 76, 255, .38); --blob2: rgba(251, 137, 18, .16); --blob3: rgba(46, 157, 92, .10);
  }
  html[data-theme="dark"] .banner { background: #3A2A0B !important; color: #F5C777 !important; border-color: #5a4210 !important; }
  html[data-theme="dark"] .banner.err { background: #401818 !important; color: #F2A6A6 !important; border-color: #5a2323 !important; }
  html[data-theme="dark"] .chip2.ok { background: #153A25; color: #7FE0A5; } html[data-theme="dark"] .chip2.no { background: #451C1C; color: #F6A5A5; }
  html[data-theme="dark"] .chip2.old, html[data-theme="dark"] .chip2.queue { background: var(--surf-2); color: var(--muted); }
  html[data-theme="dark"] .card.stale { background: #2A2210 !important; }
  html[data-theme="dark"] .btn-ghost.warn, html[data-theme="dark"] .req-open, html[data-theme="dark"] .warn-box { background: #3A2A0B; color: #F5C777; border-color: #5a4210; }
  html[data-theme="dark"] .len { background: #3A2A0B; color: #F5C777; }
  html[data-theme="dark"] .login-card { background: var(--surf); }


body { font-family: "IBM Plex Sans Arabic", "Cairo", "Segoe UI", Tahoma, system-ui, sans-serif; background: var(--bg); font-variant-numeric: tabular-nums; }
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60vmax 40vmax at 100% -5%, var(--blob1), transparent 60%),
    radial-gradient(50vmax 40vmax at -10% 55%, var(--blob2), transparent 60%),
    radial-gradient(45vmax 35vmax at 90% 105%, var(--blob3), transparent 60%);
}
.app { background: transparent; position: relative; }

.top {
  background: linear-gradient(135deg, rgba(27, 11, 87, .94), rgba(75, 47, 208, .88));
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  border-radius: 0 0 26px 26px; padding-bottom: 14px; box-shadow: 0 10px 30px rgba(27, 11, 87, .28); position: relative; z-index: 3;
}
.top-logo { border-radius: 13px; box-shadow: 0 2px 10px rgba(0, 0, 0, .25); }
.top-title strong { font-size: 18px; font-weight: 700; letter-spacing: 0; }
.icon-btn { background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .18); }

.view { padding: 14px 14px calc(104px + var(--safe-bottom)); }

/* floating glass tab bar; the active tab gets the orange spark */
.tabs {
  position: absolute; z-index: 5; inset-inline: 14px; bottom: calc(12px + var(--safe-bottom));
  border: 1px solid var(--glass-line); border-radius: 26px; padding: 6px;
  background: var(--glass); -webkit-backdrop-filter: blur(22px) saturate(1.6); backdrop-filter: blur(22px) saturate(1.6);
  box-shadow: 0 12px 34px rgba(30, 20, 90, .22);
}
.tab { border-radius: 20px; padding: 8px 0 7px; font-size: 11.5px; font-weight: 600; transition: color .2s, background .2s; }
.tab.on { background: color-mix(in srgb, var(--primary-2) 12%, transparent); color: var(--primary); }
.tab.on::before { top: 4px; left: calc(50% - 3px); right: auto; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); display: block; }
.tab.on svg { transform: translateY(2px); }
.toast { bottom: calc(96px + var(--safe-bottom)); background: rgba(23, 23, 46, .92); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }

/* glass surfaces */
.card, .panel, .rq, .task, .stat, .pickrow, .daypick {
  background: var(--glass); border: 1px solid var(--glass-line);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: var(--shadow);
}
.card { border-radius: 20px; border-inline-start: 1px solid var(--glass-line); position: relative; padding: 13px 16px 13px 14px; }
.card::before { content: ""; position: absolute; inset-block: 14px; inset-inline-start: 0; width: 4px; border-radius: 0 4px 4px 0; background: var(--c, var(--muted)); }
[dir="rtl"] .card::before { border-radius: 4px 0 0 4px; }
.card.stale { border-color: rgba(227, 155, 27, .5); background: color-mix(in srgb, var(--amber) 9%, var(--glass)); }
.card .code { font-size: 18px; font-weight: 700; letter-spacing: .2px; }
.panel { border-radius: 20px; }
.panel h3 { font-size: 13px; font-weight: 600; }
.pill { font-weight: 600; }
.chip { background: var(--glass); border: 1px solid var(--glass-line); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.chip.on { box-shadow: 0 6px 16px color-mix(in srgb, var(--c, var(--primary)) 40%, transparent); }
.chips, .search { background: linear-gradient(to bottom, var(--bg) 70%, transparent); }
.search input { background: var(--glass); border: 1px solid var(--glass-line); border-radius: 18px; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.seg { background: var(--surf-2); }
.seg button.on { background: var(--surf); }
.btn-main { background: linear-gradient(135deg, var(--primary-2), #6A4BE8); color: #fff; box-shadow: 0 6px 16px rgba(75, 47, 208, .32); }
.btn-ghost { background: var(--glass); }
.map-btn { background: linear-gradient(135deg, #2A1478, #4B2FD0); border-radius: 18px; }
.fld input, .fld textarea, .fld select, .secsel select, .req textarea { color: var(--ink); }
.sheet-backdrop { background: rgba(14, 8, 48, .5); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.sheet-panel { background: var(--bg); border-radius: 28px 28px 0 0; box-shadow: 0 -20px 60px rgba(0, 0, 0, .3); }
.sheet-head { background: var(--glass); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); border-radius: 28px 28px 0 0; }
.ovl { background: var(--bg); }
.dot { background: var(--surf); }

/* ---------- home dashboard ---------- */
.dash { display: flex; flex-direction: column; gap: 14px; }
.hero {
  position: relative; overflow: hidden; border: 0; text-align: start; width: 100%; color: #fff;
  border-radius: 28px; padding: 20px 20px 18px;
  background: radial-gradient(120% 90% at 100% 0%, #6A4BE8 0%, transparent 60%), linear-gradient(150deg, #1B0B57, #34189A);
  box-shadow: 0 18px 40px rgba(42, 20, 120, .38);
  animation: rise .5s ease both;
}
.hero::after { content: ""; position: absolute; width: 190px; height: 190px; border-radius: 50%; left: -60px; bottom: -90px; background: radial-gradient(circle, rgba(251, 137, 18, .55), transparent 68%); }
.hero-k { position: relative; z-index: 1; font-size: 13px; opacity: .8; }
.hero-n { position: relative; z-index: 1; display: flex; align-items: baseline; gap: 8px; font-size: 52px; font-weight: 700; line-height: 1.1; letter-spacing: -1px; }
.hero-n small { font-size: 15px; font-weight: 500; opacity: .8; letter-spacing: 0; }
.pipe { position: relative; z-index: 1; display: flex; gap: 3px; height: 14px; margin: 14px 0 10px; }
.pipe i { flex: var(--w) 1 0; min-width: 5px; border-radius: 6px; background: var(--c); transform-origin: right; animation: grow .8s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i) * 60ms + 250ms); }
.pipe-cap { position: relative; z-index: 1; font-size: 12.5px; opacity: .88; display: flex; justify-content: space-between; gap: 8px; }
@keyframes grow { from { transform: scaleX(0); } to { transform: none; } }

.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.kpi {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: start; padding: 13px 12px 12px;
  border-radius: 22px; border: 1px solid var(--glass-line); background: var(--glass);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: var(--shadow);
  transition: transform .15s; animation: rise .5s ease both; position: relative;
}
.kpi:active { transform: scale(.96); }
.kpi b { font-size: 26px; font-weight: 700; line-height: 1.15; color: var(--primary); }
.kpi span { font-size: 12px; color: var(--muted); line-height: 1.3; }
.kpi.warn b { color: var(--amber); }
.kpi .ring { position: absolute; top: 10px; inset-inline-end: 10px; width: 30px; height: 30px; }
.kpi .ring circle { fill: none; stroke-width: 4; }
.kpi .ring .bg { stroke: var(--surf-2); }
.kpi .ring .fg { stroke: var(--green); stroke-linecap: round; transform: rotate(-90deg); transform-origin: 50% 50%; transition: stroke-dashoffset .9s ease; }
.kpi em { font-style: normal; position: absolute; top: 10px; inset-inline-end: 10px; min-width: 22px; height: 22px; padding: 0 6px; display: grid; place-items: center; border-radius: 11px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; }

.sec-t { margin: 6px 4px -4px; font-size: 13px; font-weight: 600; color: var(--muted); }
.menu { display: flex; flex-direction: column; gap: 10px; }
.row {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: start; padding: 12px 14px; position: relative; overflow: hidden;
  border-radius: 22px; border: 1px solid var(--glass-line); background: var(--glass);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: var(--shadow);
  transition: transform .15s; animation: rise .5s ease both;
}
.row:active { transform: scale(.98); }
.row .ri { flex: none; width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; color: #fff; background: linear-gradient(145deg, var(--c1), var(--c2)); box-shadow: 0 6px 14px color-mix(in srgb, var(--c1) 35%, transparent); }
.row .rt { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.row .rt strong { font-size: 15.5px; font-weight: 600; }
.row .rt small { font-size: 12.5px; color: var(--muted); }
.row .chev { flex: none; color: var(--muted); opacity: .7; }
.row .badge { position: static; animation: none; background: var(--accent); color: #fff; box-shadow: none; }
.row .rip { background: rgba(75, 47, 208, .18); }

@media (min-width: 640px) { .menu { display: grid; grid-template-columns: 1fr 1fr; } }
@media (prefers-reduced-motion: reduce) { .pipe i, .hero, .kpi, .row { animation: none !important; } }
.tabs { background: rgba(255, 255, 255, .88); }


.ph-strip { display: flex; gap: 6px; overflow-x: auto; margin-top: 6px; scrollbar-width: none; }
.ph-strip img { flex: none; width: 52px; height: 52px; border-radius: 12px; object-fit: cover; border: 1px solid var(--glass-line); }
.ph-big { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px; }
.ph-big img { width: 100%; border-radius: 14px; }

/* ---------- violations / quantities ---------- */
.seg4 { grid-template-columns: repeat(4, 1fr); margin: 8px 0 4px; }
.seg4 button { font-size: 12.5px; padding: 8px 2px; }
.vsearch { position: sticky; top: -14px; z-index: 2; margin: 12px -14px 8px; padding: 6px 14px 4px; background: linear-gradient(to bottom, var(--bg) 75%, transparent); }
.vsearch label { display: block; position: relative; }
.vsearch input { width: 100%; padding: 12px 42px 12px 14px; border: 1px solid var(--glass-line); border-radius: 18px; background: var(--glass); font: inherit; color: var(--ink); outline: none; }
.vsearch svg { position: absolute; right: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.rq.vc { width: 100%; text-align: start; display: block; }
.vc-row { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; font-size: 14px; }
.vc-row b { color: var(--primary); }
.q-parts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.qchart { width: 100%; height: auto; color: var(--ink); display: block; }
.kpi.warn b { color: var(--amber); }
.kpis.rep .kpi b { font-size: 20px; white-space: nowrap; }

/* =====================================================================
   v3: liquid glass (translucent, specular edges) + themes + settings
   ===================================================================== */
:root {
  --ga-base: .62; --ga: var(--ga-base); --blur: 22px; --fs: 1;
  --h1: #1B0B57; --h2: #3B1FB5; --h3: #6A4BE8;
  --glass-rgb: 255, 255, 255;
  --glass: rgba(var(--glass-rgb), var(--ga));
}
html.touching:not(.no-touchfade) { --ga: calc(var(--ga-base) * .26); }

html[data-theme="light"], html:not([data-theme]) {
  --bg: #E4E9FB; --ink: #0A0A23; --muted: #3E4568; --primary: #22106B; --line: rgba(34, 16, 107, .16);
  --surf: #FFFFFF; --surf-2: #E9ECFA; --tint: #EEE9FF; --amber: #B96A00; --amber-soft: #FFEFCF;
  --glass-rgb: 255, 255, 255; --glass-line: rgba(255, 255, 255, .95); --edge: rgba(34, 16, 107, .22);
  --sheen: linear-gradient(155deg, rgba(255, 255, 255, .6) 0%, rgba(255, 255, 255, 0) 46%, rgba(255, 255, 255, .14) 100%);
  --lg-shadow: inset 0 1.5px 0 rgba(255, 255, 255, .95), inset 0 -1px 0 rgba(255, 255, 255, .35), inset 1.5px 0 0 rgba(255, 255, 255, .45), 0 0 0 .5px var(--edge), 0 12px 30px rgba(30, 20, 100, .16);
  --blob1: rgba(111, 76, 255, .46); --blob2: rgba(251, 137, 18, .36); --blob3: rgba(46, 157, 92, .22);
}
html[data-theme="dark"] {
  --glass-rgb: 34, 28, 82; --glass-line: rgba(255, 255, 255, .16); --edge: rgba(255, 255, 255, .12);
  --sheen: linear-gradient(155deg, rgba(255, 255, 255, .16) 0%, rgba(255, 255, 255, 0) 46%);
  --lg-shadow: inset 0 1.5px 0 rgba(255, 255, 255, .22), inset 0 -1px 0 rgba(255, 255, 255, .05), 0 0 0 .5px var(--edge), 0 12px 30px rgba(0, 0, 0, .45);
  --blob1: rgba(111, 76, 255, .5); --blob2: rgba(251, 137, 18, .2); --blob3: rgba(46, 157, 92, .14);
}
/* "sun": maximum contrast, opaque surfaces, no blur */
html[data-theme="sun"] {
  --bg: #FFFFFF; --ink: #000000; --muted: #262B49; --primary: #170857; --line: rgba(23, 8, 87, .55);
  --surf: #FFFFFF; --surf-2: #ECEEF8; --tint: #E9E3FF; --amber: #9A4F00; --amber-soft: #FFE7B8;
  --glass-rgb: 255, 255, 255; --ga: .98 !important; --blur: 0px !important; --glass-line: rgba(23, 8, 87, .6); --edge: rgba(23, 8, 87, .6);
  --sheen: none; --lg-shadow: 0 0 0 .5px var(--edge), 0 3px 10px rgba(23, 8, 87, .18);
  --blob1: transparent; --blob2: transparent; --blob3: transparent;
}
html[data-theme="sun"] body { font-weight: 500; }
html[data-theme="sun"] .chip2 { border: 1.5px solid currentColor; }
html[data-theme="sun"] .chip2.ok { background: #CFF1DA; color: #0B4D24; }
html[data-theme="sun"] .chip2.no { background: #FAD0D0; color: #7A1010; }
html[data-theme="sun"] .chip2 { color: #6B3600; }
html[data-theme="sun"] .count, html[data-theme="sun"] .rq-time, html[data-theme="sun"] .fact span { color: #262B49; }
html[data-theme="sun"] .banner { background: #FFE7B8; color: #4A2800; font-weight: 600; }

/* the shared liquid-glass surface */
.card, .panel, .rq, .task, .stat, .pickrow, .daypick, .kpi, .row, .chip, .sc, .search input, .vsearch input, .sheet-head, .btn-ghost {
  background-color: var(--glass); background-image: var(--sheen);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(1.9); backdrop-filter: blur(var(--blur)) saturate(1.9);
  border: 1px solid var(--glass-line); box-shadow: var(--lg-shadow);
  transition: background-color .3s ease, transform .15s ease, box-shadow .2s ease;
}
.tabs {
  background-color: var(--glass); background-image: var(--sheen);
  -webkit-backdrop-filter: blur(calc(var(--blur) + 6px)) saturate(2); backdrop-filter: blur(calc(var(--blur) + 6px)) saturate(2);
  border: 1px solid var(--glass-line); box-shadow: var(--lg-shadow), 0 16px 40px rgba(20, 10, 80, .2); border-radius: 32px; transition: background-color .3s ease;
}
html[data-theme="sun"] .tabs, html[data-theme="light"] .tabs { background-color: rgba(var(--glass-rgb), calc(var(--ga) * 1.25)); }
.tab.on {
  background: rgba(var(--glass-rgb), .55); border-radius: 24px; color: var(--primary);
  box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, .9), inset 0 -1px 0 rgba(255, 255, 255, .3), 0 0 0 .5px var(--edge), 0 4px 14px rgba(40, 20, 140, .2);
}
html[data-theme="dark"] .tab.on { background: rgba(255, 255, 255, .12); box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, .25), 0 0 0 .5px var(--edge); }
.tab { color: var(--muted); font-weight: 600; }
html[data-theme="sun"] .tab { color: #1B1F3B; font-weight: 700; }
.card::before { display: block; }
.card:active, .row:active, .kpi:active { box-shadow: var(--lg-shadow); }
.seg { background-color: rgba(var(--glass-rgb), calc(var(--ga) * .7)); border: 1px solid var(--glass-line); }
.card, .rq { text-shadow: none; }

body::before {
  background:
    radial-gradient(60vmax 40vmax at 100% -5%, var(--blob1), transparent 60%),
    radial-gradient(50vmax 40vmax at -10% 55%, var(--blob2), transparent 60%),
    radial-gradient(45vmax 35vmax at 90% 105%, var(--blob3), transparent 60%),
    radial-gradient(35vmax 30vmax at 20% 15%, var(--blob1), transparent 65%);
}

/* header and hero follow the chosen colour */
.top { background: linear-gradient(135deg, var(--h1), var(--h2)); }
.hero { background: radial-gradient(120% 90% at 100% 0%, var(--h3) 0%, transparent 60%), linear-gradient(150deg, var(--h1), var(--h2)); }
.btn-main { background: linear-gradient(135deg, var(--primary-2), var(--h3)); }
.map-btn { background: linear-gradient(135deg, var(--h1), var(--primary-2)); }
.icon-btn { color: #fff; }
.top .icons { display: flex; gap: 8px; }

#view { zoom: var(--fs); }
html.no-motion *, html.no-motion *::before, html.no-motion *::after { animation: none !important; transition-duration: .01ms !important; }

/* ---------- home statistics ---------- */
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sc { border-radius: 24px; padding: 14px; display: flex; flex-direction: column; gap: 8px; min-width: 0; animation: rise .5s ease both; }
.sc.wide { grid-column: 1 / -1; }
.sc h4 { margin: 0; font-size: 13px; font-weight: 700; color: var(--muted); }
.donut { display: flex; align-items: center; gap: 14px; }
.donut svg { flex: none; width: 92px; height: 92px; transform: rotate(-90deg); }
.donut circle { fill: none; stroke-width: 11; }
.donut .t { stroke: color-mix(in srgb, var(--amber) 55%, transparent); }
.donut .f { stroke: var(--green); stroke-linecap: round; transition: stroke-dashoffset .9s ease; }
.donut .lg { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; }
.donut .lg b { font-size: 22px; color: var(--primary); line-height: 1.1; }
.donut .lg i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-inline-end: 6px; }
.hb { display: flex; flex-direction: column; gap: 9px; }
.hb-r { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 8px; align-items: center; font-size: 13px; }
.hb-r span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.hb-r b { color: var(--primary); font-weight: 700; }
.hb-r .tr { grid-column: 1 / -1; height: 8px; border-radius: 4px; background: color-mix(in srgb, var(--ink) 10%, transparent); overflow: hidden; }
.hb-r .tr i { display: block; height: 100%; border-radius: 4px; background: var(--c, var(--primary-2)); transform-origin: right; animation: grow .8s cubic-bezier(.2, .8, .2, 1) both; width: var(--w); }
.mini3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mini3 div { text-align: center; }
.mini3 b { display: block; font-size: 24px; color: var(--primary); line-height: 1.15; }
.mini3 span { font-size: 11.5px; color: var(--muted); line-height: 1.25; display: block; }
.mini3 .w b { color: var(--amber); }
.sc .big { font-size: 28px; font-weight: 700; color: var(--primary); line-height: 1.1; }
.sc .sub { font-size: 12.5px; color: var(--muted); }

/* ---------- settings ---------- */
.set h3 { margin-bottom: 10px; }
.segn { margin-bottom: 4px; }
.hint { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.rng { display: flex; align-items: center; gap: 12px; }
.rng input { flex: 1; accent-color: var(--primary-2); height: 28px; }
.rng b { min-width: 48px; text-align: end; color: var(--primary); }
.tg { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 0; background: transparent; padding: 10px 2px; font-weight: 600; color: var(--ink); }
.tg i { position: relative; flex: none; width: 50px; height: 30px; border-radius: 15px; background: color-mix(in srgb, var(--ink) 22%, transparent); transition: background .2s; }
.tg i::after { content: ""; position: absolute; top: 3px; inset-inline-end: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .3); transition: inset .2s; }
.tg.on i { background: var(--green); }
.tg.on i::after { inset-inline-end: 23px; }
.swatches { display: flex; gap: 12px; flex-wrap: wrap; }
.sw { width: 46px; height: 46px; border-radius: 50%; border: 3px solid transparent; background: linear-gradient(135deg, var(--a), var(--b)); box-shadow: 0 4px 12px rgba(0, 0, 0, .25); }
.sw.on { border-color: var(--ink); outline: 2px solid var(--bg); outline-offset: -5px; }
.preview { border-radius: 24px; padding: 22px 16px; background: radial-gradient(80% 90% at 15% 20%, var(--blob1), transparent 70%), radial-gradient(70% 90% at 90% 80%, var(--blob2), transparent 70%), linear-gradient(135deg, var(--h1), var(--h2)); }
.pv-card { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-radius: 20px; color: var(--ink);
  background-color: var(--glass); background-image: var(--sheen); -webkit-backdrop-filter: blur(var(--blur)) saturate(1.9); backdrop-filter: blur(var(--blur)) saturate(1.9);
  border: 1px solid var(--glass-line); box-shadow: var(--lg-shadow); }
.pv-card b { font-size: 18px; color: var(--primary); }
html[data-theme="dark"] .tabs { background-color: rgba(22, 18, 54, .9); }

/* finished requests: dimmed, with a tilted stamp frame */
.rq{position:relative}
.rq.done{opacity:.82}
.rq .stamp{position:absolute;left:14px;bottom:14px;transform:rotate(-9deg);border:3px solid currentColor;border-radius:10px;padding:2px 12px;font-weight:900;font-size:18px;letter-spacing:.5px;opacity:.88;pointer-events:none;background:transparent}
.rq.st-applied .stamp{color:#1e9e4f}
.rq.st-rejected .stamp{color:#c0392b}
.rq.st-outdated .stamp{color:#7a7a8c}
html[data-theme="dark"] .rq.st-applied .stamp{color:#4cd98a}
html[data-theme="dark"] .rq.st-rejected .stamp{color:#ff7b6b}

.ph-loc{display:flex;flex-direction:column;gap:8px;align-items:flex-start;padding:12px;border-radius:14px;background:var(--glass);border:1px solid var(--line,rgba(120,120,150,.25))}
.ph-loc-t{font-weight:600;line-height:1.6}
.ph-loc-t.ok{color:#1e9e4f}
.ph-loc-t.bad{color:#c0392b}
.ph-loc-t.wait{color:#b45309}

.server-login{display:flex;flex-direction:column;gap:10px;margin-top:14px}
.server-login input{padding:13px 14px;border-radius:14px;border:1px solid var(--line,rgba(120,120,150,.35));background:var(--glass);font:inherit;font-size:16px;color:inherit}
.server-login input:focus{outline:2px solid var(--primary);outline-offset:1px}
