:root{
  --ui-bg:#020617;
  --ui-shell:#0f172a;
  --ui-surface:#111827;
  --ui-surface-2:#1e293b;
  --ui-border:#334155;
  --ui-text:#f1f5f9;
  --ui-muted:#94a3b8;
}
html[data-theme="light"]{
  color-scheme:light;
  --ui-bg:#eaf0f7;
  --ui-shell:#f8fafc;
  --ui-surface:#ffffff;
  --ui-surface-2:#f1f5f9;
  --ui-border:#cbd5e1;
  --ui-text:#0f172a;
  --ui-muted:#64748b;
}
html[data-theme="dark"]{color-scheme:dark}
html[data-theme="light"],html[data-theme="light"] body{background:#eaf0f7!important;color:#0f172a!important}
html[data-theme="light"] .app-shell,
html[data-theme="light"] .admin-shell{background:#f8fafc!important;border-color:#cbd5e1!important;box-shadow:0 24px 70px rgba(15,23,42,.12)!important}
html[data-theme="light"] .glass{background:rgba(255,255,255,.82)!important;border-color:rgba(100,116,139,.20)!important;box-shadow:0 8px 28px rgba(15,23,42,.05)}
html[data-theme="light"] [class~="bg-slate-950"]{background-color:#f8fafc!important}
html[data-theme="light"] [class~="bg-slate-900"]{background-color:#fff!important}
html[data-theme="light"] [class~="bg-slate-800"],
html[data-theme="light"] [class~="bg-slate-800/80"],
html[data-theme="light"] [class~="bg-slate-800/70"],
html[data-theme="light"] [class~="bg-slate-800/50"]{background-color:#f1f5f9!important}
html[data-theme="light"] [class~="bg-slate-700"]{background-color:#e2e8f0!important}
html[data-theme="light"] [class~="border-slate-800"],
html[data-theme="light"] [class~="border-slate-700"],
html[data-theme="light"] [class~="border-slate-600"]{border-color:#cbd5e1!important}
html[data-theme="light"] [class~="text-slate-100"],
html[data-theme="light"] [class~="text-slate-200"],
html[data-theme="light"] [class~="text-slate-300"]{color:#0f172a!important}
html[data-theme="light"] [class~="text-slate-400"]{color:#475569!important}
html[data-theme="light"] [class~="text-slate-500"]{color:#64748b!important}
html[data-theme="light"] [class~="text-slate-600"]{color:#64748b!important}
html[data-theme="light"] input,
html[data-theme="light"] select,
html[data-theme="light"] textarea{color:#0f172a!important;background-color:#fff!important;border-color:#cbd5e1!important}
html[data-theme="light"] input::placeholder,
html[data-theme="light"] textarea::placeholder{color:#94a3b8!important}
html[data-theme="light"] .dashboard-profile-title,
html[data-theme="light"] .dashboard-management-title{color:#0f172a!important}
html[data-theme="light"] .dashboard-profile-subtitle{color:#64748b!important}
html[data-theme="light"] .dashboard-period-switch{background:#eef2ff!important;border-color:#c7d2fe!important;box-shadow:none!important}
html[data-theme="light"] .dashboard-period-switch>a,
html[data-theme="light"] .dashboard-period-switch>details>summary{color:#64748b!important}
html[data-theme="light"] .dashboard-period-switch>a:hover,
html[data-theme="light"] .dashboard-period-switch>details>summary:hover{color:#0f172a!important}
html[data-theme="light"] .dashboard-custom-range-panel{background:#fff!important;border-color:#cbd5e1!important;box-shadow:0 20px 50px rgba(15,23,42,.16)!important}
html[data-theme="light"] .dashboard-custom-range-panel label{color:#64748b!important}
html[data-theme="light"] .dashboard-custom-range-panel input{background:#f8fafc!important;color:#0f172a!important;border-color:#cbd5e1!important}
html[data-theme="light"] .dashboard-logout{background:#f1f5f9!important;color:#334155!important;border-color:#cbd5e1!important}
html[data-theme="light"] .dashboard-logout:hover{background:#e2e8f0!important;color:#0f172a!important}
html[data-theme="light"] .dashboard-main>nav button{background:rgba(255,255,255,.9)!important;border-color:#dbe3ee!important}
html[data-theme="light"] .dashboard-main>nav button:hover{background:#fff!important;border-color:#c4b5fd!important}
html[data-theme="light"] .dashboard-main>nav button>span:last-child{color:#334155!important}
html[data-theme="light"] .dashboard-recent{background:rgba(255,255,255,.82)!important;border-color:rgba(100,116,139,.2)!important}
html[data-theme="light"] .recent-item{border-color:#e2e8f0!important}
html[data-theme="light"] .screen-header{background:rgba(255,255,255,.9)!important}
html[data-theme="light"] .suggest-box{background:#fff!important;border-color:#cbd5e1!important;box-shadow:0 16px 40px rgba(15,23,42,.14)!important}
html[data-theme="light"] .suggest-item{color:#334155!important}
html[data-theme="light"] .suggest-item:hover,
html[data-theme="light"] .suggest-item.active{background:#eef2ff!important;color:#312e81!important}
html[data-theme="light"] .admin-nav>a:not(.tab-active):hover{background:#e2e8f0!important;color:#0f172a!important}
html[data-theme="light"] .admin-login-card{background:#fff!important;border-color:#cbd5e1!important;box-shadow:0 24px 70px rgba(15,23,42,.14)!important}
html[data-theme="light"] .scrollbar::-webkit-scrollbar-thumb{background:#cbd5e1!important}

.app-tool-button{
  appearance:none;border:1px solid rgba(148,163,184,.16);background:#1e293b;color:#cbd5e1;
  min-height:34px;border-radius:999px;padding:0 .7rem;display:inline-flex;align-items:center;justify-content:center;
  gap:.42rem;font-size:.7rem;font-weight:800;line-height:1;cursor:pointer;white-space:nowrap;transition:.16s ease;
}
.app-tool-button:hover{background:#263449;color:#fff;border-color:rgba(148,163,184,.28)}
.app-tool-button.icon-only{width:34px;padding:0}
.app-tool-button .install-full{display:none}
html[data-theme="light"] .app-tool-button{background:#f1f5f9;color:#334155;border-color:#cbd5e1}
html[data-theme="light"] .app-tool-button:hover{background:#e2e8f0;color:#0f172a}
@media(min-width:1440px){.app-tool-button .install-full{display:inline}.app-tool-button .install-short{display:none}}
.public-app-tools{position:fixed;right:max(1rem,env(safe-area-inset-right));top:max(1rem,env(safe-area-inset-top));z-index:1200;display:flex;gap:.5rem;align-items:center}
.app-install-help{position:fixed;inset:0;z-index:3000;display:none;align-items:center;justify-content:center;padding:1rem;background:rgba(2,6,23,.72);backdrop-filter:blur(5px);-webkit-backdrop-filter:blur(5px)}
.app-install-help.open{display:flex}
.app-install-help-card{width:min(430px,100%);border-radius:1.4rem;background:#0f172a;border:1px solid #334155;padding:1.25rem;color:#f1f5f9;box-shadow:0 30px 90px rgba(0,0,0,.45)}
.app-install-help-card h3{margin:0;font-size:1.05rem;font-weight:900}.app-install-help-card p{margin:.7rem 0 0;color:#cbd5e1;font-size:.82rem;line-height:1.55}
.app-install-help-card button{margin-top:1rem;width:100%;border:0;border-radius:.85rem;background:#7c3aed;color:#fff;padding:.75rem;font-weight:800;cursor:pointer}
html[data-theme="light"] .app-install-help{background:rgba(15,23,42,.34)}
html[data-theme="light"] .app-install-help-card{background:#fff;border-color:#cbd5e1;color:#0f172a;box-shadow:0 30px 90px rgba(15,23,42,.22)}
html[data-theme="light"] .app-install-help-card p{color:#475569}
@media(max-width:639px){.public-app-tools{top:.75rem;right:.75rem}.app-tool-button{min-height:32px;padding:0 .58rem}.app-tool-button.icon-only{width:32px}}

.app-tools-host{flex-wrap:wrap}
@media(max-width:639px){.app-tools-host{justify-content:flex-end}}
html[data-theme="light"] [class*="bg-gradient-to-"]{color:#fff}

/* V18 - Tang do tuong phan cho che do sang tren toan bo ung dung. */
html[data-theme="light"] [class~="text-slate-100"],
html[data-theme="light"] [class~="text-slate-200"],
html[data-theme="light"] [class~="text-slate-300"]{color:#0f172a!important}
html[data-theme="light"] [class~="text-slate-400"]{color:#334155!important}
html[data-theme="light"] [class~="text-slate-500"]{color:#475569!important}
html[data-theme="light"] [class~="text-slate-600"]{color:#334155!important}

html[data-theme="light"] [class~="text-emerald-100"],
html[data-theme="light"] [class~="text-emerald-100/90"],
html[data-theme="light"] [class~="text-emerald-200"],
html[data-theme="light"] [class~="text-emerald-300"],
html[data-theme="light"] [class~="text-emerald-400"]{color:#047857!important}
html[data-theme="light"] [class~="text-rose-100"],
html[data-theme="light"] [class~="text-rose-200"],
html[data-theme="light"] [class~="text-rose-300"],
html[data-theme="light"] [class~="text-rose-400"]{color:#be123c!important}
html[data-theme="light"] [class~="text-amber-100"],
html[data-theme="light"] [class~="text-amber-200"],
html[data-theme="light"] [class~="text-amber-200/70"],
html[data-theme="light"] [class~="text-amber-300"],
html[data-theme="light"] [class~="text-amber-400"]{color:#92400e!important}
html[data-theme="light"] [class~="text-sky-100"],
html[data-theme="light"] [class~="text-sky-200/70"],
html[data-theme="light"] [class~="text-sky-300"],
html[data-theme="light"] [class~="text-sky-400"]{color:#0369a1!important}
html[data-theme="light"] [class~="text-indigo-200"],
html[data-theme="light"] [class~="text-indigo-300"],
html[data-theme="light"] [class~="text-indigo-400"]{color:#4338ca!important}
html[data-theme="light"] [class~="text-fuchsia-100"],
html[data-theme="light"] [class~="text-fuchsia-300"],
html[data-theme="light"] [class~="text-fuchsia-400"]{color:#a21caf!important}
html[data-theme="light"] [class~="text-purple-100"],
html[data-theme="light"] [class~="text-purple-100/90"]{color:#6d28d9!important}

html[data-theme="light"] [class~="bg-emerald-500/10"],
html[data-theme="light"] [class~="bg-emerald-500/15"]{background-color:#ecfdf5!important}
html[data-theme="light"] [class~="bg-rose-500/10"],
html[data-theme="light"] [class~="bg-rose-500/15"]{background-color:#fff1f2!important}
html[data-theme="light"] [class~="bg-amber-500/10"],
html[data-theme="light"] [class~="bg-amber-500/15"],
html[data-theme="light"] [class~="bg-amber-500/5"]{background-color:#fffbeb!important}
html[data-theme="light"] [class~="bg-sky-500/10"],
html[data-theme="light"] [class~="bg-sky-500/15"]{background-color:#f0f9ff!important}
html[data-theme="light"] [class~="bg-indigo-500/10"],
html[data-theme="light"] [class~="bg-indigo-500/15"]{background-color:#eef2ff!important}
html[data-theme="light"] [class~="bg-fuchsia-500/10"],
html[data-theme="light"] [class~="bg-fuchsia-500/15"]{background-color:#fdf4ff!important}

html[data-theme="light"] .dashboard-license-pill{color:#4338ca!important;background:#eef2ff!important;border-color:#c7d2fe!important}
html[data-theme="light"] .dashboard-license-pill.is-unlimited{color:#047857!important;background:#ecfdf5!important;border-color:#a7f3d0!important}
html[data-theme="light"] .dashboard-period-switch>a,
html[data-theme="light"] .dashboard-period-switch>details>summary{color:#334155!important}
html[data-theme="light"] .dashboard-period-switch .is-active{color:#fff!important}
html[data-theme="light"] body:not(.view-dashboard) .subpage-userbar>span:first-child{color:#334155!important}
html[data-theme="light"] .screen-header h2{color:#0f172a!important}
html[data-theme="light"] .screen-header>a:first-child{color:#6d28d9!important;background:#f5f3ff!important;border-color:#ddd6fe!important}
html[data-theme="light"] [class~="hover:text-white"]:hover{color:#0f172a!important}

/* Van giu chu sang ben trong cac khoi nen dam/gradient. */
html[data-theme="light"] .metric-pop,
html[data-theme="light"] .metric-pop [class~="text-purple-100"],
html[data-theme="light"] .metric-pop [class~="text-purple-100/90"]{color:#f5f3ff!important}
html[data-theme="light"] .metric-pop [class~="text-rose-100"],
html[data-theme="light"] .metric-pop [class~="text-rose-200"]{color:#ffe4e6!important}
html[data-theme="light"] .metric-pop [class~="text-emerald-200"]{color:#d1fae5!important}

html[data-theme="light"] .admin-nav>a:not(.tab-active){color:#334155!important;background:#fff!important}
html[data-theme="light"] .admin-nav>a:not(.tab-active):hover{color:#0f172a!important;background:#e2e8f0!important}
html[data-theme="light"] .admin-header [class~="bg-slate-800"]{background:#f1f5f9!important}
html[data-theme="light"] .admin-header [class~="bg-slate-800"]:hover{background:#e2e8f0!important}
.app-theme-svg{width:15px;height:15px;display:inline-grid;place-items:center;flex:none}
.app-theme-svg svg{width:15px;height:15px;display:block}

/* V19 - Form mat khau, dang ky va tang do tuong phan che do sang. */
.password-input-wrap{position:relative}
.password-visibility-toggle{position:absolute;right:.45rem;top:50%;transform:translateY(-50%);width:34px;height:34px;border:0;border-radius:.7rem;background:transparent;color:#94a3b8;display:grid;place-items:center;cursor:pointer;transition:.15s ease}
.password-visibility-toggle:hover{background:rgba(148,163,184,.12);color:#f8fafc}
.password-eye-svg{width:18px;height:18px;display:block}
.registration-honeypot{position:absolute!important;left:-9999px!important;width:1px!important;height:1px!important;overflow:hidden!important;opacity:0!important;pointer-events:none!important}

html[data-theme="light"] .password-visibility-toggle{color:#334155}
html[data-theme="light"] .password-visibility-toggle:hover{background:#e2e8f0;color:#0f172a}
html[data-theme="light"] .registration-math-question{background:#f1f5f9!important;border-color:#cbd5e1!important;color:#0f172a!important}

/* Mau chu phu du dam de doc tren nen sang, ke ca cac bien the co opacity. */
html[data-theme="light"] [class~="text-slate-400"]{color:#1e293b!important}
html[data-theme="light"] [class~="text-slate-500"]{color:#334155!important}
html[data-theme="light"] [class~="text-slate-600"]{color:#475569!important}
html[data-theme="light"] [class~="text-emerald-300/70"]{color:#047857!important}
html[data-theme="light"] [class~="text-sky-300/70"]{color:#0369a1!important}
html[data-theme="light"] [class~="text-amber-200/70"]{color:#92400e!important}
html[data-theme="light"] [class~="text-sky-200/70"]{color:#0369a1!important}
html[data-theme="light"] input::placeholder,
html[data-theme="light"] textarea::placeholder{color:#64748b!important;opacity:1!important}
html[data-theme="light"] input:disabled,
html[data-theme="light"] select:disabled,
html[data-theme="light"] textarea:disabled{color:#475569!important;background:#e2e8f0!important;opacity:1!important}
html[data-theme="light"] label{color:#1e293b}
html[data-theme="light"] .glass p:not([class*="text-"]){color:#1e293b}
html[data-theme="light"] .glass h1,
html[data-theme="light"] .glass h2,
html[data-theme="light"] .glass h3,
html[data-theme="light"] .glass h4{color:#0f172a}
html[data-theme="light"] table{color:#0f172a}
html[data-theme="light"] thead{color:#334155}
html[data-theme="light"] tbody{color:#0f172a}
html[data-theme="light"] .divide-slate-800> :not([hidden])~ :not([hidden]){border-color:#e2e8f0!important}
html[data-theme="light"] [class~="border-slate-800"]{border-color:#cbd5e1!important}
html[data-theme="light"] [class~="bg-slate-900/60"],
html[data-theme="light"] [class~="bg-slate-900/70"],
html[data-theme="light"] [class~="bg-slate-900/80"]{background-color:rgba(255,255,255,.92)!important}

/* Khong ghi de mau chu trong cac nut va khoi nen co mau manh. */
html[data-theme="light"] button[class*="bg-indigo-"],
html[data-theme="light"] button[class*="bg-purple-"],
html[data-theme="light"] button[class*="bg-emerald-6"],
html[data-theme="light"] button[class*="bg-rose-6"],
html[data-theme="light"] a[class*="bg-indigo-"],
html[data-theme="light"] .tab-active{color:#fff!important}
html[data-theme="light"] button[class*="bg-amber-500"]{color:#0f172a!important}
html[data-theme="light"] [class~="bg-slate-800/60"]{background-color:#f1f5f9!important}
html[data-theme="light"] [class~="bg-slate-950/35"],
html[data-theme="light"] [class~="bg-slate-950/45"]{background-color:#f1f5f9!important}
html[data-theme="light"] [class~="bg-slate-900/50"]{background-color:rgba(255,255,255,.88)!important}
html[data-theme="light"] [class~="border-slate-700/70"],
html[data-theme="light"] [class~="border-slate-800/80"]{border-color:#cbd5e1!important}

/* V20 - Can lai o mat khau va dam bao nut xem mat khau luon hien. */
.password-input-wrap{position:relative!important;display:block!important}
.password-input-wrap .password-field{padding-left:1rem!important;padding-right:3.25rem!important;box-sizing:border-box!important}
.password-visibility-toggle{right:.5rem!important;z-index:3!important;color:#94a3b8!important;opacity:1!important;visibility:visible!important}
.password-visibility-toggle .js-password-eye{display:grid!important;place-items:center!important;width:20px!important;height:20px!important}
.password-eye-svg{width:19px!important;height:19px!important;display:block!important}
html[data-theme="light"] .password-visibility-toggle{color:#475569!important}
html[data-theme="dark"] .password-visibility-toggle{color:#cbd5e1!important}

/* V21 - Nen sang dong bo cho cac nhom, danh sach va the con. */
html[data-theme="light"] details.period-group{
  background:#f8fafc!important;
  border-color:#cbd5e1!important;
  box-shadow:0 1px 2px rgba(15,23,42,.035)!important;
}
html[data-theme="light"] details.period-group>summary{
  background:#f8fafc!important;
  color:#0f172a!important;
}
html[data-theme="light"] details.period-group details.period-group{
  background:#ffffff!important;
  border-color:#dbe3ee!important;
}
html[data-theme="light"] details.period-group details.period-group>summary{
  background:#f1f5f9!important;
  color:#0f172a!important;
  border-bottom-color:#e2e8f0!important;
}
html[data-theme="light"] details.period-group[open]>summary{
  border-bottom:1px solid #e2e8f0!important;
}
html[data-theme="light"] .view-transactions details.period-group .period-chevron{color:#64748b!important}
html[data-theme="light"] .view-transactions details.period-group>div,
html[data-theme="light"] .view-transactions details.period-group details.period-group>div{background:transparent!important}

/* Bao phu cac bien the nen slate cu de khong con mang toi khi light theme. */
html[data-theme="light"] body [class~="bg-slate-950/35"],
html[data-theme="light"] body [class~="bg-slate-950/45"]{background-color:#f8fafc!important}
html[data-theme="light"] body [class~="bg-slate-900/50"],
html[data-theme="light"] body [class~="bg-slate-900/60"],
html[data-theme="light"] body [class~="bg-slate-900/70"],
html[data-theme="light"] body [class~="bg-slate-900/80"]{background-color:#ffffff!important}
html[data-theme="light"] body [class~="bg-slate-800/60"],
html[data-theme="light"] body [class~="bg-slate-800/70"],
html[data-theme="light"] body [class~="bg-slate-800/80"]{background-color:#f1f5f9!important}

/* V24 - Light theme audit: tat ca text, form, bang va nut mau dam phai ro tren nen sang. */
html[data-theme="light"] body{color:#0f172a!important}
html[data-theme="light"] main,
html[data-theme="light"] section,
html[data-theme="light"] article,
html[data-theme="light"] details,
html[data-theme="light"] summary{border-color:#d7e0ea}

/* Surface variants con sot lai tu giao dien toi. */
html[data-theme="light"] body [class~="bg-slate-950"]{background:#f8fafc!important}
html[data-theme="light"] body [class~="bg-slate-900"]{background:#ffffff!important}
html[data-theme="light"] body [class~="bg-slate-800"]{background:#f1f5f9!important}
html[data-theme="light"] body [class~="bg-slate-700"]{background:#e2e8f0!important}
html[data-theme="light"] body [class~="border-slate-600"],
html[data-theme="light"] body [class~="border-slate-700"],
html[data-theme="light"] body [class~="border-slate-800"]{border-color:#cbd5e1!important}

/* Text slate: khong de chu phu bi bac mau tren man hinh sang. */
html[data-theme="light"] body [class~="text-slate-100"],
html[data-theme="light"] body [class~="text-slate-200"],
html[data-theme="light"] body [class~="text-slate-300"]{color:#0f172a!important}
html[data-theme="light"] body [class~="text-slate-400"]{color:#334155!important}
html[data-theme="light"] body [class~="text-slate-500"]{color:#475569!important}
html[data-theme="light"] body [class~="text-slate-600"]{color:#475569!important}
html[data-theme="light"] body [class~="text-slate-900"],
html[data-theme="light"] body [class~="text-slate-950"]{color:#0f172a!important}

/* Form controls and browser-native date/select/file text. */
html[data-theme="light"] input,
html[data-theme="light"] select,
html[data-theme="light"] textarea{
  color:#0f172a!important;background:#fff!important;border-color:#b8c5d4!important;
  caret-color:#4f46e5!important;
}
html[data-theme="light"] input::placeholder,
html[data-theme="light"] textarea::placeholder{color:#64748b!important;opacity:1!important}
html[data-theme="light"] input[type="date"],
html[data-theme="light"] input[type="time"],
html[data-theme="light"] input[type="datetime-local"],
html[data-theme="light"] select{color-scheme:light!important}
html[data-theme="light"] input[type="file"]::file-selector-button{
  color:#1e293b;background:#e2e8f0;border:0;border-radius:.6rem;padding:.45rem .65rem;margin-right:.55rem;font-weight:700;
}
html[data-theme="light"] input[type="checkbox"],
html[data-theme="light"] input[type="radio"]{accent-color:#4f46e5}

/* Filled action buttons: giu contrast cao thay vi ke thua chu toi cua light mode. */
html[data-theme="light"] :is(button,a)[class~="bg-indigo-600"],
html[data-theme="light"] :is(button,a)[class~="bg-purple-600"],
html[data-theme="light"] :is(button,a)[class~="bg-fuchsia-600"],
html[data-theme="light"] :is(button,a)[class~="bg-emerald-600"],
html[data-theme="light"] :is(button,a)[class~="bg-sky-600"],
html[data-theme="light"] :is(button,a)[class~="bg-rose-600"],
html[data-theme="light"] :is(button,a)[class~="bg-rose-500"],
html[data-theme="light"] :is(button,a)[class~="bg-emerald-500"]{color:#fff!important}
html[data-theme="light"] :is(button,a)[class~="bg-amber-600"]{color:#fff!important}
html[data-theme="light"] :is(button,a)[class~="bg-amber-500"]{color:#0f172a!important}

/* Preserve light text inside strong gradients/cards. */
html[data-theme="light"] [class*="bg-gradient-to-"]{color:#fff!important}
html[data-theme="light"] [class*="bg-gradient-to-"] [class~="text-purple-100"],
html[data-theme="light"] [class*="bg-gradient-to-"] [class~="text-purple-100/90"],
html[data-theme="light"] [class*="bg-gradient-to-"] [class~="text-emerald-100"],
html[data-theme="light"] [class*="bg-gradient-to-"] [class~="text-emerald-100/90"]{color:#f8fafc!important}
html[data-theme="light"] [class*="bg-gradient-to-"] [class~="text-rose-100"]{color:#ffe4e6!important}
html[data-theme="light"] [class*="bg-gradient-to-"] [class~="text-emerald-200"]{color:#d1fae5!important}
html[data-theme="light"] [class*="bg-gradient-to-"] [class~="text-white/90"],
html[data-theme="light"] [class*="bg-gradient-to-"] [class~="text-white"]{color:#fff!important}

/* Tables/list groups and empty states. */
html[data-theme="light"] table{color:#0f172a!important}
html[data-theme="light"] thead{color:#334155!important;background:rgba(241,245,249,.72)}
html[data-theme="light"] tbody tr{border-color:#e2e8f0!important}
html[data-theme="light"] .divide-y> :not([hidden])~ :not([hidden]){border-color:#e2e8f0!important}
html[data-theme="light"] .recent-item,
html[data-theme="light"] details.period-group,
html[data-theme="light"] .suggest-box{color:#0f172a!important}

/* Modal/card text and overlays: overlay stays dark, card itself is light. */
html[data-theme="light"] .modal form,
html[data-theme="light"] .admin-login-card{background:#fff!important;color:#0f172a!important;border-color:#cbd5e1!important}
html[data-theme="light"] .modal [class~="text-slate-400"]{color:#334155!important}
html[data-theme="light"] .modal [class~="text-slate-500"]{color:#475569!important}

/* Theme button shows the TARGET theme icon, not the current theme icon. */
.app-theme-svg{color:currentColor}
.js-theme-toggle[data-theme-target="dark"] .app-theme-svg{color:#334155}
html[data-theme="dark"] .js-theme-toggle[data-theme-target="light"] .app-theme-svg{color:#f8fafc}

/* V27 - Thu gon bo loc thoi gian Dashboard tren mobile. */
@media (max-width:639px){
  .view-dashboard .dashboard-date-card{
    padding:.72rem .75rem!important;
    border-radius:.95rem!important;
  }
  .view-dashboard .dashboard-date-card>div:first-child{
    flex-wrap:nowrap!important;
    align-items:center!important;
    gap:.45rem!important;
  }
  .view-dashboard .dashboard-date-card>div:first-child>div:first-child{
    flex:0 0 auto;
  }
  .view-dashboard .dashboard-date-card>div:first-child>div:first-child>p:first-child{
    font-size:9px!important;
    letter-spacing:.055em!important;
    line-height:1.1!important;
    white-space:nowrap;
  }
  .view-dashboard .dashboard-date-card>div:first-child>div:first-child>p:last-child{
    display:none!important;
  }
  .view-dashboard .dashboard-date-card>div:first-child>div:last-child{
    flex:1 1 auto;
    min-width:0;
    justify-content:flex-end;
    gap:.3rem!important;
    overflow:visible!important;
    padding-bottom:0!important;
  }
  .view-dashboard .dashboard-date-card .filter-chip{
    padding:.38rem .58rem!important;
    font-size:10px!important;
    line-height:1!important;
  }
  .view-dashboard .dashboard-date-card form{
    margin-top:.55rem!important;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
    gap:.45rem!important;
  }
  .view-dashboard .dashboard-date-card form label{
    font-size:9px!important;
    line-height:1.15!important;
  }
  .view-dashboard .dashboard-date-card form input[type="date"]{
    margin-top:.25rem!important;
    min-height:40px!important;
    padding:.48rem .55rem!important;
    border-radius:.72rem!important;
    font-size:14px!important;
  }
  .view-dashboard .dashboard-date-card form button{
    grid-column:1/-1!important;
    min-height:38px!important;
    padding:.5rem .8rem!important;
    border-radius:.72rem!important;
    font-size:11px!important;
  }
}


/* V29 - Nhap bang giong noi cho cac truong van ban/so dien thoai/so tien. */
.voice-input-wrap{
  position:relative;
  display:block;
  width:100%;
  min-width:0;
  flex:1 1 auto;
}
.voice-input-wrap>.voice-input-enabled{
  width:100%;
  padding-right:2.85rem!important;
}
.voice-input-button{
  position:absolute;
  z-index:4;
  right:.48rem;
  top:50%;
  transform:translateY(-50%);
  width:2rem;
  height:2rem;
  display:grid;
  place-items:center;
  border:0;
  border-radius:.65rem;
  background:transparent;
  color:#94a3b8;
  cursor:pointer;
  transition:background-color .15s ease,color .15s ease,transform .15s ease,box-shadow .15s ease;
  touch-action:manipulation;
}
.voice-input-button svg{width:1.05rem;height:1.05rem;display:block}
.voice-input-button:hover{background:rgba(99,102,241,.14);color:#c7d2fe}
.voice-input-button:focus-visible{outline:2px solid #818cf8;outline-offset:1px}
.voice-input-button.is-listening{
  color:#fecdd3;
  background:rgba(244,63,94,.16);
  box-shadow:0 0 0 3px rgba(244,63,94,.1);
  animation:voiceMicPulse 1.15s ease-in-out infinite;
}
@keyframes voiceMicPulse{0%,100%{transform:translateY(-50%) scale(1)}50%{transform:translateY(-50%) scale(1.08)}}
.voice-input-toast{
  position:fixed;
  z-index:10050;
  left:50%;
  bottom:max(1rem,env(safe-area-inset-bottom));
  transform:translate(-50%,1rem);
  max-width:min(92vw,28rem);
  padding:.72rem .9rem;
  border:1px solid rgba(148,163,184,.28);
  border-radius:.85rem;
  background:rgba(15,23,42,.96);
  color:#f8fafc;
  box-shadow:0 18px 48px rgba(0,0,0,.32);
  font-size:.8rem;
  font-weight:700;
  line-height:1.35;
  opacity:0;
  pointer-events:none;
  transition:opacity .18s ease,transform .18s ease;
}
.voice-input-toast.show{opacity:1;transform:translate(-50%,0)}
html[data-theme="light"] .voice-input-button{color:#64748b}
html[data-theme="light"] .voice-input-button:hover{background:#eef2ff;color:#4338ca}
html[data-theme="light"] .voice-input-button.is-listening{background:#fff1f2;color:#be123c;box-shadow:0 0 0 3px rgba(225,29,72,.08)}
html[data-theme="light"] .voice-input-toast{background:#fff;color:#0f172a;border-color:#cbd5e1;box-shadow:0 18px 48px rgba(15,23,42,.18)}
@media (max-width:639px){
  .voice-input-button{right:.4rem;width:1.9rem;height:1.9rem}
  .voice-input-wrap>.voice-input-enabled{padding-right:2.65rem!important}
}
@media (prefers-reduced-motion:reduce){.voice-input-button.is-listening{animation:none}}

/* V30 - Ho so nguoi dung / email. */
.mobile-profile-menu{position:relative;z-index:180;min-width:0}
.mobile-profile-menu>summary{list-style:none}
.mobile-profile-menu>summary::-webkit-details-marker{display:none}
.mobile-profile-trigger{display:flex;align-items:center;gap:.45rem;min-width:0;max-width:min(58vw,18rem);cursor:pointer;color:#cbd5e1;font-weight:800}
.mobile-profile-avatar{width:2rem;height:2rem;border-radius:999px;display:grid;place-items:center;flex:0 0 auto;background:linear-gradient(135deg,#8b5cf6,#6d28d9);color:#fff;box-shadow:0 7px 20px rgba(124,58,237,.2)}
.mobile-profile-panel{position:absolute;left:0;top:calc(100% + .55rem);z-index:220;width:min(20rem,calc(100vw - 2rem));padding:.72rem;border-radius:1rem;background:#111827;border:1px solid #334155;box-shadow:0 22px 60px rgba(0,0,0,.5);text-align:left;color:#e2e8f0}
.mobile-profile-panel .profile-info-card,.dashboard-profile-panel .profile-info-card{padding:.75rem;border-radius:.8rem;background:#0f172a;border:1px solid rgba(148,163,184,.14)}
.mobile-profile-panel .profile-kicker,.dashboard-profile-panel .profile-kicker{font-size:.58rem;font-weight:900;letter-spacing:.14em;color:#64748b}
.mobile-profile-panel .profile-action-details,.dashboard-profile-panel .profile-action-details{margin-top:.55rem;border:1px solid rgba(148,163,184,.14);border-radius:.8rem;background:#0f172a;overflow:hidden}
.mobile-profile-panel .profile-action-details>summary,.dashboard-profile-panel .profile-action-details>summary{list-style:none;cursor:pointer;padding:.7rem .8rem;font-size:.74rem;font-weight:800;color:#cbd5e1}
.mobile-profile-panel .profile-action-details>summary::-webkit-details-marker,.dashboard-profile-panel .profile-action-details>summary::-webkit-details-marker{display:none}
.mobile-profile-panel .profile-action-details>form,.dashboard-profile-panel .profile-action-details>form{padding:0 .65rem .65rem}
.mobile-profile-panel .profile-logout-link,.dashboard-profile-panel .profile-logout-link{display:block;margin-top:.55rem;border-radius:.8rem;padding:.72rem .8rem;background:rgba(244,63,94,.09);color:#fda4af;font-size:.74rem;font-weight:800}
html[data-theme="light"] .mobile-profile-trigger{color:#334155}
html[data-theme="light"] .mobile-profile-panel,html[data-theme="light"] .dashboard-profile-panel{background:#fff!important;border-color:#cbd5e1!important;box-shadow:0 20px 50px rgba(15,23,42,.16)!important;color:#0f172a!important}
html[data-theme="light"] .mobile-profile-panel .profile-info-card,html[data-theme="light"] .dashboard-profile-panel .profile-info-card,html[data-theme="light"] .mobile-profile-panel .profile-action-details,html[data-theme="light"] .dashboard-profile-panel .profile-action-details{background:#f8fafc!important;border-color:#dbe3ee!important}
html[data-theme="light"] .mobile-profile-panel .profile-action-details>summary,html[data-theme="light"] .dashboard-profile-panel .profile-action-details>summary{color:#1e293b!important}
html[data-theme="light"] .mobile-profile-panel .profile-info-card .text-slate-100,html[data-theme="light"] .dashboard-profile-panel .profile-info-card .text-slate-100{color:#0f172a!important}
html[data-theme="light"] .mobile-profile-panel input,html[data-theme="light"] .dashboard-profile-panel input{background:#fff!important;border-color:#cbd5e1!important;color:#0f172a!important}
html[data-theme="light"] .mobile-profile-panel input::placeholder,html[data-theme="light"] .dashboard-profile-panel input::placeholder{color:#64748b!important;opacity:1}
html[data-theme="light"] .mobile-profile-panel .profile-logout-link,html[data-theme="light"] .dashboard-profile-panel .profile-logout-link{background:#fff1f2!important;color:#be123c!important}
@media (min-width:1440px){.view-dashboard .mobile-profile-menu{display:none}}

/* V31 - Do tuong phan trang Ban quyen & DCC va huy hieu DCC o che do sang. */
.subpage-license-pill{color:#c7d2fe}
html[data-theme="light"] .subpage-license-pill{color:#3730a3!important;background:#eef2ff!important;border-color:#c7d2fe!important}
html[data-theme="light"] .billing-overview-grid .glass,
html[data-theme="light"] .billing-history-grid .glass,
html[data-theme="light"] .billing-plan-grid .glass{color:#0f172a}
html[data-theme="light"] .billing-overview-grid [class~="bg-slate-800/80"],
html[data-theme="light"] .billing-overview-grid [class~="bg-slate-800/70"],
html[data-theme="light"] .billing-history-grid [class~="bg-slate-800/70"]{color:#0f172a}
