:root{--navy:#0f1e3a;--blue:#2f6fed;--bg:#f4f7fb;--card:#fff;--text:#10213f;--muted:#70809d;--line:#dfe6f1;--danger:#d92d20;--green:#137a55;--radius:18px;--shadow:0 18px 50px rgba(15,30,58,.12)}*{box-sizing:border-box}body{margin:0;font-family:Inter,system-ui,-apple-system,Segoe UI,sans-serif;color:var(--text);background:var(--bg)}button,input,select,textarea{font:inherit}.hidden{display:none!important}.btn{border:0;border-radius:12px;padding:12px 17px;font-weight:750;cursor:pointer}.btn.primary{color:#fff;background:linear-gradient(135deg,#2864e8,#4f8cff);box-shadow:0 10px 24px rgba(47,111,237,.25)}.btn.ghost{background:#eef3fb;color:var(--text)}.btn.danger{background:#fff0ef;color:var(--danger)}.full{width:100%}.icon-btn{border:0;background:transparent;font-size:24px;cursor:pointer}.login-shell{min-height:100vh;display:grid;place-items:center;padding:24px;background:radial-gradient(circle at 20% 10%,#dbe8ff,transparent 35%),#f5f8fd}.login-card{width:min(420px,100%);background:#fff;border-radius:28px;padding:34px;box-shadow:var(--shadow)}.brand-mark,.side-brand span{display:grid;place-items:center;width:58px;height:58px;border-radius:18px;background:linear-gradient(135deg,#2e6ef1,#69a0ff);color:#fff;font-weight:900;font-size:20px}.login-card h1{margin:24px 0 8px}.login-card p{color:var(--muted);margin-bottom:26px}.login-card label{display:block;font-weight:700;font-size:14px;margin:14px 0}.login-card input{width:100%;margin-top:8px;padding:14px;border:1px solid var(--line);border-radius:13px}.error{color:var(--danger);margin-top:14px;min-height:20px}.app{min-height:100vh}.topbar{position:fixed;top:0;left:250px;right:0;height:68px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:14px;padding:0 24px;z-index:20}.topbar>div{display:flex;flex-direction:column}.topbar small{color:var(--muted)}.topbar .btn{margin-left:auto}.sidebar{position:fixed;inset:0 auto 0 0;width:250px;background:var(--navy);padding:24px 16px;color:#fff;z-index:30}.side-brand{display:flex;align-items:center;gap:12px;margin-bottom:25px}.side-brand span{width:42px;height:42px;border-radius:13px}.sidebar nav{display:grid;gap:5px}.sidebar nav button{border:0;background:transparent;color:#cad5e8;text-align:left;padding:12px;border-radius:11px;cursor:pointer}.sidebar nav button.active,.sidebar nav button:hover{background:#203456;color:#fff}.sidebar>.btn{position:absolute;bottom:20px;left:16px;width:218px}.main{margin-left:250px;padding:98px 28px 36px}.page-head{display:flex;align-items:end;justify-content:space-between;margin-bottom:24px}.page-head h2{font-size:34px;margin:5px 0}.page-head p,.eyebrow{color:var(--muted)}.eyebrow{font-size:12px;font-weight:900;letter-spacing:.14em}.grid{display:grid;gap:18px}.kpis{grid-template-columns:repeat(4,1fr)}.card{background:var(--card);border:1px solid #e6ebf4;border-radius:var(--radius);padding:20px;box-shadow:0 8px 24px rgba(16,33,63,.05)}.kpi small{color:var(--muted)}.kpi strong{display:block;font-size:30px;margin-top:10px}.filters{display:flex;gap:12px;align-items:end;flex-wrap:wrap}.field{display:grid;gap:6px;min-width:160px}.field label{font-size:13px;font-weight:750}.field input,.field select,.field textarea{padding:12px;border:1px solid var(--line);border-radius:11px;background:#fff}.timeline-wrap{overflow:auto;max-height:65vh}.timeline{display:grid;min-width:800px;border:1px solid var(--line);border-radius:14px;overflow:hidden}.timeline .cell{border-right:1px solid var(--line);border-bottom:1px solid var(--line);min-height:54px;padding:7px}.timeline .head{position:sticky;top:0;background:#f8faff;font-weight:800;z-index:2}.timeline .time{background:#fafbfe;color:var(--muted);font-size:12px}.booking{border-left:4px solid var(--blue);background:#eaf1ff;border-radius:9px;padding:7px;font-size:12px;cursor:pointer}.table-wrap{overflow:auto}.table{width:100%;border-collapse:collapse}.table th,.table td{padding:13px;border-bottom:1px solid var(--line);text-align:left;white-space:nowrap}.table th{color:var(--muted);font-size:12px;background:#f8faff}.actions{display:flex;gap:6px}.actions button{padding:7px 10px;border:1px solid var(--line);background:#fff;border-radius:8px}.modal{position:fixed;inset:0;background:rgba(7,18,38,.56);display:grid;place-items:center;padding:18px;z-index:100}.modal-card{width:min(780px,100%);max-height:92vh;overflow:auto;background:#fff;border-radius:22px;box-shadow:var(--shadow)}.modal-head{position:sticky;top:0;background:#fff;display:flex;justify-content:space-between;align-items:center;padding:18px 22px;border-bottom:1px solid var(--line);z-index:2}.modal-head h3{margin:0}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;padding:22px}.form-grid .full-row{grid-column:1/-1}.modal-actions{display:flex;justify-content:flex-end;gap:10px;padding:0 22px 22px}.toast{position:fixed;right:24px;bottom:24px;background:var(--navy);color:#fff;padding:14px 18px;border-radius:12px;z-index:120;box-shadow:var(--shadow)}.toast.error{background:#b42318}.bottom-nav{display:none}
@media(max-width:800px){.sidebar{transform:translateX(-105%);transition:.25s;width:86%;max-width:330px}.sidebar.open{transform:none}.topbar{left:0;height:60px;padding:0 14px}.topbar strong{font-size:14px}.topbar .btn{display:none}.main{margin-left:0;padding:78px 14px 96px}.page-head{align-items:center}.page-head h2{font-size:28px}.page-head p{font-size:14px}.kpis{display:flex;overflow:auto}.kpi{min-width:210px}.filters{display:grid;grid-template-columns:1fr 1fr}.field{min-width:0}.card{padding:15px}.timeline-wrap{margin:0 -14px}.timeline{border-radius:0}.bottom-nav{position:fixed;left:0;right:0;bottom:0;height:72px;background:#fff;border-top:1px solid var(--line);display:grid;grid-template-columns:1fr 1fr 1fr 1fr 1fr;align-items:center;z-index:40;padding-bottom:env(safe-area-inset-bottom)}.bottom-nav button{border:0;background:transparent;color:var(--muted);display:grid;place-items:center;gap:3px;font-size:20px}.bottom-nav span{font-size:10px}.bottom-nav .book-fab{width:58px;height:58px;border-radius:50%;background:var(--blue);color:#fff;font-size:34px;justify-self:center;margin-top:-26px;box-shadow:0 10px 24px rgba(47,111,237,.35)}.form-grid{grid-template-columns:1fr;padding:16px}.form-grid .full-row{grid-column:auto}.modal{padding:0;align-items:end}.modal-card{width:100%;max-height:94vh;border-radius:22px 22px 0 0}.toast{left:14px;right:14px;bottom:86px}.table th,.table td{padding:11px}.page-head #pageAction{display:none!important}}

/* V6.1 booking fixes */
.time-24{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:8px}.time-24 select{width:100%}.field-hint{display:block;min-height:18px;margin-top:6px;color:#64748b}.field-hint.error,.form-error{color:#b91c1c}.form-error{margin:12px 0;padding:12px 14px;border-radius:12px;background:#fef2f2;border:1px solid #fecaca}.addon-option{display:inline-flex;align-items:center;gap:7px;margin:7px 14px 7px 0}.addon-option input{width:auto}.actions button{cursor:pointer;position:relative;z-index:2}.modal-actions{position:sticky;bottom:0;background:#fff;padding-top:12px}

/* V6.3 mobile header stabilization */
.topbar-brand{display:flex!important;flex-direction:row!important;align-items:center;gap:11px;min-width:0}
.topbar-logo{display:grid;place-items:center;width:42px;height:42px;flex:0 0 42px;border-radius:13px;background:linear-gradient(135deg,#2e6ef1,#69a0ff);color:#fff;font-weight:900;font-size:17px;line-height:1}
.topbar-copy{display:flex;flex-direction:column;min-width:0;line-height:1.15}
.topbar-copy strong{font-size:17px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.topbar-copy small{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:230px}
.topbar-menu{margin-left:0;display:none}

@media(max-width:800px){
  body{overflow-x:hidden}
  .topbar{left:0;right:0;top:0;height:68px;padding:0 16px;display:flex;align-items:center;justify-content:space-between;gap:12px;background:rgba(255,255,255,.96);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);box-shadow:0 1px 0 var(--line);z-index:60}
  .topbar-brand{flex:1;max-width:calc(100% - 58px)}
  .topbar-logo{width:44px;height:44px;flex-basis:44px;border-radius:14px}
  .topbar-copy strong{font-size:18px;color:var(--text)}
  .topbar-copy small{font-size:12px;color:var(--muted);max-width:calc(100vw - 145px)}
  .topbar-menu{display:grid!important;place-items:center;flex:0 0 46px;width:46px;height:46px;border:1px solid var(--line);border-radius:14px;background:#fff;color:var(--text);font-size:24px;line-height:1;box-shadow:0 5px 14px rgba(15,30,58,.08)}
  .topbar .btn{display:none!important}
  .main{padding-top:92px}
  .page-head{margin-bottom:18px;align-items:flex-start}
  .page-head .eyebrow{display:none}
  .page-head h2{margin:0 0 6px;font-size:30px;line-height:1.1}
  .page-head p{margin:0;line-height:1.45}
  .sidebar{top:0;height:100dvh;padding-top:22px;box-shadow:20px 0 50px rgba(7,18,38,.25)}
  .sidebar.open::after{content:"";position:fixed;inset:0;left:100%;background:rgba(7,18,38,.38);pointer-events:none}
  .bottom-nav{height:76px;padding:5px 7px max(5px,env(safe-area-inset-bottom));grid-template-columns:repeat(5,1fr);box-shadow:0 -8px 28px rgba(15,30,58,.08)}
  .bottom-nav button{min-width:0;font-size:20px;border-radius:12px;padding:5px 2px}
  .bottom-nav button.active:not(.book-fab){color:var(--blue);background:#eef4ff}
  .bottom-nav .book-fab{width:62px;height:62px;margin-top:-31px}
  .kpis{scroll-snap-type:x mandatory;padding-bottom:4px}
  .kpi{min-width:76vw;scroll-snap-align:start}
  .filters{grid-template-columns:1fr!important}
  .filters>.btn{width:100%;min-height:48px}
  .card{border-radius:20px}
  .modal-card{max-height:calc(100dvh - 12px)}
}

@media(max-width:380px){
  .topbar{padding:0 12px}
  .topbar-copy strong{font-size:16px}
  .topbar-copy small{max-width:190px}
  .main{padding-left:10px;padding-right:10px}
}

/* V6.4 workflow states */
.status-pill{display:inline-flex;align-items:center;border-radius:999px;padding:7px 11px;font-size:12px;font-weight:800;white-space:nowrap}.status-pill.done{background:#e8f7ef;color:#137a47}.status-pill.deleted{background:#f1f3f6;color:#6b7280}.booking-row.is-deleted{opacity:.62;background:#f8f9fb}.primary-mini{background:#eaf1ff!important;color:#1764d8!important;border-color:#bcd2ff!important}.payment-summary{display:flex;justify-content:space-between;align-items:center;background:#f2f7ff;border:1px solid #dbe8ff;border-radius:16px;padding:16px 18px;margin-bottom:18px}.payment-summary strong{font-size:22px;color:#0d56c7}

/* V6.8 Mobile SaaS refresh */
.side-account{margin-top:auto;padding:16px;border-top:1px solid rgba(255,255,255,.12);background:linear-gradient(180deg,transparent,rgba(0,0,0,.12));position:sticky;bottom:0}.side-user{display:flex;gap:10px;align-items:center;color:#fff;margin-bottom:12px}.side-user small{display:block;opacity:.68}.avatar-mini{width:38px;height:38px;border-radius:13px;display:grid;place-items:center;background:linear-gradient(135deg,#4d8dff,#6b65f7);font-weight:800}.danger-soft{background:rgba(255,255,255,.12)!important;color:#fff!important;border:1px solid rgba(255,255,255,.18)!important}.addon-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.addon-option{display:flex!important;align-items:center;gap:10px;padding:12px;border:1px solid #dbe5f2;border-radius:14px;background:#f9fbff}.addon-option span{display:flex;flex-direction:column;font-weight:700}.addon-option small{font-weight:500;color:#64748b;margin-top:2px}.customer-toolbar{display:flex;justify-content:space-between;align-items:center;gap:16px}.customer-toolbar p{margin:4px 0 0;color:#718096}.customer-toolbar input{max-width:320px}.mini-kpis{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-bottom:18px}.mini-kpis>div{padding:16px;border-radius:16px;background:linear-gradient(145deg,#f7faff,#eef4ff);border:1px solid #e0e8f5}.mini-kpis span{display:block;color:#718096;font-size:13px}.mini-kpis b{font-size:22px;margin-top:5px;display:block}.customer-list{display:grid;gap:10px}.customer-card{display:grid;grid-template-columns:auto 1fr auto;gap:14px;align-items:center;padding:14px;border:1px solid #e2e8f0;border-radius:16px}.customer-avatar{width:46px;height:46px;border-radius:15px;background:linear-gradient(135deg,#3982f6,#6b63f8);color:white;display:grid;place-items:center;font-weight:800;font-size:18px}.customer-info{display:flex;flex-direction:column;gap:3px}.customer-info span,.customer-info small{color:#64748b}.customer-stats{text-align:right}.customer-stats strong,.customer-stats span{display:block}.customer-stats span{color:#2473ea;font-weight:700;margin-top:4px}.empty-state{text-align:center;color:#718096;padding:30px}
@media(max-width:760px){body{background:#f3f6fb}.topbar{height:64px;padding:0 16px;border-bottom:1px solid #e9eef6;box-shadow:0 5px 22px rgba(31,55,90,.06)}.topbar-logo{width:44px;height:44px;border-radius:15px}.topbar-copy strong{font-size:18px}.topbar-copy small{font-size:12px}.main{padding:84px 16px 104px}.page-head{margin-bottom:18px}.page-head h2{font-size:30px;line-height:1.1}.page-head p{font-size:14px}.sidebar{width:min(86vw,350px);padding-bottom:0;display:flex;flex-direction:column}.sidebar nav{padding:12px;overflow:auto}.sidebar nav button{min-height:50px;border-radius:15px;padding:0 16px;font-size:16px}.bottom-nav{height:72px;border-radius:22px 22px 0 0;box-shadow:0 -8px 30px rgba(28,50,83,.12);padding-bottom:env(safe-area-inset-bottom)}.book-fab{width:66px;height:66px;transform:translateY(-16px);box-shadow:0 12px 28px rgba(51,116,244,.35)}.card{border-radius:20px}.filters{display:grid!important;grid-template-columns:1fr!important}.kpis{display:flex!important;overflow-x:auto;scroll-snap-type:x mandatory;gap:12px;padding-bottom:4px}.kpis .kpi{min-width:78vw;scroll-snap-align:start}.customer-toolbar{align-items:stretch;flex-direction:column}.customer-toolbar input{max-width:none}.mini-kpis{display:flex;overflow-x:auto}.mini-kpis>div{min-width:190px}.customer-card{grid-template-columns:auto 1fr}.customer-stats{grid-column:2;text-align:left;display:flex;gap:14px}.addon-grid{grid-template-columns:1fr}.modal-card{width:100%;max-height:94dvh;border-radius:24px 24px 0 0;align-self:flex-end}.form-grid{grid-template-columns:1fr}.table-wrap{border-radius:15px}.page-head .btn{position:fixed;right:18px;bottom:88px;z-index:20;border-radius:999px;box-shadow:0 10px 24px rgba(47,112,240,.28)}}

/* V6.9 Mobile app polish */
.mobile-drawer-title{display:none}.customer-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}.package-chip{display:inline-flex;margin-top:6px;padding:5px 9px;border-radius:999px;background:#eaf3ff;color:#1765d8;font-style:normal;font-size:12px;font-weight:700}.package-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:14px}.package-progress-card h4{margin:16px 0 10px}.package-card-head,.package-card-foot,.package-numbers{display:flex;align-items:center;justify-content:space-between;gap:12px}.package-card-head div{display:flex;flex-direction:column}.package-card-head span,.package-card-foot span{color:#64748b}.progress-track{height:10px;background:#e7eef8;border-radius:999px;overflow:hidden;margin-bottom:10px}.progress-track i{display:block;height:100%;background:linear-gradient(90deg,#2c78f4,#6c63f6);border-radius:inherit}.package-numbers span{font-size:13px;color:#64748b}.linked-customer-field{padding:12px;border-radius:16px;background:#f5f9ff;border:1px solid #dce9fb}
@media(max-width:760px){.sidebar{height:calc(100dvh - 64px);top:64px;padding-bottom:calc(92px + env(safe-area-inset-bottom));background:linear-gradient(180deg,#0b2143,#0a1c38)}.mobile-drawer-title{display:flex;align-items:center;justify-content:space-between;padding:15px 16px 8px;color:#bcd0ee;font-size:12px;text-transform:uppercase;letter-spacing:.08em;font-weight:800}.mobile-drawer-title button{border:0;border-radius:12px;padding:10px 13px;background:#fff;color:#d73535;font-weight:800}.sidebar nav{padding:8px 14px 18px;display:grid;grid-template-columns:1fr 1fr;gap:9px;align-content:start}.sidebar nav button{min-height:62px;margin:0;text-align:left;padding:12px 13px;background:rgba(255,255,255,.055);border:1px solid rgba(255,255,255,.07);line-height:1.15}.sidebar nav button.active{background:linear-gradient(135deg,rgba(62,126,244,.42),rgba(104,91,239,.34));border-color:rgba(145,183,255,.4)}.side-account{position:absolute;left:0;right:0;bottom:calc(72px + env(safe-area-inset-bottom));padding:10px 14px;background:#071a34;z-index:4}.side-user{display:none}.side-account #logoutBtn{display:none}.customer-card{padding:16px;grid-template-columns:44px 1fr}.customer-actions{grid-column:1/-1;justify-content:stretch}.customer-actions button{flex:1;min-height:42px}.package-list{grid-template-columns:1fr}.package-progress-card{padding:18px}.package-numbers{padding:10px 0}.page-head{padding-right:0}.page-head .btn{bottom:90px}.customer-panel{padding:14px}.modal-card{border-radius:26px 26px 0 0}.modal-head{position:sticky;top:0;background:#fff;z-index:2}.form-grid{gap:14px}.field input,.field select,.field textarea{min-height:50px;font-size:16px}}

/* V7.0 mobile navigation and linked-data polish */
@media(max-width:760px){
  .sidebar{display:flex;flex-direction:column;overflow:hidden}
  .mobile-drawer-title{flex:0 0 auto;display:flex}
  .sidebar .side-brand{display:none}
  .sidebar nav{flex:1 1 auto;overflow-y:auto;overscroll-behavior:contain;padding-bottom:170px;scrollbar-width:none}
  .sidebar nav::-webkit-scrollbar{display:none}
  .side-account{display:block!important;position:absolute!important;left:12px!important;right:12px!important;bottom:calc(84px + env(safe-area-inset-bottom))!important;border-radius:20px;background:linear-gradient(135deg,#102b54,#173f78)!important;border:1px solid rgba(255,255,255,.12);box-shadow:0 18px 38px rgba(0,0,0,.25)}
  .side-account #logoutBtn{display:block!important;min-height:48px;background:#fff;color:#c92d2d;border:0;font-weight:900}
  .sidebar.open:after{content:'';position:fixed;inset:64px 0 0 min(86vw,360px);background:rgba(15,23,42,.32);z-index:-1}
  .linked-customer-field{background:linear-gradient(135deg,#f4f8ff,#eef4ff)}
  .promo-rule-badge{display:block;margin-top:6px;color:#42628c;font-size:12px}
}

.package-accounting-note{padding:14px 16px;border-radius:14px;background:#eff6ff;color:#244366;line-height:1.55;border:1px solid #dbeafe}.package-accounting-note b{color:#0f2a4d}

/* V8 resilient loading */
.skeleton-card span,.skeleton-card b,.timeline-skeleton{display:block;background:linear-gradient(90deg,#eef3fb 25%,#f8faff 50%,#eef3fb 75%);background-size:200% 100%;animation:mt-shimmer 1.4s infinite;border-radius:10px}
.skeleton-card span{height:14px;width:42%;margin-bottom:18px}.skeleton-card b{height:28px;width:58%}.timeline-skeleton{height:420px}.stale-view{opacity:.96}
@keyframes mt-shimmer{0%{background-position:200% 0}100%{background-position:-200% 0}}
.error:empty{display:none!important}


/* V8.0.6 — compact mobile UI and complete mobile actions */
@media(max-width:760px){
  html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
  body{font-size:14px;overflow-x:hidden;background:#f4f7fb}
  .topbar{height:56px!important;padding:0 12px!important;gap:8px!important}
  .topbar-brand{gap:9px!important;min-width:0}
  .topbar-logo{width:38px!important;height:38px!important;border-radius:12px!important;font-size:15px!important}
  .topbar-copy strong{font-size:16px!important;line-height:1.05}
  .topbar-copy small{font-size:10px!important;line-height:1.1;max-width:160px!important}
  .topbar-menu{width:42px!important;height:42px!important;border-radius:13px!important;font-size:22px!important;flex:0 0 auto}
  .main{padding:72px 11px 82px!important}
  .page-head{margin:0 2px 14px!important;min-height:auto!important;align-items:flex-start!important}
  .page-head .eyebrow{font-size:9px!important;letter-spacing:.12em!important}
  .page-head h2{font-size:24px!important;line-height:1.08!important;margin:5px 0 4px!important}
  .page-head p{font-size:12px!important;margin:0!important}
  .card{padding:13px!important;border-radius:16px!important;box-shadow:0 5px 18px rgba(16,33,63,.05)!important}
  .kpis{gap:9px!important;margin-right:-11px!important;padding-right:11px!important}
  .kpis .kpi,.kpi{min-width:58vw!important;padding:14px!important}
  .kpi small{font-size:12px!important}.kpi strong{font-size:23px!important;margin-top:7px!important}
  .filters{gap:10px!important}.field{gap:5px!important}.field label{font-size:12px!important}
  .field input,.field select,.field textarea{min-height:44px!important;padding:10px 11px!important;font-size:16px!important;border-radius:11px!important}
  .btn{padding:10px 13px!important;border-radius:11px!important;font-size:13px!important}
  .filters>.btn{min-height:44px!important}
  .table-wrap{overflow-x:auto!important;-webkit-overflow-scrolling:touch;border-radius:13px!important}
  .table{font-size:12px!important;min-width:640px}
  .table th,.table td{padding:9px 10px!important}
  .actions button{padding:7px 9px!important;font-size:12px!important}
  .timeline-wrap{margin:0!important;border-radius:14px!important;overflow:auto!important}
  .timeline{min-width:650px!important}.timeline .cell{min-height:46px!important;padding:5px!important}
  .booking{font-size:11px!important;padding:6px!important}
  .modal-card{max-height:calc(100dvh - 8px)!important;border-radius:20px 20px 0 0!important}
  .modal-head{padding:14px 16px!important}.modal-head h3{font-size:18px!important}
  .form-grid{padding:14px!important;gap:11px!important}.modal-actions{padding:10px 14px 14px!important}
  .customer-toolbar{padding:13px!important;gap:10px!important}.customer-toolbar h3{font-size:18px;margin:0 0 3px}.customer-toolbar p{font-size:12px}
  .mini-kpis{gap:9px!important}.mini-kpis>div{min-width:145px!important;padding:12px!important}.mini-kpis b{font-size:19px!important}
  .customer-card{padding:12px!important;border-radius:14px!important;gap:10px!important}.customer-avatar{width:38px!important;height:38px!important;border-radius:12px!important;font-size:15px!important}
  .customer-info b{font-size:14px}.customer-info span,.customer-info small{font-size:11px}.customer-actions button{min-height:38px!important;font-size:12px!important}
  .package-progress-card{padding:13px!important}.package-progress-card h4{font-size:15px!important}
  .sidebar{top:56px!important;height:calc(100dvh - 56px)!important;width:min(84vw,320px)!important;padding-bottom:calc(72px + env(safe-area-inset-bottom))!important}
  .mobile-drawer-title{padding:11px 12px 6px!important;font-size:10px!important}
  .mobile-drawer-title button{padding:8px 11px!important;font-size:12px!important}
  .sidebar nav{grid-template-columns:1fr 1fr!important;gap:7px!important;padding:7px 10px 18px!important;padding-bottom:18px!important}
  .sidebar nav button{min-height:48px!important;padding:9px 10px!important;font-size:13px!important;border-radius:12px!important}
  /* keep only the logout control in the drawer header */
  .side-account{display:none!important}
  /* bottom navigation contains only overview, schedule, booking and finance */
  .bottom-nav{height:64px!important;grid-template-columns:1fr 1fr 70px 1fr!important;padding:3px 8px max(3px,env(safe-area-inset-bottom))!important;border-radius:18px 18px 0 0!important}
  .bottom-nav button{font-size:18px!important;padding:3px!important}.bottom-nav span{font-size:9px!important}
  .bottom-nav .book-fab{width:54px!important;height:54px!important;font-size:29px!important;margin-top:-24px!important;transform:none!important}
  #moreBtn{display:none!important}
  /* allow Add New on every supported mobile management page */
  .page-head #pageAction:not(.hidden){display:inline-flex!important;align-items:center!important;justify-content:center!important;position:fixed!important;right:12px!important;bottom:74px!important;z-index:55!important;width:auto!important;max-width:150px!important;min-height:42px!important;padding:9px 13px!important;border-radius:999px!important;font-size:12px!important;box-shadow:0 9px 22px rgba(47,111,237,.28)!important}
  .toast{bottom:74px!important;font-size:12px!important;padding:11px 13px!important}
}
@media(max-width:380px){
  .main{padding-left:8px!important;padding-right:8px!important}
  .page-head h2{font-size:22px!important}
  .kpis .kpi,.kpi{min-width:64vw!important}
  .sidebar{width:88vw!important}
}
/* V8.0.7 - Booking / Walk-in flow */
.create-choice-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.create-choice{border:1px solid #dbe5f3;background:#fff;border-radius:18px;padding:20px;text-align:left;cursor:pointer;display:flex;flex-direction:column;gap:8px;min-height:132px}.create-choice b{font-size:18px;color:#0b1f3f}.create-choice span{font-size:13px;line-height:1.5;color:#64748b}.create-choice:hover{border-color:#4384f5;box-shadow:0 10px 28px rgba(51,112,235,.14)}.create-choice.walkin{background:#f5f9ff}.walkin-panel{padding:14px;border:1px solid #d9e6fb;border-radius:16px;background:#f7faff}.check-line{display:flex;gap:10px;align-items:center;font-weight:700}.check-line input{width:20px;height:20px}.walkin-panel .form-grid{margin-top:14px}
@media(max-width:720px){.create-choice-grid{grid-template-columns:1fr}.create-choice{min-height:auto;padding:16px}.create-choice b{font-size:16px}}

/* V8.0.8 — dashboard priority, paging and native-app mobile experience */
.booking-card-list{display:none}.dashboard-feed{display:grid;gap:16px;margin-top:18px}.dashboard-section{padding:0;overflow:hidden}.section-heading{display:flex;align-items:center;justify-content:space-between;padding:18px 20px 12px}.section-heading h3{margin:0;font-size:18px}.section-heading small{display:block;color:var(--muted);margin-top:4px}.dashboard-empty{padding:20px;color:var(--muted);border-top:1px solid var(--line)}.dashboard-more{display:block;margin:12px auto 18px}.booking-card{border-bottom:1px solid var(--line)}

@media(max-width:760px){
  :root{--radius:16px}
  body{background:#f2f5fa;-webkit-tap-highlight-color:transparent}
  .topbar{height:56px!important;padding:0 12px!important;background:rgba(255,255,255,.96)!important;backdrop-filter:blur(16px);position:fixed}
  .topbar-logo{width:36px!important;height:36px!important;border-radius:12px!important;font-size:14px!important}
  .topbar-copy strong{font-size:15px!important}.topbar-copy small{font-size:10px!important}
  .topbar-menu{width:42px!important;height:42px!important;border-radius:14px!important;font-size:22px!important}
  .main{padding:68px 12px calc(78px + env(safe-area-inset-bottom))!important}
  .page-head{margin:0 0 14px!important;align-items:center!important}
  .page-head .eyebrow{display:none!important}
  .page-head h2{font-size:24px!important;letter-spacing:-.02em!important;margin:0!important}
  .page-head p{font-size:12px!important;margin-top:5px!important}
  .dashboard-kpis{display:grid!important;grid-template-columns:1fr 1fr!important;overflow:visible!important;gap:9px!important;margin:0!important;padding:0!important}
  .dashboard-kpis .kpi{min-width:0!important;height:88px!important;padding:13px!important;border-radius:17px!important;box-shadow:0 6px 20px rgba(20,45,80,.07)!important}
  .dashboard-kpis .kpi small{font-size:11px!important}.dashboard-kpis .kpi strong{font-size:22px!important;margin-top:6px!important}
  .dashboard-feed{gap:12px!important;margin-top:13px!important}
  .dashboard-section{border-radius:18px!important;box-shadow:0 7px 24px rgba(23,48,82,.075)!important}
  .section-heading{padding:14px 14px 9px!important}.section-heading h3{font-size:16px!important}.section-heading small{font-size:11px!important;margin-top:2px!important}
  .desktop-booking-table{display:none!important}
  .booking-card-list{display:block!important}
  .booking-card{display:grid;grid-template-columns:58px minmax(0,1fr);gap:10px;padding:12px 14px;background:#fff;position:relative}
  .booking-card:last-child{border-bottom:0}
  .booking-time{display:flex;flex-direction:column;align-items:flex-start;padding-top:1px}
  .booking-time b{font-size:15px;color:#1768d7}.booking-time small{font-size:9px;color:#8794a8;margin-top:3px;white-space:nowrap}
  .booking-main{min-width:0;display:flex;flex-direction:column;gap:3px;padding-right:72px}
  .booking-main strong{font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .booking-main span{font-size:12px;color:#475569;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .booking-main small{font-size:10px;color:#8290a4}
  .booking-state{position:absolute;right:12px;top:12px;display:flex;flex-direction:column;align-items:flex-end;gap:7px}
  .booking-state>span{font-size:9px;font-weight:800;border-radius:999px;padding:4px 7px;background:#edf3fb;color:#53657e}
  .booking-state .actions{display:flex;gap:5px;max-width:92px;justify-content:flex-end;flex-wrap:wrap}
  .booking-state .actions button{padding:5px 7px!important;border-radius:8px!important;font-size:10px!important;min-height:28px!important}
  .booking-state .status-pill{font-size:9px!important;padding:5px 7px!important;white-space:nowrap}
  .dashboard-more{width:calc(100% - 28px);margin:9px 14px 13px!important;min-height:40px!important;font-size:12px!important}
  .dashboard-empty{font-size:12px!important;padding:17px 14px!important}
  .bottom-nav{height:64px!important;border-radius:18px 18px 0 0!important;padding:0 8px env(safe-area-inset-bottom)!important;box-shadow:0 -5px 22px rgba(21,43,75,.12)!important}
  .bottom-nav button{font-size:18px!important}.bottom-nav span{font-size:9px!important}
  .bottom-nav .book-fab{width:54px!important;height:54px!important;font-size:29px!important;margin-top:-22px!important}
  .sidebar{top:56px!important;height:calc(100dvh - 56px)!important;width:min(88vw,330px)!important}
  .sidebar nav{grid-template-columns:1fr 1fr!important;gap:7px!important;padding:7px 11px 16px!important}
  .sidebar nav button{min-height:48px!important;padding:9px 10px!important;font-size:13px!important;border-radius:13px!important}
  .mobile-drawer-title{padding:9px 11px 5px!important}.mobile-drawer-title button{min-height:34px!important}
  .modal-card{max-height:92dvh!important;border-radius:20px 20px 0 0!important}.modal-head{padding:13px 15px!important}.modal-head h3{font-size:17px!important}
  .form-grid{padding:14px!important;gap:11px!important}.field label{font-size:12px!important}.field input,.field select,.field textarea{min-height:44px!important;font-size:14px!important;border-radius:12px!important;padding:10px 12px!important}
  .modal-actions{position:sticky;bottom:0;background:#fff;padding:10px 14px calc(10px + env(safe-area-inset-bottom))!important;border-top:1px solid var(--line);z-index:3}
  .modal-actions .btn{min-height:42px!important;font-size:13px!important}
  .card{border-radius:17px!important;padding:13px!important}
  .filters{gap:9px!important}.filters .btn{min-height:42px!important}
  .timeline-wrap{margin:0 -12px!important}.timeline{font-size:12px!important}.timeline .cell{min-height:54px!important;padding:7px!important}.timeline .head{font-size:12px!important}.timeline .booking{font-size:10px!important;padding:7px!important;border-radius:9px!important}
  .table th,.table td{padding:9px 8px!important;font-size:12px!important}
  .customer-card,.package-progress-card{border-radius:16px!important;padding:12px!important}
}

.guest-system-badge{display:inline-flex;align-items:center;padding:7px 10px;border-radius:999px;background:#eef4ff;color:#3568c8;font-size:12px;font-weight:700;white-space:nowrap}
/* V8.1.0 sync + controlled void */
.sync-badge{position:fixed;right:18px;bottom:18px;z-index:3000;padding:10px 14px;border-radius:999px;background:#fff7d6;border:1px solid #ead58c;box-shadow:0 8px 28px rgba(15,23,42,.16);font-size:13px;font-weight:700;color:#735c00}.sync-badge.needs-review{background:#fff0f0;border-color:#f3b3b3;color:#a32121}.sync-badge.hidden{display:none}.danger-mini,.btn.danger{border-color:#fecaca;color:#b91c1c;background:#fff}.warning-box{padding:14px;border-radius:14px;background:#fff8e8;border:1px solid #f3d48a;margin-bottom:14px}.warning-box p{margin:5px 0 0;color:#715c29;font-size:13px}
@media(max-width:700px){.sync-badge{right:12px;bottom:82px;max-width:calc(100vw - 24px);font-size:12px}.danger-mini{font-size:11px;padding:6px 8px}}

/* ===== V8.1.1 dashboard history ===== */
.dashboard-history-filter{display:flex;align-items:end;gap:12px;padding:16px;margin-bottom:12px;flex-wrap:wrap}.dashboard-history-filter .field{min-width:170px;margin:0}.dashboard-date-caption{font-size:13px;color:#6b7891;margin:2px 2px 12px}.completed-detail-card{display:grid;grid-template-columns:1fr 1fr;gap:12px}.completed-detail-card>div{padding:12px;border:1px solid #e3e9f3;border-radius:12px;background:#f8faff}.completed-detail-card small{display:block;color:#71809a;margin-bottom:4px}.completed-detail-card b{font-size:14px}.timeline .booking.is-completed{opacity:.78;background:#eef8f1;border-left-color:#26a269}.timeline-done-dot{float:right;color:#168b52;font-weight:800}.btn.danger{background:#c93636;color:#fff;border-color:#c93636}.danger-mini{background:#fff1f1!important;color:#b42318!important;border:1px solid #f0b7b4!important;border-radius:8px;padding:7px 10px!important;font-weight:700}
@media(max-width:768px){.dashboard-history-filter{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:12px}.dashboard-history-filter .field{min-width:0}.dashboard-history-filter .btn{min-height:40px}.dashboard-date-caption{padding:0 4px}.completed-detail-card{grid-template-columns:1fr}.dashboard-section .actions .danger-mini{width:auto;min-height:34px;font-size:12px}.booking-card .booking-state{align-items:flex-end}.booking-card .actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:5px}}
/* =========================================================
   V8.2.0 — MINH TAM SaaS UI SYSTEM
   Visual redesign only. Business logic remains V8.1.1.
   ========================================================= */
:root{
  --navy:#0f172a; --blue:#1687f8; --blue-2:#2f80ed; --blue-soft:#eaf5ff;
  --bg:#f6f8fb; --card:#ffffff; --text:#111827; --muted:#7b8799;
  --line:#e9edf3; --line-strong:#dce3ec; --danger:#e5484d; --green:#21a366;
  --orange:#f5a524; --purple:#8b5cf6; --radius:14px;
  --shadow:0 8px 28px rgba(15,23,42,.055); --shadow-lg:0 22px 70px rgba(15,23,42,.16);
}
html{background:var(--bg)}
body{font-family:Inter,"Segoe UI",Roboto,Arial,sans-serif;background:var(--bg);color:var(--text);font-size:14px;letter-spacing:-.005em}
button,input,select,textarea{font-family:inherit}
.app{background:var(--bg)}
/* Sidebar */
.sidebar{width:226px;background:#fff;color:var(--text);border-right:1px solid var(--line);padding:18px 14px 16px;box-shadow:none;display:flex;flex-direction:column}
.side-brand{margin:0 6px 18px;gap:10px;min-height:46px}
.side-brand span,.topbar-logo,.avatar-mini{background:linear-gradient(145deg,#1989ff,#5d7cff);box-shadow:0 7px 17px rgba(22,135,248,.2)}
.side-brand span{width:38px;height:38px;border-radius:11px;font-size:13px}
.side-brand>div{display:grid;gap:1px}.side-brand b{font-size:15px}.side-brand small{font-size:10px;color:#9aa4b2}
.sidebar nav{display:block;overflow:auto;flex:1;padding-right:2px;scrollbar-width:thin}
.nav-label{font-size:9px;font-weight:800;letter-spacing:.12em;color:#a4adba;padding:16px 10px 7px}
.sidebar nav button{width:100%;display:flex;align-items:center;gap:10px;color:#556273;background:transparent;border:0;border-radius:9px;padding:9px 10px;margin:1px 0;font-size:12px;font-weight:600;transition:.15s}
.sidebar nav button:hover{background:#f4f7fa;color:#172033}.sidebar nav button.active{background:#dff1ff;color:#0c78dc;font-weight:750}
.nav-icon{width:20px;height:20px;display:grid;place-items:center;font-size:13px;color:#7f91a8}.sidebar nav button.active .nav-icon{color:#0c78dc}
.side-account{position:static;margin-top:12px;padding:13px 8px 0;border-top:1px solid var(--line)}
.side-user{display:flex;align-items:center;gap:8px;margin-bottom:8px}.avatar-mini{display:grid;place-items:center;width:32px;height:32px;border-radius:50%;color:#fff;font-size:10px;font-weight:800}.side-user div{display:grid}.side-user b{font-size:11px}.side-user small{font-size:9px;color:#9aa4b2}
.logout-btn{background:transparent;color:#7b8799;border:0;text-align:left;padding:8px 4px;font-size:11px;box-shadow:none}
/* Header */
.topbar{left:226px;height:62px;background:rgba(255,255,255,.94);border-bottom:1px solid var(--line);backdrop-filter:blur(14px);padding:0 24px;box-shadow:none}
.topbar-brand{display:none!important}.topbar-actions{margin-left:auto;display:flex!important;flex-direction:row!important;align-items:center;gap:10px}
.topbar-chip{border:1px solid var(--line);background:#fff;color:#667085;border-radius:999px;padding:7px 10px;font-size:10px;font-weight:700}.online-dot{display:inline-block;width:6px;height:6px;border-radius:50%;background:#22c55e;margin-right:5px}
.quick-create{min-height:38px;padding:9px 14px!important;border-radius:10px!important;font-size:12px!important;box-shadow:0 7px 18px rgba(22,135,248,.22)!important}
.topbar-menu{display:none}
/* Main/page */
.main{margin-left:226px;padding:84px 26px 36px;max-width:1680px}
.page-head{align-items:center;margin-bottom:18px;min-height:56px}.eyebrow{display:none}.page-head h2{font-size:26px;line-height:1.1;letter-spacing:-.03em;margin:0 0 5px;font-weight:780}.page-head p{font-size:11px;color:#9aa4b2;margin:0}.page-head .btn{font-size:11px;padding:9px 13px;border-radius:9px}
/* Components */
.card{border:1px solid var(--line);border-radius:13px;padding:16px;background:#fff;box-shadow:var(--shadow)}
.btn{border-radius:9px;padding:10px 14px;font-size:12px;font-weight:700;transition:.15s}.btn.primary{background:#1687f8;box-shadow:0 7px 18px rgba(22,135,248,.18)}.btn.primary:hover{background:#0878e8;transform:translateY(-1px)}.btn.ghost{background:#f5f7fa;color:#344054;border:1px solid #edf0f4}.btn.danger{background:#e5484d}.icon-btn{color:#667085}
.filters,.dashboard-history-filter{background:#fff;border:1px solid var(--line);box-shadow:none;padding:14px 16px!important;border-radius:13px!important;gap:10px!important}
.field{gap:5px}.field label{font-size:10px;color:#667085;font-weight:700}.field input,.field select,.field textarea{min-height:38px;padding:9px 11px;border:1px solid #dfe5ec;border-radius:8px;background:#fff;color:#1f2937;font-size:12px;outline:none}.field input:focus,.field select:focus,.field textarea:focus{border-color:#72b7ff;box-shadow:0 0 0 3px #eaf5ff}
/* KPI cards like SaaS refs */
.kpis{gap:12px}.kpi{position:relative;overflow:hidden;padding:15px 16px!important;min-height:96px;box-shadow:none}.kpi:before{content:"";position:absolute;left:0;top:0;bottom:0;width:3px;background:#1687f8}.kpi:nth-child(2):before{background:#f5a524}.kpi:nth-child(3):before{background:#21a366}.kpi:nth-child(4):before{background:#8b5cf6}.kpi small{font-size:10px!important;color:#8a95a5}.kpi strong{font-size:24px!important;margin-top:9px!important;letter-spacing:-.03em}
.dashboard-date-caption{font-size:10px;color:#9aa4b2;margin:8px 2px 10px}
.dashboard-feed{gap:12px;margin-top:14px}.dashboard-section{box-shadow:none!important;border:1px solid var(--line)!important}.section-heading{padding:15px 16px 10px}.section-heading h3{font-size:14px}.section-heading small{font-size:10px}
/* Tables */
.table-wrap{border-radius:11px;overflow:auto}.table{font-size:11px}.table th{background:#fafbfc;color:#8a95a5;font-size:9px;font-weight:800;letter-spacing:.02em;padding:10px 11px;border-bottom:1px solid var(--line)}.table td{padding:11px;border-bottom:1px solid #f0f2f5;color:#344054}.table tr:hover td{background:#fbfdff}.actions button{border:1px solid var(--line);border-radius:7px;background:#fff;color:#475467;padding:6px 8px;font-size:10px}.actions button:hover{border-color:#b9d9fb;background:#f3f9ff;color:#0878e8}
/* Timeline */
.timeline-wrap{border-radius:11px}.timeline{border-color:var(--line);border-radius:11px;background:#fff}.timeline .head{background:#fafbfc;color:#475467;font-size:10px}.timeline .time{background:#fcfcfd;font-size:10px}.timeline .cell{min-height:50px;border-color:#edf0f4}.booking{background:#edf6ff;border-left:3px solid #1687f8;border-radius:7px;font-size:10px;padding:6px 8px;box-shadow:0 2px 7px rgba(22,135,248,.08)}.timeline .booking.is-completed{background:#effaf4;border-left-color:#21a366}
/* Customers/cards */
.mini-kpis>div,.customer-card,.package-progress-card{border:1px solid var(--line)!important;box-shadow:none!important}.customer-card{background:#fff}.customer-avatar{background:linear-gradient(145deg,#1687f8,#6b7cff)!important}
/* Modal */
.modal{background:rgba(16,24,40,.48);backdrop-filter:blur(3px)}.modal-card{width:min(720px,94vw);border-radius:16px;box-shadow:var(--shadow-lg);border:1px solid rgba(255,255,255,.7)}.modal-head{padding:15px 18px;border-bottom:1px solid var(--line)}.modal-head h3{font-size:15px}.form-grid{padding:18px;gap:12px}.modal-actions{padding:0 18px 18px}.modal-actions .btn{min-width:90px}
/* Status */
.status-pill,.booking-state>span{border-radius:999px!important;font-weight:700!important}.status-pill.done{background:#eaf8f0!important;color:#168a50!important}.status-pill.deleted{background:#f2f4f7!important;color:#667085!important}.danger-mini{border-radius:7px!important;font-size:9px!important;padding:6px 8px!important}
/* Login */
.login-shell{background:linear-gradient(135deg,#f6f8fb 0%,#edf5ff 100%)}.login-card{border-radius:18px;box-shadow:0 24px 70px rgba(15,23,42,.12);border:1px solid #eef1f5;padding:30px}.brand-mark{width:48px;height:48px;border-radius:13px;font-size:15px}.login-card h1{font-size:24px;letter-spacing:-.03em}.login-card p{font-size:12px}.login-card label{font-size:11px}.login-card input{border-radius:9px;min-height:42px;font-size:12px}
/* Scrollbars */
*{scrollbar-width:thin;scrollbar-color:#cbd5e1 transparent}*::-webkit-scrollbar{width:6px;height:6px}*::-webkit-scrollbar-thumb{background:#cbd5e1;border-radius:99px}
/* Mobile: native app feel */
@media(max-width:800px){
  body{background:#f5f7fa}.sidebar{top:0;width:min(86vw,320px)!important;height:100dvh!important;border-right:1px solid var(--line);box-shadow:12px 0 40px rgba(15,23,42,.12);padding-top:14px}.sidebar.open{transform:none}.side-brand{display:flex!important}.mobile-drawer-title{display:none!important}.nav-label{padding-top:12px}.sidebar nav{display:block!important;padding:0!important}.sidebar nav button{min-height:40px!important;font-size:12px!important;padding:8px 9px!important;border-radius:9px!important}.side-account{display:block!important}
  .topbar{left:0;height:56px;padding:0 12px;background:#fff}.topbar-brand{display:flex!important;flex-direction:row!important;align-items:center!important;gap:8px}.topbar-logo{width:34px!important;height:34px!important;border-radius:10px!important;font-size:11px!important}.topbar-copy{display:grid!important}.topbar-copy strong{font-size:13px!important}.topbar-copy small{font-size:9px!important}.topbar-actions{margin-left:auto}.topbar-chip,.quick-create{display:none!important}.topbar-menu{display:grid!important;place-items:center;width:38px!important;height:38px!important;border:1px solid var(--line)!important;border-radius:10px!important;background:#fff!important;font-size:18px!important}
  .main{margin-left:0;padding:72px 10px calc(76px + env(safe-area-inset-bottom))!important}.page-head{min-height:44px;margin-bottom:11px!important}.page-head h2{font-size:20px!important}.page-head p{font-size:10px!important}.page-head .btn{position:fixed;right:12px;bottom:76px;z-index:45;border-radius:999px!important;box-shadow:0 10px 28px rgba(22,135,248,.25)!important}
  .card{border-radius:12px!important;padding:12px!important;box-shadow:none!important}.dashboard-history-filter{grid-template-columns:1fr 1fr!important;padding:10px!important;gap:7px!important}.dashboard-history-filter .btn{min-height:36px!important;padding:8px!important}.field input,.field select,.field textarea{min-height:39px!important;font-size:12px!important;padding:8px 10px!important}.field label{font-size:9px!important}
  .dashboard-kpis{display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important}.dashboard-kpis .kpi{height:76px!important;min-height:76px!important;padding:11px!important}.dashboard-kpis .kpi strong{font-size:19px!important}.dashboard-kpis .kpi small{font-size:9px!important}.dashboard-feed{gap:9px!important}.section-heading{padding:12px!important}.section-heading h3{font-size:13px!important}.booking-card{grid-template-columns:50px minmax(0,1fr)!important;padding:10px 11px!important}.booking-main{padding-right:64px!important}.booking-main strong{font-size:12px!important}.booking-main span{font-size:10px!important}.booking-time b{font-size:13px!important}.booking-state{right:9px!important;top:9px!important}.booking-state .actions button{font-size:9px!important;padding:4px 6px!important;min-height:25px!important}
  .bottom-nav{height:62px!important;background:rgba(255,255,255,.97)!important;border-top:1px solid var(--line)!important;border-radius:0!important;box-shadow:0 -8px 28px rgba(15,23,42,.08)!important}.bottom-nav button{font-size:16px!important}.bottom-nav button b{font-size:17px}.bottom-nav span{font-size:8px!important}.bottom-nav .book-fab{width:50px!important;height:50px!important;background:#1687f8!important;font-size:26px!important;margin-top:-20px!important}
  .modal{align-items:end;padding:0!important}.modal-card{width:100%!important;max-height:91dvh!important;border-radius:18px 18px 0 0!important}.modal-head{padding:13px 14px!important}.modal-head h3{font-size:14px!important}.form-grid{padding:13px!important;gap:9px!important}.modal-actions{padding:9px 13px calc(9px + env(safe-area-inset-bottom))!important}.modal-actions .btn{min-height:39px!important;font-size:11px!important}
  .filters{display:grid!important;grid-template-columns:1fr 1fr!important;padding:10px!important}.timeline-wrap{margin:0 -2px!important}.timeline{min-width:660px!important}.timeline .cell{min-height:45px!important}.table th,.table td{padding:8px 7px!important;font-size:10px!important}
}
@media(min-width:801px) and (max-width:1100px){.sidebar{width:205px}.topbar{left:205px}.main{margin-left:205px;padding-left:20px;padding-right:20px}.sidebar nav button{font-size:11px}.kpis{grid-template-columns:repeat(2,1fr)}}


/* ===== V8.3.2 TIME + TIMELINE FIX =====
   Sticky tên nhân viên khi cuộn dọc; cố định cột giờ khi cuộn ngang.
   .timeline trước đây có overflow:hidden làm sticky header không bám đúng timeline-wrap.
*/
.timeline-wrap{
  position:relative!important;
  overflow:auto!important;
  max-height:65vh!important;
  border-radius:11px!important;
}
.timeline{
  overflow:visible!important;
}
.timeline .cell.head{
  position:sticky!important;
  top:0!important;
  z-index:8!important;
  background:#f8faff!important;
  box-shadow:0 1px 0 var(--line),0 4px 10px rgba(15,23,42,.05);
}
.timeline .cell.time{
  position:sticky!important;
  left:0!important;
  z-index:6!important;
  background:#fcfcfd!important;
}
.timeline .timeline-corner{
  left:0!important;
  z-index:10!important;
}
.timeline .booking.is-second-employee{
  border-left-style:dashed!important;
}
.timeline .booking b{
  line-height:1.25;
}

/* ===== V9.0 APP-LIKE UI / MOBILE / REPORTS ===== */
:root{--v9-bg:#f7f7f1;--v9-card:#fff;--v9-ink:#152033;--v9-muted:#758091;--v9-soft:#eef3e4;--v9-accent:#2188f7;--v9-lime:#8fba28;--v9-line:#e9ece7}
html,body{max-width:100%;overflow-x:hidden}
body{background:linear-gradient(180deg,#fbfbf6 0,#f5f7fa 360px)}
.main{min-width:0}.main>#content{min-width:0;max-width:100%}.card{border-radius:20px;border:1px solid rgba(222,226,221,.9);box-shadow:0 8px 28px rgba(20,35,50,.045)}
.role-hidden{display:none!important}.report-hero{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:22px 24px;margin-bottom:16px;border-radius:24px;background:linear-gradient(135deg,#f4f7e6,#f8fbff 58%,#eef6ff);border:1px solid #e4e9df}.report-hero h3{font-size:24px;margin:5px 0 4px;letter-spacing:-.03em}.report-hero p{margin:0;color:var(--v9-muted);font-size:12px}.report-badge{font-size:9px;font-weight:900;letter-spacing:.12em;color:#6f8f17;background:#edf6d5;border-radius:999px;padding:6px 9px}
.finance-filter-grid,.report-filter{display:flex;align-items:end;gap:12px;flex-wrap:wrap;padding:16px}.finance-filter-grid>.field,.report-filter>.field{min-width:145px;flex:1}.compare-custom{display:flex;gap:10px;flex:2}.compare-custom>.field{flex:1}.modern-kpis{margin-bottom:16px}.modern-kpis .kpi{border-radius:20px!important;min-width:0}.modern-kpis .trend{display:inline-flex;margin-top:8px;font-size:10px;font-weight:800;border-radius:999px;padding:4px 7px}.trend.up{background:#eaf8ee;color:#18794e}.trend.down{background:#fff0ef;color:#c33b32}
.report-card{margin-top:16px;padding:18px}.compare-chart{padding:8px 0}.compare-row{display:grid;grid-template-columns:180px 1fr 1fr;gap:10px;align-items:center;margin:14px 0}.compare-label{display:flex;flex-direction:column;gap:3px}.compare-label b{font-size:11px}.compare-label span{font-size:9px;color:var(--v9-muted)}.bar-track{height:11px;background:#edf0f3;border-radius:999px;overflow:hidden}.bar-track i{height:100%;display:block;border-radius:999px}.bar-current{background:linear-gradient(90deg,#1587f8,#68b4ff)}.bar-previous{background:linear-gradient(90deg,#9ec331,#c5dc7a)}.chart-legend{display:flex;justify-content:flex-end;gap:14px;color:var(--v9-muted);font-size:9px}.legend-dot{width:8px;height:8px;border-radius:50%;display:inline-block;margin-right:5px}.legend-dot.current{background:#2188f7}.legend-dot.previous{background:#9ec331}
.mobile-table-list{display:none}.pay-card,.account-card,.readonly-row{border:1px solid var(--v9-line);background:#fff;border-radius:18px;padding:14px}.pay-card+.pay-card,.account-card+.account-card,.readonly-row+.readonly-row{margin-top:10px}.pay-card-head{display:flex;justify-content:space-between;align-items:start;gap:10px}.pay-card-head>div{display:grid}.pay-card-head small{color:var(--v9-muted);margin-top:3px}.pay-card-head strong{font-size:17px}.pay-card-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:8px;margin-top:12px}.pay-card-grid span{background:#f8faf6;border-radius:12px;padding:9px;display:grid;font-size:9px;color:var(--v9-muted)}.pay-card-grid b{color:var(--v9-ink);font-size:11px;margin-top:3px}.employee-report-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:16px}.period-caption{font-size:11px;color:var(--v9-muted);margin:12px 3px}
.account-list{padding:4px}.account-card{display:flex;align-items:center;gap:12px}.account-avatar{width:42px;height:42px;border-radius:14px;background:linear-gradient(135deg,#248bf8,#6caeff);color:#fff;display:grid;place-items:center;font-weight:900}.account-main{display:grid;flex:1;min-width:0}.account-main span,.account-main small{color:var(--v9-muted);font-size:10px;margin-top:2px}.permission-note{margin:0 18px 16px;padding:12px 14px;border-radius:14px;background:#f5f8ea;color:#53613c;font-size:10px;line-height:1.6}.readonly-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.readonly-row span{display:grid}.readonly-row small{font-size:8px;color:var(--v9-muted)}.readonly-row b{font-size:10px;overflow-wrap:anywhere}

@media(max-width:800px){
  body{background:#f7f8f3}.topbar{padding:0 12px!important}.topbar-copy strong{font-size:13px}.topbar-chip{display:none!important}.quick-create{font-size:0!important;width:42px;height:42px;border-radius:14px!important;padding:0!important}.quick-create:after{content:'＋';font-size:22px}.main{width:100%!important;max-width:100vw!important;overflow-x:hidden!important;padding-left:12px!important;padding-right:12px!important}.main>#content,.card,.grid,.filters,.report-filter,.finance-filter-grid{max-width:100%!important;min-width:0!important;box-sizing:border-box!important}
  .sidebar{overflow-y:auto!important;overflow-x:hidden!important;padding-bottom:calc(84px + env(safe-area-inset-bottom))!important}.sidebar nav{overflow:visible!important;flex:none!important}.side-account{position:static!important;margin-top:18px!important;padding-bottom:20px!important}
  .report-hero{padding:18px;border-radius:22px;align-items:flex-start}.report-hero h3{font-size:20px}.report-hero p{font-size:10px}.report-hero>.btn{white-space:nowrap}
  .finance-filter-grid,.report-filter{display:grid!important;grid-template-columns:1fr 1fr;gap:10px;padding:12px}.finance-filter-grid>.field,.report-filter>.field{min-width:0}.finance-filter-grid>.btn,.report-filter>.btn{grid-column:1/-1;width:100%}.compare-custom{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr}.compare-custom.hidden{display:none!important}
  .kpis,.modern-kpis{grid-template-columns:1fr 1fr!important;gap:10px!important}.kpi{min-height:90px!important;padding:14px!important}.kpi strong{font-size:20px!important;overflow-wrap:anywhere}.kpi small{font-size:9px!important}
  .compare-row{grid-template-columns:1fr;gap:6px;margin:16px 0}.compare-label{flex-direction:row;justify-content:space-between;align-items:center}.chart-legend{justify-content:flex-start;flex-wrap:wrap}
  .desktop-table{display:none!important}.mobile-table-list{display:block!important}.employee-report-grid{grid-template-columns:1fr}.pay-card-grid{grid-template-columns:repeat(2,1fr)}.account-card{align-items:flex-start;flex-wrap:wrap}.account-main{min-width:calc(100% - 58px)}.account-card>.actions{width:100%;display:flex;justify-content:flex-end}.readonly-row{grid-template-columns:1fr 1fr}
  .table-wrap:not(.timeline-wrap){max-width:100%!important;overflow:hidden!important}.table:not(.timeline){width:100%!important;table-layout:fixed!important}.table:not(.timeline) th,.table:not(.timeline) td{white-space:normal!important;overflow-wrap:anywhere!important}
  .timeline-wrap{max-width:calc(100vw - 24px)!important;overflow:auto!important;-webkit-overflow-scrolling:touch}.timeline{min-width:max-content!important}
  .modal-card{max-width:100vw!important;overflow-x:hidden!important}.form-grid{grid-template-columns:1fr!important}.field input,.field select,.field textarea{max-width:100%!important;width:100%!important;box-sizing:border-box!important}
  .bottom-nav{z-index:100!important}.bottom-nav button.role-hidden{display:none!important}
}


/* ===== V9.1 FULL UI/UX POLISH ===== */
:root{--app-bg:#f6f7f3;--app-surface:#fff;--app-ink:#111827;--app-muted:#7a8493;--app-blue:#1487f7;--app-blue-soft:#eaf4ff;--app-lime:#8eb525;--app-line:#e8ebe5;--app-shadow:0 10px 30px rgba(16,24,40,.055)}
body{background:linear-gradient(180deg,#fbfcf8 0,#f5f7f9 380px)!important;color:var(--app-ink)!important}
.main{background:transparent!important;min-width:0!important}.main>#content{min-width:0!important;max-width:100%!important}
.page-head{margin-bottom:16px!important}.page-head .eyebrow{display:none!important}.page-head h2{font-size:26px!important;letter-spacing:-.035em!important;color:#101828!important}.page-head p{margin-top:4px!important;color:#8a93a1!important}
.card{background:#fff!important;border:1px solid var(--app-line)!important;border-radius:22px!important;box-shadow:var(--app-shadow)!important}
.btn{min-height:42px;border-radius:13px!important;transition:.15s transform,.15s box-shadow,.15s opacity}.btn:active{transform:scale(.98)}.btn.primary{background:linear-gradient(135deg,#1688f8,#2878ef)!important;box-shadow:0 9px 22px rgba(20,135,247,.2)!important}
.field label{font-size:11px!important;color:#667085!important;font-weight:800!important}.field input,.field select,.field textarea{min-height:44px!important;border:1px solid #e2e7ec!important;border-radius:13px!important;background:#fff!important;outline:none}.field input:focus,.field select:focus,.field textarea:focus{border-color:#77b7fb!important;box-shadow:0 0 0 3px rgba(20,135,247,.1)!important}
.sidebar{background:#fff!important;color:#344054!important;border-right:1px solid #eef0ec!important;box-shadow:none!important}.side-brand{color:#101828!important;padding:8px 6px 14px!important;border-bottom:1px solid #f0f2ee!important}.side-brand small{color:#98a2b3!important}.sidebar nav{gap:4px!important}.sidebar .nav-label{color:#a1a9b5!important;font-size:9px!important;font-weight:900!important;letter-spacing:.12em!important;margin:12px 10px 5px!important}.sidebar nav button{color:#536170!important;border-radius:12px!important;padding:10px 12px!important;font-weight:650!important}.sidebar nav button:hover{background:#f5f8fb!important;color:#1687f8!important}.sidebar nav button.active{background:#e6f3ff!important;color:#087edc!important;font-weight:850!important}.nav-icon{color:#8b9aaa!important}.sidebar nav button.active .nav-icon{color:#1687f8!important}.side-account{background:#fff!important;border-top:1px solid #eef0ec!important;color:#344054!important}.logout-btn{background:#f7f8fa!important;color:#667085!important}
.topbar{background:rgba(255,255,255,.96)!important;border-bottom:1px solid #eef0ec!important;box-shadow:none!important}.topbar-chip{border-color:#e8ece7!important}
.report-hero{background:linear-gradient(135deg,#f6f9e8 0,#f5f9ff 58%,#edf6ff 100%)!important;border:1px solid #e5eadf!important;box-shadow:none!important}.report-card{overflow:hidden}
.table-wrap{border:1px solid #edf0eb!important;border-radius:16px!important;background:#fff!important}.table th{background:#fafbf8!important;color:#7b8491!important;font-size:10px!important;font-weight:850!important;border-bottom:1px solid #e9ece6!important}.table td{border-bottom:1px solid #f0f2ee!important}.table tbody tr:hover{background:#fbfcf9!important}
.kpi{position:relative;overflow:hidden}.kpi:before{content:'';position:absolute;left:0;top:0;bottom:0;width:3px;background:#1687f8}.kpi:nth-child(2):before{background:#f4b223}.kpi:nth-child(3):before{background:#20b66b}.kpi:nth-child(4):before{background:#8c61ff}.kpi small{font-size:10px!important;color:#7d8795!important}.kpi strong{font-size:25px!important;letter-spacing:-.04em!important}
.dashboard-toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:15px 17px!important;margin-bottom:14px!important}.dashboard-toolbar-copy{display:grid;gap:2px}.dashboard-toolbar-copy b{font-size:14px}.dashboard-toolbar-copy small{font-size:10px;color:#8b95a3}.dashboard-toolbar-label{font-size:8px;color:#8eb525;font-weight:900;letter-spacing:.12em}.dashboard-range-actions{display:flex;gap:7px;flex-wrap:wrap}.range-pill{border:1px solid #e4e9df;background:#fff;color:#667085;border-radius:999px;padding:9px 13px;font-size:10px;font-weight:800;cursor:pointer}.range-pill.active{background:#e8f4ff;border-color:#bcdcff;color:#087edc}.dashboard-date-caption{margin:8px 3px 12px;color:#8993a1;font-size:10px}
.dashboard-feed{display:grid;gap:14px!important;margin-top:14px}.dashboard-section{padding:0!important;overflow:hidden}.section-heading{padding:16px 17px!important;border-bottom:1px solid #eff1ed!important;background:#fff!important}.section-heading h3{margin:0!important;font-size:14px!important;letter-spacing:-.02em!important}.section-heading small{color:#99a1ad!important}.dashboard-empty{padding:24px 17px!important;color:#98a2b3!important}
.booking-card-list{padding:10px!important;display:grid!important;gap:8px!important}.booking-card{border:1px solid #edf0eb!important;background:#fff!important;border-radius:16px!important;box-shadow:0 4px 14px rgba(16,24,40,.025)!important}.booking-card:hover{border-color:#dce8f2!important;box-shadow:0 7px 20px rgba(16,24,40,.055)!important}.booking-time{background:#f8faf6!important;border-radius:12px!important}.booking-branch{display:inline-flex!important;align-items:center;gap:4px;color:#718096!important;margin-top:4px!important}.actions button{border-radius:10px!important;cursor:pointer!important;min-height:30px}
.create-choice-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important;padding:16px 16px 10px!important;width:100%!important;max-width:100%!important;overflow:hidden!important}.create-choice{min-width:0!important;width:100%!important;min-height:130px!important;border:1px solid #e0e8f1!important;border-radius:18px!important;background:linear-gradient(180deg,#fff,#f9fbfe)!important;padding:20px!important;text-align:left!important;cursor:pointer!important;display:flex!important;flex-direction:column!important;gap:9px!important;color:#344054!important}.create-choice:hover,.create-choice:focus{border-color:#82bbf8!important;background:#f5faff!important;box-shadow:0 8px 22px rgba(20,135,247,.08)!important}.create-choice b{font-size:17px!important;color:#1d2939!important}.create-choice span{font-size:12px!important;line-height:1.55!important;color:#7a8697!important}.create-choice.walkin{background:linear-gradient(180deg,#fbfdff,#f4f8ff)!important}
.modal{z-index:500!important}.modal-card{overflow-x:hidden!important;border-radius:20px!important}.modal-head{border-bottom:1px solid #edf0eb!important}.modal-head .icon-btn{width:36px;height:36px;border-radius:11px!important;background:#f7f8fa!important;font-size:20px!important}
#quickBook{position:relative!important;z-index:3!important;pointer-events:auto!important;touch-action:manipulation!important}.quick-create{cursor:pointer!important;user-select:none!important}
.finance-filter-grid,.report-filter{box-shadow:var(--app-shadow)!important}
@media(max-width:800px){
  .main{padding-left:10px!important;padding-right:10px!important;overflow-x:hidden!important}.page-head h2{font-size:22px!important}.page-head p{font-size:10px!important}
  .sidebar{background:#fff!important;color:#344054!important;height:calc(100dvh - 56px)!important;overflow-y:auto!important;padding-bottom:90px!important}.mobile-drawer-title{color:#7b8491!important}.sidebar nav{grid-template-columns:1fr!important;padding:8px 10px 20px!important}.sidebar nav button{min-height:46px!important;background:#fff!important;border:0!important}.sidebar nav button.active{background:#e7f3ff!important}.side-account{position:static!important;margin-top:8px!important;padding-bottom:18px!important}
  .dashboard-toolbar{align-items:flex-start;flex-direction:column!important}.dashboard-range-actions{width:100%}.range-pill{flex:1}.kpis,.modern-kpis{display:grid!important;grid-template-columns:1fr 1fr!important;overflow:visible!important}.kpis .kpi{min-width:0!important;width:auto!important}
  .booking-card{grid-template-columns:54px minmax(0,1fr)!important;padding:10px!important;min-width:0!important}.booking-main{min-width:0!important;padding-right:0!important}.booking-state{position:static!important;grid-column:1/-1!important;display:flex!important;justify-content:space-between!important;align-items:center!important;border-top:1px solid #f0f2ee!important;padding-top:8px!important;margin-top:6px!important}.booking-state .actions{flex-wrap:wrap!important;justify-content:flex-end!important}.desktop-booking-table{display:none!important}
  .create-choice-grid{grid-template-columns:1fr!important;padding:12px!important}.create-choice{min-height:104px!important;padding:16px!important}.modal-card{max-width:100vw!important;width:100%!important}.form-grid,.report-filter,.finance-filter-grid{max-width:100%!important;overflow:hidden!important}.table-wrap:not(.timeline-wrap){overflow:hidden!important}.table:not(.timeline){table-layout:fixed!important;width:100%!important}.table:not(.timeline) th,.table:not(.timeline) td{white-space:normal!important;word-break:break-word!important}.timeline-wrap{max-width:calc(100vw - 20px)!important}
}


/* =========================================================
   V9.3 FINAL RESPONSIVE DESIGN SYSTEM
   Desktop = data-rich. Mobile = card/app-first.
   ========================================================= */
:root{
  --v93-bg:#f6f7f4;--v93-card:#fff;--v93-ink:#182230;--v93-muted:#84909f;
  --v93-line:#e7ebe5;--v93-blue:#1689f8;--v93-blue2:#3b72f2;
  --v93-soft:#edf6ff;--v93-green:#8db826;--v93-danger:#d94c4c;
  --v93-shadow:0 10px 28px rgba(25,39,59,.06);
}
html,body{max-width:100%;overflow-x:hidden}
body{background:linear-gradient(180deg,#fcfcf9 0,#f5f7fa 420px)!important}
.main{min-width:0!important;overflow-x:hidden!important}
.main>#content{min-width:0!important;max-width:100%!important}
.card{border:1px solid var(--v93-line)!important;border-radius:20px!important;background:#fff!important;box-shadow:var(--v93-shadow)!important}
.page-head{padding:4px 2px 0!important}.page-head h2{font-size:25px!important}.page-head p{font-size:11px!important;color:#8f99a7!important}
.sidebar{background:#fff!important;border-right:1px solid #edf0eb!important;color:#455365!important}
.sidebar nav button{border-radius:12px!important}.sidebar nav button.active{background:#e8f4ff!important;color:#087ddb!important}
.topbar{background:rgba(255,255,255,.97)!important;border-bottom:1px solid #eef0ec!important}

/* Desktop tables remain tables */
.entity-mobile{display:none}
.entity-table-card{padding:0!important;overflow:hidden!important}
.entity-table-card .table-wrap{border:0!important;border-radius:0!important}
.entity-table th{padding:12px 14px!important;background:#fafbf8!important}
.entity-table td{padding:13px 14px!important;vertical-align:middle!important}
.entity-actions-col{width:116px}
.entity-actions{white-space:nowrap!important}
.entity-edit,.entity-delete{min-height:32px!important}
.entity-delete{color:#b54747!important}

/* Dashboard control */
.dashboard-control{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;padding:16px!important;margin-bottom:14px!important}
.dash-date-pick{min-width:220px}.dash-date-buttons{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.date-mode{min-width:190px;border:1px solid #e4e8e2;background:#fff;border-radius:14px;padding:9px 13px;text-align:left;cursor:pointer}
.date-mode span{display:block;font-size:9px;text-transform:uppercase;letter-spacing:.08em;color:#98a2b3;font-weight:800}
.date-mode b{display:block;margin-top:2px;font-size:12px;color:#475467}
.date-mode.active{background:#edf6ff;border-color:#b9dcff;box-shadow:0 5px 16px rgba(22,137,248,.08)}
.date-mode.active b{color:#087ddb}
.v93-booking-list{display:none}
.dashboard-section{padding:0!important;overflow:hidden}.section-heading{padding:16px 18px!important;border-bottom:1px solid #eef1ec!important}.section-heading h3{font-size:14px!important}.section-heading small{font-size:10px!important;color:#98a2b3!important}
.dashboard-table td,.dashboard-table th{white-space:normal!important}

/* All modals */
.modal{background:rgba(20,28,42,.5)!important;backdrop-filter:blur(5px)!important}
.v93-modal-card{width:min(760px,calc(100vw - 34px))!important;max-height:min(88dvh,820px)!important;border-radius:22px!important;border:1px solid rgba(255,255,255,.8)!important;box-shadow:0 28px 80px rgba(15,23,42,.25)!important;overflow:hidden!important;background:#fff!important;display:flex!important;flex-direction:column!important}
.v93-modal-card .modal-head{position:sticky!important;top:0!important;flex:0 0 auto!important;padding:17px 20px!important;background:rgba(255,255,255,.98)!important;border-bottom:1px solid #edf0eb!important}
.v93-modal-card .modal-head h3{font-size:17px!important;letter-spacing:-.02em!important}
.v93-modal-card #modalBody{overflow:auto!important;overscroll-behavior:contain}
.v93-modal-card .form-grid{padding:18px 20px!important;gap:13px!important}
.v93-modal-card .field label{font-size:10px!important;letter-spacing:.02em!important;color:#667085!important}
.v93-modal-card .field input,.v93-modal-card .field select,.v93-modal-card .field textarea{min-height:46px!important;border-radius:13px!important;border:1px solid #e1e6eb!important;background:#fbfcfa!important;font-size:13px!important}
.v93-modal-card .modal-actions{position:sticky!important;bottom:0!important;background:rgba(255,255,255,.98)!important;border-top:1px solid #edf0eb!important;padding:12px 20px!important;margin:0!important;z-index:3!important}
.v93-modal-card .modal-actions .btn{min-height:42px!important;border-radius:12px!important}
.create-choice-grid{padding:18px 20px 8px!important;gap:12px!important}
.create-choice{border-radius:18px!important;min-height:126px!important;padding:18px!important;border:1px solid #dfe8f1!important;background:linear-gradient(180deg,#fff,#f8fbff)!important}
.create-choice b{font-size:17px!important}.create-choice span{font-size:12px!important;line-height:1.55!important;color:#7a8697!important}

/* buttons */
.btn.primary,#quickBook{background:linear-gradient(135deg,var(--v93-blue),var(--v93-blue2))!important;border:0!important;box-shadow:0 8px 22px rgba(22,137,248,.2)!important}
.soft-danger{background:#fff5f5!important;color:#c24141!important;border:1px solid #f3d7d7!important}

/* Mobile */
@media(max-width:800px){
  body{background:#f6f7f5!important}
  .main{padding:80px 12px calc(104px + env(safe-area-inset-bottom))!important}
  .page-head{margin:8px 5px 16px!important}.page-head h2{font-size:27px!important;line-height:1.08!important}.page-head p{font-size:12px!important;margin-top:6px!important}
  .topbar{height:66px!important;padding:0 18px!important}.topbar-copy strong{font-size:17px!important}.topbar-copy small{font-size:11px!important}

  /* One natural scroll for drawer — no inner locked nav. */
  .sidebar{top:66px!important;height:calc(100dvh - 66px)!important;width:min(88vw,354px)!important;overflow-y:auto!important;overflow-x:hidden!important;padding-bottom:110px!important;display:block!important;overscroll-behavior:contain}
  .sidebar::-webkit-scrollbar{width:0}.sidebar nav{display:block!important;overflow:visible!important;padding:10px 14px 12px!important}
  .sidebar .nav-label{margin:16px 9px 7px!important}.sidebar nav button{width:100%!important;min-height:46px!important;margin:3px 0!important;padding:0 14px!important;font-size:14px!important;background:#fff!important;border:0!important;color:#536170!important}
  .sidebar nav button.active{background:#e8f4ff!important;color:#087ddb!important}
  .side-account{position:static!important;background:#fff!important;padding:10px 14px 24px!important;border-top:1px solid #eef0ec!important;color:#475467!important}
  .side-user{display:flex!important}.side-account #logoutBtn{display:block!important}
  .mobile-drawer-title{color:#7b8794!important;background:#fff!important;position:sticky!important;top:0!important;z-index:3!important;padding:12px 14px!important}

  /* Entity pages become cards: no horizontal table, no clipped columns. */
  .entity-desktop{display:none!important}.entity-mobile{display:grid!important;gap:12px!important}
  .mobile-data-card{background:#fff;border:1px solid #e7ebe5;border-radius:20px;padding:16px;box-shadow:0 7px 22px rgba(25,39,59,.045)}
  .mobile-data-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;padding-bottom:12px;border-bottom:1px solid #eef1ed}
  .mobile-data-title{display:grid;gap:4px;min-width:0}.mobile-data-title strong{font-size:16px;line-height:1.25;color:#182230}.mobile-data-title span{font-size:11px;color:#8b95a3}
  .mobile-id-chip{flex:0 0 auto;padding:5px 8px;border-radius:999px;background:#eef6ff;color:#1578d4;font-size:10px;font-weight:800}
  .mobile-data-grid{display:grid;grid-template-columns:1fr 1fr;gap:0;margin-top:4px}
  .mobile-data-field{padding:11px 8px 10px 0;border-bottom:1px solid #f0f2ee;min-width:0}.mobile-data-field:nth-child(even){padding-left:10px}
  .mobile-data-field span{display:block;font-size:9px;color:#98a2b3;margin-bottom:4px}.mobile-data-field b{display:block;font-size:12px;color:#475467;line-height:1.35;overflow-wrap:anywhere}
  .mobile-data-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding-top:13px}.mobile-data-actions .btn{min-height:42px!important}

  /* KPI fixed 2-column grid instead of horizontal scrolling. */
  .kpis,.modern-kpis{display:grid!important;grid-template-columns:1fr 1fr!important;gap:10px!important;overflow:visible!important}
  .kpis .kpi,.modern-kpis .kpi{min-width:0!important;width:auto!important;padding:15px!important;border-radius:18px!important}
  .kpi small{font-size:9px!important}.kpi strong{font-size:22px!important;line-height:1.1!important;overflow-wrap:anywhere}

  /* Dashboard controls fit one screen. */
  .dashboard-control{display:grid!important;grid-template-columns:1fr!important;align-items:stretch!important;padding:13px!important;gap:10px!important}
  .dash-date-pick{width:100%;min-width:0}.dash-date-buttons{width:100%;grid-template-columns:1fr 1fr!important}
  .date-mode{min-width:0!important;width:100%!important;padding:9px 10px!important}.date-mode span{font-size:8px!important}.date-mode b{font-size:10px!important}

  /* Dashboard booking cards — clean app layout, no jumping rows. */
  .desktop-booking-table{display:none!important}.v93-booking-list{display:grid!important;gap:10px!important;padding:10px!important}
  .v93-booking-card{display:grid!important;grid-template-columns:76px minmax(0,1fr)!important;gap:12px!important;padding:13px!important;border:1px solid #e8ece7!important;border-radius:18px!important;background:#fff!important;box-shadow:0 4px 16px rgba(25,39,59,.035)!important;min-width:0!important}
  .v93-timebox{display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:flex-start!important;padding:9px 6px!important;border-radius:14px!important;background:linear-gradient(180deg,#f3f9ff,#fafcf5)!important;min-width:0!important}
  .v93-timebox b{font-size:20px!important;color:#167bd5!important;line-height:1!important}.v93-timebox span{font-size:10px!important;color:#8b95a3!important;margin-top:7px!important;white-space:nowrap!important}
  .v93-booking-info{min-width:0!important}.v93-booking-top{display:flex!important;align-items:flex-start!important;justify-content:space-between!important;gap:8px!important}.v93-booking-top strong{font-size:15px!important;min-width:0!important}.v93-status{font-size:9px!important;background:#f0f5f7!important;color:#64748b!important;border-radius:999px!important;padding:5px 7px!important;white-space:nowrap!important}
  .v93-service{font-size:12px!important;color:#536170!important;margin-top:5px!important;line-height:1.35!important}.v93-meta{display:grid!important;gap:3px!important;margin-top:8px!important;font-size:10px!important;color:#8a95a3!important}
  .v93-booking-actions{display:flex!important;gap:6px!important;flex-wrap:wrap!important;margin-top:11px!important;padding-top:10px!important;border-top:1px solid #eef1ed!important}.v93-booking-actions button{min-height:34px!important;padding:7px 10px!important;font-size:10px!important;border-radius:10px!important}

  /* All ordinary tables outside timeline must not become sideways scroll panes. */
  .table-wrap:not(.timeline-wrap):not(.desktop-booking-table){max-width:100%!important;overflow:hidden!important}
  .timeline-wrap{overflow-x:auto!important;max-width:calc(100vw - 24px)!important;-webkit-overflow-scrolling:touch!important}

  /* Modals become polished bottom sheets. */
  .modal{padding:0!important;align-items:end!important}
  .v93-modal-card{width:100%!important;max-width:100%!important;max-height:92dvh!important;border-radius:26px 26px 0 0!important;border-bottom:0!important}
  .v93-modal-card .modal-head{padding:15px 16px!important}.v93-modal-card .modal-head h3{font-size:17px!important}
  .v93-modal-card .form-grid{grid-template-columns:1fr!important;padding:14px 16px!important;gap:11px!important}
  .v93-modal-card .field input,.v93-modal-card .field select,.v93-modal-card .field textarea{min-height:50px!important;font-size:16px!important;border-radius:14px!important;background:#fff!important}
  .v93-modal-card .modal-actions{display:grid!important;grid-template-columns:1fr 1fr!important;padding:11px 16px calc(12px + env(safe-area-inset-bottom))!important}
  .v93-modal-card .modal-actions:has(.btn:only-child){grid-template-columns:1fr!important}
  .create-choice-grid{grid-template-columns:1fr!important;padding:13px 16px 5px!important}.create-choice{min-height:98px!important;padding:15px!important}.create-choice b{font-size:16px!important}.create-choice span{font-size:11px!important}

  /* Bottom navigation */
  .bottom-nav{height:76px!important;background:rgba(255,255,255,.97)!important;box-shadow:0 -8px 28px rgba(30,44,60,.08)!important}
  .bottom-nav .book-fab{width:66px!important;height:66px!important;margin-top:-28px!important;background:linear-gradient(135deg,#1689f8,#3476f2)!important}

  /* Hide legacy mobile booking cards if any are still emitted by old code. */
  .app-booking-list{display:none!important}
}
@media(min-width:801px){
  .v93-booking-list{display:none!important}
  .app-booking-list{display:none!important}
}


/* ===== V9.4 EMPLOYEE DETAIL REPORT ===== */
.finance-compare-only{margin-top:16px}
.employee-summary-card{position:relative;padding-bottom:58px!important;overflow:hidden}
.employee-detail-btn{position:absolute;left:16px;right:16px;bottom:13px;height:38px;border:1px solid #dfe9f4;border-radius:12px;background:#f7fbff;color:#177bd4;display:flex;align-items:center;justify-content:space-between;padding:0 13px;font-size:11px;font-weight:850;cursor:pointer}
.employee-detail-btn:hover{background:#eaf5ff;border-color:#bcdcff}.employee-detail-btn b{font-size:20px;line-height:1;font-weight:500}
.employee-detail-shell{padding:16px 20px 20px}
.employee-detail-filter{display:grid;grid-template-columns:180px minmax(220px,1fr) auto;gap:10px;align-items:end;margin-bottom:14px}
.employee-detail-period{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 15px;border:1px solid #e8ece7;border-radius:15px;background:linear-gradient(135deg,#f8fbef,#f5f9ff)}
.employee-detail-period div{display:grid;gap:2px}.employee-detail-period span{font-size:9px;font-weight:900;color:#87a72a;text-transform:uppercase;letter-spacing:.08em}.employee-detail-period b{font-size:13px;color:#344054}.employee-detail-period small{font-size:10px;color:#8a95a3}
.detail-kpis{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px;margin:12px 0 16px}
.detail-kpis>div{padding:12px;border:1px solid #e9ede7;background:#fff;border-radius:14px;display:grid;gap:5px}.detail-kpis span{font-size:9px;color:#8a95a3}.detail-kpis b{font-size:13px;color:#182230}.detail-kpis .total{background:#eef7ff;border-color:#cae4ff}.detail-kpis .total b{color:#087ddb}
.detail-section{border:1px solid #e8ece7;border-radius:17px;background:#fff;overflow:hidden;margin-top:12px}.detail-section-head{display:flex;justify-content:space-between;gap:10px;align-items:center;padding:14px 15px;border-bottom:1px solid #eef1ed}.detail-section-head h4{margin:0;font-size:13px}.detail-section-head small{display:block;color:#98a2b3;font-size:9px;margin-top:3px}.detail-section-head>b{font-size:13px;color:#157bd5}
.detail-table th{font-size:9px!important}.detail-table td{font-size:10px!important;padding:10px!important}
.employee-detail-mobile-list{display:none}
.bonus-detail-list{display:grid}.bonus-detail-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 15px;border-bottom:1px solid #f0f2ee}.bonus-detail-row:last-child{border-bottom:0}.bonus-detail-row div{display:grid;gap:2px}.bonus-detail-row b{font-size:11px}.bonus-detail-row span{font-size:9px;color:#98a2b3}.bonus-detail-row strong{font-size:12px}
.detail-empty{padding:18px!important}
@media(max-width:800px){
  .employee-summary-card{padding-bottom:62px!important}
  .employee-detail-btn{left:13px;right:13px;bottom:12px;height:40px;font-size:12px}
  .employee-detail-shell{padding:12px 14px 18px}
  .employee-detail-filter{grid-template-columns:1fr 1fr;gap:9px}.employee-detail-filter .btn{grid-column:1/-1}
  .employee-detail-period{align-items:flex-start}.employee-detail-period small{text-align:right}
  .detail-kpis{grid-template-columns:1fr 1fr;gap:8px}.detail-kpis>div{min-height:68px;padding:11px}.detail-kpis .total{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between}.detail-kpis .total b{font-size:17px}
  .employee-detail-desktop{display:none!important}.employee-detail-mobile-list{display:grid;gap:9px;padding:10px}
  .employee-work-card{border:1px solid #e8ece7;border-radius:15px;padding:12px;background:#fff}
  .employee-work-head{display:grid;grid-template-columns:64px minmax(0,1fr);gap:10px;align-items:start;padding-bottom:10px;border-bottom:1px solid #eef1ed}
  .employee-work-time{display:grid;gap:4px;padding:8px;border-radius:11px;background:#f3f9ff;text-align:center}.employee-work-time b{font-size:17px;color:#157bd5}.employee-work-time span{font-size:9px;color:#8e99a7}
  .employee-work-name{display:grid;gap:4px;min-width:0}.employee-work-name strong{font-size:13px;line-height:1.3}.employee-work-name span{font-size:10px;color:#8b95a3}
  .employee-work-grid{display:grid;grid-template-columns:1fr 1fr;gap:0;margin-top:6px}.employee-work-grid span{display:grid;gap:3px;padding:9px 7px;border-bottom:1px solid #f0f2ee;font-size:9px;color:#98a2b3}.employee-work-grid b{font-size:11px;color:#475467}
  .employee-work-addon{margin-top:9px;padding:8px 10px;border-radius:10px;background:#f8faf6;color:#6b7a4f;font-size:10px}
  .detail-section-head{padding:12px}.bonus-detail-row{padding:11px 12px}
}


/* ===== V9.5 SERVICE ALLOWANCE NOTE ===== */
.service-allowance-note{display:flex;align-items:flex-start;gap:12px;padding:14px 16px!important;margin-bottom:14px!important;background:linear-gradient(135deg,#f8fbef,#f4f9ff)!important}
.service-note-icon{width:34px;height:34px;border-radius:11px;background:#e9f6d7;color:#6e9420;display:grid;place-items:center;font-weight:900;font-size:16px;flex:0 0 auto}
.service-allowance-note>div:last-child{display:grid;gap:4px}.service-allowance-note b{font-size:12px;color:#273444}.service-allowance-note span{font-size:10px;color:#7a8796;line-height:1.5}
@media(max-width:800px){
  .service-allowance-note{margin:0 0 12px!important;padding:13px!important;border-radius:17px!important}.service-allowance-note b{font-size:13px}.service-allowance-note span{font-size:11px}
}


/* ===== V9.5.4 DASHBOARD REMINDER ===== */
.dashboard-reminder{display:flex;align-items:center;gap:11px;min-height:58px;margin:-2px 0 14px;padding:11px 14px;border-radius:16px;border:1px solid #e7ebe5;background:#fff;box-shadow:0 6px 18px rgba(25,39,59,.035)}
.dashboard-reminder .reminder-icon{width:34px;height:34px;display:grid;place-items:center;border-radius:11px;flex:0 0 auto;font-weight:900}
.dashboard-reminder .reminder-copy,.dashboard-reminder>div:nth-child(2){display:grid;gap:3px;min-width:0;flex:1}
.dashboard-reminder b{font-size:11px;color:#344054}.dashboard-reminder span{font-size:10px;color:#8a95a3;line-height:1.4}
.dashboard-reminder.all-done .reminder-icon{background:#edf8ef;color:#2d9a54}
.dashboard-reminder.needs-action{background:linear-gradient(135deg,#fffaf0,#fff)}
.dashboard-reminder.needs-action .reminder-icon{background:#fff0cf;color:#c77a00}
.reminder-view{border:1px solid #f0d9a7;background:#fff;color:#a56800;border-radius:11px;min-height:34px;padding:0 12px;font-size:10px;font-weight:850;cursor:pointer}
.unfinished-modal-list{padding:14px 18px;display:grid;gap:10px}
.unfinished-date-group{border:1px solid #e8ece7;border-radius:15px;overflow:hidden;background:#fff}
.unfinished-date-head{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:11px 13px;background:#fafbf8;border-bottom:1px solid #edf0eb}
.unfinished-date-head b{font-size:12px}.unfinished-date-head span{font-size:9px;color:#b26b00}
.unfinished-items{display:grid}.unfinished-item{padding:10px 13px;border-bottom:1px solid #f0f2ee}.unfinished-item:last-of-type{border-bottom:0}.unfinished-item>div{display:grid;gap:2px}.unfinished-item b{font-size:11px}.unfinished-item span,.unfinished-items>small{font-size:9px;color:#8b95a3}.unfinished-items>small{padding:9px 13px}
@media(max-width:800px){
  .dashboard-reminder{margin:0 0 12px;padding:11px 12px;align-items:flex-start}
  .dashboard-reminder b{font-size:12px}.dashboard-reminder span{font-size:10px}
  .reminder-view{align-self:center}
  .unfinished-modal-list{padding:10px 14px}
}


/* ===== V9.5.5 DIRECT COMPLETE IN REMINDER ===== */
.direct-complete-list{max-height:min(68dvh,620px);overflow:auto}
.direct-complete-item{padding:0!important;transition:.18s background,.18s box-shadow}
.direct-complete-item.is-editing{background:#fbfdff}
.unfinished-summary{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px 13px}
.unfinished-main{display:grid;gap:2px;min-width:0}.unfinished-main b{font-size:11px;color:#263445}.unfinished-main span{font-size:9px;color:#8b95a3}
.direct-complete-open{flex:0 0 auto;min-height:32px;padding:0 11px;border:1px solid #beddff;background:#eef7ff;color:#087ddb;border-radius:10px;font-size:10px;font-weight:850;cursor:pointer}
.direct-complete-open:hover{background:#e1f1ff}
.direct-complete-form{padding:12px 13px 13px;border-top:1px solid #e8edf2;background:linear-gradient(180deg,#f8fbff,#fff)}
.direct-pay-summary{display:flex;align-items:center;justify-content:space-between;padding:9px 11px;margin-bottom:9px;border-radius:11px;background:#fff;border:1px solid #e4eaf0}.direct-pay-summary span{font-size:9px;color:#8b95a3}.direct-pay-summary strong{font-size:13px;color:#182230}
.direct-complete-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.direct-complete-grid label{display:grid;gap:4px}.direct-complete-grid label>span{font-size:9px;color:#667085;font-weight:750}.direct-complete-grid input,.direct-complete-grid select{width:100%;min-height:38px;border:1px solid #dfe6ed;border-radius:10px;background:#fff;padding:0 10px;font-size:11px;outline:none}
.direct-complete-grid input:focus,.direct-complete-grid select:focus{border-color:#8fc7ff;box-shadow:0 0 0 3px rgba(22,137,248,.08)}
.direct-complete-actions{display:flex;justify-content:flex-end;gap:7px;margin-top:10px}.direct-complete-actions button{min-height:36px;border-radius:10px;padding:0 12px;font-size:10px;font-weight:850;cursor:pointer}
.direct-cancel{border:1px solid #e2e7ec;background:#fff;color:#667085}.direct-save{border:0;background:linear-gradient(135deg,#1689f8,#3476f2);color:#fff;box-shadow:0 6px 16px rgba(22,137,248,.18)}
.direct-save:disabled{opacity:.6;cursor:default}.direct-error{margin-top:8px;padding:8px 10px;border-radius:9px;background:#fff2f2;color:#c53d3d;font-size:9px}
.reminder-only-close{justify-content:flex-end!important}.reminder-only-close .btn{min-width:90px}
.done-success{background:#f5fbf5!important}.direct-done-success{display:flex;align-items:center;gap:9px;padding:13px}.direct-done-success>span{width:28px;height:28px;border-radius:50%;display:grid;place-items:center;background:#dff5e5;color:#29954e;font-weight:900}.direct-done-success div{display:grid;gap:2px}.direct-done-success b{font-size:11px;color:#2f6f44}.direct-done-success small{font-size:9px;color:#789184}
@media(max-width:800px){
  .direct-complete-list{max-height:70dvh;padding:10px 12px!important}
  .unfinished-summary{padding:12px}.unfinished-main b{font-size:12px}.unfinished-main span{font-size:10px}
  .direct-complete-open{min-height:36px;font-size:11px}
  .direct-complete-form{padding:12px}.direct-complete-grid{grid-template-columns:1fr 1fr;gap:8px}
  .direct-complete-grid input,.direct-complete-grid select{min-height:44px;font-size:16px}
  .direct-complete-actions{display:grid;grid-template-columns:1fr 1.35fr}.direct-complete-actions button{min-height:42px;font-size:11px;padding:0 8px}
}



/* =====================================================================
   MINH TÂM V9.5.6 — COMPLETED BOOKING READ ONLY
   ===================================================================== */
.view-completed-mini{
  min-height:32px;padding:0 11px;border:1px solid #bddcff;border-radius:10px;
  background:#eef7ff;color:#087edc;font-size:10px;font-weight:850;cursor:pointer
}
.view-completed-mini:hover{background:#e2f1ff}
.detail-view-btn{background:#edf6ff!important;color:#087edc!important;border:1px solid #c7e2ff!important}

.completed-readonly-wrap{padding:16px 20px 8px;display:grid;gap:12px;background:#f8fafc}
.completed-readonly-banner{
  display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:11px;
  padding:14px 15px;border-radius:17px;border:1px solid #d9eee0;
  background:linear-gradient(135deg,#f4fbf6,#f5f9ff)
}
.completed-readonly-check{
  width:38px;height:38px;border-radius:12px;display:grid;place-items:center;
  background:#dff5e6;color:#24934b;font-size:18px;font-weight:900
}
.completed-readonly-banner>div:nth-child(2){display:grid;gap:3px}
.completed-readonly-banner>div:nth-child(2)>b{font-size:13px;color:#21693a}
.completed-readonly-banner>div:nth-child(2)>span{font-size:9px;color:#7d8b99}
.completed-readonly-amount{font-size:18px;font-weight:900;color:#087edc;white-space:nowrap}

.readonly-section{
  overflow:hidden;border:1px solid #e5e9ed;border-radius:17px;background:#fff
}
.readonly-section-title{
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  padding:11px 14px;border-bottom:1px solid #edf0f3;background:#fbfcfd
}
.readonly-section-title b{font-size:12px;color:#273444}
.readonly-section-title span{font-size:9px;color:#98a2b3}
.readonly-booking-grid{display:grid;grid-template-columns:1fr 1fr}
.readonly-booking-field{
  min-width:0;padding:11px 14px;border-bottom:1px solid #f0f2f4
}
.readonly-booking-field:nth-child(odd){border-right:1px solid #f0f2f4}
.readonly-booking-field.wide{grid-column:1/-1;border-right:0}
.readonly-booking-field span{display:block;font-size:9px;color:#98a2b3;margin-bottom:4px}
.readonly-booking-field strong{
  display:block;font-size:11px;color:#475467;line-height:1.4;overflow-wrap:anywhere
}

.readonly-money-list{display:grid}
.readonly-money-list>div{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:10px 14px;border-bottom:1px solid #f0f2f4
}
.readonly-money-list>div:last-child{border-bottom:0}
.readonly-money-list span{font-size:10px;color:#667085}
.readonly-money-list b{font-size:11px;color:#344054;text-align:right}
.readonly-money-list .readonly-discount{background:#fffaf0}
.readonly-money-list .readonly-discount b{color:#b96d00}
.readonly-money-list .readonly-total{background:#f7faf5}
.readonly-money-list .readonly-total b{font-size:13px}
.readonly-money-list .readonly-received{background:#eef7ff}
.readonly-money-list .readonly-received b{font-size:14px;color:#087edc}
.readonly-money-list .readonly-difference{background:#fff7f7}
.readonly-money-list .readonly-difference b{color:#c24141}

.readonly-note{padding:13px 14px;font-size:11px;line-height:1.55;color:#536170;white-space:pre-wrap}
.readonly-audit-section .readonly-booking-field strong{font-size:10px}
.completed-readonly-actions{background:#fff!important}

@media(max-width:800px){
  .completed-readonly-wrap{padding:11px 12px 6px;gap:10px}
  .completed-readonly-banner{grid-template-columns:auto minmax(0,1fr);padding:12px}
  .completed-readonly-amount{grid-column:1/-1;padding-top:8px;border-top:1px solid #e4ece7;font-size:20px}
  .readonly-section{border-radius:15px}
  .readonly-section-title{align-items:flex-start;padding:11px 12px}
  .readonly-section-title b{font-size:13px}.readonly-section-title span{font-size:9px;text-align:right}
  .readonly-booking-grid{grid-template-columns:1fr 1fr}
  .readonly-booking-field{padding:10px 11px}
  .readonly-booking-field span{font-size:9px}.readonly-booking-field strong{font-size:11px}
  .readonly-pay-grid{grid-template-columns:1fr 1fr}
  .readonly-money-list>div{padding:11px 12px}
  .readonly-money-list span{font-size:10px}.readonly-money-list b{font-size:11px}
  .completed-readonly-actions{padding-bottom:calc(12px + env(safe-area-inset-bottom))!important}
  .completed-readonly-actions .btn{width:100%!important}
}

/* ===== V9.5.7 STABILITY / SYNC INSPECTOR ===== */
.sync-badge{cursor:pointer;border:1px solid #efb0b0;font-family:inherit}
.sync-badge:hover{filter:brightness(.98)}
.sync-inspector-note{display:flex;flex-direction:column;gap:5px;padding:13px 14px;border:1px solid #dce8f6;background:#f6faff;border-radius:14px;margin-bottom:12px}
.sync-inspector-note b{font-size:12px;color:#23324a}.sync-inspector-note span{font-size:11px;color:#667085;line-height:1.5}
.sync-inspector-list{display:grid;gap:10px;max-height:55vh;overflow:auto;padding-right:2px}
.sync-inspector-item{border:1px solid #e7ebf0;border-radius:15px;padding:12px;background:#fff}
.sync-inspector-item.resolved{background:#f4fbf7;border-color:#cdebd9}
.sync-inspector-head{display:flex;justify-content:space-between;gap:10px;align-items:flex-start}
.sync-inspector-head>div{min-width:0;display:flex;flex-direction:column;gap:3px}
.sync-inspector-head b{font-size:13px}.sync-inspector-head span{font-size:11px;color:#667085;overflow-wrap:anywhere}
.sync-inspector-head em{font-style:normal;font-size:9px;font-weight:800;border-radius:999px;padding:5px 8px;white-space:nowrap}
.sync-inspector-head em.bad{background:#fff0f0;color:#bd2f2f}.sync-inspector-head em.wait{background:#fff8e8;color:#9a6813}
.sync-inspector-meta{display:flex;gap:12px;flex-wrap:wrap;color:#8a94a3;font-size:9px;margin-top:8px}
.sync-inspector-error{margin-top:8px;background:#fff5f5;color:#b42318;border-radius:9px;padding:8px 9px;font-size:10px}
.sync-inspector-result{margin-top:8px;background:#fff8e8;color:#815b13;border-radius:9px;padding:8px 9px;font-size:10px}
.sync-inspector-result.ok{background:#edf9f1;color:#167044}
.sync-inspector-actions{display:flex;gap:7px;flex-wrap:wrap;margin-top:10px}
.sync-inspector-actions .btn{font-size:10px;min-height:34px;padding:0 10px}
.danger-light{background:#fff5f5!important;color:#b42318!important;border-color:#f3cccc!important}
@media(max-width:640px){
  .sync-inspector-actions{display:grid;grid-template-columns:1fr 1fr}
  .sync-inspector-actions .sync-dismiss{grid-column:1/-1}
  .sync-inspector-list{max-height:48vh}
}

/* ===== V9.5.8 CLEAR CACHE BUTTON ===== */
.clear-cache-chip{
  color:#1669b2;
  border-color:#cfe6fb;
  background:#f2f8ff;
  cursor:pointer;
  transition:.18s ease;
}
.clear-cache-chip:hover{background:#e7f3ff;transform:translateY(-1px)}
.clear-cache-icon{font-size:16px;font-weight:900;line-height:1}
.clear-cache-panel{text-align:center;padding:4px 2px 8px}
.clear-cache-big-icon{
  width:58px;height:58px;border-radius:18px;margin:0 auto 12px;
  display:grid;place-items:center;font-size:30px;font-weight:900;
  color:#1685e7;background:#edf7ff;border:1px solid #d5ebff;
}
.clear-cache-panel h4{font-size:17px;margin:0 0 7px}
.clear-cache-panel p{margin:0 auto;color:#667085;font-size:12px;line-height:1.55;max-width:430px}
.clear-cache-safe{
  margin:14px auto 0;padding:11px 13px;text-align:left;
  max-width:440px;border:1px solid #d9eee1;background:#f4fbf6;border-radius:12px;
  display:flex;flex-direction:column;gap:3px;font-size:11px;
}
.clear-cache-safe b{color:#187044}.clear-cache-safe span{color:#52606d;line-height:1.45}
@media(max-width:640px){
  .clear-cache-chip{width:42px;height:42px;padding:0;justify-content:center}
  .clear-cache-text{display:none}
  .clear-cache-icon{font-size:20px}
  .topbar-actions{gap:7px}
}

/* ===== V9.5.8.1 MOBILE NAV + CLEAR CACHE ===== */
@media(max-width:768px){
  /* Nút làm mới vẫn có trong menu hamburger; topbar mobile không cần chen thêm nút. */
  .mobile-clear-cache{display:flex!important}

  /* Bottom nav: dấu + nằm đúng tâm viewport */
  .mobile-bottom-nav{
    grid-template-columns:1fr 1fr 1fr 1fr!important;
    position:fixed!important;
    left:0!important;right:0!important;
  }
  .mobile-bottom-nav .mobile-add,
  .mobile-bottom-nav .add,
  .mobile-bottom-nav .fab,
  .mobile-bottom-nav #mobileAdd,
  .mobile-bottom-nav #mobileQuickBook{
    position:absolute!important;
    left:50%!important;
    transform:translateX(-50%)!important;
    margin:0!important;
    z-index:5!important;
  }
  /* tạo khoảng thở hai bên nút giữa */
  .mobile-bottom-nav > *:nth-child(2){margin-right:42px!important}
  .mobile-bottom-nav > *:nth-last-child(2){margin-left:42px!important}
}

/* =========================================================
   V9.6.0 ADVANCED FINANCE
   ========================================================= */
.finance-section{margin:22px 0 26px}
.finance-section-title{display:flex;justify-content:space-between;align-items:flex-end;gap:16px;margin:0 2px 12px}
.finance-section-title>div{display:flex;align-items:center;gap:9px}
.finance-section-title span{width:30px;height:30px;border-radius:10px;display:grid;place-items:center;background:#eaf4ff;color:#0e79df;font-weight:900;font-size:11px}
.finance-section-title h3{margin:0;font-size:18px}
.finance-section-title small{color:#8792a3;font-size:10px;text-align:right}
.finance-kpi-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.finance-kpi{position:relative;background:#fff;border:1px solid #e3e8ef;border-radius:18px;padding:17px 18px;min-height:104px;box-shadow:0 8px 24px rgba(27,58,93,.04)}
.finance-kpi:before{content:"";position:absolute;left:0;top:18px;bottom:18px;width:3px;border-radius:0 4px 4px 0;background:#aeb9c7}
.finance-kpi.accent:before{background:#168cf1}.finance-kpi.profit:before{background:#22b978}.finance-kpi.tip:before{background:#8f66ef}
.finance-kpi small{display:block;color:#788597;font-size:10px;margin-bottom:8px}
.finance-kpi b{font-size:22px;line-height:1.1}.finance-kpi em{display:block;font-style:normal;color:#8d72c9;font-size:9px;margin-top:7px}
.finance-kpi .trend{position:absolute;right:13px;bottom:12px}
.labor-breakdown{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}
.labor-breakdown span{background:#fff;border:1px solid #e6eaf0;border-radius:999px;padding:8px 11px;color:#758094;font-size:9px}.labor-breakdown b{color:#27364a;margin-left:4px}
.finance-chart-grid{display:grid;grid-template-columns:1.25fr .75fr;gap:14px}
.finance-trend-wrap{overflow:hidden}.finance-trend{width:100%;min-height:220px}
.finance-trend text{font-size:10px;fill:#8a94a3}.fin-zero{stroke:#dce3ea;stroke-width:1;stroke-dasharray:4 5}
.fin-line{fill:none;stroke-width:4;stroke-linecap:round;stroke-linejoin:round}.fin-line.revenue{stroke:#168cf1}.fin-line.cost{stroke:#f0a521}.fin-line.profit{stroke:#20b778}
.fin-dot{stroke:#fff;stroke-width:2}.fin-dot.revenue{fill:#168cf1}
.finance-legend{display:flex;gap:16px;flex-wrap:wrap;justify-content:center;font-size:10px;color:#6d7888}
.finance-legend span{display:flex;gap:6px;align-items:center}.finance-legend i{width:9px;height:9px;border-radius:50%;display:inline-block}.finance-legend i.revenue{background:#168cf1}.finance-legend i.cost{background:#f0a521}.finance-legend i.profit{background:#20b778}
.finance-analysis-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.finance-panel{background:#fff;border:1px solid #e3e8ef;border-radius:18px;padding:16px;min-width:0}
.finance-panel-head{display:flex;justify-content:space-between;gap:10px;margin-bottom:12px}.finance-panel-head h4{margin:0 0 3px;font-size:14px}.finance-panel-head small{color:#8a94a3;font-size:9px}
.finance-rank-list{display:grid;gap:10px}.finance-rank-row{display:flex;gap:9px;align-items:flex-start}.finance-rank-no{width:24px;height:24px;display:grid;place-items:center;border-radius:8px;background:#f1f6fb;color:#728199;font-size:9px;font-weight:900;flex:0 0 auto}
.finance-rank-main{min-width:0;flex:1}.finance-rank-main>div:first-child{display:flex;justify-content:space-between;gap:10px}.finance-rank-main b{font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.finance-rank-main strong{font-size:11px;white-space:nowrap}.finance-rank-main small{display:block;color:#939daa;font-size:8px;margin-top:3px}
.finance-rank-track{height:5px!important;background:#edf1f5;border-radius:999px;margin-top:5px;overflow:hidden}.finance-rank-track i{display:block;height:100%;border-radius:999px;background:linear-gradient(90deg,#168cf1,#78bfff)}
.finance-payment-grid,.finance-source-grid,.customer-finance-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.finance-payment-card,.finance-source-grid>div,.customer-finance-grid>div{background:#f8fafc;border:1px solid #edf0f3;border-radius:13px;padding:12px;display:flex;flex-direction:column;gap:4px}.finance-payment-card span,.finance-source-grid span,.customer-finance-grid span{font-size:9px;color:#7c8795}.finance-payment-card b,.finance-source-grid b,.customer-finance-grid b{font-size:14px}.finance-payment-card small,.finance-source-grid small,.customer-finance-grid small{font-size:8px;color:#9aa2ad}
.finance-ops-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.finance-ops-grid>div{padding:15px;border-radius:14px;background:#f8fafc;border:1px solid #edf0f3}.finance-ops-grid small{display:block;color:#808b99;font-size:9px;margin-bottom:6px}.finance-ops-grid b{font-size:17px}
.reconcile-status{font-size:9px;font-weight:900;border-radius:999px;padding:7px 10px}.reconcile-status.ok{background:#eaf9f0;color:#13824c}.reconcile-status.warn{background:#fff2ee;color:#c25032}
.reconcile-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.reconcile-kpis>div{padding:14px;border-radius:14px;background:#f8fafc;border:1px solid #edf0f3}.reconcile-kpis small{display:block;color:#808b99;font-size:9px;margin-bottom:5px}.reconcile-kpis b{font-size:16px}.reconcile-kpis .warn b{color:#c94d31}.reconcile-kpis .ok b{color:#158351}
.reconcile-good{margin-top:12px;padding:12px 14px;border-radius:12px;background:#edf9f2;color:#167148;font-size:10px;font-weight:700}
.reconcile-details{margin-top:12px;border:1px solid #e7ebef;border-radius:13px;overflow:hidden}.reconcile-details summary{cursor:pointer;padding:12px 14px;font-size:10px;font-weight:800;background:#fbfcfd}.reconcile-list{max-height:300px;overflow:auto}.reconcile-list>div{display:flex;justify-content:space-between;gap:12px;padding:10px 14px;border-top:1px solid #eef1f4}.reconcile-list span{display:flex;flex-direction:column;gap:2px}.reconcile-list b{font-size:10px}.reconcile-list small{font-size:8px;color:#8b95a3}.reconcile-list strong{font-size:10px;color:#c74e33;white-space:nowrap}
.finance-empty{padding:28px;text-align:center;color:#8d97a4;font-size:11px}.finance-empty.small{padding:18px}
@media(max-width:1100px){
  .finance-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .finance-chart-grid{grid-template-columns:1fr}
}
@media(max-width:760px){
  .finance-section{margin:18px 0 22px}
  .finance-section-title{align-items:flex-start;flex-direction:column;gap:5px}.finance-section-title small{text-align:left}
  .finance-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.finance-kpi{padding:14px 13px;min-height:94px;border-radius:15px}.finance-kpi b{font-size:18px}.finance-kpi .trend{position:static;display:inline-block;margin-top:7px}
  .labor-breakdown{display:grid;grid-template-columns:1fr 1fr}.labor-breakdown span{border-radius:12px;padding:9px}
  .finance-analysis-grid{grid-template-columns:1fr}
  .finance-ops-grid,.reconcile-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
  .finance-payment-grid,.finance-source-grid,.customer-finance-grid{grid-template-columns:1fr 1fr}
  .finance-trend{min-width:620px}.finance-trend-wrap{overflow-x:auto;padding-bottom:5px}
}
@media(max-width:420px){
  .finance-kpi-grid{grid-template-columns:1fr 1fr}
  .finance-kpi b{font-size:16px}
  .finance-ops-grid,.reconcile-kpis{grid-template-columns:1fr 1fr}
}

/* =========================================================
   V9.6.0.2 — EMPLOYEE ROLE UI
   NHAN_VIEN chỉ thấy Lịch timeline + Lương của tôi.
   ========================================================= */
.role-hidden{display:none!important}

/* Desktop sidebar: khi là nhân viên, menu gọn chỉ còn đúng chức năng được phép. */
#appView.role-employee .sidebar nav{
  gap:7px;
}
#appView.role-employee .sidebar .nav-label{
  margin-top:8px;
}
#appView.role-employee .sidebar nav button[data-page="schedule"],
#appView.role-employee .sidebar nav button[data-page="mySalary"]{
  display:flex;
  align-items:center;
  gap:10px;
}

/* Mobile bottom nav: đúng 2 chức năng, cân đều màn hình. */
@media(max-width:800px){
  #appView.role-employee .bottom-nav{
    grid-template-columns:1fr 1fr!important;
    padding-left:18px!important;
    padding-right:18px!important;
  }
  #appView.role-employee .bottom-nav button[data-page="schedule"],
  #appView.role-employee .bottom-nav #bottomFinance{
    display:grid!important;
    width:100%;
    min-height:54px;
  }
  #appView.role-employee .bottom-nav button[data-page="schedule"]{
    grid-column:1!important;
  }
  #appView.role-employee .bottom-nav #bottomFinance{
    grid-column:2!important;
  }

  /* Sidebar mobile không để lại khoảng trống từ các nhóm menu bị ẩn. */
  #appView.role-employee .sidebar nav{
    display:flex;
    flex-direction:column;
    gap:8px;
    padding-top:14px;
  }
  #appView.role-employee .sidebar nav .nav-label.role-hidden,
  #appView.role-employee .sidebar nav [data-page].role-hidden{
    display:none!important;
  }
}

/* Không để các nút quản trị nổi nháy ra trong lúc role vừa bootstrap. */
body.role-employee #quickBook,
body.role-employee #mobileBook,
body.role-employee #pageAction{
  display:none!important;
}

/* V9.6.0.3 hard fail-safe for employee UI */
body.role-employee #nav [data-page]:not([data-page="schedule"]):not([data-page="mySalary"]){
  display:none!important;
}
body.role-employee #nav .nav-label{
  display:none!important;
}
body.role-employee #quickBook,
body.role-employee #mobileBook,
body.role-employee [data-page="dashboard"],
body.role-employee [data-page="finance"],
body.role-employee [data-page="reports"],
body.role-employee [data-page="branches"],
body.role-employee [data-page="rooms"],
body.role-employee [data-page="employees"],
body.role-employee [data-page="services"],
body.role-employee [data-page="assignments"],
body.role-employee [data-page="customers"],
body.role-employee [data-page="packages"],
body.role-employee [data-page="promotions"],
body.role-employee [data-page="expenses"],
body.role-employee [data-page="bonuses"],
body.role-employee [data-page="accounts"],
body.role-employee [data-page="password"]{
  display:none!important;
}


/* =========================================================
   MASSAGE MINH TÂM V9.7.0 UI/UX UPGRADE
   ========================================================= */
:root{
  --v97-blue:#1788ee;
  --v97-blue-soft:#eaf4ff;
  --v97-green:#17a968;
  --v97-orange:#e69b16;
  --v97-red:#d95b4b;
  --v97-purple:#8265e8;
  --v97-ink:#192537;
  --v97-muted:#7d8999;
  --v97-line:#e5eaf0;
  --v97-card:#fff;
}

/* Sidebar polish + collapse */
.sidebar{border-right:1px solid #e8edf3}
.nav-label.v97-collapsible-label{display:flex;align-items:center;justify-content:space-between;cursor:pointer;user-select:none;padding-right:8px}
.v97-nav-chevron{font-size:11px;transition:transform .18s ease;color:#9aa5b3}
.nav-label.v97-collapsible-label.collapsed .v97-nav-chevron{transform:rotate(-90deg)}
#nav [data-page].v97-group-collapsed{display:none!important}
#nav button{border-radius:12px;transition:background .15s ease,transform .15s ease}
#nav button:hover{transform:translateX(2px)}

/* Page / card consistency */
.card,.report-card,.finance-panel,.dashboard-section{border-color:#e5eaf0!important;box-shadow:0 8px 28px rgba(24,48,78,.045)}
.page-head h2{letter-spacing:-.02em}
.btn{min-height:40px;border-radius:12px}

/* Schedule */
.v97-schedule-toolbar{padding:14px}
.v97-schedule-filter-main{display:grid;grid-template-columns:minmax(150px,.85fr) minmax(145px,.7fr) minmax(260px,1.4fr) auto;gap:10px;align-items:end}
.v97-input-icon{display:flex;align-items:center;border:1px solid #dfe5ec;border-radius:12px;background:#fff;overflow:hidden}
.v97-input-icon>span{padding-left:12px;color:#9aa5b2;font-size:18px}
.v97-input-icon input{border:0!important;box-shadow:none!important;width:100%}
.v97-status-row{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:12px;padding-top:12px;border-top:1px solid #edf0f3}
.v97-status-chips{display:flex;gap:7px;flex-wrap:wrap}
.v97-filter-chip{border:1px solid #e1e6ec;background:#fff;color:#647184;border-radius:999px;padding:8px 12px;font-size:10px;font-weight:800;cursor:pointer}
.v97-filter-chip.active{background:var(--v97-blue-soft);border-color:#b9dafa;color:#1378cc}
#scheduleResultCount{font-size:11px;color:#6d7989;white-space:nowrap}
.v97-filter-hidden{display:none!important}
.booking{position:relative;overflow:hidden}
.booking .v97-mini-status{display:inline-flex;margin-top:5px;padding:3px 6px;border-radius:999px;font-size:7px;font-weight:900;background:#eef3f7;color:#69788a}
.booking.status-serving{border-left:3px solid var(--v97-orange)!important}
.booking.status-completed{border-left:3px solid var(--v97-green)!important}
.booking.status-cancelled{opacity:.58;border-left:3px solid var(--v97-red)!important}
.booking.status-pending{border-left:3px solid var(--v97-blue)!important}
.v97-mobile-schedule-list{display:none}
.v97-status{display:inline-flex;padding:5px 8px;border-radius:999px;font-size:8px;font-weight:900;white-space:nowrap}
.v97-status.pending{background:#eaf4ff;color:#1579cd}
.v97-status.serving{background:#fff4dc;color:#b27100}
.v97-status.completed{background:#e9f8ef;color:#13804b}
.v97-status.cancelled{background:#fff0ed;color:#b94c3e}

/* Management report */
.v97-management-filter{display:grid;grid-template-columns:1fr 1.2fr 1.4fr auto;gap:10px;align-items:end}
.v97-management-kpis{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px;margin-top:12px}
.v97-mg-kpi{appearance:none;text-align:left;background:#fff;border:1px solid #e4e9ef;border-radius:16px;padding:15px;min-height:102px;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;box-shadow:0 8px 24px rgba(31,59,90,.04)}
button.v97-mg-kpi{cursor:pointer}
button.v97-mg-kpi:hover{border-color:#bad9f6}
.v97-mg-kpi small{font-size:9px;color:#7e8998}
.v97-mg-kpi b{font-size:21px;margin:7px 0;color:var(--v97-ink)}
.v97-mg-kpi span{font-size:8px;color:#8c97a5}
.v97-mg-kpi.warning b{color:#c85c42}
.v97-report-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:12px}
.v97-report-panel{background:#fff;border:1px solid #e4e9ef;border-radius:18px;padding:15px;min-width:0;box-shadow:0 8px 24px rgba(31,59,90,.04)}
.v97-report-head{margin-bottom:12px}.v97-report-head h3{margin:0;font-size:14px}.v97-report-head small{display:block;font-size:9px;color:#8994a2;margin-top:3px}
.v97-rank-list{display:grid;gap:7px}
.v97-rank-item{display:grid;grid-template-columns:27px minmax(0,1fr) auto 20px;gap:8px;align-items:center;background:transparent;border:0;border-radius:11px;padding:7px;cursor:pointer;text-align:left}
.v97-rank-item:hover{background:#f8fbfe}
.v97-rank-index{width:27px;height:27px;display:grid;place-items:center;border-radius:9px;background:#f0f5fa;font-size:9px;font-weight:900;color:#6e7b8d}
.v97-rank-copy{min-width:0}.v97-rank-copy b{display:block;font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.v97-rank-copy small{display:block;font-size:8px;color:#8d97a4;margin-top:2px}.v97-rank-copy i{display:block;height:4px;background:#edf1f5;border-radius:99px;margin-top:5px;overflow:hidden}.v97-rank-copy i em{display:block;height:100%;background:linear-gradient(90deg,#168cf1,#75baf7);border-radius:99px}
.v97-rank-item strong{font-size:10px;white-space:nowrap}.v97-detail-arrow{color:#1281df;font-size:18px}
.v97-peak-list{display:grid;gap:9px}.v97-peak-row{display:grid;grid-template-columns:48px minmax(0,1fr) 50px 74px;gap:8px;align-items:center}.v97-peak-row b{font-size:10px}.v97-peak-row>span{height:7px;background:#eef2f5;border-radius:99px;overflow:hidden}.v97-peak-row i{display:block;height:100%;border-radius:99px;background:linear-gradient(90deg,#f0a220,#ffd27a)}.v97-peak-row strong,.v97-peak-row small{font-size:9px;text-align:right}.v97-peak-row small{color:#8c96a3}
.v97-customer-mix{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.v97-customer-mix>div{background:#f8fafc;border:1px solid #edf0f3;border-radius:13px;padding:12px}.v97-customer-mix span{font-size:8px;color:#8190a0}.v97-customer-mix b{display:block;font-size:18px;margin:5px 0}.v97-customer-mix small{font-size:8px;color:#8d98a6}
.v97-drill-list{display:grid;gap:8px;max-height:62vh;overflow:auto}.v97-drill-row{display:flex;justify-content:space-between;gap:14px;padding:11px 12px;border:1px solid #e7ebf0;border-radius:13px;background:#fbfcfd}.v97-drill-row>div{display:flex;flex-direction:column;gap:2px;min-width:0}.v97-drill-row b{font-size:10px}.v97-drill-row span{font-size:10px;font-weight:700}.v97-drill-row small{font-size:8px;color:#8b95a3}.v97-drill-row strong{font-size:10px;white-space:nowrap}
.v97-empty{text-align:center;color:#8b96a4;padding:22px;font-size:10px}

/* Mobile UX */
@media(max-width:1100px){
  .v97-management-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}
  .v97-quick-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:800px){
  .page-head{padding-bottom:6px}
  .page-head .eyebrow{display:none}
  .page-head h2{font-size:24px}
  .page-head p{font-size:11px}

  /* Schedule = cards on phone, no horizontal timeline */
  .v97-schedule-filter-main{grid-template-columns:1fr 1fr}
  .v97-schedule-search{grid-column:1/3}
  .v97-schedule-filter-main #schReload{grid-column:1/3;width:100%}
  .v97-status-row{align-items:flex-start;flex-direction:column}
  .v97-status-chips{width:100%;overflow-x:auto;flex-wrap:nowrap;padding-bottom:3px}
  .v97-filter-chip{flex:0 0 auto}
  .v97-desktop-timeline{display:none!important}
  .v97-mobile-schedule-list{display:grid;gap:10px;margin-top:12px}
  .v97-schedule-card{display:grid;grid-template-columns:76px minmax(0,1fr);gap:12px;background:#fff;border:1px solid #e3e8ee;border-radius:18px;padding:13px;box-shadow:0 7px 22px rgba(23,54,87,.045);position:relative;overflow:hidden}
  .v97-schedule-card:before{content:"";position:absolute;left:0;top:0;bottom:0;width:3px;background:#168cf1}
  .v97-schedule-card.status-serving:before{background:var(--v97-orange)}.v97-schedule-card.status-completed:before{background:var(--v97-green)}.v97-schedule-card.status-cancelled:before{background:var(--v97-red)}
  .v97-schedule-time{background:#f3f8fc;border-radius:13px;padding:10px 5px;text-align:center;align-self:start}.v97-schedule-time b{display:block;color:#157ccf;font-size:18px}.v97-schedule-time small{font-size:8px;color:#8793a2}
  .v97-schedule-main{min-width:0;display:flex;flex-direction:column;gap:4px}.v97-schedule-title{display:flex;justify-content:space-between;gap:6px;align-items:flex-start}.v97-schedule-title strong{font-size:14px}.v97-schedule-main>span{font-size:11px}.v97-schedule-main>small{font-size:9px;color:#818d9d}
  .v97-schedule-actions{grid-column:1/3;display:flex;justify-content:flex-end;gap:6px;border-top:1px solid #edf0f3;padding-top:10px}.v97-schedule-actions .actions{display:flex;gap:6px}

  /* Modal as app-like bottom sheet */
  .modal{align-items:flex-end!important;padding:0!important}
  .modal-card{width:100%!important;max-width:none!important;max-height:90dvh!important;border-radius:24px 24px 0 0!important;margin:0!important}
  .modal-head{position:sticky;top:0;background:#fff;z-index:3;border-radius:24px 24px 0 0}
  .modal-actions{position:sticky;bottom:0;background:#fff;padding-bottom:max(10px,env(safe-area-inset-bottom));z-index:2}

  /* Management report */
  .v97-management-filter{grid-template-columns:1fr 1fr}.v97-management-filter .field:nth-child(3),.v97-management-filter #mgLoad{grid-column:1/3}
  .v97-management-kpis{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.v97-mg-kpi{min-height:90px;padding:12px}.v97-mg-kpi b{font-size:18px}
  .v97-report-grid{grid-template-columns:1fr}
  .v97-peak-row{grid-template-columns:44px minmax(0,1fr) 46px}.v97-peak-row small{display:none}
  .v97-customer-mix{grid-template-columns:repeat(3,minmax(0,1fr))}
  .v97-drill-row{padding:10px}

  /* Quick Actions */
  .v97-quick-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .v97-quick-grid button{grid-template-columns:34px 1fr;padding:10px}.v97-quick-grid button>span{width:34px;height:34px}

  /* Tables should stay inside phone viewport */
  .table-wrap{max-width:100%}
  .desktop-table{display:none!important}
}
@media(min-width:801px){
  .v97-mobile-schedule-list{display:none!important}
}

/* =========================================================
   V9.7.1 — DAILY SALARY -> EXPENSE
   ========================================================= */
.salary-transfer-card{display:grid;grid-template-columns:52px minmax(0,1fr);gap:13px;background:#fff;border:1px solid #dfe6ed;border-radius:18px;padding:15px;margin:12px 0 14px;box-shadow:0 8px 24px rgba(30,62,96,.045)}
.salary-transfer-card.not_transferred{border-color:#cfe2f6;background:linear-gradient(135deg,#fff,#f7fbff)}
.salary-transfer-card.matched{border-color:#cfeadb;background:linear-gradient(135deg,#fff,#f7fcf9)}
.salary-transfer-card.changed{border-color:#f0d7aa;background:linear-gradient(135deg,#fff,#fffaf1)}
.salary-transfer-card.blocked{border-color:#efd3cd;background:linear-gradient(135deg,#fff,#fff8f6)}
.salary-transfer-icon{width:52px;height:52px;border-radius:15px;display:grid;place-items:center;background:#eaf4ff;color:#177ed1;font-size:22px;font-weight:900}
.salary-transfer-card.matched .salary-transfer-icon{background:#e9f8ef;color:#13834d}.salary-transfer-card.changed .salary-transfer-icon{background:#fff1d8;color:#ad7000}.salary-transfer-card.blocked .salary-transfer-icon{background:#fff0ed;color:#bd5140}
.salary-transfer-main{min-width:0}
.salary-transfer-title{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}.salary-transfer-title>div{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.salary-transfer-title b{font-size:13px}.salary-transfer-title>strong{font-size:20px;white-space:nowrap}
.salary-transfer-status{display:inline-flex;border-radius:999px;padding:5px 8px;font-size:8px;font-weight:900}.salary-transfer-status.not_transferred{background:#eaf4ff;color:#1479cd}.salary-transfer-status.matched{background:#e8f8ef;color:#147f4c}.salary-transfer-status.changed{background:#fff1d8;color:#a76c00}.salary-transfer-status.blocked{background:#fff0ed;color:#b74c3e}
.salary-transfer-summary{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-top:7px;color:#7f8a99;font-size:9px}.salary-tip-note{color:#8b72ba}
.salary-transfer-warning{margin-top:9px;padding:9px 11px;border-radius:11px;background:#fff0ed;color:#a9483b;font-size:9px}.salary-transfer-warning.changed{background:#fff3dc;color:#9a6500}
.salary-transfer-branches{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:11px}.salary-transfer-branches>div{padding:10px 11px;border:1px solid #e8edf1;border-radius:12px;background:#fbfcfd}.salary-transfer-branches span{display:block;font-size:8px;color:#7e8a99}.salary-transfer-branches b{display:block;font-size:12px;margin:3px 0}.salary-transfer-branches small{font-size:8px;color:#9aa3ad}
.salary-transfer-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:12px}
.salary-detail-list{display:grid;gap:10px}.salary-detail-branch{border:1px solid #e4e9ee;border-radius:14px;overflow:hidden}.salary-detail-branch-head{display:flex;justify-content:space-between;gap:12px;padding:12px 13px;background:#f8fafc}.salary-detail-branch-head b,.salary-detail-branch-head strong{font-size:11px}
.salary-detail-breakdown{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;padding:10px 12px;border-top:1px solid #edf0f3;border-bottom:1px solid #edf0f3}.salary-detail-breakdown span{font-size:8px;color:#818d9c}.salary-detail-breakdown b{display:block;color:#26364a;font-size:10px;margin-top:3px}
.salary-detail-employees>div{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 12px;padding:9px 12px;border-bottom:1px solid #eef1f4}.salary-detail-employees>div:last-child{border-bottom:0}.salary-detail-employees span{font-size:10px;font-weight:800}.salary-detail-employees strong{font-size:10px}.salary-detail-employees small{grid-column:1/3;color:#8a95a3;font-size:8px}
.salary-unfinished-list{margin-top:12px;border:1px solid #efd5cf;border-radius:13px;padding:11px;background:#fff8f6}.salary-unfinished-list>b{font-size:10px;color:#a64c3e}.salary-unfinished-list>div{display:flex;justify-content:space-between;gap:10px;padding-top:7px;font-size:9px}.salary-unfinished-list small{color:#8e776f}
.salary-confirm-total{display:flex;justify-content:space-between;align-items:center;padding:12px;border-radius:12px;background:#f2f8fe;margin:12px 0}.salary-confirm-total span{font-size:10px}.salary-confirm-total b{font-size:18px;color:#137acb}
@media(max-width:800px){
  .salary-transfer-card{grid-template-columns:42px minmax(0,1fr);padding:12px;gap:10px}.salary-transfer-icon{width:42px;height:42px;border-radius:13px;font-size:18px}
  .salary-transfer-title{flex-direction:column;gap:6px}.salary-transfer-title>strong{font-size:18px}
  .salary-transfer-branches{grid-template-columns:1fr}.salary-transfer-actions{display:grid;grid-template-columns:1fr 1fr}.salary-transfer-actions .btn{width:100%}
  .salary-detail-breakdown{grid-template-columns:1fr 1fr}
}

/* V9.7.1.1 — salary transfer visibility fail-safe */
.salary-transfer-loading-missing{border-color:#efd8aa!important;background:linear-gradient(135deg,#fff,#fffbf3)!important}
.salary-transfer-loading-missing .salary-transfer-icon{background:#fff1d8!important;color:#a86e00!important}


/* V9.7.1.2 — Chuyển lương modal spacing */
#salaryExpenseModal .modal-body,
.salary-expense-modal .modal-body{
  padding:20px 24px 18px !important;
}
#salaryExpenseModal .modal-body > *,
.salary-expense-modal .modal-body > *{
  margin-left:0;
  margin-right:0;
}
#salaryExpenseModal .modal-footer,
.salary-expense-modal .modal-footer{
  padding:12px 20px 14px !important;
}
@media (max-width:600px){
  #salaryExpenseModal .modal-body,
  .salary-expense-modal .modal-body{
    padding:18px 18px 16px !important;
  }
}

/* ===== V9.7.2 mobile booking controls ===== */
@media(max-width:760px){
  .walkin-panel input[type="checkbox"],
  .addon-option input[type="checkbox"],
  .check-line input[type="checkbox"]{
    width:20px!important;
    height:20px!important;
    min-height:20px!important;
    min-width:20px!important;
    padding:0!important;
    margin:0!important;
    flex:0 0 20px!important;
    accent-color:#1976d2;
  }
  .walkin-panel .check-line{
    display:flex!important;
    align-items:center!important;
    gap:10px!important;
    min-height:44px;
  }
  .walkin-panel .check-line span{
    line-height:1.35;
    font-size:13px;
  }
  .addon-option{
    display:grid!important;
    grid-template-columns:22px minmax(0,1fr)!important;
    align-items:center!important;
    gap:10px!important;
    min-height:64px!important;
    padding:11px 12px!important;
  }
  .addon-option span{
    min-width:0;
    font-size:13px;
    line-height:1.3;
  }
  .addon-option small{
    font-size:11px!important;
  }
  .package-received-zero input{
    background:#f6f8fb!important;
    color:#45556b!important;
    font-weight:800!important;
  }
  .package-payment-hidden{
    display:none!important;
  }
}

/* =========================================================
   V9.7.3 — Popup clarity / desktop addon / search / export
   ========================================================= */
#modal{
  background:rgba(20,30,45,.58)!important;
  backdrop-filter:blur(3px);
  -webkit-backdrop-filter:blur(3px);
}
#modal .modal-card{
  background:#fff!important;
  border:1px solid #dbe3ec!important;
  box-shadow:0 24px 70px rgba(15,30,50,.28)!important;
}
#modal .modal-header{
  background:#fff!important;
  border-bottom:1px solid #e5eaf0!important;
}
#modal .modal-body{
  background:#fbfcfe!important;
}
#modal .field label{
  color:#536276!important;
  font-weight:800!important;
}
#modal input:not([type="checkbox"]):not([type="radio"]),
#modal select,
#modal textarea{
  background:#fff!important;
  border:1.5px solid #cbd6e2!important;
  color:#172133!important;
  box-shadow:0 1px 2px rgba(20,40,70,.03)!important;
}
#modal input:not([type="checkbox"]):not([type="radio"]):focus,
#modal select:focus,#modal textarea:focus{
  border-color:#2d84ee!important;
  box-shadow:0 0 0 3px rgba(45,132,238,.12)!important;
  outline:0!important;
}
#modal input[readonly]{
  background:#f2f6fa!important;
  color:#44546a!important;
}
#modal .walkin-panel,
#modal .linked-customer-field{
  background:#f4f8ff!important;
  border:1px solid #cfe0f7!important;
  border-radius:14px!important;
  padding:13px!important;
}
.addon-grid{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:12px!important;
}
.addon-option{
  display:grid!important;
  grid-template-columns:22px minmax(0,1fr)!important;
  align-items:center!important;
  gap:10px!important;
  min-height:76px!important;
  height:100%!important;
  padding:13px 14px!important;
  border:1px solid #d6e0eb!important;
  border-radius:13px!important;
  background:#f8fbff!important;
}
.addon-option input[type="checkbox"]{
  width:18px!important;height:18px!important;min-width:18px!important;min-height:18px!important;margin:0!important;
}
.addon-option span{display:block!important;min-width:0!important;font-weight:750!important;line-height:1.3!important}
.addon-option small{display:block!important;margin-top:3px!important;color:#78879a!important}
.customer-id-hidden973{display:none!important}
.customer-search973{position:relative}
.customer-search973 input{width:100%}
.customer-suggest973{
  position:absolute;left:0;right:0;top:calc(100% + 5px);z-index:120;
  max-height:300px;overflow:auto;background:#fff;border:1px solid #cdd8e5;border-radius:12px;
  box-shadow:0 16px 40px rgba(20,40,70,.18);padding:5px;
}
.customer-suggest973 button{
  width:100%;border:0;background:#fff;text-align:left;padding:10px 11px;border-radius:8px;display:flex;justify-content:space-between;gap:12px;cursor:pointer
}
.customer-suggest973 button:hover{background:#edf6ff}
.customer-suggest973 button b{font-size:13px;color:#172133}.customer-suggest973 button small{font-size:11px;color:#7b899a}
.customer-search-empty973{padding:12px;color:#7a8797;font-size:12px}
.report-export-actions{display:flex;gap:8px;align-items:end}
.report-export-status973{margin-top:10px;padding:9px 11px;background:#f5f8fb;border-radius:9px;color:#657488;font-size:12px}
.dashboard-report973{margin-bottom:16px!important}
.compact-report-filter973{display:grid;grid-template-columns:minmax(150px,.7fr) minmax(170px,.8fr) minmax(190px,1fr) auto auto;gap:10px;align-items:end}
.finance-kpi-v973 .finance-kpi em{display:block;font-style:normal;font-size:10px;color:#7b899a;margin-top:5px}
.finance-kpi-v973 .profit{border-left-color:#1dbb72!important}
@media(max-width:900px){
  .compact-report-filter973{grid-template-columns:1fr 1fr}
  .compact-report-filter973 .report-export-actions{grid-column:1/3}
}
@media(max-width:760px){
  .addon-grid{grid-template-columns:1fr 1fr!important;gap:8px!important}
  .addon-option{min-height:64px!important;padding:10px!important}
  .addon-option input[type="checkbox"]{width:19px!important;height:19px!important;min-width:19px!important;min-height:19px!important}
  .report-export-actions{width:100%}
  .report-export-actions .btn{flex:1}
}
@media(max-width:480px){
  .addon-grid{grid-template-columns:1fr!important}
  .compact-report-filter973{grid-template-columns:1fr}
  .compact-report-filter973 .report-export-actions{grid-column:auto}
}

/* =========================================================
   V9.7.4 — richer modal UI + expense page
   ========================================================= */
#modal .modal-card{
  border-radius:22px!important;
  overflow:hidden!important;
  box-shadow:0 28px 90px rgba(20,42,75,.34)!important;
  border:1px solid rgba(87,132,190,.22)!important;
}
#modal .modal-header{
  padding:18px 22px!important;
  background:linear-gradient(135deg,#f1f7ff 0%,#fff6fb 48%,#f4fff9 100%)!important;
  border-bottom:1px solid #dce7f2!important;
}
#modal .modal-header h3,#modal .modal-header b{
  color:#15243a!important;
  font-size:18px!important;
}
#modal .modal-body{
  padding:18px 20px!important;
  background:linear-gradient(180deg,#fbfdff 0%,#f6f9fc 100%)!important;
}
#modal .form-grid>.field{
  padding:10px!important;
  border-radius:13px!important;
  background:#fff!important;
  border:1px solid #e4ebf3!important;
}
#modal .form-grid>.field:focus-within{
  border-color:#93bef5!important;
  background:#fafdff!important;
  box-shadow:0 5px 18px rgba(35,115,220,.08)!important;
}
#modal .walkin-panel{
  background:linear-gradient(135deg,#f1f7ff,#f8f5ff)!important;
  border:1px solid #cbdff7!important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.7)!important;
}
#modal .linked-customer-field{
  background:linear-gradient(135deg,#eef8ff,#f3fbff)!important;
}
#modal .addon-option{
  background:linear-gradient(135deg,#fff,#f4f8ff)!important;
  border:1px solid #d6e3f2!important;
  box-shadow:0 4px 12px rgba(41,76,120,.05)!important;
}
#modal .addon-option:hover{
  border-color:#8ebbf0!important;
  box-shadow:0 7px 18px rgba(35,112,210,.10)!important;
}
#modal .btn.primary{
  background:linear-gradient(135deg,#2387f5,#5267f7)!important;
  border:0!important;
  box-shadow:0 8px 18px rgba(42,103,235,.22)!important;
}
#modal .btn.ghost{
  background:#fff!important;
  border:1px solid #dbe5ef!important;
}
.expense-page-v974{display:flex;flex-direction:column;gap:14px}
.expense-head-v974{display:flex;align-items:center;justify-content:space-between;gap:12px}
.expense-head-v974 h2{margin:0;font-size:27px}.expense-head-v974 p{margin:4px 0 0;color:#8090a3}
.expense-filter-v974{display:grid;grid-template-columns:minmax(150px,.7fr) minmax(180px,.8fr) minmax(200px,1fr) auto minmax(240px,1.2fr);gap:12px;align-items:end;padding:15px!important}
.expense-total-card-v974{padding:13px 16px;border-radius:14px;background:linear-gradient(135deg,#eef8ff,#f0fff6);border:1px solid #cfe6dd;min-height:68px}
.expense-total-card-v974 small{display:block;color:#66788b;font-size:11px}.expense-total-card-v974 b{display:block;font-size:24px;color:#0c8655;margin:2px 0}.expense-total-card-v974 span{font-size:10px;color:#7a8998}
.expense-table-card-v974{padding:0!important;overflow:hidden}.expense-table-card-v974 .section-heading{padding:15px 16px 8px}
.finance-kpi-v974 .finance-kpi em{display:block;font-style:normal;font-size:10px;color:#77889a;margin-top:5px}
.finance-kpi-v974 .marketing{border-left-color:#f1a11a!important;background:linear-gradient(135deg,#fff,#fff9ed)!important}
.finance-kpi-v974 .salary{border-left-color:#7d67f8!important;background:linear-gradient(135deg,#fff,#f8f6ff)!important}
.finance-kpi-v974 .total{border-left-color:#ef6c62!important;background:linear-gradient(135deg,#fff,#fff5f4)!important}
.finance-kpi-v974 .profit{border-left-color:#19b873!important;background:linear-gradient(135deg,#fff,#effff7)!important}
@media(max-width:1000px){
  .expense-filter-v974{grid-template-columns:1fr 1fr 1fr}
  .expense-total-card-v974{grid-column:1/4}
}
@media(max-width:700px){
  #modal .modal-body{padding:13px!important}
  #modal .modal-header{padding:15px!important}
  .expense-head-v974{align-items:flex-start}.expense-head-v974 h2{font-size:23px}
  .expense-filter-v974{grid-template-columns:1fr 1fr}
  .expense-filter-v974 .field:nth-child(3){grid-column:1/3}
  .expense-total-card-v974{grid-column:1/3}
}

/* =========================================================
   V9.7.4.1 — cleaner Expenses + colorful booking popup
   ========================================================= */
.expense-head-v974{display:none!important}

/* Booking / entity popup: each field becomes a soft colored tile.
   Inputs remain white for readability. */
#modal .form-grid > .field,
#modal .booking-grid > .field{
  border:1px solid #d8e5f2!important;
  border-radius:15px!important;
  padding:11px 12px 12px!important;
  box-shadow:0 5px 16px rgba(42,74,110,.055)!important;
}
#modal .form-grid > .field:nth-child(6n+1),
#modal .booking-grid > .field:nth-child(6n+1){
  background:linear-gradient(135deg,#eef7ff,#f7fbff)!important;
  border-color:#cfe3f7!important;
}
#modal .form-grid > .field:nth-child(6n+2),
#modal .booking-grid > .field:nth-child(6n+2){
  background:linear-gradient(135deg,#f5f1ff,#fbf9ff)!important;
  border-color:#ddd2fb!important;
}
#modal .form-grid > .field:nth-child(6n+3),
#modal .booking-grid > .field:nth-child(6n+3){
  background:linear-gradient(135deg,#effcf5,#f8fffb)!important;
  border-color:#ceeada!important;
}
#modal .form-grid > .field:nth-child(6n+4),
#modal .booking-grid > .field:nth-child(6n+4){
  background:linear-gradient(135deg,#fff7ec,#fffdf9)!important;
  border-color:#f1dfc4!important;
}
#modal .form-grid > .field:nth-child(6n+5),
#modal .booking-grid > .field:nth-child(6n+5){
  background:linear-gradient(135deg,#fff0f5,#fff9fb)!important;
  border-color:#f2d3df!important;
}
#modal .form-grid > .field:nth-child(6n),
#modal .booking-grid > .field:nth-child(6n){
  background:linear-gradient(135deg,#f1f8f8,#fbffff)!important;
  border-color:#d2e6e7!important;
}

/* Stronger labels: looks like a small caption on each colored panel */
#modal .field > label{
  display:inline-flex!important;
  align-items:center!important;
  min-height:22px!important;
  margin:0 0 7px!important;
  padding:3px 8px!important;
  border-radius:999px!important;
  background:rgba(255,255,255,.78)!important;
  color:#39516f!important;
  font-weight:900!important;
  letter-spacing:.01em!important;
  box-shadow:0 1px 4px rgba(50,80,110,.06)!important;
}

/* Keep inputs distinctly white inside the pastel panels */
#modal .field input:not([type="checkbox"]):not([type="radio"]),
#modal .field select,
#modal .field textarea{
  background:#fff!important;
  border-color:#c9d7e6!important;
}
#modal .field:focus-within{
  border-color:#83b6ef!important;
  box-shadow:0 8px 22px rgba(38,113,205,.12)!important;
  transform:translateY(-1px);
}

/* Special larger areas */
#modal .linked-customer-field{
  background:linear-gradient(135deg,#eaf7ff,#f3fbff)!important;
  border-color:#bcdcf4!important;
}
#modal .walkin-panel{
  background:linear-gradient(135deg,#eef3ff,#f7f2ff 48%,#fff6fb)!important;
  border-color:#cfcdf2!important;
}
#modal .addon-option{
  background:linear-gradient(135deg,#f5f9ff,#fff)!important;
}

/* Expenses now relies only on the global top + Thêm mới button */
.expense-page-v974{padding-top:0!important}

@media(max-width:760px){
  #modal .form-grid > .field,
  #modal .booking-grid > .field{
    padding:9px 10px 10px!important;
    border-radius:13px!important;
  }
  #modal .field > label{
    font-size:11px!important;
    padding:2px 7px!important;
  }
}

.auto-expense-lock-v9742{display:inline-flex;align-items:center;gap:5px;padding:6px 9px;border-radius:999px;background:#eef3f8;color:#65788d;border:1px solid #dbe4ed;font-size:11px;font-weight:800;white-space:nowrap}

.expense-mobile-list-v975{display:none}
.finance-source-total-v975{margin-top:10px;padding:10px 12px;border-top:1px solid #e4eaf1;display:flex;justify-content:space-between;align-items:center}
.finance-source-total-v975 span{font-size:11px;color:#728196;font-weight:800}.finance-source-total-v975 b{font-size:15px;color:#14243a}
@media(max-width:760px){
  .expense-desktop-table-v975{display:none!important}
  .expense-mobile-list-v975{display:flex!important;flex-direction:column;gap:10px;padding:10px}
  .expense-table-card-v974{overflow:visible!important;background:transparent!important;border:0!important;box-shadow:none!important}
  .expense-table-card-v974 .section-heading{background:#fff;border:1px solid #e2e8ef;border-radius:14px;padding:12px 14px!important;margin-bottom:2px}
  .expense-mobile-card-v975{background:#fff;border:1px solid #dfe7ef;border-radius:16px;padding:13px;box-shadow:0 5px 16px rgba(35,65,100,.06)}
  .expense-mobile-head-v975{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;padding-bottom:10px;border-bottom:1px solid #edf1f5}
  .expense-mobile-head-v975 div{display:flex;flex-direction:column;gap:3px}.expense-mobile-head-v975 small{color:#738399;font-size:11px;font-weight:800}
  .expense-mobile-head-v975 b{font-size:13px;color:#1b2b3f}.expense-mobile-head-v975 strong{font-size:18px;color:#0b8755;white-space:nowrap}
  .expense-mobile-body-v975{padding:11px 0 7px}.expense-group-pill-v975{display:inline-flex;padding:4px 8px;border-radius:999px;background:#eef5ff;color:#356aa2;font-size:10px;font-weight:850;margin-bottom:7px}
  .expense-mobile-body-v975 h4{margin:0;font-size:14px;line-height:1.4;color:#17263a}.expense-mobile-body-v975 p{margin:7px 0 0;color:#76869a;font-size:11px;line-height:1.45;max-height:44px;overflow:hidden;word-break:break-word}
  .expense-mobile-actions-v975{display:flex;justify-content:flex-end;gap:8px;padding-top:9px;border-top:1px solid #edf1f5}.expense-mobile-actions-v975 .btn{min-height:34px!important;padding:7px 12px!important}
  .expense-filter-v974{grid-template-columns:1fr 1fr!important;padding:12px!important;gap:9px!important}.expense-filter-v974 .field:nth-child(3){grid-column:1/3!important}.expense-filter-v974 #expenseView974{grid-column:1/3!important;width:100%!important}.expense-total-card-v974{grid-column:1/3!important}
}

/* V9.7.6 finance semantics */
.finance-kpi-v976{grid-template-columns:repeat(3,minmax(0,1fr))!important}
.finance-kpi-v976 .finance-kpi em{display:block;font-style:normal;font-size:10px;color:#78879a;margin-top:5px;line-height:1.35}
.finance-kpi-v976 .net{border-left-color:#13a8a8!important;background:linear-gradient(135deg,#fff,#f0ffff)!important}
.finance-source-subtitle-v976{
  margin:10px 0 7px;padding:5px 8px;border-radius:7px;background:#f1f5fa;color:#50657e;font-size:10px;font-weight:900;text-transform:uppercase;letter-spacing:.03em
}
.finance-source-subtitle-v976.cash{background:#edf9f3;color:#21805b}
.finance-source-total-v975.cash{background:#f2fbf7;border-radius:9px;border-top:0!important;margin-top:7px}
@media(max-width:1100px){.finance-kpi-v976{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media(max-width:650px){.finance-kpi-v976{grid-template-columns:1fr!important}}

/* V9.7.6.1 — finance UI simplified for quick owner reading */
.finance-kpi-v976 .finance-kpi small{
  font-size:11px!important;
  font-weight:800!important;
  color:#5f7186!important;
}
.finance-kpi-v976 .finance-kpi b{
  font-size:24px!important;
}
.finance-kpi-v976 .finance-kpi em{
  font-size:10px!important;
  margin-top:4px!important;
}
.finance-source-v976 .finance-source-grid > div{
  min-height:74px;
}
.finance-source-v976 .finance-source-grid span{
  font-weight:800;
}
.finance-source-v976 .finance-source-grid b{
  font-size:20px;
}

/* =========================================================
   V9.7.7 — Báo cáo tài chính nhiều màu, dễ đọc hơn
   ========================================================= */
.finance-kpi-v976{gap:14px!important}
.finance-kpi-v976 .finance-kpi{
  position:relative;overflow:hidden;border:1px solid rgba(65,92,130,.12)!important;
  border-left:0!important;border-radius:18px!important;padding:18px 18px 16px!important;
  min-height:116px;box-shadow:0 10px 26px rgba(29,53,87,.07)!important;
  transition:transform .18s ease,box-shadow .18s ease;
}
.finance-kpi-v976 .finance-kpi:hover{transform:translateY(-2px);box-shadow:0 14px 32px rgba(29,53,87,.11)!important}
.finance-kpi-v976 .finance-kpi::before{content:"";position:absolute;left:0;top:0;bottom:0;width:5px;border-radius:18px 0 0 18px}
.finance-kpi-v976 .finance-kpi::after{content:"";position:absolute;width:92px;height:92px;border-radius:50%;right:-34px;top:-38px;opacity:.32}
.finance-kpi-v976 .finance-kpi small,.finance-kpi-v976 .finance-kpi b,.finance-kpi-v976 .finance-kpi em{position:relative;z-index:1}
.finance-kpi-v976 .finance-kpi small{font-size:11px!important;font-weight:850!important;color:#607186!important}
.finance-kpi-v976 .finance-kpi b{display:block;margin-top:8px;font-size:26px!important;line-height:1.05;letter-spacing:-.02em}
.finance-kpi-v976 .finance-kpi em{display:block;margin-top:7px!important;font-style:normal;font-size:10px!important;color:#728196!important}

.finance-kpi-v976 .finance-kpi:nth-child(1){background:linear-gradient(135deg,#eef6ff,#fff 78%)!important}.finance-kpi-v976 .finance-kpi:nth-child(1)::before{background:#3b82f6}.finance-kpi-v976 .finance-kpi:nth-child(1)::after{background:#bfdbfe}.finance-kpi-v976 .finance-kpi:nth-child(1) b{color:#1557b0}
.finance-kpi-v976 .finance-kpi:nth-child(2){background:linear-gradient(135deg,#fff8e8,#fff 78%)!important}.finance-kpi-v976 .finance-kpi:nth-child(2)::before{background:#f59e0b}.finance-kpi-v976 .finance-kpi:nth-child(2)::after{background:#fde68a}.finance-kpi-v976 .finance-kpi:nth-child(2) b{color:#b66a00}
.finance-kpi-v976 .finance-kpi:nth-child(3){background:linear-gradient(135deg,#ebfffb,#fff 78%)!important}.finance-kpi-v976 .finance-kpi:nth-child(3)::before{background:#14b8a6}.finance-kpi-v976 .finance-kpi:nth-child(3)::after{background:#99f6e4}.finance-kpi-v976 .finance-kpi:nth-child(3) b{color:#0b8176}
.finance-kpi-v976 .finance-kpi:nth-child(4){background:linear-gradient(135deg,#eefaff,#fff 78%)!important}.finance-kpi-v976 .finance-kpi:nth-child(4)::before{background:#0ea5e9}.finance-kpi-v976 .finance-kpi:nth-child(4)::after{background:#bae6fd}.finance-kpi-v976 .finance-kpi:nth-child(4) b{color:#0475a9}
.finance-kpi-v976 .finance-kpi:nth-child(5){background:linear-gradient(135deg,#f5f7fa,#fff 78%)!important}.finance-kpi-v976 .finance-kpi:nth-child(5)::before{background:#64748b}.finance-kpi-v976 .finance-kpi:nth-child(5)::after{background:#cbd5e1}.finance-kpi-v976 .finance-kpi:nth-child(5) b{color:#445468}
.finance-kpi-v976 .finance-kpi:nth-child(6){background:linear-gradient(135deg,#f5f0ff,#fff 78%)!important}.finance-kpi-v976 .finance-kpi:nth-child(6)::before{background:#8b5cf6}.finance-kpi-v976 .finance-kpi:nth-child(6)::after{background:#ddd6fe}.finance-kpi-v976 .finance-kpi:nth-child(6) b{color:#6841c6}
.finance-kpi-v976 .finance-kpi:nth-child(7){background:linear-gradient(135deg,#fff1f3,#fff 78%)!important}.finance-kpi-v976 .finance-kpi:nth-child(7)::before{background:#f43f5e}.finance-kpi-v976 .finance-kpi:nth-child(7)::after{background:#fecdd3}.finance-kpi-v976 .finance-kpi:nth-child(7) b{color:#bf2944}
.finance-kpi-v976 .finance-kpi:nth-child(8){background:linear-gradient(135deg,#edfff6,#fff 78%)!important}.finance-kpi-v976 .finance-kpi:nth-child(8)::before{background:#22c55e}.finance-kpi-v976 .finance-kpi:nth-child(8)::after{background:#bbf7d0}.finance-kpi-v976 .finance-kpi:nth-child(8) b{color:#15803d}
.finance-kpi-v976 .finance-kpi:nth-child(9){background:linear-gradient(135deg,#fff1fb,#fff 78%)!important}.finance-kpi-v976 .finance-kpi:nth-child(9)::before{background:#d946ef}.finance-kpi-v976 .finance-kpi:nth-child(9)::after{background:#f5d0fe}.finance-kpi-v976 .finance-kpi:nth-child(9) b{color:#a42cb7}

.finance-source-v976{background:linear-gradient(180deg,#fff,#fbfdff)!important;border-radius:18px!important;box-shadow:0 8px 24px rgba(37,60,90,.055)!important}
.finance-source-v976 .finance-source-grid>div{border-radius:14px!important;border:1px solid #e2eaf3!important;background:linear-gradient(135deg,#f7fbff,#fff)!important}
.finance-source-v976 .finance-source-grid>div b{color:#123b65!important}
.finance-source-total-v975{border-radius:12px!important;background:#f4f8fd!important}
.finance-source-total-v975.cash{background:linear-gradient(135deg,#eafbf3,#f8fffb)!important;color:#176e4e!important}
@media(max-width:650px){.finance-kpi-v976 .finance-kpi{min-height:104px;padding:15px!important}.finance-kpi-v976 .finance-kpi b{font-size:23px!important}}


/* ===== V9.7.8 SYNC CSS: HÓA ĐƠN / QR / PAYOS ===== */
/* =========================================================
   V10.5 — INVOICE / PAYMENT / PRINT / SETTINGS
   ========================================================= */
.invoice-mini{border:1px solid #bcd8f5!important;background:#f5faff!important;color:#1479cd!important}
.invoice-app-shell{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(300px,.72fr);min-height:560px}
.invoice-detail-panel{padding:18px 20px;border-right:1px solid #e4e9ef}
.invoice-brand-block{display:grid;grid-template-columns:48px minmax(0,1fr) auto;gap:11px;align-items:center;padding-bottom:14px;border-bottom:1px solid #e8edf2}
.invoice-brand-block img,.invoice-logo-placeholder{width:48px;height:48px;border-radius:12px;object-fit:contain;background:#eef5ff;display:grid;place-items:center;color:#1b7bd0;font-weight:900}
.invoice-brand-block h3{margin:0 0 3px;font-size:17px}.invoice-brand-block small{display:block;color:#8290a0;font-size:9px}.invoice-number{font-size:9px;border-radius:999px;background:#f0f5fa;padding:7px 9px;color:#647386}
.invoice-customer-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px 18px;padding:14px 0}.invoice-customer-grid>div{display:flex;flex-direction:column;gap:3px}.invoice-customer-grid .wide{grid-column:1/3}.invoice-customer-grid small{font-size:8px;color:#8390a1}.invoice-customer-grid b{font-size:10px}
.invoice-items-head,.invoice-item-row{display:grid;grid-template-columns:minmax(0,1fr) 48px 100px 110px;gap:8px;align-items:center}
.invoice-items-head{padding:8px 10px;border-radius:10px;background:#edf9f3;color:#178154;font-size:8px;font-weight:900}.invoice-items-head span:not(:first-child){text-align:right}
.invoice-item-row{padding:11px 10px;border-bottom:1px solid #edf0f3;font-size:9px}.invoice-item-row>span:not(:first-child),.invoice-item-row>strong{text-align:right}.invoice-item-row b{font-size:10px}.invoice-item-row small{display:block;color:#8c97a4;font-size:7px;margin-top:2px}
.invoice-promo-pill{display:inline-flex;margin-top:10px;padding:6px 9px;border-radius:999px;background:#ffeaf3;color:#d94f88;font-size:8px;font-weight:800}
.invoice-summary-lines{margin:12px 0 0 auto;width:min(360px,100%)}.invoice-summary-lines>div{display:flex;justify-content:space-between;gap:15px;padding:6px 0;font-size:10px}.invoice-summary-lines .discount{color:#c95c42}.invoice-summary-lines .due{font-size:13px;font-weight:900;border-top:1px solid #dfe4e9;margin-top:4px;padding-top:10px}.invoice-summary-lines .due b{color:#12915e}
.invoice-note{margin-top:12px;border-radius:11px;padding:10px;background:#fff9e9;color:#826b32;font-size:9px}
.invoice-payment-panel{padding:18px;background:#fbfcfe}.invoice-payment-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-end;border-bottom:1px solid #e5eaf0;padding-bottom:12px}.invoice-payment-head small{display:block;font-size:8px;color:#7f8b99}.invoice-payment-head b{display:block;font-size:22px;color:#12915e;margin-top:4px}.invoice-payment-head>span{font-size:8px;background:#eef3f7;padding:6px 8px;border-radius:999px}
.invoice-pay-methods{display:flex;gap:15px;padding:13px 0;font-size:9px}.invoice-pay-methods label{display:flex;align-items:center;gap:5px}
.invoice-bank-card{display:grid;grid-template-columns:130px minmax(0,1fr);gap:13px;border:1px solid #dbe7e1;background:#f5fcf8;border-radius:15px;padding:12px}.invoice-qr{width:130px;height:130px;object-fit:contain;background:#fff;border-radius:10px}.invoice-qr-empty{width:130px;height:130px;display:grid;place-items:center;background:#fff;border:1px dashed #c9d2d8;border-radius:10px;color:#a0abb7;font-weight:900}.invoice-bank-card>div:last-child{display:flex;flex-direction:column;gap:3px;justify-content:center}.invoice-bank-card small{font-size:7px;color:#83909e;margin-top:4px}.invoice-bank-card b{font-size:10px}.invoice-bank-card span{font-size:9px}.invoice-bank-card strong{font-size:10px;color:#145f9a}
.invoice-transaction-state{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-top:12px}.invoice-transaction-state span{font-size:8px;border-radius:999px;padding:6px 8px}.invoice-transaction-state .ready{background:#e9f8ef;color:#157b4a}.invoice-transaction-state .manual{background:#fff1dc;color:#986600}.invoice-payos-note{display:block;color:#8995a2;font-size:8px;margin-top:8px;line-height:1.5}
.invoice-actions{padding:12px 18px!important}
.invoice-loading{padding:50px;text-align:center;color:#8994a2}
.billing-settings-form{display:grid;gap:14px}.billing-setting-section{padding:18px}.billing-setting-section .form-grid{margin-top:12px}.billing-setting-section textarea{width:100%;border:1px solid #dfe5ec;border-radius:12px;padding:10px 12px;resize:vertical;font:inherit}
.billing-toggle-grid{display:flex;gap:12px;flex-wrap:wrap;margin-top:12px}.billing-toggle-grid label{display:flex;gap:7px;align-items:center;border:1px solid #e4e9ef;border-radius:11px;padding:9px 11px;background:#fbfcfd;font-size:9px}
.billing-qr-preview{display:flex;align-items:center;gap:12px;margin-top:12px;padding:12px;border:1px dashed #cbd9e5;border-radius:14px;background:#f8fbfe}.billing-qr-preview img{width:130px;height:130px;object-fit:contain;border-radius:10px;background:#fff}.billing-qr-preview b{display:block;font-size:11px}.billing-qr-preview small{display:block;color:#8995a3;font-size:8px;margin-top:4px}.billing-qr-empty-preview{padding:18px;color:#8793a1;font-size:9px}
.payos-ready-section{border-color:#d9e6fb!important}.payos-ready-badge{background:#eaf4ff;color:#1379ce;border-radius:999px;padding:7px 9px;font-size:8px;font-weight:900}.secret-ok{font-size:7px;color:#118052;background:#e9f8ef;padding:3px 5px;border-radius:999px;margin-left:4px}.security-note{margin-top:12px;border-radius:11px;background:#f4f7fa;padding:10px 12px;color:#667589;font-size:8px}
.billing-savebar{position:sticky;bottom:0;z-index:4;display:flex;justify-content:flex-end;align-items:center;gap:12px;padding:12px 14px;background:rgba(247,249,252,.94);backdrop-filter:blur(10px);border:1px solid #e5eaf0;border-radius:14px}.billing-savebar span{font-size:9px;color:#178052}
@media(max-width:900px){
  .invoice-app-shell{grid-template-columns:1fr}.invoice-detail-panel{border-right:0;border-bottom:1px solid #e4e9ef}.invoice-bank-card{grid-template-columns:110px 1fr}.invoice-qr,.invoice-qr-empty{width:110px;height:110px}
}
@media(max-width:600px){
  .invoice-detail-panel,.invoice-payment-panel{padding:14px}
  .invoice-brand-block{grid-template-columns:42px minmax(0,1fr)}.invoice-number{grid-column:1/3;justify-self:start}.invoice-brand-block img,.invoice-logo-placeholder{width:42px;height:42px}
  .invoice-customer-grid{grid-template-columns:1fr}.invoice-customer-grid .wide{grid-column:auto}
  .invoice-items-head{display:none}.invoice-item-row{grid-template-columns:minmax(0,1fr) auto;gap:4px 12px;border:1px solid #e7ebef;border-radius:12px;margin-top:7px}.invoice-item-row>span:nth-child(2){display:none}.invoice-item-row>span:nth-child(3){font-size:8px;color:#8793a0}.invoice-item-row>strong{font-size:10px}
  .invoice-bank-card{grid-template-columns:1fr;text-align:center}.invoice-qr,.invoice-qr-empty{width:170px;height:170px;margin:auto}.invoice-bank-card>div:last-child{align-items:center}
  .invoice-actions{display:grid!important;grid-template-columns:1fr 1fr}.invoice-actions #invoiceClose{grid-column:1/3}
  .billing-setting-section{padding:14px}.billing-toggle-grid{display:grid;grid-template-columns:1fr}.billing-qr-preview{flex-direction:column;text-align:center}.billing-qr-preview img{width:170px;height:170px}
  .payos-ready-badge{display:none}
}

/* V10.5.1 completion -> invoice */
.completion-invoice-success{padding:18px 22px 8px;text-align:center}.completion-success-icon{width:54px;height:54px;border-radius:50%;display:grid;place-items:center;margin:0 auto 12px;background:#e8f8ef;color:#15945b;font-size:28px;font-weight:900}.completion-invoice-success h3{margin:0 0 7px}.completion-invoice-success p{margin:0;color:#6f7c8c}.completion-invoice-actions{padding:16px 22px 20px!important}
@media(max-width:640px){.completion-invoice-actions{display:grid!important;grid-template-columns:1fr 1fr}.completion-invoice-actions #completionInvoiceClose{grid-column:1/3;order:3}}

/* =========================================================
   V10.5.2 — Invoice popup wider + QR larger
   ========================================================= */
#modal .modal-card.invoice-modal-wide{
  width:min(1080px,96vw)!important;
  max-width:1080px!important;
}
#modal .modal-card.invoice-modal-wide #modalBody{
  overflow-x:hidden!important;
}
#modal .modal-card.invoice-modal-wide .invoice-app-shell{
  grid-template-columns:minmax(0,1.5fr) minmax(360px,.82fr)!important;
}
#modal .modal-card.invoice-modal-wide .invoice-bank-card{
  grid-template-columns:170px minmax(0,1fr)!important;
  gap:16px!important;
  padding:15px!important;
}
#modal .modal-card.invoice-modal-wide .invoice-qr,
#modal .modal-card.invoice-modal-wide .invoice-qr-empty{
  width:170px!important;
  height:170px!important;
}
#modal .modal-card.invoice-modal-wide .invoice-payment-panel{
  padding:20px!important;
}
#modal .modal-card.invoice-modal-wide .invoice-payment-head b{
  font-size:24px!important;
}

@media(max-width:900px){
  #modal .modal-card.invoice-modal-wide{
    width:100%!important;
    max-width:none!important;
  }
  #modal .modal-card.invoice-modal-wide .invoice-app-shell{
    grid-template-columns:1fr!important;
  }
  #modal .modal-card.invoice-modal-wide .invoice-bank-card{
    grid-template-columns:150px minmax(0,1fr)!important;
  }
  #modal .modal-card.invoice-modal-wide .invoice-qr,
  #modal .modal-card.invoice-modal-wide .invoice-qr-empty{
    width:150px!important;
    height:150px!important;
  }
}
@media(max-width:600px){
  #modal .modal-card.invoice-modal-wide .invoice-bank-card{
    grid-template-columns:1fr!important;
    text-align:center!important;
  }
  #modal .modal-card.invoice-modal-wide .invoice-qr,
  #modal .modal-card.invoice-modal-wide .invoice-qr-empty{
    width:200px!important;
    height:200px!important;
    margin:auto!important;
  }
}

/* V10.5.3 — bank account / QR setup */
.billing-field-help{
  display:block;
  margin-top:6px;
  color:#7f8c9c;
  font-size:8px;
  line-height:1.45;
}

/* =========================================================
   V10.5.4 — merged invoice + payment
   ========================================================= */
#modal .modal-card.invoice-modal-wide{
  width:min(1240px,97vw)!important;
  max-width:1240px!important;
}
#modal .modal-card.invoice-modal-wide .invoice-completion-shell{
  grid-template-columns:minmax(0,1.42fr) minmax(430px,.88fr)!important;
}
.invoice-payment-entry .invoice-payment-inputs{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  margin-top:16px;
}
.invoice-payment-entry .invoice-payment-inputs .field:first-child{
  grid-column:1/3;
}
.invoice-method-title{
  margin-top:14px;
  font-size:9px;
  font-weight:900;
  color:#667589;
}
.invoice-pay-methods-large{
  gap:24px!important;
  padding:12px 0 14px!important;
}
.invoice-pay-methods-large label{
  font-size:10px;
  font-weight:700;
}
.invoice-bank-area.hidden{display:none!important}
.invoice-bank-card-large{
  grid-template-columns:260px minmax(0,1fr)!important;
  gap:20px!important;
  padding:16px!important;
  align-items:center;
}
.invoice-bank-card-large .invoice-qr-xl{
  width:260px!important;
  height:260px!important;
}
.invoice-payment-manual-note{
  margin-top:10px;
  padding:9px 11px;
  background:#fff7e8;
  color:#8e680e;
  border-radius:10px;
  font-size:8px;
  line-height:1.45;
}
.invoice-paid-pill{
  background:#e7f8ef!important;
  color:#14804c!important;
}
.invoice-readonly-method{
  margin-top:16px;
  padding:14px;
  border:1px solid #e4eaf0;
  background:#fff;
  border-radius:13px;
}
.invoice-readonly-method small{
  display:block;
  color:#8390a0;
  font-size:8px;
}
.invoice-readonly-method b{
  display:block;
  margin-top:4px;
  font-size:15px;
}
.invoice-bank-card-readonly{
  grid-template-columns:220px minmax(0,1fr)!important;
  gap:18px!important;
  margin-top:12px;
}
.invoice-bank-card-readonly .invoice-qr-readonly{
  width:220px!important;
  height:220px!important;
}
.invoice-readonly-note{
  margin-top:12px;
  color:#8894a2;
  font-size:8px;
}
.invoice-complete-actions{
  grid-template-columns:auto auto!important;
}
.invoice-complete-actions #invoiceCompleteSubmit{
  min-width:180px;
}
@media(max-width:900px){
  #modal .modal-card.invoice-modal-wide .invoice-completion-shell{
    grid-template-columns:1fr!important;
  }
  .invoice-bank-card-large{
    grid-template-columns:230px minmax(0,1fr)!important;
  }
  .invoice-bank-card-large .invoice-qr-xl{
    width:230px!important;
    height:230px!important;
  }
}
@media(max-width:600px){
  .invoice-payment-entry .invoice-payment-inputs{
    grid-template-columns:1fr;
  }
  .invoice-payment-entry .invoice-payment-inputs .field:first-child{
    grid-column:auto;
  }
  .invoice-bank-card-large,
  .invoice-bank-card-readonly{
    grid-template-columns:1fr!important;
    text-align:center;
  }
  .invoice-bank-card-large .invoice-qr-xl,
  .invoice-bank-card-readonly .invoice-qr-readonly{
    width:280px!important;
    height:280px!important;
    max-width:88vw!important;
    max-height:88vw!important;
    margin:auto!important;
  }
  .invoice-bank-card-large>div:last-child,
  .invoice-bank-card-readonly>div:last-child{
    align-items:center!important;
  }
  .invoice-complete-actions{
    display:grid!important;
    grid-template-columns:1fr!important;
  }
  .invoice-complete-actions .btn{
    width:100%!important;
  }
}

/* V10.5.5 — pre-print before completion */
.invoice-preprint-actions{
  display:grid!important;
  grid-template-columns:auto auto auto minmax(190px,auto)!important;
  gap:10px!important;
}
.invoice-preprint-actions .btn{min-height:42px}
.invoice-preprint-actions #invoiceCompleteSubmit{min-width:190px}
@media(max-width:780px){
  .invoice-preprint-actions{grid-template-columns:1fr 1fr!important}
  .invoice-preprint-actions #invoiceClose{grid-column:1/3}
  .invoice-preprint-actions #invoiceCompleteSubmit{grid-column:1/3;width:100%}
}

/* Minh Tâm package-use invoice */
.package-invoice-payment-v978 .invoice-payment-head b{color:#6b4fd3!important}
.package-zero-v978 input{font-weight:900!important;color:#5d6877!important;background:#f4f6f9!important}

/* V9.7.8.1 — package invoice */
.package-paid-label-v9781{color:#6d4fd3!important}
.package-readonly-v9781{
  background:linear-gradient(135deg,#f6f1ff,#ffffff)!important;
  border-color:#ded2fa!important;
}
.package-readonly-v9781 .invoice-payment-head b{color:#6c4bd1!important}
.invoice-package-note-v9781{
  margin-top:14px;padding:12px 14px;border-radius:12px;
  background:#f3efff;color:#6553a7;font-size:12px;font-weight:800;
}

/* =========================================================
   V9.7.9 — Employee lifecycle
   ========================================================= */
.employee-page-note-v979{display:flex;gap:10px;align-items:center;padding:12px 15px;background:linear-gradient(135deg,#eef8ff,#f7fbff);border-bottom:1px solid #dce8f3}
.employee-page-note-v979 b{color:#1d4f7b}.employee-page-note-v979 span{font-size:11px;color:#728398}
.employee-sub-v979{display:block;margin-top:4px;color:#7a899b;font-size:10px}
.employee-status-v979{display:inline-flex;align-items:center;padding:5px 9px;border-radius:999px;font-size:10px;font-weight:900;white-space:nowrap}
.employee-status-v979.active{background:#eafbf1;color:#17814d;border:1px solid #cbeed9}
.employee-status-v979.retired{background:#f1f3f6;color:#6d7988;border:1px solid #dde2e8}
.employee-retire-v979{border:1px solid #efc3c3!important;background:#fff4f4!important;color:#b63b3b!important;border-radius:9px!important;padding:7px 10px!important}
.employee-reactivate-v979{border:1px solid #bce5cf!important;background:#eefbf4!important;color:#188251!important;border-radius:9px!important;padding:7px 10px!important}
.employee-retire-modal-v979{display:flex;flex-direction:column;gap:14px}
.employee-retire-hero-v979{display:flex;gap:14px;align-items:center;padding:16px;border-radius:16px;background:linear-gradient(135deg,#fff2f3,#fffaf7);border:1px solid #f0d4d6}
.employee-retire-icon-v979{display:grid;place-items:center;width:48px;height:48px;border-radius:14px;background:#fff;color:#d9525f;font-size:26px;font-weight:900;box-shadow:0 5px 16px rgba(180,60,70,.10)}
.employee-retire-hero-v979 small{font-size:9px;font-weight:900;color:#c15a65;letter-spacing:.08em}.employee-retire-hero-v979 h3{margin:3px 0 2px;font-size:18px}.employee-retire-hero-v979 p{margin:0;color:#7f8792;font-size:11px}
.employee-retire-date-v979{padding:12px!important;background:#f7fbff!important;border:1px solid #d9e8f5!important;border-radius:14px!important}
.employee-retire-summary-v979{display:grid;grid-template-columns:repeat(3,1fr);gap:9px}
.employee-retire-summary-v979>div{padding:12px;border-radius:13px;background:#f6f8fb;border:1px solid #e2e7ed}
.employee-retire-summary-v979 small,.employee-payroll-grid-v979 small{display:block;font-size:9px;color:#7b899a;margin-bottom:4px}.employee-retire-summary-v979 b{font-size:15px}.employee-retire-summary-v979 .warn{background:#fff4f2;border-color:#f3d2cd}.employee-retire-summary-v979 .warn b{color:#c44435}
.employee-payroll-v979{border:1px solid #d9e7dd;background:linear-gradient(135deg,#f1fbf5,#fbfffc);border-radius:14px;padding:13px}
.employee-payroll-head-v979{display:flex;justify-content:space-between;gap:10px;margin-bottom:10px}.employee-payroll-head-v979 small{color:#748496;font-size:10px}
.employee-payroll-grid-v979{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.employee-payroll-grid-v979 span{background:#fff;border:1px solid #e2eee6;border-radius:10px;padding:9px}.employee-payroll-grid-v979 b{font-size:13px}
.employee-future-v979{padding:12px;border-radius:14px;background:#fff6ef;border:1px solid #efd8c5}.employee-future-v979>b{display:block;color:#a85a20;margin-bottom:8px}
.employee-future-v979>div{display:grid;grid-template-columns:130px 1fr;gap:8px;padding:7px 0;border-top:1px solid rgba(190,130,80,.14);font-size:10px}.employee-future-v979 strong{font-weight:700}.employee-future-v979 small{display:block;margin-top:6px;color:#8c6e58}
.employee-ready-v979{padding:12px;border-radius:12px;background:#eefbf4;color:#187c4e;border:1px solid #cfead9;font-weight:850}
@media(max-width:760px){
  .employee-page-note-v979{display:none}
  .employee-card-v979 .mobile-data-actions{gap:8px}
  .employee-retire-summary-v979{grid-template-columns:1fr 1fr}.employee-retire-summary-v979>div:last-child{grid-column:1/3}
  .employee-payroll-grid-v979{grid-template-columns:1fr 1fr}
  .employee-future-v979>div{grid-template-columns:1fr}
}


/* V9.7.13 — searchable customer picker for package sale */
.package-customer-picker{position:relative;z-index:25}
.package-customer-picker #gCustomerSearch{width:100%;padding-right:42px}
.package-customer-picker #gCustomerSearch.input-error{border-color:#dc2626;box-shadow:0 0 0 3px rgba(220,38,38,.10)}
.package-customer-dropdown{position:absolute;left:12px;right:12px;top:76px;max-height:300px;overflow:auto;background:#fff;border:1px solid #cbd5e1;border-radius:14px;box-shadow:0 18px 40px rgba(15,23,42,.18);padding:6px;z-index:9999}
.package-customer-dropdown.hidden{display:none}
.package-customer-option{width:100%;border:0;background:#fff;text-align:left;padding:10px 12px;border-radius:10px;display:flex;justify-content:space-between;gap:14px;align-items:center;cursor:pointer;color:#0f172a}
.package-customer-option:hover,.package-customer-option:focus{background:#eff6ff;outline:none}
.package-customer-option b{font-size:14px;font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.package-customer-option span{font-size:13px;color:#64748b;white-space:nowrap}
.package-customer-empty{padding:14px 12px;color:#64748b;font-size:13px}
@media(max-width:700px){.package-customer-dropdown{left:8px;right:8px;max-height:240px}.package-customer-option{align-items:flex-start;flex-direction:column;gap:2px}}

/* ===== Minh Tâm V9.7.14 — fast popup + customer combo ===== */
.package-customer-combo-v974{display:grid;grid-template-columns:1fr 44px;gap:7px;align-items:center}
.package-customer-combo-v974 input{width:100%;min-width:0}
.package-customer-toggle-v974{height:44px;border:1px solid var(--line);border-radius:11px;background:#fff;cursor:pointer;font-size:22px;line-height:1;color:#52627a}
.package-customer-toggle-v974:hover{background:#f6f9ff}
.package-customer-native-v974{width:100%;margin-top:7px}
/* Popup must feel immediate: remove expensive backdrop blur on modal open. */
#modal.modal{backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
#modal:not(.hidden) .modal-card{animation:mtFastPopup974 .09s ease-out both}
@keyframes mtFastPopup974{from{opacity:.82;transform:translateY(3px) scale(.998)}to{opacity:1;transform:none}}
