/* =========================================================
   OML POS · Sistema de diseño compartido
   Colores tomados del logo (cobre / café) + neutros cálidos
   ========================================================= */
:root {
    --oml-primary: #A4532A;
    --oml-primary-hover: #8C4522;
    --oml-primary-dark: #6E3519;
    --oml-primary-soft: #F7ECE4;
    --oml-ink: #1F1B17;
    --oml-text: #3A342E;
    --oml-muted: #78716A;
    --oml-bg: #F5F3F0;
    --oml-surface: #FFFFFF;
    --oml-surface-2: #FAF8F6;
    --oml-border: #E7E1DA;
    --oml-sidebar: #1C1916;
    --oml-sidebar-2: #2A2521;
    --oml-success: #157347;
    --oml-success-soft: #E5F4EC;
    --oml-danger: #B42318;
    --oml-danger-soft: #FCEBE9;
    --oml-warning: #B25E09;
    --oml-warning-soft: #FDF1E1;
    --oml-info: #1C64B5;
    --oml-info-soft: #E6F0FB;
    --oml-yape: #6C2A8C;
    --oml-yape-soft: #F2E9F7;
    --oml-radius: 12px;
    --oml-radius-sm: 8px;
    --oml-shadow: 0 1px 2px rgba(31, 27, 23, .06), 0 1px 3px rgba(31, 27, 23, .08);
    --oml-shadow-lg: 0 10px 30px rgba(31, 27, 23, .12);
    --oml-sidebar-w: 252px;

    --bs-body-font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --bs-body-color: var(--oml-text);
    --bs-border-color: var(--oml-border);
    --bs-link-color: var(--oml-primary);
    --bs-link-color-rgb: 164, 83, 42;
    --bs-link-hover-color: var(--oml-primary-dark);
    --bs-primary: #A4532A;
    --bs-primary-rgb: 164, 83, 42;
    --bs-border-radius: var(--oml-radius-sm);
    --bs-border-radius-lg: var(--oml-radius);
}

body {
    background: var(--oml-bg);
    color: var(--oml-text);
    font-feature-settings: "tnum" 1, "cv11" 1;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { color: var(--oml-ink); letter-spacing: -.01em; }
.text-muted { color: var(--oml-muted) !important; }
.text-primary { color: var(--oml-primary) !important; }
.bg-primary { background-color: var(--oml-primary) !important; }
.border-primary { border-color: var(--oml-primary) !important; }
.fw-semibold { font-weight: 600 !important; }
.num { font-variant-numeric: tabular-nums; }
.min-w-0 { min-width: 0; }
.small-caps { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; color: var(--oml-muted); }

/* ---------- Botones ---------- */
.btn { font-weight: 600; border-radius: var(--oml-radius-sm); display: inline-flex; align-items: center; justify-content: center; gap: .45rem; }
.btn-lg { border-radius: 10px; }
.btn-primary {
    --bs-btn-bg: var(--oml-primary); --bs-btn-border-color: var(--oml-primary);
    --bs-btn-hover-bg: var(--oml-primary-hover); --bs-btn-hover-border-color: var(--oml-primary-hover);
    --bs-btn-active-bg: var(--oml-primary-dark); --bs-btn-active-border-color: var(--oml-primary-dark);
    --bs-btn-disabled-bg: var(--oml-primary); --bs-btn-disabled-border-color: var(--oml-primary);
    --bs-btn-focus-shadow-rgb: 164, 83, 42;
}
.btn-outline-primary {
    --bs-btn-color: var(--oml-primary); --bs-btn-border-color: var(--oml-primary);
    --bs-btn-hover-bg: var(--oml-primary); --bs-btn-hover-border-color: var(--oml-primary);
    --bs-btn-active-bg: var(--oml-primary-dark); --bs-btn-active-border-color: var(--oml-primary-dark);
    --bs-btn-focus-shadow-rgb: 164, 83, 42;
}
.btn-success { --bs-btn-bg: var(--oml-success); --bs-btn-border-color: var(--oml-success); --bs-btn-hover-bg: #0f5d39; --bs-btn-hover-border-color: #0f5d39; --bs-btn-disabled-bg: var(--oml-success); --bs-btn-disabled-border-color: var(--oml-success); }
.btn-yape { --bs-btn-color: #fff; --bs-btn-bg: var(--oml-yape); --bs-btn-border-color: var(--oml-yape); --bs-btn-hover-color: #fff; --bs-btn-hover-bg: #57206F; --bs-btn-hover-border-color: #57206F; --bs-btn-active-bg: #4A1B5F; --bs-btn-active-color: #fff; }
.btn-light-soft { --bs-btn-bg: var(--oml-surface); --bs-btn-border-color: var(--oml-border); --bs-btn-color: var(--oml-text); --bs-btn-hover-bg: var(--oml-surface-2); --bs-btn-hover-border-color: #d6cec5; --bs-btn-hover-color: var(--oml-ink); }
.btn-icon { width: 2.25rem; height: 2.25rem; padding: 0; }
.btn-sm.btn-icon { width: 1.95rem; height: 1.95rem; }

/* ---------- Formularios ---------- */
.form-control, .form-select { border-color: var(--oml-border); border-radius: var(--oml-radius-sm); }
.form-control:focus, .form-select:focus, .form-check-input:focus {
    border-color: var(--oml-primary);
    box-shadow: 0 0 0 .2rem rgba(164, 83, 42, .18);
}
.form-check-input:checked { background-color: var(--oml-primary); border-color: var(--oml-primary); }
.form-label { font-weight: 600; font-size: .85rem; color: var(--oml-text); margin-bottom: .35rem; }
.input-group-text { background: var(--oml-surface-2); border-color: var(--oml-border); color: var(--oml-muted); font-weight: 600; }
.form-text { color: var(--oml-muted); }

/* ---------- Tarjetas ---------- */
.app-card { background: var(--oml-surface); border: 1px solid var(--oml-border); border-radius: var(--oml-radius); box-shadow: var(--oml-shadow); }
.app-card > .app-card-header { padding: .9rem 1.1rem; border-bottom: 1px solid var(--oml-border); display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.app-card-header h6, .app-card-header .title { margin: 0; font-weight: 700; font-size: .95rem; color: var(--oml-ink); display: flex; align-items: center; gap: .5rem; }
.app-card > .app-card-body { padding: 1.1rem; }

.kpi { background: var(--oml-surface); border: 1px solid var(--oml-border); border-radius: var(--oml-radius); box-shadow: var(--oml-shadow); padding: 1rem 1.1rem; height: 100%; display: flex; gap: .9rem; align-items: flex-start; }
.kpi-icon { flex: 0 0 auto; width: 2.6rem; height: 2.6rem; border-radius: 10px; display: grid; place-items: center; font-size: 1.2rem; }
.kpi-label { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; color: var(--oml-muted); }
.kpi-value { font-size: 1.55rem; font-weight: 700; color: var(--oml-ink); line-height: 1.2; font-variant-numeric: tabular-nums; }
.kpi-sub { font-size: .8rem; color: var(--oml-muted); }
.kpi.kpi-featured { background: linear-gradient(135deg, var(--oml-primary) 0%, var(--oml-primary-dark) 100%); border-color: transparent; }
.kpi.kpi-featured .kpi-label, .kpi.kpi-featured .kpi-sub { color: rgba(255,255,255,.78); }
.kpi.kpi-featured .kpi-value { color: #fff; }
.kpi.kpi-featured .kpi-icon { background: rgba(255,255,255,.16); color: #fff; }

/* Tonos suaves para íconos y badges */
.tone-primary { background: var(--oml-primary-soft); color: var(--oml-primary); }
.tone-success { background: var(--oml-success-soft); color: var(--oml-success); }
.tone-danger  { background: var(--oml-danger-soft);  color: var(--oml-danger); }
.tone-warning { background: var(--oml-warning-soft); color: var(--oml-warning); }
.tone-info    { background: var(--oml-info-soft);    color: var(--oml-info); }
.tone-yape    { background: var(--oml-yape-soft);    color: var(--oml-yape); }
.tone-dark    { background: #ECE9E6; color: var(--oml-ink); }
.tone-muted   { background: #F0EDEA; color: var(--oml-muted); }

.badge { font-weight: 600; letter-spacing: .01em; }
.badge-soft { display: inline-flex; align-items: center; gap: .3rem; padding: .32em .65em; border-radius: 999px; font-size: .74rem; font-weight: 600; line-height: 1.2; white-space: nowrap; }

/* ---------- Tablas ---------- */
.table-app { --bs-table-bg: transparent; --bs-table-hover-bg: #FBF8F5; margin-bottom: 0; font-size: .9rem; }
.table-app > thead th {
    background: var(--oml-surface-2); color: var(--oml-muted); font-size: .72rem; text-transform: uppercase;
    letter-spacing: .05em; font-weight: 600; border-bottom: 1px solid var(--oml-border); padding: .7rem .75rem; white-space: nowrap;
}
.table-app > tbody td { padding: .7rem .75rem; border-color: #F0EBE5; vertical-align: middle; }
.table-app > tbody tr:last-child td { border-bottom: 0; }
.table-app .sticky-top { z-index: 2; }
.table-scroll { overflow: auto; }
.row-danger > td { background: #FFF7F6 !important; }
.row-muted > td { opacity: .55; }
.empty-state { text-align: center; color: var(--oml-muted); padding: 2.5rem 1rem; }
.empty-state i { font-size: 2rem; display: block; margin-bottom: .5rem; opacity: .6; }

/* ---------- Encabezado de página ---------- */
.page-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.page-header h1 { font-size: 1.45rem; font-weight: 700; margin: 0; }
.page-header p { margin: .2rem 0 0; color: var(--oml-muted); font-size: .9rem; }
.page-actions { display: flex; gap: .5rem; flex-wrap: wrap; }

/* ---------- Modales ---------- */
.modal-content { border: 0; border-radius: 14px; box-shadow: var(--oml-shadow-lg); }
.modal-header { border-bottom: 1px solid var(--oml-border); padding: 1rem 1.25rem; }
.modal-title { font-weight: 700; font-size: 1.05rem; display: flex; align-items: center; gap: .5rem; }
.modal-footer { border-top: 1px solid var(--oml-border); background: var(--oml-surface-2); border-radius: 0 0 14px 14px; }
@media (max-width: 575.98px) { .modal-fullscreen-sm-down .modal-content, .modal-fullscreen-sm-down .modal-footer { border-radius: 0; } }

.nav-pills .nav-link.active { background: var(--oml-primary); }
.nav-pills .nav-link { color: var(--oml-text); font-weight: 600; }
.nav-tabs .nav-link { color: var(--oml-muted); font-weight: 600; }
.nav-tabs .nav-link.active { color: var(--oml-primary); }

.alert { border-radius: var(--oml-radius-sm); border-width: 1px; }
.toast { border-radius: 10px; box-shadow: var(--oml-shadow-lg); }

/* =========================================================
   PANEL ADMINISTRATIVO
   ========================================================= */
.admin-sidebar {
    color: #D6CFC7;
    width: var(--oml-sidebar-w);
    --bs-offcanvas-width: 280px;
}
/* Bootstrap deja transparente el offcanvas en pantallas grandes; forzamos el fondo oscuro */
.admin-sidebar.offcanvas-lg { background-color: var(--oml-sidebar) !important; }
@media (min-width: 992px) {
    .admin-sidebar { position: fixed; inset: 0 auto 0 0; display: flex; flex-direction: column; z-index: 1030; overflow-y: auto; }
    .admin-main { margin-left: var(--oml-sidebar-w); }
}
.admin-sidebar .offcanvas-body { display: flex; flex-direction: column; padding: 0; height: 100%; }
.sidebar-brand { padding: 1.1rem 1rem .9rem; display: flex; align-items: center; gap: .7rem; }
.sidebar-brand img { width: 46px; height: 46px; object-fit: contain; background: #fff; border-radius: 10px; padding: 3px; }
.sidebar-brand .name { color: #fff; font-weight: 700; line-height: 1.1; }
.sidebar-brand .sub { font-size: .72rem; color: #A39A90; }
.sidebar-section { padding: .9rem 1.1rem .35rem; font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: #8A8178; font-weight: 600; }
.sidebar-nav { padding: 0 .65rem; display: flex; flex-direction: column; gap: 2px; }
.sidebar-nav a {
    display: flex; align-items: center; gap: .7rem; padding: .58rem .75rem; border-radius: 8px;
    color: #CFC7BE; text-decoration: none; font-size: .9rem; font-weight: 500; transition: background .15s, color .15s;
}
.sidebar-nav a i { font-size: 1.05rem; width: 1.2rem; text-align: center; color: #A39A90; }
.sidebar-nav a:hover { background: var(--oml-sidebar-2); color: #fff; }
.sidebar-nav a:hover i { color: #fff; }
.sidebar-nav a.active { background: var(--oml-primary); color: #fff; }
.sidebar-nav a.active i { color: #fff; }
.sidebar-footer { margin-top: auto; padding: 1rem; border-top: 1px solid #2E2925; }
.sidebar-user { display: flex; align-items: center; gap: .6rem; margin-bottom: .8rem; }
.avatar { width: 2.1rem; height: 2.1rem; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .85rem; background: var(--oml-primary); color: #fff; flex: 0 0 auto; }
.sidebar-user .who { color: #fff; font-size: .85rem; font-weight: 600; line-height: 1.15; }
.sidebar-user .role { font-size: .72rem; color: #A39A90; }
.sidebar-credit { font-size: .68rem; color: #7D746B; text-align: center; margin-top: .8rem; }
.sidebar-credit a { color: #C99A79; text-decoration: none; font-weight: 600; }
.btn-sidebar { --bs-btn-color: #E8E1D9; --bs-btn-border-color: #3A332D; --bs-btn-hover-bg: #2E2925; --bs-btn-hover-color: #fff; --bs-btn-hover-border-color: #4A423B; --bs-btn-active-bg: #2E2925; --bs-btn-active-color: #fff; }

.admin-topbar {
    position: sticky; top: 0; z-index: 1020; background: rgba(245, 243, 240, .92); backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--oml-border); padding: .7rem 1.25rem; display: flex; align-items: center; gap: .75rem; flex-wrap: wrap;
}
.admin-topbar .crumb { font-weight: 700; color: var(--oml-ink); font-size: 1rem; }
.store-select { min-width: 230px; max-width: 320px; font-weight: 600; }
.admin-content { padding: 1.5rem 1.25rem 3rem; max-width: 1500px; }
@media (min-width: 1200px) { .admin-content { padding: 1.75rem 2rem 3rem; } }
@media (max-width: 575.98px) {
    .admin-topbar { padding: .6rem .9rem; }
    .admin-topbar .store-select { min-width: 0; max-width: none; flex: 1 1 100%; }
    .admin-content { padding: 1rem .75rem 2.5rem; }
    .page-header { margin-bottom: 1rem; }
    .page-header h1 { font-size: 1.25rem; }
    .page-actions { width: 100%; }
    .page-actions .btn { flex: 1 1 0; font-size: .88rem; padding-left: .5rem; padding-right: .5rem; white-space: nowrap; }
    .kpi { flex-direction: column; gap: .55rem; padding: .85rem; }
    .kpi-icon { width: 2.1rem; height: 2.1rem; font-size: 1rem; }
    .kpi-value { font-size: 1.2rem; white-space: nowrap; }
    .kpi-label { font-size: .68rem; }
    .table-app > thead th, .table-app > tbody td { padding: .6rem .5rem; }
    .table-app > thead th:first-child, .table-app > tbody td:first-child { padding-left: .85rem; }
    .table-app > thead th:last-child, .table-app > tbody td:last-child { padding-right: .85rem; }
    .app-card > .app-card-header, .app-card > .app-card-body { padding: .85rem; }
    .toolbar .form-select { flex: 1 1 100%; width: 100% !important; }
}

/* Filtros de tabla */
.toolbar { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.toolbar .search { position: relative; flex: 1 1 260px; }
.toolbar .search i { position: absolute; left: .8rem; top: 50%; transform: translateY(-50%); color: var(--oml-muted); }
.toolbar .search input { padding-left: 2.3rem; }

/* =========================================================
   LOGIN
   ========================================================= */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr; }
@media (min-width: 992px) { .login-wrap { grid-template-columns: 1.05fr 1fr; } }
.login-hero {
    display: none; position: relative; overflow: hidden; color: #fff; padding: 3rem;
    background: radial-gradient(1200px 600px at -10% -10%, #C26A3A 0%, transparent 60%), linear-gradient(150deg, #8C4522 0%, #4A2312 100%);
}
@media (min-width: 992px) { .login-hero { display: flex; flex-direction: column; justify-content: space-between; } }
.login-hero h1 { color: #fff; font-size: 2.2rem; font-weight: 800; line-height: 1.15; max-width: 460px; }
.login-hero p { color: rgba(255,255,255,.8); max-width: 440px; }
.login-hero .feature { display: flex; gap: .75rem; align-items: flex-start; margin-bottom: 1rem; color: rgba(255,255,255,.9); }
.login-hero .feature i { width: 2.2rem; height: 2.2rem; border-radius: 9px; display: grid; place-items: center; background: rgba(255,255,255,.14); flex: 0 0 auto; }
.login-hero .logo-chip { background: #fff; border-radius: 12px; padding: .4rem .6rem; display: inline-flex; }
.login-form-side { display: flex; align-items: center; justify-content: center; padding: 2rem 1.25rem; }
.login-card { width: 100%; max-width: 400px; }
.login-card .brand-mobile img { height: 70px; }

/* =========================================================
   PUNTO DE VENTA
   ========================================================= */
.pos-body { background: var(--oml-bg); }
.pos-navbar { background: var(--oml-sidebar); padding: .55rem 1rem; display: flex; align-items: center; gap: .75rem; position: sticky; top: 0; z-index: 1030; }
.pos-navbar .brand { display: flex; align-items: center; gap: .6rem; color: #fff; text-decoration: none; min-width: 0; }
.pos-navbar .brand img { height: 36px; width: 36px; object-fit: contain; background: #fff; border-radius: 8px; padding: 2px; }
.pos-navbar .brand .t { font-weight: 700; line-height: 1.05; }
.pos-navbar .brand .s { font-size: .75rem; color: #A39A90; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pos-navbar .btn { --bs-btn-padding-y: .4rem; }

.pos-layout { display: grid; grid-template-columns: 1fr; gap: 1rem; padding: 1rem; }
@media (min-width: 992px) {
    .pos-layout { grid-template-columns: minmax(0, 1fr) 400px; height: calc(100vh - 54px); padding: 1rem; overflow: hidden; }
    .pos-catalog, .pos-ticket { min-height: 0; }
}
@media (min-width: 1400px) { .pos-layout { grid-template-columns: minmax(0, 1fr) 440px; } }

.pos-catalog { display: flex; flex-direction: column; min-width: 0; }
.pos-catalog .app-card-body { display: flex; flex-direction: column; min-height: 0; flex: 1 1 auto; }
.pos-search .form-control, .pos-search .input-group-text { height: 52px; }
.pos-search #cantidadAgregar { max-width: 78px; text-align: center; font-weight: 700; font-size: 1.1rem; }
@media (max-width: 575.98px) {
    .pos-search #cantidadAgregar { max-width: 58px; padding-left: .25rem; padding-right: .25rem; }
    .pos-search .por { display: none; }
    .pos-layout { padding: .6rem; }
    .pos-catalog > .app-card-body { padding: .8rem; }
}
.pos-search #buscadorProductosPOS { font-size: 1.02rem; }
.pos-hint { font-size: .78rem; color: var(--oml-muted); }
kbd { background: #EDE8E3; color: var(--oml-ink); border: 1px solid #DDD5CC; border-bottom-width: 2px; font-size: .7rem; padding: .05rem .35rem; border-radius: 5px; font-weight: 600; }

.chips { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .25rem; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
    flex: 0 0 auto; border: 1px solid var(--oml-border); background: var(--oml-surface); color: var(--oml-text);
    border-radius: 999px; padding: .35rem .85rem; font-size: .82rem; font-weight: 600; white-space: nowrap;
}
.chip:hover { border-color: var(--oml-primary); color: var(--oml-primary); }
.chip.active { background: var(--oml-ink); border-color: var(--oml-ink); color: #fff; }

.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .65rem; align-content: start; }
@media (max-width: 575.98px) { .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; } }
@media (min-width: 992px) { .product-scroll { overflow-y: auto; flex: 1 1 auto; min-height: 0; margin: 0 -.35rem; padding: .1rem .35rem .5rem; } }
.product-tile {
    position: relative; text-align: left; background: var(--oml-surface); border: 1px solid var(--oml-border); border-radius: 12px;
    padding: .75rem .8rem .7rem; min-height: 112px; display: flex; flex-direction: column; justify-content: space-between; gap: .4rem;
    transition: border-color .12s, box-shadow .12s, transform .06s; color: var(--oml-ink); width: 100%;
}
.product-tile:hover:not(:disabled) { border-color: var(--oml-primary); box-shadow: 0 4px 14px rgba(164, 83, 42, .14); }
.product-tile:active:not(:disabled) { transform: scale(.98); }
.product-tile:disabled { background: var(--oml-surface-2); color: var(--oml-muted); cursor: not-allowed; }
.product-tile .p-name { font-weight: 600; font-size: .88rem; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-tile .p-cat { font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; color: var(--oml-muted); font-weight: 600; }
.product-tile .p-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: .4rem; }
.product-tile .p-price { font-weight: 800; font-size: 1.05rem; color: var(--oml-primary); font-variant-numeric: tabular-nums; }
.product-tile:disabled .p-price { color: var(--oml-muted); }
.product-tile .p-stock { font-size: .72rem; font-weight: 600; color: var(--oml-muted); white-space: nowrap; }
.product-tile .p-stock.low { color: var(--oml-warning); }
.product-tile .p-stock.out { color: var(--oml-danger); }
.product-tile .p-qty { position: absolute; top: -7px; right: -7px; background: var(--oml-primary); color: #fff; border-radius: 999px; min-width: 1.6rem; height: 1.6rem; display: grid; place-items: center; font-size: .75rem; font-weight: 700; padding: 0 .4rem; box-shadow: 0 2px 6px rgba(0,0,0,.18); }

/* Panel del ticket: columna fija en PC, panel deslizable en celular */
#panelTicket { --bs-offcanvas-width: min(440px, 100vw); }
.pos-ticket { display: flex; flex-direction: column; background: var(--oml-surface); flex: 1 1 auto; min-height: 0; }
@media (min-width: 992px) {
    #panelTicket { display: flex; flex-direction: column; min-height: 0; }
    .pos-ticket { border: 1px solid var(--oml-border); border-radius: var(--oml-radius); box-shadow: var(--oml-shadow); overflow: hidden; }
}
@media (max-width: 991.98px) { .pos-ticket { height: 100%; } }
.ticket-head { padding: .85rem 1rem; border-bottom: 1px solid var(--oml-border); }
.cliente-toggle .btn { flex: 1 1 0; }
.cliente-toggle .btn-check:checked + .btn { background: var(--oml-ink); border-color: var(--oml-ink); color: #fff; }
#listaResultados { position: absolute; z-index: 1060; left: 0; right: 0; top: calc(100% + 4px); max-height: 260px; overflow-y: auto; border-radius: 10px; }
#listaResultados .list-group-item { cursor: pointer; }
.ticket-items { flex: 1 1 auto; overflow-y: auto; min-height: 120px; }
.cart-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .35rem .75rem; padding: .7rem 1rem; border-bottom: 1px solid #F0EBE5; transition: background .3s; }
.cart-row.flash { background: var(--oml-success-soft); }
.cart-row .c-name { font-weight: 600; font-size: .9rem; color: var(--oml-ink); line-height: 1.25; }
.cart-row .c-unit { font-size: .76rem; color: var(--oml-muted); }
.cart-row .c-total { font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cart-row .c-actions { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; }
.qty-control { width: 128px; }
.qty-control .btn { width: 36px; padding: 0; }
.qty-control input { text-align: center; font-weight: 700; padding-left: 2px; padding-right: 2px; }
.qty-control input::-webkit-outer-spin-button, .qty-control input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-control input[type=number] { -moz-appearance: textfield; }
.btn-remove { color: var(--oml-muted); border: 0; background: transparent; padding: .25rem .4rem; border-radius: 6px; }
.btn-remove:hover { color: var(--oml-danger); background: var(--oml-danger-soft); }
.ticket-empty { text-align: center; color: var(--oml-muted); padding: 2.5rem 1rem; }
.ticket-empty i { font-size: 2.4rem; opacity: .45; display: block; margin-bottom: .5rem; }
.ticket-foot { border-top: 1px solid var(--oml-border); padding: .9rem 1rem calc(1rem + env(safe-area-inset-bottom)); background: var(--oml-surface-2); }
.ticket-total { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: .8rem; }
.ticket-total .amount { font-size: 1.9rem; font-weight: 800; color: var(--oml-ink); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.pay-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.pay-grid .btn-pay-main { grid-column: 1 / -1; padding: .85rem; font-size: 1.05rem; }
.pay-grid .btn-pay { flex-direction: column; gap: .15rem; padding: .55rem .3rem; font-size: .78rem; line-height: 1.15; }
.pay-grid .btn-pay i { font-size: 1.15rem; }

/* Barra inferior en celular */
.pos-bottom-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1035; background: var(--oml-surface); border-top: 1px solid var(--oml-border); box-shadow: 0 -6px 20px rgba(31,27,23,.08); padding: .65rem 1rem calc(.65rem + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: .75rem; }
.pos-bottom-bar .sum { flex: 1 1 auto; min-width: 0; }
.pos-bottom-bar .sum .amount { font-size: 1.3rem; font-weight: 800; color: var(--oml-ink); line-height: 1.1; }
@media (max-width: 991.98px) { .pos-body { padding-bottom: 84px; } }

/* Confirmación de venta */
.confirm-total { display: flex; justify-content: space-between; align-items: center; background: var(--oml-primary-soft); border-radius: 10px; padding: .8rem 1rem; }
.confirm-total .amount { font-size: 1.8rem; font-weight: 800; color: var(--oml-primary-dark); font-variant-numeric: tabular-nums; }
.vuelto-box { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .1rem .5rem; border-radius: 10px; padding: .6rem .9rem; margin-top: .75rem; }
.vuelto-box .amount { font-size: 1.7rem; font-weight: 800; font-variant-numeric: tabular-nums; }
#cajaVuelto .amount { font-size: 1.45rem; }
.vuelto-ok { background: var(--oml-success-soft); color: var(--oml-success); }
.vuelto-bad { background: var(--oml-danger-soft); color: var(--oml-danger); }
.cash-quick .btn { flex: 1 1 0; min-width: 0; padding-left: .4rem; padding-right: .4rem; white-space: nowrap; }
.modal-footer .btn { white-space: nowrap; }
@media (max-width: 575.98px) {
    .modal-footer .btn-lg { font-size: 1rem; padding: .65rem .9rem; }
}
#iframeTicket, .iframe-ticket { width: 100%; height: 62vh; border: 0; background: #E9E5E0; border-radius: 10px; }
@media (max-width: 575.98px) { #iframeTicket, .iframe-ticket { height: calc(100vh - 230px); } }

/* Calculadora de cierre */
.denom-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .45rem .9rem; }
.denom-grid .input-group-text { width: 78px; justify-content: center; }
.denom-grid input { text-align: center; font-weight: 700; }
.denom-grid input::-webkit-outer-spin-button, .denom-grid input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.denom-grid input[type=number] { -moz-appearance: textfield; }

/* Impresión de reportes del panel */
@media print {
    .admin-sidebar, .admin-topbar, .page-actions, .no-print { display: none !important; }
    .admin-main { margin-left: 0 !important; }
    body { background: #fff; }
}
