/* DS3 modern look: one set of colours, type, radius and depth for every module (light mode; .ops-dark keeps its own). */
:root{
 --ds-brand:#662d91;--ds-brand-2:#8a4cc4;--ds-brand-soft:#f3ecfa;--ds-ink:#14213a;--ds-ink-2:#475569;--ds-muted:#7b8798;
 --ds-bg:#f4f6fb;--ds-card:#ffffff;--ds-line:#e6e9f1;--ds-line-2:#eef1f6;--ds-ok:#16a34a;--ds-warn:#d97706;--ds-bad:#dc2626;
 --ds-r:14px;--ds-r-sm:10px;--ds-shadow:0 1px 2px rgba(16,24,40,.05),0 8px 24px -14px rgba(16,24,40,.18);--ds-shadow-hi:0 2px 4px rgba(16,24,40,.06),0 16px 32px -16px rgba(16,24,40,.28);
 --ds-font:"Segoe UI Variable Text","Segoe UI",system-ui,-apple-system,Roboto,"Helvetica Neue",Arial,sans-serif;
}
body.ops-shell:not(.ops-dark){background:var(--ds-bg)!important;color:var(--ds-ink);font-family:var(--ds-font)!important;-webkit-font-smoothing:antialiased}
body.ops-shell:not(.ops-dark) button,body.ops-shell:not(.ops-dark) input,body.ops-shell:not(.ops-dark) select,body.ops-shell:not(.ops-dark) textarea{font-family:var(--ds-font)}

/* Sidebar: keep navigation compact and prevent full-width buttons plus margins from overflowing. */
@media screen and (min-width:761px){
 body.ops-shell .ops-side{padding:12px 12px 10px;overflow:hidden}
 body.ops-shell .ops-brand{flex:0 0 auto;padding:0 8px 8px;margin-bottom:6px}
 body.ops-shell .ops-brand .ds3-logo-frame{width:140px;height:64px}
 body.ops-shell .ops-brand small{margin-top:4px;line-height:1.4}
 body.ops-shell .ops-side>nav{flex:1 1 auto;min-height:0;min-width:0;display:grid;grid-template-columns:minmax(0,1fr);align-content:start;gap:2px;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain}
 body.ops-shell .ops-side .enterprise-nav-label{margin:8px 10px 2px;line-height:13px}
 body.ops-shell .ops-side .enterprise-nav-label:first-child{margin-top:2px}
 body.ops-shell .ops-side nav button{box-sizing:border-box;width:100%;min-width:0;min-height:36px;margin:0;padding:7px 10px;line-height:20px;gap:10px}
 body.ops-shell .ops-side nav button span{min-width:0;overflow-wrap:anywhere}
 body.ops-shell .ops-side-foot{flex:0 0 auto;padding:8px 8px 0}
 body.ops-shell .ops-side-foot .ops-side-account{padding:4px 0 6px}
 body.ops-shell .ops-side-foot small{margin:2px 0 0}
}
body.ops-shell:not(.ops-dark) .ops-side{background:linear-gradient(180deg,#1b1530 0%,#22183d 55%,#2b1b4b 100%)!important;border-right:0!important;box-shadow:inset -1px 0 0 rgba(255,255,255,.04)}
body.ops-shell:not(.ops-dark) .ops-side .enterprise-nav-label{color:rgba(226,214,245,.55)!important;letter-spacing:.12em;font-size:10.5px;font-weight:700}
body.ops-shell:not(.ops-dark) .ops-side nav button,body.ops-shell:not(.ops-dark) .ops-side button[data-menu-id]{border-radius:10px!important;color:rgba(241,236,250,.86)!important;transition:background .15s,color .15s}
body.ops-shell:not(.ops-dark) .ops-side button[data-menu-id]:hover{background:rgba(255,255,255,.07)!important;color:#fff!important}
body.ops-shell:not(.ops-dark) .ops-side button[data-menu-id].active{background:linear-gradient(90deg,rgba(138,76,196,.95),rgba(102,45,145,.9))!important;color:#fff!important;box-shadow:0 6px 18px -8px rgba(138,76,196,.8)}
body.ops-shell:not(.ops-dark) .ops-brand,body.ops-shell:not(.ops-dark) .ds3-logo-frame{border-radius:14px!important}
body.ops-shell:not(.ops-dark) .ops-side-foot{border-top:1px solid rgba(255,255,255,.08)!important}

/* Top bar: backdrop-filter creates a stacking context; lift the whole header above page cards. */
@media screen{
 body.ops-shell .m-header{position:relative;z-index:30;overflow:visible}
 body.ops-shell .ops-account-menu{z-index:1000;max-height:60dvh;overflow-x:hidden;overflow-y:auto}
}
body.ops-shell:not(.ops-dark) .m-header{background:rgba(255,255,255,.86)!important;backdrop-filter:saturate(1.4) blur(10px);border-bottom:1px solid var(--ds-line)!important;box-shadow:none!important}
body.ops-shell:not(.ops-dark) .ops-quick-search{border-radius:12px!important;background:#f1f3f8!important;border:1px solid transparent!important}
body.ops-shell:not(.ops-dark) .ops-quick-search:hover{border-color:var(--ds-line)!important;background:#fff!important}
body.ops-shell:not(.ops-dark) .smart-header-create{background:linear-gradient(135deg,var(--ds-brand),var(--ds-brand-2))!important;border:0!important;border-radius:12px!important;box-shadow:0 8px 18px -10px rgba(102,45,145,.9)}
body.ops-shell:not(.ops-dark) .ops-account-badge{background:linear-gradient(135deg,var(--ds-brand),#c06bd6)!important}

/* Page heading */
body.ops-shell:not(.ops-dark) .px-head h1,body.ops-shell:not(.ops-dark) .m-page h1{font-size:26px!important;font-weight:700!important;letter-spacing:-.015em;color:var(--ds-ink)!important}
body.ops-shell:not(.ops-dark) .px-eyebrow,body.ops-shell:not(.ops-dark) .eyebrow{color:var(--ds-brand)!important;letter-spacing:.12em;font-weight:700}
body.ops-shell:not(.ops-dark) .px-lead{color:var(--ds-ink-2)!important}

/* Cards */
body.ops-shell:not(.ops-dark) .px-card,body.ops-shell:not(.ops-dark) .px-proc,body.ops-shell:not(.ops-dark) .sf-card,body.ops-shell:not(.ops-dark) .hub-card{background:var(--ds-card)!important;border:1px solid var(--ds-line)!important;border-radius:var(--ds-r)!important;box-shadow:var(--ds-shadow)!important}
body.ops-shell:not(.ops-dark) .px-proc{transition:transform .15s,box-shadow .15s}
body.ops-shell:not(.ops-dark) .px-proc:hover{transform:translateY(-2px);box-shadow:var(--ds-shadow-hi)!important}
body.ops-shell:not(.ops-dark) .px-card h2{font-size:15.5px!important;font-weight:700!important;color:var(--ds-ink)!important;letter-spacing:-.005em}

/* KPI tiles */
body.ops-shell:not(.ops-dark) .px-kpi,body.ops-shell:not(.ops-dark) .tk-kpi-btn{background:#fff!important;border:1px solid var(--ds-line)!important;border-radius:var(--ds-r)!important;box-shadow:var(--ds-shadow)!important;transition:transform .15s,box-shadow .15s}
body.ops-shell:not(.ops-dark) .px-kpi:hover,body.ops-shell:not(.ops-dark) .tk-kpi-btn:hover{transform:translateY(-1px);box-shadow:var(--ds-shadow-hi)!important}
body.ops-shell:not(.ops-dark) .px-kpi strong,body.ops-shell:not(.ops-dark) .tk-kpi-btn strong{font-size:26px!important;font-weight:700!important;letter-spacing:-.02em;color:var(--ds-ink)!important}

/* Buttons, tabs, pills */
body.ops-shell:not(.ops-dark) .px-primary,body.ops-shell:not(.ops-dark) button.primary,body.ops-shell:not(.ops-dark) .hub-primary{background:linear-gradient(135deg,var(--ds-brand),var(--ds-brand-2))!important;border:0!important;color:#fff!important;border-radius:var(--ds-r-sm)!important;box-shadow:0 6px 16px -10px rgba(102,45,145,.95)!important;font-weight:600}
body.ops-shell:not(.ops-dark) .px-tabs{background:#eceff6;border-radius:12px;padding:4px;display:inline-flex;gap:2px}
body.ops-shell:not(.ops-dark) .px-tabs button{border:0!important;background:transparent!important;border-radius:9px!important;color:var(--ds-ink-2)!important;box-shadow:none!important}
body.ops-shell:not(.ops-dark) .px-tabs button.on{background:#fff!important;color:var(--ds-brand)!important;box-shadow:0 1px 3px rgba(16,24,40,.12)!important;font-weight:700}
body.ops-shell:not(.ops-dark) .px-pill{border-radius:999px!important;background:var(--ds-brand-soft)!important;color:#4d1f70!important;border:0!important;font-weight:600}
body.ops-shell:not(.ops-dark) .px-pill.bad,body.ops-shell:not(.ops-dark) .px-pill.hot{background:#fdecec!important;color:#b42318!important}

/* Lists, rows, tables */
body.ops-shell:not(.ops-dark) .tk-row{border-radius:12px!important;border:1px solid var(--ds-line-2)!important;background:#fff!important;transition:border-color .15s,background .15s}
body.ops-shell:not(.ops-dark) .tk-row:hover{border-color:#d9c4ea!important;background:#fcfaff!important}
body.ops-shell:not(.ops-dark) .tk-row.late{border-left:4px solid var(--ds-bad)!important}
body.ops-shell:not(.ops-dark) table th{background:#f7f8fc;color:var(--ds-muted);font-size:11.5px;text-transform:uppercase;letter-spacing:.04em}
body.ops-shell:not(.ops-dark) table tbody tr:hover td{background:#fbfaff}

/* Inputs */
body.ops-shell:not(.ops-dark) input:not([type=checkbox]):not([type=radio]):not([type=file]),body.ops-shell:not(.ops-dark) select,body.ops-shell:not(.ops-dark) textarea{border-radius:10px!important;border-color:#d7dce6!important}
body.ops-shell:not(.ops-dark) input:focus,body.ops-shell:not(.ops-dark) select:focus,body.ops-shell:not(.ops-dark) textarea:focus{outline:none!important;border-color:var(--ds-brand-2)!important;box-shadow:0 0 0 3px rgba(138,76,196,.18)!important}

/* Dialogs */
body.ops-shell:not(.ops-dark) dialog[open]{border-radius:18px!important;border:0!important;box-shadow:0 30px 80px -30px rgba(16,24,40,.45)!important}
body.ops-shell:not(.ops-dark) dialog::backdrop{background:rgba(20,16,40,.42);backdrop-filter:blur(2px)}

/* Empty states */
body.ops-shell:not(.ops-dark) .px-empty{color:var(--ds-muted)!important;background:repeating-linear-gradient(135deg,#fafbfd,#fafbfd 10px,#f6f7fb 10px,#f6f7fb 20px);border-radius:12px;padding:18px!important}

/* Create menu grouped by business area */
.smart-create-area{margin:14px 0 4px}.smart-create-area h3{margin:0 0 8px;font-size:12px;letter-spacing:.1em;text-transform:uppercase;color:#7b8798}
.smart-create-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:8px}
body.ops-shell:not(.ops-dark) .smart-create-item{border:1px solid #e6e9f1!important;border-radius:12px!important;background:#fff!important;text-align:left;transition:border-color .15s,box-shadow .15s}
body.ops-shell:not(.ops-dark) .smart-create-item:hover{border-color:#c9acdf!important;box-shadow:0 8px 20px -14px rgba(102,45,145,.6)}

/* Record timeline */
.tl{background:#fff;border:1px solid #e6e9f1;border-radius:14px;padding:14px 16px;margin:10px 0 14px;box-shadow:0 1px 2px rgba(16,24,40,.05)}
.tl-head{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:12px}.tl-head strong{font-size:14px;color:#14213a}
.tl-sum{font-size:12px;font-weight:600;color:#4d1f70;background:#f3ecfa;border-radius:999px;padding:4px 10px}.tl-sum.ok{color:#166534;background:#dcfce7}.tl-sum.bad{color:#b42318;background:#fdecec}
.tl-steps{list-style:none;margin:0;padding:0;display:flex;gap:0;overflow-x:auto}
.tl-step{position:relative;flex:1 1 0;min-width:120px;padding:0 8px;display:flex;flex-direction:column;align-items:center;text-align:center}
.tl-step::before{content:"";position:absolute;top:14px;left:-50%;width:100%;height:3px;background:#e6e9f1;z-index:0}.tl-step:first-child::before{display:none}
.tl-step.done::before,.tl-step.now::before{background:linear-gradient(90deg,#8a4cc4,#662d91)}
.tl-dot{position:relative;z-index:1;width:30px;height:30px;border-radius:50%;display:grid;place-items:center;font-size:13px;font-weight:700;background:#eef1f6;color:#7b8798;border:3px solid #fff;box-shadow:0 0 0 1px #e6e9f1}
.tl-step.done .tl-dot{background:linear-gradient(135deg,#662d91,#8a4cc4);color:#fff;box-shadow:none}
.tl-step.now .tl-dot{background:#fff;color:#662d91;box-shadow:0 0 0 3px rgba(138,76,196,.35);animation:tlPulse 1.8s ease-in-out infinite}
.tl-step.bad .tl-dot{background:#dc2626;color:#fff;box-shadow:none}
.tl-step b{margin-top:8px;font-size:12.5px;color:#14213a;line-height:1.3}.tl-step small{margin-top:3px;font-size:11.5px;color:#7b8798;line-height:1.35}
.tl-step.now b{color:#662d91}
.tl-note{margin:12px 0 0;padding:8px 10px;border-radius:10px;background:#fff7ed;color:#9a3412;font-size:12.5px}
@keyframes tlPulse{0%,100%{box-shadow:0 0 0 3px rgba(138,76,196,.35)}50%{box-shadow:0 0 0 7px rgba(138,76,196,.12)}}
@media (max-width:700px){.tl-steps{flex-direction:column;gap:10px}.tl-step{flex-direction:row;align-items:flex-start;text-align:left;gap:10px;min-width:0;padding:0}.tl-step::before{display:none}.tl-step b{margin-top:5px}.tl-step small{display:block}.tl-step{flex-wrap:wrap}.tl-step small{flex-basis:100%;padding-left:40px;margin-top:-6px}}
body.ops-dark .tl{background:#1f2433;border-color:#2c3346}body.ops-dark .tl-step b,body.ops-dark .tl-head strong{color:#e6e9f1}

/* Leadership cash card */
.home2-cash{position:relative}.home2-cash .cash-month{position:absolute;top:14px;right:16px;width:auto!important;padding:6px 10px!important}
.cash-tiles{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:6px}
.cash-tile{border:1px solid #eef1f6;border-radius:12px;padding:12px 14px;background:linear-gradient(180deg,#fff,#fbfaff);display:flex;flex-direction:column;gap:3px}
.cash-tile span{font-size:12px;color:#7b8798;font-weight:600;text-transform:uppercase;letter-spacing:.05em}.cash-tile strong{font-size:22px;letter-spacing:-.02em;color:#14213a}.cash-tile small{font-size:12px;color:#7b8798}
.cash-bar{display:block;height:6px;border-radius:99px;background:#eef1f6;margin-top:6px;overflow:hidden}.cash-bar b{display:block;height:100%;border-radius:99px;background:linear-gradient(90deg,#8a4cc4,#662d91)}.cash-bar b.warn{background:linear-gradient(90deg,#f59e0b,#dc2626)}
.cash-note{font-size:12.5px;color:#475569;margin:10px 0}
.cash-wrap{overflow-x:auto}.cash-table{width:100%;border-collapse:collapse;font-size:13px}.cash-table th{text-align:left;padding:8px;border-bottom:1px solid #e6e9f1}.cash-table td{padding:8px;border-bottom:1px solid #f1f3f8}.cash-table td.n,.cash-table th:not(:first-child){text-align:right;white-space:nowrap}.cash-table td.bad{color:#dc2626;font-weight:700}
.cash-top{margin-top:12px}.cash-top h3{font-size:12px;text-transform:uppercase;letter-spacing:.08em;color:#7b8798;margin:0 0 6px}
.cash-item{display:grid;grid-template-columns:1fr auto auto;gap:10px;align-items:center;padding:7px 0;border-bottom:1px dashed #eef1f6;font-size:13px}.cash-item small{color:#7b8798}
@media (max-width:800px){.cash-tiles{grid-template-columns:1fr}.home2-cash .cash-month{position:static;margin:4px 0 8px}}

/* Role cards on the home page */
.role-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.role-stat{display:flex;flex-direction:column;align-items:flex-start;gap:3px;text-align:left;border:1px solid #eef1f6!important;border-radius:12px!important;background:linear-gradient(180deg,#fff,#fbfaff)!important;padding:12px 14px!important;cursor:pointer;transition:border-color .15s,box-shadow .15s}
.role-stat:hover{border-color:#c9acdf!important;box-shadow:0 8px 20px -14px rgba(102,45,145,.6)}
.role-stat span{font-size:12px;color:#7b8798;font-weight:600;text-transform:uppercase;letter-spacing:.05em}.role-stat strong{font-size:24px;letter-spacing:-.02em;color:#14213a}.role-stat small{font-size:12px;color:#7b8798}
.role-stat.bad strong{color:#dc2626}
@media (max-width:800px){.role-grid{grid-template-columns:1fr}}

/* Dark mode for the new parts (the rest of dark mode is the portal's own) */
body.ops-dark .cash-tile,body.ops-dark .role-stat{background:#232a3b!important;border-color:#313a50!important}
body.ops-dark .cash-tile strong,body.ops-dark .role-stat strong{color:#eef1f7}
body.ops-dark .cash-tile span,body.ops-dark .cash-tile small,body.ops-dark .role-stat span,body.ops-dark .role-stat small,body.ops-dark .cash-note,body.ops-dark .cash-item small{color:#9aa6ba}
body.ops-dark .cash-bar{background:#313a50}
body.ops-dark .cash-table th{border-color:#313a50;color:#9aa6ba;background:transparent}body.ops-dark .cash-table td{border-color:#2a3245;color:#dfe5ef}
body.ops-dark .cash-item{border-color:#2a3245;color:#dfe5ef}
body.ops-dark .smart-create-item{background:#232a3b!important;border-color:#313a50!important}
body.ops-dark .tl-dot{background:#2a3245;color:#9aa6ba;border-color:#1f2433;box-shadow:0 0 0 1px #313a50}body.ops-dark .tl-step::before{background:#313a50}body.ops-dark .tl-step small{color:#9aa6ba}
body.ops-dark .tl-note{background:#3a2a1a;color:#fbd38d}

/* ---- Khách sạn ---- */
.ht-tiles{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:12px;margin:0 0 16px}
.ht-tiles.small{grid-template-columns:repeat(auto-fit,minmax(160px,1fr));margin:4px 0 8px}
.ht-tile{background:var(--ds-card,#fff);border:1px solid var(--ds-line,#e7e3ee);border-radius:14px;padding:14px 16px;display:flex;flex-direction:column;gap:4px;min-width:0}
.ht-tile>span{font-size:12px;color:var(--ds-muted,#6b6880);text-transform:uppercase;letter-spacing:.03em}
.ht-tile>strong{font-size:24px;line-height:1.2;color:var(--ds-ink,#1d1b2c)}
.ht-tiles.small .ht-tile>strong{font-size:20px}
.ht-tile>small{font-size:12px;color:var(--ds-muted,#6b6880)}
.ht-tile>em{font-style:normal;font-size:12px;font-weight:600}
.ht-tile>em.up{color:#1a7f4b}.ht-tile>em.down{color:#c0392b}
.ht-two{display:grid;grid-template-columns:1fr 1.3fr;gap:16px;margin-bottom:16px}
.ht-mix-row{display:grid;grid-template-columns:90px 1fr auto 52px;gap:10px;align-items:center;padding:8px 0;font-size:14px}
.ht-mix-row small{color:var(--ds-muted,#6b6880);text-align:right}
.ht-mix-bar{display:block;height:10px;border-radius:6px;background:var(--ds-brand-soft,#f0edf6);overflow:hidden}
.ht-mix-bar b{display:block;height:100%;background:linear-gradient(90deg,#7b4fd1,#b46bd8);border-radius:6px}
.ht-chart{display:flex;align-items:flex-end;gap:14px;height:170px;padding:8px 4px 0}
.ht-col{position:relative;flex:1;height:100%;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;gap:4px}
.ht-track{position:relative;flex:1;width:100%;display:flex;align-items:flex-end;justify-content:center}
.ht-bar{display:block;width:70%;max-width:46px;background:linear-gradient(180deg,#8f63e0,#5b3aa8);border-radius:8px 8px 3px 3px}
.ht-col small{font-size:12px;color:var(--ds-muted,#6b6880)}
.ht-col em{font-style:normal;font-size:11px;color:#7b4fd1;font-weight:600}
.ht-target{position:absolute;left:10%;right:10%;border-top:2px dashed #e08a2c;text-decoration:none}
.ht-note{font-size:12px;color:var(--ds-muted,#6b6880);margin:8px 0 0}
.ht-warn{background:#fff6e5;border:1px solid #f3d29a;color:#8a5a00;border-radius:10px;padding:10px 14px;margin:0 0 14px}
.ht-days tr.click{cursor:pointer}.ht-days tr.click:hover td{background:var(--ds-brand-soft,#f6f3fb)}
.ht-days td.strong{font-weight:700}
.ht-more{margin-top:4px;background:none;border:0;color:#6a3fc8;font-weight:600;cursor:pointer;padding:4px 0}
.ht-dialog{border:0;border-radius:18px;padding:0;width:min(640px,94vw);box-shadow:0 24px 60px rgba(30,20,60,.3)}
.ht-dialog::backdrop{background:rgba(20,14,40,.45)}
.ht-dialog form{padding:22px 24px}
.ht-dialog h2{margin:0 0 16px;font-size:20px}
.ht-form{display:grid;grid-template-columns:1fr 1fr;gap:12px 16px}
.ht-field{display:flex;flex-direction:column;gap:5px;font-size:13px}
.ht-field.wide{grid-column:1/-1}
.ht-field small{color:var(--ds-muted,#6b6880);font-size:11px}
.ht-field input,.ht-field textarea{font:inherit;font-size:15px;padding:9px 11px;border:1px solid var(--ds-line,#d9d4e6);border-radius:10px;background:var(--ds-card,#fff);color:inherit}
.ht-field textarea{min-height:64px;resize:vertical}
.ht-error{color:#c0392b;margin:12px 0 0}
.ht-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:18px}
.ht-app .px-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
@media (max-width:820px){.ht-two{grid-template-columns:1fr}.ht-form{grid-template-columns:1fr}.ht-mix-row{grid-template-columns:72px 1fr auto}.ht-mix-row small{display:none}}
body.ops-dark .ht-tile,body.ops-dark .ht-dialog,body.ops-dark .ht-field input,body.ops-dark .ht-field textarea{background:#221f33;border-color:#3a3550;color:#ece9f7}
body.ops-dark .ht-tile>strong{color:#f3f0ff}
body.ops-dark .ht-warn{background:#3a2e14;border-color:#6b5320;color:#f3d29a}
body.ops-dark .ht-mix-bar{background:#2d2942}
