:root{
  --ui-bg:#f3f6ff;
  --ui-surface:#ffffff;
  --ui-surface-2:#f7f9ff;
  --ui-text:#18233a;
  --ui-muted:#6c7a99;
  --ui-primary:#5b6cff;
  --ui-primary-600:#4f63ff;
  --ui-accent:#8aa0ff;
  --ui-border:#d9e0ff;
  --ui-shadow:0 18px 45px rgba(22, 34, 58, .12);
  --ui-radius:18px;
  --brand-plate-bg:rgba(255,255,255,.94);
  --brand-plate-border:rgba(255,255,255,.24);
  --brand-plate-shadow:0 14px 28px rgba(0,0,0,.14);
  --brand-mark-bg:rgba(255,255,255,.94);
  --brand-mark-text:var(--ui-primary);
  --sidebar-bg:linear-gradient(180deg,#5b6cff 0%, #4f63ff 100%);
  --sidebar-shadow:0 22px 55px rgba(25,45,120,.22);
  --sidebar-text:rgba(255,255,255,.94);
  --sidebar-text-muted:rgba(255,255,255,.75);
  --sidebar-item-hover-bg:rgba(255,255,255,.14);
  --sidebar-item-active-bg:rgba(255,255,255,.92);
  --sidebar-item-active-text:#2139b8;
  --sidebar-parent-bg:rgba(255,255,255,.06);
  --sidebar-parent-hover-bg:rgba(255,255,255,.14);
  --sidebar-parent-active-bg:rgba(255,255,255,.14);
  --sidebar-sep:rgba(255,255,255,.16);
  --login-hero-bg:linear-gradient(135deg,#4f6ef7 0%, #3f5ef0 40%, #2d49d9 100%);
  --login-left-bg:radial-gradient(900px 500px at 10% 0%, rgba(79,110,247,.14) 0%, rgba(79,110,247,0) 60%);
}

html{color-scheme:light}
html[data-theme="dark"]{
  color-scheme:dark;
  --ui-bg:#0b1020;
  --ui-surface:#0f162b;
  --ui-surface-2:#131c35;
  --ui-text:#e7ecff;
  --ui-muted:#a8b3d6;
  --ui-primary:#7b8cff;
  --ui-primary-600:#6f83ff;
  --ui-accent:#9fb0ff;
  --ui-border:#233055;
  --ui-shadow:0 18px 45px rgba(0, 0, 0, .40);
  --brand-plate-bg:rgba(255,255,255,.90);
  --brand-plate-border:rgba(255,255,255,.18);
  --brand-plate-shadow:0 16px 34px rgba(0,0,0,.38);
  --brand-mark-bg:rgba(255,255,255,.92);
  --brand-mark-text:#2139b8;
  --sidebar-bg:linear-gradient(180deg,#0f1730 0%, #0b1226 100%);
  --sidebar-shadow:0 22px 55px rgba(0,0,0,.55);
  --sidebar-item-hover-bg:rgba(255,255,255,.08);
  --sidebar-item-active-bg:rgba(255,255,255,.12);
  --sidebar-item-active-text:#ffffff;
  --sidebar-parent-bg:rgba(255,255,255,.06);
  --sidebar-parent-hover-bg:rgba(255,255,255,.10);
  --sidebar-parent-active-bg:rgba(255,255,255,.10);
  --sidebar-sep:rgba(255,255,255,.10);
  --login-hero-bg:linear-gradient(135deg,#121a33 0%, #0d142a 45%, #0a1022 100%);
  --login-left-bg:radial-gradient(900px 500px at 10% 0%, rgba(123,140,255,.16) 0%, rgba(123,140,255,0) 60%);
}

body{color:var(--ui-text);font-family:Inter,system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;background:var(--ui-bg);}
body.no-scroll{overflow:hidden}
a{text-decoration:none}
a:hover{text-decoration:none}
.bg-surface{background:var(--ui-bg);}
.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;}
.object-fit-cover{object-fit:cover;}
.text-secondary{color:var(--ui-muted)!important;}

.brand-mark{width:46px;height:46px;border-radius:16px;background:var(--brand-mark-bg);display:flex;align-items:center;justify-content:center;color:var(--brand-mark-text);font-weight:900;box-shadow:0 12px 24px rgba(0,0,0,.12)}
.brand-mark.small{width:38px;height:38px;border-radius:14px}
.brand-logo{width:200px;height:70px;border-radius:16px;background:var(--brand-plate-bg);border:1px solid var(--brand-plate-border);display:flex;align-items:center;justify-content:center;box-shadow:var(--brand-plate-shadow);overflow:hidden;padding:.35rem .6rem}
.brand-logo img{max-width:100%;max-height:100%;object-fit:contain;display:block}
.layout:not(.collapsed) .sidebar .brand-logo{width:200px;height:70px}
.login-page .brand-logo{width:280px;height:96px;border-radius:18px}
.login-page .brand-logo img{max-height:92px}
.layout.collapsed .brand-logo{width:46px !important;height:46px !important;border-radius:16px}
.brand-icon{display:none}
.layout.collapsed .sidebar .brand-logo{display:none}
.layout.collapsed .sidebar .brand-icon{display:flex}
.card-elevated{background:var(--ui-surface);border:1px solid var(--ui-border);border-radius:var(--ui-radius);box-shadow:var(--ui-shadow)}
.chart-box{position:relative;height:220px}
.chart-box.chart-lg{height:180px}
.chart-box.chart-md{height:220px}
.chart-box canvas{width:100%!important;height:100%!important}

.layout{min-height:100vh;display:grid;grid-template-columns:260px 1fr;grid-template-rows:auto 1fr;background:var(--ui-bg)}
.layout.collapsed{grid-template-columns:84px 1fr}
.sidebar{grid-row:1 / span 2;grid-column:1;background:var(--sidebar-bg);color:var(--sidebar-text);position:fixed;top:0;left:0;bottom:0;width:260px;align-self:start;height:100vh;overflow:hidden;overflow-x:hidden;display:flex;flex-direction:column}
.layout.collapsed .sidebar{width:84px}
.sidebar{border-top-right-radius:26px;border-bottom-right-radius:26px;box-shadow:var(--sidebar-shadow)}
.sidebar .brand{display:flex;align-items:center;gap:.75rem;padding:1rem 1.25rem;justify-content:center;overflow:hidden}
.sidebar .brand .title{line-height:1}
.sidebar .brand .title .text-secondary{color:var(--sidebar-text-muted)!important}
.sidebar .menu{flex:1 1 auto;overflow:auto;overflow-x:hidden}
.sidebar .menu{scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.45) rgba(255,255,255,.14)}
.sidebar .menu::-webkit-scrollbar{width:10px}
.sidebar .menu::-webkit-scrollbar-track{background:rgba(255,255,255,.12);border-radius:999px;margin:10px 0}
.sidebar .menu::-webkit-scrollbar-thumb{background:rgba(255,255,255,.42);border-radius:999px;border:2px solid rgba(91,108,255,.55)}
.sidebar .menu::-webkit-scrollbar-thumb:hover{background:rgba(255,255,255,.58)}
.layout.collapsed .menu .collapse.fp-flyout{scrollbar-width:thin;scrollbar-color:rgba(24,35,58,.35) rgba(24,35,58,.10)}
.layout.collapsed .menu .collapse.fp-flyout::-webkit-scrollbar{width:10px}
.layout.collapsed .menu .collapse.fp-flyout::-webkit-scrollbar-track{background:rgba(24,35,58,.08);border-radius:999px;margin:10px 0}
.layout.collapsed .menu .collapse.fp-flyout::-webkit-scrollbar-thumb{background:rgba(24,35,58,.26);border-radius:999px;border:2px solid rgba(255,255,255,.75)}
.layout.collapsed .menu .collapse.fp-flyout::-webkit-scrollbar-thumb:hover{background:rgba(24,35,58,.36)}
.menu .item{display:flex;align-items:center;gap:.75rem;padding:.65rem .9rem;border-radius:16px;color:var(--sidebar-text);text-decoration:none}
.menu .item span{font-weight:700}
.menu .item i{font-size:1.05rem}
.menu .item:hover{background:var(--sidebar-item-hover-bg);color:var(--sidebar-text)}
.menu .item.active{background:var(--sidebar-item-active-bg);color:var(--sidebar-item-active-text);box-shadow:0 10px 26px rgba(12,24,60,.18)}
.menu .item.active i{color:var(--sidebar-item-active-text)}
.menu-group{margin-top:.35rem}
.dataTables_wrapper #tablaClientes th:nth-child(1),.dataTables_wrapper #tablaClientes td:nth-child(1){text-align:left!important}
.dataTables_wrapper #tablaClientes td.dt-body-right,.dataTables_wrapper #tablaClientes th.dt-head-right,.dataTables_wrapper #tablaClientes td.dt-type-numeric,.dataTables_wrapper #tablaClientes th.dt-type-numeric{text-align:left!important}
.dataTables_wrapper #tablaClientes th.dt-type-numeric .dt-column-header{justify-content:flex-start!important}
.fp-dt-buttons .fp-dt-btn{border-radius:14px!important;padding:.42rem .72rem!important;font-weight:800!important;letter-spacing:.02em;display:inline-flex!important;align-items:center;gap:.45rem;border-width:1px!important;box-shadow:0 10px 22px rgba(22,34,58,.12)}
.fp-dt-buttons .fp-dt-btn:focus{outline:0}
.fp-dt-buttons .fp-dt-btn:focus-visible{box-shadow:0 10px 22px rgba(22,34,58,.12),0 0 0 .25rem rgba(91,108,255,.22)}
.fp-dt-buttons .buttons-excel{background:linear-gradient(180deg,#27a364 0%, #198754 100%)!important;border-color:rgba(25,135,84,.85)!important;color:#fff!important}
.fp-dt-buttons .buttons-pdf{background:linear-gradient(180deg,#f05a67 0%, #dc3545 100%)!important;border-color:rgba(220,53,69,.85)!important;color:#fff!important}
.fp-dt-buttons .buttons-print{background:linear-gradient(180deg,#6a7dff 0%, #0d6efd 100%)!important;border-color:rgba(13,110,253,.85)!important;color:#fff!important}
.fp-dt-buttons .buttons-excel,.fp-dt-buttons .buttons-pdf,.fp-dt-buttons .buttons-print{transition:transform .12s ease,filter .12s ease,box-shadow .12s ease}
.fp-dt-buttons .buttons-excel:hover,.fp-dt-buttons .buttons-pdf:hover,.fp-dt-buttons .buttons-print:hover{transform:translateY(-1px);filter:brightness(1.06);box-shadow:0 14px 28px rgba(22,34,58,.16)}
.fp-dt-buttons .buttons-excel:active,.fp-dt-buttons .buttons-pdf:active,.fp-dt-buttons .buttons-print:active{transform:translateY(0);filter:brightness(.98);box-shadow:0 10px 22px rgba(22,34,58,.10)}
.menu-parent{width:100%;display:flex;align-items:center;justify-content:space-between;gap:.75rem;padding:.65rem .9rem;border-radius:16px;border:0;background:var(--sidebar-parent-bg);color:var(--sidebar-text);font-weight:800}
.menu-parent:hover{background:var(--sidebar-parent-hover-bg);color:var(--sidebar-text)}
.menu-parent.active{background:var(--sidebar-parent-active-bg);box-shadow:inset 0 0 0 1px var(--sidebar-parent-hover-bg)}
.menu-parent > div{min-width:0}
.menu-parent span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.menu-parent .chevron{transition:transform .15s ease;opacity:.9}
.menu-parent[aria-expanded="true"] .chevron{transform:rotate(180deg)}
.menu .collapse{margin:.25rem 0 .15rem .25rem;padding-left:.25rem;border-left:1px solid var(--sidebar-sep)}
.menu .item.child{padding-left:2.1rem;opacity:.96;border-radius:14px}
.menu .item.child:hover{background:var(--sidebar-item-hover-bg)}
.menu .item.child.active{background:var(--sidebar-item-active-bg);color:var(--sidebar-item-active-text)}
.menu .item.child.active i{color:var(--sidebar-item-active-text)}
.menu .item.child i{opacity:.9}

.layout.collapsed .menu-parent{justify-content:center;padding:.65rem .7rem}
.layout.collapsed .menu-parent span{display:none}
.layout.collapsed .menu-parent .chevron{display:none}
.layout.collapsed .menu-parent > div{width:auto}
.layout.collapsed .menu .collapse{display:none !important}
.layout.collapsed .menu .item.child{display:none}
.layout.collapsed .sidebar .title{display:none}
.layout.collapsed .menu .menu-section{display:none}
.layout.collapsed .menu .item span{display:none}
.layout.collapsed .menu .item{justify-content:center}
.layout.collapsed .menu .collapse.fp-flyout{display:block !important;position:fixed;z-index:1060;margin:0;padding:.5rem;background:var(--ui-surface);border:1px solid var(--ui-border);border-radius:18px;box-shadow:0 22px 55px rgba(22,34,58,.18);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);max-height:calc(100vh - 24px);overflow:auto}
.layout.collapsed .menu .collapse.fp-flyout{border-left:0}
.layout.collapsed .menu .collapse.fp-flyout .item.child{display:flex;padding:.6rem .75rem;border-radius:14px;color:var(--ui-text);opacity:1}
.layout.collapsed .menu .collapse.fp-flyout .item.child i{color:var(--ui-muted);opacity:1}
.layout.collapsed .menu .collapse.fp-flyout .item.child span{display:inline}
.layout.collapsed .menu .collapse.fp-flyout .item.child:hover{background:rgba(91,108,255,.10)}
.layout.collapsed .menu .collapse.fp-flyout .item.child.active{background:rgba(91,108,255,.14);color:var(--ui-text)}
.layout.collapsed .menu .collapse.fp-flyout .item.child.active i{color:var(--ui-primary)}

.topbar{grid-column:2;margin:1rem 1.25rem 0;padding:.85rem 1rem;display:flex;align-items:center;justify-content:space-between}
.topbar{position:sticky;top:.75rem;z-index:1020;background:var(--ui-surface);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border:1px solid var(--ui-border);border-radius:24px;box-shadow:0 18px 45px rgba(22,34,58,.08)}
.topbar .title{display:flex;align-items:center;gap:.75rem}
.topbar .actions{display:flex;align-items:center;gap:.6rem}
.toggle-btn{width:44px;height:44px;border-radius:16px;border:1px solid var(--ui-border);background:var(--ui-surface);display:none;align-items:center;justify-content:center;color:var(--ui-text);box-shadow:0 10px 25px rgba(22,34,58,.06)}
.toggle-btn:hover{background:rgba(79,110,247,.08);border-color:rgba(79,110,247,.25)}
.app-search{width:min(420px, 52vw);position:relative}
.app-search input{border-radius:999px;padding-left:2.5rem;background:var(--ui-surface);border:1px solid var(--ui-border);box-shadow:0 10px 25px rgba(22,34,58,.06)}
.app-search .icon{position:absolute;left:.85rem;top:50%;transform:translateY(-50%);color:var(--ui-muted)}
.icon-btn{width:42px;height:42px;border-radius:14px;border:1px solid var(--ui-border);background:var(--ui-surface);display:flex;align-items:center;justify-content:center;color:var(--ui-text);box-shadow:0 10px 25px rgba(22,34,58,.06)}
.user-pill{display:flex;align-items:center;gap:.6rem;background:var(--ui-surface);border:1px solid var(--ui-border);border-radius:999px;padding:.35rem .6rem .35rem .4rem;box-shadow:0 10px 25px rgba(22,34,58,.06)}
.avatar{width:34px;height:34px;border-radius:999px;background:linear-gradient(180deg,#dfe6ff 0%, #c8d3ff 100%);display:flex;align-items:center;justify-content:center;color:var(--ui-primary);font-weight:800}

.content{grid-column:2;padding:1.25rem 1.25rem 1.5rem}
.content{min-width:0}

.layout.pos-fullscreen{grid-template-columns:1fr}
.layout.pos-fullscreen .sidebar{display:none !important}
.layout.pos-fullscreen .topbar{display:none !important}
.layout.pos-fullscreen .content{grid-column:1;padding:.75rem .75rem 1rem}

.stat-card,.card-panel{background:var(--ui-surface);border:1px solid var(--ui-border);border-radius:var(--ui-radius);box-shadow:var(--ui-shadow)}
.stat-card{padding:1.1rem}
.stat-card .kpi{font-size:1.75rem;font-weight:800;letter-spacing:-.02em}
.stat-card .kpi .unit{font-size:1rem;color:var(--ui-muted);font-weight:700}
.stat-card .icon{width:44px;height:44px;border-radius:16px;display:flex;align-items:center;justify-content:center;background:linear-gradient(180deg,#e9eeff 0%, #d9e2ff 100%);color:var(--ui-primary)}
.stat-card .btn{border-radius:14px}
.btn{border-radius:14px}
.btn.btn-sm{border-radius:12px}
.btn.btn-lg{border-radius:16px}

.btn-primary{background:var(--ui-primary);border-color:var(--ui-primary)}
.btn-primary:hover{background:var(--ui-primary-600);border-color:var(--ui-primary-600)}
.btn-outline-light{border-color:var(--ui-border);color:var(--ui-text);background:transparent}
.btn-outline-light:hover{background:rgba(79,110,247,.08);border-color:rgba(79,110,247,.25);color:var(--ui-text)}
.btn-icon{width:36px;height:36px;padding:0;display:inline-flex;align-items:center;justify-content:center;border-radius:12px;border:1px solid var(--ui-border);background:var(--ui-surface);color:var(--ui-text);box-shadow:0 10px 25px rgba(22,34,58,.06)}
.btn-icon.btn-sm{width:34px;height:34px;border-radius:12px}
.btn-icon i{font-size:1.05rem}
.btn-icon-primary{border-color:rgba(91,108,255,.28);background:rgba(91,108,255,.12);color:var(--ui-primary)}
.btn-icon-primary:hover{background:rgba(91,108,255,.18);border-color:rgba(91,108,255,.38);color:var(--ui-primary)}
.btn-icon-danger{border-color:rgba(255,77,109,.30);background:rgba(255,77,109,.12);color:#b42318}
.btn-icon-danger:hover{background:rgba(255,77,109,.18);border-color:rgba(255,77,109,.40);color:#b42318}
.btn-icon-warning{border-color:rgba(255,153,80,.32);background:rgba(255,153,80,.14);color:#b54708}
.btn-icon-warning:hover{background:rgba(255,153,80,.18);border-color:rgba(255,153,80,.44);color:#b54708}
.btn-icon-success{border-color:rgba(34,192,143,.30);background:rgba(34,192,143,.14);color:#067647}
.btnAiItem{border-color:rgba(91,108,255,.25);background:var(--ui-surface)}
.btnAiItem:hover{background:rgba(91,108,255,.10);border-color:rgba(91,108,255,.35)}
.ai-star{
  background:linear-gradient(90deg,#ff3d77 0%, #ffb703 25%, #3a86ff 55%, #8338ec 85%, #ff3d77 100%);
  background-size:220% 100%;
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent !important;
  display:inline-block;
  animation:aiStarHue 2.4s linear infinite, aiStarPulse 1.2s ease-in-out infinite;
}
@keyframes aiStarHue{0%{background-position:0% 50%}100%{background-position:100% 50%}}
@keyframes aiStarPulse{0%,100%{transform:scale(1)}50%{transform:scale(1.12)}}

.btn-icon-success:hover{background:rgba(34,192,143,.18);border-color:rgba(34,192,143,.42);color:#067647}


.modal-content{background:var(--ui-surface);border:1px solid var(--ui-border);color:var(--ui-text);border-radius:var(--ui-radius)}
.form-control,.form-select{background:var(--ui-surface);border:1px solid var(--ui-border);color:var(--ui-text);border-radius:14px}
.form-control:focus,.form-select:focus{border-color:rgba(79,110,247,.55);box-shadow:0 0 0 .25rem rgba(79,110,247,.15)}
.table{color:var(--ui-text)}
.table thead th{color:var(--ui-muted);font-weight:700}
.table{border-color:var(--ui-border)}
.table> :not(caption)>*>*{padding:.75rem .75rem}
.table thead th{background:var(--ui-surface-2);border-bottom:1px solid var(--ui-border)}
.table tbody tr:hover{background:rgba(91,108,255,.06)}
.table-responsive{border-radius:18px}
.table-responsive>.table{margin-bottom:0}
.badge{border:1px solid var(--ui-border)}
.list-group-item{background:transparent;border-color:var(--ui-border)}


.fp-dtbar .dataTables_filter{margin:0}
.fp-dtbar .dataTables_filter label{margin:0;display:flex;align-items:center;gap:.5rem;font-weight:700;color:var(--ui-muted)}
.fp-dtbar .dataTables_filter input{margin-left:0;border-radius:999px;padding:.55rem .9rem;border:1px solid var(--ui-border);background:var(--ui-surface);box-shadow:0 10px 25px rgba(22,34,58,.06)}
.fp-dtbar .dt-buttons{display:flex;gap:.5rem;flex-wrap:wrap}
.fp-dtbar .dt-buttons .btn{box-shadow:0 10px 25px rgba(22,34,58,.06);border-color:rgba(91,108,255,.25)}
.fp-dtbar .dt-buttons .btn.btn-outline-light{color:var(--ui-primary);background:var(--ui-surface)}
.fp-dtbar .dt-buttons .btn.btn-outline-light:hover{background:rgba(91,108,255,.10);border-color:rgba(91,108,255,.35);color:var(--ui-primary)}
.fp-dtfoot .dataTables_info{color:var(--ui-muted);font-weight:700}
.fp-dtfoot .pagination{margin:0}
.fp-dtfoot .page-link{border-radius:12px;margin:0 .15rem;border:1px solid var(--ui-border);color:var(--ui-text);background:var(--ui-surface)}
.fp-dtfoot .page-item.active .page-link{background:var(--ui-primary);border-color:var(--ui-primary);color:#fff}

.pos-client-results{max-height:260px;overflow:auto;border:1px solid var(--ui-border);border-radius:18px;background:var(--ui-surface);box-shadow:0 18px 45px rgba(22,34,58,.10)}
.pos-client-results .list-group-item{border:0;border-bottom:1px solid var(--ui-border);padding:.65rem .75rem}
.pos-client-results .list-group-item:last-child{border-bottom:0}
.pos-client-results .list-group-item:hover{background:rgba(91,108,255,.08)}

.login-hero{background:var(--login-hero-bg)}
.login-hero .carousel-inner{border-radius:0}
.login-hero{position:relative}
.login-news-overlay{position:absolute;inset:0;display:flex;align-items:stretch;justify-content:center;padding:2rem}
.login-news-wrap{width:100%;max-width:980px;display:flex;align-items:center}
.login-page{background:var(--ui-bg)}
.login-left{background:var(--login-left-bg)}
.login-left-inner{max-width:540px}
.login-news-card{width:100%;max-height:calc(100vh - 4rem);overflow:hidden;background:var(--ui-surface);border:1px solid var(--ui-border);border-radius:26px;box-shadow:0 28px 70px rgba(10,22,48,.35);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);display:flex;flex-direction:column}
.login-news-card{padding:1.25rem 1.25rem 1rem}
.login-news-title{font-weight:800;font-size:1.1rem;color:var(--ui-text)}
.login-news-subtitle{color:var(--ui-muted);font-size:.9rem;margin-top:.15rem}
.nav-pills-modern .nav-link{border-radius:14px;background:rgba(79,110,247,.08);color:var(--ui-text);font-weight:700}
.nav-pills-modern .nav-link.active{background:var(--ui-primary)}
.login-news-card .tab-content{flex:1;min-height:0;display:flex}
.login-news-card .tab-pane{flex:1;min-height:0}
.login-news-list{max-height:none;height:100%;overflow-y:auto;overflow-x:hidden;padding-right:.25rem;padding-bottom:1.5rem;scrollbar-gutter:stable}
.login-news-list-mobile{max-height:340px}
.login-news-list .list-group-item{background:transparent;border:0;border-bottom:1px solid var(--ui-border);padding:.85rem 0}
.login-news-list .list-group-item:last-child{border-bottom:0}
.login-news-list a.list-group-item{transition:transform .12s ease, background-color .12s ease}
.login-news-list a.list-group-item:hover{background:rgba(79,110,247,.06);transform:translateY(-1px)}
.pos-live-results{margin-top:.75rem}
.pos-live-results .list-group{background:var(--ui-surface);border:1px solid var(--ui-border);border-radius:16px;overflow:hidden;box-shadow:0 18px 45px rgba(22,34,58,.08)}
.pos-live-results .list-group-item{background:var(--ui-surface);border:0;border-bottom:1px solid var(--ui-border)}
.pos-live-results .list-group-item:last-child{border-bottom:0}
.pos-live-results .list-group-item:last-child{border-bottom:0}
.pos-live-results .hint{font-size:.85rem;color:var(--ui-muted)}

@media (min-width: 992px){
  .pos-right-sticky{position:sticky;top:92px}
}

.pos-qty-group{max-width:140px;margin-left:auto}
.pos-qty-group .btn{padding:.25rem .5rem}
.pos-qty-group .form-control{min-width:56px}
.pos-cart-compact .pos-qty-group{max-width:120px}
.pos-summary-sticky{position:sticky;bottom:12px;z-index:20}

.pos-bottom-bar{position:fixed;left:0;right:0;bottom:0;z-index:1030;padding:.75rem .75rem calc(.75rem + env(safe-area-inset-bottom));background:var(--ui-surface);border-top:1px solid var(--ui-border);box-shadow:0 -18px 45px rgba(22,34,58,.08);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);display:flex;align-items:center;justify-content:space-between;gap:.75rem}
.pos-bottom-left{min-width:0}
.pos-has-bottom-bar .content{padding-bottom:calc(92px + env(safe-area-inset-bottom))}
.layout.pos-fullscreen .pos-bottom-bar{display:none !important}

body.pos-cobro-open{overflow:hidden}
.pos-cobro-screen{position:fixed;top:var(--pos-cobro-top-offset, 0px);right:0;bottom:0;left:260px;z-index:1015;background:var(--ui-bg);padding:1rem;overflow:auto;overflow-x:hidden;transform:translateX(100%);opacity:0;pointer-events:none;transition:transform .22s ease, opacity .18s ease;will-change:transform,opacity;border-left:1px solid rgba(24,35,58,.06);box-shadow:-10px 0 28px rgba(22,34,58,.08)}
.layout.collapsed .pos-cobro-screen{left:84px}
body.pos-cobro-open .pos-cobro-screen{transform:translateX(0);opacity:1;pointer-events:auto}
.pos-cobro-top{position:sticky;top:0;z-index:2;background:var(--ui-surface);padding:.75rem 1rem;border:1px solid var(--ui-border);border-radius:var(--ui-radius);box-shadow:var(--ui-shadow)}
.pos-cobro-body{margin-top:1rem;display:grid;gap:1rem}
.pos-cobro-left,.pos-cobro-right{min-width:0}
@media (min-width: 992px){
  .pos-cobro-screen{padding:1.25rem 1.25rem 1.5rem}
  .pos-cobro-body{grid-template-columns:1.15fr .85fr;align-items:start}
  .pos-cobro-screen .pos-pay-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media (max-width: 991.98px){
  .pos-cobro-screen{left:0;padding:.75rem}
  .pos-cobro-screen .pos-pay-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .pos-cobro-screen .pos-pay-btn{padding:1rem .9rem;border-radius:18px}
}

.pos-cart-scroll{scrollbar-gutter:stable}
@media (min-width: 992px){
  .pos-cart-scroll{max-height:calc(100vh - 360px);overflow:auto}
  .pos-cart-scroll thead th{position:sticky;top:0;z-index:6;background:var(--ui-surface-2)}
  .pos-cart-scroll thead th{box-shadow:0 1px 0 rgba(24,35,58,.08)}
}

.pos-pay-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.5rem}
@media (min-width: 768px){
  .pos-pay-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
}
.pos-pay-btn{padding:.85rem .75rem;border-radius:16px;font-weight:800}
.pos-pay-btn .pos-pay-title{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

@media (max-width: 991.98px){
  .layout{grid-template-columns:100%}
  .sidebar{top:0;left:0;bottom:0;width:280px;max-width:92vw;transform:translateX(-105%);transition:transform .2s ease;z-index:1040;border-radius:0 26px 26px 0}
  .layout.mobile-open .sidebar{transform:translateX(0)}
  .sidebar-backdrop{position:fixed;inset:0;background:rgba(8,14,28,.35);backdrop-filter:blur(2px);-webkit-backdrop-filter:blur(2px);z-index:1030;display:none}
  .layout.mobile-open .sidebar-backdrop{display:block}
  .topbar{grid-column:1}
  .topbar{margin:.75rem .75rem 0;border-radius:22px}
  .content{grid-column:1;padding:1rem .75rem 1.25rem}
  .app-search{width:100%}
  .menu-parent{justify-content:space-between}
  .toggle-btn{display:flex !important}
}

.sidebar-backdrop{display:none}

@media (min-width: 992px){
  .toggle-btn{display:none !important}
}

.module-card{display:block;padding:1rem 1rem 1.05rem;background:var(--ui-surface);border:1px solid var(--ui-border);border-radius:22px;box-shadow:0 18px 45px rgba(22,34,58,.10);text-decoration:none;color:inherit;transition:transform .12s ease, box-shadow .12s ease}
.module-card:hover{transform:translateY(-1px);box-shadow:0 22px 52px rgba(22,34,58,.12)}
.module-top{display:flex;align-items:center;gap:.75rem}
.module-icon{width:42px;height:42px;border-radius:16px;display:flex;align-items:center;justify-content:center;color:#fff;font-size:1.15rem;flex:0 0 auto}
.module-title{font-weight:800;color:var(--ui-text)}
.module-value{font-size:1.75rem;font-weight:900;letter-spacing:-.02em;margin-top:.7rem}
.module-sub{color:var(--ui-muted);font-size:.9rem;margin-top:.05rem}

.gauge-wrap{display:flex;flex-direction:column;align-items:center}
.gauge{--p:0;width:150px;height:150px;border-radius:999px;background:conic-gradient(var(--ui-primary) calc(var(--p) * 1%), rgba(91,108,255,.14) 0);position:relative;display:grid;place-items:center}
.gauge::after{content:"";position:absolute;inset:14px;border-radius:999px;background:var(--ui-surface);border:1px solid var(--ui-border);box-shadow:inset 0 0 0 1px rgba(255,255,255,.65)}
.gauge-center{position:relative;z-index:1;text-align:center}
.gauge-value{font-weight:900;font-size:1.4rem;letter-spacing:-.02em}
.gauge-sub{font-size:.9rem;color:var(--ui-muted);font-weight:800}
.tone-success-soft{background:conic-gradient(#22c08f calc(var(--p) * 1%), rgba(34,192,143,.16) 0)}
.tone-warning-soft{background:conic-gradient(#ff9950 calc(var(--p) * 1%), rgba(255,153,80,.18) 0)}

.recent-card{display:flex;align-items:center;gap:.75rem;padding:.9rem 1rem;border-radius:22px;background:var(--ui-surface);border:1px solid var(--ui-border);box-shadow:0 16px 38px rgba(22,34,58,.08)}
.recent-icon{width:44px;height:44px;border-radius:18px;display:flex;align-items:center;justify-content:center;color:#fff;font-size:1.1rem;flex:0 0 auto}
.recent-meta{min-width:0}
.recent-card .form-check-input{width:2.4rem;height:1.2rem}
.recent-card .form-check-input:disabled{opacity:1}

.quick-card{display:flex;align-items:center;gap:.75rem;padding:.95rem 1rem;background:var(--ui-surface);border:1px solid var(--ui-border);border-radius:22px;box-shadow:0 16px 38px rgba(22,34,58,.08)}
.quick-icon{width:44px;height:44px;border-radius:18px;display:flex;align-items:center;justify-content:center;color:#fff;font-size:1.1rem;flex:0 0 auto}
.quick-meta{min-width:0}
.quick-value{margin-left:auto;font-weight:900;color:var(--ui-text)}

.dash-tile{display:flex;align-items:center;gap:.9rem;padding:1rem 1rem;background:var(--ui-surface);border:1px solid var(--ui-border);border-radius:22px;box-shadow:0 18px 45px rgba(22,34,58,.10)}
.dash-icon{width:46px;height:46px;border-radius:18px;display:flex;align-items:center;justify-content:center;color:#fff;font-size:1.15rem;flex:0 0 auto}
.dash-meta{min-width:0}
.dash-label{font-size:.78rem;text-transform:uppercase;letter-spacing:.08em;color:var(--ui-muted);font-weight:800}
.dash-value{font-size:1.25rem;font-weight:900;letter-spacing:-.02em;color:var(--ui-text);line-height:1.1;margin-top:.1rem}
.dash-sub{font-size:.85rem;color:var(--ui-muted);margin-top:.15rem}

.tone-primary{background:linear-gradient(180deg,var(--ui-primary) 0%, var(--ui-primary-600) 100%)}
.tone-success{background:linear-gradient(180deg,#29d3a3 0%, #22c08f 100%)}
.tone-warning{background:linear-gradient(180deg,#ffb65c 0%, #ff9950 100%)}
.tone-danger{background:linear-gradient(180deg,#ff6b8c 0%, #ff4d6d 100%)}
.tone-muted{background:linear-gradient(180deg,#c9d3ff 0%, #b9c5ff 100%)}

.chip{width:40px;height:40px;border-radius:16px;display:flex;align-items:center;justify-content:center;color:#fff;flex:0 0 auto}

.soft-card{background:var(--ui-surface-2);border:1px solid var(--ui-border);border-radius:22px;padding:1rem;box-shadow:0 14px 34px rgba(22,34,58,.06)}
.soft-card .btn{border-radius:14px}

.device-card{display:flex;align-items:center;gap:.85rem;padding:1rem;background:var(--ui-surface);border:1px solid var(--ui-border);border-radius:22px;box-shadow:0 18px 45px rgba(22,34,58,.10);text-decoration:none;color:inherit;transition:transform .12s ease, box-shadow .12s ease}
.device-card:hover{transform:translateY(-1px);box-shadow:0 22px 52px rgba(22,34,58,.12)}
.device-icon{width:46px;height:46px;border-radius:18px;display:flex;align-items:center;justify-content:center;color:#fff;font-size:1.15rem;flex:0 0 auto}
.device-meta{min-width:0}
.device-title{font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.device-sub{font-size:.85rem;color:var(--ui-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.device-right{margin-left:auto;flex:0 0 auto}

.member-row{display:flex;align-items:center;gap:.75rem;padding:.7rem .6rem;border-radius:18px}
.member-row:hover{background:rgba(91,108,255,.08)}
.history-row{display:flex;align-items:center;gap:.75rem;padding:.7rem .6rem;border-radius:18px;text-decoration:none;color:inherit}
.history-row:hover{background:rgba(91,108,255,.08)}
.history-icon{width:40px;height:40px;border-radius:16px;display:flex;align-items:center;justify-content:center;background:rgba(91,108,255,.12);color:var(--ui-primary);flex:0 0 auto}
