body {
    background: #f5f6f8;
    color: #1f2937;
    font-family: Arial, sans-serif;
}

.login-page {
    background: linear-gradient(135deg, #111827, #1f2937);
}

.login-card {
    width: 100%;
    max-width: 420px;
    border-radius: 20px;
}

.app-shell {
    max-width: 700px;
    margin: 0 auto;
    padding: 16px 16px 110px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    background: #fff;
    border-radius: 18px;
    padding: 14px 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .06);
}

.app-title {
    font-size: 1.2rem;
    font-weight: 700;
}

.card-box {
    background: #fff;
    border-radius: 18px;
    padding: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .06);
    margin-bottom: 16px;
}

.bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    max-width: 700px;
    margin: auto;
    background: #0f172a;
    display: flex;
    gap: 10px;
    padding: 12px 14px;
    border-top-left-radius: 18px;
    border-top-right-radius: 18px;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    box-shadow: 0 -8px 24px rgba(0, 0, 0, .18);
    scrollbar-width: thin;
}

.bottom-nav::-webkit-scrollbar {
    height: 6px;
}

.bottom-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, .20);
    border-radius: 999px;
}

.bottom-nav a {
    color: #fff;
    text-decoration: none;
    font-size: .92rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .08);
    flex: 0 0 auto;
    min-height: 42px;
    transition: background .2s ease, transform .2s ease;
}

.bottom-nav a:hover {
    background: rgba(255, 255, 255, .16);
    transform: translateY(-1px);
}

.bottom-nav a:active {
    transform: translateY(0);
}

.table-responsive {
    border-radius: 14px;
}

.display-6 {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.1;
}

.card-box h3,
.card-box h2 {
    color: #111827;
}

.card-box .small {
    color: #6b7280;
}

canvas {
    width: 100% !important;
    max-width: 100%;
}

.pos-sticky-summary {
    position: sticky;
    bottom: 76px;
    z-index: 20;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, .06);
    box-shadow: 0 8px 20px rgba(0, 0, 0, .08);
}

.pos-search-results {
    max-height: 220px;
    overflow-y: auto;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    margin-top: 6px;
}

.pos-search-item {
    padding: 10px 12px;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
}

.pos-search-item:last-child {
    border-bottom: none;
}

.pos-search-item:hover {
    background: #f9fafb;
}

.pos-mini-label {
    font-size: .82rem;
    color: #6b7280;
}

.pos-difference-ok {
    color: #15803d;
    font-weight: 700;
}

.pos-difference-bad {
    color: #b91c1c;
    font-weight: 700;
}

.table td,
.table th {
    vertical-align: middle;
}

@media (max-width: 576px) {
    .app-shell {
        padding: 12px 12px 110px;
    }

    .topbar {
        padding: 12px 14px;
    }

    .bottom-nav {
        padding: 10px 12px;
        gap: 8px;
    }

    .bottom-nav a {
        font-size: .88rem;
        padding: 9px 12px;
        min-height: 40px;
    }
}

/* ── Botón Bolsa de trabajo ─────────────────────────────────────────── */
.btn-bolsa-trabajo {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 9px;
    background: #0f172a;
    color: #fff;
    font-size: .78rem;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    white-space: nowrap;
    transition: background .18s ease, transform .18s ease;
}

.btn-bolsa-trabajo:hover {
    background: #1e3a5f;
    color: #fff;
    transform: translateY(-1px);
}

.btn-bolsa-trabajo:active {
    transform: translateY(0);
}

/* ── Navegación inferior ─────────────────────────────────────────────── */
.mobile-menu {
    position: fixed;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: min(100%, 700px);
    background: #0f172a;
    padding: 10px 8px 12px;
    display: flex;
    justify-content: space-around;
    z-index: 100;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
}

.nav-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 12px;
    color: #fff;
    text-decoration: none;
    transition: background .15s;
    min-width: 54px;
}

.nav-tab svg {
    opacity: .55;
    transition: opacity .15s;
}

.nav-tab span {
    font-size: 9px;
    font-weight: 600;
    opacity: .55;
    transition: opacity .15s;
    white-space: nowrap;
}

.nav-tab.active,
.nav-tab:hover {
    background: rgba(255,255,255,.10);
}

.nav-tab.active svg,
.nav-tab.active span,
.nav-tab:hover svg,
.nav-tab:hover span {
    opacity: 1;
}

/* ── Sheet overlay ───────────────────────────────────────────────────── */
.sheet-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 101;
}

.sheet-overlay.open {
    display: block;
}

/* ── Bottom sheet ────────────────────────────────────────────────────── */
.bottom-sheet {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) translateY(100%);
    width: min(100%, 700px);
    background: #fff;
    border-top-left-radius: 22px;
    border-top-right-radius: 22px;
    padding: 8px 0 100px;
    z-index: 102;
    transition: transform .25s cubic-bezier(.32,.72,0,1);
    max-height: 80vh;
    overflow-y: auto;
}

.bottom-sheet.open {
    transform: translateX(-50%) translateY(0);
}

.sheet-handle {
    width: 36px;
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    margin: 0 auto 12px;
}

.sheet-title {
    font-size: 11px;
    font-weight: 700;
    color: #6b7280;
    padding: 0 16px 8px;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin: 0;
}

.sheet-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 16px;
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    text-decoration: none;
    border-bottom: 0.5px solid #f3f4f6;
    transition: background .12s;
}

.sheet-link:last-child {
    border-bottom: none;
}

.sheet-link:hover {
    background: #f9fafb;
}

.sheet-link svg {
    color: #6b7280;
    flex-shrink: 0;
}

@media (max-width: 400px) {
    .nav-tab {
        min-width: 44px;
        padding: 6px 6px;
    }
    .nav-tab span {
        font-size: 8px;
    }
}

/* ── POS dark premium ────────────────────────────────────────────── */

/* Fondo oscuro del body cuando está el POS */
body.pos-dark-page {
    background: #0f1117;
}

body.pos-dark-page .topbar {
    background: transparent;
    border: none;
    box-shadow: none;
}

body.pos-dark-page .app-title {
    color: #f1f5f9;
}

body.pos-dark-page .text-muted {
    color: #7c8fa8 !important;
}

body.pos-dark-page .btn-bolsa-trabajo {
    background: #243447;
    color: #94a3b8;
    border: 1px solid #2d3f55;
    box-shadow: none;
}

body.pos-dark-page .btn-bolsa-trabajo:hover {
    background: #94a3b8;
    color: #e2e8f0;
}

body.pos-dark-page .btn.btn-outline-dark {
    border-color: #2d3f55;
    color: #94a3b8;
    background: transparent;
}

/* wrap */
.pos-wrap {
    max-width: 700px;
    margin: 0 auto;
    padding-bottom: 24px;
}

/* alert cita */
.pos-alert-cita {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    background: #1e3a5f;
    border: 1px solid #2563eb;
    border-radius: 14px;
    padding: 12px 14px;
    font-size: 13px;
    color: #93c5fd;
    margin-bottom: 10px;
}

/* branch form */
.pos-branch-form {
    margin-bottom: 10px;
}

.pos-branch-form .pos-field-label {
    color: #475569;
}

/* secciones */
.pos-section {
    background: #161b27;
    border-radius: 20px;
    padding: 18px;
    border: 1px solid #1e293b;
    margin-bottom: 8px;
}

.pos-section-label {
    font-size: 10px;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: 14px;
}

.pos-branch-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    background: #1e293b;
    border-radius: 20px;
    font-size: 11px;
    color: #64748b;
    margin-bottom: 14px;
}

.pos-row2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.pos-field {
    display: flex;
    flex-direction: column;
}

.pos-field-label {
    font-size: 10px;
    color: #475569;
    margin-bottom: 6px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.pos-input {
    padding: 10px 12px;
    border: 1px solid #1e293b;
    border-radius: 10px;
    font-size: 14px;
    color: #e2e8f0;
    background: #0f1117;
    width: 100%;
    outline: none;
    transition: border-color .2s;
}

.pos-input:focus {
    border-color: #3b82f6;
}

.pos-input::placeholder {
    color: #334155;
}

.pos-select {
    padding: 10px 12px;
    border: 1px solid #1e293b;
    border-radius: 10px;
    font-size: 13px;
    color: #94a3b8;
    background: #0f1117;
    width: 100%;
    outline: none;
    cursor: pointer;
}

.pos-input-inline {
    border: none;
    background: transparent;
    font-size: 12px;
    color: #94a3b8;
    width: 70px;
    padding: 0;
    outline: none;
}

.pos-btn-ghost {
    background: none;
    border: none;
    padding: 6px 0;
    font-size: 12px;
    color: #475569;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color .15s;
}

.pos-btn-ghost:hover {
    color: #94a3b8;
}

.pos-btn-dark {
    background: #1e293b;
    color: #e2e8f0;
    border: 1px solid #334155;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
}

.pos-btn-dark:hover {
    background: #334155;
}

.pos-quick-client {
    background: #0f1117;
    border-radius: 14px;
    padding: 14px;
    margin-top: 10px;
    border: 1px solid #1e293b;
}

/* ítems */
.pos-item-card {
    background: #0f1117;
    border-radius: 14px;
    padding: 14px;
    border: 1px solid #1e293b;
    margin-bottom: 8px;
}

.pos-item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #1e293b;
}

.pos-item-subtotal-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pos-item-subtotal-val {
    font-size: 15px;
    font-weight: 700;
    color: #f1f5f9;
}

.pos-btn-remove {
    background: none;
    border: 1px solid #2d3748;
    color: #475569;
    border-radius: 8px;
    width: 26px;
    height: 26px;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all .15s;
}

.pos-btn-remove:hover {
    border-color: #ef4444;
    color: #ef4444;
}

.pos-btn-add {
    width: 100%;
    padding: 12px;
    border: 1px dashed #1e293b;
    border-radius: 12px;
    background: none;
    color: #334155;
    font-size: 13px;
    cursor: pointer;
    transition: all .15s;
    margin-top: 4px;
}

.pos-btn-add:hover {
    border-color: #3b82f6;
    color: #3b82f6;
}

/* resumen */
.pos-summary {
    background: #161b27;
    border-radius: 20px;
    padding: 18px;
    border: 1px solid #1e293b;
    margin-bottom: 8px;
}

.pos-sum-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #475569;
    padding: 5px 0;
}

.pos-sum-row span:last-child {
    color: #64748b;
}

.pos-sum-divider {
    border: none;
    border-top: 1px solid #1e293b;
    margin: 12px 0;
}

.pos-sum-total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.pos-sum-total span:first-child {
    font-size: 14px;
    font-weight: 600;
    color: #94a3b8;
}

.pos-sum-total-val {
    font-size: 38px;
    font-weight: 800;
    color: #f1f5f9;
    letter-spacing: -1px;
    line-height: 1;
}

/* pagos */
.pos-pay-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.pos-pay-input {
    font-size: 20px !important;
    font-weight: 700 !important;
    text-align: right;
    padding: 12px !important;
}

.pos-diff-wrap {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 4px;
}

.pos-btn-guardar {
    width: 100%;
    padding: 17px;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #fff;
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: .01em;
    box-shadow: 0 8px 24px rgba(37,99,235,.35);
    transition: opacity .15s, transform .15s;
}

.pos-btn-guardar:hover {
    opacity: .92;
    transform: translateY(-1px);
}

.pos-btn-guardar:active {
    transform: translateY(0);
}

/* search results en oscuro */
body.pos-dark-page .pos-search-results {
    background: #161b27;
    border: 1px solid #2d3f55;
}

body.pos-dark-page .pos-search-item {
    color: #e2e8f0;
    border-bottom-color: #2d3f55;
}

body.pos-dark-page .pos-search-item:hover {
    background: #243447;
}

body.pos-dark-page .pos-mini-label {
    color: #7c8fa8;
}

body.pos-dark-page .pos-difference-bad {
    color: #ef4444;
}

body.pos-dark-page .pos-difference-ok {
    color: #22c55e;
}

/* últimas ventas en oscuro */
body.pos-dark-page .card-box {
    background: #161b27;
    border: 1px solid #2d3f55;
    box-shadow: none;
}

body.pos-dark-page .table {
    color: #94a3b8;
}

body.pos-dark-page .table thead th {
    color: #7c8fa8;
    border-color: #2d3f55;
}

body.pos-dark-page .table td {
    border-color: #2d3f55;
}

body.pos-dark-page .btn-outline-secondary {
    border-color: #2d3f55;
    color: #94a3b8;
}

body.pos-dark-page .btn-outline-dark {
    border-color: #94a3b8;
    color: #94a3b8;
}

body.pos-dark-page .text-center.text-muted {
    color: #94a3b8 !important;
}

/* select oscuro en branch form */
body.pos-dark-page .pos-branch-form .pos-select {
    background: #161b27;
    color: #94a3b8;
    border-color: #2d3f55;
}

.mt-1 { margin-top: 6px; }
.mt-2 { margin-top: 10px; }
.w-100 { width: 100%; }

/* ── Dashboard rediseño ──────────────────────────────────────────── */
.dash-wrap {
    max-width: 700px;
    margin: 0 auto;
    padding-bottom: 24px;
}

.dash-date {
    font-size: 11px;
    font-weight: 700;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: .07em;
    margin-bottom: 10px;
    padding: 0 2px;
}

/* Métricas */
.dash-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 8px;
}

.dash-metric {
    background: #fff;
    border-radius: 16px;
    padding: 13px;
    border: 0.5px solid #e5e7eb;
    position: relative;
    overflow: hidden;
}

.dash-metric-accent {
    position: absolute;
    top: 0; right: 0;
    width: 56px; height: 56px;
    border-radius: 0 16px 0 56px;
    opacity: .07;
}

.dash-metric-icon {
    width: 30px; height: 30px;
    border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 8px;
}

.dash-metric-label {
    font-size: 10px;
    font-weight: 700;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: 4px;
}

.dash-metric-val {
    font-size: 20px;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 3px;
}

.dash-metric-sub {
    font-size: 11px;
    color: #6b7280;
}

/* Cards */
.dash-card {
    background: #fff;
    border-radius: 16px;
    padding: 14px;
    border: 0.5px solid #e5e7eb;
    margin-bottom: 8px;
}

.dash-card-warn {
    border-color: #fcd34d;
    background: #fffbeb;
}

.dash-card-title {
    font-size: 12px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 12px;
}

.dash-card-title-warn {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #b45309;
}

/* Barras 7 días */
.dash-bars {
    display: flex;
    align-items: flex-end;
    gap: 5px;
    height: 90px;
    margin-bottom: 4px;
}

.dash-bar-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    height: 100%;
    justify-content: flex-end;
}

.dash-bar-val {
    font-size: 8px;
    color: #9ca3af;
    text-align: center;
    line-height: 1;
    min-height: 10px;
    white-space: nowrap;
    overflow: hidden;
}

.dash-bar {
    width: 100%;
    background: #e0f2fe;
    border-radius: 5px 5px 0 0;
    min-height: 4px;
    transition: background .2s;
}

.dash-bar.today {
    background: #0ea5e9;
}

.dash-bar-label {
    font-size: 9px;
    color: #9ca3af;
    text-align: center;
    line-height: 1.3;
    white-space: nowrap;
}

.dash-bar-label.today {
    color: #0ea5e9;
    font-weight: 700;
}

/* Formas de pago */
.dash-pay-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 9px;
}

.dash-pay-row:last-child { margin-bottom: 0; }

.dash-pay-label {
    font-size: 11px;
    color: #6b7280;
    width: 90px;
    flex-shrink: 0;
}

.dash-pay-bg {
    flex: 1;
    background: #f3f4f6;
    border-radius: 4px;
    height: 7px;
    overflow: hidden;
}

.dash-pay-fill {
    height: 100%;
    border-radius: 4px;
    transition: width .4s ease;
}

.dash-pay-amount {
    font-size: 12px;
    font-weight: 700;
    color: #111827;
    min-width: 52px;
    text-align: right;
}

/* Barberos */
.dash-barber-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 0;
    border-bottom: 0.5px solid #f3f4f6;
}

.dash-barber-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.dash-avatar {
    width: 34px; height: 34px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 800;
    color: #fff;
    flex-shrink: 0;
}

.dash-barber-info { flex: 1; }
.dash-barber-name { font-size: 13px; font-weight: 600; color: #111827; }
.dash-barber-sub  { font-size: 11px; color: #9ca3af; }
.dash-barber-commission { font-size: 13px; font-weight: 700; color: #111827; }

/* Productos */
.dash-product-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 0.5px solid #f3f4f6;
}

.dash-product-row:last-child { border-bottom: none; padding-bottom: 0; }

.dash-product-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: #d1d5db;
    flex-shrink: 0;
}

.dash-product-name { flex: 1; font-size: 12px; color: #374151; font-weight: 500; }
.dash-product-qty  { font-size: 11px; color: #6b7280; }
.dash-product-amount { font-size: 12px; font-weight: 700; color: #111827; min-width: 60px; text-align: right; }

/* Inventario bajo */
.dash-stock-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 0.5px solid #fde68a;
}

.dash-stock-row:last-child { border-bottom: none; padding-bottom: 0; }

.dash-stock-name   { font-size: 12px; font-weight: 600; color: #374151; }
.dash-stock-branch { font-size: 10px; color: #9ca3af; margin-top: 1px; }

.dash-stock-badge {
    font-size: 11px; font-weight: 700;
    color: #dc2626;
    background: #fee2e2;
    padding: 4px 9px;
    border-radius: 20px;
    white-space: nowrap;
}

/* Estados vacíos */
.dash-empty {
    font-size: 12px;
    color: #9ca3af;
    text-align: center;
    padding: 12px 0;
}

.dash-empty-ok {
    color: #16a34a;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* ── Dashboard dark ──────────────────────────────────────────────── */
body.pos-dark-page .dash-wrap {
    color: #e2e8f0;
}

body.pos-dark-page .dash-date {
    color: #94a3b8;
}

/* Métricas */
body.pos-dark-page .dash-metric {
    background: #161b27;
    border-color: #2d3f55;
}

body.pos-dark-page .dash-metric-label {
    color: #7c8fa8;
}

body.pos-dark-page .dash-metric-sub {
    color: #94a3b8;
}

/* Cards */
body.pos-dark-page .dash-card {
    background: #161b27;
    border-color: #2d3f55;
}

body.pos-dark-page .dash-card-warn {
    background: #1c1a10;
    border-color: #713f12;
}

body.pos-dark-page .dash-card-title {
    color: #94a3b8;
}

body.pos-dark-page .dash-card-title-warn {
    color: #fbbf24;
}

/* Barras 7 días */
body.pos-dark-page .dash-bar {
    background: #243447;
}

body.pos-dark-page .dash-bar.today {
    background: #3b82f6;
}

body.pos-dark-page .dash-bar-val {
    color: #7c8fa8;
}

body.pos-dark-page .dash-bar-label {
    color: #94a3b8;
}

body.pos-dark-page .dash-bar-label.today {
    color: #3b82f6;
}

/* Formas de pago */
body.pos-dark-page .dash-pay-label {
    color: #7c8fa8;
}

body.pos-dark-page .dash-pay-bg {
    background: #243447;
}

body.pos-dark-page .dash-pay-amount {
    color: #94a3b8;
}

body.pos-dark-page .dash-pay-row {
    border-color: #2d3f55;
}

/* Barberos */
body.pos-dark-page .dash-barber-row {
    border-bottom-color: #2d3f55;
}

body.pos-dark-page .dash-barber-name {
    color: #e2e8f0;
}

body.pos-dark-page .dash-barber-sub {
    color: #94a3b8;
}

body.pos-dark-page .dash-barber-commission {
    color: #f1f5f9;
}

/* Productos */
body.pos-dark-page .dash-product-row {
    border-bottom-color: #2d3f55;
}

body.pos-dark-page .dash-product-dot {
    background: #94a3b8;
}

body.pos-dark-page .dash-product-name {
    color: #94a3b8;
}

body.pos-dark-page .dash-product-qty {
    color: #7c8fa8;
}

body.pos-dark-page .dash-product-amount {
    color: #e2e8f0;
}

/* Inventario bajo */
body.pos-dark-page .dash-stock-row {
    border-bottom-color: #2d2006;
}

body.pos-dark-page .dash-stock-name {
    color: #fbbf24;
}

body.pos-dark-page .dash-stock-branch {
    color: #713f12;
}

body.pos-dark-page .dash-stock-badge {
    background: #450a0a;
    color: #fca5a5;
}

/* Vacíos */
body.pos-dark-page .dash-empty {
    color: #94a3b8;
}

body.pos-dark-page .dash-empty-ok {
    color: #166534;
}

/* Resumen total */
body.pos-dark-page .dash-sum-divider {
    border-top-color: #1e293b;
}

/* ── Contraste mejorado (tema oscuro) ───────────────────────────── */

/* Textos principales — blancos puros */
body.pos-dark-page .dash-metric-val,
body.pos-dark-page .dash-barber-name,
body.pos-dark-page .dash-barber-commission,
body.pos-dark-page .dash-product-amount,
body.pos-dark-page .dash-pay-amount,
body.pos-dark-page .dash-stock-name,
body.pos-dark-page .pos-sum-total-val,
body.pos-dark-page .pos-item-subtotal-val,
body.pos-dark-page .card-box h3,
body.pos-dark-page .card-box h2 {
    color: #f1f5f9;
}

/* Textos secundarios — gris claro visible */
body.pos-dark-page .dash-metric-sub,
body.pos-dark-page .dash-barber-sub,
body.pos-dark-page .dash-product-qty,
body.pos-dark-page .dash-bar-val,
body.pos-dark-page .pos-mini-label,
body.pos-dark-page .pos-field-label,
body.pos-dark-page .pos-section-label,
body.pos-dark-page .dash-section-label,
body.pos-dark-page small {
    color: #94a3b8;
}

/* Labels de pago — más visibles */
body.pos-dark-page .dash-pay-label {
    color: #cbd5e1;
    font-weight: 500;
}

body.pos-dark-page .dash-pay-amount {
    color: #e2e8f0;
    font-weight: 700;
}

/* Títulos de cards */
body.pos-dark-page .dash-card-title {
    color: #cbd5e1;
    font-weight: 700;
}

/* Barras de pago vacías — más visibles */
body.pos-dark-page .dash-pay-bg {
    background: #2d3f55;
    border-radius: 4px;
}

/* Etiquetas de barras del chart */
body.pos-dark-page .dash-bar-label {
    color: #64748b;
    font-weight: 500;
}

body.pos-dark-page .dash-bar-label.today {
    color: #60a5fa;
    font-weight: 700;
}

/* Filas de suma */
body.pos-dark-page .dash-sum-row span,
body.pos-dark-page .pos-sum-row span {
    color: #94a3b8;
}

/* Tabla últimas ventas */
body.pos-dark-page .table {
    color: #cbd5e1;
}

body.pos-dark-page .table thead th {
    color: #94a3b8;
    border-color: #2d3f55;
}

body.pos-dark-page .table td {
    border-color: #1e293b;
    color: #cbd5e1;
}

/* Fecha del dashboard */
body.pos-dark-page .dash-date {
    color: #64748b;
    font-weight: 700;
}

/* Bordes más visibles */
body.pos-dark-page .dash-card,
body.pos-dark-page .dash-metric,
body.pos-dark-page .pos-section,
body.pos-dark-page .pos-summary,
body.pos-dark-page .pos-item-card {
    border-color: #2d3f55;
}

/* Inputs más legibles */
body.pos-dark-page .pos-input,
body.pos-dark-page .pos-select {
    color: #e2e8f0;
    border-color: #2d3f55;
}

body.pos-dark-page .pos-input::placeholder {
    color: #4a5568;
}

/* Branch badge */
body.pos-dark-page .pos-branch-badge {
    background: #1e293b;
    color: #94a3b8;
    border: 1px solid #2d3f55;
}

/* Nombre del barbero en el topbar */
body.pos-dark-page .app-title {
    color: #f1f5f9;
}

body.pos-dark-page .topbar small,
body.pos-dark-page .text-muted {
    color: #64748b !important;
}

/* ── Dark Kit — componentes reutilizables ────────────────────────── */
.dk-wrap {
    max-width: 700px;
    margin: 0 auto;
    padding-bottom: 24px;
}

.dk-page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    gap: 12px;
}

.dk-page-title {
    font-size: 22px;
    font-weight: 800;
    color: #f1f5f9;
    line-height: 1.1;
    margin: 0;
}

.dk-page-sub {
    font-size: 12px;
    color: #64748b;
    margin: 3px 0 0;
}

.dk-total-badge {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    font-size: 10px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .06em;
    white-space: nowrap;
}

.dk-total-badge span {
    font-size: 20px;
    font-weight: 800;
    color: #22c55e;
    letter-spacing: -.5px;
}

/* Cards */
.dk-card {
    background: #161b27;
    border-radius: 20px;
    padding: 18px;
    border: 1px solid #2d3f55;
    margin-bottom: 8px;
}

.dk-card-label {
    font-size: 10px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: 14px;
}

/* Formulario */
.dk-form { display: flex; flex-direction: column; gap: 0; }

.dk-form-grid3 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 10px;
    margin-bottom: 14px;
}

@media (min-width: 500px) {
    .dk-form-grid3 {
        grid-template-columns: repeat(3, minmax(0,1fr));
    }
}

.dk-field {
    display: flex;
    flex-direction: column;
}

.dk-label {
    font-size: 10px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: 6px;
}

.dk-input {
    background: #0f1117;
    border: 1px solid #2d3f55;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 14px;
    color: #e2e8f0;
    outline: none;
    width: 100%;
    transition: border-color .2s;
}

.dk-input:focus { border-color: #3b82f6; }
.dk-input::placeholder { color: #334155; }

.dk-input-amount {
    font-size: 18px;
    font-weight: 700;
    text-align: right;
    color: #f1f5f9;
}

.dk-select {
    background: #0f1117;
    border: 1px solid #2d3f55;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 13px;
    color: #94a3b8;
    outline: none;
    width: 100%;
    cursor: pointer;
    transition: border-color .2s;
}

.dk-select:focus { border-color: #3b82f6; }

/* Botones */
.dk-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(37,99,235,.3);
    transition: opacity .15s, transform .15s;
}

.dk-btn-primary:hover { opacity: .9; transform: translateY(-1px); }
.dk-btn-primary:active { transform: translateY(0); }

.dk-btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: 100%;
    padding: 12px;
    background: none;
    color: #94a3b8;
    border: 1px solid #2d3f55;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color .15s, color .15s;
}

.dk-btn-ghost:hover { border-color: #94a3b8; color: #e2e8f0; }

/* Filas de gastos */
.dk-expense-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #1e293b;
}

.dk-expense-row:last-of-type { border-bottom: none; }

.dk-expense-icon {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: #1e293b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.dk-expense-info { flex: 1; min-width: 0; }

.dk-expense-cat {
    font-size: 14px;
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 2px;
}

.dk-expense-meta {
    font-size: 11px;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dk-expense-right {
    text-align: right;
    flex-shrink: 0;
}

.dk-expense-amount {
    font-size: 15px;
    font-weight: 700;
    color: #f1f5f9;
}

.dk-expense-date {
    font-size: 11px;
    color: #475569;
    margin-top: 2px;
}

.dk-expense-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0 0;
    margin-top: 8px;
    border-top: 1px solid #2d3f55;
    font-size: 14px;
    font-weight: 700;
    color: #94a3b8;
}

.dk-expense-total-row span:last-child {
    font-size: 18px;
    color: #22c55e;
}

.dk-empty {
    font-size: 13px;
    color: #334155;
    text-align: center;
    padding: 20px 0;
}

/* ── Dark Kit — extras adelantos ─────────────────────────────────── */
.dk-form-grid2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.dk-hint {
    font-size: 10px;
    color: #475569;
    margin-top: 4px;
}

/* Stats semana */
.dk-stat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 8px;
    margin-bottom: 8px;
}

.dk-stat {
    background: #161b27;
    border: 1px solid #2d3f55;
    border-radius: 14px;
    padding: 14px;
}

.dk-stat-label {
    font-size: 10px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: 6px;
}

.dk-stat-val {
    font-size: 20px;
    font-weight: 800;
    color: #f1f5f9;
    letter-spacing: -.5px;
}

/* Filas de adelantos */
.dk-advance-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #1e293b;
}

.dk-advance-row:last-child { border-bottom: none; padding-bottom: 0; }

.dk-advance-avatar {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: #1e293b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 800;
    color: #94a3b8;
    flex-shrink: 0;
}

.dk-advance-info { flex: 1; min-width: 0; }

.dk-advance-name {
    font-size: 14px;
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 2px;
}

.dk-advance-meta {
    font-size: 11px;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dk-advance-right {
    text-align: right;
    flex-shrink: 0;
}

.dk-advance-amount {
    font-size: 16px;
    font-weight: 700;
    color: #f59e0b;
    margin-bottom: 3px;
}

.dk-edit-link {
    font-size: 11px;
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
}

.dk-edit-link:hover { color: #60a5fa; }