/* ============================================================
   tpanel UI — sunset SaaS theme (yellow / red / pink)
   Zero external CSS dependencies.
   ============================================================ */
:root {
  --yellow: #ffd60a;
  --yellow-2: #ffb703;
  --red: #ff3b5c;
  --red-dark: #e11d48;
  --pink: #ff5fa2;
  --pink-soft: #ffd1e4;
  --ink: #2b1233;
  --ink-2: #4b3652;
  --muted: #6b5a70;
  --line: #f2dfe8;
  --white: #ffffff;       /* sanyam — shanti aur sadgi */
  --bg: #fffdfa;          /* safed aadhaar, halka glow */
  --card: rgba(255, 255, 255, .88);
  --card-solid: #fff;
  --grad: linear-gradient(115deg, var(--yellow) 0%, #ff9e3d 32%, var(--pink) 66%, var(--red) 100%);
  --grad-soft: linear-gradient(135deg, #fff5c2, #ffe3ef 55%, #ffd9e0);
  --shadow: 0 18px 50px rgba(120, 30, 75, .12);
  --shadow-sm: 0 6px 20px rgba(120, 30, 75, .08);
  --radius: 20px;
  --radius-sm: 12px;
  --font: 'Poppins', 'Segoe UI', ui-sans-serif, system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-size: 16px;
  line-height: 1.6;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: var(--red-dark); text-decoration: none; }

/* Ambient blobs */
.ambient { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.ambient i { position: absolute; display: block; border-radius: 50%; filter: blur(70px); opacity: .45; animation: float 16s ease-in-out infinite; }
.ambient i:nth-child(1) { width: 420px; height: 420px; background: var(--yellow); top: -120px; left: -80px; }
.ambient i:nth-child(2) { width: 380px; height: 380px; background: var(--pink); bottom: -120px; right: -60px; animation-delay: -5s; }
.ambient i:nth-child(3) { width: 300px; height: 300px; background: var(--red); top: 40%; left: 55%; opacity: .18; animation-delay: -9s; }
@keyframes float { 0%,100% { transform: translate3d(0,0,0) scale(1); } 50% { transform: translate3d(20px,-30px,0) scale(1.08); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes pop { 0% { transform: scale(.94); opacity: 0; } 70% { transform: scale(1.02); } 100% { transform: scale(1); opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { 0% { background-position: -400px 0; } 100% { background-position: 400px 0; } }

#app { position: relative; z-index: 1; min-height: 100vh; }
.screen { animation: fadeUp .4s ease both; }

/* Boot */
.boot-screen { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 18px; text-align: center; }
.boot-logo { font-size: 38px; font-weight: 800; letter-spacing: 0; }
.boot-logo span { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--grad); color: #fff; margin-right: 4px; }
.boot-bar { width: 220px; height: 6px; border-radius: 99px; background: #ffe1ec; overflow: hidden; }
.boot-bar i { display: block; height: 100%; width: 40%; border-radius: 99px; background: var(--grad); animation: shimmer 1.2s linear infinite; background-size: 400px 100%; }
.boot-screen p { color: var(--muted); margin: 0; font-size: 14px; }

/* Common card / grid / buttons */
.card { background: var(--card); backdrop-filter: blur(16px); border: 1px solid rgba(255,255,255,.9); border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px; }
.card-solid { background: var(--card-solid); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.card-title { margin: 0; font-size: 18px; font-weight: 700; }
.card-sub { color: var(--muted); font-size: 13px; margin: 3px 0 0; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-auto { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mt { margin-top: 18px; }.mt-lg { margin-top: 28px; }.mb { margin-bottom: 16px; }
.muted { color: var(--muted); }
.tiny { font-size: 13.5px; }
.hidden { display: none !important; }
.center { text-align: center; }

.btn {
  border: 0; border-radius: 12px; padding: 13px 20px; min-height: 44px; font-weight: 600; font-size: 15px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
  color: var(--ink); background: #fff; box-shadow: var(--shadow-sm);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 12px 26px rgba(255,59,92,.3); }
.btn-primary:hover { filter: brightness(1.05); box-shadow: 0 16px 32px rgba(255,59,92,.36); }
.btn-ghost { background: rgba(255,255,255,.7); border: 1px solid var(--line); box-shadow: none; }
.btn-danger { background: #fff0f3; color: var(--red-dark); border: 1px solid #ffd0da; box-shadow: none; }
 .btn-lg { padding: 16px 28px; min-height: 50px; font-size: 17px; border-radius: 14px; }
.btn-sm { padding: 9px 14px; min-height: 40px; font-size: 13px; border-radius: 11px; }
.btn-block { width: 100%; }
.btn-icon { width: 38px; height: 38px; padding: 0; border-radius: 11px; }

.field { display: grid; gap: 7px; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field .hint { font-size: 13px; color: var(--muted); }
input[type="text"], input[type="password"], input[type="number"], select, textarea {
  width: 100%; border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px;
  background: #fff; color: var(--ink); outline: none; transition: border .15s, box-shadow .15s;
  font-size: 14px;
}
input:focus, select:focus, textarea:focus { border-color: var(--pink); box-shadow: 0 0 0 4px rgba(255,95,162,.14); }
input[type="number"] { appearance: textfield; }
input[type="range"] { width: 100%; accent-color: var(--red); }
select { cursor: pointer; }

.pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 99px; padding: 6px 12px; font-size: 13px; font-weight: 600; background: #fff; border: 1px solid var(--line); }
.pill-ghost { background: rgba(255,255,255,.6); }
.pill-yellow { background: #fff6c9; border-color: #ffe27a; color: #8a6600; }
.pill-red { background: #ffe4ea; border-color: #ffc4d0; color: var(--red-dark); }
.pill-pink { background: #ffe6f1; border-color: #ffc7e0; color: #b62e73; }
.pill-green { background: #e4fbef; border-color: #b9f0d2; color: #14804a; }
.pill-gray { background: #f4f1f5; border-color: #e6e0e8; color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: currentColor; }
.dot-live { box-shadow: 0 0 0 4px rgba(20,128,74,.14); }

/* ============================================================
   Top bar + brand
   ============================================================ */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px clamp(16px, 4vw, 42px);
  background: rgba(255,248,245,.78); backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255,255,255,.8);
}
.topbar.simple { background: transparent; border: 0; backdrop-filter: none; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 22px; letter-spacing: 0; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--grad); color: #fff; font-size: 22px; box-shadow: 0 8px 18px rgba(255,59,92,.28); }
.brand-dot { color: var(--red); }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.avatar { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--grad-soft); border: 1px solid #fff; font-weight: 700; font-size: 14px; }

/* Stepper */
.stepper { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; margin: 8px 0 28px; }
.step { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.step b { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #fff; border: 1.5px solid var(--line); font-size: 12px; }
.step.active { color: var(--ink); }
.step.active b { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 6px 14px rgba(255,59,92,.25); }
.step.done b { background: #e4fbef; color: #14804a; border-color: #b9f0d2; }
.step-line { width: 28px; height: 2px; background: var(--line); border-radius: 2px; }

/* ============================================================
   Login / hero / wizard screens
   ============================================================ */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-card { width: min(460px, 100%); padding: 34px; }
.auth-illustration { height: 120px; border-radius: 18px; background: var(--grad); position: relative; overflow: hidden; margin-bottom: 22px; }
.auth-illustration::before, .auth-illustration::after { content: ''; position: absolute; border-radius: 50%; background: rgba(255,255,255,.22); }
.auth-illustration::before { width: 160px; height: 160px; top: -60px; right: -30px; }
.auth-illustration::after { width: 90px; height: 90px; bottom: -40px; left: 30px; }
.auth-illustration span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 48px; }
.auth-title { font-size: 26px; font-weight: 800; margin: 0 0 6px; letter-spacing: 0; }
.auth-sub { color: var(--muted); margin: 0 0 22px; font-size: 14px; }
.demo-hint { margin-top: 16px; padding: 14px 16px; border-radius: 12px; background: #fff8dd; border: 1px dashed #ffd76a; font-size: 13.5px; color: #7a5a00; }
.auth-perks { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 30px clamp(16px, 4vw, 36px) 70px; }
.hero { text-align: center; padding: 46px 0 24px; }
.eyebrow { display: inline-block; font-size: 12.5px; font-weight: 800; letter-spacing: 2px; color: var(--red-dark); background: #ffe8ef; padding: 7px 14px; border-radius: 99px; }
.hero h1 { font-size: clamp(32px, 6vw, 58px); line-height: 1.08; letter-spacing: 0; margin: 20px 0 14px; font-weight: 800; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { max-width: 660px; margin: 0 auto 26px; color: var(--ink-2); font-size: 16px; line-height: 1.7; }

.scan-card { max-width: 720px; margin: 0 auto; }
.scan-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; transition: background .2s; }
.scan-row + .scan-row { margin-top: 4px; }
.scan-row.pending { opacity: .45; }
.scan-row.active { background: #fff5d6; }
.scan-row.done { background: #f2fbf6; }
.scan-ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: #fff; box-shadow: var(--shadow-sm); font-size: 14px; flex: 0 0 auto; }
.scan-row.active .scan-ico { background: var(--grad); color: #fff; }
.scan-row.done .scan-ico { background: #d8f6e5; color: #14804a; }
.spinner { width: 16px; height: 16px; border: 2px solid #ffd0dd; border-top-color: var(--red); border-radius: 50%; animation: spin .7s linear infinite; }

.spec-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.spec { padding: 14px; border-radius: 14px; background: linear-gradient(145deg, #fff, #fff7fa); border: 1px solid var(--line); }
.spec span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 5px; }
.spec strong { font-size: 15px; word-break: break-word; }
.alert { padding: 14px 16px; border-radius: 14px; font-size: 13px; line-height: 1.6; }
.alert-warn { background: #fff6dd; border: 1px solid #ffe08a; color: #6d5200; }
.alert-info { background: #eef6ff; border: 1px solid #cfe3ff; color: #174f8a; }
.alert-ok { background: #ecfbf2; border: 1px solid #bdeccf; color: #12663b; }
ul.clean { margin: 8px 0 0; padding-left: 18px; line-height: 1.8; font-size: 13px; }

.count-box { display: flex; align-items: center; gap: 14px; }
.count-box input[type="number"] { width: 110px; font-size: 26px; font-weight: 800; text-align: center; padding: 10px; }
.templates { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.template { border: 2px solid var(--line); border-radius: 16px; padding: 16px; background: #fff; transition: .18s; text-align: left; }
.template:hover { transform: translateY(-3px); box-shadow: var(--shadow-sm); }
.template.selected { border-color: var(--red); background: linear-gradient(145deg, #fff, #fff0f4); box-shadow: 0 10px 24px rgba(255,59,92,.12); }
.template b { display: block; font-size: 16px; margin-bottom: 4px; }
.template span { font-size: 13.5px; color: var(--muted); }

/* Fleet cards */
.fleet-card { background: var(--card); border: 1px solid rgba(255,255,255,.9); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; animation: pop .35s ease both; }
.fleet-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.fleet-name { font-size: 17px; font-weight: 800; margin: 0; }
.fleet-ip { font-size: 13px; color: var(--muted); font-family: ui-monospace, monospace; }
.fleet-specs { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0; }
.fleet-spec { flex: 1 1 70px; text-align: center; padding: 9px 6px; border-radius: 12px; background: #fff7fa; border: 1px solid var(--line); }
.fleet-spec b { display: block; font-size: 15px; }
.fleet-spec span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.chip { font-size: 12.5px; padding: 6px 11px; border-radius: 99px; background: #fff1f5; border: 1px solid #ffd9e5; color: #a52f61; }

/* ============================================================
   Dashboard shell (x3-like)
   ============================================================ */
.shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  background: linear-gradient(180deg, #fff 0%, #fff7fa 100%);
  border-right: 1px solid var(--line);
  padding: 18px 12px 40px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar .brand { padding: 4px 10px 20px; }
.side-group { margin-bottom: 8px; }
.side-label { font-size: 12px; font-weight: 800; letter-spacing: 1.4px; color: #b09cac; text-transform: uppercase; padding: 10px 12px 6px; }
.side-item {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  border: 0; background: transparent; border-radius: 11px; padding: 9px 12px;
  color: var(--ink-2); font-size: 13px; font-weight: 600; transition: .15s;
}
.side-item:hover { background: #fff; color: var(--ink); transform: translateX(2px); }
.side-item.active { background: var(--grad); color: #fff; box-shadow: 0 8px 18px rgba(255,59,92,.22); }
.side-item .ic { width: 22px; text-align: center; font-size: 15px; }
.side-foot { margin: 18px 6px 0; padding: 14px; border-radius: 14px; background: #fff; border: 1px solid var(--line); font-size: 13px; color: var(--muted); line-height: 1.6; }

.dash { min-width: 0; }
.dash-top {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px clamp(16px, 3vw, 28px);
  background: rgba(255,248,245,.82); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.search { flex: 1 1 240px; max-width: 420px; position: relative; }
.search input { padding-left: 38px; background: #fff; }
.search::before { content: '⌕'; position: absolute; left: 13px; top: 50%; transform: translateY(-52%); color: var(--muted); font-size: 17px; }
.dash-main { padding: 24px clamp(16px, 3vw, 28px) 60px; }
.welcome { border-radius: 22px; padding: 26px; background: var(--grad); color: #fff; position: relative; overflow: hidden; box-shadow: 0 18px 40px rgba(255,59,92,.22); }
.welcome::after { content: ''; position: absolute; width: 260px; height: 260px; border-radius: 50%; background: rgba(255,255,255,.14); right: -70px; top: -110px; }
.welcome h2 { margin: 0 0 6px; font-size: 24px; letter-spacing: 0; }
.welcome p { margin: 0; opacity: .92; font-size: 13px; }
.welcome .row { margin-top: 18px; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 18px; box-shadow: var(--shadow-sm); position: relative; overflow: hidden; }
.stat::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--grad); }
.stat span { font-size: 13.5px; color: var(--muted); }
.stat b { display: block; font-size: 30px; letter-spacing: 0; margin: 4px 0; }
.stat i { font-style: normal; font-size: 20px; position: absolute; right: 16px; top: 16px; opacity: .8; }

.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(152px, 1fr)); gap: 14px; }
.tile {
  border: 1px solid var(--line); background: #fff; border-radius: 16px; padding: 16px 10px;
  text-align: center; transition: .18s; box-shadow: var(--shadow-sm);
}
.tile:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #ffcada; }
.tile .ico { width: 44px; height: 44px; margin: 0 auto 9px; display: grid; place-items: center; border-radius: 14px; font-size: 20px; }
.tile b { display: block; font-size: 14px; line-height: 1.35; }
.tile small { color: var(--muted); font-size: 12px; }
.tone-yellow .ico { background: #fff5c9; }.tone-pink .ico { background: #ffe3f0; }.tone-red .ico { background: #ffe1e7; }

/* Tables */
.table-wrap { overflow-x: auto; border-radius: 14px; border: 1px solid var(--line); background: #fff; }
table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 620px; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid #f7eef2; white-space: nowrap; }
th { background: #fff7fa; font-size: 12.5px; text-transform: uppercase; letter-spacing: .7px; color: var(--muted); }
tr:last-child td { border-bottom: 0; }
tr:hover td { background: #fffafc; }
td select { padding: 6px 26px 6px 10px; font-size: 13px; border-radius: 9px; background: #fffdfd; width: auto; min-width: 104px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }

/* Activity feed */
.feed { display: grid; gap: 2px; max-height: 330px; overflow-y: auto; }
.feed-row { display: flex; gap: 10px; padding: 11px 4px; border-bottom: 1px dashed #f3e7ec; font-size: 13.5px; }
.feed-row:last-child { border: 0; }
.feed-dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 5px; flex: 0 0 auto; background: var(--pink); }
.feed-row.warn .feed-dot { background: var(--yellow-2); }
.feed-row.info .feed-dot { background: #3ecf8e; }
.feed-time { margin-left: auto; color: var(--muted); font-size: 12px; white-space: nowrap; }

.meter { height: 7px; border-radius: 99px; background: #f5e8ee; overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 99px; background: var(--grad); }

.empty { padding: 34px; text-align: center; color: var(--muted); font-size: 13px; }
.empty b { display: block; font-size: 30px; margin-bottom: 8px; }

/* Modal + toast + palette */
.modal-backdrop { position: fixed; inset: 0; background: rgba(43,18,51,.42); backdrop-filter: blur(5px); z-index: 90; display: grid; place-items: center; padding: 20px; animation: fadeUp .18s ease; }
.modal { width: min(560px, 100%); max-height: 86vh; overflow-y: auto; background: #fff; border-radius: 22px; box-shadow: 0 30px 80px rgba(43,18,51,.3); padding: 26px; animation: pop .22s ease both; }
.modal.wide { width: min(820px, 100%); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.modal-head h3 { margin: 0; font-size: 20px; }
.modal-head p { margin: 4px 0 0; color: var(--muted); font-size: 13.5px; }

.toast-root { position: fixed; right: 18px; bottom: 18px; z-index: 120; display: grid; gap: 10px; width: min(360px, calc(100vw - 36px)); }
.toast { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--pink); border-radius: 14px; padding: 13px 15px; box-shadow: var(--shadow); font-size: 13px; animation: fadeUp .24s ease both; }
.toast.ok { border-left-color: #22c07a; }.toast.err { border-left-color: var(--red); }

.palette-list { display: grid; gap: 6px; max-height: 380px; overflow-y: auto; margin-top: 12px; }
.palette-item { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; background: #fff7fa; border-radius: 12px; padding: 11px 13px; text-align: left; }
.palette-item:hover { background: #ffeef4; }
.palette-item b { font-size: 14px; }.palette-item small { display: block; color: var(--muted); font-size: 12.5px; }

/* ============================================================
   Setup wizard + billing extras
   ============================================================ */
.group-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 14px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.gtab { flex: 0 0 auto; border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 10px 16px; min-height: 40px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.gtab:hover { border-color: var(--pink); }
.gtab.active { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 8px 18px rgba(255,59,92,.22); }

.setup-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 16px; }
.setup-q { padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: #fffafc; }
.setup-q label { display: block; margin-bottom: 8px; }
.setup-q.is-locked { opacity: .66; background: #faf7fa; }

.switch { position: relative; display: inline-block; width: 48px; height: 26px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; inset: 0; background: #e5dae0; border-radius: 99px; transition: .2s; }
.slider::before { content: ''; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 2px 5px rgba(0,0,0,.15); }
.switch input:checked + .slider { background: var(--grad); }
.switch input:checked + .slider::before { transform: translateX(22px); }
.switch input:disabled + .slider { opacity: .5; }

.ms-grid { display: flex; flex-wrap: wrap; gap: 6px; max-height: 150px; overflow-y: auto; }
.ms-chip { position: relative; font-size: 12.5px; padding: 7px 12px; border-radius: 99px; border: 1px solid var(--line); background: #fff; cursor: pointer; user-select: none; }
.ms-chip input { position: absolute; opacity: 0; pointer-events: none; }
.ms-chip.on { background: #ffe6f1; border-color: var(--pink); color: #b62e73; font-weight: 700; }
.ms-chip.locked { opacity: .5; cursor: not-allowed; }

/* Visual guide player */
.guide-stage { border-radius: 18px; padding: 24px; text-align: center; background: var(--grad-soft); border: 1px solid var(--line); }
.guide-visual { font-size: 64px; line-height: 1; margin-bottom: 12px; animation: pop .4s ease both; filter: drop-shadow(0 8px 14px rgba(120,30,75,.2)); }
.guide-stage h3 { margin: 0 0 8px; font-size: 20px; }
.guide-stage p { margin: 0 auto; max-width: 480px; font-size: 14px; line-height: 1.6; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1080px) {
  .shell { grid-template-columns: 210px minmax(0,1fr); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 820px) {
  .shell { display: block; }
  .sidebar { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 12px; }
  .sidebar .brand { padding-bottom: 10px; }
  .side-groups { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
  .side-group { flex: 0 0 auto; margin: 0; }
  .side-label { display: none; }
  .side-item { white-space: nowrap; width: auto; }
  .side-foot { display: none; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .dash-top { position: static; }
  .hero { padding-top: 26px; }
}
@media (max-width: 560px) {
  .card { padding: 18px; border-radius: 16px; }
  .topbar { padding: 12px 16px; }
  .hero h1 { letter-spacing: 0; }
  .stat b { font-size: 25px; }
  .count-box { flex-direction: column; align-items: stretch; }
  .count-box input { width: 100%; }
  .stepper { gap: 4px; }
  .step span { display: none; }
  .step-line { width: 16px; }
  .auth-card { padding: 22px; }
}

/* ============================================================
   USER PREFERENCE — full width + uniform 16px type everywhere
   ============================================================ */
.wrap {
  max-width: none !important;
  width: 100% !important;
  padding-left: clamp(16px, 3vw, 44px) !important;
  padding-right: clamp(16px, 3vw, 44px) !important;
  box-sizing: border-box;
}
.dash-main, .main, .card { max-width: none !important; width: auto !important; }
#app, #app * { font-size: 16px !important; line-height: 1.55; }
input, select, textarea, button, .btn { font-size: 16px !important; }

/* Readable type: no overlap anywhere */
#app h1, #app h2, #app h3, #app p, #app span { letter-spacing: 0 !important; line-height: 1.6 !important; }
.hero h1 { letter-spacing: 0 !important; line-height: 1.6 !important; }
