/* 4 bộ theme mới (05/10/2026) — mỗi bộ có chế độ Tối và Sáng. 7 theme cũ bên dưới giữ nguyên. */
html[data-itn-theme="burgundy-royal"] {
  color-scheme:dark;
  --theme-browser:#100408; --theme-accent:#fb7185; --theme-accent-strong:#e11d48; --theme-accent-soft:rgba(251,113,133,.18);
  --theme-logo:sepia(1) saturate(3) hue-rotate(310deg) brightness(1.2); --theme-brand-a:#ffe4e6; --theme-brand-b:#fb7185;
  --bg-app:#100408; --bg-card:rgba(28,8,16,.90); --bg-card-hover:rgba(44,12,24,.96); --bg-input:#1a060f; --border-color:rgba(244,63,94,.28);
  --text-main:#fff1f2; --text-muted:#c99aa5; --text-dim:#8a5e69; --color-gold:#fb7185; --color-gold-light:#fda4af; --color-gold-bg:rgba(251,113,133,.15);
  --theme-header:rgba(16,4,8,.96); --theme-header-layer:rgba(255,255,255,.05); --theme-shadow:0 24px 68px rgba(0,0,0,.75); --theme-success:#34d399; --theme-warning:#fbbf24; --theme-danger:#f43f5e;
}
html[data-itn-theme="burgundy-royal-light"] {
  color-scheme:light;
  --theme-browser:#fdf6f7; --theme-accent:#be123c; --theme-accent-strong:#9f1239; --theme-accent-soft:rgba(190,18,60,.10);
  --theme-logo:sepia(1) saturate(2.6) hue-rotate(310deg) brightness(.75); --theme-brand-a:#881337; --theme-brand-b:#be123c;
  --bg-app:#fdf6f7; --bg-card:#ffffff; --bg-card-hover:#fff5f7; --bg-input:#fcf0f2; --border-color:rgba(159,18,57,.16);
  --text-main:#2a0610; --text-muted:#6e3e4a; --text-dim:#946370; --color-gold:#be123c; --color-gold-light:#e11d48; --color-gold-bg:rgba(190,18,60,.09);
  --theme-header:rgba(255,255,255,.96); --theme-header-layer:rgba(159,18,57,.05); --theme-shadow:0 18px 44px rgba(159,18,57,.10); --theme-success:#0f766e; --theme-warning:#b45309; --theme-danger:#be123c;
}
html[data-itn-theme="glacial-cyan"] {
  color-scheme:dark;
  --theme-browser:#040a14; --theme-accent:#00f0ff; --theme-accent-strong:#0284c7; --theme-accent-soft:rgba(0,240,255,.18);
  --theme-logo:sepia(.2) saturate(2) hue-rotate(160deg) brightness(1.6); --theme-brand-a:#e0f9ff; --theme-brand-b:#00f0ff;
  --bg-app:#040a14; --bg-card:rgba(8,22,38,.86); --bg-card-hover:rgba(14,35,60,.95); --bg-input:#081628; --border-color:rgba(0,240,255,.30);
  --text-main:#f0f9ff; --text-muted:#94b8d7; --text-dim:#5b84a6; --color-gold:#00f0ff; --color-gold-light:#67e8f9; --color-gold-bg:rgba(0,240,255,.16);
  --theme-header:rgba(4,10,20,.96); --theme-header-layer:rgba(0,240,255,.06); --theme-shadow:0 24px 68px rgba(0,0,0,.85), 0 0 30px rgba(0,240,255,.15); --theme-success:#2dd4bf; --theme-warning:#fbbf24; --theme-danger:#f43f5e;
}
html[data-itn-theme="glacial-cyan-light"] {
  color-scheme:light;
  --theme-browser:#c7d3de; --theme-accent:#0274ad; --theme-accent-strong:#035c8b; --theme-accent-soft:rgba(2,116,173,.12);
  --theme-logo:sepia(.2) saturate(2) hue-rotate(160deg) brightness(.75); --theme-brand-a:#0a2335; --theme-brand-b:#0274ad;
  --bg-app:#c7d3de; --bg-card:#d9e4ee; --bg-card-hover:#dfe9f2; --bg-input:#bdccda; --border-color:rgba(2,132,199,.20);
  --text-main:#0a2335; --text-muted:#2f4b60; --text-dim:#526f84; --color-gold:#0274ad; --color-gold-light:#0384c7; --color-gold-bg:rgba(2,116,173,.10);
  --theme-header:#d5e0ea; --theme-header-layer:rgba(2,132,199,.04); --theme-shadow:0 12px 30px rgba(20,50,80,.08); --theme-success:#0b6861; --theme-warning:#9a4a06; --theme-danger:#a81135;
}
html[data-itn-theme="hermes-orange"] {
  color-scheme:dark;
  --theme-browser:#0c0906; --theme-accent:#f97316; --theme-accent-strong:#ea580c; --theme-accent-soft:rgba(249,115,22,.18);
  --theme-logo:sepia(1) saturate(3) hue-rotate(345deg) brightness(1.3); --theme-brand-a:#ffedd5; --theme-brand-b:#f97316;
  --bg-app:#0c0906; --bg-card:rgba(24,16,10,.90); --bg-card-hover:rgba(38,24,14,.96); --bg-input:#160f09; --border-color:rgba(251,146,60,.28);
  --text-main:#fffaf5; --text-muted:#c7a892; --text-dim:#8c705d; --color-gold:#f97316; --color-gold-light:#fdba74; --color-gold-bg:rgba(249,115,22,.15);
  --theme-header:rgba(12,9,6,.96); --theme-header-layer:rgba(255,255,255,.05); --theme-shadow:0 24px 68px rgba(0,0,0,.75); --theme-success:#10b981; --theme-warning:#fbbf24; --theme-danger:#f43f5e;
}
html[data-itn-theme="hermes-orange-light"] {
  color-scheme:light;
  --theme-browser:#fdfaf6; --theme-accent:#ea580c; --theme-accent-strong:#c2410c; --theme-accent-soft:rgba(234,88,12,.10);
  --theme-logo:sepia(1) saturate(2.5) hue-rotate(345deg) brightness(.8); --theme-brand-a:#7c2d12; --theme-brand-b:#ea580c;
  --bg-app:#fdfaf6; --bg-card:#ffffff; --bg-card-hover:#fff7ed; --bg-input:#fef2e8; --border-color:rgba(194,65,12,.16);
  --text-main:#271406; --text-muted:#78533c; --text-dim:#9a7259; --color-gold:#ea580c; --color-gold-light:#f97316; --color-gold-bg:rgba(234,88,12,.09);
  --theme-header:rgba(255,255,255,.96); --theme-header-layer:rgba(194,65,12,.05); --theme-shadow:0 18px 44px rgba(194,65,12,.10); --theme-success:#059669; --theme-warning:#b45309; --theme-danger:#dc2626;
}
html[data-itn-theme="soft-amber"] {
  color-scheme:dark;
  --theme-browser:#110e0b; --theme-accent:#fbbf24; --theme-accent-strong:#f59e0b; --theme-accent-soft:rgba(251,191,36,.18);
  --theme-logo:sepia(.8) saturate(1.8) hue-rotate(5deg) brightness(1.5); --theme-brand-a:#fef3c7; --theme-brand-b:#fbbf24;
  --bg-app:#110e0b; --bg-card:rgba(28,22,17,.90); --bg-card-hover:rgba(40,32,24,.96); --bg-input:#18130f; --border-color:rgba(251,191,36,.25);
  --text-main:#fffdfa; --text-muted:#bfae95; --text-dim:#8a7962; --color-gold:#fbbf24; --color-gold-light:#fde68a; --color-gold-bg:rgba(251,191,36,.15);
  --theme-header:rgba(17,14,11,.96); --theme-header-layer:rgba(255,255,255,.05); --theme-shadow:0 24px 68px rgba(0,0,0,.75); --theme-success:#34d399; --theme-warning:#fbbf24; --theme-danger:#f87171;
}
html[data-itn-theme="soft-amber-light"] {
  color-scheme:light;
  --theme-browser:#fefcf9; --theme-accent:#d97706; --theme-accent-strong:#b45309; --theme-accent-soft:rgba(217,119,6,.10);
  --theme-logo:sepia(.8) saturate(1.6) hue-rotate(5deg) brightness(.85); --theme-brand-a:#78350f; --theme-brand-b:#d97706;
  --bg-app:#fefcf9; --bg-card:#ffffff; --bg-card-hover:#fffbeb; --bg-input:#fef3c7; --border-color:rgba(180,83,9,.14);
  --text-main:#291804; --text-muted:#785f4c; --text-dim:#9a816c; --color-gold:#d97706; --color-gold-light:#fbbf24; --color-gold-bg:rgba(217,119,6,.09);
  --theme-header:rgba(255,255,255,.96); --theme-header-layer:rgba(180,83,9,.05); --theme-shadow:0 18px 44px rgba(180,83,9,.10); --theme-success:#059669; --theme-warning:#b45309; --theme-danger:#dc2626;
}
html[data-itn-theme="desert-titanium"],
html[data-itn-theme="executive-champagne"] {
  color-scheme:dark;
  --theme-browser:#08090c; --theme-accent:#dfba73; --theme-accent-strong:#c59b48; --theme-accent-soft:rgba(223,186,115,.16);
  --theme-logo:sepia(.8) saturate(1.4) hue-rotate(350deg) brightness(1.7); --theme-brand-a:#fff5e0; --theme-brand-b:#dfba73;
  --bg-app:#08090c; --bg-card:rgba(18,20,26,.88); --bg-card-hover:rgba(26,29,38,.96); --bg-input:#0f1117; --border-color:rgba(223,186,115,.22);
  --text-main:#f5f5f7; --text-muted:#9ea3ae; --text-dim:#6b7280; --color-gold:#dfba73; --color-gold-light:#f5dfa8; --color-gold-bg:rgba(223,186,115,.14);
  --theme-header:rgba(12,14,18,.96); --theme-header-layer:rgba(255,255,255,.05); --theme-shadow:0 24px 68px rgba(0,0,0,.65); --theme-success:#10b981; --theme-warning:#f59e0b; --theme-danger:#f43f5e;
}
html[data-itn-theme="desert-titanium-light"],
html[data-itn-theme="executive-champagne-light"] {
  color-scheme:light;
  --theme-browser:#d7cebf; --theme-accent:#855e1b; --theme-accent-strong:#704c13; --theme-accent-soft:rgba(133,94,27,.12);
  --theme-logo:sepia(.8) saturate(1.3) hue-rotate(350deg) brightness(.75); --theme-brand-a:#3a2c16; --theme-brand-b:#855e1b;
  --bg-app:#d7cebf; --bg-card:#e8e0d3; --bg-card-hover:#ede5d9; --bg-input:#cfc5b4; --border-color:rgba(138,98,32,.18);
  --text-main:#1c1812; --text-muted:#4a4234; --text-dim:#746a58; --color-gold:#855e1b; --color-gold-light:#9e7228; --color-gold-bg:rgba(133,94,27,.10);
  --theme-header:#e4dccf; --theme-header-layer:rgba(138,98,32,.04); --theme-shadow:0 12px 30px rgba(60,48,25,.08); --theme-success:#036b4d; --theme-warning:#9a4a06; --theme-danger:#a81135;
}
html[data-itn-theme="pearl-cashmere"] {
  color-scheme:light;
  --theme-browser:#f7f6f3; --theme-accent:#a8805a; --theme-accent-strong:#8a6644; --theme-accent-soft:rgba(168,128,90,.11);
  --theme-logo:sepia(.2) saturate(1.1) brightness(.9); --theme-brand-a:#2c2824; --theme-brand-b:#a8805a;
  --bg-app:#f7f6f3; --bg-card:#ffffff; --bg-card-hover:#fcfbf9; --bg-input:#f2f0ec; --border-color:rgba(138,102,68,.18);
  --text-main:#1c1b1a; --text-muted:#5e5953; --text-dim:#8a837b; --color-gold:#8a6644; --color-gold-light:#a8805a; --color-gold-bg:rgba(168,128,90,.09);
  --theme-header:rgba(255,255,255,.96); --theme-header-layer:rgba(168,128,90,.06); --theme-shadow:0 16px 40px rgba(0,0,0,.06); --theme-success:#047857; --theme-warning:#b45309; --theme-danger:#be123c;
}
html[data-itn-theme="pearl-cashmere-dark"] {
  color-scheme:dark;
  --theme-browser:#16130f; --theme-accent:#e2c9a0; --theme-accent-strong:#c9a978; --theme-accent-soft:rgba(226,201,160,.14);
  --theme-logo:sepia(.5) saturate(1.1) brightness(1.6); --theme-brand-a:#f6efe4; --theme-brand-b:#e2c9a0;
  --bg-app:#16130f; --bg-card:rgba(32,28,23,.9); --bg-card-hover:rgba(42,37,31,.96); --bg-input:#1d1914; --border-color:rgba(226,201,160,.2);
  --text-main:#f6f0e8; --text-muted:#b5aa9b; --text-dim:#857a6c; --color-gold:#e2c9a0; --color-gold-light:#f1e1c4; --color-gold-bg:rgba(226,201,160,.13);
  --theme-header:rgba(22,19,15,.96); --theme-header-layer:rgba(255,246,230,.05); --theme-shadow:0 24px 64px rgba(0,0,0,.55); --theme-success:#5fbf93; --theme-warning:#e0b264; --theme-danger:#f08a8a;
}
:root,
html[data-itn-theme="sapphire"] {
  color-scheme:dark;
  --theme-browser:#0b172b; --theme-accent:#57a7ff; --theme-accent-strong:#1976d2; --theme-accent-soft:rgba(71,150,255,.16);
  --theme-logo:sepia(.15) saturate(.9) hue-rotate(174deg) brightness(1.5); --theme-brand-a:#f1f8ff; --theme-brand-b:#8da9c9;
  --bg-app:#080f1d; --bg-card:#111c2f; --bg-card-hover:#17253b; --bg-input:#0d1728; --border-color:rgba(151,194,255,.2);
  --text-main:#f7fbff; --text-muted:#9dacc2; --text-dim:#8ea1bb; --color-gold:#57a7ff; --color-gold-light:#9bc9ff; --color-gold-bg:rgba(71,150,255,.14);
  --theme-header:rgba(11,23,43,.96); --theme-header-layer:rgba(255,255,255,.055); --theme-shadow:0 22px 64px rgba(0,8,24,.35); --theme-success:#2f9e63; --theme-warning:#b7791f; --theme-danger:#c53030;
}
html[data-itn-theme="graphite"] {
  color-scheme:dark;
  --theme-browser:#15181d; --theme-accent:#b8c0ca; --theme-accent-strong:#7f8995; --theme-accent-soft:rgba(189,198,209,.13);
  --theme-logo:grayscale(1) brightness(1.65) contrast(.78); --theme-brand-a:#f4f6f8; --theme-brand-b:#8b949f;
  --bg-app:#101216; --bg-card:#1a1d22; --bg-card-hover:#22262c; --bg-input:#14171c; --border-color:rgba(211,218,226,.16);
  --text-main:#f3f5f7; --text-muted:#a4acb6; --text-dim:#959ea9; --color-gold:#aeb7c2; --color-gold-light:#d5dbe2; --color-gold-bg:rgba(185,193,203,.12);
  --theme-header:rgba(24,27,32,.97); --theme-header-layer:rgba(255,255,255,.05); --theme-shadow:0 22px 64px rgba(0,0,0,.36); --theme-success:#55b685; --theme-warning:#d0a15b; --theme-danger:#ff8b8b;
}
html[data-itn-theme="gold-noir"] {
  color-scheme:dark;
  --theme-browser:#0d0d0e; --theme-accent:#e3bf78; --theme-accent-strong:#a97c30; --theme-accent-soft:rgba(225,183,101,.14);
  --theme-logo:sepia(1) saturate(1.25) hue-rotate(348deg) brightness(1.8); --theme-brand-a:#fff5d7; --theme-brand-b:#b68a42;
  --bg-app:#09090a; --bg-card:#141311; --bg-card-hover:#1d1b17; --bg-input:#0f0f0e; --border-color:rgba(226,195,132,.2);
  --text-main:#fffaf0; --text-muted:#b8ae9c; --text-dim:#a39988; --color-gold:#d8ad5c; --color-gold-light:#f0cf8b; --color-gold-bg:rgba(216,173,92,.14);
  --theme-header:rgba(13,13,14,.97); --theme-header-layer:rgba(255,246,220,.055); --theme-shadow:0 22px 64px rgba(0,0,0,.42); --theme-success:#72c48f; --theme-warning:#e1b96b; --theme-danger:#ff9a9a;
}
html[data-itn-theme="light-pearl"] {
  color-scheme:light;
  --theme-browser:#f7faff; --theme-accent:#155daa; --theme-accent-strong:#0d4d92; --theme-accent-soft:rgba(31,105,190,.1);
  --theme-logo:saturate(.68) brightness(.84) contrast(1.08); --theme-brand-a:#356c9e; --theme-brand-b:#142e4d;
  --bg-app:#eef3f8; --bg-card:#ffffff; --bg-card-hover:#f7faff; --bg-input:#f5f8fc; --border-color:rgba(29,90,168,.16);
  --text-main:#102037; --text-muted:#56657a; --text-dim:#5c6a7d; --color-gold:#155daa; --color-gold-light:#246fbf; --color-gold-bg:rgba(31,105,190,.1);
  --theme-header:rgba(252,253,255,.97); --theme-header-layer:rgba(28,91,171,.05); --theme-shadow:0 22px 64px rgba(31,65,110,.14); --theme-success:#247a4b; --theme-warning:#965c0a; --theme-danger:#b42318;
}
html[data-itn-theme="ios-light"] {
  color-scheme:light;
  --theme-browser:#f2f2f7; --theme-accent:#0a84ff; --theme-accent-strong:#0071e3; --theme-accent-soft:rgba(10,132,255,.12);
  --theme-logo:saturate(.68) brightness(.84) contrast(1.08); --theme-brand-a:#111827; --theme-brand-b:#1d2939;
  --bg-app:#f2f2f7; --bg-card:#ffffff; --bg-card-hover:#f8fafc; --bg-input:#f2f2f7; --border-color:rgba(17,24,39,.12);
  --text-main:#111827; --text-muted:#5b6474; --text-dim:#626b7c; --color-gold:#0071e3; --color-gold-light:#0064cc; --color-gold-bg:rgba(10,132,255,.1);
  --theme-header:rgba(255,255,255,.98); --theme-header-layer:#f2f4f7; --theme-shadow:0 14px 34px rgba(30,64,110,.12); --theme-success:#1f7a45; --theme-warning:#935f00; --theme-danger:#c0262d;
}
html[data-itn-theme="titanium"] {
  color-scheme:light;
  --theme-browser:#dce5ea; --theme-accent:#337b99; --theme-accent-strong:#245f78; --theme-accent-soft:rgba(56,130,157,.12);
  --theme-logo:grayscale(.72) saturate(.55) brightness(.88) contrast(1.06); --theme-brand-a:#516d7a; --theme-brand-b:#172b34;
  --bg-app:#cfd8df; --bg-card:#e9eef1; --bg-card-hover:#f2f6f8; --bg-input:#e1e8ec; --border-color:rgba(53,82,99,.2);
  --text-main:#172630; --text-muted:#3f515d; --text-dim:#455763; --color-gold:#337b99; --color-gold-light:#2a6b86; --color-gold-bg:rgba(56,130,157,.12);
  --theme-header:rgba(225,232,237,.97); --theme-header-layer:rgba(255,255,255,.32); --theme-shadow:0 22px 64px rgba(43,65,78,.18); --theme-success:#2f7d52; --theme-warning:#8a5a12; --theme-danger:#a12a2a;
}
html[data-itn-theme="rose-pink"] {
  color-scheme:light;
  --theme-browser:#fff0f7; --theme-accent:#c53583; --theme-accent-strong:#a22c70; --theme-accent-soft:rgba(255,157,204,.22);
  --theme-logo:sepia(1) saturate(2.2) hue-rotate(285deg) brightness(1.02) contrast(.9); --theme-brand-a:#7a435f; --theme-brand-b:#c53583;
  --bg-app:#fff0f7; --bg-card:#fff9fc; --bg-card-hover:#fff3f9; --bg-input:#fff6fb; --border-color:rgba(197,53,131,.22);
  --text-main:#4e1838; --text-muted:#7a4f66; --text-dim:#7d4f67; --color-gold:#c53583; --color-gold-light:#a22c70; --color-gold-bg:rgba(255,157,204,.2);
  --theme-header:rgba(255,246,251,.97); --theme-header-layer:rgba(255,157,204,.12); --theme-shadow:0 22px 64px rgba(126,45,88,.16); --theme-success:#28734b; --theme-warning:#925b15; --theme-danger:#a62a42;
}

html[data-itn-theme] {
  --color-blue:var(--theme-accent-strong);
  --color-blue-hover:color-mix(in srgb,var(--theme-accent-strong) 82%,black);
  --color-blue-soft:var(--theme-accent-soft);
  --color-sapphire:var(--theme-accent-strong);
  --color-sapphire-light:var(--theme-accent);
  accent-color:var(--theme-accent-strong);
}
body[data-itn-theme] { background:var(--bg-app)!important; color:var(--text-main)!important; transition:background-color .3s ease,color .3s ease; }
body[data-itn-theme] .app-header,
body[data-itn-theme].backend-dashboard-shell #app-header { background:var(--theme-header)!important; color:var(--text-main)!important; border-color:var(--border-color)!important; box-shadow:var(--theme-shadow)!important; backdrop-filter:blur(22px) saturate(130%); }
body[data-itn-theme] .header-logo-img { border:0!important; border-radius:0!important; background:transparent!important; box-shadow:none!important; filter:var(--theme-logo); opacity:.88; }
body[data-itn-theme] .header-brand-title,
body[data-itn-theme] .header-brand::after { display:none!important; }
body[data-itn-theme] .header-brand { display:inline-flex!important; align-items:center!important; gap:8px!important; color:var(--text-main)!important; text-decoration:none!important; }
body[data-itn-theme] .header-brand .itn-mark { grid-row:auto; width:38px; height:38px; min-width:38px; border-radius:10px; display:inline-flex; align-items:center; justify-content:center; }
body[data-itn-theme] .header-branch-pill,
body[data-itn-theme] .header-theme-btn,
body[data-itn-theme] .tb-nut,
body[data-itn-theme] .tkg-nut,
body[data-itn-theme] .user-profile-badge,
body[data-itn-theme] .backend-account-btn,
body[data-itn-theme] .backend-logout-btn {
  background:var(--theme-header-layer)!important;
  color:var(--text-main)!important;
  border:1px solid var(--border-color)!important;
  box-shadow:none!important;
  border-radius:19px!important;
  height:44px!important;
  min-height:44px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  transition:background-color .2s cubic-bezier(.16,1,.3,1),border-color .2s cubic-bezier(.16,1,.3,1),color .2s cubic-bezier(.16,1,.3,1),opacity .2s cubic-bezier(.16,1,.3,1),transform .2s cubic-bezier(.16,1,.3,1),box-shadow .2s cubic-bezier(.16,1,.3,1)!important;
}
body[data-itn-theme] .tb-nut,
body[data-itn-theme] .tkg-nut { width:44px!important; padding:0!important; }
body[data-itn-theme] .header-branch-pill:hover,
body[data-itn-theme] .header-theme-btn:hover,
body[data-itn-theme] .tb-nut:hover,
body[data-itn-theme] .tkg-nut:hover,
body[data-itn-theme] .user-profile-badge:hover {
  background:color-mix(in srgb,var(--theme-header-layer) 75%,var(--theme-accent) 25%)!important;
  border-color:color-mix(in srgb,var(--border-color) 65%,var(--theme-accent) 35%)!important;
  transform:translateY(-1px);
}
body[data-itn-theme] .tb-dem {
  position:absolute!important;
  top:-4px!important;
  right:-4px!important;
  min-width:18px!important;
  height:18px!important;
  padding:0 4px!important;
  border-radius:999px!important;
  background:var(--theme-danger, #c0262d)!important;
  color:#fff!important;
  font-size:10px!important;
  font-weight:700!important;
  display:grid!important;
  place-items:center!important;
  border:2px solid var(--theme-header, #0d121d)!important;
  box-shadow:0 2px 4px rgba(192,38,45,.4)!important;
}
body[data-itn-theme] .tb-dem[hidden] { display:none!important; }
@media (prefers-reduced-motion: reduce) {
  body[data-itn-theme] #app-header .header-right button { transition:none!important; }
}
body[data-itn-theme] .branch-label-dim,
body[data-itn-theme] .user-name-exec { color:var(--text-muted)!important; }
body[data-itn-theme] .user-avatar-exec { background:var(--theme-accent-strong)!important; color:#fff!important; width:32px; height:32px; border-radius:50%; display:inline-flex; align-items:center; justify-content:center; }
body[data-itn-theme] .app-nav,
body[data-itn-theme].backend-dashboard-shell #app-nav { background:color-mix(in srgb,var(--theme-header) 92%,var(--theme-accent))!important; border:1px solid var(--border-color)!important; box-shadow:0 14px 36px color-mix(in srgb,var(--theme-accent) 15%,transparent)!important; }
body[data-itn-theme] .nav-tab-btn { color:var(--text-muted)!important; }
body[data-itn-theme] .nav-tab-btn:hover { color:var(--text-main)!important; background:var(--theme-header-layer)!important; }
body[data-itn-theme] .nav-tab-btn.active,
body[data-itn-theme] .nav-tab-btn[aria-current="page"] { color:var(--text-main)!important; background:var(--theme-accent-soft)!important; box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--theme-accent) 48%,transparent)!important; }
body[data-itn-theme] .role-control-bar,
body[data-itn-theme].backend-dashboard-shell #role-control-bar { background:var(--theme-header)!important; color:var(--text-main)!important; border-color:var(--border-color)!important; }
body[data-itn-theme].backend-dashboard-shell { background:var(--bg-app)!important; color:var(--text-main)!important; }
body[data-itn-theme].backend-dashboard-shell .pilot-panel,
body[data-itn-theme].backend-dashboard-shell .pilot-security-card,
body[data-itn-theme].backend-dashboard-shell .pilot-device,
body[data-itn-theme].backend-dashboard-shell .pilot-step,
body[data-itn-theme].backend-dashboard-shell .pilot-summary article { background:var(--bg-card)!important; color:var(--text-main)!important; border-color:var(--border-color)!important; }
body[data-itn-theme].backend-dashboard-shell :where(input, select, button:not(.itn-more-item):not(.itn-more-x)) { background:var(--bg-input); color:var(--text-main); border-color:var(--border-color); }
/* Nút phụ trong khung kho/bán: viền ≥3:1 (chuẩn A2). :where giữ độ ưu tiên thấp để nút chính của phiếu, nút Hủy HĐ (đỏ), tab đang chọn vẫn giữ màu riêng. */
body[data-itn-theme].backend-dashboard-shell :where(.pilot-panel) button:where(:not([aria-current]):not([aria-pressed="true"])) { border-color:var(--itn-nut-vien, var(--border-color)); }
body[data-itn-theme] :focus-visible { outline:3px solid var(--theme-accent)!important; outline-offset:3px; }
body[data-itn-theme] .itn-more .itn-more-item:focus-visible { outline:2px solid color-mix(in srgb, var(--theme-accent-strong) 55%, transparent)!important; outline-offset:-2px!important; }
/* Triệt tiêu outline thô kệch trên heading / phần tử phi tương tác nhận focus bằng JavaScript (Chi tiết hóa đơn, v.v.) */
body[data-itn-theme] [tabindex="-1"]:focus,
body[data-itn-theme] [tabindex="-1"]:focus-visible,
body[data-itn-theme] #module-content .bh-top h2:focus,
body[data-itn-theme] #module-content .bh-top h2:focus-visible,
body[data-itn-theme] h1:focus,
body[data-itn-theme] h1:focus-visible,
body[data-itn-theme] h2:focus,
body[data-itn-theme] h2:focus-visible,
body[data-itn-theme] h3:focus,
body[data-itn-theme] h3:focus-visible {
  outline: none !important;
  box-shadow: none !important;
  border: none !important;
}

@media (max-width: 768px) {
  /* Ẩn các nút chữ riêng trên mobile để gom vào menu tài khoản, giữ topbar gọn gàng 1 hàng */
  body[data-itn-theme] .backend-account-btn,
  body[data-itn-theme] .backend-logout-btn {
    display: none !important;
  }
  body[data-itn-theme] .header-theme-btn {
    width: 44px !important;
    min-width: 44px !important;
    max-width: 44px !important;
    padding: 0 !important;
  }
  body[data-itn-theme] .header-theme-btn span,
  body[data-itn-theme] .header-theme-btn strong {
    display: none !important;
  }
  body[data-itn-theme] .user-profile-badge {
    width: 44px !important;
    min-width: 44px !important;
    max-width: 44px !important;
    padding: 0 !important;
  }
  body[data-itn-theme].backend-dashboard-shell #app-header,
  .backend-dashboard-shell #app-header {
    flex-wrap: nowrap !important;
    gap: 6px !important;
    padding: 8px 10px !important;
  }
}

/* Bảng của giao diện chính cũng phải lấy màu chữ từ theme; không để td kế thừa
  màu sáng của nền tối khi panel đã chuyển sang nền sáng. */
body[data-itn-theme] .exec-table,
body.theme-light .exec-table,
body.theme-kiotviet .exec-table { color:var(--text-main)!important; background:var(--bg-card)!important; }
body[data-itn-theme] .exec-table th,
body[data-itn-theme] .exec-table td,
body.theme-light .exec-table th,
body.theme-light .exec-table td,
body.theme-kiotviet .exec-table th,
body.theme-kiotviet .exec-table td { color:var(--text-main)!important; border-color:var(--border-color)!important; }
body[data-itn-theme] .exec-table th,
body.theme-light .exec-table th,
body.theme-kiotviet .exec-table th { background:var(--theme-header)!important; font-weight:700; }
body[data-itn-theme] .exec-table td strong,
body.theme-light .exec-table td strong,
body.theme-kiotviet .exec-table td strong { color:var(--text-main)!important; }

/* Shared surface bridge: modules may use different class names, but theme
  changes must never split the shell, cards, tables and controls. */
body[data-itn-theme] .card,
body[data-itn-theme] .dash-kpi-card,
body[data-itn-theme] .stat-card,
body[data-itn-theme] .kiot-section-card,
body[data-itn-theme] .table-card,
body[data-itn-theme] .inventory-table-card,
body[data-itn-theme] .kiot-toolbar-card { background:var(--bg-card)!important; color:var(--text-main)!important; border-color:var(--border-color)!important; }
body[data-itn-theme] .search-input,
body[data-itn-theme] .select-filter,
body[data-itn-theme] .dash-action-btn { background:var(--bg-input)!important; color:var(--text-main)!important; border-color:var(--border-color)!important; }
/* Nút phụ / nút chính (chuẩn A2 25/09/2026): .dash-action-btn-* cùng chuẩn với .action-btn-*; viền nút phụ --itn-nut-vien ≥3:1 (styles.css). */
body[data-itn-theme] .action-btn-secondary,
body[data-itn-theme] .dash-action-btn-secondary { background:var(--bg-input)!important; color:var(--text-main)!important; border-color:var(--itn-nut-vien, var(--border-color))!important; }
body[data-itn-theme] .action-btn-primary,
body[data-itn-theme] .dash-action-btn-primary { background:var(--theme-accent-strong)!important; color:#fff!important; border-color:var(--theme-accent-strong)!important; }
body[data-itn-theme] .dash-table td,
body[data-itn-theme] .exec-table td { border-bottom-color:var(--border-color)!important; }



/* ==========================================================================
   CỬA SỔ "CÀI ĐẶT" — theme-manager.js openPicker (sửa 13/10/2026)
   Chỉ còn liên kết "Tài khoản & bảo mật" sang trang thật (/?module=account) + chọn giao diện. Khung 11 tab kiểu macOS
   (10 tab giả) cùng CSS riêng của nó (.settings-*, .profile-*, .ios-toggle-*, .device-session-item, .password-strength-*,
   .pane-header, keyframes itnFadeIn / itnScaleUp / itnFadePane) đã bỏ.
   Theo DESIGN.md: bo ≤ 8px, ô bấm ≥ 44px, chỉ dùng token màu theme; điện thoại ≤ 760px là tấm đáy toàn bề ngang như
   "Sắp xếp menu" (.itn-sx trong app-shell.css). Bộ chọn bên trong đặt sau #itn-theme-picker vì ở Kho / Bán hàng luật
   "body[data-itn-theme].backend-dashboard-shell button" (0,2,2) đè nền / viền mọi nút → mất dấu "đang dùng".
   ========================================================================== */
html.itn-cd-mo, html.itn-cd-mo body { overflow:hidden; }
.theme-picker-overlay { position:fixed; z-index:2000000; inset:0; display:grid; place-items:center; padding:16px; background:rgba(8,12,20,.42); }
/* Nền hộp đặc: --bg-card của các bộ Tối là màu trong mờ (vd rgba(28,8,16,.9)) → phủ lên --bg-app để chữ màn dưới không lộ qua. */
#itn-theme-picker .theme-picker-dialog { display:flex; flex-direction:column; width:min(720px,100%); max-height:min(86vh,760px); max-height:min(86dvh,760px); overflow:hidden;
  border:1px solid var(--border-color); border-radius:8px; background-color:var(--bg-app); background-image:linear-gradient(var(--bg-card),var(--bg-card));
  color:var(--text-main); box-shadow:var(--itn-shadow-2, none); }
#itn-theme-picker header { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; padding:16px 12px 12px 20px; border-bottom:1px solid var(--border-color); }
#itn-theme-picker header > div { min-width:0; flex:1; }
#itn-theme-picker h2 { margin:0; font-size:20px; line-height:1.3; }
#itn-theme-picker header p { margin:4px 0 0; color:var(--text-muted); font-size:13px; line-height:1.45; }
#itn-theme-picker [data-theme-close] { display:grid; place-items:center; flex:0 0 44px; width:44px; height:44px; padding:0; border:1px solid var(--border-color); border-radius:8px;
  background:var(--bg-input); color:var(--text-main); font:inherit; font-size:22px; line-height:1; cursor:pointer; }
#itn-theme-picker .theme-picker-body { flex:1 1 auto; min-height:0; overflow:auto; overscroll-behavior:contain; padding:16px 20px 20px; }
#itn-theme-picker .theme-ic { display:inline-grid; place-items:center; flex:none; line-height:1; }
#itn-theme-picker .theme-ten { display:grid; gap:2px; min-width:0; }
#itn-theme-picker .theme-ten strong { font-size:14px; }
#itn-theme-picker .theme-ten small { color:var(--text-muted); font-size:12px; line-height:1.4; }
#itn-theme-picker .theme-account-link { display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:12px; min-height:64px; margin:0 0 20px; padding:12px 16px;
  border:1px solid var(--border-color); border-radius:8px; background:var(--bg-input); color:var(--text-main); text-decoration:none; }
#itn-theme-picker .theme-account-link .theme-ic { color:var(--theme-accent-strong); }
#itn-theme-picker .theme-account-link .theme-ten strong { font-size:15px; }
#itn-theme-picker .theme-section-title { margin:0; font-size:16px; }
#itn-theme-picker .theme-group-title { margin:12px 0 8px; color:var(--text-muted); font-size:13px; font-weight:600; }
#itn-theme-picker .theme-picker-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
#itn-theme-picker .theme-choice, #itn-theme-picker .theme-family { border:1px solid var(--border-color); border-radius:8px; background:var(--bg-input); color:var(--text-main); }
#itn-theme-picker .theme-choice { display:grid; grid-template-columns:36px minmax(0,1fr) 20px; align-items:center; gap:12px; min-height:64px; padding:10px 12px; text-align:left; font:inherit; cursor:pointer; }
#itn-theme-picker .theme-family { display:grid; grid-template-columns:36px minmax(0,1fr); align-items:center; gap:10px 12px; padding:10px 12px; }
#itn-theme-picker :is(.theme-choice, .theme-family) > i { width:36px; height:36px; border-radius:8px; box-shadow:inset 0 0 0 1px var(--border-color); }
#itn-theme-picker .theme-choice > i { background:var(--choice-swatch); }
/* Ô màu của bộ: nửa trái trên = Tối, nửa phải dưới = Sáng (xem trước hai chế độ, không phải trang trí). */
#itn-theme-picker .theme-family > i { background:linear-gradient(135deg,var(--sw-dark) 50%,var(--sw-light) 50%); }
#itn-theme-picker .theme-mode-pills { grid-column:1 / -1; display:grid; grid-template-columns:1fr 1fr; gap:8px; }
#itn-theme-picker .theme-mode-pills button { display:inline-flex; align-items:center; justify-content:center; gap:6px; min-height:44px; padding:0 12px;
  border:1px solid var(--border-color); border-radius:8px; background:var(--bg-card); color:var(--text-main); font:inherit; font-size:14px; font-weight:600; cursor:pointer; }
#itn-theme-picker .theme-choice > .theme-ic { visibility:hidden; }
@media (hover:hover) {
  #itn-theme-picker :is(.theme-choice, .theme-mode-pills button, .theme-account-link):hover { border-color:var(--theme-accent); }
  #itn-theme-picker [data-theme-close]:hover { background:var(--bg-card-hover, var(--bg-input)); }
}
/* Đang dùng: nền nhấn nhạt + viền nhấn + dấu tích — không chỉ dựa vào màu (DESIGN.md). */
#itn-theme-picker :is(.theme-choice, .theme-family, .theme-mode-pills button).is-active { background:var(--theme-accent-soft); border-color:var(--theme-accent-strong); }
#itn-theme-picker .theme-mode-pills button.is-active { box-shadow:inset 0 0 0 1px var(--theme-accent-strong); }
#itn-theme-picker .theme-choice.is-active > .theme-ic { visibility:visible; }
#itn-theme-picker :is(.theme-choice, .theme-mode-pills button) .theme-ic { color:var(--theme-accent-strong); }
#itn-theme-picker :is(button, a):focus-visible { outline:2px solid var(--theme-accent-strong); outline-offset:2px; }
@media (max-width:760px) {
  .theme-picker-overlay { place-items:end stretch; padding:0; }
  #itn-theme-picker .theme-picker-dialog { width:100%; max-height:92vh; max-height:92dvh; border-radius:8px 8px 0 0; border-bottom:0; }
  #itn-theme-picker header { padding:12px 8px 12px 16px; }
  #itn-theme-picker .theme-picker-body { padding:12px 16px calc(16px + env(safe-area-inset-bottom, 0px)); }
  #itn-theme-picker .theme-picker-grid { grid-template-columns:minmax(0,1fr); }
}
@media (prefers-reduced-motion:no-preference) {
  .theme-picker-overlay { animation:itn-cd-nen .2s ease both; }
  #itn-theme-picker .theme-picker-dialog { animation:itn-cd-vao .22s cubic-bezier(.16,1,.3,1) both; }
}
@keyframes itn-cd-nen { from { opacity:0; } }
@keyframes itn-cd-vao { from { opacity:.6; transform:translateY(16px); } }
/* Không thuộc cửa sổ Cài đặt — giữ nguyên từ khối mobile cũ: ẩn dòng phụ sau logo ở khổ ≤ 768px. */
@media (max-width:768px) { .header-brand::after { display:none !important; } }
@media(prefers-reduced-motion:reduce) { body[data-itn-theme],.theme-choice{transition:none!important}.theme-choice:hover{transform:none} }

/* 4 bộ theme mới: font SF Pro, thẻ bo mềm, nút viên nang (áp cho cả chế độ Tối và Sáng) */
html:is([data-itn-theme^="burgundy-royal"],[data-itn-theme^="glacial-cyan"],[data-itn-theme^="desert-titanium"],[data-itn-theme^="pearl-cashmere"]) {
  --font-apple-display:-apple-system,BlinkMacSystemFont,"SF Pro Display","SF Pro","Helvetica Neue",sans-serif;
  --font-apple-text:-apple-system,BlinkMacSystemFont,"SF Pro Text","SF Pro","Helvetica Neue",sans-serif;
  --font-apple-nums:-apple-system,BlinkMacSystemFont,"SF Pro Rounded","SF Pro Display","SF Pro",sans-serif;
}
body:is([data-itn-theme^="burgundy-royal"],[data-itn-theme^="glacial-cyan"],[data-itn-theme^="desert-titanium"],[data-itn-theme^="pearl-cashmere"]) { font-family:var(--font-apple-text)!important; letter-spacing:-0.012em; }
body:is([data-itn-theme^="burgundy-royal"],[data-itn-theme^="glacial-cyan"],[data-itn-theme^="desert-titanium"],[data-itn-theme^="pearl-cashmere"]) :is(h1,h2,h3,.header-brand-title) { font-family:var(--font-apple-display)!important; letter-spacing:-0.025em!important; }
body:is([data-itn-theme^="burgundy-royal"],[data-itn-theme^="glacial-cyan"],[data-itn-theme^="desert-titanium"],[data-itn-theme^="pearl-cashmere"]) :is(.card,.dash-kpi-card,.stat-card,.table-card,.inventory-table-card,.kiot-section-card,.pilot-panel) {
  border-radius:20px!important; border:1px solid var(--border-color)!important;
  box-shadow:inset 0 1px 1px rgba(255,255,255,.12),var(--theme-shadow)!important;
}
body:is([data-itn-theme^="burgundy-royal"],[data-itn-theme^="glacial-cyan"],[data-itn-theme^="desert-titanium"],[data-itn-theme^="pearl-cashmere"]) :is(.dash-action-btn,.action-btn-primary,.action-btn-secondary,.header-branch-pill,.header-theme-btn,.tb-nut,.tkg-nut,.user-profile-badge) {
  border-radius:9999px!important; font-family:var(--font-apple-text)!important;
  transition:transform .15s cubic-bezier(.34,1.56,.64,1),background .2s ease!important;
}
body:is([data-itn-theme^="burgundy-royal"],[data-itn-theme^="glacial-cyan"],[data-itn-theme^="desert-titanium"],[data-itn-theme^="pearl-cashmere"]) :is(.dash-action-btn,.action-btn-primary):active { transform:scale(.96)!important; }
body:is([data-itn-theme^="burgundy-royal"],[data-itn-theme^="glacial-cyan"],[data-itn-theme^="desert-titanium"],[data-itn-theme^="pearl-cashmere"]) :is(.exec-table td,.dash-kpi-val,.stat-val,.kpi-num,[data-so-tien],[data-imei]) {
  font-family:var(--font-apple-nums)!important; font-variant-numeric:tabular-nums lining-nums!important;
}
@media(prefers-reduced-motion:reduce) { body:is([data-itn-theme^="burgundy-royal"],[data-itn-theme^="glacial-cyan"],[data-itn-theme^="desert-titanium"],[data-itn-theme^="pearl-cashmere"]) * { transition:none!important; } }

/* Badge chưa đọc nằm ngoài nét chuông, kể cả 99+ và khi nút có hiệu ứng hover. */
body[data-itn-theme] #tb-nut .tb-dem { top:-7px!important;right:-6px!important; }
