/* =====================================================================
   ShopCloud247 Activate Portal — Design System
   Premium Dark · Modern · Minimalist · Luxury Technology
   Font: Sora (heading/số liệu) + Plus Jakarta Sans (body/UI)
   Mặc định: Dark. Có thể chuyển Light qua nút đổi giao diện (🌓).
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Sora:wght@500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
  /* ---- Premium Dark (mặc định) ---- */
  --bg:#0a0c16; --bg-alt:#0d1020;
  --surface:#12152888; --surface-solid:#12152a; --surface-2:#171b32; --surface-raised:#1a1e38;
  --border:#262b4a; --border-soft:#1c2039;
  --text:#eef1fc; --text-muted:#8b92b4; --text-faint:#5c6389;

  --gold:#d4af6a; --gold-strong:#e8c585; --gold-soft:#271f12;
  --violet:#7c82ff; --violet-strong:#9fa3ff; --violet-soft:#1a1c3c;
  --teal:#38d9a9; --teal-soft:#0e2420;
  --rose:#ef7fac; --rose-soft:#2a1726;
  --red:#f1707c; --red-soft:#2d141a;

  --sidebar-grad: linear-gradient(185deg,#0f1226 0%,#090b17 100%);
  --radius: 16px;
  --radius-sm: 11px;
  --radius-lg: 20px;
  --shadow-soft: 0 12px 32px -14px rgba(0,0,0,.55);
  --shadow-pop: 0 20px 50px -18px rgba(0,0,0,.6);
  --font-head: 'Sora', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
}

:root[data-theme="light"] {
  --bg:#f3f5fb; --bg-alt:#eef1fa;
  --surface:#ffffffcc; --surface-solid:#ffffff; --surface-2:#f4f6fc; --surface-raised:#ffffff;
  --border:#e1e6f5; --border-soft:#e9ecf8;
  --text:#11142b; --text-muted:#5c6482; --text-faint:#8991b3;

  --gold:#a9763f; --gold-strong:#8a5f2f; --gold-soft:#faf0db;
  --violet:#5457e5; --violet-strong:#4245c4; --violet-soft:#ecedfd;
  --teal:#0e9f78; --teal-soft:#e2f7ee;
  --rose:#c54c7e; --rose-soft:#fbe9f1;
  --red:#d23c4a; --red-soft:#fbe5e7;

  --shadow-soft: 0 10px 28px -14px rgba(16,20,42,.14);
  --shadow-pop: 0 18px 44px -16px rgba(16,20,42,.22);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  background-image: radial-gradient(60% 50% at 85% -10%, rgba(124,130,255,.08), transparent 60%);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1,h2,h3,h4,.num,.font-head { font-family: var(--font-head); letter-spacing: -0.012em; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
::selection { background: var(--violet); color: #fff; }

/* Scrollbar tinh tế cho theme tối */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; border: 2px solid transparent; background-clip: content-box; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* ---------- App shell ---------- */
.app-shell { display: flex; min-height: 100vh; }

/* ---------- Sidebar (dark console rail, luôn tối kể cả theme sáng) ---------- */
.sidebar {
  width: 264px;
  flex-shrink: 0;
  background: var(--sidebar-grad);
  color: #eaf0ff;
  padding: 22px 14px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  border-right: 1px solid rgba(255,255,255,.04);
}
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 22px; }
.sidebar-brand .logo-mark {
  width: 38px; height: 38px; border-radius: 11px;
  background: linear-gradient(150deg,#e8c585,#a9763f);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-weight: 700; color: #1a1304; font-size: 15px;
}
.sidebar-brand .brand-text { font-family: var(--font-head); font-weight: 700; font-size: 15.5px; color: #fff; }
.sidebar-brand .brand-sub { font-size: 11px; color: #7781a8; letter-spacing: .02em; }

.nav-group { margin-top: 6px; display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10.5px 12px; border-radius: 11px;
  color: #a9b0d4; font-size: 13.5px; font-weight: 500;
  transition: background .15s ease, color .15s ease, transform .15s ease;
}
.nav-item:hover { background: rgba(255,255,255,.05); color: #fff; transform: translateX(2px); }
.nav-item.active { background: rgba(255,255,255,.08); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
.navdot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; box-shadow: 0 0 0 3px rgba(255,255,255,.05); }
.nav-divider { height: 1px; background: rgba(255,255,255,.07); margin: 12px 4px; }
.nav-label-muted { font-size: 10.5px; color: #525a82; padding: 6px 12px 2px; text-transform: uppercase; letter-spacing: .07em; }

/* ---------- Main content ---------- */
.main { flex: 1; min-width: 0; }
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 28px; background: var(--surface-solid); border-bottom: 1px solid var(--border-soft);
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: saturate(140%) blur(10px);
}
.topbar-title { font-family: var(--font-head); font-weight: 600; font-size: 18px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 11px; display: flex; align-items: center; justify-content: center;
  background: var(--surface-2); border: 1px solid var(--border-soft); cursor: pointer; color: var(--text);
  transition: background .15s, border-color .15s; position: relative; font-size: 15px;
}
.icon-btn:hover { background: var(--surface-raised); border-color: var(--border); }

.content { padding: 26px 28px 40px; max-width: 1240px; margin: 0 auto; }

/* ---------- Marquee ---------- */
.marquee-wrap { background: var(--violet-soft); border-bottom: 1px solid var(--border-soft); overflow: hidden; white-space: nowrap; padding: 8px 0; }
.marquee-track { display: inline-block; padding-left: 100%; animation: marquee 24s linear infinite; color: var(--violet-strong); font-weight: 600; font-size: 12.5px; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-100%); } }

/* ---------- Cards ---------- */
.card {
  background: var(--surface-solid); border: 1px solid var(--border-soft); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow-soft);
}
.card-title { font-family: var(--font-head); font-weight: 600; font-size: 15.5px; margin: 0 0 14px; letter-spacing: -.005em; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 22px; }
@media (max-width: 900px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
.stat-tile {
  background: var(--surface-solid); border: 1px solid var(--border-soft); border-radius: 14px;
  padding: 14px 15px; display: flex; align-items: center; gap: 12px;
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.stat-tile:hover { border-color: var(--border); transform: translateY(-2px); box-shadow: var(--shadow-soft); }
.stat-tile .stat-icon {
  width: 36px; height: 36px; border-radius: 10px; font-size: 15px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-bottom: 0;
}
.stat-tile .stat-body { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.stat-tile .stat-num { font-family: var(--font-head); font-size: 19px; font-weight: 700; line-height: 1.1; }
.stat-tile .stat-label { font-size: 11px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-violet .stat-icon { background: var(--violet-soft); color: var(--violet-strong); }
.stat-gold .stat-icon { background: var(--gold-soft); color: var(--gold-strong); }
.stat-teal .stat-icon { background: var(--teal-soft); color: var(--teal); }
.stat-rose .stat-icon { background: var(--rose-soft); color: var(--rose); }

/* Wallet hero — gradient duy nhất của trang, dùng có chủ đích làm điểm nhấn */
.hero-wallet {
  border-radius: var(--radius-lg); padding: 26px 28px; margin-bottom: 22px; color: #fff;
  background: linear-gradient(135deg,#171b38 0%,#10122a 60%,#0a0b1a 100%);
  border: 1px solid rgba(255,255,255,.06);
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px;
  position: relative; overflow: hidden;
}
.hero-wallet::after {
  content: ''; position: absolute; right: -70px; top: -70px; width: 240px; height: 240px;
  background: radial-gradient(circle, rgba(232,197,133,.14), transparent 70%); border-radius: 50%;
}
.hero-wallet .hw-greet { font-size: 12.5px; color: #8a91c0; letter-spacing: .01em; }
.hero-wallet .hw-name { font-family: var(--font-head); font-size: 21px; font-weight: 700; margin-top: 2px; }
.hero-wallet .hw-balance-label { font-size: 11.5px; color: #8a91c0; }
.hero-wallet .hw-balance { font-family: var(--font-head); font-size: 27px; font-weight: 700; color: var(--gold-strong); margin-top: 2px; }

/* ---------- Device / signal-bar time-remaining widget ---------- */
.devcard-list { display: flex; flex-direction: column; gap: 10px; }
.devcard {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px;
  background: var(--surface-2); border: 1px solid var(--border-soft); border-radius: var(--radius-sm);
  transition: border-color .15s ease;
}
.devcard:hover { border-color: var(--border); }
.devcard .dev-icon { width: 40px; height: 40px; border-radius: 10px; background: var(--violet-soft); color: var(--violet-strong); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.devcard .dev-info { flex: 1; min-width: 0; }
.devcard .dev-name { font-weight: 600; font-size: 13.5px; }
.devcard .dev-sub { font-size: 11.5px; color: var(--text-muted); }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 22px; }
.bars span { width: 5px; border-radius: 2px; background: var(--border); }
.bars span:nth-child(1) { height: 30%; } .bars span:nth-child(2) { height: 50%; }
.bars span:nth-child(3) { height: 70%; } .bars span:nth-child(4) { height: 90%; } .bars span:nth-child(5) { height: 100%; }
.bars.ok span.lit { background: var(--teal); }
.bars.warn span.lit { background: var(--gold); }
.bars.urgent span.lit { background: var(--red); }
.dev-time-label { font-size: 11.5px; font-weight: 600; margin-top: 2px; }
.disclaimer-note { font-size: 11px; color: var(--text-faint); margin-top: 10px; font-style: italic; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10.5px 20px; border-radius: 11px; font-weight: 600; font-size: 13.5px;
  border: none; cursor: pointer; transition: transform .12s ease, box-shadow .12s ease, filter .12s ease; font-family: var(--font-body);
}
.btn:active { transform: scale(.97); }
.btn-gold { background: var(--gold-strong); color: #241a05; box-shadow: 0 8px 18px -8px rgba(212,175,106,.45); }
.btn-gold:hover { filter: brightness(1.06); }
.btn-teal { background: var(--teal); color: #042d22; box-shadow: 0 8px 18px -8px rgba(56,217,169,.4); }
.btn-teal:hover { filter: brightness(1.06); }
.btn-violet { background: var(--violet); color: #fff; box-shadow: 0 8px 18px -8px rgba(124,130,255,.45); }
.btn-violet:hover { filter: brightness(1.08); }
.btn-rose { background: var(--rose); color: #2b0414; box-shadow: 0 8px 18px -8px rgba(239,127,172,.4); }
.btn-rose:hover { filter: brightness(1.06); }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-outline:hover { background: var(--surface-2); border-color: var(--text-faint); }
.btn-sm { padding: 7px 14px; font-size: 12.5px; border-radius: 9px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------- Forms ---------- */
.field { margin-bottom: 15px; }
.field label { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 6px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .03em; }
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text); font-family: var(--font-body); font-size: 14px;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--violet); box-shadow: 0 0 0 3px var(--violet-soft);
}
.field input:disabled { opacity: .6; cursor: not-allowed; }
.field .hint { font-size: 12px; color: var(--text-faint); margin-top: 4px; }

/* ---------- Smart search filter (admin) ---------- */
.audit-search {
  padding: 9px 14px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text); font-family: var(--font-body); font-size: 13px;
  min-width: 220px; transition: border-color .15s, box-shadow .15s;
}
.audit-search:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 3px var(--violet-soft); }

/* ---------- Badges / chips ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; letter-spacing: .01em; }
.chip-pending { background: var(--gold-soft); color: var(--gold-strong); }
.chip-approved { background: var(--teal-soft); color: var(--teal); }
.chip-rejected { background: var(--red-soft); color: var(--red); }
.chip-share { background: var(--gold-soft); color: var(--gold-strong); }
.chip-renew { background: var(--teal-soft); color: var(--teal); }
.chip-swap { background: var(--rose-soft); color: var(--rose); }

/* ---------- Tables / list rows ---------- */
.order-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px; border: 1px solid var(--border-soft); border-radius: var(--radius-sm); margin-bottom: 10px;
  background: var(--surface-solid); animation: rise .35s ease both; transition: border-color .15s;
}
.order-row:hover { border-color: var(--border); }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.order-row .order-main { display: flex; flex-direction: column; gap: 3px; }
.order-row .order-id { font-weight: 700; font-size: 13px; }
.order-row .order-sub { font-size: 11.5px; color: var(--text-muted); }

.tabs { display: flex; gap: 4px; margin-bottom: 18px; background: var(--surface-2); padding: 4px; border-radius: 999px; width: fit-content; border: 1px solid var(--border-soft); }
.tab-btn { padding: 7.5px 17px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--text-muted); cursor: pointer; border: none; background: transparent; transition: background .15s, color .15s; }
.tab-btn.active { background: var(--surface-raised); color: var(--text); box-shadow: 0 2px 8px rgba(0,0,0,.18); }

/* ---------- Login page · Arctic Fox · Teal & White ---------- */
.login-page{background:#f4fbfb}
.login-shell{--bg:#f4fbfb;--bg-alt:#eaf7f8;--surface:#fff;--surface-solid:#fff;--surface-2:#f2f8fa;--surface-raised:#fff;--border:#d6e6ee;--border-soft:#e6f0f4;--text:#10243a;--text-muted:#587089;--text-faint:#8aa0b5;--violet:#0d9488;--violet-strong:#0f766e;--red:#d83a4a;--red-soft:#fdecef;
  display:grid;grid-template-columns:1.12fr 1fr;min-height:100vh;color:var(--text);background:var(--bg)}
.login-hero{position:relative;overflow:hidden;display:flex;flex-direction:column;justify-content:center;padding:56px clamp(32px,5vw,76px);background:linear-gradient(150deg,#d9fbf3 0%,#d3ecff 50%,#e6defd 100%)}
.login-hero::before,.login-hero::after{content:"";position:absolute;border-radius:50%;filter:blur(64px);pointer-events:none}
.login-hero::before{width:380px;height:380px;left:-110px;top:-100px;background:#5eead4;opacity:.55}
.login-hero::after{width:440px;height:440px;right:-130px;bottom:-150px;background:#a78bfa;opacity:.4}
.login-hero>*{position:relative;z-index:2}
.login-hero .orbit-field{position:absolute;inset:0;z-index:0}
.orbit-ring{position:absolute;border:1px dashed rgba(14,116,144,.22);border-radius:50%}
.orbit-ring.r1{width:440px;height:440px;top:8%;left:8%;animation:orbit 70s linear infinite}
.orbit-ring.r2{width:660px;height:660px;top:-8%;left:-6%;animation:orbit-rev 100s linear infinite}
@keyframes orbit{to{transform:rotate(360deg)}}
@keyframes orbit-rev{to{transform:rotate(-360deg)}}
.orbit-dot{position:absolute;width:8px;height:8px;border-radius:50%;background:#14b8a6;box-shadow:0 0 16px #2dd4bf;animation:drift 7s ease-in-out infinite}
@keyframes drift{50%{transform:translateY(-14px)}}
.login-logo-mark{display:flex;align-items:center;gap:12px;margin-bottom:34px}
.login-shell .logo-mark{background:linear-gradient(135deg,#14b8a6,#38bdf8 60%,#8b5cf6);color:#fff;box-shadow:0 10px 22px -8px rgba(14,165,233,.6)}
.login-brand{font-family:var(--font-head);font-weight:700;font-size:19px;color:#0b2a3f}
.login-brand-sub{font-size:12px;color:#4b6b86}
.login-hero h1{font-size:clamp(28px,3vw,40px);line-height:1.18;margin:0 0 14px;color:#0b2a3f;max-width:480px}
.login-hero h1 span{background:linear-gradient(90deg,#0d9488,#0ea5e9,#8b5cf6);-webkit-background-clip:text;background-clip:text;color:transparent}
.login-hero p{color:#476580;max-width:430px;line-height:1.65;margin:0}
.login-chips{list-style:none;margin:30px 0 0;padding:0;display:grid;gap:12px;max-width:340px}
.login-chips li{display:flex;align-items:center;gap:12px;padding:12px 16px;border-radius:16px;background:rgba(255,255,255,.72);backdrop-filter:blur(10px);border:1px solid rgba(255,255,255,.95);box-shadow:0 12px 30px -16px rgba(20,100,140,.4);font-weight:600;font-size:14px;color:#0b2a3f}
.login-chips i{flex:none;width:36px;height:36px;border-radius:12px;display:grid;place-items:center;color:#fff;background:linear-gradient(135deg,#2dd4bf,#38bdf8)}
.login-chips small{display:block;font-weight:500;font-size:12px;color:#587089;margin-top:1px}
.mascot{width:150px;height:auto;margin:0 auto;display:block;overflow:visible}
.login-mascot-wrap{position:absolute!important;right:3%;bottom:4%;width:min(380px,40%);z-index:2}
.login-mascot-wrap .mascot{width:100%;filter:drop-shadow(0 22px 30px rgba(30,90,150,.28))}
.fox-float{animation:foxFloat 4s ease-in-out infinite}
@keyframes foxFloat{50%{transform:translateY(-9px)}}
.fox-sh{transform-origin:200px 388px;animation:foxSh 4s ease-in-out infinite}
@keyframes foxSh{50%{transform:scaleX(.86);opacity:.55}}
.fox-tail{transform-origin:262px 320px;animation:foxWag 3.2s ease-in-out infinite}
@keyframes foxWag{0%,100%{transform:rotate(-5deg)}50%{transform:rotate(9deg)}}
.fox-eye{transform-box:fill-box;transform-origin:center;animation:foxBlink 4.5s infinite}
@keyframes foxBlink{0%,92%,100%{transform:scaleY(1)}95%{transform:scaleY(.08)}}
.fox-ear-l{transform-origin:135px 130px;animation:foxEar 6s infinite}
.fox-ear-r{transform-origin:265px 130px;animation:foxEar 6s .4s infinite reverse}
@keyframes foxEar{0%,88%,100%{transform:rotate(0)}93%{transform:rotate(-5deg)}}
.fox-scr{animation:foxScr 2.8s ease-in-out infinite}
@keyframes foxScr{50%{opacity:.8;filter:brightness(1.3)}}
.fox-halo{transform-origin:200px 310px;animation:foxHalo 2.8s ease-in-out infinite}
@keyframes foxHalo{0%,100%{opacity:.5;transform:scale(.94)}50%{opacity:1;transform:scale(1.08)}}
.fox-tw{transform-origin:0 0;animation:foxTw 2.6s ease-in-out infinite}
@keyframes foxTw{0%,100%{opacity:.2;transform:scale(.4) rotate(0)}50%{opacity:1;transform:scale(1) rotate(25deg)}}
.fox-cl{animation:foxCl 6s ease-in-out infinite}
@keyframes foxCl{50%{transform:translate(9px,-7px)}}
@media (prefers-reduced-motion:reduce){.mascot *,.orbit-ring,.orbit-dot{animation:none!important}}
@media (max-width:1100px){.login-chips{display:none}.login-mascot-wrap{width:min(300px,52%)}}

.login-panel-form{position:relative;display:flex;align-items:center;justify-content:center;padding:40px 24px;background:radial-gradient(70% 55% at 100% 0%,rgba(94,234,212,.25),transparent 60%),radial-gradient(60% 45% at 0% 100%,rgba(167,139,250,.14),transparent 60%),#fff}
.login-form-box{width:100%;max-width:410px;padding:36px 34px;border-radius:26px;background:#fff;border:1px solid var(--border-soft);box-shadow:0 34px 70px -34px rgba(20,100,140,.4)}
.mobile-login-header{display:none}
.login-form-box h2{font-family:var(--font-head);font-size:25px;margin:0 0 6px;color:#0b2a3f}
.login-form-box .sub{color:var(--text-muted);font-size:13.5px;margin-bottom:24px}
.login-shell .field input{background:#f6fafc;border:1px solid var(--border);border-radius:13px;color:var(--text)}
.login-shell .field input:focus{outline:none;border-color:#14b8a6;background:#fff;box-shadow:0 0 0 4px rgba(20,184,166,.16)}
.login-shell .btn-gold{background:linear-gradient(100deg,#14b8a6,#0ea5e9 55%,#8b5cf6);color:#fff;border:0;border-radius:14px;padding:14px;font-weight:700;box-shadow:0 16px 30px -14px rgba(14,165,233,.7);position:relative;overflow:hidden;transition:transform .15s,box-shadow .2s}
.login-shell .btn-gold::after{content:"";position:absolute;inset:0;background:linear-gradient(105deg,transparent 35%,rgba(255,255,255,.35) 50%,transparent 65%);transform:translateX(-120%);transition:transform .6s}
.login-shell .btn-gold:hover{transform:translateY(-1px);box-shadow:0 20px 34px -14px rgba(14,165,233,.8)}
.login-shell .btn-gold:hover::after{transform:translateX(120%)}
.login-footer-link{text-align:center;margin-top:20px;font-size:13px;color:var(--text-muted)}
.login-footer-link a{color:var(--violet-strong);font-weight:600}
.login-secure{display:flex;align-items:center;justify-content:center;gap:6px;margin-top:16px;padding-top:16px;border-top:1px solid var(--border-soft);font-size:11.5px;color:var(--text-faint)}
.form-row-between { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; margin-bottom: 20px; }

.mobile-only { display: none; }
.sidebar-overlay { display: none; }

@media (max-width: 860px) {
  .login-shell { display: block; }
  .login-hero { display: none; }
  .login-panel-form { align-items: flex-start; min-height: 100vh; padding: max(26px, env(safe-area-inset-top)) 16px 36px; background: linear-gradient(180deg,#d9fbf3 0,#e4f1ff 230px,#f7fbff 460px,#fff 100%); }
  .login-form-box { padding: 24px 22px 26px; }
  .mobile-login-header { display: block; text-align: center; margin-bottom: 18px; }
  .mobile-login-header .mascot { width: min(210px, 62%); margin-bottom: 4px; filter: drop-shadow(0 14px 18px rgba(30,90,150,.22)); }
  .sidebar { position: fixed; left: -280px; top: 0; z-index: 60; transition: left .2s ease; }
  .sidebar.open { left: 0; }
  .stat-grid { grid-template-columns: 1fr; }
  .mobile-only { display: flex; }

  .sidebar-overlay.open {
    display: block; position: fixed; inset: 0; background: rgba(5,6,14,.6);
    z-index: 55; animation: rise .15s ease both;
  }
}

/* ---------- Alerts ---------- */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 13px; margin-bottom: 16px; border: 1px solid transparent; }
.alert-error { background: var(--red-soft); color: var(--red); border-color: rgba(241,112,124,.3); }
.alert-success { background: var(--teal-soft); color: var(--teal); border-color: rgba(56,217,169,.3); }
.alert-info { background: var(--violet-soft); color: var(--violet-strong); border-color: rgba(124,130,255,.3); }

/* ---------- FAQ accordion ---------- */
.faq-item { border: 1px solid var(--border-soft); border-radius: var(--radius-sm); margin-bottom: 10px; overflow: hidden; background: var(--surface-solid); }
.faq-q { display: flex; align-items: center; gap: 14px; padding: 16px; cursor: pointer; }
.faq-num { font-family: var(--font-head); color: var(--violet-strong); font-weight: 700; font-size: 12.5px; }
.faq-q-text { flex: 1; font-weight: 600; font-size: 14px; }
.faq-chev { transition: transform .2s ease; color: var(--text-muted); }
.faq-item.open .faq-chev { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .25s ease; font-size: 13px; color: var(--text-muted); padding: 0 16px; }
.faq-item.open .faq-a { max-height: 500px; padding: 0 16px 16px 46px; }

/* ---------- Support chat bubbles ---------- */
.chat-thread { display: flex; flex-direction: column; gap: 12px; }
.bubble { max-width: 70%; padding: 12px 16px; border-radius: 16px; font-size: 13.5px; animation: rise .3s ease both; }
.bubble-user { align-self: flex-end; background: var(--violet); color: #fff; border-bottom-right-radius: 4px; }
.bubble-admin { align-self: flex-start; background: var(--surface-2); border: 1px solid var(--border-soft); border-bottom-left-radius: 4px; }

/* ---------- Timeline (Lịch sử thông báo / Audit log) ---------- */
.tl { position: relative; padding-left: 24px; }
.tl::before { content: ''; position: absolute; left: 6px; top: 4px; bottom: 4px; width: 2px; background: var(--border-soft); }
.trow { position: relative; padding-bottom: 20px; }
.trow .dot { position: absolute; left: -24px; top: 3px; width: 13px; height: 13px; border-radius: 50%; border: 3px solid var(--surface-solid); }

/* ---------- Avatar menu + Notification Center ---------- */
.avatar-circle { width: 36px; height: 36px; border-radius: 50%; background: var(--violet-soft); color: var(--violet-strong); display: flex; align-items: center; justify-content: center; font-weight: 700; cursor: pointer; font-size: 13.5px; }
.dropdown-menu { position: absolute; right: 0; top: 48px; background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow-pop); min-width: 200px; overflow: hidden; z-index: 40; animation: rise .15s ease both; }
.dropdown-menu a, .dropdown-menu .dd-item { display: block; padding: 11px 16px; font-size: 13px; }
.dropdown-menu a:hover, .dropdown-menu .dd-item:hover { background: var(--surface-2); }
.dropdown-user-id { font-size: 11px; color: var(--text-faint); padding: 10px 16px 4px; }

.notif-dot {
  position: absolute; top: 2px; right: 2px; min-width: 15px; height: 15px; padding: 0 3px; border-radius: 999px;
  background: var(--red); color: #fff; font-size: 9px; font-weight: 700; display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--surface-solid); line-height: 1;
}
.notif-panel { width: 320px; max-width: 86vw; max-height: 420px; display: flex; flex-direction: column; padding: 0; }
.notif-panel-head { font-weight: 700; font-size: 13px; padding: 14px 16px 10px; border-bottom: 1px solid var(--border-soft); }
.notif-empty { padding: 24px 16px; text-align: center; font-size: 12.5px; color: var(--text-faint); }
.notif-item { display: flex; gap: 10px; padding: 11px 16px; border-bottom: 1px solid var(--border-soft); }
.notif-item:last-of-type { border-bottom: none; }
.notif-item-icon { font-size: 15px; flex-shrink: 0; margin-top: 1px; }
.notif-item-body { min-width: 0; }
.notif-item-title { font-size: 12.5px; font-weight: 600; }
.notif-item-detail { font-size: 11.5px; color: var(--text-muted); margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notif-item-time { font-size: 10.5px; color: var(--text-faint); margin-top: 3px; }
.notif-panel-foot { display: block; text-align: center; padding: 11px; font-size: 12px; font-weight: 600; color: var(--violet-strong); background: var(--surface-2); }
.notif-panel-foot:hover { background: var(--border-soft); }

/* ---------- Popup modal ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(4,5,12,.62); display: flex; align-items: center; justify-content: center; z-index: 100; animation: rise .2s ease both; padding: 16px; backdrop-filter: blur(2px); }
.modal-box { background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 26px; max-width: 420px; width: 90%; box-shadow: var(--shadow-pop); max-height: 90vh; overflow-y: auto; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.modal-title { font-family: var(--font-head); font-weight: 700; font-size: 16.5px; }
.modal-close { background: none; border: none; font-size: 22px; line-height: 1; color: var(--text-muted); cursor: pointer; padding: 2px 4px; }
.modal-close:hover { color: var(--text); }
.modal-sub { font-size: 12px; color: var(--text-muted); margin-bottom: 18px; }

/* ---- Order cards (Share / Gia hạn / Đổi máy) ---- */
.order-card {
  border: 1px solid var(--border-soft); border-radius: 16px; padding: 16px 18px;
  margin-bottom: 14px; background: var(--surface-solid); position: relative; overflow: hidden;
  transition: border-color .15s ease;
}
.order-card:hover { border-color: var(--border); }
.order-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; }
.oc-gold::before { background: var(--gold); }
.oc-teal::before { background: var(--teal); }
.oc-rose::before { background: var(--rose); }
.oc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.oc-code { font-family: var(--font-head); font-weight: 700; font-size: 13.5px; letter-spacing: .005em; }
.oc-amount { font-family: var(--font-body); font-weight: 700; color: var(--violet-strong); margin-left: 6px; font-size: 12.5px; }
.oc-product { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.oc-status-pill {
  border: none; cursor: default; border-radius: 999px; padding: 7px 14px; font-size: 12px;
  font-weight: 700; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
.oc-status-pill.is-ready { cursor: pointer; background: var(--gold); color: #2b1d04; transition: filter .15s ease, transform .15s ease; }
.oc-gold .oc-status-pill.is-ready { background: var(--gold); color: #2b1d04; }
.oc-teal .oc-status-pill.is-ready { background: var(--teal); color: #052e24; }
.oc-rose .oc-status-pill.is-ready { background: var(--rose); color: #350018; }
.oc-status-pill.is-ready:hover { filter: brightness(1.08); transform: translateY(-1px); }
.oc-status-pill.is-pending { background: var(--gold-soft); color: var(--gold-strong); }
.oc-status-pill.is-approved { background: var(--teal-soft); color: var(--teal); }
.oc-status-pill.is-rejected { background: var(--red-soft); color: var(--red); cursor: pointer; border: 1px dashed var(--red); }
.oc-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px 18px; margin-bottom: 14px; }
.oc-meta-item { display: flex; flex-direction: column; gap: 2px; }
.oc-meta-item span { font-size: 10.5px; color: var(--text-faint); text-transform: uppercase; letter-spacing: .02em; }
.oc-meta-item strong { font-size: 12.5px; font-weight: 600; }
.oc-chip-by { display: inline-flex; width: fit-content; background: var(--violet-soft); color: var(--violet-strong); padding: 2px 9px; border-radius: 999px; font-size: 11px; }
.oc-steps { display: flex; align-items: center; gap: 0; padding-top: 12px; border-top: 1px dashed var(--border-soft); }
.oc-step {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative;
  font-size: 10px; color: var(--text-faint); text-align: center;
}
.oc-step::before {
  content: ''; position: absolute; top: 5px; left: -50%; width: 100%; height: 2px; background: var(--border-soft); z-index: 0;
}
.oc-step:first-child::before { display: none; }
.oc-step .oc-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--border); z-index: 1; }
.oc-step.done { color: var(--text); font-weight: 600; }
.oc-step.done .oc-dot { background: var(--teal); }
.oc-step.done::before { background: var(--teal); }
.oc-step.error .oc-dot { background: var(--red); }
.oc-step.error::before { background: var(--red); }
.oc-step.error { color: var(--red); }
@media (max-width: 520px) { .oc-step { font-size: 9px; } }

/* ---- Section blocks (Gia hạn / Đổi máy — khối tách biệt, không dùng tab) ---- */
.section-block {
  background: var(--surface-solid); border: 1px solid var(--border-soft); border-radius: 18px;
  padding: 22px 22px 18px; margin-bottom: 22px; position: relative;
}
.section-block::before { content: ''; position: absolute; left: 0; top: 18px; bottom: 18px; width: 3px; border-radius: 0 4px 4px 0; }
.sb-teal::before { background: var(--teal); }
.sb-rose::before { background: var(--rose); }
.sb-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 18px; }
.sb-icon { width: 44px; height: 44px; border-radius: 13px; display: flex; align-items: center; justify-content: center; font-size: 19px; flex-shrink: 0; }
.sb-teal .sb-icon, .section-block.sb-teal .sb-icon { background: var(--teal-soft); color: var(--teal); }
.sb-rose .sb-icon, .section-block.sb-rose .sb-icon { background: var(--rose-soft); color: var(--rose); }
.sb-title { font-family: var(--font-head); font-weight: 700; font-size: 16.5px; }
.sb-sub { font-size: 12px; color: var(--text-muted); margin-top: 3px; max-width: 560px; }

/* ---- Rich text content rendered from admin WYSIWYG fields ---- */
.rte-content { line-height: 1.65; }
.rte-content p { margin: 0 0 10px; }
.rte-content ul, .rte-content ol { margin: 0 0 10px 20px; }
.rte-content img { max-width: 100%; border-radius: 8px; }
.rte-content table { border-collapse: collapse; width: 100%; margin-bottom: 10px; }
.rte-content table td, .rte-content table th { border: 1px solid var(--border-soft); padding: 6px 10px; }
.rte-content a { color: var(--violet-strong); }

/* ---- Banner "sắp hết hạn" trên dashboard ---- */
.expiring-banner {
  display: flex; align-items: center; gap: 14px; background: var(--red-soft); border: 1px solid rgba(241,112,124,.3);
  border-radius: 14px; padding: 14px 16px; margin-bottom: 18px;
}
.eb-icon { font-size: 21px; flex-shrink: 0; }
.eb-body { flex: 1; min-width: 0; }
.eb-title { font-weight: 700; font-size: 13px; color: var(--red); }
.eb-sub { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 560px) { .expiring-banner { flex-wrap: wrap; } .eb-sub { white-space: normal; } }

/* ---- Hàng nút thao tác nhanh trên dashboard ---- */
.quick-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 20px; }
@media (max-width: 700px) { .quick-actions { grid-template-columns: repeat(2, 1fr); } }
.qa-btn {
  display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-radius: 12px; font-size: 12.5px;
  font-weight: 700; text-decoration: none; border: 1px solid var(--border-soft); background: var(--surface-solid);
  color: var(--text); transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.qa-btn span { font-size: 15px; }
.qa-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-soft); }
.qa-gold:hover { border-color: var(--gold); color: var(--gold-strong); }
.qa-teal:hover { border-color: var(--teal); color: var(--teal); }
.qa-rose:hover { border-color: var(--rose); color: var(--rose); }
.qa-violet:hover { border-color: var(--violet); color: var(--violet-strong); }

/* ---- Nút sao chép mã đơn ---- */
.oc-copy {
  background: none; border: none; cursor: pointer; color: var(--text-faint); font-size: 11.5px;
  padding: 2px 4px; margin-left: 4px; vertical-align: middle; transition: color .15s ease;
}
.oc-copy:hover { color: var(--violet-strong); }
.oc-copy.copied { color: var(--teal); }

/* ---------- Admin ---------- */
.admin-shell .sidebar { background: linear-gradient(185deg,#0b0f22,#05070f); }
.admin-badge { display: inline-block; background: var(--red-soft); color: var(--red); font-size: 9.5px; font-weight: 700; padding: 3px 8px; border-radius: 6px; letter-spacing: .04em; margin-left: 8px; }

/* ---------- Icon system (SVG, thay thế emoji) ---------- */
.ic { width: 18px; height: 18px; flex-shrink: 0; display: inline-block; vertical-align: middle; }
.ic-sm { width: 15px; height: 15px; }
.ic-lg { width: 26px; height: 26px; }

/* ---------- Theme toggle switch (Sun / Moon, animation xoay) ---------- */
.theme-toggle {
  width: 52px; height: 30px; border-radius: 999px; border: 1px solid var(--border-soft);
  background: var(--surface-2); position: relative; cursor: pointer; flex-shrink: 0; padding: 0;
  transition: background .2s ease;
}
.theme-toggle .tt-thumb {
  position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--gold-strong); display: flex; align-items: center; justify-content: center; color: #241a05;
  transition: transform .28s cubic-bezier(.4,0,.2,1), background .2s ease;
}
.theme-toggle .tt-thumb .ic { width: 13px; height: 13px; transition: transform .35s ease; }
:root[data-theme="light"] .theme-toggle .tt-thumb { transform: translateX(22px); background: var(--violet); color: #fff; }
:root[data-theme="light"] .theme-toggle .tt-thumb .ic { transform: rotate(180deg); }

/* ---------- Notification bell: chấm đỏ nhấp nháy (pulse) ---------- */
.notif-dot.pulse { animation: notifPulse 1.8s ease-in-out infinite; }
@keyframes notifPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(241,112,124,.5); } 50% { box-shadow: 0 0 0 5px rgba(241,112,124,0); } }
.status-dot-pulse { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: currentColor; margin-right: 1px; animation: dotPulse 1.6s ease-in-out infinite; }
@keyframes dotPulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

/* ---------- Toast notification system ---------- */
.toast-stack {
  position: fixed; right: 20px; bottom: 20px; z-index: 200;
  display: flex; flex-direction: column-reverse; gap: 10px; max-width: 340px; width: calc(100vw - 40px);
}
.toast {
  background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-pop); padding: 12px 14px; display: flex; align-items: flex-start; gap: 10px;
  animation: toastIn .25s cubic-bezier(.4,0,.2,1) both; position: relative; overflow: hidden;
}
.toast.hide { animation: toastOut .22s ease both; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(16px); } }
.toast .toast-icon { flex-shrink: 0; margin-top: 1px; }
.toast .toast-msg { font-size: 13px; font-weight: 500; line-height: 1.4; flex: 1; }
.toast.toast-success .toast-icon { color: var(--teal); }
.toast.toast-error .toast-icon { color: var(--red); }
.toast.toast-warning .toast-icon { color: var(--gold-strong); }
.toast.toast-info .toast-icon { color: var(--violet-strong); }
.toast .toast-bar { position: absolute; left: 0; bottom: 0; height: 2px; background: currentColor; opacity: .5; animation: toastBar 3s linear forwards; }
.toast.toast-success .toast-bar { color: var(--teal); }
.toast.toast-error .toast-bar { color: var(--red); }
.toast.toast-warning .toast-bar { color: var(--gold-strong); }
.toast.toast-info .toast-bar { color: var(--violet-strong); }
@keyframes toastBar { from { width: 100%; } to { width: 0%; } }
.toast-close { background: none; border: none; color: var(--text-faint); cursor: pointer; padding: 0; flex-shrink: 0; }
.toast-close:hover { color: var(--text); }

/* ---------- Tooltip nhỏ (vd: "Đã sao chép") ---------- */
.tt { position: relative; }
.tt-bubble {
  position: absolute; bottom: calc(100% + 7px); left: 50%; transform: translateX(-50%) translateY(3px);
  background: var(--surface-raised); border: 1px solid var(--border); color: var(--text);
  font-size: 11px; font-weight: 600; padding: 5px 9px; border-radius: 7px; white-space: nowrap;
  box-shadow: var(--shadow-soft); opacity: 0; pointer-events: none; transition: opacity .15s ease, transform .15s ease;
}
.tt-bubble.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Segmented Control (Gia hạn / Đổi máy share) ---------- */
.seg-control {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: var(--surface-2);
  border: 1px solid var(--border-soft); border-radius: 14px; padding: 4px; margin-bottom: 20px; position: relative;
}
.seg-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 14px;
  border-radius: 11px; border: none; background: transparent; color: var(--text-muted); cursor: pointer;
  font-family: var(--font-body); font-weight: 700; font-size: 13.5px; transition: color .2s ease; position: relative; z-index: 1;
}
.seg-btn .ic { transition: transform .2s ease; }
.seg-btn.active { color: var(--text); }
.seg-btn.active .ic { color: var(--violet-strong); }
.seg-thumb {
  position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px);
  background: var(--surface-raised); border: 1px solid var(--border); border-radius: 11px;
  box-shadow: var(--shadow-soft); transition: transform .3s cubic-bezier(.4,0,.2,1); z-index: 0;
}
.seg-thumb.pos-1 { transform: translateX(calc(100% + 4px)); }
.seg-panels { position: relative; }
.seg-panel { display: none; animation: segFade .28s ease both; }
.seg-panel.active { display: block; }
@keyframes segFade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- Empty state (khi chưa có đơn hàng) ---------- */
.empty-state { text-align: center; padding: 40px 20px; }
.empty-state .es-illust { width: 92px; height: 92px; margin: 0 auto 18px; color: var(--text-faint); opacity: .8; }
.empty-state .es-illust .ic { width: 100%; height: 100%; stroke-width: 1.2; }
.empty-state .es-title { font-weight: 700; font-size: 14.5px; margin-bottom: 4px; }
.empty-state .es-sub { font-size: 12.5px; color: var(--text-muted); max-width: 320px; margin: 0 auto 18px; line-height: 1.6; }
.empty-state .es-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ---------- Field validation realtime ---------- */
.field.field-invalid input { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.field.field-valid input { border-color: var(--teal); }
.field-msg { font-size: 11.5px; margin-top: 4px; display: none; }
.field.field-invalid .field-msg.msg-error { display: block; color: var(--red); }

.scroll-x { overflow-x: auto; }
.text-muted { color: var(--text-muted); }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.flex { display: flex; } .items-center { align-items: center; } .justify-between { justify-content: space-between; } .gap-8 { gap: 8px; } .gap-12 { gap: 12px; }


/* =====================================================================
   v4 — Độ ổn định giao diện + tính năng mới
   (Đặt cuối file; mọi rule dưới đây ghi đè bản cũ nếu trùng.)
   ===================================================================== */

/* ---- Icon: luôn đúng cỡ dù đặt ở đâu (không bao giờ phình to) ---- */
svg.ic { width: 18px; height: 18px; max-width: 100%; flex-shrink: 0; display: inline-block; vertical-align: middle; }
svg.ic.ic-sm { width: 15px; height: 15px; }
svg.ic.ic-lg { width: 26px; height: 26px; }
.qa-btn svg.ic, .stat-icon svg.ic, .nav-item svg.ic { width: 18px; height: 18px; }
.empty-state .es-illust svg.ic { width: 100%; height: 100%; }
.theme-toggle .tt-thumb svg.ic { width: 13px; height: 13px; }
.icon-btn { position: relative; }
.icon-btn svg.ic { width: 19px; height: 19px; }
.modal-close svg.ic { width: 18px; height: 18px; }
body.no-scroll { overflow: hidden; touch-action: none; }

/* ---- Lớp phủ (drawer menu) — bấm ra ngoài là đóng, y hệt trên PC và điện thoại ---- */
.sidebar-overlay { transition: opacity .18s ease; }
@media (max-width: 860px) {
  .sidebar { box-shadow: 18px 0 50px -20px rgba(0,0,0,.65); width: 276px; left: -300px; }
  .sidebar.open { left: 0; }
  .sidebar-overlay.open { backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); background: rgba(5,6,14,.62); }
  .topbar { padding: 12px 14px; gap: 8px; }
  .topbar-title { font-size: 16px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-left: 4px; }
  .topbar-actions { gap: 8px; }
  .content { padding: 18px 14px 36px; }
  .kbd-hint { display: none; }
}

/* ---- Nút tìm nhanh (Ctrl+K) ---- */
.palette-btn { width: auto; padding: 0 12px; gap: 8px; display: inline-flex; align-items: center; }
.kbd-hint { font-family: var(--font-body); font-size: 10.5px; font-weight: 700; color: var(--text-faint); border: 1px solid var(--border); border-radius: 6px; padding: 2px 6px; background: var(--surface-2); }
@media (max-width: 860px) { .palette-btn { width: 40px; padding: 0; justify-content: center; } }

/* ---- Chuông thông báo: chấm đỏ do JS tính theo "đã đọc" ---- */
.notif-dot { pointer-events: none; }
.notif-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.notif-markread { background: none; border: none; color: var(--violet-strong); font-size: 11.5px; font-weight: 700; cursor: pointer; padding: 2px 0; font-family: inherit; }
.notif-markread:hover { text-decoration: underline; }
.notif-item.is-new { background: linear-gradient(90deg, var(--violet-soft), transparent 70%); }
.notif-item-icon { width: 30px; height: 30px; border-radius: 9px; background: var(--surface-2); color: var(--violet-strong); display: flex; align-items: center; justify-content: center; }
.notif-item-icon svg.ic { width: 15px; height: 15px; }
.notif-panel { overflow-y: auto; }
@media (max-width: 560px) {
  .notif-panel { position: fixed; left: 12px; right: 12px; top: 64px; width: auto; max-width: none; }
}

/* ---- Popup/modal ---- */
.modal-box.modal-wide { max-width: 560px; }
.popup-body { font-size: 14px; color: var(--text); }
.modal-backdrop { overscroll-behavior: contain; }

/* ---- Thẻ Lưu ý (HTML do admin soạn — dùng được cả khi dán HTML từ shop) ---- */
.note-host { position: relative; margin-bottom: 20px; animation: noteIn .35s ease both; }
@keyframes noteIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.note-host.is-hidden { display: none; }
.note-dismiss {
  margin-top: 8px; background: none; border: none; color: var(--text-muted); font: 600 12px var(--font-body);
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer; padding: 4px 2px;
}
.note-dismiss:hover { color: var(--teal); }
.rte-content .nt-card, .nt-card {
  --nt: var(--gold); --nt-soft: var(--gold-soft);
  background: var(--surface-solid); border: 1px solid var(--border-soft); border-left: 4px solid var(--nt);
  border-radius: 16px; padding: 18px 18px 8px; margin: 0 0 12px; box-shadow: var(--shadow-soft);
}
.nt-teal { --nt: var(--teal); --nt-soft: var(--teal-soft); }
.nt-rose { --nt: var(--rose); --nt-soft: var(--rose-soft); }
.nt-violet { --nt: var(--violet); --nt-soft: var(--violet-soft); }
.nt-red { --nt: var(--red); --nt-soft: var(--red-soft); }
.nt-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.nt-ico { width: 46px; height: 46px; border-radius: 14px; background: var(--nt-soft); display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; }
.nt-title { font-family: var(--font-head); font-weight: 700; font-size: 16.5px; line-height: 1.3; }
.nt-sub { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }
.nt-callout { display: flex; gap: 12px; align-items: flex-start; border-radius: 12px; padding: 12px 14px; margin: 0 0 10px; font-size: 13.5px; line-height: 1.55; border: 1px solid transparent; }
.nt-callout > span { font-size: 18px; line-height: 1.3; flex-shrink: 0; }
.nt-callout > div { min-width: 0; }
.nt-c-warn { background: var(--gold-soft); border-color: rgba(212,175,106,.35); }
.nt-c-info { background: var(--violet-soft); border-color: rgba(124,130,255,.3); }
.nt-c-ok { background: var(--teal-soft); border-color: rgba(56,217,169,.3); }
.nt-c-danger { background: var(--red-soft); border-color: rgba(241,112,124,.35); }
.nt-steps { margin: 0 0 10px; padding-left: 22px; font-size: 13.5px; line-height: 1.8; }
.nt-table { width: 100%; border-collapse: separate; border-spacing: 0; border: 1px solid var(--border-soft); border-radius: 12px; overflow: hidden; margin-bottom: 10px; font-size: 13.5px; }
.nt-table th { background: var(--nt-soft); text-align: left; padding: 9px 12px; font-weight: 700; }
.nt-table td { padding: 9px 12px; border-top: 1px solid var(--border-soft); }

/* Khung soạn của admin: hiển thị đúng như khách thấy (nền sáng, chữ tối) */
body.rte-editing {
  --surface-solid:#ffffff; --surface-2:#f4f6fc; --border:#e1e6f5; --border-soft:#e9ecf8; --text:#11142b; --text-muted:#5c6482;
  --gold:#a9763f; --gold-soft:#faf0db; --violet:#5457e5; --violet-soft:#ecedfd; --teal:#0e9f78; --teal-soft:#e2f7ee;
  --rose:#c54c7e; --rose-soft:#fbe9f1; --red:#d23c4a; --red-soft:#fbe5e7;
  background: #f3f5fb; color: var(--text); padding: 14px; margin: 0; font-family: var(--font-body); font-size: 14px;
}

/* ---- Dashboard: hero ví ---- */
.hero-wallet { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.hw-chip { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 11px; font-weight: 600; color: #aab2e0; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.08); padding: 4px 10px; border-radius: 999px; }
.hw-right { text-align: right; }
.hw-balance-row { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.hw-balance { font-variant-numeric: tabular-nums; transition: filter .2s ease; }
.hw-balance[data-hidden="1"] { filter: blur(9px); user-select: none; }
.hw-eye { width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.06); color: #cfd4f5; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background .15s ease; }
.hw-eye:hover { background: rgba(255,255,255,.14); }
@media (max-width: 560px) { .hw-right { text-align: left; width: 100%; } .hw-balance-row { justify-content: flex-start; } .hero-wallet .hw-balance { font-size: 24px; } }

/* ---- Dashboard: Việc cần làm ---- */
.todo-card { border: 1px solid rgba(212,175,106,.38); background: linear-gradient(135deg, var(--gold-soft), transparent 80%), var(--surface-solid); border-radius: 16px; padding: 14px 16px; margin-bottom: 18px; }
.todo-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13.5px; color: var(--gold-strong); margin-bottom: 10px; }
.todo-head span { font-size: 12px; color: var(--text-muted); }
.todo-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; }
.todo-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border-soft); font-size: 13px; font-weight: 600; transition: border-color .15s ease, transform .15s ease; }
.todo-item:hover { border-color: var(--gold); transform: translateY(-1px); }
.todo-ic { width: 30px; height: 30px; border-radius: 9px; background: var(--gold-soft); color: var(--gold-strong); display: flex; align-items: center; justify-content: center; }
.todo-txt { flex: 1; }
.todo-count { font-size: 11.5px; font-weight: 700; color: #2b1d04; background: var(--gold-strong); padding: 2px 9px; border-radius: 999px; }
.todo-go { color: var(--text-faint); }

/* ---- Dashboard: thẻ máy có vòng đếm ngược sống ---- */
.devcard { display: flex; align-items: center; gap: 16px; padding: 14px 16px; }
.dev-ring { position: relative; width: 64px; height: 64px; flex-shrink: 0; }
.dev-ring svg { transform: rotate(-90deg); display: block; }
.ring-bg { fill: none; stroke: var(--border); stroke-width: 4; }
.ring-fg { fill: none; stroke: var(--teal); stroke-width: 4; stroke-linecap: round; transition: stroke-dashoffset .6s ease, stroke .3s ease; }
.dev-warn .ring-fg { stroke: var(--gold); }
.dev-urgent .ring-fg { stroke: var(--red); }
.ring-pct { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--font-head); font-weight: 700; font-size: 12.5px; }
.dev-time-label { display: none; }
.dev-countdown { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.dev-countdown span { display: flex; flex-direction: column; align-items: center; min-width: 46px; padding: 5px 7px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--border-soft); font-size: 9.5px; color: var(--text-faint); line-height: 1.2; }
.dev-countdown b { font-family: var(--font-head); font-size: 15px; color: var(--text); font-variant-numeric: tabular-nums; }
.dev-ok .dev-countdown b { color: var(--teal); }
.dev-warn .dev-countdown b { color: var(--gold-strong); }
.dev-urgent .dev-countdown b { color: var(--red); }
.dev-dates { font-size: 11px; color: var(--text-faint); margin-top: 7px; }
@media (max-width: 560px) { .devcard { align-items: flex-start; } .dev-ring { width: 54px; height: 54px; } .dev-ring svg { width: 54px; height: 54px; } .dev-countdown span { min-width: 40px; } }

/* ---- Command palette (Ctrl+K / nút tìm) ---- */
.palette-backdrop { position: fixed; inset: 0; z-index: 150; background: rgba(4,5,12,.6); backdrop-filter: blur(3px); display: none; align-items: flex-start; justify-content: center; padding: 12vh 14px 14px; }
.palette-backdrop.open { display: flex; animation: rise .15s ease both; }
.palette { width: 100%; max-width: 560px; background: var(--surface-raised); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow-pop); overflow: hidden; }
.palette-input-row { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border-soft); color: var(--text-muted); }
.palette-input { flex: 1; border: none; outline: none; background: transparent; color: var(--text); font: 500 15px var(--font-body); }
.palette-list { max-height: min(52vh, 380px); overflow-y: auto; padding: 8px; }
.palette-group { font-size: 10.5px; font-weight: 700; color: var(--text-faint); padding: 8px 10px 4px; letter-spacing: .04em; }
.palette-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 11px; cursor: pointer; font-size: 13.5px; font-weight: 600; }
.palette-item .pi-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.palette-item .pi-hint { margin-left: auto; font-size: 11px; font-weight: 500; color: var(--text-faint); }
.palette-item.sel, .palette-item:hover { background: var(--violet-soft); color: var(--violet-strong); }
.palette-empty { padding: 26px; text-align: center; color: var(--text-faint); font-size: 13px; }
.palette-foot { display: flex; gap: 14px; padding: 9px 16px; border-top: 1px solid var(--border-soft); font-size: 11px; color: var(--text-faint); background: var(--surface-2); }

/* ---- Admin: tab thẻ lưu ý ---- */
.seg-scroll { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 16px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.seg-scroll::-webkit-scrollbar { display: none; }
.chip-tab { flex-shrink: 0; display: inline-flex; align-items: center; gap: 7px; padding: 9px 15px; border-radius: 999px; border: 1px solid var(--border-soft); background: var(--surface-solid); color: var(--text-muted); font: 600 12.5px var(--font-body); cursor: pointer; transition: all .15s ease; }
.chip-tab:hover { border-color: var(--border); color: var(--text); }
.chip-tab.active { background: var(--violet-soft); color: var(--violet-strong); border-color: var(--violet); }
.dot-state { width: 7px; height: 7px; border-radius: 50%; background: var(--border); }
.dot-state.on { background: var(--teal); box-shadow: 0 0 0 3px var(--teal-soft); }
.note-editor { max-width: 980px; }
.ne-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.ne-where { font-size: 12.5px; color: var(--text-muted); margin-top: 3px; max-width: 560px; }
.ne-tip { font-size: 12px; color: var(--text-muted); margin-top: 10px; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 12.5px; font-weight: 600; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch-track { width: 42px; height: 24px; border-radius: 999px; background: var(--border); position: relative; transition: background .2s ease; flex-shrink: 0; }
.switch-track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s ease; box-shadow: 0 1px 4px rgba(0,0,0,.3); }
.switch input:checked + .switch-track { background: var(--teal); }
.switch input:checked + .switch-track::after { transform: translateX(18px); }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--violet); outline-offset: 2px; }
.savebar { position: sticky; bottom: 0; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 0; margin-top: 8px; background: linear-gradient(0deg, var(--bg) 60%, transparent); }
.check-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px dashed var(--red); background: var(--red-soft); border-radius: 12px; margin-bottom: 16px; font-size: 13px; cursor: pointer; }
.check-row input { width: auto; margin-top: 3px; accent-color: var(--red); }
.check-row small { color: var(--text-muted); }

/* ---- Focus nhìn thấy được (bàn phím) ---- */
:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }


/* =====================================================================
   v5 — Giao diện cao cấp: thẻ đơn, đếm ngược 7 ngày, modal, tìm kiếm, lưu ý kính mờ
   ===================================================================== */

/* ---- Bộ icon Lucide dạng mask (dùng được trong HTML của trình soạn thảo, không cần SVG inline) ---- */
.lci { display: inline-block; width: 20px; height: 20px; flex-shrink: 0; background-color: currentColor; vertical-align: middle;
  -webkit-mask: var(--i) center / contain no-repeat; mask: var(--i) center / contain no-repeat; }
.lci-zap{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M13 2 3 14h9l-1 8 10-12h-9l1-8Z'/%3E%3C/svg%3E")}
.lci-refresh{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 2v6h-6'/%3E%3Cpath d='M3 12a9 9 0 0 1 15-6.7L21 8'/%3E%3Cpath d='M3 22v-6h6'/%3E%3Cpath d='M21 12a9 9 0 0 1-15 6.7L3 16'/%3E%3C/svg%3E")}
.lci-swap{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m17 2 4 4-4 4'/%3E%3Cpath d='M3 11V9a4 4 0 0 1 4-4h14'/%3E%3Cpath d='m7 22-4-4 4-4'/%3E%3Cpath d='M21 13v2a4 4 0 0 1-4 4H3'/%3E%3C/svg%3E")}
.lci-shield{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2 4 5v6c0 5 3.4 9.3 8 11 4.6-1.7 8-6 8-11V5l-8-3Z'/%3E%3Cpath d='m9 12 2 2 4-4'/%3E%3C/svg%3E")}
.lci-clock{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 3'/%3E%3C/svg%3E")}
.lci-info{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v5M12 8h.01'/%3E%3C/svg%3E")}
.lci-check-circle{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='m9 12 2 2 4-4'/%3E%3C/svg%3E")}
.lci-alert-triangle{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m21.73 18-8-14a2 2 0 0 0-3.46 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z'/%3E%3Cpath d='M12 9v4M12 17h.01'/%3E%3C/svg%3E")}
.lci-smartphone{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='6' y='2' width='12' height='20' rx='2'/%3E%3Cpath d='M11 18h2'/%3E%3C/svg%3E")}
.lci-x-circle{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='m15 9-6 6M9 9l6 6'/%3E%3C/svg%3E")}
.lci-bell{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9'/%3E%3Cpath d='M10.3 21a1.94 1.94 0 0 0 3.4 0'/%3E%3C/svg%3E")}
.lci-megaphone{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 11 18-5v12L3 14v-3Z'/%3E%3Cpath d='M11.6 16.8a3 3 0 1 1-5.8-1.6'/%3E%3C/svg%3E")}
.lci-sparkle{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l1.9 5.1L19 10l-5.1 1.9L12 17l-1.9-5.1L5 10l5.1-1.9L12 3Z'/%3E%3Cpath d='M19 15l.8 2.2L22 18l-2.2.8L19 21l-.8-2.2L16 18l2.2-.8L19 15Z'/%3E%3C/svg%3E")}
.lci-ticket{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 9a3 3 0 1 0 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 1 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z'/%3E%3C/svg%3E")}
.lci-inbox{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 12h-6l-2 3h-4l-2-3H2'/%3E%3Cpath d='M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11Z'/%3E%3C/svg%3E")}
.lci-message{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 11.5a8.38 8.38 0 0 1-8.5 8.5 8.5 8.5 0 0 1-4-1L3 20l1-5.5a8.38 8.38 0 0 1-1-4A8.5 8.5 0 0 1 11.5 2a8.38 8.38 0 0 1 8.5 8.5Z'/%3E%3C/svg%3E")}
.lci-check{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E")}
.lci-search{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E")}
.lci-copy{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='9' width='12' height='12' rx='2'/%3E%3Cpath d='M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1'/%3E%3C/svg%3E")}
.lci-user{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21a8 8 0 0 0-16 0'/%3E%3Ccircle cx='12' cy='7' r='5'/%3E%3C/svg%3E")}
.lci-settings{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1Z'/%3E%3C/svg%3E")}
.lci-eye{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.6-7 10-7 10 7 10 7-3.6 7-10 7S2 12 2 12Z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E")}
/* ---- Lưu ý: kính mờ + bóng mềm + icon sắc nét ---- */
.nt-card, .rte-content .nt-card {
  position: relative; overflow: hidden; border: 1px solid var(--border-soft); border-left: 1px solid var(--border-soft);
  background: var(--surface-solid);
  background: linear-gradient(160deg, color-mix(in srgb, var(--nt) 9%, transparent), transparent 55%), color-mix(in srgb, var(--surface-solid) 78%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%);
  border-radius: 20px; padding: 20px 20px 10px; box-shadow: 0 14px 38px -18px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.06);
}
.nt-card::before { content: ''; position: absolute; left: 20px; right: 20px; top: 0; height: 2px; border-radius: 0 0 4px 4px; background: linear-gradient(90deg, var(--nt), transparent); opacity: .9; }
.nt-ico { width: 44px; height: 44px; border-radius: 14px; font-size: 0; color: var(--nt);
  background: color-mix(in srgb, var(--nt) 14%, transparent); border: 1px solid color-mix(in srgb, var(--nt) 30%, transparent); display: flex; align-items: center; justify-content: center; }
.nt-ico .lci { width: 22px; height: 22px; }
.nt-title { font-family: var(--font-head); font-weight: 700; font-size: 16px; letter-spacing: -.01em; }
.nt-callout { --c: var(--gold); align-items: center; gap: 12px; background: color-mix(in srgb, var(--c) 7%, transparent); border: 1px solid color-mix(in srgb, var(--c) 20%, transparent); border-radius: 14px; }
.nt-callout > span { width: 32px; height: 32px; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); font-size: 0; flex-shrink: 0; }
.nt-callout > span .lci { width: 17px; height: 17px; }
.nt-callout b { color: var(--text); }
.nt-c-warn, .nt-c-info, .nt-c-ok, .nt-c-danger { background: color-mix(in srgb, var(--c) 7%, transparent); border-color: color-mix(in srgb, var(--c) 20%, transparent); }
.nt-c-warn { --c: var(--gold); } .nt-c-info { --c: var(--violet); } .nt-c-ok { --c: var(--teal); } .nt-c-danger { --c: var(--red); }

/* ---- Đầu trang phân hệ ---- */
.page-head { display: flex; align-items: center; gap: 16px; margin: 4px 0 18px; }
.page-head h2 { margin: 0; font-size: 20px; letter-spacing: -.015em; }
.page-head p { margin: 4px 0 0; font-size: 13px; color: var(--text-muted); line-height: 1.55; max-width: 640px; }
.page-head p strong { color: var(--text); }
.ph-medal { width: 52px; height: 52px; border-radius: 17px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; border: 1px solid transparent; }
.ph-gold { color: var(--gold-strong); background: var(--gold-soft); border-color: rgba(212,175,106,.35); }
.ph-teal { color: var(--teal); background: var(--teal-soft); border-color: rgba(56,217,169,.3); }
.ph-rose { color: var(--rose); background: var(--rose-soft); border-color: rgba(239,111,158,.3); }

/* ---- Thanh tìm kiếm LỚN + bộ lọc có đếm ---- */
.board-bar { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.order-search { display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 16px; border-radius: 18px; background: var(--surface-solid); border: 1px solid var(--border); color: var(--text-faint); transition: border-color .15s ease, box-shadow .15s ease; cursor: text; box-shadow: var(--shadow-soft); }
.order-search:focus-within { border-color: var(--violet); box-shadow: 0 0 0 4px var(--violet-soft); color: var(--violet-strong); }
.order-search svg.ic { width: 21px; height: 21px; }
.order-search input { flex: 1; min-width: 0; height: 100%; border: none; outline: none; background: transparent; color: var(--text); font: 500 16px var(--font-body); -webkit-appearance: none; appearance: none; }
.order-search input::placeholder { color: var(--text-faint); }
.order-search input::-webkit-search-cancel-button { display: none; }
.os-clear { width: 30px; height: 30px; border-radius: 50%; border: none; background: var(--surface-2); color: var(--text-muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.board-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
.board-chips::-webkit-scrollbar { display: none; }
.bchip { flex-shrink: 0; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--border-soft); background: var(--surface-solid); color: var(--text-muted); font: 600 13px var(--font-body); cursor: pointer; transition: all .15s ease; }
.bchip em { font-style: normal; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--surface-2); font-size: 11.5px; display: inline-flex; align-items: center; justify-content: center; }
.bchip:hover { color: var(--text); border-color: var(--border); }
.bchip.active { background: var(--text); color: var(--bg); border-color: var(--text); }
.bchip.active em { background: color-mix(in srgb, var(--bg) 22%, transparent); color: var(--bg); }
.board-empty { text-align: center; padding: 34px 10px; color: var(--text-faint); font-size: 13.5px; }
.expired-note { display: flex; align-items: center; gap: 10px; margin-top: 18px; padding: 12px 16px; border-radius: 14px; font-size: 12.5px; color: var(--text-muted); border: 1px dashed var(--border); background: var(--surface-2); }
.expired-note a { color: var(--violet-strong); font-weight: 700; }

/* ---- Thẻ đơn hàng ---- */
.order-list { display: flex; flex-direction: column; gap: 14px; }
.oc { --tone: var(--gold); --tone-ink: #2b1d04; position: relative; border-radius: 22px; padding: 18px 18px 16px; background: var(--surface-solid);
  background: linear-gradient(150deg, color-mix(in srgb, var(--tone) 7%, transparent), transparent 42%), var(--surface-solid);
  border: 1px solid var(--border-soft); box-shadow: 0 12px 34px -20px rgba(0,0,0,.6); transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, opacity .3s ease; animation: noteIn .35s ease both; }
.oc:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--tone) 40%, var(--border)); box-shadow: 0 18px 40px -20px rgba(0,0,0,.65); }
.oc-gold { --tone: var(--gold); --tone-ink: #2b1d04; }
.oc-teal { --tone: var(--teal); --tone-ink: #052e24; }
.oc-rose { --tone: var(--rose); --tone-ink: #350018; }
.oc.is-hidden-by-filter { display: none; }
.oc-top { display: flex; align-items: center; gap: 13px; margin-bottom: 14px; }
.oc-medal { width: 46px; height: 46px; border-radius: 15px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; color: var(--tone); background: color-mix(in srgb, var(--tone) 14%, transparent); border: 1px solid color-mix(in srgb, var(--tone) 30%, transparent); }
.oc-id { flex: 1; min-width: 0; }
.oc-code { display: flex; align-items: center; gap: 4px; font-family: var(--font-head); font-weight: 700; font-size: 14px; }
.oc-code-text { min-width: 0; overflow-wrap: anywhere; line-height: 1.25; }
.oc-product { font-size: 12.5px; color: var(--text-muted); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oc-badge-wrap { flex-shrink: 0; }
.badge { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: 999px; font: 700 11.5px var(--font-body); letter-spacing: .01em; white-space: nowrap; border: 1px solid transparent; }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.b-new { color: var(--gold-strong); background: var(--gold-soft); border-color: rgba(212,175,106,.3); }
.b-wait { color: var(--violet-strong); background: var(--violet-soft); border-color: rgba(124,130,255,.3); }
.b-ok { color: var(--teal); background: var(--teal-soft); border-color: rgba(56,217,169,.3); }
.b-bad { color: var(--red); background: var(--red-soft); border-color: rgba(241,112,124,.32); }

/* Đếm ngược 7 ngày — nổi bật */
.oc-deadline { --dc: var(--teal); border-radius: 18px; padding: 14px 16px 14px; margin-bottom: 14px; background: color-mix(in srgb, var(--dc) 7%, transparent); border: 1px solid color-mix(in srgb, var(--dc) 28%, transparent); transition: background .3s ease, border-color .3s ease; }
.oc-deadline.is-warn { --dc: var(--gold); }
.oc-deadline.is-urgent { --dc: var(--red); animation: urgentGlow 2s ease-in-out infinite; }
@keyframes urgentGlow { 0%,100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--red) 0%, transparent); } 50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--red) 16%, transparent); } }
.od-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.od-label { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; color: var(--dc); }
.od-hint { font-size: 11px; color: var(--text-faint); }
.od-clock { display: flex; align-items: center; justify-content: center; gap: 6px; }
.od-clock i { font-style: normal; font-family: var(--font-head); font-weight: 700; font-size: 22px; color: var(--text-faint); transform: translateY(-6px); }
.od-seg { display: flex; flex-direction: column; align-items: center; min-width: 62px; padding: 8px 6px 6px; border-radius: 13px; background: var(--surface-solid); border: 1px solid var(--border-soft); }
.od-seg b { font-family: var(--font-head); font-weight: 800; font-size: 28px; line-height: 1.05; color: var(--dc); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.od-seg small { font-size: 10px; color: var(--text-faint); text-transform: uppercase; letter-spacing: .06em; margin-top: 3px; }
.od-bar { height: 5px; border-radius: 999px; background: color-mix(in srgb, var(--dc) 16%, transparent); margin-top: 12px; overflow: hidden; }
.od-bar span { display: block; height: 100%; border-radius: inherit; background: var(--dc); transition: width 1s linear, background .3s ease; }
@media (max-width: 420px) { .od-seg { min-width: 54px; } .od-seg b { font-size: 24px; } }

.oc-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px 18px; margin: 0 0 14px; }
.oc-meta div { display: flex; flex-direction: column; gap: 3px; }
.oc-meta dt { font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-faint); }
.oc-meta dd { margin: 0; font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }

.oc-cta { margin-top: 14px; width: 100%; height: 52px; border: none; border-radius: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px;
  font: 800 15px var(--font-head); letter-spacing: -.005em; color: var(--tone-ink); background: linear-gradient(135deg, color-mix(in srgb, var(--tone) 100%, #fff 18%), var(--tone));
  box-shadow: 0 10px 26px -10px var(--tone), inset 0 1px 0 rgba(255,255,255,.35); transition: transform .15s ease, filter .15s ease; -webkit-tap-highlight-color: transparent; position: relative; z-index: 1; }
.oc-cta:hover { filter: brightness(1.06); transform: translateY(-1px); }
.oc-cta:active { transform: scale(.985); }
.oc-cta svg.ic { transition: transform .18s ease; }
.oc-cta:hover svg.ic { transform: translateX(4px); }

.oc.is-expired { opacity: .5; filter: grayscale(1); pointer-events: none; }
.oc.is-leaving { opacity: 0; transform: scale(.97); }

/* ---- Modal nhập ID: kính mờ, viền tinh, scale-up ---- */
.modal-backdrop.activate-modal { background: rgba(5,6,14,.66); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); animation: mdFade .22s ease both; }
@keyframes mdFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes mdScale { from { opacity: 0; transform: translateY(14px) scale(.94); } to { opacity: 1; transform: none; } }
@keyframes mdSheet { from { opacity: .4; transform: translateY(40px); } to { opacity: 1; transform: none; } }
.modal-lux { --tone: var(--gold); --tone-ink: #2b1d04; position: relative; width: 100%; max-width: 440px; padding: 30px 26px 22px; border-radius: 28px;
  background: linear-gradient(170deg, color-mix(in srgb, var(--tone) 10%, transparent), transparent 38%), var(--surface-raised);
  border: 1px solid color-mix(in srgb, var(--tone) 26%, var(--border)); box-shadow: 0 40px 90px -30px rgba(0,0,0,.8), inset 0 1px 0 rgba(255,255,255,.07);
  animation: mdScale .34s cubic-bezier(.2,.9,.3,1.15) both; overflow-y: auto; }
.ml-gold { --tone: var(--gold); --tone-ink: #2b1d04; } .ml-teal { --tone: var(--teal); --tone-ink: #052e24; } .ml-rose { --tone: var(--rose); --tone-ink: #350018; }
.ml-close { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border-radius: 50%; background: var(--surface-2); display: flex; align-items: center; justify-content: center; }
.ml-hero { text-align: center; margin-bottom: 18px; }
.ml-medal { width: 62px; height: 62px; margin: 0 auto 14px; border-radius: 20px; display: flex; align-items: center; justify-content: center; color: var(--tone); background: color-mix(in srgb, var(--tone) 15%, transparent); border: 1px solid color-mix(in srgb, var(--tone) 34%, transparent); box-shadow: 0 12px 30px -12px var(--tone); }
.ml-title { margin: 0; font-size: 20px; letter-spacing: -.02em; }
.ml-sub { margin: 6px auto 0; max-width: 320px; font-size: 13px; line-height: 1.55; color: var(--text-muted); }
.ml-order { display: grid; grid-template-columns: 1.3fr 1fr .8fr; gap: 1px; margin-bottom: 20px; border-radius: 16px; overflow: hidden; background: var(--border-soft); border: 1px solid var(--border-soft); }
.ml-order > div { background: var(--surface-2); padding: 10px 12px; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ml-order span { font-size: 9.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-faint); }
.ml-order b { font-size: 12px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ml-left { color: var(--tone); font-variant-numeric: tabular-nums; }
.lux-field { margin-bottom: 16px; }
.lux-field label { font-size: 12px; font-weight: 700; color: var(--text-muted); margin-bottom: 8px; display: block; letter-spacing: .01em; }
.lux-input { display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 8px 0 14px; border-radius: 16px; background: var(--surface-2); border: 1.5px solid var(--border); color: var(--text-faint); transition: border-color .16s ease, box-shadow .16s ease, background .16s ease; }
.lux-input:focus-within { border-color: var(--tone); background: var(--surface-solid); color: var(--tone); box-shadow: 0 0 0 4px color-mix(in srgb, var(--tone) 18%, transparent), 0 10px 24px -14px var(--tone); }
.lux-field .lux-input input { flex: 1; min-width: 0; height: 100%; padding: 0; border: none !important; box-shadow: none !important; outline: none; background: transparent !important; color: var(--text); font: 600 16px var(--font-body); letter-spacing: .01em; }
.lux-field .lux-input input::placeholder { color: var(--text-faint); font-weight: 500; }
.li-paste { flex-shrink: 0; height: 38px; padding: 0 14px; border-radius: 11px; border: none; cursor: pointer; background: color-mix(in srgb, var(--tone) 14%, transparent); color: var(--tone); font: 700 12px var(--font-body); transition: background .15s ease; }
.li-paste:hover { background: color-mix(in srgb, var(--tone) 24%, transparent); }
.lux-field.field-invalid .lux-input { border-color: var(--red); box-shadow: 0 0 0 4px var(--red-soft); }
.lux-field.field-valid .lux-input { border-color: var(--teal); }
.btn-lux { width: 100%; height: 56px; margin-top: 4px; border: none; border-radius: 17px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px; position: relative; overflow: hidden;
  font: 800 15.5px var(--font-head); color: var(--tone-ink); background: linear-gradient(135deg, color-mix(in srgb, var(--tone) 100%, #fff 20%), var(--tone));
  box-shadow: 0 14px 30px -12px var(--tone), inset 0 1px 0 rgba(255,255,255,.4); transition: transform .15s ease, filter .15s ease; }
.btn-lux::after { content: ''; position: absolute; top: 0; left: -60%; width: 40%; height: 100%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.4), transparent); transform: skewX(-20deg); transition: left .6s ease; }
.btn-lux:hover { filter: brightness(1.05); } .btn-lux:hover::after { left: 130%; }
.btn-lux:active { transform: scale(.985); }
.btn-lux[disabled] { opacity: .65; cursor: progress; }
.ml-foot { display: flex; gap: 8px; align-items: flex-start; justify-content: center; margin: 14px 4px 0; font-size: 11.5px; line-height: 1.5; color: var(--text-faint); text-align: left; }
.ml-foot svg { margin-top: 2px; color: var(--teal); }
@media (max-width: 560px) {
  .modal-backdrop.activate-modal { align-items: flex-end; padding: 0; }
  .modal-lux { max-width: none; border-radius: 28px 28px 0 0; padding-bottom: calc(22px + env(safe-area-inset-bottom, 0px)); max-height: 92vh; animation: mdSheet .32s cubic-bezier(.2,.9,.3,1) both; }
  .ml-order { grid-template-columns: 1fr 1fr; } .ml-order > div:first-child { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) { .oc, .modal-lux, .note-host, .oc-deadline.is-urgent { animation: none !important; } }


/* ---------- Cloudflare Turnstile (đăng nhập) ---------- */
.turnstile-box { margin: 0 0 16px; min-height: 65px; display: flex; justify-content: center; }
.login-remember { display: flex; align-items: center; gap: 7px; color: var(--text-muted); cursor: pointer; user-select: none; }
.login-remember input { width: auto; accent-color: var(--violet); }

/* ---------- Admin: hướng dẫn lấy key Turnstile ---------- */
.guide-box { border: 1px solid var(--border-soft); background: var(--bg-alt); border-radius: 12px; padding: 4px 16px; margin: 4px 0 18px; }
.guide-box summary { cursor: pointer; font-weight: 600; font-size: 13.5px; padding: 11px 0; color: var(--violet-strong); }
.guide-box ol { margin: 0 0 12px 18px; padding: 0; font-size: 13.5px; line-height: 1.7; }
.guide-box li { margin-bottom: 6px; }
.guide-box code { background: var(--surface-raised); padding: 1px 6px; border-radius: 6px; font-size: 12.5px; }
.guide-note { font-size: 12.5px; color: var(--text-muted); margin: 0 0 12px; line-height: 1.6; }
.switch-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--border-soft); border-radius: 12px; margin-bottom: 16px; font-size: 13px; cursor: pointer; }
.switch-row input { width: auto; margin-top: 3px; accent-color: var(--violet); }
.switch-row small { color: var(--text-muted); }
.badge-state { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; margin-left: 8px; vertical-align: middle; }
.badge-on { background: rgba(46,204,113,.15); color: #2ecc71; }
.badge-off { background: var(--surface-raised); color: var(--text-muted); }


/* ---------- Popup thông báo — gọn, đẹp (điện thoại & PC) ---------- */
.ann-backdrop { padding: 14px; }
.ann-box.modal-box { position: relative; display: flex; flex-direction: column; width: 100%; max-width: 500px; max-height: min(86vh, 680px); padding: 0; border-radius: 24px; overflow: hidden; box-shadow: 0 30px 80px -30px rgba(10,40,80,.55); }
.ann-box .popup-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 22px 18px 10px; font-size: 13px; line-height: 1.5; }
.ann-x { position: absolute; top: 10px; right: 10px; z-index: 2; width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--surface-2); color: var(--text-muted); cursor: pointer; }
.ann-x:hover { color: var(--text); }
.ann-x svg.ic { width: 16px; height: 16px; }
.ann-foot { flex: none; display: flex; gap: 10px; justify-content: center; padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--border-soft); background: var(--surface-raised); }
.ann-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; padding: 0 18px; border-radius: 999px; font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; border: 1px solid var(--border); background: transparent; color: var(--text); }
.ann-ok { border: 0; color: #fff; background: linear-gradient(100deg,#14b8a6,#0ea5e9 55%,#8b5cf6); box-shadow: 0 10px 20px -10px rgba(14,165,233,.7); min-width: 96px; }
/* lưới an toàn cho nội dung cũ do admin dán: ép chữ/khoảng cách về cỡ vừa phải */
.popup-body h1 { font-size: clamp(18px, 5vw, 22px) !important; line-height: 1.25 !important; margin: 8px 0 6px !important; }
.popup-body h2 { font-size: 16.5px !important; line-height: 1.3 !important; margin: 8px 0 6px !important; }
.popup-body h3, .popup-body h4 { font-size: 14px !important; line-height: 1.3 !important; margin: 6px 0 4px !important; }
.popup-body p { font-size: 13px !important; line-height: 1.5 !important; margin: 0 0 8px !important; }
.popup-body img, .popup-body svg { max-width: 100%; }
@media (max-width: 560px) { .ann-backdrop { align-items: center; padding: 10px; } .ann-box.modal-box { border-radius: 22px; max-height: 88vh; } }

/* ---------- Thông báo popup "Service Center" (HTML thuần dán trong Admin) ---------- */
.ugc-notice{--ink:var(--text,#10243a);--mut:var(--text-muted,#5b7189);--faint:var(--text-faint,#8aa0b5);--line:var(--border-soft,#dfeaf3);--paper:var(--surface-raised,#fff);--tint:var(--surface-2,#f6fafd);position:relative;max-width:460px;margin:0 auto;color:var(--ink);text-align:left}
.ugc-notice *{box-sizing:border-box}
.ugc-hd{display:flex;align-items:flex-end;gap:4px}
.ugc-hd-t{flex:1;min-width:0;padding-bottom:6px}
.ugc-title{margin:0 0 6px;font-size:20px;line-height:1.22;font-weight:800;letter-spacing:-.02em}
.ugc-title em{font-style:normal;background:linear-gradient(90deg,#0d9488,#0ea5e9 55%,#8b5cf6);-webkit-background-clip:text;background-clip:text;color:transparent}
.ugc-desc{margin:0;font-size:12.5px;line-height:1.6;color:var(--mut)}
.ugc-desc b{color:var(--ink);font-weight:600}
.ugc-notice img.ugc-fox{flex:none;position:relative;z-index:2;width:98px;height:auto;margin:0 0 -13px;max-width:none;border-radius:0;animation:ugcBob 4s ease-in-out infinite}
.ugc-lab{display:flex;align-items:center;gap:8px;margin:0 0 9px;font-size:10.5px;font-weight:800;letter-spacing:.14em;text-transform:uppercase;color:var(--faint)}
.ugc-lab::after{content:"";flex:1;height:1px;background:var(--line)}
.ugc-list{display:grid;gap:9px}
.ugc-notice a.ugc-sv{--c1:#3b82f6;--c2:#6aa3ff;--bd:var(--line);position:relative;display:flex;align-items:center;padding:10px 12px 10px 10px;border:1px solid var(--bd);border-radius:16px;background:var(--tint);color:inherit;text-decoration:none;transition:transform .2s,box-shadow .2s,border-color .2s;animation:ugcUp .5s backwards}
.ugc-sv:nth-child(2){animation-delay:.07s}.ugc-sv:nth-child(3){animation-delay:.14s}
.ugc-sv::before,.ugc-sv::after{content:"";position:absolute;left:42px;width:12px;height:12px;border-radius:50%;background:var(--paper);border:1px solid var(--bd);transition:border-color .2s}
.ugc-sv::before{top:-7px;clip-path:inset(50% 0 0 0)}
.ugc-sv::after{bottom:-7px;clip-path:inset(0 0 50% 0)}
.ugc-sv:hover{transform:translateY(-2px);--bd:color-mix(in srgb,var(--c1) 45%,transparent);box-shadow:0 12px 24px -16px var(--c1)}
.ugc-sv:focus-visible{outline:2px solid var(--c1);outline-offset:2px}
.ugc-notice a.ugc-rn{--c1:#0d9488;--c2:#2dd4bf}.ugc-notice a.ugc-sw{--c1:#7c5cf0;--c2:#a78bfa}
.ugc-ic{flex:none;width:38px;height:38px;display:grid;place-items:center;border-radius:12px;color:#fff;background:linear-gradient(145deg,var(--c1),var(--c2));box-shadow:0 8px 16px -9px var(--c1);transition:transform .25s}
.ugc-sv:hover .ugc-ic{transform:rotate(-6deg) scale(1.06)}
.ugc-ic .lci{width:19px;height:19px}
.ugc-tx{position:relative;flex:1;min-width:0;padding-left:15px}
.ugc-tx::before{content:"";position:absolute;left:0;top:-10px;bottom:-10px;border-left:1.5px dashed var(--line)}
.ugc-tx b{display:block;font-size:14px;line-height:1.3;font-weight:700}
.ugc-tx span{display:block;margin-top:2px;font-size:12px;line-height:1.45;color:var(--mut)}
.ugc-go{flex:none;margin-left:8px;width:26px;height:26px;display:grid;place-items:center;border-radius:50%;font-size:14px;color:var(--c1);background:color-mix(in srgb,var(--c1) 12%,transparent);transition:transform .2s}
.ugc-sv:hover .ugc-go{transform:translate(2px,-2px)}
.ugc-note{margin:12px 0 0;font-size:11px;line-height:1.6;color:var(--faint);text-align:center}
@keyframes ugcBob{50%{transform:translateY(-2px)}}
@keyframes ugcUp{from{opacity:0;transform:translateY(8px)}}
@media(prefers-reduced-motion:reduce){.ugc-notice *,.ugc-notice *::before,.ugc-notice *::after{animation:none!important;transition:none!important}}
