/* Cookep brand guide: a visual layer over the existing dashboard components. */
@font-face {
    font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 400 800; font-display: swap;
    src: url('../fonts/plus-jakarta-sans/latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 400 800; font-display: swap;
    src: url('../fonts/plus-jakarta-sans/latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
body.cookep-theme {
    --cookep-font: 'Plus Jakarta Sans', sans-serif;
    /* Violet scale from cookep-ops-frontend/src/styles/colors_and_type.css (V2). */
    --cookep-violet-950: #1e0a5c;
    --cookep-violet-900: #2e1065;
    --cookep-violet-800: #3f1b9c;
    --cookep-violet-700: #4c1d95;
    --cookep-violet-600: #6d28d9;
    --cookep-violet-500: #7c3aed;
    --cookep-violet-400: #a78bfa;
    --cookep-violet-300: #c4b5fd;
    --cookep-violet-200: #c7b6fd;
    --cookep-violet-100: #ede9fe;
    --cookep-violet-50: #f5f3ff;
    --cookep-violet-rgb: 63, 27, 156;
    --cookep-violet: var(--cookep-violet-800);
    --cookep-violet-dark: var(--cookep-violet-700);
    --cookep-lavender: var(--cookep-violet-100);
    --cookep-lavender-subtle: var(--cookep-violet-50);
    --cookep-violet-border: var(--cookep-violet-300);
    --cookep-ink: #0f0f10;
    --cookep-muted: #6b7280;
    --cookep-line: #e5e7eb;
    --cookep-background: #fafafb;
    --cookep-success: #168344;
    --cookep-shadow: 0 3px 14px rgba(15, 15, 16, .045);
    --qk-ink: var(--cookep-ink);
    --qk-muted: var(--cookep-muted);
    --qk-brand: var(--cookep-violet);
    --qk-brand-light: var(--cookep-lavender);
    background: var(--cookep-background); color: #374151; min-height: 100vh;
    font-family: var(--cookep-font); font-size: 14px;
    -webkit-font-smoothing: antialiased;
}
body.cookep-theme .wrapper,
body.cookep-theme .wrapper :is(h1, h2, h3, h4, h5, h6, p, label, button, input, select, textarea, th, td),
body.cookep-theme .modal :is(h1, h2, h3, h4, h5, h6, p, label, button, input, select, textarea),
body.cookep-theme .qk-topbar :is(button, strong, small),
body.cookep-theme .qk-sidebar { font-family: var(--cookep-font); }
body.cookep-theme :is(h1, h2, h3, h4, h5, h6) { color: var(--cookep-ink); font-weight: 700; letter-spacing: -.025em; }
body.cookep-theme .wrapper h3 .badge-secondary { background: none; padding: 0; color: var(--cookep-ink); font-size: 22px; line-height: 1.4; font-weight: 700; }
body.cookep-theme .page-title-box .page-title { font-size: 24px; color: var(--cookep-ink); }
body.cookep-theme .text-muted { color: var(--cookep-muted) !important; }
body.cookep-theme .text-primary { color: var(--cookep-violet) !important; }
body.cookep-theme .wrapper a:not(.btn):not(.page-link):not(.dropdown-item) { color: var(--cookep-violet); }
body.cookep-theme .wrapper :is(label, .col-form-label) { font-weight: 600; }

/* Existing navigation geometry and collapse behavior remain unchanged. */
body.cookep-theme #topnav.qk-topbar,
body.cookep-theme #topnav .topbar-main { background: #fff; border-bottom: 1px solid var(--cookep-line); box-shadow: 0 2px 12px rgba(15, 15, 16, .035); }
body.cookep-theme .qk-icon-button { color: #6b7280; }
body.cookep-theme .qk-icon-button:hover { color: var(--cookep-violet); background: var(--cookep-lavender); }
body.cookep-theme .qk-nav-toggle { color: var(--cookep-violet); border-color: #e5e7eb; background: #fff; }
body.cookep-theme .qk-nav-toggle[aria-expanded='true'],
body.cookep-theme .qk-activity-toggle[aria-expanded='true'] { color: var(--cookep-violet); background: var(--cookep-lavender); border-color: var(--cookep-violet-border); }
body.cookep-theme .qk-icon-button:focus-visible,
body.cookep-theme .qk-profile-button:focus-visible,
body.cookep-theme .qk-system-status:focus-visible { outline-color: var(--cookep-violet); }
body.cookep-theme .qk-system-ok { color: #187044; background: #edf8f0; border-color: #d0eada; }
body.cookep-theme .qk-system-warning { color: #946007; background: #fff7e5; border-color: #f2dfb4; }
body.cookep-theme .qk-activity-badge { border-color: #fff; background: #dc2626; }
body.cookep-theme .qk-profile-button { color: var(--cookep-ink); border-left-color: var(--cookep-line); }
body.cookep-theme .qk-account-label small,
body.cookep-theme .qk-profile-button > .qk-svg-icon { color: var(--cookep-muted); }
body.cookep-theme .qk-profile-button img { outline: 1px solid var(--cookep-line); outline-offset: 2px; }
body.cookep-theme .qk-sidebar { border-right-color: var(--cookep-line); }
body.cookep-theme .qk-sidebar-header { border-bottom-color: #e5e7eb; }
body.cookep-theme .qk-sidebar-header strong { font-size: 18px; }
body.cookep-theme .qk-sidebar-eyebrow { color: #9ca3af; letter-spacing: .08em; }
body.cookep-theme .qk-nav-link,
body.cookep-theme .qk-nav-group > summary { color: #6b7280; }
body.cookep-theme .qk-nav-link > .qk-svg-icon,
body.cookep-theme .qk-nav-group > summary > .qk-svg-icon { color: #6b7280; }
body.cookep-theme .qk-nav-link:hover,
body.cookep-theme .qk-nav-group > summary:hover,
body.cookep-theme .qk-nav-children a:hover { color: var(--cookep-ink); background: #f3f4f6; }
body.cookep-theme .qk-nav-link.active,
body.cookep-theme .qk-nav-group.active > summary,
body.cookep-theme .qk-nav-children a.active { color: var(--cookep-violet-dark); background: var(--cookep-lavender); }
body.cookep-theme .qk-nav-link.active > .qk-svg-icon,
body.cookep-theme .qk-nav-group.active > summary > .qk-svg-icon { color: var(--cookep-violet); }
body.cookep-theme .qk-nav-children { border-left-color: #e5e7eb; }
body.cookep-theme .qk-nav-children a { color: #6b7280; }
body.cookep-theme .qk-nav-children a.active { color: var(--cookep-violet); background: var(--cookep-lavender-subtle); }
body.cookep-theme .qk-nav-children a.active:before { background: var(--cookep-violet); }
body.cookep-theme .qk-sidebar-settings { background: #f9fafb; border-color: #e5e7eb; color: #6b7280; }
body.cookep-theme .qk-sidebar-settings > .qk-svg-icon { color: var(--cookep-violet); }
body.cookep-theme .qk-sidebar-settings small { color: var(--cookep-muted); }
body.cookep-theme .qk-menu-switch input:checked + span { background: var(--cookep-violet); }
body.cookep-theme .qk-menu-switch input:focus-visible + span { outline-color: var(--cookep-violet); }
body.cookep-theme .qk-menu-settings-header h2 { font-weight: 700; }
body.cookep-theme .qk-menu-settings-name { color: #374151; }
body.cookep-theme .qk-menu-settings-group { border-color: var(--cookep-line); }
body.cookep-theme .qk-activity-panel { border-color: var(--cookep-line); box-shadow: 0 16px 40px rgba(15, 15, 16, .12); }
body.cookep-theme #topnav:not(.qk-topbar) .navigation-menu > li > a { color: #6b7280; }
body.cookep-theme #topnav:not(.qk-topbar) .navigation-menu > li.active > a { color: var(--cookep-violet); }
body.cookep-theme #topnav .notification-list .nav-link { color: #6b7280; }
body.cookep-theme #topnav .navbar-toggle span { background-color: var(--cookep-violet); }
body.cookep-theme #topnav .navbar-toggle:hover span { background-color: var(--cookep-violet-dark); }
body.cookep-theme #topnav .navigation-menu > li:hover > a,
body.cookep-theme #topnav .navigation-menu > li:hover > a i { color: var(--cookep-violet); }
body.cookep-theme #topnav .navigation-menu .submenu { border-color: var(--cookep-line); border-radius: 10px; box-shadow: 0 8px 24px rgba(15, 15, 16, .09); }

/* Cards, forms, buttons and table surfaces share the brand palette. */
body.cookep-theme .wrapper .card,
body.cookep-theme .accountbg .card { border: 1px solid var(--cookep-line); border-radius: 16px; box-shadow: var(--cookep-shadow); background: #fff; }
body.cookep-theme .wrapper .card-header { background: #f9fafb; border-bottom-color: var(--cookep-line); }
body.cookep-theme .wrapper .card-body { color: #374151; }
body.cookep-theme .form-control,
body.cookep-theme .bootstrap-select > .dropdown-toggle { border-color: #d1d5db; border-radius: 8px; color: #374151; background-color: #fff; font-size: 13px; box-shadow: none; }
body.cookep-theme .form-control:focus,
body.cookep-theme .bootstrap-select > .dropdown-toggle:focus { border-color: var(--cookep-violet); box-shadow: 0 0 0 3px rgba(var(--cookep-violet-rgb), .08); }
body.cookep-theme .form-control[readonly] { color: #374151; }
body.cookep-theme .form-control:disabled { color: #9ca3af; background-color: #f3f4f6; }
body.cookep-theme .btn { font-family: var(--cookep-font); border-radius: 8px; font-size: 13px; font-weight: 600; letter-spacing: 0; transition: background-color .15s, border-color .15s, box-shadow .15s; }
body.cookep-theme .btn-primary,
body.cookep-theme .btn-primary:focus { background: var(--cookep-violet); border-color: var(--cookep-violet); color: #fff; }
body.cookep-theme .btn-primary:hover,
body.cookep-theme .btn-primary:not(:disabled):not(.disabled).active,
body.cookep-theme .show > .btn-primary.dropdown-toggle { background: var(--cookep-violet-dark); border-color: var(--cookep-violet-dark); }
body.cookep-theme .btn-primary:not(:disabled):not(.disabled):active { background: var(--cookep-violet-900); border-color: var(--cookep-violet-900); }
body.cookep-theme .btn-outline-primary { background: #fff; color: var(--cookep-violet); border-color: var(--cookep-violet); }
body.cookep-theme .btn-outline-primary:hover,
body.cookep-theme .btn-outline-primary:not(:disabled):not(.disabled).active { background: var(--cookep-violet); color: #fff; border-color: var(--cookep-violet); }
body.cookep-theme .btn-secondary { background: #f9fafb; color: #374151; border-color: #d1d5db; }
body.cookep-theme .btn-secondary:hover { background: #f3f4f6; border-color: #9ca3af; color: #111827; }
body.cookep-theme .btn-success { background: #168344; border-color: #168344; color: #fff; }
body.cookep-theme .btn-danger { background: #dc2626; border-color: #dc2626; color: #fff; }
body.cookep-theme .btn-warning { color: #875b0e; background: #fff3d5; border-color: #f1d895; }
body.cookep-theme .btn-success:hover { background: #126c38; border-color: #126c38; }
body.cookep-theme .btn-danger:hover { background: #b91c1c; border-color: #b91c1c; }
body.cookep-theme .btn-warning:hover { background: #ffe9b5; border-color: #e7c879; }
body.cookep-theme .btn-link { color: var(--cookep-violet); }
body.cookep-theme .btn:focus-visible { outline: 2px solid var(--cookep-violet); outline-offset: 3px; }
body.cookep-theme .btn:disabled,
body.cookep-theme .btn.disabled { opacity: .55; }
body.cookep-theme .dt-buttons .btn { background: #fff; border: 1px solid #d1d5db; color: #374151; box-shadow: none; border-radius: 8px; }
body.cookep-theme .dt-buttons .btn:hover { color: var(--cookep-violet); border-color: var(--cookep-violet); background: var(--cookep-lavender); }
body.cookep-theme .label-for-file-input-custom { border-radius: 8px; background: var(--cookep-lavender); color: var(--cookep-violet); border-color: var(--cookep-violet-border); font-size: 13px; font-weight: 600; }
body.cookep-theme .wrapper .table { color: #374151; font-size: 13px; }
body.cookep-theme .wrapper .table th { color: #374151; background: #f9fafb; border-color: var(--cookep-line); font-weight: 600; }
body.cookep-theme .wrapper .table td { border-color: #e5e7eb; }
body.cookep-theme .wrapper .table-striped tbody tr:nth-of-type(odd) { background: #fafafb; }
body.cookep-theme .wrapper .table-hover tbody tr:hover { background: var(--cookep-lavender); }
body.cookep-theme .page-item.active .page-link { background: var(--cookep-violet); border-color: var(--cookep-violet); color: #fff; }
body.cookep-theme .page-link { color: #6b7280; border-color: #e5e7eb; border-radius: 7px; }
body.cookep-theme .page-link:hover { color: var(--cookep-violet); background: var(--cookep-lavender); border-color: var(--cookep-violet-border); }
body.cookep-theme .dropdown-menu { border: 1px solid #e5e7eb; border-radius: 10px; box-shadow: 0 8px 24px rgba(15, 15, 16, .09); }
body.cookep-theme .dropdown-item { color: #374151; }
body.cookep-theme .dropdown-item:hover,
body.cookep-theme .dropdown-item:focus { color: var(--cookep-violet); background: var(--cookep-lavender); }
body.cookep-theme .dropdown-item.active,
body.cookep-theme .bootstrap-select .dropdown-item.active { color: #fff; background: var(--cookep-violet); }
body.cookep-theme .alert-info { color: var(--cookep-violet); background: var(--cookep-lavender); border-color: var(--cookep-violet-border); }
body.cookep-theme .alert-success { color: #246644; background: #edf8f0; border-color: #d0eada; }
body.cookep-theme .alert-warning { color: #946007; background: #fff7e5; border-color: #f2dfb4; }
body.cookep-theme .alert-danger { color: #991b1b; background: #fef2f2; border-color: #fecaca; }
body.cookep-theme .badge-primary,
body.cookep-theme .badge-info { background: var(--cookep-violet); color: #fff; }
body.cookep-theme .bg-primary { background-color: var(--cookep-violet) !important; }
body.cookep-theme .nav-tabs { border-bottom-color: var(--cookep-line); }
body.cookep-theme .nav-tabs .nav-link.active { color: var(--cookep-violet); border-color: var(--cookep-line) var(--cookep-line) #fff; background: #fff; }
body.cookep-theme .nav-pills .nav-link.active { background: var(--cookep-violet); color: #fff; }
body.cookep-theme .modal-content,
body.cookep-theme .swal2-popup { border: 1px solid var(--cookep-line); border-radius: 16px; box-shadow: 0 16px 48px rgba(15, 15, 16, .14); }
body.cookep-theme .modal-header { border-bottom-color: #e5e7eb; background: #fff; border-radius: 16px 16px 0 0; }
body.cookep-theme .modal-footer { border-top-color: #e5e7eb; }
body.cookep-theme .modal h5 .badge { background: #f3f4f6; color: #374151; border-radius: 6px; }
body.cookep-theme .custom-control-input:checked ~ .custom-control-label::before { background: var(--cookep-violet); border-color: var(--cookep-violet); }
body.cookep-theme input[type='checkbox'],
body.cookep-theme input[type='radio'] { accent-color: var(--cookep-violet); }
body.cookep-theme .switch-button__checkbox:checked + .switch-button__label { background: var(--cookep-violet); }
body.cookep-theme .switch-button .switch-button__label { background: #d1d5db; }
body.cookep-theme .switch-button .switch-button__checkbox:checked + .switch-button__label { background: var(--cookep-violet); }
body.cookep-theme .containerCheckbox input:checked ~ .checkmark { background: var(--cookep-violet); }
body.cookep-theme .toggle-empresa-comedor-container .btn-group-toggle { border-color: var(--cookep-violet-border); }
body.cookep-theme .toggle-empresa-comedor-container .toggle-btn { color: var(--cookep-violet); background: #fff; }
body.cookep-theme .toggle-empresa-comedor-container .toggle-btn.active { color: #fff; background: var(--cookep-violet); }
body.cookep-theme .flatpickr-day.selected,
body.cookep-theme .flatpickr-day.startRange,
body.cookep-theme .flatpickr-day.endRange { background: var(--cookep-violet); border-color: var(--cookep-violet); }
body.cookep-theme .flatpickr-calendar { border: 1px solid #e5e7eb; border-radius: 12px; box-shadow: 0 8px 24px rgba(15, 15, 16, .1); }
body.cookep-theme .footer { background: var(--cookep-background); color: #9ca3af; border-top-color: var(--cookep-line); font-family: var(--cookep-font); font-size: 12px; }

/* Specialized pages keep their own grids; only their visual tokens are replaced. */
body.cookep-theme .wrapper[class*='-page'] { background: var(--cookep-background); color: #374151; }
body.cookep-theme .configuracion-general-page {
    --config-bg: var(--cookep-background); --config-paper: #fff; --config-ink: var(--cookep-ink);
    --config-muted: var(--cookep-muted); --config-line: var(--cookep-line);
    --config-accent: var(--cookep-violet); --config-accent-strong: var(--cookep-violet-dark);
    --config-accent-soft: var(--cookep-lavender); --config-shadow: var(--cookep-shadow);
}
body.cookep-theme .horarios-reparto-page {
    --hr-bg: var(--cookep-background); --hr-paper: #fff; --hr-ink: var(--cookep-ink);
    --hr-muted: var(--cookep-muted); --hr-line: var(--cookep-line);
    --hr-accent: var(--cookep-violet); --hr-accent-strong: var(--cookep-violet-dark);
    --hr-accent-soft: var(--cookep-lavender); --hr-shadow: var(--cookep-shadow);
}
body.cookep-theme .planificacion-v2-page {
    --planning-v2-bg: var(--cookep-background); --planning-v2-paper: #fff; --planning-v2-ink: var(--cookep-ink);
    --planning-v2-muted: var(--cookep-muted); --planning-v2-line: var(--cookep-line);
    --planning-v2-accent: var(--cookep-violet); --planning-v2-accent-strong: var(--cookep-violet-dark);
    --planning-v2-shadow: var(--cookep-shadow);
}
body.cookep-theme .planillas-v2-shell {
    --v2-border: var(--cookep-line); --v2-border-strong: #d1d5db; --v2-text: #374151;
    --v2-text-muted: var(--cookep-muted); --v2-accent: var(--cookep-violet);
    --v2-accent-soft: #f3f4f6; --v2-shadow: var(--cookep-shadow);
}
body.cookep-theme #configuracion-empresas-page,
body.cookep-theme .planillas-v2-shell { color: #374151; font-family: var(--cookep-font); }
body.cookep-theme :is(.company-config__header, .company-config__section, .company-config__card, .repartidores-hero) { background: #fff; border-color: var(--cookep-line); box-shadow: var(--cookep-shadow); }
body.cookep-theme :is(.company-config__icon, .company-config__context-icon, .company-config__header-mark, .repartidores-hero-icon, .repartidores-modal-icon, .cupos-header-icon, .cupos-avatar, .cupos-horario-icon) { color: var(--cookep-violet); background: var(--cookep-lavender); }
body.cookep-theme :is(.company-config__eyebrow, .company-config__section-number, .company-config__disclosure) { color: var(--cookep-violet); }
body.cookep-theme :is(.company-config__schedule-card-kicker, .company-config__modal-kicker, .company-config__aside nav span, .admin-facturacion-kicker) { color: var(--cookep-violet); }
body.cookep-theme .company-config .weekdays-list .weekday-selected { color: #fff; background: var(--cookep-violet); border-color: var(--cookep-violet); }
body.cookep-theme .repartidores-page .card-body { background: #fff; }
body.cookep-theme .planillas-v2-shell .btn-primary { background: var(--cookep-violet); border-color: var(--cookep-violet); box-shadow: none; }
body.cookep-theme .planillas-v2-shell .btn-primary:hover,
body.cookep-theme .planillas-v2-shell .btn-primary:focus { background: var(--cookep-violet-dark); border-color: var(--cookep-violet-dark); }
body.cookep-theme .planillas-v2-summary-primary-action { background: var(--cookep-violet); box-shadow: 0 5px 14px rgba(var(--cookep-violet-rgb), .12); }
body.cookep-theme .planillas-v2-summary-primary-action:hover { background: var(--cookep-violet-dark); }
body.cookep-theme :is(.admin-facturacion-filters, .admin-facturacion-panel, .admin-facturacion-kpi) { border: 1px solid var(--cookep-line); box-shadow: var(--cookep-shadow); }
body.cookep-theme :is(.configuracion-general-surface, .horarios-reparto-surface, .planificacion-v2-topbar, .planificacion-v2-filter-panel, .planificacion-v2-results) { border-color: var(--cookep-line); box-shadow: var(--cookep-shadow); background: #fff; }
body.cookep-theme :is(.configuracion-general-kicker, .horarios-reparto-kicker) { color: var(--cookep-violet-dark); background: var(--cookep-lavender); border-color: var(--cookep-violet-border); }
body.cookep-theme .generar-pedido-header > div { border-left-color: var(--cookep-violet); }
body.cookep-theme .generar-pedido-toggle-input:checked + .generar-pedido-toggle-control { background: var(--cookep-violet); }
body.cookep-theme .dashboard-kpis .metric-card { border: 1px solid var(--cookep-line); border-left: 3px solid var(--cookep-violet); border-radius: 16px; box-shadow: var(--cookep-shadow); }
body.cookep-theme .dashboard-kpis .metric-card-accent { border-left-color: var(--cookep-success); }
body.cookep-theme .metric-card > span { color: #6b7280; text-transform: none; letter-spacing: 0; font-size: 13px; }
body.cookep-theme .metric-card strong { color: var(--cookep-violet-dark); font-weight: 700; font-variant-numeric: tabular-nums; }
body.cookep-theme .metric-card small { color: var(--cookep-muted); }
body.cookep-theme .dashboard-panel { border: 1px solid var(--cookep-line); border-radius: 16px; box-shadow: var(--cookep-shadow); }
body.cookep-theme .dashboard-days label { border-color: #e5e7eb; border-radius: 8px; color: #6b7280; background: #fff; }
body.cookep-theme .dashboard-days label:has(input:checked) { color: var(--cookep-violet); background: var(--cookep-lavender); border-color: var(--cookep-violet-border); }

/* The login retains its fields and flow, using a quiet brand background. */
body.cookep-theme .accountbg { background: radial-gradient(ellipse at 10% 15%, var(--cookep-lavender), transparent 45%), radial-gradient(ellipse at 90% 85%, var(--cookep-lavender), transparent 45%), #fafafb; }
body.cookep-theme .accountbg .card { box-shadow: 0 14px 54px rgba(15, 15, 16, .08); }
body.cookep-theme .accountbg .form-control { font-family: var(--cookep-font); }

@media (max-width: 767px) {
    body.cookep-theme .wrapper h3 .badge-secondary { font-size: 20px; }
    body.cookep-theme .page-title-box .page-title { font-size: 21px; }
    body.cookep-theme .qk-system-status { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
    body.cookep-theme .btn { transition: none; }
}
@media print {
    body.cookep-theme, body.cookep-theme .wrapper[class*='-page'] { background: #fff; }
    body.cookep-theme .wrapper .card { box-shadow: none; }
}
