/* ===================================================================
   v0.27 — GIAO DIỆN MỚI "Obsidian & Champagne"
   Lớp phủ nằm SAU style.css: chỉ đổi diện mạo, không đổi chức năng.
   Muốn quay về giao diện cũ: bỏ dòng <link href="theme2.css"> và <script src="fx.js"> trong index.html.
   =================================================================== */

/* ---------- 1. Bảng màu ---------- */
:root{
  --bg:#f6f3ec; --surface:#ffffff; --surface2:#f8f5ee; --ink:#0f1626; --ink2:#454c5f; --muted:#6e7387; --grid:#ece7db; --line:#d6cfbf;
  --accent:#1d3f9e; --accent-soft:#e9eefb; --accent-ink:#ffffff;
  --gold:#b88a2c; --gold2:#e3c070; --gold-ink:#2a1d00; --gold-soft:rgba(184,138,44,.13);
  --s1:#2a56c8; --s2:#d2692a; --s3:#168f6a; --s4:#b88a2c; --violet:#6c58c9; --teal:#168fa3;
  --good:#0b6b3a; --warn:#8a5a00; --bad:#b3261e; --good-bg:#e3f3ea; --warn-bg:#fbefd5; --bad-bg:#fbe8e5;
  --border:rgba(40,32,10,.10); --focus:#b88a2c;
  --shadow:0 1px 2px rgba(30,22,0,.04),0 14px 34px -20px rgba(30,22,0,.28);
  --sidebar:#090d18; --side:#090d18; --sidebar-active:rgba(227,192,112,.14); --sidebar-active-ink:#f0d795;
  --r:18px; --ease:cubic-bezier(.22,.8,.3,1);
  --serif:"Georgia","Cambria","Times New Roman",serif;
}
@media (prefers-color-scheme: dark){:root:where(:not([data-theme="light"])){
  --bg:#070a13; --surface:#0f1626; --surface2:#141c30; --ink:#f1efe8; --ink2:#c0c5d4; --muted:#8e95aa; --grid:#1b2438; --line:#2a3550;
  --accent:#7aa2f7; --accent-soft:#16264a; --accent-ink:#071027; --gold:#e3c070; --gold2:#f3dca0; --gold-soft:rgba(227,192,112,.13);
  --s1:#6a97f5; --s2:#f28d4e; --s3:#34caa0; --s4:#e3c070; --violet:#a493f4; --teal:#3cc6d9;
  --good:#52c88c; --warn:#f2c35d; --bad:#f28d85; --good-bg:rgba(82,200,140,.13); --warn-bg:rgba(242,195,93,.13); --bad-bg:rgba(242,141,133,.13);
  --border:rgba(227,192,112,.14); --focus:#e3c070; --shadow:0 18px 40px -28px rgba(0,0,0,.9);
  --sidebar:#05070e; --side:#05070e}}
:root[data-theme="dark"]{
  --bg:#070a13; --surface:#0f1626; --surface2:#141c30; --ink:#f1efe8; --ink2:#c0c5d4; --muted:#8e95aa; --grid:#1b2438; --line:#2a3550;
  --accent:#7aa2f7; --accent-soft:#16264a; --accent-ink:#071027; --gold:#e3c070; --gold2:#f3dca0; --gold-soft:rgba(227,192,112,.13);
  --s1:#6a97f5; --s2:#f28d4e; --s3:#34caa0; --s4:#e3c070; --violet:#a493f4; --teal:#3cc6d9;
  --good:#52c88c; --warn:#f2c35d; --bad:#f28d85; --good-bg:rgba(82,200,140,.13); --warn-bg:rgba(242,195,93,.13); --bad-bg:rgba(242,141,133,.13);
  --border:rgba(227,192,112,.14); --focus:#e3c070; --shadow:0 18px 40px -28px rgba(0,0,0,.9);
  --sidebar:#05070e; --side:#05070e}

/* ---------- 2. Nền & chữ ---------- */
html{scroll-behavior:smooth}
body{
  font-family:"Segoe UI Variable Text","Segoe UI",system-ui,-apple-system,Roboto,Arial,sans-serif;
  background:
    radial-gradient(900px 480px at 100% -80px,color-mix(in srgb,var(--gold) 11%,transparent),transparent 70%),
    radial-gradient(700px 420px at 0% 30%,color-mix(in srgb,var(--accent) 7%,transparent),transparent 70%),
    var(--bg);
  background-attachment:fixed;
}
h1,h2,h3{letter-spacing:-.015em}
::selection{background:var(--gold2);color:#1b1300}
*{scrollbar-width:thin;scrollbar-color:color-mix(in srgb,var(--gold) 45%,var(--line)) transparent}
a{color:var(--accent)}
:focus-visible{outline:2px solid var(--focus)!important;outline-offset:2px}

/* ---------- 3. Menu trái ---------- */
.sidebar{
  background:
    radial-gradient(320px 240px at 0% 0%,rgba(227,192,112,.16),transparent 70%),
    radial-gradient(260px 300px at 110% 100%,rgba(70,110,230,.18),transparent 70%),
    linear-gradient(180deg,#0d1322 0%,#090d18 55%,#06080f 100%);
  border-right:1px solid rgba(227,192,112,.16);
  color:#d9dcea;
}
.sidebar .brand{padding:.2rem .4rem 1rem;gap:.7rem}
.sidebar .brand b{font-family:var(--serif);font-size:1rem;letter-spacing:.06em;color:#f6e6b8;font-weight:700}
.sidebar .brand small{color:#8f96ad;letter-spacing:.08em;text-transform:uppercase;font-size:.62rem}
.brand-mark{
  width:42px;height:42px;border-radius:13px;
  background:linear-gradient(145deg,#f3dca0,#c79a3a 55%,#9a7220);
  box-shadow:0 10px 22px -10px rgba(227,192,112,.8),inset 0 1px 0 rgba(255,255,255,.55);
}
.brand-mark svg{stroke:#2a1d00;width:22px;height:22px}
.center-name{
  background:rgba(255,255,255,.04)!important;border:1px solid rgba(227,192,112,.2)!important;border-radius:12px!important;
  color:#f3ecd7!important;padding:.65rem .75rem!important;margin:.1rem 0 .6rem!important;
}
.center-name::before{color:#c9a85a!important}
.center-name select{background:rgba(255,255,255,.06);color:#f7f1de;border:1px solid rgba(227,192,112,.25);border-radius:9px}
.center-name select option{color:#111;background:#fff}
#nav a,.grouphead{color:#c4c9dc;border-radius:11px;position:relative;transition:background .2s var(--ease),color .2s,transform .2s var(--ease)}
#nav a svg,.grouphead svg{opacity:.85}
#nav a:hover,.grouphead:hover{background:rgba(255,255,255,.06)!important;color:#fff!important;transform:translateX(2px)}
#nav a.active{
  background:linear-gradient(90deg,rgba(227,192,112,.2),rgba(227,192,112,.05))!important;
  color:#f6e2a4!important;font-weight:700;box-shadow:inset 0 0 0 1px rgba(227,192,112,.25);
}
#nav a.active:before{content:"";position:absolute;left:-.8rem;top:20%;bottom:20%;width:4px;border-radius:0 4px 4px 0;background:linear-gradient(180deg,#f3dca0,#c79a3a)}
#nav a.active svg{color:#f3dca0;opacity:1;filter:drop-shadow(0 0 6px rgba(227,192,112,.6))}
#nav .groupbody{border-left:1px solid rgba(227,192,112,.2)}
#nav a.sub .subdot{background:#6c7390}
#nav a.sub.active .subdot{background:#f3dca0;box-shadow:0 0 0 3px rgba(227,192,112,.25)}
.nav-badge{background:linear-gradient(135deg,#f3dca0,#c79a3a)!important;color:#2a1d00!important}
.nav-badge.warn{background:linear-gradient(135deg,#ff9a8b,#e25a4a)!important;color:#fff!important}
.side-bottom{border-top:1px solid rgba(227,192,112,.16)}
.local{background:rgba(255,255,255,.04)!important;border-color:rgba(227,192,112,.18)!important;color:#d8dcec}
.local small,.version{color:#8f96ad!important}
.side-bottom .btn{background:transparent;color:#e8dcc0;border-color:rgba(227,192,112,.3)}
.side-bottom .btn:hover{background:rgba(227,192,112,.12)}
.dot{background:#52e0a6!important;box-shadow:0 0 0 0 rgba(82,224,166,.6);animation:pulse 2.4s infinite}
@keyframes pulse{70%{box-shadow:0 0 0 7px rgba(82,224,166,0)}100%{box-shadow:0 0 0 0 rgba(82,224,166,0)}}

/* ---------- 4. Thanh trên ---------- */
.topbar{background:color-mix(in srgb,var(--bg) 78%,transparent)!important;backdrop-filter:blur(14px) saturate(1.3);-webkit-backdrop-filter:blur(14px) saturate(1.3);border-bottom:1px solid var(--border)}
.datepill,.searchbox{background:var(--surface);border:1px solid var(--border);border-radius:999px;box-shadow:0 1px 0 rgba(255,255,255,.6) inset}
.searchbox:focus-within{border-color:var(--gold);box-shadow:0 0 0 4px var(--gold-soft)}
.datepill svg{stroke:var(--gold)}
.iconbtn{border-radius:12px;transition:transform .2s var(--ease),background .2s}
.iconbtn:hover{transform:translateY(-1px);background:var(--gold-soft)!important;border-color:color-mix(in srgb,var(--gold) 40%,transparent)!important;color:var(--ink)}
.avatar{background:linear-gradient(145deg,#f3dca0,#c79a3a)!important;color:#2a1d00!important;font-weight:800;box-shadow:0 0 0 2px var(--surface),0 0 0 4px color-mix(in srgb,var(--gold) 55%,transparent)}
.userchip{border-radius:999px}

/* ---------- 5. BANNER ĐỘNG (.phd = tiêu đề trang, .hero = Tổng quan) ---------- */
.hero,.phd{
  position:relative;overflow:hidden;isolation:isolate;border-radius:22px;color:#fff;
  background:
    radial-gradient(520px 260px at 88% -10%,rgba(227,192,112,.30),transparent 70%),
    radial-gradient(480px 300px at 8% 120%,rgba(60,198,217,.22),transparent 70%),
    linear-gradient(115deg,#070b1c 0%,#0e1a45 48%,#1b2f78 100%);
  background-size:140% 140%,140% 140%,100% 100%;
  animation:auroraShift 16s ease-in-out infinite alternate;
  box-shadow:0 26px 50px -28px rgba(8,14,40,.95),inset 0 0 0 1px rgba(227,192,112,.18);
  margin-bottom:1.1rem;
}
.hero{padding:1.9rem 2.1rem;min-height:150px}
.phd{padding:1.35rem 1.7rem;min-height:104px}
@keyframes auroraShift{0%{background-position:0% 0%,100% 100%,0 0}100%{background-position:100% 20%,0% 80%,0 0}}
.hero:before,.phd:before{display:none}
/* đường vàng chạy sáng ở mép dưới */
.hero:after,.phd:after{
  content:"";position:absolute;left:0;right:0;bottom:0;height:2px;z-index:2;opacity:1;
  background:linear-gradient(90deg,transparent 0%,#c79a3a 20%,#fff3c4 50%,#c79a3a 80%,transparent 100%);
  background-size:220% 100%;animation:goldRun 5s linear infinite;
}
@keyframes goldRun{0%{background-position:120% 0}100%{background-position:-120% 0}}
/* lớp hiệu ứng do fx.js chèn vào */
.fx{position:absolute;inset:0;z-index:-1;pointer-events:none;overflow:hidden}
.fx i{position:absolute;border-radius:50%;filter:blur(38px);opacity:.55;will-change:transform}
.fx i:nth-child(1){width:260px;height:260px;right:6%;top:-120px;background:#e3c070;animation:orb1 13s ease-in-out infinite alternate}
.fx i:nth-child(2){width:300px;height:300px;left:22%;bottom:-190px;background:#3b66e0;animation:orb2 17s ease-in-out infinite alternate}
.fx i:nth-child(3){width:180px;height:180px;right:30%;bottom:-100px;background:#2cc4d6;opacity:.35;animation:orb3 11s ease-in-out infinite alternate}
@keyframes orb1{to{transform:translate(-90px,50px) scale(1.2)}}
@keyframes orb2{to{transform:translate(120px,-30px) scale(.85)}}
@keyframes orb3{to{transform:translate(-60px,-40px) scale(1.3)}}
.fx svg{position:absolute;left:0;bottom:-1px;width:200%;height:46%;opacity:.5}
.fx svg path{fill:none;stroke:rgba(243,220,160,.55);stroke-width:1.4}
.fx svg path:nth-child(2){stroke:rgba(122,162,247,.5);stroke-width:1}
.fx svg g{animation:wave 14s linear infinite}
@keyframes wave{to{transform:translateX(-50%)}}
.fx b{position:absolute;width:3px;height:3px;border-radius:50%;background:#fff;opacity:0;animation:twinkle 5s infinite}
.fx b:nth-of-type(1){left:12%;top:24%;animation-delay:.2s}.fx b:nth-of-type(2){left:34%;top:68%;animation-delay:1.6s}
.fx b:nth-of-type(3){left:58%;top:18%;animation-delay:2.4s}.fx b:nth-of-type(4){left:76%;top:62%;animation-delay:.9s}
.fx b:nth-of-type(5){left:90%;top:30%;animation-delay:3.2s}.fx b:nth-of-type(6){left:46%;top:40%;animation-delay:4s}
@keyframes twinkle{0%,100%{opacity:0;transform:scale(.4)}50%{opacity:.95;transform:scale(1.6)}}
.hero svg.deco{opacity:.16;z-index:0}
/* nội dung banner */
.phd-ico,.hero .hbrand .mk{
  background:linear-gradient(145deg,rgba(243,220,160,.28),rgba(243,220,160,.06));border:1px solid rgba(243,220,160,.45);
  backdrop-filter:blur(4px);box-shadow:0 10px 24px -12px rgba(0,0,0,.7);animation:floaty 5s ease-in-out infinite;
}
@keyframes floaty{50%{transform:translateY(-3px)}}
.phd-ico svg,.hero .hbrand .mk svg{stroke:#f6e2a4}
.phd-t h1,.hero .hbrand b{font-family:var(--serif);font-weight:700;letter-spacing:.005em;color:#fff;text-shadow:0 2px 14px rgba(0,0,0,.35)}
.phd-t h1{font-size:1.65rem}
.hero .hbrand b{font-size:1.5rem;letter-spacing:.07em}
.phd-t p,.hero .hbrand small{color:#c9d3f0}
.hero .quote{font-family:var(--serif);color:#f6e6b8}
.hero .meta svg{stroke:#f3dca0}.hero .meta b{color:#f6e6b8}
.phd .btn,.phd input,.phd select{background:rgba(255,255,255,.1);border:1px solid rgba(243,220,160,.32);color:#fff;border-radius:12px;backdrop-filter:blur(4px)}
.phd .btn:hover{background:rgba(243,220,160,.2)}
.phd .btn.primary,.hero .btn.primary{background:linear-gradient(180deg,#f3dca0,#c79a3a);color:#2a1d00;border-color:transparent;box-shadow:0 10px 20px -10px rgba(227,192,112,.9)}
.phd-tabs{background:rgba(255,255,255,.08);border:1px solid rgba(243,220,160,.3);border-radius:14px;backdrop-filter:blur(6px)}
.phd-tabs button{white-space:nowrap;color:#d6dcf2;border-radius:11px;display:inline-flex;align-items:center;gap:.4rem;transition:background .2s,color .2s}
.phd-tabs button.on{background:linear-gradient(180deg,#f8e8b8,#e3c070);color:#2a1d00;box-shadow:0 6px 14px -6px rgba(0,0,0,.6)}

/* ---------- 6. Thẻ, bảng, ô nhập ---------- */
.card,.kc,.k2,details.group{
  border-radius:var(--r);border:1px solid var(--border);background:var(--surface);box-shadow:var(--shadow);
  transition:transform .3s var(--ease),box-shadow .3s var(--ease),border-color .3s;
}
.card:hover,.kc:hover,.k2:hover{transform:translateY(-2px);border-color:color-mix(in srgb,var(--gold) 38%,var(--border))}
.card>h2:first-child,.card>h3:first-child{display:flex;align-items:center;gap:.5rem}
.card>h2:first-child:before{content:"";width:4px;height:1.05em;border-radius:3px;background:linear-gradient(180deg,#f3dca0,#c79a3a);flex:none}
.ph .pico{background:var(--gold-soft);color:var(--gold)}
.kc{background:linear-gradient(160deg,color-mix(in srgb,var(--tint) 11%,var(--surface)) 0%,var(--surface) 62%)}
.kc .bigico{box-shadow:0 10px 18px -8px var(--tint),inset 0 1px 0 rgba(255,255,255,.35)}
.kc .val,.k2 .big{font-weight:800;letter-spacing:-.035em}
.ico{border-radius:11px}
.pill{border-radius:999px}
.tag.unconf{background:var(--warn-bg);color:var(--warn)}
.progress,.cmp3 .tr,.pbar .tr{background:var(--grid)}
.progress>i,.pbar .tr i{background:linear-gradient(90deg,#c79a3a,#f3dca0);border-radius:5px}
.banner{border-radius:14px;border:1px solid var(--border);backdrop-filter:blur(6px)}
.banner.warn{background:var(--warn-bg)}
.banner.info{background:var(--accent-soft)}

.btn{border-radius:12px;font-weight:550;transition:transform .18s var(--ease),box-shadow .2s,background .2s,border-color .2s;gap:.45rem}
.btn:hover{transform:translateY(-1px);background:var(--gold-soft);border-color:color-mix(in srgb,var(--gold) 45%,transparent)}
.btn:active{transform:translateY(0) scale(.98)}
.btn.primary{background:linear-gradient(180deg,#f3dca0 0%,#d4a948 55%,#c08f2c 100%);color:var(--gold-ink);border:1px solid rgba(120,84,10,.35);font-weight:700;box-shadow:0 10px 22px -12px rgba(184,138,44,.95),inset 0 1px 0 rgba(255,255,255,.55)}
.btn.primary:hover{filter:brightness(1.05);background:linear-gradient(180deg,#f8e6b0,#dcb350 55%,#c9982f)}
.btn.danger{border-color:color-mix(in srgb,var(--bad) 55%,transparent)}
.btn.danger:hover{background:var(--bad-bg)}
.btn svg.bi,svg.bi,.iconlead{width:1.05em;height:1.05em;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;flex:none}
.btn.small svg.bi{width:1em;height:1em}
input,select,textarea{border-radius:11px;border:1px solid var(--line);background:var(--surface);transition:border-color .2s,box-shadow .2s}
input:focus,select:focus,textarea:focus{border-color:var(--gold);box-shadow:0 0 0 4px var(--gold-soft);outline:none!important}
input[type=checkbox],input[type=radio]{accent-color:var(--gold)}

table{font-size:.9rem}
th{background:var(--surface2);color:var(--muted);text-transform:uppercase;letter-spacing:.06em;font-size:.7rem;font-weight:750;border-bottom:1px solid var(--line)}
td{border-bottom:1px solid var(--grid)}
tbody tr{transition:background .15s}
tbody tr:hover td{background:var(--gold-soft)}
tr.cat td{background:var(--gold-soft);color:var(--ink)}
.tablewrap{border-radius:var(--r);border:1px solid var(--border);box-shadow:var(--shadow)}

.tabs{border-bottom:1px solid var(--grid);gap:.3rem}
.tabs button{display:inline-flex;align-items:center;gap:.4rem;border-radius:11px 11px 0 0;transition:background .2s,color .2s;padding:.55rem 1rem}
.tabs button:hover{background:var(--gold-soft)}
.tabs button.active{color:var(--ink);border-bottom:3px solid var(--gold);background:linear-gradient(180deg,transparent,var(--gold-soft))}
.seg{border-radius:12px;background:var(--surface2)}
.seg button.on{background:linear-gradient(180deg,#232d57,#161d3c);color:#f6e2a4}
.stepper span.on{background:linear-gradient(180deg,#f3dca0,#d4a948);color:var(--gold-ink)}
details.group>summary{font-weight:700}
dialog{border-radius:22px;border:1px solid color-mix(in srgb,var(--gold) 30%,var(--border));box-shadow:0 40px 80px -30px rgba(0,0,0,.6)}
dialog::backdrop{background:rgba(5,8,18,.6);backdrop-filter:blur(5px)}
dialog[open]{animation:pop .28s var(--ease)}
@keyframes pop{from{opacity:0;transform:translateY(14px) scale(.97)}}
#toast div{border-radius:14px;background:#0f1626;color:#f6e6b8;border:1px solid rgba(227,192,112,.35)}
.skeleton{background:linear-gradient(90deg,var(--grid),var(--surface2),var(--grid));background-size:200% 100%}
.empty{color:var(--muted)}

/* ---------- 7. Chuyển trang mượt ---------- */
#view>*{animation:rise .55s var(--ease) both}
#view>*:nth-child(2){animation-delay:.05s}#view>*:nth-child(3){animation-delay:.1s}#view>*:nth-child(4){animation-delay:.15s}
#view>*:nth-child(5){animation-delay:.2s}#view>*:nth-child(n+6){animation-delay:.25s}
@keyframes rise{from{opacity:0;transform:translateY(14px)}}

/* ---------- 8. Đăng nhập ---------- */
.login-wrap{
  background:
    radial-gradient(600px 400px at 85% 10%,rgba(227,192,112,.28),transparent 70%),
    radial-gradient(700px 500px at 10% 90%,rgba(59,102,224,.35),transparent 70%),
    linear-gradient(135deg,#05070e,#0d1534 60%,#13205a);
  overflow:hidden;
}
.login-wrap:before,.login-wrap:after{content:"";position:absolute;pointer-events:none;z-index:0;border-radius:50%;filter:blur(60px);opacity:.5;animation:orb1 14s ease-in-out infinite alternate}
.login-wrap:before{width:340px;height:340px;left:8%;top:6%;background:#c79a3a}
.login-wrap:after{width:380px;height:380px;right:6%;bottom:2%;background:#2a56c8;animation-name:orb2}
.login-card{position:relative;z-index:1;background:rgba(255,255,255,.07);border:1px solid rgba(243,220,160,.35);backdrop-filter:blur(18px);color:#f1efe8;border-radius:26px;padding:2rem;box-shadow:0 40px 80px -30px #000}
.login-card h1{font-family:var(--serif);color:#f6e6b8;font-size:1.8rem;text-align:center}
.login-card .muted{color:#b7bfd8;text-align:center}
.login-card input{background:rgba(255,255,255,.08);border-color:rgba(243,220,160,.4);color:#fff}
.login-card input::placeholder{color:#8f98b8}

/* ---------- 9. Thanh dưới cho điện thoại ---------- */
.bottombar{display:none}
@media(max-width:900px){
  body{padding-bottom:72px}
  .bottombar{
    display:grid;grid-template-columns:repeat(5,1fr);position:fixed;left:10px;right:10px;bottom:10px;z-index:40;
    padding:.35rem;border-radius:22px;background:rgba(9,13,24,.88);backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);
    border:1px solid rgba(227,192,112,.3);box-shadow:0 18px 40px -14px rgba(0,0,0,.7);
  }
  .bottombar a,.bottombar button{
    display:flex;flex-direction:column;align-items:center;gap:2px;padding:.45rem 0 .4rem;border:0;background:none;border-radius:16px;
    color:#aeb4cb;font:inherit;font-size:.64rem;font-weight:600;text-decoration:none;cursor:pointer;transition:color .2s,background .2s
  }
  .bottombar svg{width:21px;height:21px;stroke:currentColor;fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
  .bottombar .on{color:#f6e2a4;background:linear-gradient(180deg,rgba(227,192,112,.2),rgba(227,192,112,.04))}
  .bottombar .on svg{filter:drop-shadow(0 0 6px rgba(227,192,112,.7))}
  #toast{bottom:90px}
}

/* ---------- 10. Đáp ứng: điện thoại · máy tính bảng · laptop · màn hình lớn ---------- */
@media(min-width:1700px){html{font-size:16px}main,#banners{max-width:1680px}}
@media(max-width:900px){
  .row2,.row3,.row4,.g-main{grid-template-columns:minmax(0,1fr)!important}
  .grid>*,.row2>*,.row3>*,.row4>*,.card{min-width:0}
  html{font-size:15px}
  main{padding:.9rem .85rem 2rem}
  #banners{padding:0 .85rem}
  .hero{padding:1.1rem 1.1rem;grid-template-columns:1fr!important}
  .phd{padding:1rem 1.05rem;border-radius:20px}
  .hero .meta{white-space:normal}
  .hero .quote{font-size:1rem}
  .phd-t h1{font-size:1.35rem}
  .phd-r{justify-content:flex-start;width:100%}
  .phd-tabs{max-width:100%;overflow-x:auto;scrollbar-width:none}
  .phd-tabs::-webkit-scrollbar{display:none}
  .tabs{overflow-x:auto;flex-wrap:nowrap;scrollbar-width:none}
  .tabs button{white-space:nowrap}
  .topbar{gap:.5rem}
  .searchbox input{min-width:0}
  .userchip>span:last-child{display:none}
  .tablewrap{max-width:100%}
  dialog{max-width:96vw;border-radius:20px}
  .btn{min-height:38px}
  input,select,textarea{min-height:38px;font-size:16px}
}
@media(max-width:560px){
  .kpi5{grid-template-columns:repeat(2,minmax(0,1fr));gap:.6rem}
  .kc{min-height:150px;padding:.8rem .8rem 0}
  .kc .val{font-size:1.3rem}
  .datepill span{display:none}
}
@media (hover:none){.card:hover,.kc:hover,.k2:hover,.btn:hover,#nav a:hover{transform:none}}
@media(prefers-reduced-motion:reduce){
  *,*:before,*:after{animation:none!important;transition:none!important}
}
@media print{.fx,.bottombar{display:none!important}.hero,.phd{background:#0e1a45!important;-webkit-print-color-adjust:exact;print-color-adjust:exact}}

svg.bi{width:1.05em;height:1.05em}
.tabs button svg.bi,.phd-tabs button svg.bi{width:1em;height:1em;opacity:.9}
@media(max-width:900px){.phd-tabs{display:flex}.phd-tabs button{flex:none}}
.card a:not(.btn),.kc a:not(.btn),.banner a,.ph a,.statusrow a{color:var(--accent)}
@media (prefers-color-scheme: dark){:root:where(:not([data-theme="light"])) .card a:not(.btn),:root:where(:not([data-theme="light"])) .kc a:not(.btn),:root:where(:not([data-theme="light"])) .banner a{color:#9dbcff}}
:root[data-theme="dark"] .card a:not(.btn),:root[data-theme="dark"] .kc a:not(.btn),:root[data-theme="dark"] .banner a{color:#9dbcff}

/* 0.28.3 — nhẹ máy cho điện thoại/máy yếu: bỏ làm mờ nền & hoạt ảnh nặng */
@media (max-width:900px),(pointer:coarse){
  *{backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
  .topbar{background:var(--bg)!important}
  .bottombar{background:rgba(9,13,24,.97)!important}
  .fx,.fx *,.hero:before,.hero:after,.phd:before,.phd:after,.login-wrap:before,.login-wrap:after{animation:none!important}
  #view>*{animation:none!important}
  .phd .fx i,.hero .fx i{display:none}
}
