:root {
    --bg-dark: #121826;
    --bg-panel: #1e2532;
    --text-primary: #e0e5ea;
    --text-secondary: #8c95a3;
    --accent-green: #37c26c;
    --accent-green-hover: #2ba95b;
    --accent-blue: #3b82f6;
    --border-color: #2a3441;
    --card-radius: 8px;
    --danger: #ef4444;
    --warning: #f59e0b;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; }
body.dark-theme { background-color: var(--bg-dark); color: var(--text-primary); }

/* Custom Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* Pill Navigation */
.pill-nav-container { display: flex; justify-content: center; padding: 1.5rem; position: sticky; top: 0; z-index: 100; }
.pill-nav { display: inline-flex; background: rgba(30, 37, 50, 0.4); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid rgba(255, 255, 255, 0.05); padding: 6px; border-radius: 50px; box-shadow: 0 4px 20px rgba(0,0,0,0.2); }
.pill-nav > a { color: var(--text-secondary); text-decoration: none; padding: 8px 24px; border-radius: 50px; transition: all 0.3s ease; font-weight: 500; font-size: 0.9rem; display: flex; align-items: center; gap: 8px; }
.pill-nav > a:hover { color: #fff; background: rgba(255,255,255,0.05); }
.pill-nav > a.active { background: rgba(255, 255, 255, 0.1); color: #fff; box-shadow: 0 2px 10px rgba(0,0,0,0.1); }

/* Pill Filter (Clients Active/Inactive) */
.pill-filter { display: inline-flex; background: rgba(30, 37, 50, 0.4); backdrop-filter: blur(12px); border: 1px solid rgba(255,255,255,0.05); padding: 4px; border-radius: 50px; }
.pill-filter a, .pill-filter button { background: transparent; border: none; color: var(--text-secondary); text-decoration: none; padding: 6px 18px; border-radius: 50px; transition: all 0.3s ease; font-weight: 500; font-size: 0.8rem; cursor: pointer; font-family: inherit; }
.pill-filter a:hover, .pill-filter button:hover { color: #fff; }
.pill-filter a.active, .pill-filter button.active { background: rgba(255,255,255,0.1); color: #fff; }

/* Search Input in Header */
.search-input-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    width: 320px;
}

.search-icon-svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 17px;
    height: 17px;
    pointer-events: none;
    z-index: 5;
    transition: transform 0.2s ease, stroke 0.2s ease, opacity 0.2s ease;
    flex-shrink: 0;
    stroke: var(--text-secondary);
}

.search-icon-svg circle,
.search-icon-svg path,
.search-icon-svg line {
    stroke: var(--text-secondary);
}

.search-input-wrapper:focus-within .search-icon-svg {
    transform: translateY(-50%) scale(1.08);
}

.search-input-wrapper input {
    width: 100%;
    height: 38px;
    padding: 0 34px 0 42px;
    background: rgba(30, 37, 50, 0.45);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50px;
    color: var(--text-primary);
    font-size: 0.85rem;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.search-input-wrapper input::placeholder {
    color: var(--text-secondary);
    opacity: 0.8;
}

.search-input-wrapper input:focus {
    border-color: var(--accent-green);
    background: rgba(18, 24, 38, 0.85);
    box-shadow: 0 0 0 2px rgba(55, 194, 108, 0.15);
}

.search-clear-btn {
    position: absolute;
    right: 12px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 50%;
    transition: color 0.2s;
}

.search-clear-btn:hover {
    color: #fff;
}

.container { padding: 1.25rem 2rem; max-width: 1540px; margin: 0 auto; }
.header-actions { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; }
h1, h2, h3 { color: #fff; margin-bottom: 1rem; }

/* Unified Page Title for Dashboard, Clientes and Cotizaciones */
h1.page-title,
.quotes-title,
.header-actions h1 {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

/* Cards */
.grid { display: grid; gap: 1.5rem; }
.grid-5 { grid-template-columns: repeat(5, 1fr); }
.card { background: rgba(30, 37, 50, 0.4); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-radius: 12px; padding: 1.5rem; border: 1px solid rgba(255, 255, 255, 0.05); box-shadow: 0 8px 32px rgba(0,0,0,0.15); transition: transform 0.2s, box-shadow 0.2s; }
.card.clickable:hover { transform: translateY(-3px); box-shadow: 0 12px 40px rgba(0,0,0,0.25); cursor: pointer; border: 1px solid rgba(255, 255, 255, 0.1); }
.card-title { font-size: 0.875rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 0.5rem; }
.card-value { font-size: 2rem; font-weight: 700; color: #fff; }

/* Forms */
.form-group { margin-bottom: 1rem; }
label { display: block; margin-bottom: 0.5rem; color: var(--text-secondary); font-size: 0.875rem; }
input, select, textarea { width: 100%; padding: 0.75rem; border-radius: 6px; border: 1px solid var(--border-color); background: var(--bg-dark); color: var(--text-primary); outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--accent-green); }
input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(1); cursor: pointer; }

/* Buttons */
.btn { 
    font-family: inherit;
    font-size: 0.875rem; 
    line-height: 1;
    padding: 0.5rem 1rem; 
    border-radius: 6px; 
    border: 1px solid transparent; 
    cursor: pointer; 
    font-weight: 500; 
    transition: 0.2s; 
    display: inline-flex; 
    align-items: center; 
    justify-content: center;
    gap: 8px; 
    text-decoration: none; 
    box-sizing: border-box;
}
.btn-primary { background: var(--accent-green); color: #fff; }
.btn-primary:hover { background: var(--accent-green-hover); }
.btn-secondary { background: var(--border-color); color: var(--text-primary); }
.btn-secondary:hover { background: #3a4555; }
.btn-pdf { background: #258c4f; color: #fff; }
.btn-pdf:hover { background: #1c6d3d; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-warning { background: #d97706; color: #fff; }
.btn-warning:hover { background: #b45309; }
.btn-sm { padding: 0.25rem 0.6rem; font-size: 0.875rem; height: 30px; }

/* Enhanced Button: Nuevo Cliente */
.btn-new-client {
    height: 38px;
    padding: 0 1.25rem;
    border-radius: 50px;
    background: linear-gradient(135deg, #37c26c 0%, #2ca85c 100%);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 14px rgba(55, 194, 108, 0.28);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    text-decoration: none;
}

.btn-new-client:hover {
    background: linear-gradient(135deg, #3edb7a 0%, #30b866 100%);
    box-shadow: 0 6px 20px rgba(55, 194, 108, 0.42);
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, 0.25);
}

.btn-new-client:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(55, 194, 108, 0.3);
}

.btn-new-client i {
    font-size: 0.8rem;
    transition: transform 0.2s ease;
}

.btn-new-client:hover i {
    transform: scale(1.15);
}

/* Enhanced Buttons: Paginación Anterior & Siguiente */
.btn-page-nav {
    height: 36px;
    padding: 0 1.15rem;
    border-radius: 50px;
    background: rgba(30, 37, 50, 0.55);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    font-size: 0.825rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.btn-page-nav:hover:not(:disabled):not(.btn-disabled) {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.btn-page-nav:active:not(:disabled):not(.btn-disabled) {
    transform: translateY(0);
}

.btn-page-nav.btn-disabled,
.btn-page-nav:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
    box-shadow: none;
    border-color: rgba(255, 255, 255, 0.04);
}

/* Dashboard Minimalist Filter Bar */
.dashboard-filter-bar {
    display: inline-flex;
    align-items: center;
    background: rgba(30, 37, 50, 0.45);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 10px;
    padding: 6px 8px 6px 14px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18);
    gap: 0.85rem;
}

.filter-date-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.filter-field {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-label {
    font-size: 0.725rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-secondary);
    user-select: none;
}

.filter-date-input {
    width: auto !important;
    height: 34px !important;
    padding: 0.25rem 0.65rem !important;
    font-size: 0.8125rem !important;
    font-weight: 500 !important;
    color: #fff !important;
    background: rgba(18, 24, 38, 0.65) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 6px !important;
    box-sizing: border-box !important;
    transition: all 0.2s ease !important;
}

.filter-date-input:focus {
    border-color: var(--accent-green) !important;
    background: rgba(18, 24, 38, 0.95) !important;
    box-shadow: 0 0 0 2px rgba(55, 194, 108, 0.2) !important;
}

.filter-select-input {
    width: auto !important;
    min-width: 130px;
    height: 34px !important;
    padding: 0.25rem 2rem 0.25rem 0.75rem !important;
    font-size: 0.8125rem !important;
    font-weight: 500 !important;
    color: #fff !important;
    background-color: rgba(18, 24, 38, 0.65) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 6px !important;
    box-sizing: border-box !important;
    transition: all 0.2s ease !important;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 0.65rem center !important;
}

.filter-select-input:focus {
    border-color: var(--accent-green) !important;
    background-color: rgba(18, 24, 38, 0.95) !important;
    box-shadow: 0 0 0 2px rgba(55, 194, 108, 0.2) !important;
    outline: none;
}

.filter-select-input option {
    background: #182234;
    color: #ffffff;
    padding: 6px 10px;
}

.filter-separator {
    color: var(--text-secondary);
    font-size: 0.85rem;
    opacity: 0.5;
    user-select: none;
    margin: 0 0.15rem;
}

.filter-divider {
    width: 1px;
    height: 22px;
    background: rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
    margin: 0 0.25rem;
}

.filter-buttons-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-filter-primary {
    height: 34px;
    min-width: 80px;
    padding: 0 1.1rem;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    border-radius: 6px;
    background: var(--accent-green);
    color: #fff;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(55, 194, 108, 0.25);
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.btn-filter-primary:hover {
    background: var(--accent-green-hover);
    box-shadow: 0 4px 14px rgba(55, 194, 108, 0.4);
    transform: translateY(-1px);
}

.btn-filter-secondary {
    height: 34px;
    min-width: 80px;
    padding: 0 1.1rem;
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.3px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.btn-filter-secondary:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Tables */
.table-container { 
    background: rgba(30, 37, 50, 0.4); 
    backdrop-filter: blur(12px); 
    -webkit-backdrop-filter: blur(12px); 
    border-radius: 12px; 
    border: 1px solid rgba(255, 255, 255, 0.05); 
    box-shadow: 0 8px 32px rgba(0,0,0,0.15); 
    position: relative;
    overflow: hidden;
}
.scrollable-table { 
    max-height: calc(100vh - 290px); 
    overflow-y: auto; 
    overflow-x: auto;
}
table { 
    width: 100%; 
    border-collapse: separate; 
    border-spacing: 0; 
}
th, td { 
    padding: 1rem; 
    text-align: left; 
    border-bottom: 1px solid var(--border-color); 
}
thead, thead tr {
    background: transparent !important;
    border: none !important;
}

th { 
    position: sticky; 
    top: 0; 
    z-index: 25;
    background: linear-gradient(180deg, rgba(28, 37, 52, 0.96) 0%, rgba(18, 24, 36, 0.95) 100%) !important;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    color: var(--text-secondary); 
    font-weight: 600; 
    font-size: 0.8125rem; 
    text-transform: uppercase; 
    letter-spacing: 0.5px;
    height: 50px;
    box-sizing: border-box;
    padding: 0 1rem;
    vertical-align: middle;
    box-shadow: none !important;
    border: none !important;
    border-left: none !important;
    border-right: none !important;
    border-top: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    outline: none !important;
}
th:first-child {
    border-top-left-radius: 11px;
}
th:last-child {
    border-top-right-radius: 11px;
}
tr:hover td { background: rgba(255,255,255,0.02); }

.table-header-corner-cover {
    position: absolute;
    top: 0;
    right: 0;
    width: 14px;
    height: 50px;
    background: linear-gradient(180deg, rgba(28, 37, 52, 0.96) 0%, rgba(18, 24, 36, 0.95) 100%) !important;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    z-index: 35;
    pointer-events: none;
    box-shadow: none !important;
    border: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-top-right-radius: 11px;
}

/* Badges */
.badge { padding: 0.25rem 0.5rem; border-radius: 4px; font-size: 0.75rem; font-weight: 600; display: inline-block;}
.badge-pending { background: rgba(245, 158, 11, 0.2); color: var(--warning); }
.badge-accepted { background: rgba(55, 194, 108, 0.2); color: var(--accent-green); }
.badge-rejected { background: rgba(239, 68, 68, 0.2); color: var(--danger); }
.badge-expired { background: rgba(140, 149, 163, 0.2); color: var(--text-secondary); }

/* Alerts */
.alert { padding: 1rem; border-radius: 6px; margin-bottom: 1rem; }
.alert-success { background: rgba(55, 194, 108, 0.1); border: 1px solid var(--accent-green); color: var(--accent-green); }
.alert-danger { background: rgba(239, 68, 68, 0.1); border: 1px solid var(--danger); color: var(--danger); }

/* Modal & Background Scroll Lock */
body.modal-open {
    overflow: hidden !important;
}

.modal-overlay { 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: rgba(8, 12, 20, 0.78); 
    backdrop-filter: blur(10px); 
    -webkit-backdrop-filter: blur(10px); 
    z-index: 99999; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    animation: overlayFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes overlayFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.97) translateY(-6px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-card { 
    width: 600px; 
    max-width: 95%; 
    max-height: 90vh; 
    display: flex; 
    flex-direction: column; 
    background: var(--bg-panel); 
    border-radius: 14px; 
    border: 1px solid rgba(255, 255, 255, 0.1); 
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.65); 
    overflow: hidden; 
    animation: modalFadeIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.5rem; border-bottom: 1px solid rgba(255,255,255,0.08); flex-shrink: 0; }
.modal-header h2 { margin: 0; font-size: 1.15rem; font-weight: 700; color: #fff; }
.modal-body { overflow-y: auto; padding: 1.5rem; flex-grow: 1; }

/* Flex utilities */
.flex { display: flex; }
.justify-between { justify-content: space-between; }
.items-center { align-items: center; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.65rem; }
.gap-4 { gap: 1rem; }
.gap-5 { gap: 1.25rem; }
.mt-4 { margin-top: 1rem; }
.mb-4 { margin-bottom: 1rem; }

/* Separation for Anterior / Siguiente pagination buttons across all tables */
.dashboard-pagination .flex,
#clientsPaginationContainer .flex,
.quotes-pagination-bar .flex {
    gap: 0.65rem;
}

/* Dashboard Equal Size Cards (Distribución & Mejores Clientes) */
.dashboard-bottom-grid {
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
    margin-bottom: 2rem;
}

.dashboard-card-fixed {
    height: 480px;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    padding: 1.25rem 1.5rem;
}

/* Dashboard Sleek Card Headers (Left Aligned, Clean) */
.card-header-sleek {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    margin-bottom: 0.85rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
}

.card-title-modern {
    font-size: 0.85rem;
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

.card-subtitle-modern {
    font-size: 0.72rem;
    color: var(--text-secondary);
    margin-top: 3px;
}

/* KPI Hero Cards (Monto Total Pagado & Monto Total Por Cobrar) */
.dashboard-kpi-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.kpi-hero-card {
    background: rgba(30, 37, 50, 0.45);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 14px;
    padding: 1.4rem 1.65rem;
    border: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 155px;
    box-sizing: border-box;
}

.kpi-card-paid {
    background: radial-gradient(circle at top left, rgba(55, 194, 108, 0.09) 0%, rgba(30, 37, 50, 0.45) 70%);
    border-top: 2px solid rgba(55, 194, 108, 0.7);
}

.kpi-card-paid:hover {
    border-color: rgba(55, 194, 108, 0.5);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35), 0 0 25px rgba(55, 194, 108, 0.15);
    transform: translateY(-3px);
}

.kpi-card-receivable {
    background: radial-gradient(circle at top left, rgba(245, 158, 11, 0.09) 0%, rgba(30, 37, 50, 0.45) 70%);
    border-top: 2px solid rgba(245, 158, 11, 0.7);
}

.kpi-card-receivable:hover {
    border-color: rgba(245, 158, 11, 0.5);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35), 0 0 25px rgba(245, 158, 11, 0.15);
    transform: translateY(-3px);
}

.kpi-hero-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.85rem;
}

.kpi-hero-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.kpi-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.badge-paid {
    background: rgba(55, 194, 108, 0.15);
    color: var(--accent-green);
    border: 1px solid rgba(55, 194, 108, 0.3);
}

.badge-receivable {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.kpi-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.dot-green {
    background-color: var(--accent-green);
    box-shadow: 0 0 6px var(--accent-green);
}

.dot-amber {
    background-color: var(--warning);
    box-shadow: 0 0 6px var(--warning);
}

.kpi-hero-label {
    font-size: 0.825rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.kpi-hero-action {
    color: var(--text-secondary);
    font-size: 0.85rem;
    transition: transform 0.2s ease, color 0.2s ease;
}

.kpi-hero-card:hover .kpi-hero-action {
    color: #fff;
    transform: translateX(4px);
}

.kpi-hero-value {
    font-size: 2.85rem;
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.1;
    margin-bottom: 0.6rem;
}

.value-paid {
    color: var(--accent-green);
    text-shadow: 0 0 30px rgba(55, 194, 108, 0.25);
}

.value-receivable {
    color: var(--warning);
    text-shadow: 0 0 30px rgba(245, 158, 11, 0.25);
}

.kpi-hero-footer {
    font-size: 0.775rem;
    color: var(--text-secondary);
    opacity: 0.75;
}

/* Dashboard Stat Mini Cards (Estado de Cotizaciones & Detalle Aceptadas) */
.dashboard-stats-grid {
    display: grid;
    grid-template-columns: 4fr 3fr;
    gap: 1.75rem;
    margin-bottom: 1.75rem;
    align-items: stretch;
}

.dashboard-stats-group {
    display: flex;
    flex-direction: column;
}

.dashboard-stats-divider {
    border-left: 1px solid rgba(255, 255, 255, 0.06);
    padding-left: 1.75rem;
}

.dashboard-stats-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.dashboard-section-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-secondary);
}

.dashboard-section-label.accent-green {
    color: var(--accent-green);
}

.stats-cards-row {
    display: grid;
    gap: 0.75rem;
    flex: 1;
}

.stats-cards-row.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.stats-cards-row.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.stat-mini-card {
    background: rgba(30, 37, 50, 0.45);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 0.85rem 1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 80px;
    box-sizing: border-box;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.stat-mini-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.stat-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.4rem;
}

.stat-label-badge {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.5px;
}

/* Card Themes */
.stat-card-neutral {
    border-top: 2px solid rgba(148, 163, 184, 0.5);
    background: radial-gradient(circle at top, rgba(148, 163, 184, 0.05), rgba(30, 37, 50, 0.45) 75%);
}
.stat-card-neutral:hover {
    border-color: rgba(148, 163, 184, 0.7);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3), 0 0 16px rgba(148, 163, 184, 0.1);
}
.stat-card-neutral .stat-label-badge { color: var(--text-secondary); }
.stat-card-neutral .stat-value { color: #ffffff; }

.stat-card-amber {
    border-top: 2px solid rgba(245, 158, 11, 0.65);
    background: radial-gradient(circle at top, rgba(245, 158, 11, 0.07), rgba(30, 37, 50, 0.45) 75%);
}
.stat-card-amber:hover {
    border-color: rgba(245, 158, 11, 0.8);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3), 0 0 16px rgba(245, 158, 11, 0.15);
}
.stat-card-amber .stat-label-badge { color: var(--warning); }
.stat-card-amber .stat-value { color: #ffffff; }

.stat-card-red {
    border-top: 2px solid rgba(239, 68, 68, 0.65);
    background: radial-gradient(circle at top, rgba(239, 68, 68, 0.07), rgba(30, 37, 50, 0.45) 75%);
}
.stat-card-red:hover {
    border-color: rgba(239, 68, 68, 0.8);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3), 0 0 16px rgba(239, 68, 68, 0.15);
}
.stat-card-red .stat-label-badge { color: var(--danger); }
.stat-card-red .stat-value { color: #ffffff; }

.stat-card-muted {
    border-top: 2px solid rgba(140, 149, 163, 0.4);
    background: radial-gradient(circle at top, rgba(140, 149, 163, 0.05), rgba(30, 37, 50, 0.45) 75%);
}
.stat-card-muted:hover {
    border-color: rgba(140, 149, 163, 0.6);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3), 0 0 16px rgba(140, 149, 163, 0.1);
}
.stat-card-muted .stat-label-badge { color: var(--text-secondary); }
.stat-card-muted .stat-value { color: #ffffff; }

.stat-card-green {
    border-top: 2px solid rgba(55, 194, 108, 0.65);
    background: radial-gradient(circle at top, rgba(55, 194, 108, 0.07), rgba(30, 37, 50, 0.45) 75%);
}
.stat-card-green:hover {
    border-color: rgba(55, 194, 108, 0.8);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3), 0 0 16px rgba(55, 194, 108, 0.15);
}
.stat-card-green .stat-label-badge { color: var(--accent-green); }
.stat-card-green .stat-value { color: #ffffff; }

.stat-arrow-icon {
    font-size: 0.7rem;
    color: var(--text-secondary);
    opacity: 0;
    transform: translateX(-4px);
    transition: all 0.2s ease;
}

.stat-mini-card:hover .stat-arrow-icon {
    opacity: 0.8;
    transform: translateX(0);
}

/* Toast Notifications Container */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 100002;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
    max-width: 420px;
}

.toast-notification {
    pointer-events: auto;
    background: rgba(22, 28, 41, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 15px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: toastSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast-notification.toast-hiding {
    opacity: 0;
    transform: translateX(40px) scale(0.95);
    pointer-events: none;
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

.toast-body {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    gap: 12px;
}

.toast-icon {
    font-size: 1.15rem;
    flex-shrink: 0;
}

.toast-success .toast-icon {
    color: var(--accent-green);
}

.toast-danger .toast-icon,
.toast-error .toast-icon {
    color: var(--danger);
}

.toast-warning .toast-icon {
    color: var(--warning);
}

.toast-info .toast-icon {
    color: #38bdf8;
}

.toast-text {
    flex: 1;
    color: #ffffff;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.4;
}

.toast-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: color 0.15s, background 0.15s;
    margin-left: 6px;
}

.toast-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

/* Toast Progress Bar */
.toast-progress {
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.08);
    position: relative;
    overflow: hidden;
}

.toast-progress-bar {
    height: 100%;
    width: 100%;
    transform-origin: left;
    animation: toastProgress 4s linear forwards;
}

.toast-success .toast-progress-bar {
    background: var(--accent-green);
    box-shadow: 0 0 8px rgba(55, 194, 108, 0.5);
}

.toast-danger .toast-progress-bar,
.toast-error .toast-progress-bar {
    background: var(--danger);
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
}

.toast-warning .toast-progress-bar {
    background: var(--warning);
}

.toast-info .toast-progress-bar {
    background: #38bdf8;
}

@keyframes toastProgress {
    from {
        transform: scaleX(1);
    }
    to {
        transform: scaleX(0);
    }
}

/* Modal Card Enhancements & Custom Field Validation */
.modal-card-client {
    width: 660px;
    max-width: 95%;
    background: rgba(18, 24, 38, 0.98);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.7);
    animation: modalFadeIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.req-star {
    color: var(--danger);
    font-weight: bold;
    margin-left: 2px;
}

.field-error-msg {
    font-size: 0.775rem;
    color: #ef4444;
    margin-top: 5px;
    display: none;
    align-items: center;
    gap: 5px;
    font-weight: 500;
}

.is-invalid {
    border-color: #ef4444 !important;
    background: rgba(239, 68, 68, 0.07) !important;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.25) !important;
}

.field-error-msg i {
    font-size: 0.8rem;
}

/* Contact Entry Card */
.contact-entry-card {
    background: rgba(18, 24, 38, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 10px;
    padding: 1.15rem;
    margin-bottom: 1rem;
    position: relative;
    transition: all 0.2s ease;
}

.contact-entry-card:hover {
    border-color: rgba(255, 255, 255, 0.14);
}

.contact-entry-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.contact-entry-title {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-remove-contact {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 4px 8px;
    border-radius: 4px;
    transition: color 0.2s, background 0.2s;
}

.btn-remove-contact:hover {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
}

.contacts-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1.5rem 0 1rem 0;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.contacts-section-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.chart-container-fixed {
    position: relative;
    flex: 1;
    min-height: 220px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0;
}

.chart-center-kpi {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    text-align: center;
    z-index: 10;
}

.chart-kpi-num {
    font-size: 1.85rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.chart-kpi-label {
    font-size: 0.62rem;
    font-weight: 700;
    color: var(--text-secondary);
    letter-spacing: 0.8px;
    text-transform: uppercase;
    margin-top: 5px;
}

.chart-legend-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px 10px;
    padding-top: 0.75rem;
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

.chart-legend-grid .legend-vencidas {
    grid-column: span 2;
}

.chart-legend-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.45rem 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
}

.chart-legend-item:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.16);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.legend-item-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-color-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.legend-label {
    font-size: 0.78rem;
    font-weight: 500;
    color: #e2e8f0;
}

.legend-count {
    font-size: 0.82rem;
    font-weight: 700;
    color: #ffffff;
    font-variant-numeric: tabular-nums;
    background: rgba(255, 255, 255, 0.06);
    padding: 2px 7px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.table-container-fixed {
    margin-top: 0.25rem;
    border: none;
    background: transparent;
    box-shadow: none;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.dashboard-table {
    width: 100%;
    border-collapse: collapse;
}

.dashboard-table th {
    padding: 0.6rem 0.5rem;
    font-size: 0.72rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.dashboard-table td {
    padding: 0.6rem 0.5rem;
    font-size: 0.85rem;
    height: 52px;
    box-sizing: border-box;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    vertical-align: middle;
}

.dashboard-table tr {
    transition: background 0.15s ease;
}

.dashboard-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.top-client-item {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.client-rank-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    flex-shrink: 0;
}

.client-rank-num.rank-1 {
    background: rgba(245, 158, 11, 0.18);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.client-rank-num.rank-2 {
    background: rgba(148, 163, 184, 0.18);
    color: #cbd5e1;
    border: 1px solid rgba(148, 163, 184, 0.3);
}

.client-rank-num.rank-3 {
    background: rgba(217, 119, 6, 0.15);
    color: #d97706;
    border: 1px solid rgba(217, 119, 6, 0.25);
}

.client-name-cell {
    max-width: 230px;
}

.client-name-text {
    font-weight: 500;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.count-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 9px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-primary);
}

.client-amount-text {
    font-weight: 600;
    color: #ffffff;
    font-size: 0.85rem;
    letter-spacing: 0.2px;
}

.dashboard-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    font-size: 0.8rem;
    min-height: 42px;
    flex-shrink: 0;
}

.dashboard-pagination .btn-page-nav {
    height: 32px;
    padding: 0 0.95rem;
    font-size: 0.78rem;
}

.btn-disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

@media (max-width: 992px) {
    .dashboard-bottom-grid {
        grid-template-columns: 1fr;
    }
}

/* Dashboard: Clickable Mejores Clientes Rows */
.clickable-client-row {
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease;
}

.clickable-client-row:hover {
    background: rgba(255, 255, 255, 0.06) !important;
}

.clickable-client-row:hover .client-name-text {
    color: var(--accent-green);
}

/* Quotes Index View: Top Header Bar, Filter Bar Row & Table */
.quotes-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.35rem;
}

.quotes-title {
    margin: 0;
    line-height: 1;
    font-size: 1.75rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.5px;
    white-space: nowrap;
}

.quotes-filter-row {
    width: 100%;
    margin-bottom: 1.35rem;
    position: relative;
    z-index: 50;
}

.quotes-filter-bar {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(30, 37, 50, 0.45);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 10px;
    padding: 7px 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18);
    box-sizing: border-box;
    position: relative;
    z-index: 50;
    gap: 1rem;
}

.filter-fields-group {
    display: flex;
    align-items: center;
    gap: 1.15rem;
    flex-wrap: nowrap;
    flex: 1;
    min-width: 0;
}

.quotes-filter-bar .filter-date-group {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-shrink: 0;
}

.quotes-filter-bar .filter-field {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.quotes-filter-bar .filter-label {
    font-size: 0.725rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    user-select: none;
    white-space: nowrap;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1;
}

.quotes-filter-bar .filter-separator {
    color: var(--text-secondary);
    font-size: 0.85rem;
    opacity: 0.5;
    user-select: none;
    margin: 0 1px;
}

.quotes-filter-bar .filter-divider {
    width: 1px;
    height: 20px;
    background: rgba(255, 255, 255, 0.12);
    flex-shrink: 0;
    margin: 0 0.1rem;
}

.filter-buttons-group {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-shrink: 0;
    margin-left: 0.5rem;
}

.filter-control-input {
    height: 32px !important;
    padding: 0.2rem 0.6rem !important;
    font-size: 0.8rem !important;
    font-weight: 500 !important;
    color: #fff !important;
    background: rgba(18, 24, 38, 0.65) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 6px !important;
    box-sizing: border-box !important;
    transition: all 0.2s ease !important;
    outline: none !important;
}

.filter-control-input:focus {
    border-color: var(--accent-green) !important;
    background: rgba(18, 24, 38, 0.95) !important;
    box-shadow: 0 0 0 2px rgba(55, 194, 108, 0.2) !important;
}

.quotes-filter-bar .filter-date-input {
    width: 150px !important;
    min-width: 150px !important;
    padding: 0.25rem 0.55rem 0.25rem 0.65rem !important;
    font-size: 0.8125rem !important;
    font-family: inherit !important;
    letter-spacing: normal !important;
    box-sizing: border-box !important;
    flex-shrink: 0;
}

.quotes-filter-bar .filter-date-input::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.65;
    padding: 0;
    margin-left: 6px;
    transition: opacity 0.2s ease;
}

.quotes-filter-bar .filter-date-input::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

/* Autocomplete ID Filter (Estrictamente compacto) */
.filter-field-id {
    position: relative;
    flex-shrink: 0;
}

.autocomplete-wrapper-id {
    width: 85px !important;
    flex-shrink: 0;
}

.filter-id-input {
    width: 100% !important;
    padding-left: 0.55rem !important;
    padding-right: 26px !important;
    font-size: 0.78rem !important;
}

.autocomplete-wrapper-id .autocomplete-clear-btn {
    right: 16px;
    font-size: 0.95rem;
}

.autocomplete-wrapper-id .autocomplete-caret {
    right: 6px;
    font-size: 0.6rem;
}

.autocomplete-dropdown-id {
    width: 230px;
}

/* Autocomplete Client Filter (Usa el espacio disponible de forma controlada) */
.filter-field-client {
    position: relative;
    flex: 1;
    min-width: 180px;
    max-width: 300px;
}

.filter-field-client .autocomplete-wrapper {
    position: relative;
    width: 100% !important;
}

/* Selects Estado y Pago con anchos proporcionales */
.filter-field-status {
    position: relative;
    flex-shrink: 0;
}

.filter-field-status .filter-select-compact {
    width: 120px !important;
    min-width: 120px !important;
    flex-shrink: 0;
    cursor: pointer;
}

.filter-field-payment {
    position: relative;
    flex-shrink: 0;
}

.filter-field-payment .filter-select-compact {
    width: 115px !important;
    min-width: 115px !important;
    flex-shrink: 0;
    cursor: pointer;
}

.autocomplete-input-box {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.filter-autocomplete-input {
    width: 100% !important;
    padding-right: 36px !important;
    text-overflow: ellipsis;
    cursor: text;
}

.autocomplete-clear-btn {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 3px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s ease;
    z-index: 2;
}

.autocomplete-clear-btn:hover {
    color: #ffffff;
}

.autocomplete-caret {
    position: absolute;
    right: 7px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 0.65rem;
    pointer-events: none;
    opacity: 0.6;
    transition: transform 0.2s ease;
}

.autocomplete-wrapper.open .autocomplete-caret {
    transform: translateY(-50%) rotate(180deg);
}

.autocomplete-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    width: 270px;
    max-height: 230px;
    overflow-y: auto;
    background: rgba(20, 26, 40, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    padding: 4px;
}

.autocomplete-wrapper.open .autocomplete-dropdown {
    display: block;
}

.autocomplete-option {
    padding: 7px 10px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 2px;
    transition: background 0.15s ease;
}

.autocomplete-option:hover,
.autocomplete-option.highlighted {
    background: rgba(55, 194, 108, 0.15);
}

.autocomplete-option.active {
    background: rgba(55, 194, 108, 0.25);
}

.autocomplete-opt-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #ffffff;
}

.autocomplete-opt-sub {
    font-size: 0.72rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.autocomplete-no-results {
    padding: 10px 12px;
    font-size: 0.78rem;
    color: var(--text-secondary);
    text-align: center;
}

/* Quotes Table - Dynamic page-fit adjustment matching Clientes view */
.quotes-table-scroll {
    max-height: calc(100vh - 355px);
    min-height: 362px;
    overflow-y: auto;
    overflow-x: auto;
}

.quotes-table-scroll tbody tr {
    height: 52px;
}

.quotes-table-scroll tbody td {
    height: 52px;
    padding: 0.5rem 1rem;
    box-sizing: border-box;
    vertical-align: middle;
}

.quotes-pagination-bar,
#clientsPaginationContainer {
    font-size: 0.85rem !important;
    color: var(--text-secondary);
}

#clientsPageInfo,
.quotes-pagination-bar > div:first-child {
    font-size: 0.85rem !important;
    color: var(--text-secondary);
}

.quotes-pagination-bar {
    margin-top: 1.15rem;
}

.quotes-pagination-bar a.btn-page-nav {
    text-decoration: none !important;
}

/* Ensure btn-page-nav never has underline */
.btn-page-nav,
.btn-page-nav:hover,
.btn-page-nav:focus,
.btn-page-nav:active {
    text-decoration: none !important;
}

/* Quotes Detail View: Enhanced Client Info & Status Cards */
.quotes-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.quotes-detail-actions {
    gap: 0.85rem;
}

.btn-detail-action {
    height: 38px;
    padding: 0 1.25rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.btn-detail-back,
.btn-detail-edit {
    background: rgba(30, 37, 50, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.btn-detail-back:hover,
.btn-detail-edit:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.22);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.btn-detail-pdf {
    background: linear-gradient(135deg, #37c26c 0%, #2ca85c 100%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(55, 194, 108, 0.28);
}

.btn-detail-pdf:hover {
    background: linear-gradient(135deg, #3edb7a 0%, #30b866 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(55, 194, 108, 0.42);
    color: #ffffff;
}

.btn-detail-action:active {
    transform: translateY(0);
}

.detail-subtitle {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--accent-green);
    margin-bottom: 2px;
}

.detail-hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: stretch;
}

.detail-hero-card {
    background: rgba(30, 37, 50, 0.45);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    padding: 1.4rem 1.6rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1.25rem;
    position: relative;
    overflow: visible;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.detail-hero-card:hover {
    border-color: rgba(255, 255, 255, 0.12);
}

.detail-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.detail-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.detail-header-icon-box {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 1rem;
    flex-shrink: 0;
}

.detail-header-icon-box.icon-green {
    background: rgba(55, 194, 108, 0.12);
    border-color: rgba(55, 194, 108, 0.25);
    color: var(--accent-green);
}

.detail-badge-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-secondary);
    display: block;
}

.detail-card-heading {
    margin: 2px 0 0 0;
    font-size: 1.125rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.2px;
}

.detail-rut-chip {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.775rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.detail-card-body {
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
    flex: 1;
}

.detail-client-main-block {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-client-company {
    font-size: 1.35rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.25;
}

.detail-contact-wrapper {
    background: rgba(18, 24, 38, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 0.85rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.detail-sub-heading {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.detail-contact-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.detail-contact-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: #ffffff;
}

.detail-contact-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.detail-contact-static-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 11px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    font-size: 0.785rem;
    font-weight: 500;
    cursor: default;
    user-select: text;
}

.detail-empty-contact {
    font-size: 0.825rem;
    color: var(--text-secondary);
    font-style: italic;
}

.detail-service-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-top: auto;
}

.detail-service-box {
    background: rgba(18, 24, 38, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    padding: 0.75rem 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-service-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 5px;
}

.detail-service-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: #ffffff;
}

.detail-badges-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-dates-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.detail-date-pill {
    background: rgba(18, 24, 38, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 0.75rem 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-date-strong {
    font-size: 0.95rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.2px;
}

/* Totals: Line 1 Subtotal & IVA, Line 2 Monto Total Green */
.detail-totals-container {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-top: auto;
}

.detail-totals-row-1 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(18, 24, 38, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 0.65rem 1.25rem;
}

.detail-mini-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.detail-stat-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
}

.detail-stat-val {
    font-size: 1.05rem;
    font-weight: 700;
    color: #ffffff;
}

.detail-stat-divider {
    width: 1px;
    height: 32px;
    background: rgba(255, 255, 255, 0.08);
}

.detail-total-box-green {
    background: radial-gradient(circle at top left, rgba(55, 194, 108, 0.14) 0%, rgba(18, 24, 38, 0.6) 80%);
    border: 1px solid rgba(55, 194, 108, 0.35);
    border-top: 2px solid rgba(55, 194, 108, 0.85);
    border-radius: 10px;
    padding: 0.75rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.detail-total-green-label {
    display: flex;
    align-items: center;
    gap: 8px;
}

.text-green-accent {
    color: var(--accent-green);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.detail-currency-tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(55, 194, 108, 0.15);
    border: 1px solid rgba(55, 194, 108, 0.3);
    color: var(--accent-green);
    font-size: 0.68rem;
    font-weight: 700;
}

.detail-total-green-val {
    font-size: 1.95rem;
    font-weight: 800;
    color: var(--accent-green);
    text-shadow: 0 0 25px rgba(55, 194, 108, 0.25);
    letter-spacing: -0.5px;
    line-height: 1;
}

@media (max-width: 992px) {
    .detail-hero-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Contenedor Mensaje de Seguimiento (Cotizaciones Vencidas)
   ========================================================================== */
.detail-followup-card {
    background: rgba(30, 37, 50, 0.55);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 14px;
    border: 1px solid rgba(245, 158, 11, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25), 0 0 24px rgba(245, 158, 11, 0.05);
    padding: 1.4rem 1.6rem;
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
    position: relative;
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.detail-followup-card:hover {
    border-color: rgba(245, 158, 11, 0.45);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 28px rgba(245, 158, 11, 0.08);
}

.detail-followup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    flex-wrap: wrap;
    gap: 12px;
}

.detail-header-icon-box.icon-amber {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.3);
    color: #f59e0b;
}

.followup-actions-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-followup-action {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #e2e8f0;
    font-size: 0.825rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-followup-action:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    transform: translateY(-1px);
}

.btn-followup-action.btn-copied {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.4);
    color: #10b981;
}

.btn-followup-action.btn-followup-send {
    background: #0284c7; /* Outlook Blue */
    border-color: #0369a1;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.3);
}

.btn-followup-action.btn-followup-send:hover {
    background: #0369a1;
    border-color: #075985;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.45);
}

.followup-meta-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding: 0.65rem 0.95rem;
    background: rgba(15, 23, 42, 0.45);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.825rem;
}

.followup-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
}

.followup-meta-item strong {
    color: #f1f5f9;
}

.followup-meta-divider {
    width: 1px;
    height: 14px;
    background: rgba(255, 255, 255, 0.1);
}

.followup-textarea {
    width: 100%;
    min-height: 220px;
    padding: 1rem 1.15rem;
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 9px;
    color: #f1f5f9;
    font-family: inherit;
    font-size: 0.9rem;
    line-height: 1.6;
    box-sizing: border-box;
    resize: vertical;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.followup-textarea:focus {
    outline: none;
    border-color: rgba(245, 158, 11, 0.6);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

.followup-footer-hints {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.775rem;
    color: var(--text-secondary);
    padding: 0 2px;
}

.btn-followup-reset {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.775rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 4px;
    transition: color 0.2s ease;
}

.btn-followup-reset:hover {
    color: #f59e0b;
    text-decoration: underline;
}

/* ==========================================================================
   Crear / Editar Cotización - Vista Mejorada y Acorde al Sistema
   ========================================================================== */

.create-top-actions {
    display: inline-flex;
    align-items: center;
    gap: 16px;
}

.quotes-create-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
}

.create-card {
    width: 100%;
    background: rgba(30, 37, 50, 0.45);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    padding: 1.4rem 1.6rem;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.create-card-step-1 {
    position: relative;
    z-index: 50;
}

.create-card-step-2 {
    position: relative;
    z-index: 20;
}

.create-card-step-3 {
    position: relative;
    z-index: 10;
}

.create-card:hover {
    border-color: rgba(255, 255, 255, 0.11);
}

.create-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 0.85rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.create-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.create-header-icon-box {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(55, 194, 108, 0.12);
    border: 1px solid rgba(55, 194, 108, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-green);
    font-size: 1rem;
    flex-shrink: 0;
}

.create-badge-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-secondary);
    display: block;
}

.create-card-heading {
    margin: 2px 0 0 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.2px;
}

/* Botón Agregar Ítem / Agregar Observación */
.btn-create-add {
    height: 36px;
    padding: 0 1.15rem;
    border-radius: 50px;
    background: rgba(55, 194, 108, 0.12);
    border: 1px solid rgba(55, 194, 108, 0.35);
    color: var(--accent-green);
    font-size: 0.825rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.btn-create-add:hover {
    background: linear-gradient(135deg, rgba(55, 194, 108, 0.25) 0%, rgba(44, 168, 92, 0.35) 100%);
    border-color: rgba(55, 194, 108, 0.6);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(55, 194, 108, 0.25);
}

.btn-create-add:active {
    transform: translateY(0);
}

.btn-create-add i {
    font-size: 0.775rem;
    transition: transform 0.2s ease;
}

.btn-create-add:hover i {
    transform: scale(1.15);
}

/* Grid de Datos Principales (3 Columnas) */
.create-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    align-items: start;
}

@media (max-width: 1024px) {
    .create-grid-3 {
        grid-template-columns: 1fr;
    }
}

.create-col {
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
}

.create-field-label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 0.45rem;
    color: var(--text-secondary);
    font-size: 0.775rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.create-field-label i {
    color: var(--accent-green);
    font-size: 0.8rem;
}

.create-input-styled {
    width: 100%;
    background: rgba(18, 24, 38, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: #ffffff;
    padding: 0.75rem 0.9rem;
    font-size: 0.875rem;
    outline: none;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.create-input-styled:focus {
    border-color: var(--accent-green);
    background: rgba(18, 24, 38, 0.85);
    box-shadow: 0 0 0 2px rgba(55, 194, 108, 0.15);
}

.create-input-styled.input-readonly {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    cursor: not-allowed;
    border-color: rgba(255, 255, 255, 0.05);
}

.create-search-wrapper {
    position: relative;
    width: 100%;
}

.create-search-wrapper .create-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 0.85rem;
    pointer-events: none;
}

.create-search-wrapper input {
    padding-left: 2.25rem;
}

.create-client-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.16);
    max-height: 260px;
    overflow-y: auto;
    border-radius: 10px;
    display: none;
    z-index: 99999;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.75);
}

.client-result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.client-result-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.client-result-btn-new {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0.75rem 1rem;
    color: var(--accent-green);
    background: rgba(55, 194, 108, 0.1);
    font-size: 0.825rem;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 1px solid rgba(55, 194, 108, 0.2);
    transition: all 0.2s ease;
}

.client-result-btn-new:hover {
    background: rgba(55, 194, 108, 0.2);
    color: #ffffff;
}

/* Tarjeta Cliente Seleccionado */
.selected-client-card {
    background: rgba(55, 194, 108, 0.08);
    border: 1px solid rgba(55, 194, 108, 0.3);
    border-radius: 10px;
    padding: 0.85rem 1rem;
    margin-top: 0.65rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.selected-client-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}

.selected-client-badge {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--accent-green);
    margin-bottom: 2px;
}

.selected-client-name {
    font-size: 0.975rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.3;
}

.selected-client-rut {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
}

.btn-create-add-contact {
    padding: 3px 10px;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-primary);
    font-size: 0.725rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-create-add-contact:hover {
    background: rgba(55, 194, 108, 0.2);
    border-color: rgba(55, 194, 108, 0.4);
    color: #ffffff;
}

/* Tabla de Ítems */
.create-table-container {
    background: rgba(18, 24, 38, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1.25rem;
}

.create-items-table {
    width: 100%;
    border-collapse: collapse;
}

.create-items-table thead th {
    background: rgba(28, 38, 54, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.create-items-table thead th:nth-child(1) { text-align: left; }
.create-items-table thead th:nth-child(2) { text-align: center; }
.create-items-table thead th:nth-child(3) { text-align: center; }
.create-items-table thead th:nth-child(4) { text-align: right; }
.create-items-table thead th:nth-child(5) { text-align: right; }
.create-items-table thead th:nth-child(6) { text-align: center; }

.create-items-table tbody td {
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    vertical-align: middle;
}

.create-items-table tbody td:nth-child(1) { text-align: left; }
.create-items-table tbody td:nth-child(2) { text-align: center; }
.create-items-table tbody td:nth-child(3) { text-align: center; }
.create-items-table tbody td:nth-child(4) { text-align: right; }
.create-items-table tbody td:nth-child(5) {
    text-align: right;
    font-weight: 700;
    color: #ffffff;
    font-size: 0.95rem;
    padding-right: 1rem;
    font-variant-numeric: tabular-nums;
}
.create-items-table tbody td:nth-child(6) { text-align: center; }

.create-items-table tbody tr:hover td {
    background: rgba(255, 255, 255, 0.015);
}

.create-items-table .item-desc {
    background: rgba(18, 24, 38, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    color: #ffffff;
    padding: 8px 10px;
    font-size: 0.85rem;
    resize: vertical;
    transition: all 0.2s ease;
    min-height: 42px;
    width: 100%;
    box-sizing: border-box;
    word-break: break-word;
    overflow-wrap: break-word;
}

.create-items-table .item-desc:focus,
.create-items-table .item-unit:focus,
.create-items-table .item-price:focus {
    border-color: var(--accent-green);
    background: rgba(18, 24, 38, 0.95);
    box-shadow: 0 0 0 2px rgba(55, 194, 108, 0.15);
}

/* Quantity Stepper (- and + buttons) */
.item-qty-stepper {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(18, 24, 38, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    height: 38px;
    width: 118px;
    padding: 2px 3px;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.item-qty-stepper:focus-within {
    border-color: var(--accent-green);
    box-shadow: 0 0 0 2px rgba(55, 194, 108, 0.15);
}

.btn-qty-step {
    width: 28px;
    height: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.75rem;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.15s ease;
    user-select: none;
    padding: 0;
}

.btn-qty-step:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.btn-qty-step:active {
    transform: scale(0.92);
}

.create-items-table .item-qty {
    flex: 1;
    width: 100%;
    min-width: 0;
    height: 100%;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: #ffffff;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0;
    outline: none !important;
    -moz-appearance: textfield;
}

.create-items-table .item-qty::-webkit-outer-spin-button,
.create-items-table .item-qty::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.create-items-table .item-unit {
    background: rgba(18, 24, 38, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    color: #ffffff;
    padding: 8px 10px;
    font-size: 0.85rem;
    width: 100%;
    box-sizing: border-box;
    outline: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.create-items-table .item-unit option {
    background: #111827;
    color: #ffffff;
}

.create-items-table .item-price {
    background: rgba(18, 24, 38, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    color: #ffffff;
    padding: 8px 10px;
    font-size: 0.85rem;
    text-align: right;
    font-weight: 600;
    width: 100%;
    box-sizing: border-box;
}

.create-items-table .btn-danger,
#observationsContainer .btn-danger {
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 8px;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #f87171;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.create-items-table .btn-danger:hover,
#observationsContainer .btn-danger:hover {
    background: rgba(239, 68, 68, 0.25);
    border-color: rgba(239, 68, 68, 0.5);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}

/* Totales de la Cotización */
.create-totals-wrapper {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.5rem;
}

.create-totals-card {
    min-width: 340px;
    background: rgba(18, 24, 38, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1rem 1.35rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.create-totals-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.create-totals-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.create-totals-val {
    font-size: 0.95rem;
    font-weight: 600;
    color: #ffffff;
    font-variant-numeric: tabular-nums;
}

.create-totals-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 2px 0;
}

.create-totals-final {
    padding-top: 4px;
}

.create-totals-final-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.create-totals-badge-clp {
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(55, 194, 108, 0.15);
    border: 1px solid rgba(55, 194, 108, 0.3);
    color: var(--accent-green);
    font-size: 0.68rem;
    font-weight: 700;
}

.create-totals-highlight {
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--accent-green);
    letter-spacing: -0.3px;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 0 20px rgba(55, 194, 108, 0.25);
}

/* Tarjeta Observaciones */
#observationsContainer {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

#observationsContainer .form-group {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 0;
    background: rgba(18, 24, 38, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    transition: border-color 0.2s ease;
}

#observationsContainer .form-group:hover {
    border-color: rgba(255, 255, 255, 0.1);
}

#observationsContainer .obs-text {
    flex: 1;
    background: rgba(18, 24, 38, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: #ffffff;
    padding: 0.65rem 0.85rem;
    font-size: 0.85rem;
    line-height: 1.45;
    resize: vertical;
    min-height: 48px;
    outline: none;
    transition: all 0.2s ease;
}

#observationsContainer .obs-text:focus {
    border-color: var(--accent-green);
    background: rgba(18, 24, 38, 0.85);
    box-shadow: 0 0 0 2px rgba(55, 194, 108, 0.15);
}

/* ==========================================================================
   Modales de la Vista Cotización: Unidades y Contacto
   ========================================================================== */

.modal-card-units,
.modal-card-contact {
    width: 480px;
    max-width: 95%;
    background: rgba(18, 24, 38, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.65);
}

.add-unit-box {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.add-unit-input-wrap {
    position: relative;
    flex: 1;
}

.add-unit-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 0.8rem;
    pointer-events: none;
}

.add-unit-input-wrap input {
    width: 100%;
    padding: 0.65rem 0.85rem 0.65rem 2.2rem;
    background: rgba(18, 24, 38, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #ffffff;
    font-size: 0.85rem;
    outline: none;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.add-unit-input-wrap input:focus {
    border-color: var(--accent-green);
    background: rgba(18, 24, 38, 0.9);
    box-shadow: 0 0 0 2px rgba(55, 194, 108, 0.15);
}

.btn-add-unit {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.65rem 1rem;
    background: linear-gradient(135deg, #2ca85c 0%, #1e7e43 100%);
    border: 1px solid rgba(55, 194, 108, 0.4);
    border-radius: 8px;
    color: #ffffff;
    font-size: 0.825rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.btn-add-unit:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(55, 194, 108, 0.3);
    filter: brightness(1.1);
}

.units-list-container {
    max-height: 280px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-right: 4px;
}

.unit-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 0.65rem 0.9rem;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.unit-item-row:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.12);
}

.unit-item-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #ffffff;
}

.unit-item-label i {
    color: var(--accent-green);
    font-size: 0.8rem;
    opacity: 0.85;
}

.unit-default-badge {
    padding: 3px 8px;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.btn-unit-action {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 0.775rem;
    transition: all 0.15s ease;
}

.btn-unit-edit {
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #60a5fa;
}

.btn-unit-edit:hover {
    background: rgba(59, 130, 246, 0.25);
    color: #ffffff;
    transform: translateY(-1px);
}

.btn-unit-delete {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
}

.btn-unit-delete:hover {
    background: rgba(239, 68, 68, 0.25);
    color: #ffffff;
    transform: translateY(-1px);
}

/* Inline Unit Editing */
.unit-item-row.unit-editing {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent-green);
    box-shadow: 0 0 12px rgba(55, 194, 108, 0.2);
}

.unit-inline-input:focus {
    border-color: var(--accent-green);
    box-shadow: 0 0 0 2px rgba(55, 194, 108, 0.25);
}

/* ==========================================================================
   Modal Guardar Borrador (Liquid Glass Dark Styling)
   ========================================================================== */

.modal-card-draft {
    width: 520px;
    max-width: 95%;
    background: rgba(18, 24, 38, 0.98);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(96, 165, 250, 0.25);
    border-radius: 16px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.75), 0 0 30px rgba(59, 130, 246, 0.12);
    overflow: hidden;
    animation: modalFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.draft-modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(30, 41, 59, 0.4);
}

.draft-header-icon-box {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    color: #60a5fa;
    background: radial-gradient(circle at center, rgba(96, 165, 250, 0.25) 0%, rgba(37, 99, 235, 0.15) 100%);
    border: 1px solid rgba(96, 165, 250, 0.35);
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.25);
}

.draft-modal-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.2px;
}

.draft-modal-subtitle {
    font-size: 0.775rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.draft-modal-body {
    padding: 1.5rem;
}

.draft-lead-text {
    font-size: 0.9rem;
    color: #cbd5e1;
    line-height: 1.5;
    margin: 0 0 1.25rem 0;
}

.draft-single-card-wrap {
    margin-bottom: 1.25rem;
}

.draft-single-card-wrap .draft-info-card {
    width: 100%;
    box-sizing: border-box;
    padding: 1rem 1.2rem;
    border-radius: 12px;
}

.draft-info-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 10px;
    padding: 0.9rem 1rem;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    transition: all 0.2s ease;
}

.draft-info-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(96, 165, 250, 0.3);
}

.draft-info-card-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: rgba(96, 165, 250, 0.12);
    color: #60a5fa;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.draft-info-card-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.draft-info-card-content strong {
    font-size: 0.8rem;
    color: #ffffff;
    font-weight: 600;
}

.draft-info-card-content span {
    font-size: 0.72rem;
    color: var(--text-secondary);
    line-height: 1.35;
}

.draft-discard-note {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
    color: #fbbf24;
}

.draft-discard-note i {
    font-size: 0.9rem;
    flex-shrink: 0;
}

.draft-modal-footer {
    padding: 1rem 1.5rem;
    background: rgba(10, 15, 26, 0.65);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}

/* Close Button (Circular Liquid Glass Icon Button) */
.btn-modal-close {
    appearance: none;
    -webkit-appearance: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.85rem;
    line-height: 1;
    padding: 0;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    box-sizing: border-box;
}

.btn-modal-close:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.28);
    color: #ffffff;
    transform: rotate(90deg) scale(1.08);
}

/* Draft Modal Action Pills (Matching System Pill Button System) */
.btn-draft-pill {
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 38px;
    padding: 0 1.25rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.2px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none !important;
    box-sizing: border-box;
    white-space: nowrap;
    border: 1px solid transparent;
}

.btn-draft-discard {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #f87171;
}

.btn-draft-discard:hover {
    background: rgba(239, 68, 68, 0.22);
    border-color: rgba(239, 68, 68, 0.6);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3);
    transform: translateY(-1px);
}

.btn-draft-cancel {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: var(--text-primary);
}

.btn-draft-cancel:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.28);
    color: #ffffff;
    transform: translateY(-1px);
}

.btn-draft-confirm {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: 1px solid rgba(147, 197, 253, 0.4);
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.38);
}

.btn-draft-confirm:hover {
    background: linear-gradient(135deg, #60a5fa 0%, #2563eb 100%);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.55);
    border-color: rgba(191, 219, 254, 0.6);
    transform: translateY(-1px);
}

.btn-draft-pill:active {
    transform: translateY(0);
}

.btn-draft-top-action {
    height: 38px !important;
    padding: 0 1.25rem !important;
    border-radius: 50px !important;
    background: rgba(59, 130, 246, 0.12) !important;
    border: 1px solid rgba(96, 165, 250, 0.38) !important;
    color: #93c5fd !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.2px;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-sizing: border-box !important;
    cursor: pointer !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
    white-space: nowrap !important;
    text-decoration: none !important;
    font-family: inherit !important;
    line-height: 1 !important;
}

.btn-draft-top-action:hover {
    background: rgba(59, 130, 246, 0.24) !important;
    border-color: rgba(147, 197, 253, 0.65) !important;
    color: #ffffff !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.3) !important;
}

.btn-draft-top-action:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.2) !important;
}

.btn-draft-top-action i {
    font-size: 0.82rem;
    transition: transform 0.2s ease;
}

.btn-draft-top-action:hover i {
    transform: scale(1.12);
}

/* ==========================================================================
   Modal Global Confirm / Alert (Liquid Glass Context Dialog)
   ========================================================================== */

.modal-card-dialog {
    width: 440px;
    max-width: 92%;
    background: rgba(18, 24, 38, 0.98);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.75), 0 0 30px rgba(255, 255, 255, 0.04);
    overflow: hidden;
    position: relative;
    animation: modalFadeIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.confirm-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
}

.confirm-dialog-header {
    padding: 1.35rem 1.5rem 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.02);
}

.confirm-icon-box {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.confirm-icon-danger {
    background: radial-gradient(circle at center, rgba(239, 68, 68, 0.25) 0%, rgba(220, 38, 38, 0.12) 100%);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #f87171;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.2);
}

.confirm-icon-warning {
    background: radial-gradient(circle at center, rgba(245, 158, 11, 0.25) 0%, rgba(217, 119, 6, 0.12) 100%);
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: #fbbf24;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.2);
}

.confirm-icon-success {
    background: radial-gradient(circle at center, rgba(55, 194, 108, 0.25) 0%, rgba(22, 163, 74, 0.12) 100%);
    border: 1px solid rgba(55, 194, 108, 0.4);
    color: var(--accent-green);
    box-shadow: 0 4px 14px rgba(55, 194, 108, 0.2);
}

.confirm-icon-info {
    background: radial-gradient(circle at center, rgba(59, 130, 246, 0.25) 0%, rgba(37, 99, 235, 0.12) 100%);
    border: 1px solid rgba(59, 130, 246, 0.4);
    color: #60a5fa;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.2);
}

.confirm-icon-currency {
    background: radial-gradient(circle at center, rgba(16, 185, 129, 0.25) 0%, rgba(5, 150, 105, 0.12) 100%);
    border: 1px solid rgba(52, 211, 153, 0.45);
    color: var(--accent-green);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.2);
}

.confirm-dialog-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.2px;
}

.confirm-dialog-subtitle {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.confirm-dialog-body {
    padding: 1.25rem 1.5rem;
}

.confirm-dialog-message {
    color: #cbd5e1;
    font-size: 0.9rem;
    line-height: 1.55;
}

.confirm-dialog-footer {
    padding: 0.9rem 1.5rem;
    background: rgba(10, 15, 26, 0.65);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
}

.confirm-dialog-footer .btn {
    border-radius: 50px !important;
    height: 36px;
    padding: 0 1.25rem !important;
    font-weight: 600;
}

/* ==========================================================================
   Table Status & Payment Dropdowns (Liquid Glass Capsule Badges)
   ========================================================================== */

.table-status-dropdown {
    position: relative;
    display: inline-flex;
    justify-content: center;
    align-items: center;
}

.table-status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0.32rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.25px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #e2e8f0;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    outline: none;
    user-select: none;
    min-width: 108px;
    box-sizing: border-box;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.table-status-pill:hover {
    transform: translateY(-1px);
    filter: brightness(1.15);
}

.table-status-pill:active,
.table-status-pill.active {
    transform: translateY(0);
    filter: brightness(1.2);
}

.pill-dot {
    width: 6.5px;
    height: 6.5px;
    border-radius: 50%;
    flex-shrink: 0;
    display: inline-block;
}

.pill-caret {
    font-size: 0.58rem;
    opacity: 0.6;
    transition: transform 0.2s ease, opacity 0.2s ease;
    margin-left: 2px;
}

.table-status-pill:hover .pill-caret {
    opacity: 0.9;
}

.table-status-pill.active .pill-caret {
    transform: rotate(180deg);
    opacity: 1;
}

/* Status: Aceptada / Pagada (Emerald Green) */
.table-status-pill.pill-aceptada,
.table-status-pill.pill-pagada {
    background: rgba(55, 194, 108, 0.12);
    color: #4ade80;
    border-color: rgba(55, 194, 108, 0.3);
}

.table-status-pill.pill-aceptada:hover,
.table-status-pill.pill-pagada:hover,
.table-status-pill.pill-aceptada.active,
.table-status-pill.pill-pagada.active {
    background: rgba(55, 194, 108, 0.2);
    border-color: rgba(55, 194, 108, 0.45);
    box-shadow: 0 0 12px rgba(55, 194, 108, 0.25);
}

.table-status-pill.pill-aceptada .pill-dot,
.table-status-pill.pill-pagada .pill-dot,
.pill-dot.dot-accepted {
    background: #4ade80;
    box-shadow: 0 0 6px rgba(74, 222, 128, 0.8);
}

/* Status: Pendiente / No Pagada (Amber Warning) */
.table-status-pill.pill-pendiente,
.table-status-pill.pill-no-pagada {
    background: rgba(245, 158, 11, 0.12);
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.3);
}

.table-status-pill.pill-pendiente:hover,
.table-status-pill.pill-no-pagada:hover,
.table-status-pill.pill-pendiente.active,
.table-status-pill.pill-no-pagada.active {
    background: rgba(245, 158, 11, 0.2);
    border-color: rgba(245, 158, 11, 0.45);
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.25);
}

.table-status-pill.pill-pendiente .pill-dot,
.table-status-pill.pill-no-pagada .pill-dot,
.pill-dot.dot-pending {
    background: #fbbf24;
    box-shadow: 0 0 6px rgba(251, 191, 36, 0.8);
}

/* Status: Rechazada (Crimson Red) */
.table-status-pill.pill-rechazada {
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.3);
}

.table-status-pill.pill-rechazada:hover,
.table-status-pill.pill-rechazada.active {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.45);
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.25);
}

.table-status-pill.pill-rechazada .pill-dot,
.pill-dot.dot-rejected {
    background: #f87171;
    box-shadow: 0 0 6px rgba(248, 113, 113, 0.8);
}

/* Status: Vencida (Muted Gray / Slate) */
.table-status-pill.pill-vencida {
    background: rgba(156, 163, 175, 0.12);
    color: #9ca3af;
    border-color: rgba(156, 163, 175, 0.28);
}

.table-status-pill.pill-vencida:hover,
.table-status-pill.pill-vencida.active {
    background: rgba(156, 163, 175, 0.2);
    border-color: rgba(156, 163, 175, 0.4);
    box-shadow: 0 0 10px rgba(156, 163, 175, 0.2);
}

.table-status-pill.pill-vencida .pill-dot,
.pill-dot.dot-expired {
    background: #9ca3af;
    box-shadow: 0 0 6px rgba(156, 163, 175, 0.6);
}

/* Status: Borrador (Ocean / Sky Blue) */
.table-status-pill.pill-borrador {
    background: rgba(59, 130, 246, 0.12);
    color: #60a5fa;
    border-color: rgba(59, 130, 246, 0.3);
    cursor: default;
}

.table-status-pill.pill-borrador:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.45);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.25);
}

.table-status-pill.pill-borrador .pill-dot,
.pill-dot.dot-draft {
    background: #60a5fa;
    box-shadow: 0 0 6px rgba(96, 165, 250, 0.8);
}

/* Floating Liquid Glass Status Menu */
.table-status-menu {
    background: rgba(15, 23, 42, 0.94) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    border-radius: 10px !important;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.05) !important;
    padding: 5px !important;
    min-width: 145px !important;
    box-sizing: border-box;
    animation: statusMenuFadeIn 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes statusMenuFadeIn {
    from {
        opacity: 0;
        transform: scale(0.96) translateY(-4px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.table-status-menu-header {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-secondary);
    padding: 4px 8px 5px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 4px;
    text-align: left;
    user-select: none;
}

.table-status-opt {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 500;
    color: #e2e8f0;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
    text-align: left;
}

.table-status-opt:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.table-status-opt.selected {
    background: rgba(255, 255, 255, 0.05);
    font-weight: 600;
}

.table-status-opt .opt-label {
    flex: 1;
}

.table-status-opt .opt-check {
    margin-left: auto;
    font-size: 0.72rem;
    color: var(--accent-green);
}

/* Empty dash for non-applicable status */
.table-status-dash {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.9rem;
    font-weight: 500;
    display: inline-block;
    user-select: none;
}

/* ==========================================================================
   Modal Visualizador de PDF (Dark Liquid Glass Experience)
   ========================================================================== */

.modal-card-pdf-viewer {
    width: 1040px;
    max-width: 95vw;
    height: 92vh;
    max-height: 94vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: rgba(13, 17, 28, 0.98);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.8), 0 0 40px rgba(0, 0, 0, 0.5);
    animation: modalFadeIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.pdf-viewer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1.35rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
    flex-shrink: 0;
}

.pdf-header-icon-box {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: radial-gradient(circle at center, rgba(239, 68, 68, 0.24) 0%, rgba(220, 38, 38, 0.1) 100%);
    border: 1px solid rgba(239, 68, 68, 0.38);
    color: #f87171;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

.pdf-viewer-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    letter-spacing: -0.2px;
}

.pdf-viewer-subtitle {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.pdf-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-pdf-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 34px;
    padding: 0 1.15rem;
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none !important;
    border: 1px solid transparent;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
    white-space: nowrap;
}

.btn-pdf-pill-download {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-color: rgba(110, 231, 183, 0.4);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(5, 150, 105, 0.35);
}

.btn-pdf-pill-download:hover {
    background: linear-gradient(135deg, #34d399 0%, #059669 100%);
    border-color: rgba(167, 243, 208, 0.6);
    box-shadow: 0 6px 20px rgba(5, 150, 105, 0.5);
    transform: translateY(-1px);
    color: #ffffff;
}

.btn-pdf-pill-secondary {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    color: #cbd5e1;
    padding: 0 0.85rem;
}

.btn-pdf-pill-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
    color: #ffffff;
    transform: translateY(-1px);
}

.pdf-viewer-body {
    flex-grow: 1;
    position: relative;
    width: 100%;
    height: 100%;
    background: #0d121f;
    overflow: hidden;
}

.pdf-preview-iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: #1e2433;
    display: block;
}

.pdf-loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(13, 17, 28, 0.94);
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    z-index: 10;
}

/* Alerta visual dentro del Modal de PDF */
.pdf-viewer-notification {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.35rem;
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.22) 0%, rgba(5, 150, 105, 0.16) 100%);
    border-bottom: 1px solid rgba(52, 211, 153, 0.4);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 4px 18px rgba(0, 0, 0, 0.35);
    animation: notifSlideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    flex-shrink: 0;
}

.pdf-notif-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pdf-notif-icon {
    color: #34d399;
    font-size: 1.25rem;
    filter: drop-shadow(0 0 8px rgba(52, 211, 153, 0.7));
}

.pdf-notif-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pdf-notif-text strong {
    font-size: 0.88rem;
    color: #ffffff;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.pdf-notif-text span {
    font-size: 0.78rem;
    color: #a7f3d0;
}

.pdf-notif-close {
    background: transparent;
    border: none;
    color: #a7f3d0;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 6px;
    opacity: 0.75;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.pdf-notif-close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

.btn-pdf-pill-success {
    background: linear-gradient(135deg, #10b981 0%, #047857 100%) !important;
    border-color: #6ee7b7 !important;
    color: #ffffff !important;
    box-shadow: 0 0 18px rgba(16, 185, 129, 0.65) !important;
}

@keyframes notifSlideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   Contenedor Global de Notificaciones Toast Flotantes (Top Center)
   ========================================================================== */
.global-toast-container {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    pointer-events: none;
}

.global-toast {
    pointer-events: auto;
    background: rgba(13, 20, 28, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    padding: 13px 20px;
    color: #ffffff;
    min-width: 340px;
    max-width: 540px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.65), 0 0 24px rgba(16, 185, 129, 0.25);
    animation: toastSlideDown 0.32s cubic-bezier(0.16, 1, 0.3, 1);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.global-toast-success {
    border-color: rgba(52, 211, 153, 0.5);
}

.global-toast-danger {
    border-color: rgba(248, 113, 113, 0.5);
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.65), 0 0 24px rgba(239, 68, 68, 0.25);
}

.global-toast-info {
    border-color: rgba(96, 165, 250, 0.5);
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.65), 0 0 24px rgba(59, 130, 246, 0.25);
}

.global-toast-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.global-toast-success .global-toast-icon {
    background: rgba(16, 185, 129, 0.18);
    color: #34d399;
    box-shadow: 0 0 14px rgba(16, 185, 129, 0.4);
}

.global-toast-danger .global-toast-icon {
    background: rgba(239, 68, 68, 0.18);
    color: #f87171;
    box-shadow: 0 0 14px rgba(239, 68, 68, 0.4);
}

.global-toast-info .global-toast-icon {
    background: rgba(59, 130, 246, 0.18);
    color: #60a5fa;
    box-shadow: 0 0 14px rgba(59, 130, 246, 0.4);
}

.global-toast-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex-grow: 1;
}

.global-toast-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.1px;
}

.global-toast-msg {
    font-size: 0.79rem;
    color: #cbd5e1;
    line-height: 1.35;
    word-break: break-word;
}

.global-toast-close {
    background: transparent;
    border: none;
    color: #64748b;
    cursor: pointer;
    font-size: 0.95rem;
    padding: 6px;
    border-radius: 6px;
    transition: all 0.2s ease;
    margin-left: 4px;
}

.global-toast-close:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    transform: scale(1.1);
}

@keyframes toastSlideDown {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ==========================================================================
   Gestor de Sesión en el Selector de Vistas (Botón P + Dropdown)
   ========================================================================== */
.nav-user-dropdown-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.nav-user-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px 6px 8px;
    border-radius: 50px;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 500;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    outline: none;
    user-select: none;
}

.nav-user-trigger:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.nav-user-dropdown-wrapper.open .nav-user-trigger {
    background: rgba(46, 204, 113, 0.14);
    border-color: rgba(46, 204, 113, 0.35);
    color: #ffffff;
    box-shadow: 0 0 16px rgba(46, 204, 113, 0.2);
}

.nav-user-avatar {
    width: 24px;
    height: 24px;
    border-radius: 5px;
    object-fit: contain;
    flex-shrink: 0;
    filter: drop-shadow(0 0 4px rgba(46, 204, 113, 0.4));
    transition: transform 0.2s ease;
}

.nav-user-trigger:hover .nav-user-avatar {
    transform: scale(1.08);
}

.nav-user-name {
    font-weight: 600;
    font-size: 0.86rem;
    color: #ffffff;
    white-space: nowrap;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-user-chevron {
    font-size: 0.65rem;
    color: #94a3b8;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s;
    margin-left: 2px;
}

.nav-user-dropdown-wrapper.open .nav-user-chevron {
    transform: rotate(180deg);
    color: #2ecc71;
}

.nav-user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    min-width: 240px;
    background: rgba(13, 18, 30, 0.98);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.75), 0 0 25px rgba(46, 204, 113, 0.15);
    padding: 8px;
    display: none;
    z-index: 100010;
    animation: userDropdownAnim 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-user-dropdown-wrapper.open .nav-user-dropdown {
    display: block;
}

.nav-user-dropdown-header {
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 6px;
}

.nav-dropdown-avatar {
    font-size: 1.85rem;
    color: #2ecc71;
    line-height: 1;
    flex-shrink: 0;
    filter: drop-shadow(0 0 8px rgba(46, 204, 113, 0.35));
}

.nav-dropdown-userinfo {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.nav-dropdown-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-dropdown-email {
    font-size: 0.72rem;
    color: #94a3b8;
    line-height: 1.2;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-dropdown-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.68rem;
    color: #34d399;
    font-weight: 600;
    margin-top: 4px;
}

.badge-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 6px #34d399;
}

.nav-user-dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 4px 4px;
}

.nav-user-menu-item {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 11px !important;
    width: 100% !important;
    padding: 9px 12px !important;
    border-radius: 8px !important;
    border: none !important;
    background: transparent !important;
    color: #cbd5e1;
    font-size: 0.84rem !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    text-decoration: none !important;
    transition: all 0.18s ease !important;
    text-align: left !important;
    box-sizing: border-box !important;
    font-family: inherit !important;
    margin: 0 !important;
}

.nav-user-menu-item i {
    font-size: 0.95rem !important;
    width: 18px !important;
    min-width: 18px !important;
    text-align: center !important;
    color: #94a3b8;
    transition: color 0.18s ease, transform 0.18s ease !important;
    flex-shrink: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.nav-user-menu-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    transform: translateX(2px);
}

.nav-user-menu-item:hover i {
    color: #2ecc71;
    transform: scale(1.1);
}

.nav-user-menu-logout {
    color: #f87171;
}

.nav-user-menu-logout i {
    color: #f87171;
}

.nav-user-menu-logout:hover {
    background: rgba(239, 68, 68, 0.14) !important;
    color: #fca5a5 !important;
}

.nav-user-menu-logout:hover i {
    color: #fca5a5 !important;
}

@keyframes userDropdownAnim {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ==========================================================================
   Vistas de Autenticación (Login & Registro)
   ========================================================================== */
.auth-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #080b12;
    position: relative;
    overflow-x: hidden;
    margin: 0;
    padding: 24px;
    box-sizing: border-box;
}

.auth-ambient-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(140px);
    pointer-events: none;
    opacity: 0.35;
    z-index: 0;
}

.auth-glow-1 {
    top: -12%;
    left: 18%;
    width: 520px;
    height: 520px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.42) 0%, transparent 70%);
}

.auth-glow-2 {
    bottom: -12%;
    right: 18%;
    width: 480px;
    height: 480px;
    background: radial-gradient(circle, rgba(5, 150, 105, 0.35) 0%, transparent 70%);
}

.auth-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
}

.auth-card {
    background: rgba(14, 20, 32, 0.94);
    backdrop-filter: blur(32px);
    -webkit-backdrop-filter: blur(32px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    padding: 2.2rem 2.2rem;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8), 0 0 35px rgba(16, 185, 129, 0.16);
    animation: authCardIn 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes authCardIn {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.auth-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-logo-box {
    width: 58px;
    height: 58px;
    border-radius: 14px;
    background: rgba(16, 185, 129, 0.14);
    border: 1px solid rgba(16, 185, 129, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.1rem;
    box-shadow: 0 0 24px rgba(16, 185, 129, 0.3);
}

.auth-logo-img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.auth-title {
    font-size: 1.45rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 4px;
    letter-spacing: -0.3px;
}

.auth-subtitle {
    font-size: 0.82rem;
    color: #94a3b8;
    margin: 0;
    line-height: 1.4;
}

.auth-alerts-container {
    margin-bottom: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.auth-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 0.82rem;
    line-height: 1.35;
}

.auth-alert-danger, .auth-alert-error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #fca5a5;
}

.auth-alert-warning {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.35);
    color: #fcd34d;
}

.auth-alert-success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #6ee7b7;
}

.auth-alert-info {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.35);
    color: #93c5fd;
}

.auth-form-group {
    margin-bottom: 1.15rem;
}

.auth-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #cbd5e1;
    margin-bottom: 6px;
}

.auth-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input-icon {
    position: absolute;
    left: 14px;
    color: #64748b;
    font-size: 0.92rem;
    pointer-events: none;
    transition: color 0.2s;
}

.auth-input {
    width: 100%;
    height: 44px;
    padding: 0 42px 0 40px;
    background: rgba(11, 15, 25, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    color: #ffffff;
    font-size: 0.88rem;
    font-family: inherit;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.auth-input:focus {
    outline: none;
    border-color: #34d399;
    box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.2);
    background: rgba(11, 15, 25, 0.95);
}

.auth-input:focus + .auth-input-icon,
.auth-input-wrapper:focus-within .auth-input-icon {
    color: #34d399;
}

.auth-toggle-pwd {
    position: absolute;
    right: 12px;
    background: transparent;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 5px;
    font-size: 0.92rem;
    border-radius: 4px;
    transition: color 0.2s;
}

.auth-toggle-pwd:hover {
    color: #ffffff;
}

.auth-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.auth-checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: #94a3b8;
    cursor: pointer;
    user-select: none;
}

.auth-checkbox {
    accent-color: #10b981;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.auth-btn-submit {
    width: 100%;
    height: 44px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: 1px solid rgba(110, 231, 183, 0.4);
    border-radius: 10px;
    color: #ffffff;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 18px rgba(5, 150, 105, 0.4);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: inherit;
}

.auth-btn-submit:hover {
    background: linear-gradient(135deg, #34d399 0%, #059669 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(5, 150, 105, 0.55);
}

.auth-btn-submit:active {
    transform: translateY(0);
}

.auth-credentials-hint {
    margin-top: 1.4rem;
    padding: 11px 14px;
    background: rgba(16, 185, 129, 0.08);
    border: 1px dashed rgba(52, 211, 153, 0.35);
    border-radius: 10px;
    font-size: 0.74rem;
    color: #94a3b8;
}

.auth-hint-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    color: #34d399;
    margin-bottom: 4px;
    font-size: 0.76rem;
}

.auth-hint-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.auth-hint-body code {
    background: rgba(0, 0, 0, 0.4);
    padding: 1px 6px;
    border-radius: 4px;
    color: #6ee7b7;
    font-family: monospace;
    font-size: 0.76rem;
}

.auth-footer {
    text-align: center;
    margin-top: 1.3rem;
    font-size: 0.8rem;
    color: #64748b;
}

.auth-link {
    color: #34d399;
    font-weight: 600;
    text-decoration: none;
    margin-left: 4px;
    transition: color 0.2s;
}

.auth-link:hover {
    color: #6ee7b7;
    text-decoration: underline;
}

/* ==========================================================================
   Modal Editar Perfil de Usuario
   ========================================================================== */
.modal-card-profile {
    max-width: 480px;
    width: 92%;
}

.profile-header-icon-box {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(16, 185, 129, 0.16);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #34d399;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
    box-shadow: 0 0 14px rgba(16, 185, 129, 0.3);
}

.profile-modal-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
}

.profile-modal-subtitle {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.profile-section-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.3rem 0 1rem;
    color: #94a3b8;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.profile-section-divider::before,
.profile-section-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.profile-section-divider span {
    padding: 0 10px;
}

/* ==========================================================================
   Profile Modal Footer & Centered System Style Buttons
   ========================================================================== */
.profile-form {
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    width: 100%;
}

.profile-modal-body {
    padding: 1.25rem 1.5rem !important;
}

.profile-modal-body .form-group:last-child {
    margin-bottom: 0 !important;
}

.profile-modal-footer {
    height: 64px !important;
    min-height: 64px !important;
    max-height: 64px !important;
    padding: 0 1.5rem !important;
    background: rgba(10, 15, 26, 0.75) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
    gap: 12px !important;
    border-bottom-left-radius: 14px;
    border-bottom-right-radius: 14px;
    box-sizing: border-box !important;
    flex-shrink: 0 !important;
}

.btn-profile-cancel {
    height: 38px !important;
    min-width: 120px;
    padding: 0 1.5rem !important;
    border-radius: 50px !important;
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
    color: #e2e8f0 !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.2px;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 7px !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    font-family: inherit !important;
    box-sizing: border-box !important;
    outline: none !important;
    margin: 0 !important;
}

.btn-profile-cancel:hover {
    background: rgba(255, 255, 255, 0.13) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    color: #ffffff !important;
    transform: translateY(-1px);
}

.btn-profile-save {
    height: 38px !important;
    min-width: 155px;
    padding: 0 1.6rem !important;
    border-radius: 50px !important;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    border: 1px solid rgba(110, 231, 183, 0.45) !important;
    color: #ffffff !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.2px;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    box-shadow: 0 2px 10px rgba(5, 150, 105, 0.35) !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    font-family: inherit !important;
    box-sizing: border-box !important;
    outline: none !important;
    margin: 0 !important;
}

.btn-profile-save:hover {
    background: linear-gradient(135deg, #34d399 0%, #059669 100%) !important;
    box-shadow: 0 6px 18px rgba(5, 150, 105, 0.5) !important;
    border-color: rgba(110, 231, 183, 0.6) !important;
    transform: translateY(-1px);
}

.btn-profile-save:active, .btn-profile-cancel:active {
    transform: translateY(0) !important;
}

/* ==========================================================================
   Currency Badges & Interactive Selectors (CLP, UF, USD)
   ========================================================================== */
.badge-currency {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 3px 8px;
    font-size: 0.72rem;
    font-weight: 700;
    border-radius: 6px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    white-space: nowrap;
    line-height: 1.2;
    transition: all 0.2s ease;
}

.badge-currency-clp {
    background: rgba(16, 185, 129, 0.15) !important;
    border: 1px solid rgba(52, 211, 153, 0.45) !important;
    color: #34d399 !important;
}

.badge-currency-uf {
    background: rgba(14, 165, 233, 0.15) !important;
    border: 1px solid rgba(56, 189, 248, 0.45) !important;
    color: #38bdf8 !important;
}

.badge-currency-usd {
    background: rgba(245, 158, 11, 0.15) !important;
    border: 1px solid rgba(251, 191, 36, 0.45) !important;
    color: #fbbf24 !important;
}

/* Interactive Currency Selector Pill (Crear Cotización & Detalle) */
.currency-selector-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.currency-badge-btn {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 6px;
    border: 1px solid transparent;
    transition: all 0.15s ease;
    user-select: none;
    font-family: inherit;
}

.currency-badge-btn i.fa-chevron-down {
    font-size: 0.62rem;
    opacity: 0.75;
    transition: transform 0.2s ease;
}

.currency-badge-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.currency-dropdown-menu {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.65);
    padding: 4px;
    min-width: 140px;
    z-index: 999999 !important;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.currency-dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 5px;
    font-size: 0.78rem;
    color: #e2e8f0;
    cursor: pointer;
    transition: all 0.15s ease;
}

.currency-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.currency-dropdown-item.active {
    background: rgba(16, 185, 129, 0.18);
    color: #34d399;
    font-weight: 700;
}

/* Dashboard Hero Card Quick Currency Switcher & Alert Badges */
.kpi-curr-switcher {
    display: inline-flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50px;
    padding: 2px 3px;
    gap: 3px;
    margin-right: 8px;
    position: relative;
    z-index: 5;
}

.kpi-curr-btn {
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.18s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    position: relative;
    user-select: none;
    font-family: inherit;
    line-height: 1.2;
}

.kpi-curr-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

.kpi-curr-btn.active {
    background: rgba(16, 185, 129, 0.25) !important;
    color: #34d399 !important;
    border: 1px solid rgba(52, 211, 153, 0.45);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.25);
}

.kpi-card-paid .kpi-curr-btn.active {
    background: rgba(16, 185, 129, 0.25) !important;
    color: #34d399 !important;
    border: 1px solid rgba(52, 211, 153, 0.45);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.25);
}

.kpi-card-receivable .kpi-curr-btn.active {
    background: rgba(245, 158, 11, 0.25) !important;
    color: #fbbf24 !important;
    border: 1px solid rgba(251, 191, 36, 0.45);
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.25);
}

.kpi-alert-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #ef4444;
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 900;
    line-height: 1;
    animation: alertPulse 1.8s infinite;
    flex-shrink: 0;
}

@keyframes alertPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }
    50% {
        transform: scale(1.18);
        box-shadow: 0 0 0 4px rgba(239, 68, 68, 0);
    }
}

.kpi-card-other-alert {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 5px 10px;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.35);
    border-radius: 6px;
    color: #fca5a5;
    font-size: 0.75rem;
    font-weight: 600;
    margin: 6px 0 2px 0;
}

.kpi-card-other-alert i {
    color: #f87171;
    font-size: 0.8rem;
    flex-shrink: 0;
}

/* Table Moneda Column dropdown styles */
.pill-currency {
    cursor: pointer;
    user-select: none;
}





