/* BarrioPOS — Estilos principales */
/* Fuente y reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --primary:    #2563eb;
    --primary-dk: #1d4ed8;
    --danger:     #dc2626;
    --success:    #16a34a;
    --warning:    #ca8a04;
    --bg:         #f1f5f9;
    --surface:    #ffffff;
    --border:     #e2e8f0;
    --text:       #1e293b;
    --text-muted: #64748b;
    --radius:     10px;
    --shadow:     0 2px 8px rgba(0,0,0,.08);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 16px;
}

/* ── Navbar ── */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--primary);
    color: #fff;
    padding: 0 24px;
    height: 58px;
    box-shadow: var(--shadow);
}
.navbar-brand { display: flex; align-items: center; gap: 10px; }
.brand-icon   { font-size: 24px; }
.brand-name   { font-size: 20px; font-weight: 700; letter-spacing: .5px; }
.navbar-menu  { display: flex; gap: 8px; }
.nav-link {
    color: rgba(255,255,255,.85);
    text-decoration: none;
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 15px;
    transition: background .15s;
}
.nav-link:hover, .nav-link.active { background: rgba(255,255,255,.2); color: #fff; }
.navbar-user  { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.user-rol     { background: rgba(255,255,255,.2); padding: 2px 8px; border-radius: 20px; font-size: 12px; }
.btn-logout   { color: #fff; text-decoration: none; background: rgba(255,255,255,.15);
                padding: 5px 12px; border-radius: 6px; font-size: 13px; }
.btn-logout:hover { background: rgba(255,255,255,.25); }

/* ── Layout principal ── */
.main-content { padding: 20px 24px; }

/* ── Alertas ── */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 14px;
    font-size: 14px;
}
.alert-error   { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.alert-success { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.alert-warning { background: #fef9c3; color: #854d0e; border: 1px solid #fde047; }

/* ── Botones ── */
.btn-primary, .btn-secondary, .btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 22px;
    border: none;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: filter .15s;
    text-decoration: none;
}
.btn-primary   { background: var(--primary); color: #fff; }
.btn-primary:hover   { filter: brightness(1.1); }
.btn-secondary { background: #e2e8f0; color: var(--text); }
.btn-secondary:hover { filter: brightness(.95); }
.btn-danger    { background: var(--danger); color: #fff; }
.btn-danger:hover    { filter: brightness(1.1); }
.btn-full { width: 100%; }
.btn-xl   { font-size: 20px; padding: 16px 32px; }
.btn-sm   { padding: 5px 12px; font-size: 13px; }

/* ── Formularios ── */
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group label { font-size: 13px; font-weight: 600; color: var(--text-muted); }
.form-input, .form-select {
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 15px;
    color: var(--text);
    background: var(--surface);
    transition: border .15s;
}
.form-input:focus, .form-select:focus {
    outline: none;
    border-color: var(--primary);
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* Campo contraseña con ojo */
.password-wrapper { position: relative; display: flex; align-items: center; }
.password-wrapper .form-input { width: 100%; padding-right: 42px; box-sizing: border-box; }
.password-toggle {
    position: absolute; right: 12px; background: none; border: none;
    cursor: pointer; padding: 0; color: var(--text-muted); line-height: 1;
    font-size: 18px; display: flex; align-items: center;
}
.password-toggle:hover { color: var(--primary); }

/* ── LOGIN ── */
.login-body { display: flex; align-items: center; justify-content: center;
              min-height: 100vh; background: var(--bg); }
.login-container {
    background: var(--surface);
    border-radius: 16px;
    padding: 40px 36px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 8px 32px rgba(0,0,0,.12);
}
.login-logo   { text-align: center; margin-bottom: 28px; }
.logo-icon    { font-size: 48px; }
.logo-title   { font-size: 28px; font-weight: 800; color: var(--primary); margin: 6px 0 2px; }
.logo-sub     { color: var(--text-muted); font-size: 14px; }
.login-form   { display: flex; flex-direction: column; gap: 16px; }

/* ── POS Layout ── */
.pos-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 20px;
    height: calc(100vh - 100px);
}

/* Panel izquierdo */
.pos-left {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: var(--shadow);
}
.search-bar { display: flex; gap: 8px; align-items: center; }
.search-input {
    flex: 1;
    padding: 12px 16px;
    font-size: 18px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
}
.search-input:focus { outline: none; border-color: var(--primary); }
.btn-limpiar-busqueda {
    padding: 10px 14px; border: none; border-radius: var(--radius);
    background: #d97706; color: #fff; font-size: 13px; font-weight: 600;
    cursor: pointer; white-space: nowrap; transition: background .15s;
}
.btn-limpiar-busqueda:hover { background: #b45309; }

.search-results {
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    max-height: 200px;
    overflow-y: auto;
    box-shadow: var(--shadow);
}
.search-item {
    padding: 10px 14px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}
.search-item:hover { background: #f0f9ff; }
.search-item:last-child { border-bottom: none; }
.search-item-precio { font-weight: 700; color: var(--primary); }

.carrito-header { display: flex; justify-content: space-between; align-items: center; }
.carrito-header h2 { font-size: 16px; }

.carrito-lista {
    flex: 1;
    overflow-y: auto;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 8px;
}
.carrito-vacio { color: var(--text-muted); text-align: center; padding: 24px; font-size: 14px; }

.carrito-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}
.carrito-item:last-child { border-bottom: none; }
.carrito-item-nombre { flex: 1; }
.carrito-item-qty {
    display: flex;
    align-items: center;
    gap: 6px;
}
.qty-btn {
    width: 28px; height: 28px;
    border: none; background: var(--bg);
    border-radius: 6px; cursor: pointer;
    font-size: 16px; font-weight: 700;
}
.qty-input {
    width: 48px; text-align: center;
    border: 1.5px solid var(--border);
    border-radius: 6px; padding: 3px;
}
.carrito-item-precio { font-weight: 700; min-width: 80px; text-align: right; }
.carrito-item-remove { color: var(--danger); cursor: pointer; font-size: 18px; }

.carrito-totales { border-top: 2px solid var(--border); padding-top: 10px; }
.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    font-size: 15px;
}
.total-final { font-size: 22px; font-weight: 800; color: var(--primary); }
.input-descuento {
    width: 100px; text-align: right;
    border: 1.5px solid var(--border);
    border-radius: 6px; padding: 4px 8px;
}

/* Panel derecho */
.pos-right {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.pago-section {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.pago-section h2 { font-size: 16px; }
.metodos-pago { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.btn-metodo {
    padding: 12px;
    border: 2px solid var(--border);
    background: var(--bg);
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
}
.btn-metodo.activo {
    border-color: var(--primary);
    background: #eff6ff;
    color: var(--primary);
}
.pago-monto-row { display: flex; flex-direction: column; gap: 5px; }
.pago-monto-row label { font-size: 13px; font-weight: 600; color: var(--text-muted); }
.vuelto-row {
    display: flex; justify-content: space-between;
    align-items: center; font-size: 16px;
}
.vuelto-monto { font-size: 22px; font-weight: 800; color: var(--success); }
.btn-cobrar { width: 100%; margin-top: 6px; }

.resumen-dia {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
}
.resumen-dia h3 { font-size: 14px; color: var(--text-muted); margin-bottom: 10px; }
.resumen-stat {
    display: flex; justify-content: space-between;
    padding: 6px 0; font-size: 15px;
    border-bottom: 1px solid var(--border);
}
.resumen-stat:last-child { border-bottom: none; }
.resumen-stat strong { font-size: 18px; font-weight: 700; color: var(--primary); }

/* ── Stock / Productos ── */
.page-header {
    display: flex; justify-content: space-between;
    align-items: center; margin-bottom: 16px;
}
.page-header h1 { font-size: 22px; }

.alerta-stock {
    background: #fef9c3;
    border: 1.5px solid #fde047;
    border-radius: var(--radius);
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 14px;
}
.stock-bajo-lista { margin-top: 6px; padding-left: 20px; }

.tabla-container {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.tabla-filtros {
    display: flex; gap: 12px; padding: 14px 16px;
    border-bottom: 1.5px solid var(--border);
}
.tabla-filtros .form-input,
.tabla-filtros .form-select { max-width: 240px; }

.tabla {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.tabla th {
    background: #f8fafc;
    padding: 10px 14px;
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    border-bottom: 1.5px solid var(--border);
}
.tabla td {
    padding: 11px 14px;
    border-bottom: 1px solid var(--border);
}
.tabla tr:last-child td { border-bottom: none; }
.tabla tr.fila-alerta { background: #fff7ed; }

.badge {
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}
.badge-ok     { background: #dcfce7; color: #166534; }
.badge-danger { background: #fee2e2; color: #991b1b; }

/* ── Modal ── */
.modal {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.45);
    display: flex; align-items: center; justify-content: center;
    z-index: 100;
}
.modal.hidden { display: none; }
.modal-box {
    background: var(--surface);
    border-radius: 16px;
    padding: 24px;
    width: 100%;
    max-width: 560px;
    box-shadow: 0 16px 48px rgba(0,0,0,.2);
}
.modal-header {
    display: flex; justify-content: space-between;
    align-items: center; margin-bottom: 20px;
}
.modal-header h3 { font-size: 18px; }
.modal-close {
    background: none; border: none;
    font-size: 20px; cursor: pointer; color: var(--text-muted);
}
.modal-footer {
    display: flex; justify-content: flex-end;
    gap: 10px; margin-top: 20px;
}

/* ── Ticket ── */
.ticket-container {
    display: flex; flex-direction: column;
    align-items: center; padding: 30px;
}
.ticket {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    width: 100%;
    max-width: 380px;
    font-size: 14px;
}
.ticket-header { text-align: center; margin-bottom: 14px; }
.ticket-header h2 { font-size: 20px; }
.ticket-info { margin-bottom: 10px; }
.ticket-row {
    display: flex; justify-content: space-between;
    padding: 4px 0;
}
.ticket-divider { border: none; border-top: 1px dashed var(--border); margin: 12px 0; }
.ticket-items { width: 100%; border-collapse: collapse; font-size: 13px; }
.ticket-items th, .ticket-items td { padding: 5px 4px; }
.ticket-items th { font-weight: 700; border-bottom: 1px solid var(--border); }
.ticket-totales { margin-top: 10px; }
.ticket-total { font-size: 17px; }
.ticket-footer { text-align: center; margin-top: 16px; color: var(--text-muted); font-size: 13px; }
.ticket-actions {
    display: flex; gap: 12px; margin-top: 20px;
}

/* ── Caja ── */
.caja-apertura-card {
    background: var(--surface); border-radius: var(--radius);
    padding: 48px 36px; text-align: center; max-width: 420px;
    margin: 60px auto; box-shadow: var(--shadow);
}
.apertura-icon { font-size: 56px; margin-bottom: 12px; }
.caja-apertura-card h2 { font-size: 22px; margin-bottom: 8px; }
.caja-apertura-card p  { color: var(--text-muted); margin-bottom: 24px; }
.apertura-form  { display: flex; flex-direction: column; gap: 16px; }
.input-grande   { font-size: 22px; text-align: center; padding: 14px; }

.caja-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.cierre-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.card {
    background: var(--surface); border-radius: var(--radius);
    padding: 20px; box-shadow: var(--shadow);
}
.card-titulo { font-size: 15px; font-weight: 700; margin-bottom: 16px;
               color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; }
.mt-20 { margin-top: 20px; }
.mt-10 { margin-top: 10px; }

.caja-stat-list { display: flex; flex-direction: column; gap: 2px; }
.caja-stat {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 14px;
}
.caja-stat:last-child { border-bottom: none; }
.caja-stat-total { font-size: 16px; font-weight: 700; border-top: 2px solid var(--border);
                   margin-top: 4px; padding-top: 12px; }
.caja-stat-total strong { color: var(--primary); font-size: 20px; }

.mov-tipo-selector { display: flex; gap: 8px; margin-bottom: 16px; }
.btn-mov-tipo {
    flex: 1; padding: 10px; border: 2px solid var(--border);
    background: var(--bg); border-radius: var(--radius);
    font-size: 15px; font-weight: 600; cursor: pointer;
}
.btn-mov-tipo.activo { border-color: var(--primary); background: #eff6ff; color: var(--primary); }

.header-actions { display: flex; gap: 10px; }

.diferencia-box {
    background: var(--bg); border-radius: var(--radius);
    padding: 16px; margin-top: 16px;
}
.dif-row {
    display: flex; justify-content: space-between;
    padding: 6px 0; font-size: 15px;
}
.dif-result { font-size: 20px; font-weight: 700; border-top: 2px solid var(--border);
              margin-top: 8px; padding-top: 10px; }
.cierre-instruccion { color: var(--text-muted); font-size: 14px; margin-bottom: 20px; }

.texto-vacio { color: var(--text-muted); text-align: center; padding: 24px; font-size: 14px; }

/* ── Reportes ── */
.reporte-cards {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 20px;
}
.reporte-card {
    background: var(--surface); border-radius: var(--radius);
    padding: 20px; text-align: center; box-shadow: var(--shadow);
}
.reporte-card-green  { border-top: 4px solid var(--success); }
.reporte-card-purple { border-top: 4px solid #7c3aed; }
.reporte-card-purple .rc-valor { color: #7c3aed; }
.rc-icono  { font-size: 28px; margin-bottom: 8px; }
.rc-valor  { font-size: 26px; font-weight: 800; color: var(--primary); }
.rc-label  { font-size: 12px; color: var(--text-muted); margin-top: 4px; text-transform: uppercase; }
.rc-hint   { font-size: 11px; color: var(--primary); opacity: .7; display: block; margin-top: 2px; }
.reporte-card-link { cursor: pointer; transition: transform .15s, box-shadow .15s; }
.reporte-card-link:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.12); }

.reportes-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.fecha-hoy { font-size: 14px; color: var(--text-muted); text-transform: capitalize; }

/* Barras horizontales (por hora) */
.barras-container { display: flex; flex-direction: column; gap: 10px; }
.barra-fila   { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.barra-hora   { width: 52px; color: var(--text-muted); }
.barra-track  { flex: 1; background: var(--bg); border-radius: 4px; height: 22px; overflow: hidden; }
.barra-fill   { height: 100%; background: var(--primary); border-radius: 4px;
                transition: width .4s ease; min-width: 4px; }
.barra-valor  { width: 90px; text-align: right; font-weight: 600; }
.barra-cant   { width: 32px; color: var(--text-muted); }

/* Barras verticales (semana) */
.semana-barras {
    display: flex; align-items: flex-end; gap: 12px;
    height: 160px; padding-bottom: 40px; position: relative;
}
.semana-col   { flex: 1; display: flex; flex-direction: column; align-items: center;
                height: 100%; justify-content: flex-end; }
.semana-track { width: 100%; background: var(--bg); border-radius: 6px 6px 0 0;
                height: 120px; display: flex; align-items: flex-end; overflow: hidden; }
.semana-fill  { width: 100%; background: var(--primary); border-radius: 6px 6px 0 0;
                transition: height .4s ease; min-height: 4px; }
.semana-fecha { font-size: 11px; color: var(--text-muted); margin-top: 6px; text-transform: capitalize; }
.semana-monto { font-size: 11px; font-weight: 600; }

/* Colores de texto */
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }

/* ── Admin ── */
.admin-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
.badge-admin { background: #fce7f3; color: #9d174d; }
.badge-sup   { background: #ede9fe; color: #5b21b6; }

/* ── Fiados ── */
.reporte-card-red  { border-top: 4px solid var(--danger); }
.reporte-card-red .rc-valor { color: var(--danger); }
.mb-20 { margin-bottom: 20px; }
.mb-16 { margin-bottom: 16px; }
.abono-form h4 { font-size: 15px; margin-bottom: 12px; }

/* ── Compras ── */
.compra-items-lista {
    border: 1.5px solid var(--border); border-radius: var(--radius);
    min-height: 80px; padding: 8px; max-height: 240px; overflow-y: auto;
}
.modal-wide { max-width: 700px; }

/* ── Planes SaaS ── */
.plan-chip {
    font-size: 11px; font-weight: 700; padding: 2px 10px;
    border-radius: 20px; text-transform: uppercase; letter-spacing: .5px;
}
.plan-basico     { background: #e2e8f0; color: #475569; }
.plan-intermedio { background: #ede9fe; color: #5b21b6; }
.plan-premium    { background: #fef9c3; color: #854d0e; }
.plan-chip-link  { text-decoration: none; cursor: pointer; transition: filter .15s; }
.plan-chip-link:hover { filter: brightness(.9); }

.sucursal-selector {
    display: flex; align-items: center;
    background: rgba(255,255,255,.15); border-radius: 8px;
    padding: 2px 10px;
}
.sucursal-select {
    background: transparent; border: none; color: #fff;
    font-size: 13px; font-weight: 600; cursor: pointer;
    outline: none; padding: 2px 0; max-width: 160px;
}
.sucursal-select option { background: #1e293b; color: #fff; }

/* Dropdown de usuario en navbar */
.user-dropdown { position: relative; }
.user-dropdown-toggle {
    color: rgba(255,255,255,.85); padding: 6px 12px; border-radius: 6px;
    font-size: 14px; cursor: pointer; user-select: none;
    transition: background .15s;
}
.user-dropdown-toggle:hover,
.user-dropdown.open .user-dropdown-toggle { background: rgba(255,255,255,.2); color: #fff; }
.user-dropdown-menu {
    display: none; position: absolute; top: calc(100% + 6px); right: 0;
    background: #1e293b; border-radius: 8px; min-width: 180px;
    box-shadow: 0 8px 24px rgba(0,0,0,.25); z-index: 999; overflow: hidden;
}
.user-dropdown.open .user-dropdown-menu { display: block; }
.user-dropdown-menu a {
    display: block; padding: 10px 16px; color: #e2e8f0;
    text-decoration: none; font-size: 14px; transition: background .12s;
}
.user-dropdown-menu a:hover { background: rgba(255,255,255,.1); color: #fff; }
.user-dropdown-menu .dropdown-divider {
    height: 1px; background: rgba(255,255,255,.1); margin: 4px 0;
}

/* Dropdown de admin en navbar */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle {
    color: rgba(255,255,255,.85); text-decoration: none;
    padding: 6px 16px; border-radius: 6px; font-size: 15px;
    cursor: pointer; display: flex; align-items: center; gap: 4px;
    transition: background .15s; user-select: none;
}
.nav-dropdown-toggle:hover,
.nav-dropdown.open .nav-dropdown-toggle { background: rgba(255,255,255,.2); color: #fff; }
.nav-dropdown-menu {
    display: none; position: absolute; top: calc(100% + 6px); right: 0;
    background: #1e293b; border-radius: 8px; min-width: 160px;
    box-shadow: 0 8px 24px rgba(0,0,0,.25); z-index: 999; overflow: hidden;
}
.nav-dropdown.open .nav-dropdown-menu { display: block; }
.nav-dropdown-menu a {
    display: block; padding: 10px 16px; color: #e2e8f0;
    text-decoration: none; font-size: 14px; transition: background .12s;
}
.nav-dropdown-menu a:hover { background: rgba(255,255,255,.1); color: #fff; }
.nav-dropdown-menu .dropdown-divider {
    height: 1px; background: rgba(255,255,255,.1); margin: 4px 0;
}

.fila-activa { background: #f0fdf4; }

.nav-bloqueado {
    color: rgba(255,255,255,.4);
    padding: 6px 16px;
    font-size: 15px;
    cursor: pointer;
    text-decoration: none;
    border-radius: 6px;
    transition: background .15s;
}
.nav-bloqueado:hover {
    background: rgba(255,255,255,.1);
    color: rgba(255,255,255,.6);
}

/* Upgrade page */
.upgrade-container {
    max-width: 900px; margin: 40px auto;
    text-align: center; padding: 0 16px;
}
.upgrade-icono  { font-size: 56px; margin-bottom: 12px; }
.upgrade-titulo { font-size: 24px; margin-bottom: 10px; }
.upgrade-sub    { color: var(--text-muted); font-size: 16px; margin-bottom: 32px; }

.planes-grid {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 20px; margin-bottom: 32px;
}
.plan-card {
    background: var(--surface); border: 2px solid var(--border);
    border-radius: 16px; padding: 24px; text-align: left;
    position: relative;
}
.plan-destacado { border-color: var(--primary); box-shadow: 0 0 0 4px #dbeafe; }
.plan-actual    { border-color: var(--success); }

.plan-nombre { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.plan-precio {
    font-size: 28px; font-weight: 800; color: var(--primary);
    margin-bottom: 16px;
}
.plan-precio span { font-size: 14px; font-weight: 400; color: var(--text-muted); }
.plan-lista { list-style: none; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.no-incluido { color: var(--text-muted); }

.plan-badge-actual {
    position: absolute; top: -12px; right: 16px;
    background: var(--success); color: #fff;
    font-size: 11px; font-weight: 700; padding: 3px 12px; border-radius: 20px;
}
.plan-badge-rec {
    position: absolute; top: -12px; right: 16px;
    background: var(--primary); color: #fff;
    font-size: 11px; font-weight: 700; padding: 3px 12px; border-radius: 20px;
}
.upgrade-contacto { color: var(--text-muted); font-size: 14px; margin-bottom: 20px; }

/* ── Utilidades ── */
.hidden { display: none !important; }

@media print {
    .navbar, .ticket-actions { display: none; }
    body { background: #fff; }
}

/* ── HAMBURGER BUTTON ── */
.nav-hamburger {
    display: none;
    background: rgba(255,255,255,.18);
    border: none;
    border-radius: 6px;
    color: #fff;
    font-size: 22px;
    padding: 5px 10px;
    cursor: pointer;
    line-height: 1;
    transition: background .15s;
    order: -1;
}
.nav-hamburger:hover { background: rgba(255,255,255,.3); }

.mobile-menu-header {
    display: none;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 16px;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,.12);
}
.mobile-close-btn {
    background: rgba(255,255,255,.15);
    border: none;
    border-radius: 6px;
    color: #fff;
    font-size: 20px;
    padding: 5px 10px;
    cursor: pointer;
    transition: background .15s;
}
.mobile-close-btn:hover { background: rgba(255,255,255,.28); }

/* ── RESPONSIVE MÓVIL ── */
@media (max-width: 768px) {

    /* — Navbar — */
    .nav-hamburger { display: flex; align-items: center; }
    .navbar {
        padding: 0 14px;
        height: 54px;
        position: sticky;
        top: 0;
        z-index: 100;
    }
    .brand-name { font-size: 17px; }
    .navbar-user { gap: 6px; }
    .user-rol   { display: none; }
    .plan-chip  { display: none; }

    /* — Menú móvil (overlay) — */
    .mobile-menu-header { display: flex; }
    .navbar-menu {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(15,23,42,.97);
        flex-direction: column;
        padding: 20px 18px 30px;
        gap: 2px;
        z-index: 400;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    .navbar-menu.mobile-open { display: flex; }

    /* Links dentro del menú móvil */
    .navbar-menu .nav-link,
    .navbar-menu .nav-bloqueado {
        padding: 13px 16px;
        font-size: 16px;
        font-weight: 500;
        border-radius: 8px;
        display: block;
    }

    /* Dropdown admin en móvil: siempre expandido */
    .navbar-menu .nav-dropdown { position: static; }
    .navbar-menu .nav-dropdown-toggle {
        padding: 13px 16px;
        font-size: 16px;
        font-weight: 500;
        pointer-events: none;
        opacity: .6;
        display: block;
    }
    .navbar-menu .nav-dropdown-menu {
        display: block !important;
        position: static;
        background: rgba(255,255,255,.07);
        box-shadow: none;
        border-radius: 8px;
        margin: 2px 0 6px 12px;
        min-width: unset;
    }
    .navbar-menu .nav-dropdown-menu a {
        padding: 12px 16px;
        font-size: 15px;
    }

    /* — Main content — */
    .main-content { padding: 12px 14px; }

    /* — POS: apilar en columna — */
    .pos-layout {
        grid-template-columns: 1fr;
        height: auto;
        gap: 14px;
    }
    .pos-left { height: auto; }
    .carrito-lista { max-height: 200px; }
    .btn-cobrar { font-size: 18px; padding: 16px; }

    /* — Grillas 2 y 3 columnas → 1 columna — */
    .caja-grid,
    .cierre-grid,
    .reportes-grid  { grid-template-columns: 1fr; }
    .form-grid       { grid-template-columns: 1fr; }
    .planes-grid     { grid-template-columns: 1fr; }
    .metodos-pago    { grid-template-columns: 1fr 1fr; }

    /* — Tablas — */
    .tabla-container { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .tabla-filtros { flex-wrap: wrap; gap: 8px; }
    .tabla-filtros .form-input,
    .tabla-filtros .form-select { max-width: 100%; flex: 1; min-width: 130px; }

    /* — Page header — */
    .page-header { flex-direction: column; align-items: flex-start; gap: 8px; }
    .page-header h1 { font-size: 20px; }
    .header-actions { display: flex; gap: 8px; width: 100%; }
    .header-actions > * { flex: 1; text-align: center; }

    /* — Modales: slide desde abajo — */
    .modal { align-items: flex-end; padding: 0; }
    .modal-box {
        border-radius: 16px 16px 0 0;
        max-width: 100%;
        width: 100%;
        max-height: 88vh;
        overflow-y: auto;
        padding-bottom: 28px;
    }
    .modal-wide { max-width: 100%; }

    /* — Caja apertura — */
    .caja-apertura-card { margin: 16px auto; padding: 28px 16px; }

    /* — Ticket — */
    .ticket-container { padding: 14px; }
    .ticket-actions   { flex-direction: column; gap: 8px; }

    /* — Upgrade / Planes — */
    .upgrade-container { margin: 16px auto; }
    .upgrade-titulo    { font-size: 20px; }
    .upgrade-sub       { font-size: 14px; }

    /* — Login — */
    .login-container { border-radius: 0; min-height: 100vh; padding: 32px 20px; }
    .login-body      { align-items: flex-start; }
}
