:root {
  --bg: #f6f7fb;
  --panel: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --faint: #9ca3af;
  --line: #e5e7eb;
  --line-soft: #eef0f4;
  --primary: #2f5bea;
  --primary-600: #2449c8;
  --primary-50: #eef2ff;
  --primary-100: #dfe6fd;
  --head: #c7d4fb;
  --ok: #16a34a;
  --ok-50: #ecfdf3;
  --warn: #d97706;
  --warn-50: #fffbeb;
  --bad: #dc2626;
  --bad-50: #fef2f2;
  --info: #0891b2;
  --info-50: #ecfeff;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, .18);
  --sidebar: 240px;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  color: var(--text);
}
* { box-sizing: border-box; }
svg { width: 16px; height: 16px; flex: none; }
html, body { margin: 0; height: 100%; background: var(--bg); }
a { color: var(--primary); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; }
.boot { display: grid; place-items: center; height: 100vh; color: var(--muted); }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 12px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 900px) { .grid2, .grid3, .grid4 { grid-template-columns: 1fr; } }

/* ---------- Đăng nhập ---------- */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; background: #fff; }
.login-art { background: linear-gradient(150deg, #2f5bea 0%, #4c7cf3 55%, #7aa2ff 100%); color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.login-art h2 { font-size: 34px; line-height: 1.25; max-width: 460px; }
.login-art p { opacity: .9; max-width: 420px; line-height: 1.6; }
.login-art .feat { display: grid; gap: 12px; margin-top: 28px; }
.login-art .feat div { display: flex; gap: 10px; align-items: center; }
.login-art .feat span.ic { width: 30px; height: 30px; border-radius: 8px; background: rgba(255,255,255,.18); display: grid; place-items: center; }
.login-art .clock-deco { position: absolute; right: -80px; bottom: -80px; width: 360px; height: 360px; border-radius: 50%; border: 28px solid rgba(255,255,255,.12); }
.login-form { display: grid; place-items: center; padding: 40px 24px; }
.login-box { width: 100%; max-width: 420px; }
.login-box .brand { display: flex; align-items: center; gap: 10px; margin-bottom: 28px; font-weight: 700; font-size: 18px; }
.login-box .brand img { width: 36px; height: 36px; }
.login-box h1 { font-size: 26px; color: #334155; margin-bottom: 6px; }
.login-box .sub { color: var(--muted); margin-bottom: 26px; }
.input-icon { position: relative; margin-bottom: 14px; }
.input-icon svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--faint); }
.input-icon input { width: 100%; padding: 11px 40px 11px 40px; border: 1px solid #d1d5db; border-radius: 8px; outline: none; background: #fff; }
.input-icon input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-100); }
.input-icon .eye { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; background: none; cursor: pointer; color: var(--faint); padding: 4px; }
.input-icon .eye svg { position: static; transform: none; }
.login-box .opts { display: flex; justify-content: space-between; align-items: center; margin: 4px 0 18px; font-size: 13px; }
.login-box .btn { width: 100%; padding: 11px; }
.login-err { background: var(--bad-50); color: var(--bad); padding: 10px 12px; border-radius: 8px; margin-bottom: 14px; font-size: 13px; }
@media (max-width: 860px) { .login-wrap { grid-template-columns: 1fr; } .login-art { display: none; } }

/* ---------- Bố cục ---------- */
.topbar { height: 54px; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; padding: 0 16px; gap: 12px; position: sticky; top: 0; z-index: 30; }
.topbar .brand { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--text); }
.topbar .brand img { width: 28px; height: 28px; }
.topbar .company { color: var(--muted); font-size: 13px; padding-left: 12px; border-left: 1px solid var(--line); }
.topbar .menu-btn { display: none; }
.user-chip { display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 4px 8px; border-radius: 8px; position: relative; }
.user-chip:hover { background: var(--bg); }
.user-chip .meta { line-height: 1.2; }
.user-chip .meta b { display: block; font-size: 13px; }
.user-chip .meta span { font-size: 11px; color: var(--muted); }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: inline-grid; place-items: center; color: #fff; font-weight: 600; font-size: 12px; flex: none; }
.avatar.sm { width: 26px; height: 26px; font-size: 11px; }
.avatar.lg { width: 72px; height: 72px; font-size: 24px; }
.dropdown { position: absolute; right: 0; top: calc(100% + 6px); background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-lg); min-width: 200px; padding: 6px; z-index: 50; }
.dropdown a, .dropdown button { display: flex; width: 100%; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 6px; color: var(--text); background: none; border: 0; cursor: pointer; text-align: left; }
.dropdown a:hover, .dropdown button:hover { background: var(--bg); }
.notif-box { width: 360px; max-height: 480px; overflow-y: auto; cursor: default; }
.notif-box a { align-items: flex-start; font-size: 13px; line-height: 1.4; }
.notif-box a.unread { background: var(--primary-50); }
.bell-badge { position: absolute; top: -2px; right: -2px; margin: 0; }
.user-chip > svg { width: 20px; height: 20px; color: #475569; }
.approver-flow { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; font-size: 12px; }
.approver-flow .step { padding: 2px 6px; border-radius: 6px; background: #f3f4f6; }
.approver-flow .step.done { background: var(--ok-50); color: var(--ok); }
.approver-flow .step.current { background: var(--warn-50); color: var(--warn); font-weight: 600; }
.approver-flow .step.rejected { background: var(--bad-50); color: var(--bad); }
.attach-row { display: flex; gap: 6px; flex-wrap: wrap; }
.attach-row img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.weekday-pick { display: flex; gap: 6px; flex-wrap: wrap; }
.weekday-pick label { padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line); cursor: pointer; user-select: none; }
.weekday-pick input { display: none; }
.weekday-pick input:checked + span { color: var(--primary); font-weight: 600; }
.weekday-pick label:has(input:checked) { border-color: var(--primary); background: var(--primary-50); }
.cell-edit { cursor: pointer; }
.cell-edit:hover { outline: 2px solid var(--primary-100); }

.layout { display: flex; min-height: calc(100vh - 54px); }
.sidebar { width: var(--sidebar); background: #fff; border-right: 1px solid var(--line); padding: 12px 8px; flex: none; position: sticky; top: 54px; height: calc(100vh - 54px); overflow-y: auto; }
.nav-group { margin-bottom: 4px; }
.nav-title { font-size: 11px; text-transform: uppercase; color: var(--faint); letter-spacing: .04em; padding: 12px 12px 6px; font-weight: 600; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 8px; color: #374151; margin: 1px 0; font-size: 13.5px; }
.nav a svg { width: 17px; height: 17px; flex: none; color: #6b7280; }
.nav a:hover { background: var(--bg); }
.nav a.active { background: var(--primary-50); color: var(--primary); font-weight: 600; }
.nav a.active svg { color: var(--primary); }
.nav a.sub { padding-left: 39px; }
.badge { background: var(--bad); color: #fff; border-radius: 999px; font-size: 11px; padding: 0 6px; min-width: 18px; height: 18px; display: inline-grid; place-items: center; margin-left: auto; font-weight: 600; }
.main { flex: 1; min-width: 0; padding: 18px 20px 40px; }
.page-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; min-height: 38px; }
.page-head h1 { font-size: 17px; font-weight: 700; color: #475569; text-transform: uppercase; letter-spacing: .01em; }
.page-head .spacer { flex: 1; }
@media (max-width: 900px) {
  .topbar .menu-btn { display: inline-flex; }
  .topbar .company { display: none; }
  .sidebar { position: fixed; left: 0; top: 54px; z-index: 40; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: none; }
  .main { padding: 14px 12px 40px; }
  .user-chip .meta { display: none; }
}

/* ---------- Thành phần ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 16px; }
.card h3 { font-size: 14px; font-weight: 700; margin-bottom: 10px; }
.card-head { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line-soft); }
.card-head h3 { margin: 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 14px; border-radius: 8px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-weight: 500; white-space: nowrap; line-height: 1.4; }
.btn svg { width: 16px; height: 16px; }
.btn:hover { background: #f9fafb; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-600); }
.btn.danger { color: var(--bad); border-color: #fecaca; }
.btn.danger:hover { background: var(--bad-50); }
.btn.success { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.ghost { border-color: transparent; background: none; color: var(--primary); padding: 5px 8px; }
.btn.ghost:hover { background: var(--primary-50); }
.btn.sm { padding: 4px 10px; font-size: 12.5px; }
.btn.icon { padding: 6px; }
.field { display: grid; gap: 5px; margin-bottom: 12px; }
.field > label { font-size: 13px; font-weight: 500; color: #374151; }
.field .hint { font-size: 12px; color: var(--muted); }
.input, select.input, textarea.input { width: 100%; padding: 8px 10px; border: 1px solid #d1d5db; border-radius: 8px; background: #fff; outline: none; min-height: 36px; }
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-100); }
textarea.input { resize: vertical; min-height: 72px; }
.input.sm { min-height: 32px; padding: 5px 8px; }
.check { display: inline-flex; gap: 8px; align-items: center; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--primary); }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.toolbar .input, .row .input, .page-head .input { width: auto; }
.page-head select.input, .toolbar select.input { max-width: 240px; }
.search { position: relative; }
.search input { padding-left: 32px; border-radius: 999px; min-width: 200px; }
.search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--faint); }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 14px; overflow-x: auto; }
.tabs a, .tabs button { padding: 9px 14px; color: #4b5563; border: 0; background: none; border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap; }
.tabs .active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.chip.ok { background: var(--ok-50); color: var(--ok); }
.chip.warn { background: var(--warn-50); color: var(--warn); }
.chip.bad { background: var(--bad-50); color: var(--bad); }
.chip.info { background: var(--info-50); color: var(--info); }
.chip.gray { background: #f3f4f6; color: #4b5563; }
.chip.primary { background: var(--primary-50); color: var(--primary); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: #4b5563; }
.legend span { display: inline-flex; gap: 6px; align-items: center; }
.legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.empty { text-align: center; padding: 36px 16px; color: var(--muted); }
.loading { padding: 30px; text-align: center; color: var(--muted); }

/* Bảng */
.table-wrap { overflow: auto; border-radius: var(--radius); }
table.tbl { width: 100%; border-collapse: separate; border-spacing: 0; background: #fff; }
.tbl th { background: var(--head); color: #1e293b; font-weight: 600; font-size: 12.5px; text-align: left; padding: 10px; position: sticky; top: 0; z-index: 2; white-space: nowrap; }
.tbl td { padding: 9px 10px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.tbl tr:hover td { background: #fafbff; }
.tbl tfoot td { font-weight: 700; background: #f8fafc; position: sticky; bottom: 0; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl.compact td { padding: 6px 8px; }
.tbl .sticky-col { position: sticky; left: 0; z-index: 1; background: #fff; }
.tbl th.sticky-col { z-index: 3; background: var(--head); }
.tbl .sticky-col2 { position: sticky; left: 90px; z-index: 1; background: #fff; box-shadow: 1px 0 0 var(--line); }
.tbl th.sticky-col2 { z-index: 3; background: var(--head); }
.tbl td.weekend { background: #f8fafc; }
.tbl td.today, .tbl th.today { box-shadow: inset 0 0 0 2px var(--primary-100); }
.person { display: flex; align-items: center; gap: 8px; }
.person b { font-weight: 600; }

/* Thẻ ca làm */
.shift-tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 6px; font-size: 12px; font-weight: 600; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border: 1px solid transparent; }
.shift-tag .x { cursor: pointer; opacity: .6; margin-left: 2px; border: 0; background: none; padding: 0 2px; font-size: 14px; line-height: 1; color: inherit; }
.shift-tag .x:hover { opacity: 1; }
.sched-cell { min-width: 130px; vertical-align: top !important; }
.sched-cell .stack { display: grid; gap: 4px; }
.sched-cell .add { visibility: hidden; border: 1px dashed #c7d2fe; color: var(--primary); background: none; border-radius: 6px; width: 100%; padding: 2px; cursor: pointer; }
.sched-cell:hover .add { visibility: visible; }
.leave-mark { font-size: 11px; padding: 2px 6px; border-radius: 6px; background: #fdf2f8; color: #be185d; }

/* Thống kê */
.stat { border-radius: 12px; padding: 18px; color: #fff; min-height: 120px; display: flex; flex-direction: column; justify-content: space-between; }
.stat .lbl { font-size: 14px; opacity: .95; }
.stat .val { font-size: 38px; font-weight: 700; }
.stat.c1 { background: linear-gradient(135deg, #2f5bea, #5b82f5); }
.stat.c2 { background: linear-gradient(135deg, #0e9f8f, #34c3b0); }
.stat.c3 { background: linear-gradient(135deg, #f59e0b, #fbbf24); }
.stat.c4 { background: linear-gradient(135deg, #7c3aed, #a78bfa); }
.kv { display: flex; align-items: center; justify-content: space-between; background: #f8fafc; border-radius: 8px; padding: 11px 14px; gap: 10px; }
.kv .k { display: flex; align-items: center; gap: 8px; color: #374151; }
.kv svg { width: 17px; height: 17px; color: var(--primary); flex: none; }
a.kv { color: inherit; }
a.kv:hover { background: var(--primary-50); }
.chip svg, .shift-tag svg { width: 13px; height: 13px; flex: none; }
.empty svg, .page-head svg, .row > svg { width: 16px; height: 16px; }
.kv .v { font-weight: 700; }
.mini { border-left: 4px solid; border-radius: 8px; padding: 12px 14px; background: #fff; }
.mini .v { font-size: 22px; font-weight: 700; margin-top: 4px; }
.shift-live { border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-bottom: 10px; }
.shift-live .counts { display: grid; grid-template-columns: repeat(5, 1fr); text-align: center; background: #f1f5f9; border-radius: 8px; padding: 8px 4px; margin-top: 8px; font-size: 11.5px; color: #475569; }
.shift-live .counts b { display: block; font-size: 15px; }

/* Chấm công */
.punch { display: grid; grid-template-columns: 1.2fr 1fr; gap: 16px; }
@media (max-width: 1000px) { .punch { grid-template-columns: 1fr; } }
.clock-card { text-align: center; padding: 28px 16px; background: linear-gradient(160deg, #ffffff, #f3f6ff); }
.clock-card .time { font-size: 54px; font-weight: 700; letter-spacing: .02em; color: #1e293b; font-variant-numeric: tabular-nums; }
.clock-card .date { color: var(--muted); margin-bottom: 18px; }
.punch-btn { width: 170px; height: 170px; border-radius: 50%; border: 0; color: #fff; font-size: 18px; font-weight: 700; cursor: pointer; box-shadow: 0 10px 30px rgba(47, 91, 234, .35); display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; transition: transform .1s; }
.punch-btn:active { transform: scale(.97); }
.punch-btn svg { width: 38px; height: 38px; }
.punch-btn.in { background: radial-gradient(circle at 30% 30%, #4c7cf3, #2449c8); }
.punch-btn.out { background: radial-gradient(circle at 30% 30%, #f87171, #dc2626); box-shadow: 0 10px 30px rgba(220, 38, 38, .35); }
.punch-btn:disabled { opacity: .6; cursor: wait; }
.punch-status { margin-top: 16px; display: grid; gap: 6px; justify-items: center; }
.shift-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; }
.shift-item .bar { width: 4px; align-self: stretch; border-radius: 4px; }
.shift-item .info { flex: 1; }
.shift-item .t { color: var(--muted); font-size: 12.5px; }
.camera { margin-top: 14px; display: grid; gap: 8px; justify-items: center; }
.camera video, .camera img { width: 240px; height: 180px; object-fit: cover; border-radius: 10px; background: #111; }
.photo-thumb { width: 54px; height: 42px; object-fit: cover; border-radius: 6px; cursor: zoom-in; border: 1px solid var(--line); }

/* Lịch tháng */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; }
.cal .dow { background: #f8fafc; padding: 9px; text-align: center; font-weight: 600; border-bottom: 1px solid var(--line); font-size: 13px; }
.cal .day { min-height: 118px; border-right: 1px dashed var(--line); border-bottom: 1px dashed var(--line); padding: 6px; display: flex; flex-direction: column; gap: 4px; }
.cal .day:nth-child(7n) { border-right: 0; background: #f5f7fd; }
.cal .day.out { background: #fbfbfc; color: var(--faint); }
.cal .day .dh { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.cal .day .dn { font-weight: 600; color: #374151; }
.cal .day.today .dn { background: var(--primary); color: #fff; border-radius: 50%; width: 22px; height: 22px; display: grid; place-items: center; }
.cal .ev { border-radius: 6px; padding: 4px 6px; font-size: 11.5px; line-height: 1.35; cursor: pointer; border-left: 3px solid; }
.cal .ev b { display: block; font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-dung_gio { background: #eef2ff; border-color: #6366f1 !important; }
.st-tre_som { background: #fee2e2; border-color: #ef4444 !important; }
.st-dang_lam { background: #e0f2fe; border-color: #0284c7 !important; }
.st-chua_den { background: #f3f4f6; border-color: #9ca3af !important; }
.st-vang { background: #fff1f2; border-color: #be123c !important; }
.st-thieu_checkout, .st-chua_checkout { background: #fef3c7; border-color: #d97706 !important; }
.st-nghi_phep, .st-don_tu { background: #dcfce7; border-color: #16a34a !important; }
.st-nghi_kl { background: #fce7f3; border-color: #db2777 !important; }
.st-le, .st-nghi_tuan { background: #fef9c3; border-color: #ca8a04 !important; }
.st-khong_tinh_cong { background: #fee2e2; border-color: #7f1d1d !important; }
.st-ot { background: #fefce8; border-color: #eab308 !important; }
@media (max-width: 700px) { .cal .day { min-height: 70px; padding: 3px; } .cal .ev b { font-size: 10px; } .cal .ev span { display: none; } }

/* Modal */
.modal-bg { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); display: grid; place-items: center; z-index: 100; padding: 16px; animation: fade .12s; }
.modal { background: #fff; border-radius: 14px; width: 100%; max-width: 540px; max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: var(--shadow-lg); }
.modal.wide { max-width: 860px; }
.modal-h { display: flex; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.modal-h h2 { font-size: 17px; flex: 1; }
.modal-b { padding: 16px 18px; overflow-y: auto; }
.modal-f { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; background: #fafafa; border-radius: 0 0 14px 14px; }
@keyframes fade { from { opacity: 0; } }

/* Toast */
#toasts { position: fixed; right: 16px; bottom: 16px; display: grid; gap: 8px; z-index: 200; }
.toast { background: #111827; color: #fff; padding: 10px 14px; border-radius: 10px; box-shadow: var(--shadow-lg); max-width: 380px; animation: fade .15s; font-size: 13.5px; }
.toast.ok { background: #065f46; }
.toast.err { background: #991b1b; }

/* Biểu đồ */
.chart svg { width: 100%; height: auto; display: block; }
.chart .grid line { stroke: #f1d5db; stroke-width: 1; }
.chart svg { width: 100%; height: auto; }
.chart text { font-size: 12px; fill: #64748b; }

/* Bảng công */
.cong-cell { text-align: center; font-variant-numeric: tabular-nums; min-width: 54px; }
.cong-cell.abn { color: var(--bad); text-decoration: underline; font-weight: 600; cursor: pointer; }
.cong-cell.has { cursor: pointer; }
.switch { position: relative; width: 36px; height: 20px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: #d1d5db; border-radius: 20px; transition: .15s; cursor: pointer; }
.switch span::before { content: ''; position: absolute; width: 16px; height: 16px; left: 2px; top: 2px; background: #fff; border-radius: 50%; transition: .15s; }
.switch input:checked + span { background: var(--primary); }
.switch input:checked + span::before { transform: translateX(16px); }
.rule { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.rule .body { flex: 1; }
.rule .body b { display: block; margin-bottom: 2px; font-weight: 600; }
.rule .body p { margin: 0; font-size: 12.5px; color: var(--muted); font-style: italic; }
.rule .inline-num { width: 80px; display: inline-block; margin: 0 6px; }
.section-title { font-weight: 700; margin: 18px 0 4px; color: #334155; }
.color-pick { display: flex; gap: 8px; flex-wrap: wrap; }
.color-pick label { width: 28px; height: 28px; border-radius: 50%; cursor: pointer; display: grid; place-items: center; border: 2px solid transparent; }
.color-pick input { display: none; }
.color-pick input:checked + label { border-color: #111; box-shadow: inset 0 0 0 3px #fff; }
