: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;flex-wrap:nowrap}
.pos-qty-group .btn{padding:.25rem .5rem;flex:0 0 36px;width:36px}
.pos-qty-group .form-control{min-width:56px;max-width:64px;flex:0 0 64px}
.pos-cart-compact .pos-qty-group{max-width:136px}
.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}

.pos-main-row{align-items:start}
.pos-main-left,.pos-main-right,.pos-left-panel,.pos-right-stack{min-width:0}
.pos-cobro-card{display:flex;flex-direction:column;gap:0}
.pos-cobro-head{margin-bottom:.35rem}
.pos-cobro-actions{padding:1rem 1.05rem;background:var(--ui-surface-2)}
.pos-pagos-list{min-height:120px}
.pos-pay-card{border-radius:22px;box-shadow:0 12px 28px rgba(22,34,58,.06)}
.pos-pay-card .form-label{margin-bottom:.25rem}
.pos-pay-select-wrap{display:block}
.pos-pay-action-stack .btn{border-radius:14px}
.pos-pay-meta{background:var(--ui-surface-2);border:1px dashed rgba(91,108,255,.22);border-radius:16px;padding:.75rem}
.pos-pay-wallet-box{min-height:100%;display:flex;flex-direction:column;justify-content:flex-end}
.pos-pay-card-simple .pago-monto{font-size:1.15rem;font-weight:700}
.pos-pay-card .pago-trans[readonly],.pos-pay-card .pago-monto[readonly]{background:var(--ui-surface-2)}
.pos-right-cliente{transition:opacity .16s ease,transform .16s ease}
.wallet-manual-card{max-width:none}
.wallet-manual-card .form-control{min-height:52px}
.pos-summary-highlight{padding:1rem 1.05rem;transition:background-color .16s ease,border-color .16s ease,box-shadow .16s ease}
.pos-summary-highlight.is-empty{background:var(--ui-surface-2)}
.pos-summary-highlight.is-pending{background:rgba(255,77,109,.06);border-color:rgba(255,77,109,.20)}
.pos-summary-highlight.is-ready{background:rgba(34,192,143,.08);border-color:rgba(34,192,143,.24)}
.pos-summary-highlight .text-end{flex:0 0 auto;min-width:92px}
.pos-summary-highlight .text-end > div,
.pos-summary-highlight #posPendiente,
.pos-summary-highlight #posPagado,
.pos-summary-highlight #posVuelto{white-space:nowrap}
.pos-summary-highlight #posPendiente{transition:color .16s ease}
.pos-summary-highlight.is-ready #posPendiente{color:#067647 !important}
@media (min-width: 992px){
  .pos-main-left{flex:0 0 64%;width:64%}
  .pos-main-right{flex:0 0 36%;width:36%}
  .pos-right-stack{position:sticky;top:92px}
  .pos-right-stack{max-height:calc(100vh - 108px);overflow:auto;padding-right:.2rem}
  .pos-summary-sticky{position:static;bottom:auto}
  .pos-cobro-card{min-height:calc(100vh - 122px)}
  .pos-pagos-list{max-height:calc(100vh - 470px);overflow:auto;padding-right:.1rem}
}
@media (max-width: 991.98px){
  body.pos-left-cobro .pos-bottom-bar{display:none !important}
  body.pos-has-bottom-bar.pos-left-cobro .content{padding-bottom:1.25rem}
}

body:not(.pos-left-cobro) .pos-summary-highlight{display:none !important}
body.pos-left-cobro #btnOpenCobro{display:none !important}
body:not(.pos-left-cobro) .pos-right-cliente{display:none !important}

.pos-cart-scroll{scrollbar-gutter:stable}
@media (min-width: 992px){
  .pos-cart-scroll{max-height:calc(100vh - 335px);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)}
}

@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}

.fe-page{display:flex;flex-direction:column;gap:1.5rem}
.fe-workspace{display:flex;flex-direction:column;gap:1.35rem}
.fe-overview-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1rem}
.fe-main-shell{background:linear-gradient(180deg, rgba(255,255,255,.94) 0%, rgba(255,255,255,.78) 100%)}
.fe-top-tabs{border-bottom:1px solid rgba(91,108,255,.12);gap:.5rem}
.fe-top-tabs .nav-link{border:1px solid transparent;border-radius:14px 14px 0 0;padding:.8rem 1.1rem;font-weight:800;color:var(--ui-muted);background:transparent}
.fe-top-tabs .nav-link:hover{color:var(--ui-primary);border-color:rgba(91,108,255,.12)}
.fe-top-tabs .nav-link.active{color:var(--ui-text);background:var(--ui-surface);border-color:rgba(91,108,255,.12);border-bottom-color:var(--ui-surface);box-shadow:0 -1px 0 rgba(91,108,255,.04), 0 14px 28px rgba(22,34,58,.04)}
.fe-eyebrow{font-size:.74rem;text-transform:uppercase;letter-spacing:.12em;font-weight:800;color:var(--ui-primary);margin-bottom:.4rem}
.fe-hero-card{overflow:hidden;position:relative;background:
  radial-gradient(1200px 420px at 0% 0%, rgba(91,108,255,.16) 0%, rgba(91,108,255,0) 56%),
  linear-gradient(180deg, rgba(255,255,255,.86) 0%, rgba(255,255,255,.66) 100%)}
.fe-hero-main{display:flex;gap:1rem;align-items:flex-start;height:100%}
.fe-hero-icon-wrap{padding-top:.25rem}
.fe-hero-icon{width:58px;height:58px;border-radius:20px;box-shadow:0 16px 34px rgba(91,108,255,.22)}
.fe-hero-title{font-size:2rem;font-weight:900;letter-spacing:-.03em}
.fe-hero-text{font-size:1rem;line-height:1.7;color:var(--ui-muted);max-width:700px}
.fe-hero-tags,.fe-inline-status{display:flex;flex-wrap:wrap;gap:.55rem}
.fe-hero-side{height:100%;padding:1.1rem;border-radius:24px;background:rgba(255,255,255,.68);border:1px solid rgba(91,108,255,.14);box-shadow:inset 0 1px 0 rgba(255,255,255,.75)}
.fe-hero-side-header{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;margin-bottom:1rem}
.fe-side-kicker{font-size:.74rem;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:var(--ui-muted);margin-bottom:.15rem}
.fe-summary-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.95rem}
.fe-metric-card{padding:1rem 1rem 1.05rem;border-radius:20px;background:var(--ui-surface);border:1px solid rgba(91,108,255,.12);box-shadow:0 14px 30px rgba(22,34,58,.08)}
.fe-metric-label{font-size:.8rem;color:var(--ui-muted);font-weight:700}
.fe-metric-value{font-size:1.8rem;font-weight:900;letter-spacing:-.03em;color:var(--ui-text);margin-top:.35rem;line-height:1}
.fe-metric-inline{font-size:1rem;font-weight:800;color:var(--ui-text);margin-top:.45rem}

.fe-config-shell{background:
  linear-gradient(180deg, rgba(255,255,255,.88) 0%, rgba(255,255,255,.64) 100%);
  border-color:rgba(91,108,255,.12)}
.fe-config-sidebar{height:100%;padding:1.35rem;background:
  linear-gradient(180deg, rgba(91,108,255,.08) 0%, rgba(91,108,255,.03) 100%);
  border-right:1px solid rgba(91,108,255,.12);display:flex;flex-direction:column;gap:1.2rem}
.fe-sidebar-title{font-size:1.3rem;font-weight:900;letter-spacing:-.02em;margin:0}
.fe-sidebar-text{font-size:.94rem;line-height:1.65;color:var(--ui-muted);margin:0}
.fe-tabs-nav{gap:.65rem}
.fe-tabs-nav .nav-item{width:100%}
.fe-tabs-nav .nav-link{width:100%;min-width:0;text-align:left;padding:.95rem 1rem;border-radius:18px;background:rgba(255,255,255,.72);border:1px solid rgba(91,108,255,.10);box-shadow:0 10px 24px rgba(22,34,58,.05);display:flex;flex-direction:column;gap:.15rem}
.fe-tabs-nav .nav-link.active{background:linear-gradient(180deg,var(--ui-primary) 0%, var(--ui-primary-600) 100%);border-color:transparent;color:#fff;box-shadow:0 14px 30px rgba(91,108,255,.26)}
.fe-tab-label{font-weight:800}
.fe-tab-hint{font-size:.8rem;opacity:.78}
.fe-tabs-nav .nav-link.active .fe-tab-hint{color:rgba(255,255,255,.82)}
.fe-sidebar-note{margin-top:auto;padding:1rem;border-radius:20px;background:rgba(255,255,255,.72);border:1px solid rgba(91,108,255,.10)}

.fe-config-main{padding:1.35rem}
.fe-pane-header{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;margin-bottom:1.15rem}
.fe-pane-title{font-size:1.25rem;font-weight:900;letter-spacing:-.02em}
.fe-pane-subtitle{font-size:.95rem;color:var(--ui-muted);margin-top:.2rem;max-width:760px}
.fe-pane-chip{padding:.45rem .75rem;border-radius:999px;background:rgba(91,108,255,.10);border:1px solid rgba(91,108,255,.18);font-size:.8rem;font-weight:800;color:var(--ui-primary)}
.fe-panel-card{padding:1.15rem;border-radius:24px;background:linear-gradient(180deg,var(--ui-surface) 0%, rgba(255,255,255,.86) 100%);border:1px solid rgba(91,108,255,.10);box-shadow:0 18px 42px rgba(22,34,58,.08)}
.fe-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;margin-bottom:1rem}
.fe-card-title{font-size:1rem;font-weight:800;color:var(--ui-text)}
.fe-card-subtitle{font-size:.9rem;color:var(--ui-muted);margin-top:.2rem;line-height:1.6}
.fe-inline-panel{padding:1rem;border-radius:20px;background:linear-gradient(180deg,rgba(91,108,255,.08) 0%, rgba(91,108,255,.03) 100%);border:1px solid rgba(91,108,255,.14)}
.fe-inline-panel-title{font-weight:800;color:var(--ui-text);margin-bottom:.25rem}
.fe-status-list{display:grid;gap:.85rem}
.fe-status-item{display:flex;justify-content:space-between;align-items:flex-start;gap:1rem;padding:1rem;border-radius:18px;background:var(--ui-surface-2);border:1px solid rgba(91,108,255,.10)}
.fe-status-title{font-weight:800;color:var(--ui-text);margin-bottom:.2rem}
.fe-status-text{font-size:.88rem;color:var(--ui-muted);line-height:1.6;max-width:440px}
.fe-switch-lg .form-check-input{width:3.15rem;height:1.65rem}
.fe-cert-card{padding:1rem;border-radius:22px;background:linear-gradient(180deg,rgba(255,255,255,.98) 0%, rgba(244,247,255,.94) 100%);border:1px dashed rgba(91,108,255,.22)}
.fe-cert-top{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem}
.fe-cert-card .form-control{min-height:48px}
.fe-mode-block{padding:1rem;border-radius:18px;border:1px solid rgba(91,108,255,.10);margin-bottom:.85rem}
.fe-mode-block-demo{background:rgba(91,108,255,.06)}
.fe-mode-block-prod{background:rgba(255,77,109,.05)}
.fe-mode-title{font-weight:800;margin-bottom:.25rem}
.fe-mode-footer{margin-top:auto;padding-top:1rem;border-top:1px solid rgba(91,108,255,.10)}
.fe-action-bar{display:flex;justify-content:flex-end;align-items:center;gap:.75rem;margin-top:1.25rem;padding-top:1.1rem;border-top:1px solid rgba(91,108,255,.10)}
.fe-btn-equal{min-height:46px}

.fe-series-shell{background:
  linear-gradient(180deg, rgba(255,255,255,.92) 0%, rgba(255,255,255,.72) 100%)}
.fe-section-topbar{display:flex;justify-content:space-between;align-items:flex-start;gap:1rem;margin-bottom:1.25rem}
.fe-section-title{font-size:1.35rem;font-weight:900;letter-spacing:-.02em}
.fe-section-subtitle{font-size:.95rem;color:var(--ui-muted);margin-top:.2rem;max-width:720px}
.fe-switch-row{display:flex;align-items:center;gap:1.5rem;flex-wrap:wrap;padding:.2rem 0}

@media (max-width: 1399.98px){
  .fe-hero-title{font-size:1.8rem}
}
@media (max-width: 1199.98px){
  .fe-overview-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .fe-config-sidebar{border-right:0;border-bottom:1px solid rgba(91,108,255,.12)}
  .fe-tabs-nav{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}
  .fe-tabs-nav .nav-item{width:auto}
}
@media (max-width: 991.98px){
  .fe-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .fe-section-topbar,.fe-pane-header,.fe-card-head,.fe-status-item,.fe-cert-top{flex-direction:column}
  .fe-tabs-nav{grid-template-columns:1fr}
  .fe-action-bar{justify-content:stretch}
  .fe-action-bar .btn{width:100%}
}
@media (max-width: 767.98px){
  .fe-page{gap:1rem}
  .fe-overview-grid{grid-template-columns:1fr}
  .fe-hero-card,.fe-series-shell{padding:1.1rem !important}
  .fe-config-main,.fe-config-sidebar{padding:1rem}
  .fe-hero-main{flex-direction:column}
  .fe-hero-title{font-size:1.55rem}
  .fe-summary-grid{grid-template-columns:1fr}
}
