:root {
    /* Colors */
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --secondary: var(--secondary);
    --danger: var(--danger);
    --warning: #f59e0b;
    --dark: #555555;
    --light: #f3f4f6;
    --white: #ffffff;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    /* Variables */
    --sidebar-width: 215px;
    --header-height: 70px;
    --radius: 12px;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    /* Font */
    --font-sans: 'Open Sans', 'Inter', system-ui, -apple-system, sans-serif;
    /* Font Sizes */
    --font-size-logo: 1.25rem;
    --font-size-title: 1.5rem;
    --font-size-stat: 1.75rem;
    --font-size-kpi: 1.95rem;
    --font-size-body: 0.95rem;
    --font-size-table-header: 0.75rem;
    --font-size-table-cell: 0.75rem;
    --font-size-label: 0.95rem;
    --font-size-hint: 0.825rem;
    --font-size-tab: 0.9rem;
    --font-size-badge: 0.6rem;
    --font-size-filter: 0.82rem;
}
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
body {
    font-family: var(--font-sans);
    background-color: var(--light);
    color: var(--dark);
    overflow: hidden;
}
/* Base styles for form elements to ensure font consistency */
input,
button,
textarea,
select,
a {
    font-family: inherit;
}
a:focus,
button:focus {
    outline: none;
}
/* Layout */
.app-container {
    display: flex;
    height: 100vh;
}
/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--white);
    border-right: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    padding: 1rem 0.8rem;
    height: 100%;
    z-index: 10;
}
.sidebar-header {
    margin-bottom: 1.5rem;
    padding: 0.5rem 0.6rem;
}
.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-sans);
    font-weight: 800;
    font-size: 1.05rem;
    color: var(--primary);
}
.logo-icon {
    width: 20px;
    height: 20px;
    color: var(--primary) !important;
}
.logo-text {
    line-height: 1.15;
    letter-spacing: -0.2px;
    font-size: 0.825rem;
    font-weight: 800;
    color: var(--primary);
    text-transform: uppercase;
}
.tenant-badge {
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--primary);
    background: rgba(37, 99, 235, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.menu-category {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 1.2rem 0 0.5rem 0.5rem;
    font-family: var(--font-sans);
}
.menu-category:first-of-type {
    margin-top: 0.5rem;
}
.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    flex: 1;
}
.nav-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.75rem 0.55rem 1.55rem;
    margin-left: -0.8rem;
    border-radius: 0 100px 100px 0;
    color: #475569;
    text-decoration: none;
    font-weight: 550;
    font-size: 0.825rem;
    text-transform: none;
    letter-spacing: normal;
    transition: all 0.15s ease-in-out;
    font-family: var(--font-sans);
}
.nav-item i,
.nav-item svg {
    width: 18px !important;
    height: 18px !important;
    color: #475569 !important;
    stroke: currentColor;
    stroke-width: 2;
    transition: color 0.15s ease-in-out;
}
/* Default Active/Hover States (Soft Gray Background with Pill Shape) */
.nav-item:hover {
    background-color: rgba(148, 163, 184, 0.08) !important;
    color: var(--primary) !important;
    box-shadow: none !important;
}
.nav-item:hover i,
.nav-item:hover svg {
    color: var(--primary) !important;
}
.nav-item.active {
    background-color: var(--primary) !important;
    color: var(--white) !important;
    box-shadow: none !important;
}
.nav-item.active i,
.nav-item.active svg {
    color: var(--white) !important;
}
.sidebar-footer {
    margin-top: auto;
    padding: 0.5rem 0;
}
.btn-import {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--secondary);
    color: var(--white);
    border: none;
    padding: 0.55rem 0.875rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.825rem;
    cursor: pointer;
    transition: transform 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}
.btn-import:hover {
    background: var(--secondary);
}
/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}
.topbar {
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    background: var(--light);
    /* Transparent/Light */
}
.topbar h1 {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.search-bar {
    display: flex;
    align-items: center;
    background: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 99px;
    border: 1px solid var(--gray-200);
    width: 300px;
    box-shadow: var(--shadow-sm);
}
.search-bar input {
    border: none;
    outline: none;
    background: transparent;
    padding-left: 0.5rem;
    width: 100%;
    font-family: var(--font-sans);
}
.search-bar i {
    color: var(--gray-400);
    width: 18px;
}
.content-area {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
    padding-top: 1rem;
}
/* Components */
.card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-100);
    margin-bottom: 1.5rem;
}
/* Filter System */
.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    background: var(--white);
    border-radius: var(--radius);
    padding: 0.75rem 1.25rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-100);
    margin-bottom: 1rem;
    position: relative;
    z-index: 50;
}
.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.filter-item {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: var(--white);
    transition: all 0.2s ease-in-out;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.02);
}
.filter-item:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}
.filter-item:focus-within {
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.filter-item i,
.filter-item svg {
    width: 0.9rem;
    height: 0.9rem;
    color: var(--primary);
    stroke: var(--primary);
    stroke-width: 2.2;
}
.filter-control {
    border: none;
    outline: none;
    background: transparent;
    font-size: var(--font-size-filter);
    color: #334155;
    font-weight: 500;
    font-family: inherit;
    width: auto;
}
/* Ensure Flatpickr alt-input respects small widths in filters */
.filter-item input.filter-control[placeholder="Fecha"],
.filter-item .flatpickr-input {
    width: auto;
}
.filter-control::placeholder {
    color: #94a3b8;
}
/* Default state of Action Buttons (Circular Gray Buttons) */
.filter-bar button.btn-primary.btn-icon-sm {
    width: 36px !important;
    height: 36px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 1px solid #e2e8f0 !important;
    background: #f8fafc !important;
    color: #64748b !important;
    cursor: pointer !important;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.02) !important;
    transition: all 0.2s ease-in-out !important;
}
.filter-bar button.btn-primary.btn-icon-sm i,
.filter-bar button.btn-primary.btn-icon-sm svg {
    width: 1.05rem !important;
    height: 1.05rem !important;
    margin: 0 !important;
    color: #64748b !important;
    stroke: currentColor !important;
    stroke-width: 2 !important;
    transition: color 0.2s ease-in-out !important;
}
/* Hover styling per action button */
/* Sync Offers (Download / Purple) */
#btn-sync-offers:hover {
    background: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
}
#scroll-to-bookmark-header:hover {
    background: #f1f5f9 !important;
}
#scroll-to-bookmark-header:hover i,
#scroll-to-bookmark-header:hover svg {
    color: #64748b !important;
}
#btn-sync-offers:hover i,
#btn-sync-offers:hover svg {
    color: #64748b !important;
}
/* Clear Offers (Eraser / Pink) */
#btn-clear-offers:hover {
    background: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
}
#btn-clear-offers:hover i,
#btn-clear-offers:hover svg {
    color: #64748b !important;
}
/* Clear Filters (Filter-X / Red) */
#btn-clear-filters:hover {
    background: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
}
#btn-clear-filters:hover i,
#btn-clear-filters:hover svg {
    color: #64748b !important;
}
/* Refresh Tray (Refresh / Dark Gray) */
#refresh-tray:hover {
    background: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
}
#refresh-tray:hover i,
#refresh-tray:hover svg {
    color: #475569 !important;
}
/* Scroll to Bookmark (Bookmark / Amber-Orange) */
#scroll-to-bookmark:hover {
    background: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
}
#scroll-to-bookmark:hover i,
#scroll-to-bookmark:hover svg {
    color: #64748b !important;
}
/* General Active/Press Animation */
.filter-bar button.btn-primary.btn-icon-sm:hover {
    background: #cbd5e1 !important;
    border-color: #cbd5e1 !important;
}
.filter-bar button.btn-primary.btn-icon-sm:active {
    /* flat */
}
/* Rectangular Action Buttons with Text and Icon (matching btn-oc-import-new style) */
.btn-tray-action {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
    padding: 0 !important;
    border-radius: 8px !important;
    border: 1px solid #e2e8f0 !important;
    background: #f8fafc !important;
    color: #64748b !important;
    font-weight: 600 !important;
    height: 34px !important;
    width: 34px !important;
    cursor: pointer !important;
    transition: all 0.2s ease-in-out !important;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.02) !important;
    text-decoration: none !important;
}
.btn-tray-action i,
.btn-tray-action svg {
    width: 0.95rem !important;
    height: 0.95rem !important;
    color: #64748b !important;
    stroke: currentColor !important;
    stroke-width: 2 !important;
    transition: color 0.2s ease-in-out !important;
}
.btn-tray-action:hover {
    background: #e2e8f0 !important;
    border-color: #cbd5e1 !important;
}
.btn-tray-action:active {
    /* flat */
}
#btn-sync-offers.btn-tray-action:hover {
    background: #e2e8f0 !important;
    border-color: #cbd5e1 !important;
}
#btn-sync-offers.btn-tray-action:hover i,
#btn-sync-offers.btn-tray-action:hover svg {
    color: #64748b !important;
}
#btn-clear-offers.btn-tray-action:hover {
    background: #e2e8f0 !important;
    border-color: #cbd5e1 !important;
}
#btn-clear-offers.btn-tray-action:hover i,
#btn-clear-offers.btn-tray-action:hover svg {
    color: #64748b !important;
}
#btn-clear-filters.btn-tray-action:hover {
    background: #e2e8f0 !important;
    border-color: #cbd5e1 !important;
}
#btn-clear-filters.btn-tray-action:hover i,
#btn-clear-filters.btn-tray-action:hover svg {
    color: #64748b !important;
}
#refresh-tray.btn-tray-action:hover {
    background: #e2e8f0 !important;
    border-color: #cbd5e1 !important;
}
#refresh-tray.btn-tray-action:hover i,
#refresh-tray.btn-tray-action:hover svg {
    color: #475569 !important;
}
#scroll-to-bookmark.btn-tray-action:hover {
    background: #e2e8f0 !important;
    border-color: #cbd5e1 !important;
}
#scroll-to-bookmark.btn-tray-action:hover i,
#scroll-to-bookmark.btn-tray-action:hover svg {
    color: #64748b !important;
}
input[type="date"].filter-control,
input[type="number"].filter-control {
    cursor: pointer;
}
select.filter-control {
    cursor: pointer;
}
/* Dashboard Grid */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.stat-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: transform 0.2s;
}
.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}
.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: var(--primary);
    /* fallback */
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
}
.stat-info h3 {
    font-size: var(--font-size-filter);
    color: var(--gray-500);
    margin-bottom: 0.25rem;
    font-weight: 500;
}
.stat-info p {
    font-size: var(--font-size-stat);
    font-weight: 700;
    color: var(--dark);
}
/* Finance & KPI Stats */
.grid-kpi {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.kpi-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    transition: transform 0.2s, box-shadow 0.2s;
}
.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.kpi-card.kpi-primary {
    background: #eff6ff;
    border-color: #bfdbfe;
}
.kpi-card.kpi-primary h3 {
    color: #1e40af;
}
.kpi-card.kpi-primary .kpi-value {
    color: #1e3a8a;
}
.kpi-card.kpi-success {
    background: #f0fdf4;
    border-color: #bbf7d0;
}
.kpi-card.kpi-success h3 {
    color: #166534;
}
.kpi-card.kpi-success .kpi-value {
    color: #14532d;
}
.kpi-card.kpi-danger {
    background: #fef2f2;
    border-color: #fecaca;
}
.kpi-card.kpi-danger h3 {
    color: #991b1b;
}
.kpi-card.kpi-danger .kpi-value {
    color: #7f1d1d;
}
.kpi-value {
    font-size: var(--font-size-kpi);
    /* Large and clear */
    font-weight: 800;
    margin-top: 0.5rem;
}
.card-title {
    font-size: var(--font-size-body);
    font-weight: 600;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
/* Tab Content Animation */
.tab-content {
    animation: fadeIn 0.3s ease-out;
}
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
    }
}
/* Configuration & Forms */
.config-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    height: 100%;
}
.q-input {
    width: 100%;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--gray-300);
    font-size: 0.70rem;
    background: #f8fafc;
    color: var(--dark);
    font-family: inherit;
    transition: all 0.2s ease;
}
.q-input::placeholder {
    color: #cbd5e1;
    opacity: 1;
}
.q-input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.q-label {
    display: block;
    font-size: 0.6rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.form-label {
    display: block;
    font-size: var(--font-size-label);
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.form-hint {
    color: var(--gray-500);
    font-size: var(--font-size-hint);
    margin-bottom: 1rem;
}
/* Tables */
.table-container {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    /* For rounded corners */
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
}
table {
    width: 100%;
    border-collapse: collapse;
}
thead {
    background: var(--gray-100);
    border-bottom: 1px solid var(--gray-200);
}
th,
td {
    padding: 0.4rem 0.8rem;
    text-align: left;
    font-size: var(--font-size-table-cell);
}
th {
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    font-size: var(--font-size-table-header);
    /* Customizable via appearance settings */
    letter-spacing: 0.05em;
    background: var(--gray-100);
    padding: 0.75rem 1rem;
    position: relative;
}
.sort-header {
    cursor: pointer;
    transition: all 0.2s;
}
.sort-header:hover {
    background: var(--gray-200);
    color: var(--primary);
}
.sort-header i {
    width: 14px;
    height: 14px;
    vertical-align: middle;
    margin-left: 0.25rem;
    color: var(--gray-400);
}
td {
    padding: 1rem;
    font-size: var(--font-size-table-cell);
    color: var(--dark);
}
tbody tr {
    border-bottom: 1px solid var(--gray-100);
    transition: background 0.1s;
}
tbody tr:last-child {
    border-bottom: none;
}
tbody tr:hover {
    background: var(--gray-100);
    /* gentle hover */
}
/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.5rem;
    border-radius: 99px;
    font-size: var(--font-size-badge);
    font-weight: 600;
    text-transform: uppercase;
}
.badge-danger {
    background: #fee2e2;
    color: var(--danger);
}
/* Urgent */
.badge-warning {
    background: #fef3c7;
    color: #d97706;
}
/* High Budget */
.badge-success {
    background: #d1fae5;
    color: #059669;
}
/* Default Badge */
.badge-gray {
    background: #f3f4f6;
    color: #4b5563;
}
/* Folio Badge (Base Blue/Primary theme color with opacity) */
.badge-folio {
    background: color-mix(in srgb, var(--primary) 10%, transparent) !important;
    color: var(--primary) !important;
}
/* Kanban */
.kanban-board {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    height: calc(100vh - 160px);
    padding-bottom: 1rem;
}
.kanban-column {
    min-width: 300px;
    width: 300px;
    background: var(--gray-100);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    padding: 1rem;
    max-height: 100%;
}
.kanban-header {
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    color: var(--gray-600);
}
.kanban-items {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.kanban-card {
    background: var(--white);
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgb(0 0 0 / 0.05);
    cursor: grab;
    border: 1px solid transparent;
}
.kanban-card:hover {
    border-color: var(--primary);
}
.kanban-card h4 {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}
.kanban-card .meta {
    font-size: 0.75rem;
    color: var(--gray-500);
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
}
/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    visibility: hidden;
    opacity: 0;
    transition: all 0.2s;
}
.modal-overlay.open {
    visibility: visible;
    opacity: 1;
}
.modal {
    background: var(--white);
    width: 500px;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    transform: translateY(20px);
    transition: transform 0.2s;
}
.modal-overlay.open .modal {
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}
.close-modal {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray-400);
}
.form-group {
    margin-bottom: 1.5rem;
}
.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
}
.form-group select,
.form-group input {
    width: 100%;
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--gray-300);
    font-family: inherit;
}
.file-drop-area {
    border: 2px dashed var(--gray-300);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    position: relative;
    color: var(--gray-500);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}
.file-drop-area:hover {
    background: var(--gray-100);
    border-color: var(--primary);
}
.file-drop-area input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}
.btn-primary {
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}
.btn-icon-sm {
    padding: 0.4rem 0.6rem !important;
    border-radius: 6px !important;
}
.btn-icon-sm i,
.btn-icon-sm svg {
    width: 1.15rem !important;
    height: 1.15rem !important;
}
/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
    }
}
.animate-in {
    animation: fadeIn 0.4s ease-out forwards;
}
/* Utilities */
.hidden {
    display: none;
}
.text-danger {
    color: var(--danger);
}
.text-success {
    color: var(--secondary);
}
/* Rules Page Elements */
.rules-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}
.rule-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    margin-bottom: 0.5rem;
    background: var(--white);
}
/* New Utilities */
.grid-2-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}
.input-control {
    width: 100%;
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--gray-300);
    font-family: inherit;
    font-size: 0.9rem;
}
.input-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}
.tabs {
    display: flex;
    gap: 1rem;
    border-bottom: 1px solid var(--gray-200);
    margin-bottom: 1.5rem;
}
.tab-btn {
    background: none;
    border: none;
    padding: 0.75rem 0;
    margin-bottom: -1px;
    font-weight: 500;
    color: var(--gray-500);
    cursor: pointer;
    border-bottom: 2px solid transparent;
}
.data-table th.sort-header i,
.data-table th.sort-header svg,
.sort-header i,
.sort-header svg {
    width: 11px !important;
    height: 11px !important;
    margin-left: 3px;
    vertical-align: middle;
    opacity: 0.4;
    /* Much more subtle */
    transition: all 0.2s;
}
.sort-header:hover i {
    opacity: 1;
    color: var(--primary);
}
.tab-pill.active {
    background: var(--primary) !important;
    color: white !important;
}
.rule-list {
    list-style: none;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    overflow: hidden;
}
.rule-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--gray-100);
    background: var(--white);
}
.rule-list li:last-child {
    border-bottom: none;
}
.btn-action.delete-rule {
    color: var(--gray-400);
    background: none;
    border: none;
    cursor: pointer;
}
.btn-action.delete-rule:hover {
    color: var(--danger);
}
/* --- QUOTATION STYLES --- */
/* Quotation Form */
.quotation-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.quotation-header-fields {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}
.client-section {
    background: var(--gray-100);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--gray-200);
}
.items-table-editor th {
    background: var(--gray-200);
    font-size: 0.8rem;
}
.items-table-editor td {
    padding: 0.5rem;
}
.items-table-editor input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--gray-300);
    border-radius: 4px;
}
/* PRINT LAYOUT (Matches Excel) */
#print-area {
    display: none;
    /* Hidden on screen */
    background: white;
    color: #1f2937;
    /* Usamos Arial explícitamente para garantizar que el driver de impresión (Microsoft Print to PDF) */
    /* renderice correctamente los caracteres. Las fuentes web a veces no se incrustan bien. */
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 10pt;
    padding: 1cm;
    box-sizing: border-box;
}
/* --- Layout Components (Global Scope for PDF Gen) --- */
/* Header */
.print-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #000;
}
.header-left {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}
.print-logo {
    flex: 0 0 auto;
    line-height: 0;
}
.print-logo img {
    max-height: 50px;
    width: auto;
    display: block;
}
.company-info {
    text-align: left;
}
.company-name {
    font-size: 13pt;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 0.3rem;
    color: #000;
    margin-top: 0;
    line-height: 1;
}
.company-details {
    font-size: 8pt;
    color: #333;
    line-height: 1.3;
}
.quote-badge {
    flex: 0 0 auto;
    text-align: right;
}
.quote-title {
    font-size: 18pt;
    font-weight: 300;
    text-transform: uppercase;
    color: #333;
    letter-spacing: 1px;
    line-height: 1;
    margin-bottom: 0.2rem;
    margin-top: 0;
}
.quote-number {
    font-size: 14pt;
    font-weight: 700;
    color: var(--danger);
    margin-bottom: 0.2rem;
    line-height: 1;
}
.quote-date {
    font-size: 8pt;
    color: #666;
}
/* Info Grid (Client & Details) */
.info-grid {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
}
.info-col {
    flex: 1;
}
.info-row {
    display: flex;
    margin-bottom: 0;
    border-bottom: 1px dotted #e5e7eb;
    padding-bottom: 1px;
    padding-top: 1px;
    font-size: 9pt;
    line-height: 1.2;
}
.info-label {
    font-weight: 600;
    width: 100px;
    color: #374151;
    flex-shrink: 0;
    font-size: 8pt;
    /* Reducido */
}
.info-val {
    flex: 1;
    color: #111827;
}
/* Item Table */
.modern-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
}
.modern-table th {
    background-color: #f3f4f6;
    color: #111827;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 8pt;
    /* Reducido de 9pt */
    padding: 8px 6px;
    /* Padding reducido */
    text-align: left;
    border-bottom: 2px solid #e5e7eb;
}
.modern-table td {
    padding: 8px 6px;
    /* Padding reducido */
    border-bottom: 1px solid #e5e7eb;
    vertical-align: top;
    font-size: 9pt;
    /* Reducido */
}
.modern-table tr:last-child td {
    border-bottom: 2px solid #e5e7eb;
}
.col-right {
    text-align: right;
}
.col-center {
    text-align: center;
}
/* Footer */
.print-footer {
    display: flex;
    gap: 2rem;
}
.notes-section {
    flex: 1;
    font-size: 8pt;
    /* Reducido */
    color: #4b5563;
    background-color: #f9fafb;
    padding: 1rem;
    border-radius: 4px;
}
.totals-section {
    width: 250px;
    font-size: 9pt;
    /* Reducido */
}
.total-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    /* Padding reducido */
    border-bottom: 1px solid #e5e7eb;
}
.total-final {
    font-size: 11pt;
    /* Reducido de 12pt */
    font-weight: 700;
    color: #000;
    border-bottom: none;
    padding-top: 10px;
    margin-top: 5px;
    border-top: 2px solid #1f2937;
}
/* Print Media Query - Only for layout adjustments on paper */
@media print {
    @page {
        margin: 1cm;
        size: auto;
    }
    body {
        background: white;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        height: auto;
        overflow: visible;
    }
    /* Hide App UI */
    .app-container,
    .sidebar,
    .topbar,
    #page-content,
    #btn-new-quotation,
    .modal-overlay {
        /* Ensure modal is hidden */
        display: none !important;
    }
    .main-content {
        margin: 0;
        padding: 0;
        overflow: visible;
        height: auto;
        display: block !important;
        /* Ensure visibility */
    }
    #print-area {
        position: static !important;
        /* Reset absolute positioning */
        display: block !important;
        width: 100% !important;
        left: auto !important;
        top: auto !important;
        padding: 0 !important;
        /* Margin handled by @page */
    }
}
/* --- Flatpickr Modern Theme Customization --- */
.flatpickr-calendar {
    background: var(--white) !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1) !important;
    border: 1px solid var(--gray-200) !important;
    border-radius: 12px !important;
    font-family: var(--font-sans) !important;
    font-size: 0.75rem !important;
    /* Slightly smaller typography base */
    padding: 2px !important;
    /* Minimal padding to maximize internal space */
    margin-top: 5px !important;
    animation: fpFadeInUp 0.15s ease-out;
    width: 315px !important;
    /* Increased from 300px to ensure Sunday is not cut off */
    box-sizing: border-box !important;
}
@keyframes fpFadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
    }
}
.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange,
.flatpickr-day.selected.inRange,
.flatpickr-day.startRange.inRange,
.flatpickr-day.endRange.inRange,
.flatpickr-day.selected:focus,
.flatpickr-day.startRange:focus,
.flatpickr-day.endRange:focus,
.flatpickr-day.selected:hover,
.flatpickr-day.startRange:hover,
.flatpickr-day.endRange:hover,
.flatpickr-day.prevMonthDay.selected,
.flatpickr-day.nextMonthDay.selected {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: var(--white) !important;
    font-weight: 600 !important;
}
.flatpickr-day.today {
    border-color: var(--primary) !important;
    color: var(--primary) !important;
    font-weight: 700 !important;
}
.flatpickr-day.selected.today,
.flatpickr-day.startRange.today,
.flatpickr-day.endRange.today {
    color: #ffffff !important;
}
.flatpickr-day.today:hover {
    background: var(--gray-100) !important;
    color: var(--primary) !important;
}
.flatpickr-day {
    border-radius: 6px !important;
    height: 30px !important;
    /* Compact vertical size */
    line-height: 30px !important;
    font-size: 0.75rem !important;
    margin: 0 !important;
    /* Prevent extra margins from interfering with the 7-col layout */
}
.flatpickr-day:hover {
    background: var(--gray-100) !important;
}
.flatpickr-months .flatpickr-month {
    color: var(--gray-700) !important;
    fill: var(--gray-700) !important;
}
.flatpickr-current-month .flatpickr-monthDropdown-months {
    font-weight: 700 !important;
    font-size: 0.75rem !important;
    /* Reduced further */
}
.flatpickr-weekday {
    color: var(--gray-400) !important;
    font-weight: 700 !important;
    font-size: 0.65rem !important;
    text-transform: uppercase !important;
}
/* SweetAlert2 Button Uniformity */
div:where(.swal2-container) button:where(.swal2-styled).swal2-confirm,
div:where(.swal2-container) button:where(.swal2-styled).swal2-cancel,
div:where(.swal2-container) button:where(.swal2-styled).swal2-deny {
    border-radius: 8px !important;
    padding: 0.6rem 1.5rem !important;
    font-weight: 600 !important;
    font-family: inherit !important;
    font-size: 0.9rem !important;
}
/* SweetAlert2 Select Dropdown Uniformity */
div:where(.swal2-container) select:where(.swal2-select) {
    font-size: 0.8rem !important;
    padding: 0.5rem 2rem 0.5rem 0.75rem !important;
    border-radius: 8px !important;
    border: 1px solid #cbd5e1 !important;
    font-family: inherit !important;
    color: #1e293b !important;
    background-color: #ffffff !important;
    max-width: 100% !important;
    height: 40px !important;
    box-sizing: border-box !important;
}
/* Custom Slow Rotation Animation for Sync Icon */
.spin-slow {
    animation: spinSlowAnim 1.4s linear infinite;
    display: inline-block;
    transform-origin: center center;
}
@keyframes spinSlowAnim {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}
/* ==========================================================================
   CONSOLIDATED UI COMPONENT STYLES
   ========================================================================== */
/* === BANDEJA DE ENTRADA === */
.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}
.data-table th {
    background: #f8fafc;
    color: #475569;
    font-weight: 600;
    font-size: var(--font-size-table-header, 0.75rem);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.85rem 1.25rem;
    border-bottom: 2px solid #f1f5f9;
}
.data-table td {
    padding: 0.85rem 1.25rem;
    font-size: var(--font-size-table-cell, 0.820rem);
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
}
tr.hover-effect:not(.reviewed-row):hover {
    background-color: #f8fafc;
}
tr.selected-row:not(.reviewed-row) {
    background-color: #f1f5f9 !important;
    box-shadow: inset 4px 0 0 0 var(--primary);
}
tr.selected-row:not(.reviewed-row):hover {
    background-color: #e2e8f0 !important;
}
tr.reviewed-row {
    background-color: #f8fafc !important;
    opacity: 0.5;
}
tr.reviewed-row td:first-child {
    box-shadow: inset 4px 0 0 0 #d97706;
}
tr.hover-effect:not(.reviewed-row):hover .star-icon:not(.active),
tr.hover-effect:not(.reviewed-row):hover .offered-icon:not(.active),
tr.hover-effect:not(.reviewed-row):hover .bookmark-icon:not(.active) {
    color: #94a3b8 !important;
}
tr.selected-row .star-icon:not(.active),
tr.selected-row .offered-icon:not(.active),
tr.selected-row .bookmark-icon:not(.active) {
    color: #64748b !important;
}
.star-icon.active {
    color: #ca8a04 !important;
}
.offered-icon.active {
    color: var(--secondary) !important;
}
.bookmark-icon.active {
    color: #d97706 !important;
}
/* === COTIZACIONES === */
.q-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.q-span-2 {
    grid-column: span 2;
}
.q-input-v1 {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.82rem;
    transition: all 0.2s;
    background: #fff;
}
.q-input-v1:focus {
    border-color: var(--secondary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.q-input-v1::placeholder {
    color: #cbd5e1;
    opacity: 1;
}
.items-table-container {
    background: #f1f5f9;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    overflow: hidden;
    margin-bottom: 2rem;
}
.items-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}
.items-table th {
    text-align: left;
    padding: 0.75rem 0.5rem;
    background: #e2e8f0;
    border-bottom: 1px solid #cbd5e1;
    font-size: 0.7rem;
    color: #475569;
    font-weight: 600;
    text-transform: uppercase;
}
.items-table td {
    padding: 0.3rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}
.items-table input {
    border: 1px solid #cbd5e1;
    background: #ffffff;
    padding: 0.5rem;
    width: 100%;
    font-size: 0.70rem;
    outline: none;
    border-radius: 6px;
    transition: all 0.2s;
}
.items-table input::placeholder {
    color: #cbd5e1;
    opacity: 1;
}
.items-table input:focus {
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.items-table input.inp-qty {
    text-align: center;
    font-weight: 600;
    color: var(--secondary);
}
.items-table input.inp-price {
    text-align: right;
}
.btn-add-item {
    width: 100%;
    padding: 0.75rem;
    color: var(--secondary);
    background: #fff;
    border: none;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s;
}
.btn-add-item:hover {
    background: #f8fafc;
    color: var(--primary);
}
/* Tooltip Styles */
.q-tooltip-wrapper {
    position: relative;
    display: inline-block;
    cursor: help;
}
.q-tooltip-content {
    visibility: hidden;
    width: 300px;
    background-color: #64748b;
    color: #f8fafc;
    text-align: left;
    border-radius: 8px;
    padding: 12px;
    position: absolute;
    z-index: 100;
    top: 50%;
    transform: translateY(-50%);
    margin-top: 0;
    left: 100%;
    margin-left: 10px;
    opacity: 0;
    transition: opacity 0.2s, visibility 0.2s;
    font-size: 0.75rem;
    line-height: 1.4;
    white-space: normal;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    pointer-events: none;
    border: 1px solid #334155;
}
.q-tooltip-content::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 100%;
    left: auto;
    bottom: auto;
    margin-top: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: transparent #64748b transparent transparent;
}
.q-tooltip-wrapper:hover .q-tooltip-content {
    visibility: visible;
    opacity: 1;
}
input[type=number].no-spinner::-webkit-inner-spin-button,
input[type=number].no-spinner::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type=number].no-spinner {
    -moz-appearance: textfield;
}
#v2-form input[type=text],
#v2-form textarea {
    text-transform: uppercase;
}
/* === COMPRAS ÁGILES BETA === */
.filter-card {
    background: white;
    padding: 1.25rem 1.5rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px -2px rgba(50, 50, 93, 0.05), 0 2px 8px -1px rgba(0, 0, 0, 0.02);
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    align-items: flex-end;
    border: 1px solid #f1f5f9;
}
.form-group-beta {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    flex: 1;
    min-width: 200px;
}
.form-group-beta>label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.input-beta {
    padding: 0.65rem 0.85rem;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    font-size: 0.82rem;
    color: #1e293b;
    outline: none;
    transition: all 0.15s ease;
}
.input-beta:focus {
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.12);
}
.btn-beta-search {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    border: none;
    padding: 0.65rem 1.5rem;
    font-weight: 700;
    font-size: 0.82rem;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
}
.btn-beta-search:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
}
.btn-beta-search:active {
    /* flat */
}
.grid-beta {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px -2px rgba(50, 50, 93, 0.05), 0 2px 8px -1px rgba(0, 0, 0, 0.02);
    border: 1px solid #f1f5f9;
    overflow: hidden;
}
.beta-table th {
    background: #f8fafc;
    color: #475569;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.85rem 1.25rem;
    border-bottom: 2px solid #f1f5f9;
}
.beta-row:hover {
    background-color: #fcfcfd;
}
.badge-beta-status {
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    border-radius: 9999px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}
.status-publicada {
    background: #dbeafe;
    color: #1d4ed8;
}
.status-seleccionado {
    background: #fef3c7;
    color: #b45309;
    border: 1px solid rgba(245, 158, 11, 0.2);
}
.status-cerrada {
    background: #f1f5f9;
    color: #475569;
}
.status-desierta {
    background: #fee2e2;
    color: #b91c1c;
}
.status-cancelada {
    background: #fee2e2;
    color: #991b1b;
}
.monto-badge {
    font-size: 0.75rem;
    font-weight: 700;
    background: #e6f4ea;
    color: #137333;
    padding: 0.15rem 0.5rem;
    border-radius: 6px;
}
.monto-none {
    font-size: 0.75rem;
    font-weight: 500;
    color: #94a3b8;
    font-style: italic;
}
.modal-beta-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}
.modal-beta-overlay.open {
    opacity: 1;
    pointer-events: auto;
}
.modal-beta-card {
    background: white;
    width: 90%;
    max-width: 900px;
    height: 85vh;
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(20px);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid rgba(255, 255, 255, 0.8);
}
.modal-beta-overlay.open .modal-beta-card {
}
.modal-beta-header {
    padding: 1.25rem 1.5rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.modal-beta-tabs {
    display: flex;
    gap: 1rem;
    background: #f1f5f9;
    padding: 0.35rem;
    border-radius: 12px;
    margin: 0.5rem 1.5rem 0 1.5rem;
}
.tab-btn {
    flex: 1;
    background: none;
    border: none;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: #64748b;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}
.tab-btn.active {
    background: white;
    color: #1e293b;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}
.competitor-winner {
    border: 2px solid #f59e0b !important;
    background-color: #fefdf6 !important;
}
.competitor-winner td {
    background-color: #fefdf6 !important;
}
.custom-multiselect-beta {
    position: relative;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}
.multiselect-btn-beta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    padding: 0.65rem 0.85rem;
    font-size: 0.82rem;
    color: #1e293b;
    transition: all 0.15s ease;
    min-height: 41.5px;
}
.multiselect-btn-beta:focus-within {
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.12);
}
.multiselect-menu-beta {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    width: 380px;
    background: white;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    padding: 0.5rem;
    font-size: 0.82rem;
    color: #475569;
    z-index: 1000;
    max-height: 320px;
    overflow-y: auto;
}
.multiselect-item-beta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.15s;
    font-weight: normal !important;
    text-transform: none !important;
    font-size: 0.82rem !important;
    color: #334155 !important;
    white-space: nowrap;
}
.multiselect-item-beta:hover {
    background: #f8fafc;
}
.multiselect-item-beta input[type="checkbox"] {
    width: 14px;
    height: 14px;
    accent-color: #f59e0b;
    cursor: pointer;
}
.btn-beta-config-trigger:hover {
    color: #d97706 !important;
}
/* === LICITACIONES === */
.licitacion-row:hover {
    background-color: #f8fafc !important;
    cursor: pointer;
}
.licitacion-row.selected-row {
    background-color: #f1f5f9 !important;
    box-shadow: inset 4px 0 0 0 var(--primary);
}
.licitacion-row.selected-row:hover {
    background-color: #e2e8f0 !important;
}
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    word-wrap: break-word;
    line-height: 1.4;
    transition: all 0.2s;
}
.selected-row .text-truncate-2 {
    -webkit-line-clamp: unset !important;
    display: block !important;
}
.bookmark-btn {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #cbd5e1;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.bookmark-btn:hover {
    color: #f59e0b;
}
.bookmark-btn.active {
    color: #f59e0b;
}
.filter-item.active-filter {
    background: #fef3c7 !important;
    border-color: #f59e0b !important;
}
.filter-item.active-filter span {
    color: #b45309 !important;
}
.filter-item.active-filter i {
    color: #f59e0b !important;
}
.import-zone {
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.2s;
    background: #f8fafc;
    cursor: pointer;
    position: relative;
}
.import-zone:hover {
    border-color: var(--primary);
    background: #f1f5f9;
}
.import-zone.drag-over {
    border-color: var(--primary);
    background: #eff6ff;
    transform: scale(1.01);
}
.import-zone i {
    width: 32px;
    height: 32px;
    color: #64748b;
    margin-bottom: 0.5rem;
}
.import-zone h4 {
    margin: 0;
    font-size: 0.95rem;
    color: #64748b;
}
.import-zone p {
    margin: 0.25rem 0 0;
    font-size: 0.75rem;
    color: #64748b;
}
.import-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #f59e0b;
    color: white;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
/* Licitaciones Beta UTMS */
.beta-tender-row:hover {
    background-color: #f1f5f9 !important;
    cursor: pointer;
}
.beta-modal-tab.active {
    color: var(--primary) !important;
    border-bottom: 2px solid var(--primary) !important;
    font-weight: 700 !important;
}
.badge-utm {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.15rem 0.45rem;
    border-radius: 6px;
    text-transform: uppercase;
}
.badge-utm-l1 {
    background: #f1f5f9;
    color: #475569;
}
.badge-utm-le {
    background: #dbeafe;
    color: #1d4ed8;
}
.badge-utm-lp {
    background: #faf5ff;
    color: #7e22ce;
}
.badge-utm-lq {
    background: #fef3c7;
    color: #b45309;
}
.badge-utm-lr {
    background: #fee2e2;
    color: #b91c1c;
}
.badge-utm-priv {
    background: #f0fdf4;
    color: #15803d;
}
/* === ÓRDENES DE COMPRA === */
.oc-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 0px;
    margin-bottom: 0.5rem;
}
.oc-tab-btn {
    background: none;
    border: none;
    border-bottom: 3.5px solid transparent;
    padding: 0.5rem 1.1rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.oc-tab-btn:hover {
    color: var(--primary);
}
.oc-tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}
.oc-card {
    background: white;
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px -2px rgba(50, 50, 93, 0.05), 0 2px 8px -1px rgba(0, 0, 0, 0.02);
    border: 1px solid #f1f5f9;
}
.oc-input-area {
    width: 100%;
    min-height: 200px;
    padding: 1rem;
    border: 1.5px solid #cbd5e1;
    border-radius: 12px;
    font-size: 0.9rem;
    font-family: monospace;
    outline: none;
    transition: border 0.15s;
    resize: vertical;
}
.oc-input-area:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}
.btn-oc-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary) 100%);
    color: white;
    border: none;
    padding: 0.65rem 1.5rem;
    font-weight: 600;
    font-size: 0.825rem;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
}
.btn-oc-primary:hover {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary) 100%);
}
.btn-oc-primary:active {
    /* flat */
}
.btn-oc-secondary {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
    padding: 0.65rem 1.25rem;
    font-weight: 600;
    font-size: 0.825rem;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.15s;
}
.btn-oc-secondary:hover {
    background: #e2e8f0;
    color: #1e293b;
}
.oc-table th {
    background: #f8fafc;
    color: #475569;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.85rem 1.25rem;
    border-bottom: 2px solid #f1f5f9;
}
.oc-row {
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: background 0.15s;
}
.oc-row:hover {
    background-color: #f8fafc;
}
.oc-badge-status {
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    border-radius: 9999px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}
.oc-status-sent {
    background: #dbeafe;
    color: #1d4ed8;
}
.oc-status-accepted {
    background: #d1fae5;
    color: #065f46;
}
.oc-status-conforme {
    background: #ccfbf1;
    color: #0f766e;
}
.oc-status-pending {
    background: #fef3c7;
    color: #92400e;
}
.oc-status-cancelled {
    background: #fee2e2;
    color: #991b1b;
}
.oc-status-unknown {
    background: #f1f5f9;
    color: #475569;
}
.oc-sync-badge {
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    border-radius: 6px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}
.oc-sync-yes {
    background: #e6f4ea;
    color: #137333;
}
.oc-sync-no {
    background: #f1f5f9;
    color: #64748b;
}
.modal-oc-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}
.modal-oc-overlay.open {
    opacity: 1;
    pointer-events: auto;
}
.modal-oc-card {
    background: white;
    width: 90%;
    max-width: 1000px;
    height: 90vh;
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(20px);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid rgba(255, 255, 255, 0.8);
}
.modal-oc-overlay.open .modal-oc-card {
}
.modal-oc-header {
    padding: 0.75rem 1.25rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.modal-oc-tabs {
    display: flex;
    gap: 1rem;
    background: #f1f5f9;
    padding: 0.35rem;
    border-radius: 12px;
    margin: 0.4rem 1.25rem 0 1.25rem;
}
.m-tab-btn {
    flex: 1;
    background: none;
    border: none;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: #64748b;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}
.m-tab-btn.active {
    background: white;
    color: #1e293b;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}
.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}
.clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.detail-box {
    border: 1px solid #f1f5f9;
    background: #fafbfc;
    padding: 0.85rem;
    border-radius: 12px;
}
.detail-box h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 0.775rem;
    font-weight: 800;
    color: #334155;
    text-transform: uppercase;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 0.25rem;
    letter-spacing: 0.5px;
}
.detail-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.775rem;
    padding: 0.35rem 0;
    border-bottom: 1px dashed #f1f5f9;
}
.detail-label {
    color: #64748b;
    font-weight: 600;
}
.detail-value {
    color: #1e293b;
    font-weight: 700;
    text-align: right;
    max-width: 60%;
}
/* === REGLAS DEL NEGOCIO === */
.switch {
    position: relative;
    display: inline-block;
    width: 34px;
    height: 20px;
}
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}
.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}
input:checked+.slider {
    background-color: var(--secondary);
}
input:checked+.slider:before {
    transform: translateX(14px);
}
.badge-mode {
    font-size: 0.6rem;
    padding: 2px 6px;
    border-radius: 4px;
    background: #e0f2fe;
    color: #0369a1;
    text-transform: uppercase;
    font-weight: 700;
    border: 1px solid #bae6fd;
}
/* === PRODUCTOS PRISA === */
.swal2-popup.swal-wide-popup {
    width: 900px !important;
    max-width: 95vw !important;
}
.prisa-input {
    width: 100%;
    border: 1px solid var(--gray-200);
    padding: 0.6rem;
    font-size: var(--font-size-table-cell);
    background: var(--white);
    outline: none;
    transition: all 0.15s;
    color: var(--gray-600);
    border-radius: 6px;
}
.prisa-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    color: var(--dark);
}
.prisa-input-primary {
    border-color: #cbd5e1;
    background: var(--white);
    border: 1.5px solid var(--primary);
}
.prisa-input-primary:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}
.prisa-input-readonly {
    background: #f8fafc !important;
    color: var(--gray-500) !important;
    cursor: not-allowed;
}
.prisa-row {
    transition: background 0.1s;
}
.prisa-row:hover {
    background: var(--gray-100);
}
.prisa-row td {
    border-bottom: 1px solid var(--gray-100);
}
.prisa-row-selected {
    background: #f0fdf4 !important;
}
.prisa-row-selected td {
    border-bottom: 1px solid #dcfce7 !important;
}
.prisa-result-item {
    padding: 0.85rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid var(--gray-100);
    transition: all 0.1s;
}
.prisa-result-item:hover {
    background: var(--gray-50);
}
.prisa-result-item.selected {
    background: #eff6ff;
    border-left: 3px solid var(--primary);
}
.prisa-result-item:last-child {
    border-bottom: none;
}
.inp-cant {
    color: var(--primary) !important;
}
.saved-list-row:hover {
    background: #f8fafc;
}
/* Estilos de Pestaña Activa con Fondo Azul y Letras Blancas */
.tray-tabs-container,
.oc-tabs {
    display: flex !important;
    align-items: flex-end !important;
    border-bottom: 1px solid var(--primary) !important;
    padding-bottom: 0px !important;
    margin-bottom: 1.5rem !important;
}
.tray-tab.active,
.oc-tab-btn.active {
    background-color: var(--primary) !important;
    background: var(--primary) !important;
    color: white !important;
    border-top-left-radius: 8px !important;
    border-top-right-radius: 8px !important;
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    border-bottom: 2px solid transparent !important;
    padding: 0.5rem 1.1rem !important;
    margin-bottom: 0 !important;
}
.tray-tab.active:hover,
.oc-tab-btn.active:hover {
    color: white !important;
}
/* Ocultar el indicador de línea de la pestaña activa */
.tab-indicator,
.tray-tab.active div,
.oc-tab-btn.active div {
    display: none !important;
}
/* Estilos de Pestañas Inactivas con Borde Azul y Esquinas Redondeadas */
.tray-tab:not(.active),
.oc-tab-btn:not(.active) {
    border: 1px solid var(--primary) !important;
    border-bottom: none !important;
    border-top-left-radius: 8px !important;
    border-top-right-radius: 8px !important;
    margin-right: -1px !important;
    background-color: rgba(148, 163, 184, 0.08) !important;
    color: var(--primary) !important;
    transition: all 0.2s ease-in-out !important;
}
.tray-tab:not(.active) i,
.tray-tab:not(.active) svg,
.oc-tab-btn:not(.active) i,
.oc-tab-btn:not(.active) svg {
    color: var(--primary) !important;
}
.tray-tab:not(.active):hover,
.oc-tab-btn:not(.active):hover {
    background-color: rgba(148, 163, 184, 0.16) !important;
}
/* === Clases de Homologación de Estilos Extraídos === */
.search-input-wrapper {
    position: relative;
    flex: 1;
}
.search-input-wrapper input {
    width: 100%;
    padding-left: 2rem !important;
}
.search-input-wrapper i,
.search-input-wrapper svg {
    position: absolute;
    left: 0.7rem;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    color: #94a3b8;
    pointer-events: none;
}
.search-input-wrapper-sm {
    position: relative;
    flex: 1;
}
.search-input-wrapper-sm input {
    width: 100%;
    padding-left: 2rem !important;
    padding-top: 0.45rem !important;
    padding-bottom: 0.45rem !important;
    font-size: 0.8rem !important;
}
.search-input-wrapper-sm i,
.search-input-wrapper-sm svg {
    position: absolute;
    left: 0.7rem;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    color: #94a3b8;
    pointer-events: none;
}
.info-banner {
    font-size: 0.82rem;
    color: #1e3a8a;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    line-height: 1.5;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}
.info-banner i {
    color: var(--primary);
    flex-shrink: 0;
    width: 16px;
    margin-top: 2px;
}
.toolbar-panel {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: #f8fafc;
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}
.table-responsive-bordered {
    overflow-x: auto;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}
.table-message-cell {
    padding: 2rem;
    text-align: center;
    color: #64748b;
    font-size: 0.82rem;
}
.table-message-cell-lg {
    padding: 3rem;
    text-align: center;
    color: #64748b;
}
.filter-bar-embed {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0.5rem 0 !important;
    margin-bottom: 1.5rem !important;
}
.tray-total-counter {
    margin: 0.5rem 0;
    font-size: 0.82rem;
    color: #64748b;
    font-weight: 500;
}
.loading-spinner {
    margin: 0.5rem 0;
    font-size: 0.82rem;
    color: #64748b;
    font-weight: 500;
}
.filter-toggle-switch {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.45rem 1rem;
    border-radius: 8px;
}
.toggle-track {
    width: 36px;
    height: 20px;
    background: #e2e8f0;
    border-radius: 10px;
    position: relative;
    transition: 0.3s;
}
.toggle-thumb {
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: 0.3s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}
.tray-tab {
    text-decoration: none;
    background: none;
    border: none;
    padding: 0.5rem 1.1rem;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 500;
    color: #64748b;
    position: relative;
    transition: all 0.2s;
    text-transform: none;
    letter-spacing: normal;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.tray-tab:hover {
    color: var(--primary);
}
.search-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    max-width: 400px;
    margin-bottom: 0.5rem;
}
.search-container-sm {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    max-width: 300px;
}
.flex-row-gap-md {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.flex-grow-1-min-width {
    flex: 1;
    min-width: 280px;
}
.input-pad-sm {
    flex: 1;
    padding: 0.55rem 0.75rem;
    font-size: 0.82rem;
}
.flex-row-justify-end {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: flex-end;
}
/* === Clases de Colores Extraídos === */
.quote-link {
    color: var(--primary) !important;
    text-decoration: none;
    font-weight: 500;
    outline: none;
    white-space: nowrap;
}
.quote-link:hover {
    text-decoration: underline;
}
/* Botones de acción del listado de bandeja */
.action-btn-external {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    border-radius: 6px;
    background: transparent !important;
    color: #64748b !important;
    transition: none;
    outline: none;
    border: none;
    cursor: pointer;
}
.action-btn-external:hover {
    background: #f1f5f9 !important;
    color: var(--primary) !important;
}
.action-btn-sync {
    border: none;
    background: transparent !important;
    color: #64748b !important;
    padding: 6px;
    border-radius: 6px;
    cursor: pointer;
    transition: none;
    margin-left: 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.action-btn-sync:hover {
    background: #f1f5f9 !important;
    color: var(--secondary) !important;
}
/* Estrellas y marcadores */
.star-icon-btn {
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
}
.star-icon {
    width: 18px;
    height: 18px;
    color: #cbd5e1;
    transition: color 0.2s;
}
.star-icon.active {
    color: #ca8a04 !important;
}
.offered-icon-btn {
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
}
.offered-icon {
    width: 18px;
    height: 18px;
    color: #cbd5e1;
    transition: color 0.2s;
}
.offered-icon.active {
    color: var(--secondary) !important;
}
.bookmark-icon-btn {
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
}
.bookmark-icon {
    width: 18px;
    height: 18px;
    color: #cbd5e1;
    transition: color 0.2s;
}
.bookmark-icon.active {
    color: #d97706 !important;
    fill: currentColor;
}
.btn-oc-excel {
    border-color: var(--secondary) !important;
    color: #0f766e !important;
    background: #f0fdf4 !important;
    padding: 0.55rem 1.25rem !important;
    font-size: 0.8rem !important;
}
.btn-oc-excel:hover {
    background: #e6fbf0 !important;
}
.btn-oc-danger {
    border-color: var(--danger) !important;
    color: #991b1b !important;
    background: #fef2f2 !important;
    padding: 0.55rem 1.25rem !important;
    font-size: 0.8rem !important;
}
.btn-oc-danger:hover {
    background: #fde8e8 !important;
}
/* Unificar encabezados de tabla de cotizaciones con compras ágiles */
#quotation-list-view th {
    background: #f8fafc !important;
    color: #475569 !important;
    font-weight: 600 !important;
    font-size: 0.75rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    padding: 0.85rem 1.25rem !important;
    border-bottom: 2px solid #f1f5f9 !important;
}
/* Filters Modal & Trigger Styles */
.filters-modal-card {
    max-width: 550px !important;
    width: 90% !important;
    max-height: 90vh !important;
    display: flex !important;
    flex-direction: column !important;
    padding: 1.5rem !important;
}
.filters-modal-header {
    padding: 0 0 1rem 0;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.filters-modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
}
.btn-close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #64748b;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
    transition: color 0.2s;
}
.btn-close-modal:hover {
    color: #1e293b;
}
.filters-modal-body {
    padding: 1rem 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}
.filters-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
@media (max-width: 600px) {
    .filters-form-grid {
        grid-template-columns: 1fr;
    }
}
.filter-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.filter-field label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
}
.filter-field input,
.filter-field select {
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    color: #1e293b;
    background: var(--white);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.filter-field input:focus,
.filter-field select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.region-select-box {
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 0.75rem;
    max-height: 180px;
    overflow-y: auto;
    background: #f8fafc;
}
.region-checkboxes-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.25rem;
}
@media (max-width: 480px) {
    .region-checkboxes-grid {
        grid-template-columns: 1fr;
    }
}
.filters-modal-footer {
    padding: 1rem 0 0 0;
    border-top: 1px solid var(--gray-100);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}
.btn-filter-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 1rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: #64748b;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.02);
}
.btn-filter-trigger:hover {
    border-color: #cbd5e1;
    background: #f1f5f9;
    color: #475569;
}
.btn-filter-trigger.active-filters {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.05);
    color: var(--primary);
}
.filter-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 50%;
    width: 18px;
    height: 18px;
}
/* Active filter chips */
.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.6rem;
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
}
.filter-chip-remove {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: color 0.15s;
}
.filter-chip-remove:hover {
    color: var(--danger);
}
/* Override SweetAlert2 container z-index to show above all modal overlays */
.swal2-container {
    z-index: 100000 !important;
}
/* Quick Search bar next to favorites button */
.search-quick-container {
    position: relative;
    display: inline-flex;
    align-items: center;
    height: 34px;
}
.search-quick-icon {
    position: absolute;
    left: 0.65rem;
    width: 14px;
    height: 14px;
    color: var(--primary);
    pointer-events: none;
    transition: color 0.2s ease-in-out;
}
.search-quick-input {
    padding: 0.45rem 1.8rem 0.45rem 1.85rem;
    font-size: 0.82rem;
    font-weight: 500;
    color: #334155;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    height: 34px;
    width: 240px;
    outline: none;
    box-sizing: border-box;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.02);
}
.search-quick-input::placeholder {
    color: #94a3b8;
    font-weight: 400;
}
.search-quick-input:hover {
    border-color: #cbd5e1;
    background: #f1f5f9;
}
.search-quick-input:focus {
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.search-quick-input:focus~.search-quick-icon {
    color: var(--primary);
}
.search-quick-clear {
    position: absolute;
    right: 0.6rem;
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0;
    line-height: 1;
    display: none;
    transition: color 0.15s;
    user-select: none;
}
.search-quick-clear:hover {
    color: var(--danger);
}
/* Floating badge on action buttons (like Importar Datos in Licitaciones) */
.badge-floating {
    position: absolute !important;
    top: -6px !important;
    right: -6px !important;
    background: #f59e0b !important;
    color: white !important;
    font-size: 0.62rem !important;
    font-weight: 700 !important;
    padding: 2px 5px !important;
    border-radius: 10px !important;
    border: 2px solid white !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15) !important;
    line-height: 1 !important;
    z-index: 10 !important;
}
/* Solid blue button for Importar Licitaciones & Productos Prisa */
#btn-open-import-licitaciones,
.btn-prisa-header {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    background: var(--primary) !important;
    color: #ffffff !important;
    border: none !important;
    padding: 0 1rem !important;
    height: 34px !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    font-size: 0.82rem !important;
    cursor: pointer !important;
    transition: all 0.2s ease-in-out !important;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
    text-decoration: none !important;
    white-space: nowrap !important;
}
#btn-open-import-licitaciones:hover,
.btn-prisa-header:hover {
    background: var(--primary-hover) !important;
    color: #ffffff !important;
}
#btn-open-import-licitaciones:active,
.btn-prisa-header:active {
    /* flat */
}
#btn-open-import-licitaciones i,
#btn-open-import-licitaciones svg,
.btn-prisa-header i,
.btn-prisa-header svg {
    width: 0.95rem !important;
    height: 0.95rem !important;
    color: #ffffff !important;
    stroke: #ffffff !important;
    stroke-width: 2 !important;
}
/* Botones de Acción de Tabla Normalizados (Gris por defecto, se iluminan en hover) */
.action-btn {
    border: none !important;
    background: transparent !important;
    color: #64748b !important;
    padding: 6px !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    transition: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
}
.action-btn:hover {
    box-shadow: none !important;
    transform: none !important;
    background: transparent !important;
}
.action-btn:active {
    transform: none !important;
}
/* Edit action (primary theme color on hover) */
.action-btn.edit-q:hover,
.action-btn.btn-edit-client:hover,
.action-btn.btn-edit-buyer:hover,
.action-btn.btn-edit-institution:hover {
    background-color: transparent !important;
    color: var(--primary) !important;
}
/* View / eye action (secondary theme color on hover) */
.action-btn.view-q:hover {
    background-color: transparent !important;
    color: var(--secondary) !important;
}
/* Download action (primary theme color on hover) */
.action-btn.download-q:hover {
    background-color: transparent !important;
    color: var(--primary) !important;
}
/* Email action (primary theme color on hover) */
.action-btn.email-q:hover {
    background-color: transparent !important;
    color: var(--primary) !important;
}
/* WhatsApp action (WhatsApp brand green on hover) */
.action-btn.whatsapp-q:hover {
    background-color: transparent !important;
    color: #16a34a !important;
}
/* Delete / trash action (danger theme color on hover) */
.action-btn.delete-q:hover,
.action-btn.btn-delete-client:hover,
.action-btn.btn-delete-buyer:hover,
.action-btn.btn-delete-institution:hover,
.action-btn.btn-delete-alias:hover,
.action-btn.delete-rule:hover {
    background-color: transparent !important;
    color: var(--danger) !important;
}
/* Botones de Acción Principales/Secundarios Normalizados (Nueva Cotización, Modales, etc) */
.btn-primary,
.btn-secondary,
.btn-whatsapp {
    transition: all 0.2s ease-in-out !important;
}
.btn-primary:hover {
    background: var(--primary-hover) !important;
    color: var(--white) !important;
}
.btn-primary:active {
    /* flat */
}
.btn-secondary {
    background: var(--secondary) !important;
    color: var(--white) !important;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}
.btn-secondary:hover {
    background: var(--secondary-hover) !important;
    color: var(--white) !important;
}
.btn-secondary:active {
    /* flat */
}
.btn-whatsapp {
    background: #16a34a !important;
    color: var(--white) !important;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}
.btn-whatsapp:hover {
    background: #128c7e !important;
    color: var(--white) !important;
}
.btn-whatsapp:active {
    /* flat */
}