/* Shared Tienda M&L theme: forest green, warm neutrals, and clear account balances. */
:root {
    --primary-color: #176c50;
    --sidebar-bg: #152f29;
    --sidebar-width: 238px;
    --bg-light: #f4f6f3;
    --text-dark: #182a29;
    --border-color: #e3e9e1;
    --success-color: #347554;
    --warning-color: #ad792b;
    --danger-color: #b45245;
    --info-color: #497c83;
    --bs-primary-rgb: 23, 108, 80;
    --bs-success-rgb: 52, 117, 84;
    --bs-warning-rgb: 173, 121, 43;
    --bs-danger-rgb: 180, 82, 69;
    --bs-info-rgb: 73, 124, 131;
    --bs-link-color: #176c50;
    --bs-link-hover-color: #104f3a;
}
body.store-theme { background: var(--bg-light); color: var(--text-dark); font-family: 'Manrope', 'Segoe UI', sans-serif; }
.store-theme .sidebar { background: var(--sidebar-bg); color: #bbd0c5; border: 0; padding: 28px 18px 16px; box-shadow: none; }
.store-theme .sidebar-brand { padding: 8px 7px; gap: 10px; margin-bottom: 24px; }
.store-theme .sidebar-brand-icon { width: 36px; height: 36px; border-radius: 10px; background: #c6ed9a; color: #1e432e; font-size: 14px; font-weight: 800; box-shadow: none; }
.store-theme .sidebar-brand-text { color: #f4f8ef; font-size: 22px; font-weight: 800; letter-spacing: -0.8px; }
.brand-caption { display: block; margin-top: 5px; color: #95afa0; font-size: 8px; letter-spacing: 2px; font-weight: 600; }
.sidebar-label { color: #98b4a4; font-size: 9px; font-weight: 700; letter-spacing: 1.8px; padding: 0 14px; margin: 5px 0 14px; }
.store-theme .sidebar .nav-link { color: #b5cbbf; border: 1px solid transparent; padding: 12px 13px; font-size: 12px; border-radius: 9px; box-shadow: none; min-height: 43px; margin-bottom: 5px; }
.store-theme .sidebar .nav-link:hover { background: #203e33; border-color: transparent; color: #eff8e6; }
.store-theme .sidebar .nav-link.active { background: #2c493d; color: #dcf8b7; box-shadow: none; }
.store-theme .sidebar .nav-link i { font-size: 16px; }
.store-theme .sidebar .nav-count { background: #c6ed9a; color: #254431; border-radius: 5px; font-size: 10px; }
.store-theme .user-info { border-color: #365043; padding: 18px 6px 0; margin-top: 26px; }
.store-theme .user-avatar { background: #c5d8c5; color: #254331; box-shadow: none; width: 35px; height: 35px; }
.store-theme .user-name { color: #ecf2eb; font-size: 12px; overflow-wrap: anywhere; }
.store-theme .user-role, .store-theme .btn-logout { color: #a5c1af; font-size: 11px; }
.store-theme .btn-logout { font-size: 18px; padding: 6px; }
.store-theme .main-content { padding: 0 !important; }
.app-topbar { background: #fff; border-bottom: 1px solid var(--border-color); min-height: 76px; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 38px; color: #718176; font-size: 11px; }
.app-topbar strong { color: #2c4236; font-weight: 700; }
.topbar-status { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.online-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #57945a; }
.store-theme .content-shell { padding: 34px 38px 42px; max-width: 1560px; }
.store-theme .page-header { border: 0; background: transparent; box-shadow: none; border-radius: 0; padding: 0; margin-bottom: 26px; }
.store-theme .page-title { font-size: clamp(23px, 2.2vw, 30px); letter-spacing: -1px; font-weight: 800; line-height: 1.3; }
.store-theme .page-title > i { font-size: 22px; }
.store-theme .page-subtitle { font-size: 12px; color: #6c7e70; max-width: 760px; line-height: 1.8; }
.theme-eyebrow { font-size: 9px; font-weight: 800; letter-spacing: 1.8px; color: #70816a; margin-bottom: 10px; text-transform: uppercase; }
.store-theme .section-card, .store-theme .card, .store-theme .stat-card, .store-theme .app-card, .store-theme .table-container { background: #fff; border: 1px solid var(--border-color); border-radius: 14px; box-shadow: none; }
.store-theme .card-header { background: transparent; border-color: #e9eee5; padding: 22px 24px; border-radius: 14px 14px 0 0; }
.store-theme .card-footer { background: #fcfdfb; border-color: #e9eee5; padding: 16px 24px; }
.store-theme .card-header h5, .store-theme .card-header h6 { font-weight: 800; margin-bottom: 5px; }
.store-theme .stat-card { padding: 23px; }
.store-theme .stat-card:hover { transform: none; box-shadow: 0 4px 15px #18332706; }
.store-theme .stat-label, .store-theme .metric-chip-label { color: #6d7e71; font-size: 11px; }
.store-theme .stat-value { font-size: clamp(24px, 2.4vw, 32px); font-weight: 800; letter-spacing: -1px; line-height: 1.3; overflow-wrap: anywhere; }
.store-theme .stat-icon, .store-theme .feature-icon { width: 38px; height: 38px; font-size: 18px; border-radius: 10px; flex-shrink: 0; }
.store-theme .metric-strip { gap: 18px; margin-bottom: 26px !important; }
.store-theme .metric-chip { border: 1px solid var(--border-color); box-shadow: none; border-radius: 13px; padding: 22px 24px; gap: 14px; align-items: flex-start; }
.store-theme .metric-chip-value { font-size: clamp(22px, 2.3vw, 30px); letter-spacing: -0.8px; font-weight: 800; margin-top: 12px; overflow-wrap: anywhere; }
.store-theme .metric-chip > i { background: #edf3e7; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; font-size: 17px !important; flex-shrink: 0; }
.store-theme .muted-label { font-size: 9px; color: #72816c; letter-spacing: 1.3px; margin-bottom: 5px; }
.store-theme .text-muted { color: #718073 !important; }
.store-theme .btn { border-radius: 8px !important; font-weight: 600; font-size: 12px; padding: 10px 16px; box-shadow: none; transition: background-color .15s, border-color .15s; }
.store-theme .btn-sm { padding: 7px 10px; font-size: 11px; }
.store-theme .btn-primary { --bs-btn-bg: #176c50; --bs-btn-border-color: #176c50; background: #176c50; border: 1px solid #176c50; color: #fff; }
.store-theme .btn-primary:hover, .store-theme .btn-primary:active { background: #104f3a; border-color: #104f3a; transform: none; box-shadow: none; }
.store-theme .btn-secondary { background: #f1f4ed; color: #435c49; border: 1px solid #e0e7d9; }
.store-theme .btn-secondary:hover { background: #e5ecdf; color: #294831; }
.store-theme .btn-outline-primary { --bs-btn-color: #176c50; --bs-btn-border-color: #cadaca; --bs-btn-hover-bg: #176c50; --bs-btn-hover-border-color: #176c50; --bs-btn-active-bg: #176c50; --bs-btn-active-border-color: #176c50; }
.store-theme .btn-success { --bs-btn-bg: #347554; --bs-btn-border-color: #347554; --bs-btn-hover-bg: #285f43; --bs-btn-hover-border-color: #285f43; }
.store-theme .btn-danger { --bs-btn-bg: #b45245; --bs-btn-border-color: #b45245; --bs-btn-hover-bg: #963e34; --bs-btn-hover-border-color: #963e34; }
.store-theme .btn-warning { --bs-btn-bg: #f1e4c5; --bs-btn-border-color: #e9d7ad; --bs-btn-color: #73511b; --bs-btn-hover-bg: #e9d7ad; --bs-btn-hover-border-color: #dac18b; }
.store-theme .btn-info { --bs-btn-bg: #e9f1ed; --bs-btn-border-color: #d5e3db; --bs-btn-color: #38664c; --bs-btn-hover-bg: #d5e3db; --bs-btn-hover-border-color: #b8d0c2; }
.store-theme .quick-nav { gap: 6px; background: #edf1e8; border: 1px solid #e3e9dc; border-radius: 10px; padding: 5px; width: fit-content; max-width: 100%; }
.store-theme .quick-link { min-width: auto; flex-direction: row; padding: 9px 14px; gap: 7px; background: transparent; color: #66765c; border: 1px solid transparent; box-shadow: none; font-size: 11px; border-radius: 7px; white-space: nowrap; }
.store-theme .quick-link.active { background: #fff; border-color: #e6ebdf; color: #315238; box-shadow: 0 1px 4px #25351b08; }
.store-theme .quick-link:hover { background: #f9fcf5; border-color: #dbe5d3; color: #315238; }
.store-theme .quick-link .quick-link-icon { height: auto; width: auto; background: transparent; color: inherit; font-size: 14px; }
.store-theme .table { --bs-table-color: #2b3f33; --bs-table-bg: transparent; --bs-table-hover-bg: #f7faf4; }
.store-theme .table thead th { background: #f8faf5; border-color: #e9eee3; color: #73826a; font-size: 10px; letter-spacing: .7px; font-weight: 700; padding: 14px 20px; }
.store-theme .table tbody td { border-color: #edf1e8; font-size: 12px; padding: 18px 20px; }
.store-theme .table tbody tr:hover { background: #fafcf7; }
.store-theme .status-badge { text-transform: none; letter-spacing: 0; font-size: 10px; padding: 6px 9px; display: inline-block; border-radius: 6px !important; }
.store-theme .status-badge.asignada { background: #eff3e6; color: #5b7637; }
.store-theme .status-badge.en_proceso { background: #eeeef4; color: #696281; }
.store-theme .status-badge.entregada, .store-theme .status-badge.pagada { background: #e4f1e8; color: #337051; }
.store-theme .status-badge.cancelada { background: #f9ece7; color: #a45946; }
.store-theme .status-badge.pendiente { background: #f8efda; color: #8c682b; }
.store-theme .status-badge.impresa { background: #e8f0f2; color: #4a717c; }
.store-theme .form-control, .store-theme .form-select { border-color: #dce5d6; color: #2c4032; font-size: 12px; min-height: 40px; background-color: #fff; }
.store-theme .form-control:focus, .store-theme .form-select:focus { border-color: #73a480; box-shadow: 0 0 0 3px #176c5014; }
.store-theme .form-control.is-invalid, .store-theme .form-select.is-invalid { border-color: #b45245; }
.store-theme .form-label { font-size: 12px; color: #4b604d; }
.store-theme .form-check-input:checked { background-color: #176c50; border-color: #176c50; }
.store-theme .input-group-text { background: #f3f6ee; border-color: #dce5d6; color: #667c5b; }
.store-theme .modal-content { border-radius: 16px !important; box-shadow: 0 24px 80px #152f2930; }
.store-theme .modal-header { background: #f8faf5; border-radius: 16px 16px 0 0; }
.store-theme .modal-title { font-size: 17px; font-weight: 800; }
.store-theme .modal-footer { border-color: var(--border-color); }
.store-theme .modal-backdrop { --bs-backdrop-bg: #10281f; }
.store-theme .alert { border-radius: 10px; font-size: 12px; }
.store-theme .alert-success { background: #e9f4e9; color: #316342; border-color: #d3e5d1; }
.store-theme .alert-warning { background: #fbf3df; color: #856229; border-color: #eee0b8; }
.store-theme .alert-danger { background: #faede9; color: #964f42; border-color: #edd4cc; }
.store-theme .page-link { color: #386247; border-color: #dce5d6; }
.store-theme .active > .page-link { background: #176c50; border-color: #176c50; color: #fff; }
.store-theme .progress { background: #edf2e7; border-radius: 10px; }
.store-theme .seller-note { background: #f0f4e9; border-color: #dce6cd; color: #536b3e; }
.store-theme .whatsapp-link { color: #176c50; }
.delivery-balance { border: 1px solid #dce6d3; border-radius: 17px; background: #e7eedf; display: grid; grid-template-columns: 1.1fr 1fr; overflow: hidden; margin-bottom: 26px; }
.delivery-balance-copy { padding: 27px 29px; }
.delivery-balance h2 { font-size: 21px; font-weight: 800; letter-spacing: -.6px; margin: 7px 0 10px; }
.delivery-balance p { font-size: 12px; color: #62745b; line-height: 1.8; max-width: 420px; margin-bottom: 0; }
.delivery-balance-values { background: #dfe9d6; padding: 25px; display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 20px; }
.delivery-balance-values > div + div { border-left: 1px solid #c5d5bb; padding-left: 20px; }
.delivery-balance-values small { display: block; color: #536c48; font-size: 11px; margin-bottom: 8px; }
.delivery-balance-values strong { display: block; font-size: clamp(18px, 2vw, 27px); font-weight: 800; letter-spacing: -.8px; overflow-wrap: anywhere; }
.store-theme .auth-shell { background: radial-gradient(ellipse at top left, #dfead4, transparent 60%), #f4f6f3; }
.store-theme .auth-panel { border: 1px solid #dce5d6; border-radius: 20px; padding: 34px; box-shadow: 0 20px 70px #152f2910; }
.store-theme .auth-logo { background: #176c50; border-radius: 12px; box-shadow: none; }
.store-theme .auth-brand h1 { letter-spacing: -1px; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid #8eba68; outline-offset: 3px; }
@media (min-width: 993px) { .store-theme .sidebar .user-info { margin-top: auto; padding-top: 20px; } }
@media (max-width: 1200px) { .store-theme .content-shell { padding: 28px 24px; } .app-topbar { padding-inline: 24px; } .delivery-balance { grid-template-columns: 1fr; } .delivery-balance-values { padding: 22px 29px; } }
@media (max-width: 992px) {
    .store-theme .main-content { padding: 0 !important; }
    .app-topbar { min-height: 76px; padding-left: 72px; }
    .store-theme .mobile-menu-btn { top: 18px; left: 18px; border-color: #dce5d6; padding: 6px 9px; box-shadow: none; color: #31573d; z-index: 1101; }
    .store-theme .content-shell { padding: 26px 20px; }
    .store-theme .metric-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
    .store-theme .metric-chip { padding: 17px 13px; }
    .store-theme .metric-chip > i { display: none; }
    .store-theme .metric-chip-value { font-size: 22px; }
    .store-theme .table.table-compact tbody tr { padding: 17px; }
    .store-theme .table.table-compact tbody td { padding: 7px 0; }
    .store-theme .table.table-compact tbody td::before { color: #6f8068; font-size: 10px; }
    .store-theme .table-actions { gap: 8px; }
    .store-theme .sidebar.show { padding-top: 72px; }
}
@media (max-width: 576px) {
    .store-theme .content-shell { padding: 24px 16px; }
    .app-topbar { padding-right: 16px; gap: 8px; font-size: 10px; }
    .topbar-status .topbar-date { display: none; }
    .store-theme .page-title { font-size: 24px; }
    .store-theme .stat-card { padding: 18px; }
    .store-theme .page-header .stack-mobile { align-items: flex-start; gap: 16px; }
    .store-theme .page-header .btn { font-size: 11px; }
    .store-theme .metric-chip { padding: 14px 10px; }
    .store-theme .metric-chip-value { font-size: 19px; letter-spacing: -.5px; }
    .store-theme .metric-chip-label { font-size: 10px; }
    .delivery-balance-copy { padding: 22px; }
    .delivery-balance h2 { font-size: 20px; }
    .delivery-balance-values { gap: 14px; padding: 20px; }
    .delivery-balance-values > div + div { padding-left: 14px; }
    .delivery-balance-values strong { font-size: 20px; }
    .delivery-balance-values small { font-size: 10px; }
    .store-theme .card-header { padding: 18px; }
    .store-theme .quick-link { padding: 9px 11px; }
    .store-theme .auth-panel { padding: 25px; }
}
@media (prefers-reduced-motion: reduce) { .store-theme *, .store-theme *::before, .store-theme *::after { animation: none !important; transition: none !important; } }
@media print {
    .store-theme .sidebar, .app-topbar, .store-theme .mobile-menu-btn, .store-theme .quick-nav { display: none !important; }
    .store-theme .main-content { width: 100% !important; margin: 0 !important; }
    .store-theme .content-shell { padding: 0; max-width: none; }
    .store-theme { background: #fff; }
}
/* Keep dialogs above navigation on every role and compact tables inside mobile cards. */
.store-theme .modal { z-index: 1300; }
.store-theme .modal-backdrop { z-index: 1290; }
@media (max-width: 992px) {
    .store-theme .table.table-compact { display: block; width: 100%; }
    .store-theme .table.table-compact tbody { display: block; width: 100%; }
    .store-theme .table.table-compact tbody td > * { min-width: 0; overflow-wrap: anywhere; }
    .store-theme .table.table-compact tbody td { min-width: 0; }
}
.store-theme .stat-card > .d-flex { position: relative; }
.store-theme .stat-card > .d-flex > div:first-child { width: 100%; min-width: 0; }
.store-theme .stat-card .stat-label { min-height: 33px; padding-right: 42px; }
.store-theme .stat-card .stat-icon { position: absolute; top: 0; right: 0; background: #edf3e7; color: #607c4a; }
.store-theme .stat-card .stat-value { font-size: clamp(23px, 2vw, 29px); margin-top: 10px; }
.store-theme .status-tile { border-radius: 10px; }
.store-theme .status-warning { background: #f8efda; }
.store-theme .status-info { background: #e8f0f2; }
.store-theme .status-process { background: #eeeef4; }
.store-theme .status-primary { background: #eff3e6; }
.store-theme .status-success { background: #e4f1e8; }
.store-theme .status-danger { background: #f9ece7; }
.store-theme .shipping-total { background: #f5f8ef; border-color: #dce5d6; }
.store-theme .shipping-total strong { color: #176c50; }
