/* styles.css - Hoja de estilos principal completa */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&display=swap');

/* ====== RESET Y BASE ====== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Asegurar texto oscuro en todos los campos de entrada */
input, textarea, select {
    color: #1a1a1a !important;
    font-family: inherit;
    background-color: #f1f1f1;
}

body {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    background-image: url('bg.webp');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-color: #f5f5f5c0; 
}
/* Estilos adicionales para formulario de egresos */
.expense-form-section {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.expense-form {
    width: 100%;
}

.expense-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.expense-form-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.payment-method-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 600;
    text-transform: capitalize;
}

.payment-method-badge.efectivo {
    background: #d1fae5;
    color: #059669;
}

.payment-method-badge.transferencia {
    background: #dbeafe;
    color: #2563eb;
}

.payment-method-badge.cheque {
    background: #fef3c7;
    color: #d97706;
}

.payment-method-badge.tarjeta {
    background: #ede9fe;
    color: #7c3aed;
}

.expenses-total-row {
    background: rgba(239, 68, 68, 0.05);
    border-top: 2px solid #ef4444;
}

.btn-edit {
    background: #f59e0b;
    color: white;
}

.btn-edit:hover {
    background: #d97706;
}

.action-btn-small {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
}

.action-btn-small.btn-primary {
    background: #059669;
    color: white;
}

.action-btn-small.btn-primary:hover {
    background: #047857;
}

.action-btn-small.btn-delete {
    background: #dc2626;
    color: white;
}

.action-btn-small.btn-delete:hover {
    background: #b91c1c;
}

.view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

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

@media (max-width: 768px) {
    .expense-form-grid {
        grid-template-columns: 1fr;
    }
    
    .expense-form-actions {
        flex-direction: column;
    }
    
    .action-button {
        width: 100%;
    }
    
    .view-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .header-actions {
        flex-direction: column;
    }
}



.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ====== COMPONENTES GLASS MORPHISM ====== */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 30px;
    margin: 20px 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.glass:hover {
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.15);
}

.transparente {
    padding: 30px;
    margin: 20px 0;
}

/* ====== ADMIN PANEL STYLES ====== */
.admin-header {
    background: linear-gradient(135deg, #525252ff, #3b3b3bff);
    padding: 20px 0;
    margin-bottom: 30px;
}

.admin-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.admin-nav h1 {
    color: white;
    margin: 0;
    font-size: 24px;
}

.admin-nav .user-info {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
}



.admin-nav .user-info a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
}

.admin-nav .user-info a:hover {
    color: white;
}

/* ====== ESTADÍSTICAS ====== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-number {
    font-size: 28px;
    font-weight: bold;
    color: #ef4444;
    margin-bottom: 5px;
}

.stat-label {
    color: #666;
    font-size: 14px;
}

.currency-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 15px;
}

.currency-stat {
    background: rgba(255, 255, 255, 0.1);
    padding: 10px;
    border-radius: 8px;
    text-align: center;
}

.currency-stat .amount {
    font-weight: bold;
    font-size: 14px;
}

.currency-stat .currency {
    font-size: 12px;
    opacity: 0.8;
}

/* ====== TABLA ADMIN ====== */
.table-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 20px;
    flex-wrap: wrap;
}

.search-box {
    flex: 1;
    max-width: 400px;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 12px 40px 12px 15px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.9);
    font-size: 14px;
}

.search-box .search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
}

.table-wrapper {
    overflow-x: auto;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.budget-table {
    width: 100%;
    background: white;
    border-collapse: collapse;
    border-radius: 15px;
    overflow: hidden;
}

.budget-table th {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.budget-table td {
    padding: 15px;
    border-bottom: 1px solid #f1f1f1;
    font-size: 14px;
}

.budget-table tbody tr:hover {
    background: rgba(239, 68, 68, 0.05);
    transform: scale(1.001);
    transition: all 0.2s ease;
}

.budget-table tbody tr:last-child td {
    border-bottom: none;
}

.budget-title {
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.client-info {
    color: #666;
    font-size: 12px;
}

.budget-id {
    font-family: monospace;
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.budget-id:hover {
    background: #e9ecef;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-active {
    background: #d1fae5;
    color: #059669;
}

.status-expired {
    background: #fee2e2;
    color: #dc2626;
}

.currency-totals {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.currency-total {
    font-size: 12px;
    font-weight: bold;
}

.currency-total.ars { color: #059669; }
.currency-total.usd { color: #3b82f6; }
.currency-total.eur { color: #8b5cf6; }

.action-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.action-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

 .chart-box {
     width: 100%;
 }
 
 .chart-canvas {
     width: 100%;
     min-height: 360px;
 }

.btn-view {
    background: rgba(128, 128, 128, 0.5);
    color: #666;
}

.btn-edit {
    background: #10b981;
    color: white;
}

.btn-delete {
    background: #ef4444;
    color: white;
}

.btn-copy {
    background: #8b5cf6;
    color: white;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.empty-state h3 {
    margin-bottom: 10px;
    color: #333;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 30px;
    gap: 10px;
}

.pagination a,
.pagination span {
    padding: 8px 15px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.pagination a {
    background: rgba(255, 255, 255, 0.2);
    color: #333;
}

.pagination a:hover {
    background: #ef4444;
    color: white;
}

.pagination .current {
    background: #ef4444;
    color: white;
}

/* ====== FORMULARIOS ====== */
.form-header {
    text-align: center;
    margin-bottom: 40px;
}

.form-header h1 {
    color: #ef4444;
    margin-bottom: 10px;
}

.form-header .breadcrumb {
    color: #666;
    font-size: 14px;
}

.form-header .breadcrumb a {
    color: #ef4444;
    text-decoration: none;
}

.form-section {
    margin: 40px 0;
}

.form-section-title {
    background: #6d6d6d;
    color: white;
    padding: 15px 25px;
    border-radius: 10px;
    font-weight: bold;
    margin-bottom: 25px;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.form-group label .required {
    color: #ef4444;
    margin-left: 4px;
}

.form-group label .optional {
    color: rgba(0, 0, 0, 0.4);
    font-weight: 500;
    margin-left: 4px;
    font-size: 0.9em;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #ef4444;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.file-upload {
    position: relative;
    display: inline-block;
    cursor: pointer;
    width: 100%;
}

.file-upload input[type="file"] {
    position: absolute;
    left: -9999px;
}

.file-upload-label {
    display: block;
    padding: 12px 15px;
    border: 2px dashed #cbd5e0;
    border-radius: 8px;
    text-align: center;
    background: #f8fafc;
    color: #64748b;
    transition: all 0.3s ease;
    cursor: pointer;
}

.file-upload:hover .file-upload-label {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.05);
}

.file-preview {
    margin-top: 10px;
    text-align: center;
}

.file-preview img {
    max-width: 150px;
    max-height: 100px;
    border-radius: 8px;
    border: 2px solid #e2e8f0;
}

/* ====== COMPONENTES FORM ====== */
.components-container {
    border: 2px dashed #cbd5e0;
    border-radius: 12px;
    padding: 20px;
    background: #f8fafc;
}

.component-item {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    border: 1px solid #e2e8f0;
    position: relative;
}

.component-item .remove-component {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.component-header {
    font-weight: bold;
    color: #ef4444;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #fecaca;
}

.component-amount-currency {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 10px;
}

.currency-select {
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    font-size: 14px;
}

.add-component {
    width: 100%;
    padding: 15px;
    border: 2px dashed #10b981;
    background: rgba(16, 185, 129, 0.05);
    color: #10b981;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.add-component:hover {
    background: rgba(16, 185, 129, 0.1);
    border-color: #059669;
}

.total-preview {
    background: #f59e0b;
    color: white;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    margin: 20px 0;
    font-size: 16px;
    font-weight: bold;
}

.form-actions {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    margin-top: 40px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.form-actions .btn {
    margin: 0 10px;
    min-width: 150px;
}

.btn-save {
    background: #059669;
}

.char-counter {
    font-size: 12px;
    color: #64748b;
    text-align: right;
    margin-top: 4px;
}

.validation-error {
    color: #ef4444;
    font-size: 12px;
    margin-top: 4px;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    margin-bottom: 30px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #ef4444;
    width: 0%;
    transition: width 0.5s ease;
}

/* ====== NOTIFICACIONES ====== */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 8px;
    color: white;
    font-weight: bold;
    z-index: 1000;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

.notification-success {
    background: #10b981;
}

.notification-error {
    background: #ef4444;
}

.notification-info {
    background: #3b82f6;
}

/* ====== HEADER VENCIDO ====== */
.expired-header {
    background: linear-gradient(135deg, #ff4757, #c44569);
    color: white;
    padding: 15px;
    text-align: center;
    font-weight: bold;
    margin-bottom: 20px;
    animation: pulseRed 2s infinite;
    box-shadow: 0 4px 15px rgba(255, 71, 87, 0.3);
}

@keyframes pulseRed {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* ====== HEADER DEL PRESUPUESTO ====== */
.header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    gap: 30px;
    flex-wrap: wrap;
}

.logo-section {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.client-section {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
}

.budget-title {
    text-align: center;
    flex: 2;
    min-width: 300px;
}
.budget-title-lista {
    flex: 2;
    min-width: 300px;
    font-weight: 800;
}

.budget-title h1 {
    color: #ef4444;
    font-size: 28px;
    font-weight: 700;
    margin-top: 25px;
}

.budget-title h2 {
    color: #333;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 5px;
}

.logo-placeholder {
    width: 150px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    color: gray;
    font-size: 12px;
    text-align: right;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.logo-container {
    width: 150px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.logoemisor-container {
    width: 150px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}
.logologin {
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-bottom: 10px;
    object-fit: contain;
}

.logo-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.logoemisor-container img {
    max-width: 150px;
    max-height: 150px;
    object-fit: contain;
}

.budget-number {
    background: #878787;
    color: white;
    padding: 8px 15px;
    border-radius: 10px;
    font-weight: bold;
    display: inline-block;
    margin: 15px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.budget-date {
    color: #666;
    font-size: 14px;
    font-weight: 500;
}

.company-info,
.client-info {
    margin-top: 15px;
    font-size: 12px;
    color: #555;
    line-height: 1.4;
}

/* ====== SECCIONES ====== */
.section {
    margin: 40px 0;
}

.section-title {
    color: #b7b7b7;
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #a6a6a6;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 50px;
    height: 3px;
    border-radius: 2px;
}

/* ====== DESCRIPCIÓN DEL PROYECTO ====== */
.project-description {
    margin: 25px 0;
}

.project-item {
    margin-bottom: 25px;
}

.project-item h3 {
    color: #f14e4e;
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 18px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.project-item h4 {
    color: #f14e4e;
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.project-item p {
    color: #555;
    line-height: 1.6;
    text-align: left;
}

.two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin: 25px 0;
}

/* ====== COMPONENTES ECONÓMICOS ====== */
.components-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
    align-items: start;
    margin: 25px 0;
}

.component-box {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    transition: all 0.3s ease;
    overflow: hidden;
}

.component-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: #f14e4e;
    border-radius: 12px 12px 0 0;
}

.component-box:hover {
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 0.25);
}

.component-currency-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(239, 68, 68, 0.8);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.component-currency-badge.ars { background: rgba(5, 150, 105, 0.8); }
.component-currency-badge.usd { background: rgba(59, 130, 246, 0.8); }
.component-currency-badge.eur { background: rgba(139, 92, 246, 0.8); }

.component-title {
    font-weight: bold;
    font-size: 18px;
    color: #333;
    margin-bottom: 10px;
    padding-right: 60px;
}

.component-description {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.5;
}

.component-amount {
    font-size: 20px;
    font-weight: bold;
    color: #4a4a4a;
    text-align: right;
    padding: 15px;
    border-top: 1px solid rgba(201, 201, 201, 0.3);
    background: rgba(255, 255, 255, 0.1);
    margin: -20px -20px -20px -20px;
    margin-top: 20px;
    border-radius: 0 0 12px 12px;
    font-family: 'Montserrat', monospace;
}

.component-amount.negative {
    color: #ef4444;
}

/* ====== TOTALES POR MONEDA ====== */
.currency-totals-section {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 25px;
    border: 2px solid rgba(239, 68, 68, 0.2);
    margin: 20px 0;
}

.currency-totals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.currency-total-card {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.currency-total-card.ars {
    border-left: 4px solid #059669;
}

.currency-total-card.usd {
    border-left: 4px solid #3b82f6;
}

.currency-total-card.eur {
    border-left: 4px solid #8b5cf6;
}

.currency-name {
    font-size: 14px;
    font-weight: bold;
    color: #666;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.currency-amount {
    font-size: 28px;
    font-weight: bold;
    color: #414141;
}

.currency-code {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}

.total-section-multicurrency {
    background:#d6d6d6;
    color: white;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    margin: 30px 0;
}

.total-section-multicurrency .section-title {
    color: rgb(100, 100, 100);
    margin-bottom: 20px;
    font-size: 24px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.hidden-currency {
    display: none;
}

/* ====== SECCIÓN TOTAL LEGACY ====== */
.total-section {
    background: #8f8f8f;
    color: white;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    margin: 40px 0;
    position: relative;
    overflow: hidden;
}

.total-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.total-section div:first-child {
    font-size: 16px;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.9;
}

.total-amount {
    font-size: 32px;
    font-weight: bold;
    margin: 15px 0;
    font-family: 'Montserrat', monospace;
}

/* ====== CONDICIONES COMERCIALES ====== */
.commercial-terms {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin: 25px 0;
}

.term-box {
    background: rgba(255, 255, 255, 0.15);
    padding: 25px;
    border-radius: 5px;
    border-left: 5px solid #f14e4e;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.term-box:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.2);
}

.term-title {
    font-weight: bold;
    color: #f14e4e;
    margin-bottom: 12px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.term-box div:last-child {
    color: #555;
    line-height: 1.5;
}

/* ====== INFORMACIÓN DE VIGENCIA ====== */
.validity-info {
    background: rgba(16, 185, 129, 0.1);
    border: 2px solid rgba(16, 185, 129, 0.3);
    border-radius: 5px;
    padding: 20px;
    margin: 25px 0;
    text-align: center;
    transition: all 0.3s ease;
}

.validity-expired {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    animation: pulseRed 2s infinite;
}

/* ====== BOTONES ====== */
.btn {
    background: #f14e4e;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
    text-align: center;
    margin: 10px 5px;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn:hover {
    box-shadow: 0 15px 35px rgba(239, 68, 68, 0.4);
    filter: brightness(1.1);
}

.btn-secondary {
    background: rgba(128, 128, 128, 0.5);
    color: #666;
    border: 2px solid rgba(128, 128, 128, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-secondary:hover {
    background: rgba(128, 128, 128, 0.6);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    color: #555;
}

.btn-pay {
    background: #d97706;
    color: white;
    border: 2px solid #d97706;
    box-shadow: 0 4px 15px rgba(217, 119, 6, 0.3);
}

.btn-pay:hover {
    background: #b45309;
    border-color: #b45309;
    box-shadow: 0 15px 35px rgba(217, 119, 6, 0.4);
    transform: translateY(-2px);
}

/* ====== FORMULARIOS BASE ====== */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 15px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.9);
    color: #1a1a1a;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #ef4444;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
    background: white;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}
.btn-share {
    background: #8c8c8c;
    color: white;
}

.botones-container {
  display: flex; /* Habilita Flexbox */
  justify-content: center; /* Centra los divs horizontalmente */
  align-items: center; /* Centra los divs verticalmente (útil si tienen diferentes alturas) */
  gap: 10px; /* Agrega un espacio de 10px entre cada div */
  padding: 10px;
}


/* ====== FORMULARIO DE ACCESO ====== */
.access-form {
    max-width: 450px;
    margin: 50px auto;
    text-align: center;
}
        .login-header {
            text-align: center;
            margin-bottom: 30px;
        }
        
        .login-header h1 {
            color: white;
            font-size: 24px;
            margin-bottom: 10px;
        }

.login-header h2 {
    color: gray;
    margin-bottom: 15px;
    font-size: 28px;
    font-weight: 700;
}

.login-header p {
    color: gray;
    margin-bottom: 30px;
    font-size: 14px;
}

.input-help {
    font-size: 12px;
    color: gray;
    margin-top: 5px;
}

        .login-container {
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(15px);
            border-radius: 20px;
            padding: 40px;
            box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
            border: 1px solid rgba(255, 255, 255, 0.2);
            width: 100%;
            max-width: 400px;
            
        }
        
        .login-header {
            text-align: center;
            margin-bottom: 30px;
        }
        
        .login-header h1 {
            color:gray;
            font-size: 24px;
            margin-bottom: 10px;
        }
        
        .login-header p {
            color: gray;
            font-size: 14px;
        }
        
        .form-group {
            margin-bottom: 20px;
        }
        
        .form-group label {
            display: block;
            color: gray;
            margin-bottom: 8px;
            font-weight: 500;
        }
        
        .form-group input {
            width: 100%;
            padding: 15px;
            border: 2px solid rgba(255, 255, 255, 0.2);
            border-radius: 10px;
            background: rgba(255, 255, 255, 0.1);
            color:gray;
            font-size: 16px;
            transition: all 0.3s ease;
            box-sizing: border-box;
        }
        
        .form-group input:focus {
            outline: none;
            border-color: #ef4444;
            box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
            background: rgba(255, 255, 255, 0.15);
        }
        
        .form-group input::placeholder {
            color: rgba(131, 131, 131, 0.6);
        }

        /* Toggle Switch Styles */
        .toggle-container {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 15px;
            margin-top: 30px;
        }

        .toggle-switch {
            position: relative;
            display: inline-block;
            width: 60px;
            height: 34px;
            margin: 0;
        }

        .toggle-switch input {
            opacity: 0;
            width: 0;
            height: 0;
        }

        .toggle-slider {
            position: absolute;
            cursor: pointer;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: #ccc;
            transition: 0.4s;
            border-radius: 34px;
        }

        .toggle-slider:before {
            position: absolute;
            content: "";
            height: 26px;
            width: 26px;
            left: 4px;
            bottom: 4px;
            background-color: white;
            transition: 0.4s;
            border-radius: 50%;
        }

        .toggle-switch input:checked + .toggle-slider {
            background-color: #10b981;
        }

        .toggle-switch input:focus + .toggle-slider {
            box-shadow: 0 0 1px #10b981;
        }

        .toggle-switch input:checked + .toggle-slider:before {
            transform: translateX(26px);
        }

        .toggle-label {
            flex: 1;
        }

        .toggle-label span {
            font-weight: 500;
            color: #333;
            font-size: 16px;
        }
        
        .btn-login {
            width: 100%;
            padding: 15px;
            background: linear-gradient(135deg, #ef4444, #dc2626);
            color: white;
            border: none;
            border-radius: 10px;
            font-size: 16px;
            font-weight: bold;
            cursor: pointer;
            transition: all 0.3s ease;
            margin-bottom: 20px;
        }
        
        .btn-login:hover {
            transform: translateY(-2px);
            box-shadow: 0 10px 25px rgba(239, 68, 68, 0.3);
        }
        
        .error-message {
            background: rgba(239, 68, 68, 0.2);
            border: 1px solid rgba(239, 68, 68, 0.5);
            color: white;
            padding: 12px;
            border-radius: 8px;
            margin-bottom: 20px;
            text-align: center;
            font-size: 14px;
        }
        
        .back-link {
            text-align: center;
            margin-top: 20px;
        }
        
        .back-link a {
            color: gray;
            text-decoration: none;
            font-size: 14px;
            transition: color 0.3s ease;
        }
        
        .back-link a:hover {
            color:rgb(41, 41, 41);
        }
        
        .security-info {
            margin-top: 30px;
            padding: 15px;
            background: rgba(255, 255, 255, 0.05);
            border-radius: 8px;
            font-size: 12px;
            color: gray;
        }
        
        .password-strength {
            margin-top: 5px;
            font-size: 12px;
            color: rgba(255, 255, 255, 0.6);
        }
        
        .login-attempts {
            position: absolute;
            top: 20px;
            right: 20px;
            background: rgba(255, 255, 255, 0.1);
            padding: 10px 15px;
            border-radius: 8px;
            font-size: 12px;
            color: rgba(255, 255, 255, 0.8);
        }

        /* Estilos para adjuntos múltiples */
        .attachments-preview {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
            gap: 15px;
            margin-top: 15px;
            max-height: 300px;
            overflow-y: auto;
            padding: 10px 0;
        }
        
        .attachment-item {
            background: white;
            border-radius: 8px;
            padding: 15px;
            border: 2px solid #e2e8f0;
            display: flex;
            flex-direction: column;
            align-items: center;
            text-align: center;
            transition: all 0.3s ease;
            position: relative;
        }
        
        .attachment-item:hover {
            border-color: #ef4444;
            box-shadow: 0 4px 15px rgba(239, 68, 68, 0.1);
        }
        
        .attachment-item img {
            max-width: 100%;
            max-height: 80px;
            object-fit: cover;
            border-radius: 4px;
            margin-bottom: 10px;
        }
        
        .file-icon {
            font-size: 40px;
            margin-bottom: 10px;
            opacity: 0.7;
        }
        
        .attachment-info {
            width: 100%;
        }
        
        .attachment-name {
            font-size: 12px;
            font-weight: bold;
            color: #333;
            margin-bottom: 4px;
            word-break: break-word;
        }
        
        .attachment-size {
            font-size: 11px;
            color: #666;
        }
        
        .remove-attachment {
            position: absolute;
            top: 5px;
            right: 5px;
            background: #ef4444;
            color: white;
            border: none;
            border-radius: 50%;
            width: 20px;
            height: 20px;
            cursor: pointer;
            font-size: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            opacity: 0;
            transition: opacity 0.3s ease;
        }
        
        .attachment-item:hover .remove-attachment {
            opacity: 1;
        }
        
        @media (max-width: 768px) {
            .attachments-preview {
                grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
                gap: 10px;
            }
        }

        .existing-attachments {
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 15px;
    background: #f8fafc;
}

.existing-attachment {
    position: relative;
}

.existing-attachment .remove-attachment {
    background: #ef4444;
    opacity: 1;
}

.existing-attachment:hover .remove-attachment {
    opacity: 1;
}

.delete-notice {
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.attachment-item.marked-for-deletion {
    opacity: 0.5;
    border: 2px dashed #ef4444 !important;
}

.attachment-item.marked-for-deletion .remove-attachment {
    background: #10b981;
}

/* Separación visual entre adjuntos existentes y nuevos */
#newAttachmentsPreview {
    border-top: 1px dashed #cbd5e0;
    padding-top: 15px;
}

#newAttachmentsPreview:empty {
    border-top: none;
    padding-top: 0;
}

/* ====== ESTILOS PARA ADJUNTOS DEL PROYECTO (INDEX.PHP) ====== */
.project-attachments {
    margin-top: 30px;
}

.project-attachments h3 {
    color: #ef4444;
    font-size: 18px;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.project-images {
    margin-bottom: 30px;
}

.image-row {
    display: grid;
    gap: 15px;
    margin-bottom: 15px;
    justify-content: center;
}

.image-row.columns-1 {
    grid-template-columns: 1fr;
    max-width: 60%;
    margin: 0 auto 15px auto;
}

.image-row.columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

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

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

.image-item {
    text-align: center;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.image-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.image-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.image-item img:hover {
    transform: scale(1.02);
}

.image-caption {
    padding: 12px;
    font-size: 12px;
    color: #666;
    font-weight: 500;
    word-break: break-word;
}

.project-files {
    margin-top: 20px;
}

.project-files h4 {
    color: #666;
    font-size: 16px;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.files-list {
    display: grid;
    gap: 10px;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.file-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.file-icon {
    font-size: 24px;
    margin-right: 15px;
    min-width: 40px;
    text-align: center;
}

.file-info {
    flex: 1;
}

.file-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    word-break: break-word;
}

.file-size {
    font-size: 12px;
    color: #666;
}

.file-download {
    font-size: 20px;
    text-decoration: none;
    color: #ef4444;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.file-download:hover {
    background: rgba(239, 68, 68, 0.1);
    transform: scale(1.1);
}

/* Modal para imágenes */
.image-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.95);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 95vw;
    max-height: 95vh;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content img {
    max-width: 95vw;
    max-height: 95vh;
    width: auto;
    height: auto;
    display: block;
    object-fit: contain;
}

.modal-download {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.85);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    opacity: 0;
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
}

.modal-content:hover .modal-download {
    opacity: 1;
}

.modal-download:hover {
    background: rgba(239, 68, 68, 0.9);
    transform: scale(1.05);
}

.period-text {
    color: #ef4444;
    font-weight: normal;
    margin-left: 8px;
    font-size: 16px;
}

.tax-text {
    color: #666;
    font-weight: normal;
    margin-left: 4px;
    font-size: 14px;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    color: white;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    background: rgba(0,0,0,0.75);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(239, 68, 68, 0.8);
    transform: scale(1.1);
}

/* Responsive para adjuntos del proyecto */
@media (max-width: 768px) {
    .image-row.columns-1 {
        max-width: 100%;
    }
    
    .image-row.columns-2,
    .image-row.columns-3,
    .image-row.columns-4 {
        grid-template-columns: 1fr;
    }
    
    .image-item img {
        height: 250px;
    }
    
    .file-item {
        padding: 12px;
    }
    
    .file-icon {
        font-size: 20px;
        margin-right: 12px;
        min-width: 35px;
    }
}

@media print {
    .project-attachments {
        page-break-inside: avoid;
    }
    
    .image-item {
        break-inside: avoid;
        margin-bottom: 10px;
    }
    
    .file-download {
        display: none;
    }
}

/* ====== ESTILOS PARA FORMULARIO DE PRESUPUESTO (BUDGET_FORM.PHP) ====== */
.form-header {
    text-align: center;
    margin-bottom: 40px;
}

.form-header h1 {
    color: #ef4444;
    margin-bottom: 10px;
}

.form-header .breadcrumb {
    color: #666;
    font-size: 14px;
}

.form-header .breadcrumb a {
    color: #ef4444;
    text-decoration: none;
}

.form-section {
    margin: 40px 0;
}

.form-section-title {
    background: #6d6d6d;
    color: white;
    padding: 15px 25px;
    border-radius: 10px;
    font-weight: bold;
    margin-bottom: 25px;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.form-group label .required {
    color: #ef4444;
    margin-left: 4px;
}

.form-group label .optional {
    color: rgba(0, 0, 0, 0.4);
    font-weight: 500;
    margin-left: 4px;
    font-size: 0.9em;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    background: white;
    color: #1a1a1a;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #ef4444;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.file-upload {
    position: relative;
    display: inline-block;
    cursor: pointer;
    width: 100%;
}

.file-upload input[type="file"] {
    position: absolute;
    left: -9999px;
}

.file-upload-label {
    display: block;
    padding: 12px 15px;
    border: 2px dashed #cbd5e0;
    border-radius: 8px;
    text-align: center;
    background: #f8fafc;
    color: #64748b;
    transition: all 0.3s ease;
    cursor: pointer;
}

.file-upload:hover .file-upload-label {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.05);
}

.file-preview {
    margin-top: 10px;
    text-align: center;
}

.file-preview img {
    max-width: 150px;
    max-height: 100px;
    border-radius: 8px;
    border: 2px solid #e2e8f0;
}

.attachments-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.attachment-item {
    position: relative;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
}

.attachment-item:hover {
    border-color: #ef4444;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.attachment-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
}

.attachment-info {
    margin-top: 10px;
}

.attachment-name {
    font-size: 12px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    word-break: break-word;
    line-height: 1.2;
}

.attachment-size {
    font-size: 11px;
    color: #666;
}

.remove-attachment {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transition: all 0.2s ease;
}

.remove-attachment:hover {
    background: #dc2626;
    transform: scale(1.1);
}

.file-upload-container {
    margin-bottom: 20px;
}

.components-container {
    border: 2px dashed #cbd5e0;
    border-radius: 12px;
    padding: 20px;
    background: #f8fafc;
}

.component-item {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    border: 1px solid #e2e8f0;
    position: relative;
}

.component-item .remove-component {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.component-header {
    font-weight: bold;
    color: #ef4444;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #fecaca;
}

.component-amount-currency {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 10px;
}

.currency-select {
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    font-size: 14px;
}

.add-component {
    width: 100%;
    padding: 15px;
    border: 2px dashed #10b981;
    background: rgba(16, 185, 129, 0.05);
    color: #10b981;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.add-component:hover {
    background: rgba(16, 185, 129, 0.1);
    border-color: #059669;
}

.total-preview {
    background: #f59e0b;
    color: white;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    margin: 20px 0;
    font-size: 16px;
    font-weight: bold;
}

.currency-totals {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.currency-total {
    background: rgba(255, 255, 255, 0.2);
    padding: 10px;
    border-radius: 8px;
    text-align: center;
}

.form-actions {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    margin-top: 40px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.form-actions .btn {
    margin: 0 10px;
    min-width: 150px;
}

.btn-save {
    background: #059669;
}

.char-counter {
    font-size: 12px;
    color: #64748b;
    text-align: right;
    margin-top: 4px;
}

.validation-error {
    color: #ef4444;
    font-size: 12px;
    margin-top: 4px;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    margin-bottom: 30px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #ef4444;
    width: 0%;
    transition: width 0.5s ease;
}

/* ====== ESTILOS PARA IMPRESIÓN (PRINT STYLES) ====== */
@media print {
    .no-print { 
        display: none !important; 
    }
    
    body { 
        background: white !important; 
        color: black !important; 
    }
    
    .glass { 
        background: white !important; 
        border: 1px solid #ddd !important; 
        box-shadow: none !important; 
    }
    
    .expired-header { 
        background: #ff4757 !important; 
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
}

/* ====== ESTILOS PARA PANEL DE ADMINISTRACIÓN (ADMIN_PANEL.PHP) ====== */
.admin-header {
    background: #6b7280;
    padding: 20px 0;
    margin-bottom: 30px;
}

.admin-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.admin-nav h1 {
    color: white;
    margin: 0;
    font-size: 24px;
}

.admin-nav .user-info {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-number {
    font-size: 28px;
    font-weight: bold;
    color: #ef4444;
    margin-bottom: 5px;
}

.stat-label {
    color: #666;
    font-size: 14px;
}

.currency-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 15px;
}

.currency-stat {
    background: rgba(255, 255, 255, 0.1);
    padding: 10px;
    border-radius: 8px;
    text-align: center;
}

.currency-stat .amount {
    font-weight: bold;
    font-size: 14px;
}

.currency-stat .currency {
    font-size: 12px;
    opacity: 0.8;
}

.table-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 20px;
    flex-wrap: wrap;
}

.search-box {
    flex: 1;
    max-width: 400px;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 12px 40px 12px 15px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.9);
    font-size: 14px;
}

.search-box .search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
}

.table-wrapper {
    overflow-x: auto;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.budget-table {
    width: 100%;
    background: white;
    border-collapse: collapse;
    border-radius: 15px;
    overflow: hidden;
}

.budget-table th {
    background: #6b7280;
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.budget-table td {
    padding: 15px;
    border-bottom: 1px solid #f1f1f1;
    font-size: 14px;
}

.budget-table tbody tr:hover {
    background: rgba(239, 68, 68, 0.05);
    transform: scale(1.001);
    transition: all 0.2s ease;
}

.budget-table tbody tr:last-child td {
    border-bottom: none;
}

.budget-title {
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.client-info {
    color: #666;
    font-size: 12px;
}

.budget-id {
    font-family: monospace;
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.budget-id:hover {
    background: #e9ecef;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-active {
    background: #d1fae5;
    color: #059669;
}

.status-expired {
    background: #fee2e2;
    color: #dc2626;
}

.currency-totals {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.currency-total {
    font-size: 12px;
    font-weight: bold;
}

.currency-total.ars { color: #059669; }
.currency-total.usd { color: #3b82f6; }
.currency-total.eur { color: #8b5cf6; }

.action-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.action-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-view {
    background: rgba(128, 128, 128, 0.5);
    color: #666;
}

.btn-edit {
    background: #10b981;
    color: white;
}

.btn-delete {
    background: #ef4444;
    color: white;
}

.btn-copy {
    background: #8b5cf6;
    color: white;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.empty-state h3 {
    margin-bottom: 10px;
    color: #333;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 30px;
    gap: 10px;
}

.pagination a,
.pagination span {
    padding: 8px 15px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.pagination a {
    background: rgba(255, 255, 255, 0.2);
    color: #333;
}

.pagination a:hover {
    background: #ef4444;
    color: white;
}

.pagination .current {
    background: #ef4444;
    color: white;
}

/* ====== ESTILOS PARA LOGIN DE ADMINISTRADOR (ADMIN_LOGIN.PHP) ====== */
body.admin-login {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
    /* Mantener el fondo heredado del body base */
}

body.admin-login .login-container {
    flex: 0 0 auto;
    margin: auto 0;
}

body.admin-login .page-footer {
    flex: 0 0 auto;
    margin-top: 20px;
}

/* ====== ESTILOS ADICIONALES PARA ELEMENTOS INLINE ====== */
.logo-image {
    max-width: 150px;
    max-height: 150px;
    object-fit: contain;
}

.logo-image-small {
    max-width: 50px;
    object-fit: contain;
}

.access-key-input {
    text-transform: uppercase;
    text-align: center;
    font-family: monospace;
    font-size: 18px;
    letter-spacing: 2px;
}

.admin-separator {
    margin: 30px 0;
    border: 1px solid rgba(255,255,255,0.2);
}

.text-center {
    text-align: center;
}

.expired-text {
    color: #ef4444;
    font-weight: bold;
}

.currency-info-text {
    color: #666;
    font-size: 14px;
    text-align: center;
}

.logo-preview-container {
    position: relative;
    display: inline-block;
}

.logo-preview-image {
    max-width: 150px;
    max-height: 100px;
    object-fit: cover;
    border-radius: 8px;
}

.remove-logo {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bullet-info {
    color: #666;
    display: block;
    margin-top: 5px;
}

.bullet-copy {
    max-width: 3ch;
    text-align: center;
}

.highlight-symbol {
    font-weight: bold;
    color: #f14e4e;
}

.admin-logout-link {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
}


/* ====== ESTILOS EXTRA DOS DE INLINE STYLES ====== */

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    margin-bottom: 30px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-buttons {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 24px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.user-info:hover {
    background: rgba(255, 255, 255, 0.2);
}

.user-details {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.user-details:hover {
    opacity: 0.8;
}

.user-icon {
    font-size: 14px;
    color: #666;
}

.user-text {
    display: flex;
    align-items: center;
    line-height: 1.2;
}

.user-name {
    font-size: 10px;
    font-weight: 600;
    color: #333;
}

.logout-link {
    color: #666;
    text-decoration: none;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.logout-link:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.logout-link .material-icons {
    font-size: 14px;
}

.page-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
}

.header-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.page-title {
    font-size: 18px;
    color: #666;
    font-weight: 400;
}

.company-name {
    font-size: 18px;
    color: #666;
    font-weight: 600;
}

.home-link {
    padding: 10px 24px;
    border: none;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.2);
    color: #666;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    font-size: 10px;
}

.home-link .material-icons {
    font-size: 14px;
}

.home-link:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    text-decoration: none;
}

.page-footer {
    margin-top: auto;
    padding: 15px 0;
    text-align: center;
    font-size: 12px;
    color: #777;
}

.nav-tabs {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 40px;
}

.nav-tab {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.2);
    color: #666;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.nav-tab:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.nav-tab.active {
    background: rgba(107, 114, 128, 0.8);
    color: white;
}

.nav-tabs--has-sub {
    margin-bottom: 28px;
}

/* Pestañas adheridas a la caja de contenido (Cashflow) */
.cf-panel-tabs {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    margin: 0;
    padding: 0;
    position: relative;
    z-index: 2;
}

.cf-panel-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px 10px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-bottom: none;
    border-radius: 10px 10px 0 0;
    background: rgba(255, 255, 255, 0.06);
    color: #777;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.2px;
    text-decoration: none;
    line-height: 1.2;
    transition: background 0.2s ease, color 0.2s ease;
}

.cf-panel-tab .material-icons {
    font-size: 17px;
}

.cf-panel-tab:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #555;
}

.cf-panel-tab.active {
    background: rgba(255, 255, 255, 0.1);
    color: #3f3f46;
    border-color: rgba(255, 255, 255, 0.2);
    padding-bottom: 11px;
    margin-bottom: -1px;
    position: relative;
    z-index: 3;
}

.dashboard-mock-shell {
    padding: 26px;
    margin: 20px 0;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
}

.cf-panel-tabs + .glass,
.cf-panel-tabs + .dashboard-mock-shell {
    margin-top: 0;
    border-top-left-radius: 0;
}

.dashboard-mock-layout {
    display: grid;
    grid-template-columns: 234px 1fr;
    gap: 18px;
    align-items: start;
}

.dashboard-mock-left {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 6px;
}

.dashboard-mock-right {
    background: rgba(255, 255, 255, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.20);
    border-radius: 16px;
    padding: 16px;
}

.dashboard-mock-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.dashboard-mock-title {
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 1px;
    color: rgba(0,0,0,0.55);
}

.dashboard-mock-filters {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.dashboard-mock-filter {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dashboard-mock-filter-label {
    font-size: 12px;
    font-weight: 700;
    color: rgba(0,0,0,0.55);
}

.dashboard-mock-filter input[type="date"] {
    height: 30px;
    padding: 4px 8px;
    border: 1px solid rgba(0,0,0,0.18);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.92);
    font-size: 12px;
}

.dashboard-mock-apply {
    height: 30px;
    padding: 4px 14px;
    border: none;
    border-radius: 6px;
    background: #059669;
    color: white;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.5px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.dashboard-mock-apply .material-icons {
    font-size: 16px;
}

.dashboard-mock-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}

.dashboard-mock-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.dashboard-scorecards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.dashboard-scorecard {
    background: rgba(255, 255, 255, 0.70);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 10px;
    padding: 14px 16px;
}

.dashboard-scorecard-value {
    font-size: 22px;
    font-weight: 800;
    color: rgba(0,0,0,0.68);
    line-height: 1.1;
}

.dashboard-currency {
    color: rgba(0,0,0,0.35);
    margin-right: 6px;
}

.dashboard-scorecard-label {
    margin-top: 6px;
    font-size: 12px;
    font-weight: 700;
    color: rgba(0,0,0,0.52);
}

.dashboard-scorecard-delta {
    font-weight: 800;
    margin-left: 6px;
    font-size: 11px;
}

.dashboard-scorecard-delta.up {
    color: #8CC152;
}

.dashboard-scorecard-delta.down {
    color: #DA4453;
}

.dashboard-mock-card {
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 10px;
    padding: 22px;
}

.dashboard-mock-card-title {
    font-size: 16px;
    font-weight: 700;
    color: rgba(0,0,0,0.65);
    margin-bottom: 18px;
}

.dashboard-mock-card-body {
    min-height: 160px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: rgba(0,0,0,0.20);
    font-weight: 700;
}

.dashboard-nav {
    gap: 18px;
}

.dashboard-nav-item {
    grid-template-columns: 54px 1fr;
    gap: 14px;
}

.dashboard-nav-icon {
    width: 54px;
    height: 54px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.90);
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.10);
}

.dashboard-nav-label {
    color: rgba(0,0,0,0.45);
    font-weight: 700;
}

.dashboard-nav-item.active .dashboard-nav-label {
    color: rgba(0,0,0,0.62);
    font-weight: 800;
}

.dashboard-nav-item.active .dashboard-nav-icon {
    background: rgba(255, 255, 255, 0.90);
    color: inherit;
}

.dashboard-mock-left .dashboard-nav-icon {
    background: rgba(255, 255, 255, 0.90);
}

.dashboard-mock-left .dashboard-nav-item:hover .dashboard-nav-icon {
    background: rgba(255, 255, 255, 0.90);
    transform: none;
}

.dashboard-mock-left .dashboard-nav-item.active .dashboard-nav-icon {
    background: rgba(255, 255, 255, 0.90);
    color: inherit;
}

.dashboard-nav-item .dashboard-nav-icon .material-icons {
    color: rgba(0,0,0,0.65);
}

@media (max-width: 900px) {
    .dashboard-mock-layout {
        grid-template-columns: 1fr;
    }

    .dashboard-mock-row {
        grid-template-columns: 1fr;
    }

    .dashboard-scorecards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

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

/* --- Cashflow --- */
.cf-shell {
    padding: 24px 26px 28px;
}

.cf-topbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.cf-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: rgba(0, 0, 0, 0.45);
    margin-bottom: 6px;
}

.cf-eyebrow .material-icons {
    font-size: 18px;
}

.cf-title {
    margin: 0;
    font-size: 24px;
    font-weight: 800;
    color: rgba(0, 0, 0, 0.72);
    line-height: 1.15;
}

.cf-subtitle {
    margin: 8px 0 0;
    max-width: 720px;
    font-size: 13px;
    line-height: 1.5;
    color: rgba(0, 0, 0, 0.52);
}

.cf-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.cf-view-switch {
    display: inline-flex;
    padding: 4px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.45);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.cf-view-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 9px;
    text-decoration: none;
    color: rgba(0, 0, 0, 0.55);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.4px;
    transition: background 0.15s ease, color 0.15s ease;
}

.cf-view-btn .material-icons {
    font-size: 17px;
}

.cf-view-btn:hover {
    color: rgba(0, 0, 0, 0.72);
    background: rgba(255, 255, 255, 0.55);
}

.cf-view-btn.is-active {
    background: #059669;
    color: #fff;
    box-shadow: 0 8px 18px rgba(5, 150, 105, 0.28);
}

.cf-period-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(150px, 1fr));
    gap: 8px 10px;
    width: 100%;
    min-width: 0;
}

.cf-period-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.cf-period-label {
    font-size: 12px;
    font-weight: 700;
    color: rgba(0, 0, 0, 0.52);
}

.cf-period-select {
    min-width: 0;
    width: 100%;
    height: 34px;
    padding: 4px 10px;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.14);
    background: rgba(255, 255, 255, 0.92);
    font-size: 12px;
    font-weight: 600;
}

.cf-period-select--scenario {
    min-width: 140px;
}

.cf-period-input {
    width: 100%;
    height: 34px;
    padding: 4px 10px;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.14);
    background: rgba(255, 255, 255, 0.92);
    font-size: 12px;
    font-weight: 600;
}

.cf-period-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.cf-period-label--compact {
    letter-spacing: 0.2px;
}

.cf-scenario-pills,
.cf-base-pills {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 0 0 10px;
}

.cf-table-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.cf-cashflow-controls {
    margin-bottom: 8px;
}

.cf-motor-panel {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0 0 12px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.72);
}

.cf-motor-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
}

.cf-motor-label {
    min-width: 72px;
    padding-top: 8px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(15, 23, 42, 0.55);
}

.cf-motor-row .cf-base-pills,
.cf-motor-row .cf-table-controls {
    flex: 1;
    margin: 0;
}

.cf-block {
    margin: 8px 0 22px;
    padding: 16px 16px 8px;
    border-radius: 14px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.55);
}

.cf-block--libro {
    border-color: rgba(15, 23, 42, 0.1);
}

.cf-block--proy {
    border-color: rgba(37, 99, 235, 0.22);
    background: rgba(239, 246, 255, 0.45);
}

.cf-block-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.cf-block-kicker {
    display: block;
    margin: 0 0 4px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(15, 23, 42, 0.48);
}

.cf-block-title {
    margin: 0;
    font-size: 18px;
    font-weight: 750;
    color: rgba(15, 23, 42, 0.92);
}

.cf-block-desc {
    margin: 4px 0 0;
    font-size: 12px;
    font-weight: 600;
    color: rgba(15, 23, 42, 0.55);
    max-width: 520px;
}

.cf-block-badge {
    flex-shrink: 0;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.cf-block-badge--real {
    color: rgba(15, 23, 42, 0.72);
    background: rgba(15, 23, 42, 0.06);
}

.cf-block-badge--proy {
    color: rgba(30, 64, 175, 0.9);
    background: rgba(59, 130, 246, 0.14);
}

.cf-block-chip-row {
    display: flex;
    align-items: center;
    margin: 0 0 12px;
}

.cf-definir {
    margin: 0 0 14px;
    padding: 14px 14px 12px;
    border-radius: 12px;
    border: 1px solid rgba(37, 99, 235, 0.18);
    background: rgba(255, 255, 255, 0.78);
}

.cf-definir-head {
    margin: 0 0 12px;
}

.cf-definir-title {
    margin: 0;
    font-size: 16px;
    font-weight: 750;
    color: rgba(15, 23, 42, 0.92);
}

.cf-definir-desc {
    margin: 4px 0 0;
    font-size: 12px;
    font-weight: 600;
    color: rgba(15, 23, 42, 0.55);
    max-width: 560px;
}

.cf-elegido {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 12px;
}

.cf-elegido-label {
    margin-right: 2px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(15, 23, 42, 0.48);
}

.cf-elegido-pill {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 9px;
    border-radius: 999px;
    border: 1px solid rgba(37, 99, 235, 0.22);
    background: rgba(59, 130, 246, 0.1);
    color: rgba(30, 64, 175, 0.92);
    font-size: 11px;
    font-weight: 750;
}

.cf-horizonte-hint {
    margin: 2px 0 0;
    padding-left: 84px;
    font-size: 11px;
    font-weight: 600;
    color: rgba(15, 23, 42, 0.52);
    max-width: 640px;
}

.cf-legend--slim {
    gap: 12px 16px;
    margin-bottom: 10px;
}

@media (max-width: 720px) {
    .cf-horizonte-hint {
        padding-left: 0;
    }
}

.cf-grid-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin: 0 0 10px;
}

.cf-grid-toolbar .cf-toolbar-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.cf-block-badge--proy {
    color: rgba(30, 64, 175, 0.9);
    background: rgba(59, 130, 246, 0.14);
}

.cf-scenario-form {
    display: inline-flex;
    align-items: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.cf-scenario-form .cf-period-label {
    margin-right: -2px;
}

.cf-scenario-form .cf-period-input {
    width: 92px;
}

.cf-apply-btn {
    height: 34px;
    padding: 0 12px;
    border: 1px solid rgba(30, 64, 175, 0.28);
    border-radius: 8px;
    background: #2563eb;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.cf-apply-btn:hover {
    background: #1d4ed8;
}

.cf-scenario-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 6px 10px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    color: rgba(0, 0, 0, 0.62);
    font-size: 11px;
    font-weight: 800;
    text-decoration: none;
}

.cf-scenario-pill.active {
    border-color: rgba(30, 64, 175, 0.3);
    background: #dbeafe;
    color: #1e40af;
}

.cf-toolbar-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.cf-cascade-hint {
    font-size: 11px;
    font-weight: 700;
    color: rgba(0, 0, 0, 0.45);
    padding: 0 4px;
}

.cf-content-start {
    height: 0;
    scroll-margin-top: 8px;
}

.cf-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 34px;
    padding: 0 12px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.72);
    color: rgba(0, 0, 0, 0.62);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.cf-action-btn .material-icons {
    font-size: 17px;
}

.cf-action-btn:hover {
    background: rgba(255, 255, 255, 0.92);
}

.cf-scorecards {
    margin-bottom: 14px;
}

.cf-plan-real {
    margin: 28px 0 8px;
    padding: 16px 16px 12px;
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    background: rgba(255, 255, 255, 0.72);
}

.cf-plan-real--ok {
    border-color: rgba(77, 124, 15, 0.25);
    background: #f7fee7;
}

.cf-plan-real--warn {
    border-color: rgba(202, 138, 4, 0.28);
    background: #fefce8;
}

.cf-plan-real--bad {
    border-color: rgba(185, 28, 28, 0.22);
    background: #fef2f2;
}

.cf-plan-real-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.cf-plan-real-title {
    margin: 2px 0 0;
    font-size: 16px;
    color: rgba(15, 23, 42, 0.88);
}

.cf-plan-real-detail {
    margin: 4px 0 0;
    font-size: 11px;
    line-height: 1.4;
    color: rgba(15, 23, 42, 0.55);
}

.cf-plan-real-motor {
    margin: 6px 0 0;
    font-size: 11px;
    font-weight: 750;
    color: rgba(30, 64, 175, 0.88);
}

.cf-plan-real-metrics {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    min-width: 0;
}

.cf-efectividad-body {
    display: grid;
    grid-template-columns: minmax(200px, 0.9fr) minmax(0, 1.4fr);
    gap: 12px;
    align-items: stretch;
}

.cf-efectividad-body--single {
    grid-template-columns: 1fr;
}

.cf-plan-real-metric {
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.85);
    border-left: 3px solid #94a3b8;
}

.cf-plan-real-metric--ok {
    border-left-color: #4d7c0f;
}

.cf-plan-real-metric--warn {
    border-left-color: #ca8a04;
}

.cf-plan-real-metric--bad {
    border-left-color: #b91c1c;
}

.cf-plan-real-metric-label {
    display: block;
    margin-bottom: 4px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: rgba(15, 23, 42, 0.5);
}

.cf-plan-real-metric-pct {
    display: block;
    margin-bottom: 6px;
    font-size: 18px;
    font-variant-numeric: tabular-nums;
}

.cf-plan-real-metric-pct--money {
    font-size: 16px;
    font-weight: 800;
    color: rgba(15, 23, 42, 0.72);
}

.cf-plan-real-metric--na .cf-plan-real-metric-pct {
    color: rgba(15, 23, 42, 0.55);
}

.cf-plan-real-metric--ok .cf-plan-real-metric-pct {
    color: #4d7c0f;
}

.cf-plan-real-metric--warn .cf-plan-real-metric-pct {
    color: #a16207;
}

.cf-plan-real-metric--bad .cf-plan-real-metric-pct {
    color: #b91c1c;
}

.cf-plan-real--track {
    border-color: rgba(37, 99, 235, 0.22);
    background: #eff6ff;
}

.cf-plan-real-metric--track {
    border-left-color: #2563eb;
}

.cf-plan-real-metric--track .cf-plan-real-metric-pct,
.cf-plan-real--track .cf-plan-real-title {
    color: #1d4ed8;
}

.cf-plan-real-metric-vals {
    display: grid;
    gap: 2px;
    font-size: 11px;
    font-weight: 700;
    color: rgba(15, 23, 42, 0.62);
    font-variant-numeric: tabular-nums;
    word-break: break-word;
}

.cf-scorecards .dashboard-scorecard-value {
    font-size: clamp(15px, 1.6vw, 22px);
    font-variant-numeric: tabular-nums;
    word-break: break-word;
    line-height: 1.15;
}

.cf-driver-amount {
    font-variant-numeric: tabular-nums;
    word-break: break-word;
}

.cf-efectividad-chart-wrap {
    margin-top: 0;
    padding: 12px 14px 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.72);
    width: 100%;
    max-width: none;
    min-width: 0;
}

.cf-efectividad-chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 18px;
    margin: 0 0 8px;
    font-size: 11px;
    font-weight: 700;
    color: rgba(15, 23, 42, 0.55);
}

.cf-efectividad-chart-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.cf-efectividad-chart-note {
    display: none;
}

.cf-efectividad-key {
    display: inline-block;
    width: 18px;
    height: 3px;
    border-radius: 2px;
}

.cf-efectividad-key--plan {
    background: transparent;
    border-top: 3px dashed #94a3b8;
    height: 0;
}

.cf-efectividad-key--real {
    background: #0f766e;
}

.cf-efectividad-chart {
    width: 100%;
    min-height: 240px;
}

.cf-efectividad-chart svg {
    display: block;
    width: 100%;
    height: 250px;
    overflow: visible;
}

.cf-efectividad-line {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 3;
}

.cf-efectividad-line--plan {
    stroke: #94a3b8;
    stroke-dasharray: 7 5;
    stroke-width: 2.5;
}

.cf-efectividad-line--real {
    stroke: #0f766e;
}

.cf-efectividad-dot {
    fill: #ffffff;
    stroke-width: 2.5;
}

.cf-efectividad-dot--plan {
    stroke: #64748b;
}

.cf-efectividad-dot--real {
    stroke: #0f766e;
}

.cf-wa-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.cf-wa-bar-hint {
    margin: 0;
    font-size: 12px;
    line-height: 1.35;
    color: rgba(15, 23, 42, 0.5);
}

.cf-wa-copy {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    border: 1px solid rgba(15, 23, 42, 0.1);
    background: rgba(255, 255, 255, 0.9);
    color: rgba(15, 23, 42, 0.78);
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.cf-wa-copy .material-icons {
    font-size: 16px;
}

.cf-wa-copy:hover {
    background: #fff;
    border-color: rgba(15, 118, 110, 0.28);
    color: #0f766e;
}

.cf-wa-copy.is-copied {
    border-color: rgba(15, 118, 110, 0.35);
    color: #0f766e;
    background: rgba(240, 253, 250, 0.9);
}

.cf-wa-text-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.cf-projection-note {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid rgba(59, 130, 246, 0.2);
    background: rgba(239, 246, 255, 0.75);
    color: rgba(30, 64, 175, 0.82);
    font-size: 11px;
    font-weight: 700;
}

.cf-projection-note .material-icons {
    font-size: 15px;
}

.cf-scorecard {
    position: relative;
    overflow: hidden;
    min-height: 96px;
}

.cf-scorecard-icon {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.55);
}

.cf-scorecard-icon .material-icons {
    font-size: 18px;
}

.cf-scorecard--ingresos {
    border-left: 4px solid #8CC152;
}

.cf-scorecard--ingresos .cf-scorecard-icon {
    color: #5f8f24;
}

.cf-scorecard--egresos {
    border-left: 4px solid #DA4453;
}

.cf-scorecard--egresos .cf-scorecard-icon {
    color: #c53030;
}

.cf-scorecard--neto {
    border-left: 4px solid #3b82f6;
}

.cf-scorecard--neto .cf-scorecard-icon {
    color: #2563eb;
}

.cf-scorecard--saldo {
    border-left: 4px solid #a855f7;
}

.cf-scorecard--saldo .cf-scorecard-icon {
    color: #7c3aed;
}

.cf-read-panel,
.cf-drivers {
    margin-bottom: 14px;
    padding: 16px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
}

.cf-read-head,
.cf-drivers-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.cf-read-head h3,
.cf-drivers-head h3 {
    margin: 2px 0 0;
    font-size: 14px;
    line-height: 1.3;
    color: rgba(15, 23, 42, 0.86);
}

.cf-read-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.cf-read-card {
    min-width: 0;
    padding: 12px;
    border-radius: 12px;
    background: #f8fafc;
    border-left: 4px solid #94a3b8;
}

.cf-read-card--up {
    border-left-color: #8CC152;
    background: #f4fbe8;
}

.cf-read-card--down {
    border-left-color: #DA4453;
    background: #fdf4f4;
}

.cf-read-card--flat {
    border-left-color: #3b82f6;
    background: #eff6ff;
}

.cf-read-card--na {
    border-left-color: #94a3b8;
}

.cf-read-q {
    margin: 0 0 6px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.35;
    color: rgba(15, 23, 42, 0.58);
}

.cf-read-verdict {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
    font-size: 20px;
    letter-spacing: 0.2px;
    color: rgba(15, 23, 42, 0.88);
}

.cf-read-arrow {
    font-size: 18px;
    line-height: 1;
}

.cf-read-card--up .cf-read-arrow,
.cf-read-card--up .cf-read-verdict {
    color: #4d7c0f;
}

.cf-read-card--down .cf-read-arrow,
.cf-read-card--down .cf-read-verdict {
    color: #b91c1c;
}

.cf-yoy-title {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin: 2px 0 0;
    font-size: 18px;
}

.cf-yoy-title span {
    font-size: 12px;
    font-weight: 700;
    color: rgba(15, 23, 42, 0.45);
}

.cf-yoy-title--up {
    color: #4d7c0f;
}

.cf-yoy-title--down {
    color: #b91c1c;
}

.cf-yoy-title--flat,
.cf-yoy-title--na {
    color: #64748b;
}

.cf-yoy-nominal-sub {
    margin: 4px 0 0;
    font-size: 12px;
    font-weight: 700;
    color: rgba(15, 23, 42, 0.55);
}

.cf-yoy-insight {
    margin: 0 0 10px;
    padding: 8px 10px;
    border-radius: 10px;
    border-left: 3px solid #c2410c;
    background: #fff7ed;
    color: #9a3412;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;
}

.cf-yoy-insight--warn {
    border-left-color: #ca8a04;
    background: #fefce8;
    color: #854d0e;
}

.cf-read-detail {
    margin: 0;
    font-size: 11px;
    line-height: 1.4;
    color: rgba(15, 23, 42, 0.52);
}

.cf-drivers-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.cf-driver {
    padding: 12px;
    border-radius: 12px;
    background: #f8fafc;
}

.cf-driver--ingreso {
    border-top: 3px solid #8CC152;
}

.cf-driver--egreso {
    border-top: 3px solid #DA4453;
}

.cf-driver-label {
    display: block;
    margin-bottom: 4px;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: rgba(15, 23, 42, 0.48);
}

.cf-driver-amount {
    display: block;
    margin-bottom: 4px;
    font-size: 18px;
    font-variant-numeric: tabular-nums;
    color: rgba(15, 23, 42, 0.88);
}

.cf-driver small,
.cf-driver-delta {
    display: block;
    font-size: 10px;
    font-weight: 700;
}

.cf-driver small {
    color: rgba(15, 23, 42, 0.42);
}

.cf-driver-delta {
    margin-top: 6px;
}

.cf-driver-delta--up {
    color: #4d7c0f;
}

.cf-driver-delta--down {
    color: #b91c1c;
}

.cf-driver-delta--flat {
    color: #64748b;
}

.cf-chart-shape {
    margin: 6px 0 0;
    font-size: 11px;
    line-height: 1.4;
    color: rgba(15, 23, 42, 0.55);
}

.cf-chart-shape--up {
    color: #4d7c0f;
}

.cf-chart-shape--down {
    color: #b91c1c;
}

.cf-analysis-grid {
    display: grid;
    grid-template-columns: minmax(260px, 0.8fr) minmax(520px, 2fr);
    gap: 14px;
    margin-bottom: 12px;
}

.cf-analysis-card {
    min-width: 0;
    padding: 16px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
}

.cf-analysis-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.cf-analysis-head h3 {
    margin: 2px 0 0;
    font-size: 14px;
    line-height: 1.25;
    color: rgba(15, 23, 42, 0.86);
}

.cf-analysis-eyebrow {
    display: block;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: rgba(15, 23, 42, 0.42);
}

.cf-analysis-period {
    flex: 0 0 auto;
    padding: 5px 8px;
    border-radius: 999px;
    background: #eef2ff;
    color: #4338ca;
    font-size: 10px;
    font-weight: 800;
}

.cf-yoy-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.cf-yoy-metric {
    padding: 10px 12px;
    border-radius: 10px;
    background: #f8fafc;
}

.cf-yoy-metric-label {
    display: block;
    margin-bottom: 8px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: rgba(15, 23, 42, 0.52);
}

.cf-yoy-stack {
    display: grid;
    gap: 6px;
    margin-bottom: 6px;
}

.cf-yoy-side {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
}

.cf-yoy-side-label {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.cf-yoy-side--real .cf-yoy-side-label {
    color: rgba(15, 23, 42, 0.72);
}

.cf-yoy-side--nominal .cf-yoy-side-label {
    color: rgba(15, 23, 42, 0.42);
}

.cf-yoy-value {
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.cf-yoy-side--real .cf-yoy-value {
    font-size: 18px;
}

.cf-yoy-side--nominal .cf-yoy-value {
    font-size: 13px;
    opacity: 0.8;
}

.cf-yoy-value--up {
    color: #4d7c0f;
}

.cf-yoy-value--down {
    color: #b91c1c;
}

.cf-yoy-value--flat {
    color: #64748b;
}

.cf-yoy-metric small {
    display: block;
    overflow: hidden;
    color: rgba(15, 23, 42, 0.42);
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cf-yoy-empty {
    padding: 20px 12px;
    border-radius: 10px;
    background: #f8fafc;
    color: rgba(15, 23, 42, 0.5);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.5;
    text-align: center;
}

.cf-analysis-note {
    margin: 10px 0 0;
    font-size: 9px;
    color: rgba(15, 23, 42, 0.4);
}

.cf-chart-legend {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 9px;
    font-weight: 800;
    color: rgba(15, 23, 42, 0.5);
}

.cf-chart-legend span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.cf-chart-key {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 3px;
}

.cf-chart-key--income {
    background: #8CC152;
}

.cf-chart-key--expense {
    background: #DA4453;
}

.cf-chart-key--balance {
    width: 14px;
    height: 3px;
    border-radius: 99px;
    background: #3b82f6;
}

.cf-chart-key--projected {
    width: 14px;
    height: 9px;
    border-radius: 2px;
    border: 1px dashed rgba(30, 64, 175, 0.55);
    background: rgba(59, 130, 246, 0.22);
}

.cf-trend-chart {
    min-height: 240px;
}

.cf-trend-chart svg {
    display: block;
    width: 100%;
    height: 250px;
    overflow: visible;
}

.cf-chart-focus {
    fill: rgba(59, 130, 246, 0.06);
}

.cf-chart-projected-zone {
    fill: rgba(99, 102, 241, 0.14);
    stroke: none;
}

.cf-chart-projected-edge {
    stroke: rgba(37, 99, 235, 0.85);
    stroke-width: 2;
    stroke-dasharray: 5 4;
}

.cf-chart-projected-label {
    fill: rgba(30, 64, 175, 0.92);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.cf-chart-projected-caption {
    margin: 6px 0 0;
    font-size: 11px;
    font-weight: 700;
    color: rgba(30, 64, 175, 0.78);
}

.cf-chart-grid {
    stroke: rgba(15, 23, 42, 0.08);
    stroke-width: 1;
}

.cf-chart-zero {
    stroke: rgba(15, 23, 42, 0.28);
    stroke-width: 1.25;
}

.cf-chart-axis-label,
.cf-chart-month {
    fill: rgba(15, 23, 42, 0.42);
    font-family: inherit;
    font-size: 10px;
    font-weight: 700;
}

.cf-chart-month--focus {
    fill: #2563eb;
    font-weight: 900;
}

.cf-chart-bar {
    opacity: 0.82;
}

.cf-chart-bar:hover {
    opacity: 1;
}

.cf-chart-bar--income {
    fill: #8CC152;
}

.cf-chart-bar--expense {
    fill: #DA4453;
}

.cf-chart-balance-line {
    fill: none;
    stroke: #3b82f6;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 3;
}

.cf-chart-balance-dot {
    fill: #ffffff;
    stroke: #2563eb;
    stroke-width: 2.5;
}

.cf-scope-note {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding: 9px 12px;
    border: 1px solid rgba(59, 130, 246, 0.12);
    border-radius: 10px;
    background: rgba(239, 246, 255, 0.72);
    color: rgba(30, 64, 175, 0.72);
    font-size: 11px;
}

.cf-scope-note .material-icons {
    font-size: 17px;
}

.cf-legend {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 12px;
    font-size: 12px;
    font-weight: 600;
    color: rgba(0, 0, 0, 0.48);
}

.cf-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.cf-legend-item .material-icons {
    font-size: 16px;
}

.cf-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
}

.cf-legend-dot--ingresos {
    background: #8CC152;
}

.cf-legend-dot--egresos {
    background: #DA4453;
}

.cf-legend-dot--real {
    background: #22c55e;
}

.cf-legend-dot--projected {
    border: 1px dashed rgba(30, 64, 175, 0.45);
    background: rgba(59, 130, 246, 0.16);
}

.cf-source-badge {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    margin-left: 6px;
    padding: 2px 6px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 8px;
    font-weight: 900;
    letter-spacing: 0.35px;
    line-height: 1.2;
    text-transform: uppercase;
}

.cf-legend-item > .cf-source-badge {
    margin-left: 0;
}

.cf-source-badge--auto {
    border-color: rgba(22, 163, 74, 0.2);
    background: #ecfdf3;
    color: #15803d;
}

.cf-source-badge--manual {
    border-color: rgba(217, 119, 6, 0.2);
    background: #fffbeb;
    color: #b45309;
}

.cf-source-badge--pendiente {
    border-color: rgba(100, 116, 139, 0.22);
    background: #f1f5f9;
    color: #64748b;
}

.cf-grid-card {
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.06);
}

.cf-table-wrap {
    overflow: auto;
    max-height: min(72vh, 860px);
}

.cf-table {
    width: max-content;
    min-width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 12px;
}

.cf-table thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    background: #f8fafc;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    padding: 10px 12px;
    text-align: right;
    white-space: nowrap;
}

.cf-head--label {
    left: 0;
    z-index: 6 !important;
    text-align: left !important;
    min-width: 320px;
    max-width: 420px;
    background: #f8fafc !important;
    box-shadow: 8px 0 12px -8px rgba(15, 23, 42, 0.18);
}

.cf-head--period {
    min-width: 118px;
}

.cf-head-sub {
    display: block;
    margin-top: 2px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: rgba(0, 0, 0, 0.34);
}

.cf-head-projection {
    display: block;
    margin-top: 3px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.2px;
    color: #1d4ed8;
}

.cf-head-scope {
    display: inline-block;
    margin-top: 4px;
    padding: 1px 6px;
    border-radius: 999px;
    font-size: 8px;
    font-weight: 900;
    letter-spacing: 0.35px;
    text-transform: uppercase;
    color: #166534;
    background: #dcfce7;
}

.cf-head--projected .cf-head-scope {
    color: #1e40af;
    background: #dbeafe;
}

.cf-head--projected {
    background: #f3f8ff !important;
}

.cf-head-dow {
    display: block;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.6px;
    color: rgba(0, 0, 0, 0.38);
}

.cf-head-date {
    display: block;
    font-size: 12px;
    font-weight: 800;
    color: rgba(0, 0, 0, 0.62);
}

.cf-head--total {
    min-width: 120px;
    background: #f1f5f9;
}

.cf-cell {
    padding: 8px 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    vertical-align: middle;
}

.cf-cell--label {
    position: sticky;
    left: 0;
    z-index: 4;
    background: #ffffff;
    min-width: 320px;
    max-width: 420px;
    box-shadow: 8px 0 12px -8px rgba(15, 23, 42, 0.14);
}

.cf-cell--clickable {
    cursor: pointer;
    user-select: none;
}

.cf-cell--clickable:hover {
    background: #f3f4f6 !important;
}

.cf-cell--clickable:focus {
    outline: 2px solid rgba(0, 0, 0, 0.18);
    outline-offset: -2px;
}

.cf-row--expanded > .cf-cell--clickable:hover {
    background: #eef0f3 !important;
}

.cf-cell--amount {
    text-align: right;
    white-space: nowrap;
    color: rgba(0, 0, 0, 0.58);
    font-variant-numeric: tabular-nums;
}

.cf-cell--row-total {
    font-weight: 800;
}

.cf-cell--projected {
    background-image: linear-gradient(0deg, rgba(219, 234, 254, 0.22), rgba(219, 234, 254, 0.22));
}

.cf-amount-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
}

.cf-variation-wrap {
    display: block;
    line-height: 1.1;
}

.cf-variation {
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
}

.cf-variation--na {
    color: rgba(0, 0, 0, 0.28);
    font-weight: 600;
}

.cf-variation--up {
    color: #5f8f24;
}

.cf-variation--down {
    color: #b91c1c;
}

.cf-variation--flat {
    color: rgba(0, 0, 0, 0.42);
}

.cf-variation-pct {
    opacity: 0.9;
}

.cf-table--monthly .cf-head--period,
.cf-table--monthly .cf-cell--amount {
    min-width: 128px;
}

.cf-row--neto .cf-cell {
    background: #f3f4f6;
    border-top: 2px solid rgba(75, 85, 99, 0.18);
}

.cf-row--neto .cf-cell--label {
    background: #f3f4f6 !important;
}

.cf-neto-label {
    font-weight: 900;
    letter-spacing: 0.4px;
    color: rgba(55, 65, 81, 0.9);
}

.cf-cell--neto-total {
    background: #e5e7eb !important;
}

.cf-neto-note {
    display: block;
    margin-top: 3px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    color: rgba(75, 85, 99, 0.55);
}

.cf-row--rolling .cf-cell {
    background: #e8f0fe;
    border-top: 2px solid rgba(59, 130, 246, 0.22);
}

.cf-row--rolling .cf-cell--label {
    background: #e8f0fe !important;
}

.cf-rolling-label {
    font-weight: 900;
    letter-spacing: 0.4px;
    color: rgba(30, 64, 175, 0.88);
}

.cf-cell--rolling-total {
    background: #dbeafe !important;
}

.cf-rolling-note {
    display: block;
    margin-top: 3px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    color: rgba(30, 64, 175, 0.55);
}

.cf-label {
    display: flex;
    align-items: center;
    gap: 4px;
    padding-left: calc(var(--cf-depth) * 16px);
}

.cf-toggle {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: transparent;
    display: inline-grid;
    place-items: center;
    color: rgba(0, 0, 0, 0.45);
    flex: 0 0 auto;
    pointer-events: none;
}

.cf-toggle--spacer {
    display: inline-block;
    width: 24px;
    flex: 0 0 auto;
}

.cf-toggle .material-icons {
    font-size: 18px;
}

.cf-section-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.8px;
    color: rgba(0, 0, 0, 0.72);
    background: rgba(255, 255, 255, 0.35);
}

/* Ingresos: color intenso solo en columna Concepto; datos con fondo claro legible */
.cf-row--ingresos.cf-row--depth-0:not(.cf-row--leaf) .cf-cell--label { background: #4a7c23 !important; }
.cf-row--ingresos.cf-row--depth-1:not(.cf-row--leaf) .cf-cell--label { background: #6b9b37 !important; }
.cf-row--ingresos.cf-row--depth-2:not(.cf-row--leaf) .cf-cell--label { background: #94bb5a !important; }
.cf-row--ingresos.cf-row--depth-3:not(.cf-row--leaf) .cf-cell--label { background: #b8d68a !important; }
.cf-row--ingresos.cf-row--depth-4:not(.cf-row--leaf) .cf-cell--label,
.cf-row--ingresos.cf-row--depth-5:not(.cf-row--leaf) .cf-cell--label,
.cf-row--ingresos.cf-row--depth-6:not(.cf-row--leaf) .cf-cell--label { background: #d4e8b8 !important; }

.cf-row--ingresos.cf-row--depth-0:not(.cf-row--leaf) .cf-cell--amount { background: #edf5e4 !important; }
.cf-row--ingresos.cf-row--depth-1:not(.cf-row--leaf) .cf-cell--amount { background: #f2f8eb !important; }
.cf-row--ingresos.cf-row--depth-2:not(.cf-row--leaf) .cf-cell--amount { background: #f6faf2 !important; }
.cf-row--ingresos.cf-row--depth-3:not(.cf-row--leaf) .cf-cell--amount { background: #fafcf8 !important; }
.cf-row--ingresos.cf-row--depth-4:not(.cf-row--leaf) .cf-cell--amount,
.cf-row--ingresos.cf-row--depth-5:not(.cf-row--leaf) .cf-cell--amount,
.cf-row--ingresos.cf-row--depth-6:not(.cf-row--leaf) .cf-cell--amount { background: #ffffff !important; }

.cf-row--ingresos.cf-row--leaf .cf-cell,
.cf-row--ingresos.cf-row--leaf .cf-cell--label { background: #ffffff !important; }

.cf-row--ingresos.cf-row--depth-0:not(.cf-row--leaf) .cf-cell--label .cf-section-pill,
.cf-row--ingresos.cf-row--depth-0:not(.cf-row--leaf) .cf-cell--label .cf-group-label,
.cf-row--ingresos.cf-row--depth-0:not(.cf-row--leaf) .cf-cell--label .cf-total-label {
    color: #f4fbe8;
}

.cf-row--ingresos.cf-row--depth-0:not(.cf-row--leaf) .cf-cell--label .cf-section-pill {
    background: rgba(0, 0, 0, 0.14);
}

.cf-row--ingresos:not(.cf-row--leaf) .cf-cell--amount,
.cf-row--ingresos.cf-row--leaf .cf-cell--amount {
    color: rgba(0, 0, 0, 0.68);
}

/* Egresos: color intenso solo en columna Concepto; datos con fondo claro legible */
.cf-row--egresos.cf-row--depth-0:not(.cf-row--leaf) .cf-cell--label { background: #c62828 !important; }
.cf-row--egresos.cf-row--depth-1:not(.cf-row--leaf) .cf-cell--label { background: #d84343 !important; }
.cf-row--egresos.cf-row--depth-2:not(.cf-row--leaf) .cf-cell--label { background: #e57373 !important; }
.cf-row--egresos.cf-row--depth-3:not(.cf-row--leaf) .cf-cell--label { background: #ef9a9a !important; }
.cf-row--egresos.cf-row--depth-4:not(.cf-row--leaf) .cf-cell--label { background: #f5b4b4 !important; }
.cf-row--egresos.cf-row--depth-5:not(.cf-row--leaf) .cf-cell--label { background: #f9d0d0 !important; }
.cf-row--egresos.cf-row--depth-6:not(.cf-row--leaf) .cf-cell--label { background: #fce8e8 !important; }

.cf-row--egresos.cf-row--depth-0:not(.cf-row--leaf) .cf-cell--amount { background: #fdf0f0 !important; }
.cf-row--egresos.cf-row--depth-1:not(.cf-row--leaf) .cf-cell--amount { background: #fdf4f4 !important; }
.cf-row--egresos.cf-row--depth-2:not(.cf-row--leaf) .cf-cell--amount { background: #fef7f7 !important; }
.cf-row--egresos.cf-row--depth-3:not(.cf-row--leaf) .cf-cell--amount { background: #fefafa !important; }
.cf-row--egresos.cf-row--depth-4:not(.cf-row--leaf) .cf-cell--amount,
.cf-row--egresos.cf-row--depth-5:not(.cf-row--leaf) .cf-cell--amount,
.cf-row--egresos.cf-row--depth-6:not(.cf-row--leaf) .cf-cell--amount { background: #ffffff !important; }

.cf-row--egresos.cf-row--leaf .cf-cell,
.cf-row--egresos.cf-row--leaf .cf-cell--label { background: #ffffff !important; }

.cf-row--egresos.cf-row--depth-0:not(.cf-row--leaf) .cf-cell--label .cf-section-pill,
.cf-row--egresos.cf-row--depth-0:not(.cf-row--leaf) .cf-cell--label .cf-group-label,
.cf-row--egresos.cf-row--depth-0:not(.cf-row--leaf) .cf-cell--label .cf-total-label {
    color: #fff5f5;
}

.cf-row--egresos.cf-row--depth-0:not(.cf-row--leaf) .cf-cell--label .cf-section-pill {
    background: rgba(0, 0, 0, 0.14);
}

.cf-row--egresos:not(.cf-row--leaf) .cf-cell--amount,
.cf-row--egresos.cf-row--leaf .cf-cell--amount {
    color: rgba(0, 0, 0, 0.68);
}

.cf-row--ingresos .cf-cell--clickable:hover,
.cf-row--egresos .cf-cell--clickable:hover {
    filter: brightness(0.94);
}

.cf-row--ingresos.cf-row--leaf .cf-cell--clickable:hover,
.cf-row--egresos.cf-row--leaf .cf-cell--clickable:hover {
    filter: none;
    background: #f8fafc !important;
}

.cf-group-label {
    font-weight: 800;
    color: rgba(0, 0, 0, 0.68);
}

.cf-leaf-label {
    color: rgba(0, 0, 0, 0.58);
}

.cf-total-label {
    font-weight: 900;
    letter-spacing: 0.3px;
    color: rgba(0, 0, 0, 0.74);
}

.cf-row--total .cf-cell {
    border-top: 2px solid rgba(0, 0, 0, 0.12);
}

.cf-row--has-subtotal .cf-amount,
.cf-row--total .cf-amount {
    font-weight: 800;
}

.cf-row--section .cf-group-label,
.cf-row--section .cf-total-label,
.cf-row--section .cf-leaf-label {
    font-weight: 900;
}

.cf-row--depth-1 .cf-group-label,
.cf-row--depth-1 .cf-leaf-label {
    font-size: 12px;
}

.cf-row--depth-2 .cf-leaf-label,
.cf-row--depth-2 .cf-group-label {
    font-size: 11.5px;
}

.cf-row--depth-3 .cf-leaf-label,
.cf-row--depth-3 .cf-group-label {
    font-size: 11px;
}

.cf-cell--positive .cf-amount {
    color: #4d7c0f;
    font-weight: 700;
}

.cf-cell--outflow .cf-amount {
    color: #b91c1c;
    font-weight: 700;
}

.cf-cell--negative .cf-amount {
    color: #b91c1c;
}

.cf-amount {
    font-weight: 600;
}

.cf-empty {
    padding: 40px 20px;
    text-align: center;
    color: rgba(0, 0, 0, 0.45);
    font-weight: 700;
}

@media (max-width: 900px) {
    .cf-analysis-grid {
        grid-template-columns: 1fr;
    }

    .cf-read-grid,
    .cf-drivers-grid {
        grid-template-columns: 1fr 1fr;
    }

    .cf-trend-chart svg {
        min-width: 720px;
    }

    .cf-trend-chart {
        overflow-x: auto;
    }

    .cf-efectividad-chart svg {
        min-width: 720px;
    }

    .cf-efectividad-chart {
        overflow-x: auto;
    }

    .cf-period-form {
        grid-template-columns: repeat(2, minmax(140px, 1fr));
    }

    .cf-toolbar-actions {
        width: 100%;
    }

    .cf-table-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .cf-scenario-form {
        width: 100%;
    }

    .cf-head--label,
    .cf-cell--label {
        min-width: 240px;
    }
}

@media (max-width: 900px) {
    .cf-efectividad-body {
        grid-template-columns: 1fr;
    }

    .cf-plan-real-metrics {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .cf-yoy-metrics,
    .cf-read-grid,
    .cf-drivers-grid,
    .cf-plan-real-metrics {
        grid-template-columns: 1fr;
    }

    .cf-wa-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .cf-wa-copy {
        justify-content: center;
    }

    .cf-analysis-head {
        flex-direction: column;
    }

    .cf-chart-legend {
        justify-content: flex-start;
    }

    .cf-period-form {
        grid-template-columns: 1fr;
    }

    .cf-scenario-pill {
        flex: 1 1 100%;
    }

    .cf-table-controls {
        align-items: stretch;
    }

    .cf-scenario-form {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 6px 8px;
    }

    .cf-scenario-form .cf-period-input {
        width: 100%;
    }

    .cf-apply-btn {
        grid-column: 1 / -1;
    }
}

.dashboard-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 20px;
    align-items: start;
}

.dashboard-shell {
    padding: 20px;
}

/* --- Cashflow carga manual (Finanzas) --- */
.cfc-shell {
    padding: 24px 26px 28px;
}

.cfc-shell--ingresos .cfc-kpi--total .cfc-kpi-icon {
    background: rgba(77, 124, 15, 0.14);
    color: #4d7c0f;
}

.cfc-shell--egresos .cfc-kpi--total .cfc-kpi-icon {
    background: rgba(185, 28, 28, 0.12);
    color: #b91c1c;
}

.cfc-topbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.cfc-title {
    margin: 0;
    font-size: 24px;
    font-weight: 800;
    color: rgba(0, 0, 0, 0.72);
}

.cfc-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    position: sticky;
    top: 8px;
    z-index: 30;
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.55);
    background: rgba(248, 250, 252, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 10px 28px -18px rgba(15, 23, 42, 0.45);
}

.cfc-period-form {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cfc-period-label {
    font-size: 12px;
    font-weight: 700;
    color: rgba(0, 0, 0, 0.55);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.cfc-period-input {
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    background: rgba(255, 255, 255, 0.85);
    font-weight: 600;
}

.cfc-toolbar-search {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 220px;
    min-width: 200px;
    max-width: 360px;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.82);
}

.cfc-toolbar-search .material-icons {
    font-size: 20px;
    color: rgba(0, 0, 0, 0.4);
}

.cfc-search-input {
    border: 0;
    background: transparent;
    width: 100%;
    font-size: 14px;
    font-weight: 600;
    outline: none;
}

.cfc-toolbar-filter {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 3px;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.72);
}

.cfc-filter-btn {
    border: 0;
    background: transparent;
    color: rgba(0, 0, 0, 0.55);
    font-size: 12px;
    font-weight: 700;
    padding: 7px 10px;
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
}

.cfc-filter-btn.is-active {
    background: rgba(37, 99, 235, 0.12);
    color: rgba(29, 78, 216, 0.95);
}

.cfc-filter-btn:hover:not(.is-active) {
    background: rgba(0, 0, 0, 0.04);
}

.cfc-group--has-amount > .cfc-group-summary .cfc-group-subtotal {
    color: rgba(29, 78, 216, 0.92);
    font-weight: 800;
}

.cfc-toolbar-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-left: auto;
}

.cfc-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.72);
    color: rgba(0, 0, 0, 0.62);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.cfc-action-btn .material-icons {
    font-size: 18px;
}

.cfc-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.cfc-kpi {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.58);
    border: 1px solid rgba(255, 255, 255, 0.55);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.cfc-kpi-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: rgba(0, 0, 0, 0.06);
}

.cfc-kpi-value {
    font-size: 22px;
    font-weight: 800;
    color: rgba(0, 0, 0, 0.78);
    line-height: 1.1;
}

.cfc-kpi-label {
    margin-top: 4px;
    font-size: 12px;
    font-weight: 600;
    color: rgba(0, 0, 0, 0.48);
}

.cfc-form-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cfc-group {
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.52);
    border: 1px solid rgba(255, 255, 255, 0.5);
    overflow: hidden;
}

.cfc-group--depth-0 {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
}

.cfc-group--depth-1 {
    margin-left: 8px;
    background: rgba(255, 255, 255, 0.42);
}

.cfc-group-summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s ease;
}

.cfc-group-summary:hover {
    background: rgba(0, 0, 0, 0.03);
}

.cfc-group-summary::-webkit-details-marker {
    display: none;
}

.cfc-group-summary-main {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.cfc-group-toggle {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.06);
    color: rgba(0, 0, 0, 0.52);
    flex-shrink: 0;
    transition: background 0.15s ease, color 0.15s ease;
}

.cfc-group-toggle .material-icons {
    font-size: 22px;
    transition: transform 0.2s ease;
}

.cfc-group[open] > .cfc-group-summary .cfc-group-toggle .material-icons {
    transform: rotate(90deg);
}

.cfc-group-summary:hover .cfc-group-toggle {
    background: rgba(0, 0, 0, 0.1);
    color: rgba(0, 0, 0, 0.68);
}

.cfc-group-title {
    font-size: 14px;
    font-weight: 800;
    color: rgba(0, 0, 0, 0.74);
    letter-spacing: 0.2px;
}

.cfc-group-meta {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.cfc-group-count {
    font-size: 11px;
    font-weight: 700;
    color: rgba(0, 0, 0, 0.42);
}

.cfc-group-subtotal {
    min-width: 88px;
    text-align: right;
    font-size: 13px;
    font-weight: 800;
    color: rgba(0, 0, 0, 0.68);
}

.cfc-group-body {
    padding: 0 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cfc-leaf-row {
    display: grid;
    grid-template-columns: minmax(180px, 1.4fr) minmax(140px, 220px);
    gap: 12px;
    align-items: center;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.cfc-leaf-label {
    font-size: 13px;
    font-weight: 600;
    color: rgba(0, 0, 0, 0.68);
    line-height: 1.35;
}

.cfc-leaf-input-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.cfc-leaf-input-wrap:focus-within {
    border-color: rgba(59, 130, 246, 0.45);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.cfc-leaf-prefix {
    font-size: 13px;
    font-weight: 800;
    color: rgba(0, 0, 0, 0.45);
}

.cfc-amount-input {
    width: 100%;
    border: 0;
    background: transparent;
    font-size: 14px;
    font-weight: 700;
    text-align: right;
    outline: none;
    color: rgba(0, 0, 0, 0.78);
}

.cfc-hidden,
.cfc-hidden-group {
    display: none !important;
}

/* ---------- edición de categorías ---------- */
.cfc-drag-handle,
.cfc-edit-tools {
    display: none;
}

.cfc-drag-handle {
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    color: rgba(0, 0, 0, 0.32);
    cursor: grab;
    flex-shrink: 0;
}

.cfc-drag-handle:active {
    cursor: grabbing;
}

.cfc-drag-handle .material-icons {
    font-size: 20px;
}

.cfc-edit-tools {
    align-items: center;
    gap: 4px;
    margin-left: auto;
    flex-shrink: 0;
}

.cfc-edit-btn {
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.9);
    color: rgba(0, 0, 0, 0.55);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.cfc-edit-btn:hover {
    background: #fff;
    color: rgba(0, 0, 0, 0.8);
    border-color: rgba(0, 0, 0, 0.2);
}

.cfc-edit-btn .material-icons {
    font-size: 18px;
}

.cfc-edit-btn--danger:hover {
    background: rgba(239, 68, 68, 0.12);
    color: #dc2626;
    border-color: rgba(239, 68, 68, 0.4);
}

.cfc-rename-input {
    flex: 1;
    min-width: 120px;
    padding: 6px 10px;
    font-size: 14px;
    font-weight: 700;
    border: 1px solid rgba(59, 130, 246, 0.5);
    border-radius: 8px;
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
    background: #fff;
    color: rgba(0, 0, 0, 0.82);
}

/* estado de edición activo */
.cfc-editing .cfc-drag-handle {
    display: inline-grid;
}

.cfc-editing .cfc-edit-tools {
    display: inline-flex;
}

.cfc-editing .cfc-leaf-input-wrap,
.cfc-editing .cfc-group-meta {
    display: none;
}

.cfc-editing .cfc-leaf-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cfc-editing .cfc-leaf-label-wrap {
    flex: 1;
    min-width: 0;
}

.cfc-editing .cfc-group-summary {
    cursor: default;
}

.cfc-editing .cfc-group-summary-main {
    flex: 1;
    min-width: 0;
}

.cfc-leaf-label-wrap {
    display: block;
}

/* botones agregar */
.cfc-add-root {
    display: none;
    gap: 10px;
    flex-wrap: wrap;
    padding: 6px 2px 2px;
}

.cfc-editing .cfc-add-root {
    display: flex;
}

.cfc-add-root-btn,
.cfc-add-inline-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 14px;
    border-radius: 10px;
    border: 1px dashed rgba(0, 0, 0, 0.22);
    background: rgba(255, 255, 255, 0.6);
    color: rgba(0, 0, 0, 0.6);
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.cfc-add-root-btn:hover,
.cfc-add-inline-btn:hover {
    background: #fff;
    border-color: rgba(59, 130, 246, 0.5);
    color: rgba(0, 0, 0, 0.82);
}

.cfc-add-root-btn .material-icons,
.cfc-add-inline-btn .material-icons {
    font-size: 18px;
}

.cfc-add-inline {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 2px 0 2px 4px;
}

.cfc-add-inline-btn {
    padding: 6px 12px;
    font-size: 12px;
}

/* barra de edición */
.cfc-edit-bar[hidden] {
    display: none;
}

.cfc-edit-bar {
    margin: 4px 0 14px;
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.24);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.cfc-edit-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    font-weight: 600;
    color: rgba(30, 64, 130, 0.9);
    line-height: 1.4;
}

.cfc-edit-hint .material-icons {
    font-size: 20px;
}

.cfc-edit-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.cfc-action-btn--ghost {
    background: transparent;
}

/* marcadores de drag & drop */
.cfc-dragging {
    opacity: 0.5;
}

.cfc-drop-before {
    box-shadow: inset 0 3px 0 rgba(59, 130, 246, 0.8);
}

.cfc-drop-after {
    box-shadow: inset 0 -3px 0 rgba(59, 130, 246, 0.8);
}

.cfc-drop-into {
    outline: 2px dashed rgba(59, 130, 246, 0.6);
    outline-offset: -4px;
    border-radius: 10px;
}

.cfc-footer-bar {
    position: sticky;
    bottom: 8px;
    z-index: 30;
    margin-top: 18px;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.55);
    background: rgba(248, 250, 252, 0.94);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 -10px 28px -18px rgba(15, 23, 42, 0.45);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.cfc-footer-note {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: rgba(0, 0, 0, 0.48);
    max-width: 520px;
    line-height: 1.45;
}

.cfc-footer-note .material-icons {
    font-size: 18px;
}

.cfc-footer-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.cfc-save-btn {
    min-width: 180px;
}

.cfc-empty {
    padding: 48px 20px;
    text-align: center;
    color: rgba(0, 0, 0, 0.5);
}

.cfc-empty .material-icons {
    font-size: 42px;
    opacity: 0.45;
}

.cfc-toast {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 1200;
    padding: 12px 16px;
    border-radius: 12px;
    background: rgba(17, 24, 39, 0.92);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.cfc-toast.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Impuestos carga (Finanzas) --- */
.fi-shell {
    padding: 24px 26px 28px;
}

.fi-form {
    margin-top: 8px;
}

.fi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.fi-total-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.fi-total-prefix {
    font-weight: 800;
    color: rgba(0, 0, 0, 0.45);
}

.fi-total-input {
    text-align: right;
    font-weight: 700;
}

.fi-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}

.fi-list-card {
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.52);
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 16px;
}

.fi-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.fi-list-title {
    margin: 0;
    font-size: 16px;
    color: rgba(0, 0, 0, 0.78);
}

.fi-list-total {
    font-size: 13px;
    color: rgba(0, 0, 0, 0.55);
}

.fi-delete-btn {
    padding: 6px 8px;
}

.fi-delete-btn .material-icons {
    font-size: 18px;
}

@media (max-width: 720px) {
    .cfc-leaf-row {
        grid-template-columns: 1fr;
    }

    .cfc-toolbar-actions {
        width: 100%;
        margin-left: 0;
    }

    .cfc-footer-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .cfc-footer-actions {
        width: 100%;
    }

    .cfc-save-btn {
        width: 100%;
    }
}

.dashboard-layout-inside {
    gap: 18px;
}

.dashboard-frame {
    background: rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 14px;
    padding: 18px;
}

.dashboard-frame-inner {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 18px;
    align-items: start;
}

.dashboard-nav {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dashboard-nav-item {
    display: grid;
    grid-template-columns: 42px 1fr;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #666;
    font-weight: 600;
}

.dashboard-nav-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
}

.dashboard-nav-label {
    font-size: 14px;
}

.dashboard-nav-item:hover .dashboard-nav-icon {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.dashboard-nav-item.active {
    color: #333;
}

.dashboard-nav-item.active .dashboard-nav-icon {
    background: rgba(107, 114, 128, 0.85);
    color: white;
}

.dashboard-sidebar {
    position: sticky;
    top: 20px;
    height: fit-content;
}

.dashboard-sidebar-inner {
    padding: 20px;
    margin: 0;
}

.dashboard-side-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 10px;
    text-decoration: none;
    color: #666;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.25);
    transition: all 0.2s ease;
    margin-bottom: 10px;
}

.dashboard-side-item:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.dashboard-side-item.active {
    background: rgba(107, 114, 128, 0.8);
    color: white;
}

.dashboard-side-label {
    font-size: 14px;
}

.dashboard-main {
    min-width: 0;
}

.dashboard-panel {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 14px;
    padding: 18px;
}

.dashboard-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.dashboard-panel-title {
    font-size: 18px;
    font-weight: 700;
    color: #333;
}

.dashboard-filters {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.dashboard-filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dashboard-filter-group label {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.dashboard-filter-group input[type="date"] {
    height: 34px;
    padding: 6px 10px;
    border: 1px solid rgba(0,0,0,0.2);
    border-radius: 8px;
    background: rgba(255,255,255,0.95);
}

.dashboard-apply-btn {
    height: 34px;
    padding: 6px 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.dashboard-toolbar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 0;
}

.dashboard-toolbar label {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.dashboard-toolbar input[type="date"] {
    padding: 6px 8px;
    border: 1px solid rgba(0,0,0,0.2);
    border-radius: 8px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.dashboard-card-inner {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 14px;
    padding: 22px;
}

.dashboard-card-title {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin-bottom: 12px;
}

.dashboard-card-body {
    min-height: 240px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: rgba(0,0,0,0.25);
    font-weight: 700;
}

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

    .dashboard-sidebar {
        position: static;
    }

    .dashboard-frame-inner {
        grid-template-columns: 1fr;
    }
}

.section-title {
    font-size: 24px;
    color: #333;
    margin-bottom: 30px;
    font-weight: 600;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stat-box {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.stat-box-label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    margin-bottom: 10px;
    font-weight: 600;
}


/* Estilos adicionales extra dos */
.section-title.small { font-size: 18px; }

.view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.view-header .section-title { margin: 0; }

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

.material-icons.small { font-size: 16px; }

.material-icons.medium { font-size: 18px; }

.material-icons.vertical-middle { vertical-align: middle; margin-right: 8px; }


/* ====== ESTILOS PARA P GINA PRINCIPAL CON 4 BOTONES ====== */

.main-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
    max-width: 1200px;
    margin: 100px auto 30px auto;
    padding: 0;
    justify-items: center;
}

.main-button { aspect-ratio: 1; width: 100%; max-width: 140px; margin: 0 auto; border: none; border-radius: 12px; background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.7)); backdrop-filter: blur(20px); box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1); cursor: pointer; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-decoration: none; position: relative; overflow: hidden; }

.main-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent, rgba(239, 68, 68, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.main-button:hover::before {
    opacity: 1;
}

.main-button:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15);
}

.main-button:active {
    transform: translateY(-4px) scale(1.01);
}

.main-button-icon { font-size: 32px !important; color: #333333; }

.main-button:hover .main-button-icon { font-size: 32px !important; color: #333333; }

.main-button-text { font-size: 12px; font-weight: 600; text-align: center; line-height: 1.2; color: #333333; }

.main-button:hover .main-button-text { font-size: 12px; font-weight: 600; text-align: center; line-height: 1.2; color: #333333; }

/* Botones deshabilitados en la home (sin link real) */
a.main-button[href="#"] .main-button-icon,
a.main-button[href="#"] .main-button-text {
    color: rgba(0, 0, 0, 0.3);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .main-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 10px;
        margin: 50px 5px 20px 5px;
        padding: 0;
    }
    
    .main-button { aspect-ratio: 1; width: 100%; max-width: 140px; margin: 0 auto; border: none; border-radius: 12px; background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.7)); backdrop-filter: blur(20px); box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1); cursor: pointer; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-decoration: none; position: relative; overflow: hidden; }
    
    .main-button-icon { font-size: 32px !important; color: #333333; }
    
    .main-button-text { font-size: 12px; font-weight: 600; text-align: center; line-height: 1.2; color: #333333; }
}

@media (max-width: 480px) {
    .main-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 8px;
        margin: 30px 3px 15px 3px;
    }
    
    .main-button { aspect-ratio: 1; width: 100%; max-width: 140px; margin: 0 auto; border: none; border-radius: 12px; background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.7)); backdrop-filter: blur(20px); box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1); cursor: pointer; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-decoration: none; position: relative; overflow: hidden; }
    
    .main-button-icon { font-size: 32px !important; color: #333333; }
    
    .main-button-text { font-size: 12px; font-weight: 600; text-align: center; line-height: 1.2; color: #333333; }
}




        .page-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 20px 0;
            margin-bottom: 30px;
        }
        
        .page-title {
            font-size: 18px;
            color: #666;
            font-weight: 400;
        }
        
        .company-name {
            font-size: 18px;
            color: #666;
            font-weight: 600;
        }
        
        .nav-tabs {
            display: flex;
            gap: 10px;
            justify-content: center;
            margin-bottom: 40px;
        }
        
        .nav-tab {
            padding: 12px 30px;
            border: none;
            border-radius: 8px;
            background: rgba(255, 255, 255, 0.2);
            color: #666;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            gap: 8px;
            text-decoration: none;
        }
        
        .nav-tab:hover {
            background: rgba(255, 255, 255, 0.3);
            transform: translateY(-2px);
        }
        
        .nav-tab.active {
            background: rgba(107, 114, 128, 0.8);
            color: white;
        }
        
        .section-title {
            font-size: 24px;
            color: #333;
            margin-bottom: 30px;
            font-weight: 600;
        }
        
        .form-row {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 20px;
            margin-bottom: 30px;
        }
        
        .stats-row {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 20px;
            margin-bottom: 30px;
        }
        
        .stat-box {
            background: rgba(255, 255, 255, 0.2);
            backdrop-filter: blur(10px);
            border-radius: 12px;
            padding: 20px;
            text-align: center;
            border: 1px solid rgba(255, 255, 255, 0.3);
        }
        
        .stat-box-label {
            font-size: 12px;
            color: #666;
            text-transform: uppercase;
            margin-bottom: 10px;
            font-weight: 600;
        }
        
        .stat-box-value {
            font-size: 24px;
            color: #333;
            font-weight: 700;
        }
        
        .payment-section {
            background: rgba(255, 255, 255, 0.15);
            backdrop-filter: blur(10px);
            border-radius: 15px;
            padding: 30px;
            margin-bottom: 30px;
            border: 1px solid rgba(255, 255, 255, 0.2);
        }
        
        .payment-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 20px;
            margin-bottom: 20px;
        }
        
        .input-group label {
            display: block;
            margin-bottom: 8px;
            font-weight: 600;
            color: #333;
            font-size: 14px;
        }
        
        .input-group input, .input-group select {
            width: 100%;
            padding: 12px 15px;
            border: 2px solid rgba(255, 255, 255, 0.3);
            border-radius: 8px;
            background: rgba(255, 255, 255, 0.9);
            color: #1a1a1a;
            font-size: 14px;
            transition: all 0.3s ease;
            box-sizing: border-box;
        }
        
        .input-group input:focus, .input-group select:focus {
            outline: none;
            border-color: #6b7280;
            box-shadow: 0 0 0 3px rgba(107, 114, 128, 0.1);
        }
        
        .total-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 20px;
            background: rgba(0, 0, 0, 0.05);
            border-radius: 10px;
            margin-top: 20px;
        }

        .total-label {
            font-size: 16px;
            font-weight: 600;
            color: #333;
        }

        .total-value {
            font-size: 24px;
            font-weight: 700;
            color: #333;
        }

        /* Estilos específicos para totales de comisiones e ingresos */
        .total-value.total-comision {
            color: #b91c1c; /* rojo oscuro */
        }

        .total-descuento {
            color: #ea580c;
        }

        .total-value.total-ingreso {
            color: #166534; /* verde oscuro */
        }
        
        .commission-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 15px 20px;
        }
        
        .commission-label {
            font-size: 14px;
            color: #666;
        }
        
        .commission-value {
            font-size: 16px;
            font-weight: 700;
            color: #333;
        }
        
        /* Estilos para layout horizontal de cobros y totales */
        .cobros-horizontal {
            display: flex;
            gap: 20px;
            margin-bottom: 30px;
            flex-wrap: wrap;
        }
        
        .cobro-box {
            flex: 1;
            min-width: 200px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 10px;
            padding: 20px;
            text-align: center;
            border: 1px solid rgba(255, 255, 255, 0.2);
            transition: all 0.3s ease;
        }
        
        .cobro-box:hover {
            background: rgba(255, 255, 255, 0.2);
            transform: translateY(-2px);
        }
        
        .cobro-label {
            display: block;
            font-size: 14px;
            font-weight: 600;
            color: #333;
            margin-bottom: 10px;
            text-transform: uppercase;
        }
        
        .cobro-value {
            display: block;
            font-size: 20px;
            font-weight: 700;
            color: #333;
        }
        
        .totales-horizontal {
            display: flex;
            gap: 20px;
            margin-top: 20px;
            flex-wrap: wrap;
        }
        
        .total-box {
            flex: 1;
            min-width: 250px;
            background: rgba(0, 0, 0, 0.05);
            border-radius: 10px;
            padding: 20px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            border: 1px solid rgba(255, 255, 255, 0.2);
        }
        
        /* Estilos para totales finales horizontales */
        .totales-finales-horizontal {
            display: flex;
            gap: 20px;
            margin-top: 20px;
            flex-wrap: wrap;
        }
        
        .total-final-box {
            flex: 1;
            min-width: 200px;
            background: rgba(0, 0, 0, 0.05);
            border-radius: 10px;
            padding: 20px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            border: 1px solid rgba(255, 255, 255, 0.2);
        }
        
        .total-final-box .total-label {
            font-size: 16px;
            font-weight: 600;
            color: #333;
        }
        
        .total-final-box .total-value {
            font-size: 24px;
            font-weight: 700;
        }
        
        /* Colores específicos para cada tipo de total */
        .total-final-box .total-value.total-ingreso {
            color: #166534; /* verde oscuro */
        }
        
        .total-final-box .total-value.total-descuento {
            color: #ea580c; /* naranja */
        }
        
        .total-final-box .total-value.total-comision {
            color: #b91c1c; /* rojo oscuro */
        }
        
        /* Estilos para información de cobrador y supervisor */
        .cobrador-info {
            margin-bottom: 30px;
        }
        
        .cobrador-nombre {
            color: #333333;
            font-size: 18px;
            font-weight: bold;
            margin: 0 0 5px 0;
            text-transform: uppercase;
            letter-spacing: 1px;
        }
        
        .supervisor-nombre {
            color: #666666;
            font-size: 14px;
            font-weight: 500;
            margin: 0;
            text-transform: capitalize;
        }
        
        /* Estilos para detalles de comisiones */
        .total-label-with-detail {
            display: flex;
            flex-direction: column;
            align-items: flex-start;
        }
        
        .commission-percentage {
            font-size: 11px;
            color: #999999;
            font-style: italic;
            font-weight: 400;
            margin-top: 3px;
        }
        
        /* Estilos para header de totales con iconos de editar */
        .total-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            width: 100%;
        }
        
        .edit-icon-btn {
            background: none;
            border: none;
            color: #b7b7b7;
            cursor: pointer;
            padding: 4px;
            border-radius: 4px;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .edit-icon-btn:hover {
            background: rgba(183, 183, 183, 0.1);
            color: #ffffff;
            transform: scale(1.1);
        }
        
        .edit-icon-btn .material-icons {
            font-size: 16px;
        }
        
        /* Estilo especial para iconos de editar naranjas */
        .orange-edit {
            color: #ea580c !important;
            margin-left: 8px;
            background: rgba(234, 88, 12, 0.1) !important;
            border: 1px solid rgba(234, 88, 12, 0.2) !important;
        }
        
        .orange-edit:hover {
            background: rgba(234, 88, 12, 0.2) !important;
            color: #fb923c !important;
            border: 1px solid rgba(234, 88, 12, 0.3) !important;
        }
        
        /* Estilos para modales mejorados */
        .modal-grid {
            display: grid;
            grid-template-columns: 1fr;
            gap: 20px;
            margin-bottom: 30px;
        }
        
        .modal-input {
            width: 100% !important;
            text-align: center !important;
            font-size: 16px !important;
            padding: 12px !important;
            min-width: 200px !important;
        }
        
        .modal-buttons {
            display: flex;
            justify-content: center;
            gap: 20px;
            flex-wrap: wrap;
        }
        
        .modal-buttons .action-button {
            min-width: 140px;
        }
        
        /* Estilos para labels en modales */
        .modal-grid .input-group label {
            color: #ffffff !important;
        }
        
        /* Estilos para cajas de totales inline (sin animación hover) */
        
        .total-inline-content {
            display: flex;
            justify-content: space-between;
            align-items: center;
            width: 100%;
        }
        
        .total-inline-content .total-label {
            display: flex;
            align-items: center;
            flex: 1;
        }
        
        .total-inline-content .total-value {
            margin-left: 20px;
            font-weight: bold;
        }
        
        /* Estilos para el cuadro de total a pagar */
        .total-pagar-box {
            background: rgba(16, 185, 129, 0.15) !important;
            border: 1px solid rgba(16, 185, 129, 0.3) !important;
            box-shadow: 0 4px 15px rgba(5, 150, 105, 0.1) !important;
            width: 100% !important;
            max-width: none !important;
            margin: 0 !important;
        }
        
        .total-pagar-box .total-label {
            color: #333333 !important;
            font-weight: bold !important;
        }
        
        .total-pagar-box .total-value {
            color: #333333 !important;
            font-weight: bold !important;
            font-size: 24px !important;
            line-height: 1.2 !important;
        }
        
        /* Estilos para layout horizontal de secciones */
        .sections-horizontal {
            display: flex;
            gap: 30px;
            margin-bottom: 30px;
            flex-wrap: wrap;
        }
        
        .section-half {
            flex: 1;
            min-width: 400px;
        }
        
        .section-half .payment-grid {
            grid-template-columns: repeat(3, 1fr);
        }
        
        /* Responsive design */
        @media (max-width: 1024px) {
            .sections-horizontal {
                flex-direction: column;
            }
            
            .section-half {
                min-width: auto;
            }
        }
        
        @media (max-width: 768px) {
            .cobros-horizontal,
            .totales-horizontal,
            .totales-finales-horizontal {
                flex-direction: column;
            }
            
            .cobro-box,
            .total-box,
            .total-final-box {
                min-width: auto;
            }
            
            .section-half .payment-grid {
                grid-template-columns: 1fr;
            }
        }
        
        .action-button {
            padding: 12px 30px;
            border: none;
            border-radius: 8px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            display: inline-flex;
            align-items: center;
            gap: 8px;
            font-size: 14px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }
        
        .btn-primary {
            background: #10b981;
            color: white;
        }
        
        .btn-primary:hover {
            background: #059669;
            transform: translateY(-2px);
            box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
        }
        
        .button-row {
            display: flex;
            justify-content: center;
            margin-top: 30px;
        }
        
        .table-container {
            background: white;
            border-radius: 15px;
            overflow: hidden;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
        }
        
        .data-table {
            width: 100%;
            border-collapse: collapse;
        }
        
        .data-table thead {
            background: #6b7280;
            color: white;
        }
        
        .data-table th {
            padding: 15px;
            text-align: left;
            font-weight: 600;
            font-size: 12px;
            text-transform: uppercase;
        }
        
        .data-table td {
            padding: 15px;
            border-bottom: 1px solid #f1f1f1;
            font-size: 14px;
            color: #333;
        }
        
        .data-table tbody tr:hover {
            background: rgba(107, 114, 128, 0.05);
        }
        
        .status-badge {
            display: inline-block;
            padding: 4px 12px;
            border-radius: 20px;
            font-size: 11px;
            font-weight: bold;
            text-transform: uppercase;
        }
        
        .status-confirmed {
            background: #d1fae5;
            color: #059669;
        }
        
        .status-pending {
            background: #fef3c7;
            color: #d97706;
        }
        
        .action-btn-small {
            padding: 6px 12px;
            border: none;
            border-radius: 6px;
            cursor: pointer;
            font-size: 12px;
            font-weight: 600;
            transition: all 0.2s ease;
            display: inline-flex;
            align-items: center;
            gap: 4px;
            text-decoration: none;
        }
        
        .btn-view {
            background: rgba(128, 128, 128, 0.5);
            color: #666;
        }
        
        .btn-confirm {
            background: #d97706;
            color: white;
        }
        
        .btn-view:hover {
            background: rgba(128, 128, 128, 0.6);
            color: #555;
            transform: translateY(-1px);
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
        }
        
        .btn-confirm:hover {
            background: #b45309;
            transform: translateY(-1px);
            box-shadow: 0 4px 8px rgba(217, 119, 6, 0.3);
        }
        
        .top-collectors {
            margin-top: 30px;
        }
        
        .collector-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 15px;
            margin-bottom: 10px;
            background: rgba(255, 255, 255, 0.2);
            border-radius: 10px;
            transition: all 0.3s ease;
        }
        
        .collector-item:hover {
            background: rgba(255, 255, 255, 0.3);
            transform: translateX(5px);
        }
        
        .collector-name {
            font-weight: 600;
            color: #333;
            font-size: 14px;
        }
        
        .collector-supervisor {
            font-size: 12px;
            color: #666;
        }
        
        .collector-amount {
            font-size: 16px;
            font-weight: 700;
            color: #10b981;
        }
        
        .payment-breakdown {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 15px;
            margin-bottom: 20px;
        }
        
        .breakdown-item {
            text-align: center;
            padding: 15px;
            background: rgba(255, 255, 255, 0.15);
            border-radius: 10px;
        }
        
        .breakdown-label {
            font-size: 12px;
            color: #666;
            margin-bottom: 5px;
        }
        
        .breakdown-value {
            font-size: 18px;
            font-weight: 700;
            color: #333;
        }
        
        .breakdown-percent {
            font-size: 11px;
            color: #999;
        }
        
        .export-button {
            padding: 10px 20px;
            border: none;
            border-radius: 8px;
            background: rgba(255, 255, 255, 0.2);
            color: #666;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            display: inline-flex;
            align-items: center;
            gap: 8px;
        }
        
        .export-button:hover {
            background: rgba(255, 255, 255, 0.3);
            transform: translateY(-2px);
        }
        
        .filter-dropdown {
            padding: 10px 15px;
            border: 2px solid rgba(255, 255, 255, 0.3);
            border-radius: 8px;
            background: #f1f1f1;
            color: #1a1a1a;
            font-size: 14px;
            cursor: pointer;
        }

/* ===== ESTILOS PARA CAJA COBRANZAS ===== */

/* Estilos para secciones de pago */
.payment-section {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.payment-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.input-group input, .input-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
    color: #1a1a1a;
    font-size: 14px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.input-group input:focus, .input-group select:focus {
    outline: none;
    border-color: #6b7280;
    box-shadow: 0 0 0 3px rgba(107, 114, 128, 0.1);
}

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
    margin-top: 20px;
}

.total-label {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.total-value {
    font-size: 18px;
    font-weight: 700;
    color: #10b981;
}

.total-ingreso {
    color: #10b981;
}

.total-egreso {
    color: #ef4444;
}

/* Estilos para layout horizontal de secciones */
.sections-horizontal {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.section-half {
    flex: 1;
    min-width: 400px;
}

.section-half .payment-grid {
    grid-template-columns: repeat(3, 1fr);
}

/* Botones de acción */
.action-button {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: #10b981;
    color: white;
}

.btn-primary:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.button-row {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.table-container {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

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

.data-table thead {
    background: #6b7280;
    color: white;
}

.data-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
}

.data-table td {
    padding: 15px;
    border-bottom: 1px solid #f1f1f1;
    font-size: 14px;
    color: #333;
}

.data-table tbody tr:hover {
    background: rgba(107, 114, 128, 0.05);
}

/* Estilos para el informe diario con cajitas */
.daily-report {
    width: 100%;
}

.report-date-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding: 8px 0;
}

.report-label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.report-value {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.report-separator {
    height: 1px;
    background: rgba(255, 255, 255, 0.3);
    margin: 15px 0;
}

/* Cajitas principales del informe */
.report-boxes-main {
    display: flex !important;
    gap: 15px !important;
    margin-bottom: 20px !important;
    width: 100% !important;
}

.report-boxes-payment {
    display: flex !important;
    gap: 10px !important;
    margin-bottom: 25px !important;
    width: 100% !important;
}

.report-box {
    background: rgba(255, 255, 255, 0.2) !important;
    backdrop-filter: blur(10px) !important;
    border-radius: 12px !important;
    padding: 20px !important;
    text-align: center !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    flex: 1 !important;
    display: block !important;
    box-sizing: border-box !important;
}

.report-box-label {
    font-size: 12px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.report-box-value {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    line-height: 1.2;
}

/* Colores específicos para cada tipo de caja */
/* Cajitas principales - Verde */
.report-box-total {
    border-left: 4px solid #10b981 !important;
}

.report-box-collectors {
    border-left: 4px solid #10b981 !important;
}

/* Cajitas de métodos de pago - Azul */
.report-box-qr {
    border-left: 4px solid #3b82f6 !important;
}

.report-box-transfer {
    border-left: 4px solid #3b82f6 !important;
}

.report-box-cash {
    border-left: 4px solid #3b82f6 !important;
}

/* Cajitas de comisiones - Violeta */
.report-box-commission-micro {
    border-left: 4px solid #8b5cf6 !important;
}

.report-box-commission-products {
    border-left: 4px solid #8b5cf6 !important;
}

/* Cajitas de egresos - Naranja */
.report-box-egreso-qr {
    border-left: 4px solid #f59e0b !important;
}

.report-box-egreso-banco {
    border-left: 4px solid #f59e0b !important;
}

.report-box-egreso-efectivo {
    border-left: 4px solid #f59e0b !important;
}

.report-box-egreso-reserva {
    border-left: 4px solid #f59e0b !important;
}

/* Botones de compartir */
.report-share-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 25px;
}

.btn-whatsapp {
    background: #25d366;
    color: white;
}

.btn-whatsapp:hover {
    background: #1da851;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.btn-email {
    background: #6b7280;
    color: white;
}

.btn-email:hover {
    background: #4b5563;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(107, 114, 128, 0.3);
}

/* Estilos para arqueo de caja mejorado */
.bill-counter-container {
    width: 100%;
}

.bill-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 15px;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.bill-label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    text-align: left;
}

.bill-input {
    width: 80px;
    padding: 8px 12px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.9);
    color: #1a1a1a;
    font-size: 14px;
    text-align: center;
    transition: all 0.3s ease;
    height: 36px;
    box-sizing: border-box;
}

.bill-input:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.bill-total {
    font-size: 14px;
    font-weight: 700;
    color: #333;
    text-align: right;
    background: rgba(16, 185, 129, 0.1);
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid rgba(16, 185, 129, 0.2);
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    box-sizing: border-box;
}

.bill-row-total {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    align-items: center;
    padding: 20px 0;
    margin-top: 20px;
    border-top: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(16, 185, 129, 0.1);
    border-radius: 8px;
    padding: 20px;
}

.bill-total-label {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    text-align: left;
    text-transform: uppercase;
}

.bill-total-value {
    font-size: 20px;
    font-weight: 700;
    color: #10b981;
    text-align: right;
}

/* Distribución de ancho para secciones */
.sections-horizontal {
    display: flex !important;
    flex-direction: row !important;
    gap: 20px;
    width: 100%;
    align-items: flex-start;
}

.section-half {
    flex-shrink: 0;
}

.section-half:first-child {
    flex: 0 0 35%;
    max-width: 35%;
}

.section-half:last-child {
    flex: 1;
    min-width: 0;
}

/* Responsive design */
@media (max-width: 1024px) {
    .sections-horizontal {
        flex-direction: column;
    }
    
    .section-half {
        min-width: auto;
    }
}

@media (max-width: 768px) {
    .sections-horizontal {
        flex-direction: column !important;
    }
    
    .section-half,
    .section-half:first-child,
    .section-half:last-child {
        flex: 1;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .section-half .payment-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .report-boxes-main,
    .report-boxes-payment {
        flex-direction: column;
    }
    
    .report-share-buttons {
        flex-direction: column;
    }
    
    .bill-row {
        grid-template-columns: 1fr;
        gap: 10px;
        text-align: center;
    }
    
    .bill-total {
        text-align: center;
    }
    
    .bill-row-total {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .bill-total-value {
        text-align: center;
    }
}

/* ====== REGISTRO CHEQUES (MOCK) ====== */
.typeahead-suggestions {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
    padding: 6px;
    z-index: 20;
}

.typeahead-item {
    width: 100%;
    display: block;
    text-align: left;
    border: none;
    background: transparent;
    padding: 10px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    color: #333;
}

.typeahead-item:hover {
    background: rgba(239, 68, 68, 0.08);
}

.plazo-field {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.plazo-input {
    width: 100%;
    min-height: 54px;
    padding: 10px 10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.plazo-text {
    border: none !important;
    outline: none;
    background: transparent !important;
    padding: 8px 6px;
    min-width: 140px;
    flex: 1;
}

.plazo-options {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.plazo-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 10px;
    font-weight: 700;
    border: 2px solid rgba(0, 0, 0, 0.08);
    cursor: pointer;
    user-select: none;
    background: rgba(255, 255, 255, 0.7);
}

.plazo-chip.selected {
    cursor: pointer;
}

.plazo-chip .x {
    font-weight: 900;
    opacity: 0.8;
}

.plazo-chip.chip-0 {
    background: rgba(219, 234, 254, 0.9);
    border-color: rgba(37, 99, 235, 0.35);
    color: #1d4ed8;
}

.plazo-chip.chip-30 {
    background: rgba(209, 250, 229, 0.9);
    border-color: rgba(5, 150, 105, 0.35);
    color: #047857;
}

.plazo-chip.chip-60 {
    background: rgba(254, 243, 199, 0.95);
    border-color: rgba(217, 119, 6, 0.35);
    color: #b45309;
}

.plazo-chip.chip-90 {
    background: rgba(237, 233, 254, 0.95);
    border-color: rgba(124, 58, 237, 0.35);
    color: #6d28d9;
}

.plazo-chip.chip-120 {
    background: rgba(226, 232, 240, 0.95);
    border-color: rgba(71, 85, 105, 0.25);
    color: #334155;
}

.plazo-chip.chip-custom {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(239, 68, 68, 0.25);
    color: #ef4444;
}

.plazo-custom {
    display: inline-flex;
    align-items: stretch;
    border: 2px dashed rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.6);
}

.plazo-custom input {
    border: none !important;
    background: transparent !important;
    padding: 10px 12px;
    width: 170px;
}

.plazo-custom-add {
    border: none;
    padding: 0 14px;
    cursor: pointer;
    font-weight: 900;
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.plazo-custom-add:hover {
    background: rgba(239, 68, 68, 0.18);
}

/* Modales: botones cancelar / cerrar (btn-secondary) — texto negro legible */
.modal-buttons .action-button.btn-secondary,
.modal-overlay .action-button.btn-secondary,
[role="dialog"] .action-button.btn-secondary,
[aria-modal="true"] .action-button.btn-secondary,
div[id*="Modal"] .action-button.btn-secondary {
    color: #000000 !important;
}

.modal-buttons .action-button.btn-secondary .material-icons,
.modal-overlay .action-button.btn-secondary .material-icons,
[role="dialog"] .action-button.btn-secondary .material-icons,
[aria-modal="true"] .action-button.btn-secondary .material-icons,
div[id*="Modal"] .action-button.btn-secondary .material-icons {
    color: #000000 !important;
}

.modal-buttons .action-button.btn-secondary:hover,
.modal-overlay .action-button.btn-secondary:hover,
[role="dialog"] .action-button.btn-secondary:hover,
[aria-modal="true"] .action-button.btn-secondary:hover,
div[id*="Modal"] .action-button.btn-secondary:hover {
    color: #000000 !important;
}

.modal-buttons .action-button.btn-secondary:hover .material-icons,
.modal-overlay .action-button.btn-secondary:hover .material-icons,
[role="dialog"] .action-button.btn-secondary:hover .material-icons,
[aria-modal="true"] .action-button.btn-secondary:hover .material-icons,
div[id*="Modal"] .action-button.btn-secondary:hover .material-icons {
    color: #000000 !important;
}

/* Seguimiento de ventas (Cashflow) */
.cfv-shell {
    padding: 26px;
    margin: 20px 0;
}

.cfv-topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.cfv-subtitle {
    margin: 6px 0 0;
    color: #64748b;
    font-size: 14px;
}

.cfv-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(14, 165, 233, 0.12);
    color: #0369a1;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.cfv-view-switch {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
}

.cfv-view-btn {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 10px 16px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.55);
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.cfv-view-btn .material-icons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    line-height: 1;
}

.cfv-view-btn-label {
    line-height: 1.2;
}

.cfv-view-btn:hover {
    background: rgba(255, 255, 255, 0.85);
    color: #334155;
}

.cfv-view-btn.is-active {
    background: #0ea5e9;
    border-color: #0ea5e9;
    color: #fff;
}

.cfv-carga-layout {
    display: grid;
    grid-template-columns: minmax(300px, 340px) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.cfv-sidebar-card {
    background: rgba(255, 255, 255, 0.45);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 14px;
    min-width: 0;
}

.cfv-sidebar-card h3 {
    margin: 0 0 4px;
    font-size: 15px;
    color: #1e293b;
}

.cfv-sidebar-hint {
    margin: 0 0 12px;
    color: #94a3b8;
    font-size: 12px;
}

.cfv-day-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
}

.cfv-month-picker {
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.cfv-month-picker-label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
}

.cfv-month-picker-label .material-icons {
    font-size: 18px;
    color: #0ea5e9;
}

.cfv-month-input {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    background: #fff;
    color: #1e293b;
    font-size: 14px;
    font-weight: 600;
}

.cfv-readonly-note {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 12px;
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(100, 116, 139, 0.1);
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
}

.cfv-readonly-note .material-icons {
    font-size: 16px;
}

.cfv-day-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    background: rgba(255, 255, 255, 0.7);
    color: #475569;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.cfv-day-item.has-data {
    border-color: rgba(14, 165, 233, 0.25);
}

.cfv-day-item.is-active {
    background: #e0f2fe;
    border-color: #7dd3fc;
    color: #0369a1;
}

.cfv-day-check {
    font-size: 14px !important;
    color: #22c55e;
}

.cfv-config-list {
    margin: 0 0 12px;
}

.cfv-config-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    padding: 7px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    font-size: 12px;
}

.cfv-config-row dt {
    color: #64748b;
    font-weight: 500;
    flex: 1;
    min-width: 0;
    line-height: 1.35;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cfv-config-label-text {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 2px;
}

.cfv-config-row dd {
    margin: 0;
    color: #1e293b;
    font-weight: 700;
    text-align: right;
    flex-shrink: 0;
}

.cfv-sidebar-card--config .cfv-config-input {
    display: none;
    width: 100%;
    box-sizing: border-box;
}

.cfv-sidebar-card--config.is-editing .cfv-config-row {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
}

.cfv-sidebar-card--config.is-editing .cfv-config-row dd {
    text-align: left;
    width: 100%;
}

.cfv-sidebar-card--config.is-editing .cfv-config-value {
    display: none;
}

.cfv-sidebar-card--config.is-editing .cfv-config-input {
    display: block;
    font-weight: 600;
}

.cfv-config-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cfv-config-actions .cfv-btn[hidden] {
    display: none;
}

.cfv-config-row--calc {
    background: rgba(135, 206, 235, 0.1);
    margin: 0 -4px;
    padding: 7px 4px;
    border-radius: 8px;
    border-bottom-color: transparent;
}

.cfv-config-row--calc + .cfv-config-row:not(.cfv-config-row--calc) {
    margin-top: 4px;
}

.cfv-config-row--calc .cfv-config-value {
    color: #0369a1;
}

.cfv-sidebar-card--config.is-editing .cfv-config-row--calc .cfv-config-value {
    display: block;
}

.cfv-calc-icon {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    margin-left: 2px;
    color: #0369a1;
    cursor: help;
}

.cfv-calc-icon .material-icons {
    font-size: 14px;
}

.cfv-carga-main {
    background: rgba(255, 255, 255, 0.45);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 16px;
    padding: 20px;
}

.cfv-form-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.cfv-form-head h3 {
    margin: 0 0 4px;
    font-size: 20px;
    color: #0f172a;
}

.cfv-form-head p {
    margin: 0;
    color: #64748b;
    font-size: 13px;
}

.cfv-form-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.cfv-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    border-radius: 10px;
    border: 1px solid transparent;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.cfv-btn--primary {
    background: #0ea5e9;
    color: #fff;
}

.cfv-btn--primary:hover {
    background: #0284c7;
}

.cfv-btn--ghost {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(0, 0, 0, 0.08);
    color: #475569;
}

.cfv-btn--block {
    width: 100%;
    box-sizing: border-box;
}

.cfv-btn--sm {
    padding: 8px 12px;
    font-size: 12px;
}

.cfv-btn--sm .material-icons {
    font-size: 18px;
}

.cfv-btn--icon {
    min-width: 0;
    padding: 4px;
    line-height: 1;
}

.cfv-btn--icon .material-icons {
    font-size: 18px;
}

.cfv-plu-calc-row th,
.cfv-plu-calc-row td {
    background: rgba(135, 206, 235, 0.08);
}

.cfv-table--micro {
    min-width: 880px;
}

.cfv-categories-group .cfv-field-group-head {
    align-items: center;
}

.cfv-categories-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.75);
    overflow: hidden;
}

.cfv-categories-empty {
    margin: 0;
    padding: 20px 16px;
    text-align: center;
    color: #94a3b8;
    font-size: 13px;
}

.cfv-category-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 108px 40px;
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.cfv-category-row:last-child {
    border-bottom: none;
}

.cfv-category-row--readonly {
    grid-template-columns: minmax(0, 1fr) 108px;
}

.cfv-category-name-wrap {
    min-width: 0;
}

.cfv-category-name,
.cfv-category-name-readonly {
    width: 100%;
    box-sizing: border-box;
}

.cfv-category-name-readonly {
    display: block;
    padding: 10px 12px;
    font-size: 14px;
    font-weight: 600;
    color: #334155;
    line-height: 1.35;
}

.cfv-category-value {
    width: 100%;
    box-sizing: border-box;
    text-align: right;
}

.cfv-category-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.9);
    color: #94a3b8;
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.cfv-category-remove:hover {
    color: #dc2626;
    border-color: rgba(220, 38, 38, 0.25);
    background: rgba(254, 226, 226, 0.5);
}

.cfv-category-remove .material-icons {
    font-size: 20px;
}

.cfv-categories-hint {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin: 12px 0 0;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(100, 116, 139, 0.08);
    color: #64748b;
    font-size: 12px;
    line-height: 1.4;
}

.cfv-categories-hint .material-icons {
    font-size: 16px;
    flex-shrink: 0;
}

@media (max-width: 640px) {
    .cfv-category-row {
        grid-template-columns: minmax(0, 1fr) 88px 36px;
        gap: 8px;
        padding: 10px;
    }

    .cfv-category-remove {
        width: 36px;
        height: 36px;
    }
}

.cfv-carga-main--readonly .cfv-input,
.cfv-carga-main--readonly .cfv-input-wrap .cfv-input {
    background: rgba(241, 245, 249, 0.9);
    color: #64748b;
}

.cfv-field--auto .cfv-input,
.cfv-field--auto .cfv-input-wrap .cfv-input {
    background: rgba(14, 165, 233, 0.06);
    border-color: rgba(14, 165, 233, 0.2);
}

.cfv-field-group {
    margin-bottom: 18px;
    padding: 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.cfv-field-group-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.cfv-field-group-head h4 {
    margin: 0 0 2px;
    font-size: 15px;
    color: #1e293b;
}

.cfv-field-group-head p {
    margin: 0;
    font-size: 12px;
    color: #94a3b8;
}

.cfv-field-group-head p {
    margin: 0;
    font-size: 12px;
    color: #94a3b8;
}

.cfv-auto-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    margin-left: 4px;
    color: #0ea5e9;
    cursor: help;
}

.cfv-auto-icon .material-icons {
    font-size: 15px;
}

.cfv-config-row .cfv-auto-icon {
    margin-left: 2px;
}

.cfv-field-label-text {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    flex-wrap: wrap;
}

.cfv-field-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.cfv-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cfv-field-label {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    line-height: 1.35;
}

.cfv-field-col {
    color: #cbd5e1;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.cfv-field-sheet {
    color: #e2e8f0;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.cfv-field-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1px;
    flex-shrink: 0;
    text-align: right;
}

.cfv-group-sheet {
    margin: 6px 0 0;
    font-size: 11px;
    color: #94a3b8;
}

.cfv-group-sheet strong {
    color: #64748b;
    font-weight: 700;
}

.cfv-config-row .cfv-field-sheet {
    font-size: 10px;
    text-transform: uppercase;
}

.cfv-input,
.cfv-input-wrap .cfv-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    background: #fff;
    color: #1e293b;
    font-size: 14px;
    font-weight: 600;
}

.cfv-input-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
}

.cfv-input-prefix {
    color: #94a3b8;
    font-weight: 700;
}

.cfv-input-wrap .cfv-input {
    flex: 1;
}

.cfv-form-foot {
    margin-top: 8px;
    padding: 12px 14px;
    border-radius: 10px;
    background: rgba(14, 165, 233, 0.08);
    color: #0369a1;
    font-size: 12px;
}

.cfv-form-foot .material-icons {
    font-size: 16px;
    vertical-align: middle;
    margin-right: 4px;
}

.cfv-carga-sidebar {
    min-width: 0;
}

.cfv-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.cfv-kpis--compact {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.cfv-kpi {
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.cfv-kpi-label {
    display: block;
    margin-bottom: 4px;
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
}

.cfv-kpi strong {
    display: block;
    color: #0f172a;
    font-size: 22px;
    line-height: 1.1;
}

.cfv-kpi small {
    display: block;
    margin-top: 4px;
    color: #94a3b8;
    font-size: 11px;
}

.cfv-kpi--up strong {
    color: #16a34a;
}

.cfv-kpi--down strong {
    color: #dc2626;
}

.cfv-panels-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.cfv-panel {
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 16px;
    padding: 16px;
}

.cfv-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.cfv-panel-head h3 {
    margin: 0;
    font-size: 16px;
    color: #1e293b;
}

.cfv-panel-note {
    color: #94a3b8;
    font-size: 11px;
}

.cfv-chart {
    min-height: 240px;
}

.cfv-chart--compact {
    min-height: 200px;
}

.cfv-breakdown-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4px 12px;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    font-size: 13px;
}

.cfv-breakdown-row strong {
    color: #0f172a;
}

.cfv-bar {
    grid-column: 1 / -1;
    height: 6px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.cfv-bar i {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: #0ea5e9;
}

.cfv-bar--micro i {
    background: #8b5cf6;
}

.cfv-breakdown-row--units {
    grid-template-columns: 1fr auto;
}

.cfv-panel--table {
    margin-bottom: 8px;
}

.cfv-table-wrap {
    overflow: auto;
}

.cfv-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.cfv-table th,
.cfv-table td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    text-align: right;
    white-space: nowrap;
}

.cfv-table th:first-child,
.cfv-table td:first-child {
    text-align: left;
}

.cfv-table thead th {
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.cfv-th-manual,
.cfv-td-manual {
    background: rgba(135, 206, 235, 0.12);
}

.cfv-th-calc,
.cfv-td-calc {
    background: rgba(255, 242, 204, 0.35);
}

.cfv-td-calc--up {
    color: #16a34a;
    font-weight: 700;
}

.cfv-td-calc--down {
    color: #dc2626;
    font-weight: 700;
}

.cfv-legend {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #64748b;
    font-size: 11px;
}

.cfv-legend-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    margin-right: 4px;
    vertical-align: middle;
}

.cfv-legend-dot--manual {
    background: #87CEEB;
}

.cfv-legend-dot--calc {
    background: #FFF2CC;
}

.cfv-row-current {
    background: rgba(14, 165, 233, 0.08);
    font-weight: 600;
}

.cfv-comparativo-intro {
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.45);
    color: #475569;
    font-size: 13px;
}

@media (max-width: 960px) {
    .cfv-carga-layout,
    .cfv-panels-grid,
    .cfv-kpis--compact {
        grid-template-columns: 1fr;
    }

    .cfv-form-head {
        flex-direction: column;
    }

    .cfv-day-list {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Seguimiento ventas — productos / borrador / informe */
.cfv-day-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin-bottom: 10px;
    font-size: 11px;
    color: #64748b;
}

.cfv-day-legend-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 3px;
    margin-right: 4px;
    vertical-align: middle;
}

.cfv-day-legend-dot--complete {
    background: #22c55e;
}

.cfv-day-legend-dot--draft {
    background: #eab308;
}

.cfv-day-legend-dot--empty {
    background: #e2e8f0;
    border: 1px solid #cbd5e1;
}

.cfv-day-item.has-draft {
    border-color: rgba(234, 179, 8, 0.45);
    background: rgba(254, 249, 195, 0.65);
    color: #854d0e;
}

.cfv-day-item.is-saturday:not(.is-active) {
    border-color: rgba(139, 92, 246, 0.35);
}

.cfv-day-draft {
    font-size: 14px !important;
    color: #ca8a04 !important;
}

.cfv-btn--draft {
    background: rgba(234, 179, 8, 0.15);
    border: 1px solid rgba(234, 179, 8, 0.45);
    color: #854d0e;
}

.cfv-btn--draft:hover {
    background: rgba(234, 179, 8, 0.28);
}

.cfv-estado-borrador {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(234, 179, 8, 0.2);
    color: #854d0e;
    font-size: 12px;
    font-weight: 700;
}

.cfv-cat-table-wrap {
    overflow-x: auto;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 12px;
}

.cfv-cat-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.cfv-cat-table th,
.cfv-cat-table td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    vertical-align: middle;
}

.cfv-cat-table thead th {
    background: rgba(241, 245, 249, 0.9);
    color: #475569;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.cfv-cat-table tbody th {
    text-align: left;
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
}

.cfv-input--compact {
    padding: 8px 10px !important;
    font-size: 13px !important;
}

.cfv-input-wrap--compact .cfv-input-prefix {
    font-size: 12px;
}

.cfv-field--stacked-label .cfv-field-label-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    line-height: 1.35;
}

.cfv-field--stacked-label .cfv-field-label-line {
    display: block;
}

.cfv-field--stacked-label .cfv-field-label-text strong {
    display: block;
    color: #1e293b;
    font-weight: 700;
}

.cfv-money-input::placeholder {
    color: #cbd5e1;
    font-weight: 500;
}

.cfv-money-input[readonly] {
    color: #334155;
}

.cfv-percent-input::placeholder {
    color: #cbd5e1;
    font-weight: 500;
}

.cfv-percent-input[readonly] {
    color: #334155;
}

.cfv-cat-label-readonly {
    display: block;
    padding: 10px 12px;
    font-size: 14px;
    font-weight: 600;
    color: #334155;
    line-height: 1.35;
}

.cfv-th-actions {
    width: 44px;
    padding-left: 4px !important;
    padding-right: 4px !important;
}

.cfv-cat-table--categorias td:last-child,
.cfv-cat-table--planes td:last-child {
    width: 44px;
    text-align: center;
    vertical-align: middle;
}

body.cfv-modal-open {
    overflow: hidden;
}

.cfv-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.cfv-modal[hidden] {
    display: none !important;
}

.cfv-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(2px);
}

.cfv-modal-card {
    position: relative;
    width: min(100%, 420px);
    padding: 24px;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: #fff;
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.18);
}

.cfv-modal-title {
    margin: 0 0 10px;
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
}

.cfv-modal-message {
    margin: 0 0 20px;
    font-size: 14px;
    line-height: 1.5;
    color: #475569;
}

.cfv-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.cfv-btn--danger {
    background: #dc2626 !important;
    border-color: #dc2626 !important;
    color: #fff !important;
}

.cfv-btn--danger:hover {
    background: #b91c1c !important;
    border-color: #b91c1c !important;
}

.cfv-mensual-shell {
    margin-top: 18px;
    padding: 26px 28px;
}

.cfv-mensual-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.cfv-mensual-panel {
    margin-top: 0;
}

.cfv-panel-head--compact {
    padding: 12px 14px 0;
    margin-bottom: 0;
}

.cfv-panel-head--compact h3 {
    margin: 0;
    font-size: 14px;
    color: #334155;
}

.cfv-legend--compact {
    font-size: 11px;
}

.cfv-stock-mensual-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    margin-top: 14px;
}

.cfv-stock-panel--combined {
    margin-top: 14px;
}

.cfv-table--stock-combined {
    min-width: 780px;
    font-size: 13px;
}

.cfv-table--stock-combined th,
.cfv-table--stock-combined td {
    padding: 10px 12px;
    font-size: 13px;
}

.cfv-table--stock-combined .cfv-stock-combined-day-col {
    white-space: normal;
    min-width: 118px;
    max-width: 140px;
    vertical-align: top;
}

.cfv-dia-tabla-cell {
    display: flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.35;
}

.cfv-table--stock-combined .cfv-stock-combined-group {
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    color: #64748b;
    background: rgba(241, 245, 249, 0.85);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.cfv-table--stock-combined .cfv-stock-combined-group--nuevo {
    border-right: 1px solid rgba(0, 0, 0, 0.06);
}

.cfv-table--stock-combined .cfv-stock-semi-col {
    border-left: 2px solid rgba(100, 116, 139, 0.2);
}

@media (max-width: 960px) {
    .cfv-stock-mensual-grid {
        grid-template-columns: 1fr;
    }
}

.cfv-stock-params-top {
    margin-bottom: 16px;
    padding: 14px 16px;
    border-radius: 12px;
    background: rgba(241, 245, 249, 0.7);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.cfv-stock-params-top h4 {
    margin: 0 0 12px;
    font-size: 14px;
    color: #334155;
}

.cfv-stock-inicial-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.cfv-stock-inicial-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.cfv-stock-inicial-label {
    display: block;
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
}

.cfv-stock-inicial-card strong {
    display: block;
    color: #0f172a;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
    word-break: break-word;
}

@media (max-width: 960px) {
    .cfv-stock-inicial-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .cfv-stock-inicial-grid {
        grid-template-columns: 1fr;
    }
}

.cfv-dia-sabado {
    color: #7c3aed;
    font-weight: 700;
}

.cfv-table--mensual td small,
.cfv-dia-tabla-cell small {
    display: block;
    margin-top: 2px;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 400;
}

.cfv-legend-dot--saturday {
    background: #7c3aed;
}

@media (max-width: 960px) {
    .cfv-mensual-shell {
        padding: 18px 16px;
    }

    .cfv-mensual-head {
        flex-direction: column;
    }
}


.cfv-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 320px;
    padding: 40px 24px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.45);
    border: 1px dashed rgba(0, 0, 0, 0.1);
    text-align: center;
    color: #64748b;
}

.cfv-placeholder-icon {
    font-size: 48px !important;
    color: #94a3b8;
}

.cfv-placeholder h3 {
    margin: 0;
    color: #334155;
}

.cfv-placeholder--minimal {
    min-height: 220px;
}

.cfv-informe-layout {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cfv-informe-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.cfv-informe-head-actions {
    flex-shrink: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: flex-end;
    gap: 10px;
}

#cfvInformeDownloadBtn.is-loading {
    opacity: 0.7;
    pointer-events: none;
}

#cfvInformeExportRoot.cfv-informe-export-root--capture {
    padding: 28px 32px;
    border-radius: 0;
    background: #ffffff !important;
}

#cfvInformeExportRoot.cfv-informe-export-root--capture .cfv-informe-head {
    margin-bottom: 18px;
}

#cfvInformeExportRoot.cfv-informe-export-root--capture .cfv-informe-cat-wrap,
#cfvInformeExportRoot.cfv-informe-export-root--capture .cfv-informe-proy-block {
    overflow: visible;
}

.cfv-informe-day-picker {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    margin: 0;
}

.cfv-informe-day-picker-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
}

.cfv-informe-day-picker-label .material-icons {
    font-size: 18px;
    color: #0ea5e9;
}

.cfv-informe-day-select {
    min-width: 240px;
    max-width: 100%;
    padding: 10px 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    background: #fff;
    color: #1e293b;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.cfv-informe-day-select:focus {
    outline: 2px solid rgba(14, 165, 233, 0.35);
    outline-offset: 1px;
}

.cfv-informe-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.cfv-informe-kpi {
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.cfv-informe-kpi-label {
    display: block;
    margin-bottom: 4px;
    color: #64748b;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.cfv-informe-kpi strong {
    display: block;
    color: #0f172a;
    font-size: 20px;
    line-height: 1.15;
}

.cfv-informe-kpi small {
    display: block;
    margin-top: 4px;
    color: #94a3b8;
    font-size: 11px;
}

.cfv-informe-kpi--up strong {
    color: #16a34a;
}

.cfv-informe-kpi--down strong {
    color: #dc2626;
}

.cfv-informe-panels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.cfv-informe-panel {
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.cfv-informe-panel--wide {
    padding: 0;
    overflow: hidden;
}

.cfv-informe-panel-title {
    margin: 0 0 10px;
    padding: 0;
    font-size: 13px;
    font-weight: 700;
    color: #334155;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.cfv-informe-panel--wide .cfv-informe-panel-title {
    padding: 14px 16px 0;
}

.cfv-informe-metrics {
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 14px;
}

.cfv-informe-metric {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.cfv-informe-metric dt {
    margin: 0;
    color: #64748b;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.3;
}

.cfv-informe-metric dd {
    margin: 0;
    color: #0f172a;
    font-size: 13px;
    font-weight: 700;
    text-align: right;
    white-space: nowrap;
}

.cfv-informe-cat-wrap {
    overflow-x: auto;
}

.cfv-informe-cat-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.cfv-informe-cat-table th,
.cfv-informe-cat-table td {
    padding: 8px 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    vertical-align: middle;
}

.cfv-informe-cat-table thead th {
    background: rgba(241, 245, 249, 0.95);
    color: #475569;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.cfv-informe-cat-table tbody th {
    text-align: left;
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
}

.cfv-informe-num {
    text-align: right;
    white-space: nowrap;
    color: #334155;
    font-variant-numeric: tabular-nums;
}

.cfv-informe-num--highlight {
    color: #0369a1;
    font-weight: 700;
}

.cfv-informe-cat-table tfoot th,
.cfv-informe-cat-table tfoot td {
    background: rgba(241, 245, 249, 0.6);
    font-weight: 600;
}

.cfv-informe-total-row th,
.cfv-informe-total-row td {
    background: rgba(14, 165, 233, 0.08) !important;
    border-top: 2px solid rgba(14, 165, 233, 0.2);
    font-weight: 700 !important;
    color: #0c4a6e;
}

@media (max-width: 960px) {
    .cfv-informe-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cfv-informe-panels {
        grid-template-columns: 1fr;
    }

    .cfv-informe-metrics {
        grid-template-columns: 1fr;
    }

    .cfv-informe-head {
        flex-direction: column;
    }

    .cfv-informe-day-picker {
        align-items: stretch;
        width: 100%;
    }

    .cfv-informe-day-select {
        width: 100%;
        min-width: 0;
    }

    .cfv-informe-proy-grid {
        grid-template-columns: 1fr;
    }
}

.cfv-informe-proy-grid {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    gap: 12px;
}

.cfv-informe-proy-panel {
    padding-bottom: 14px;
}

.cfv-informe-proy-panel .cfv-informe-panel-title {
    padding: 14px 16px 0;
}

.cfv-informe-proy-block {
    overflow-x: auto;
    padding: 0 16px 14px;
}

.cfv-informe-proy-panel--side {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cfv-informe-panel-title--sub {
    margin-top: 8px;
}

.cfv-informe-proy-panel--side .cfv-informe-proy-table--compact {
    margin: 0 16px 8px;
}

.cfv-informe-proy-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.cfv-informe-proy-table th,
.cfv-informe-proy-table td {
    padding: 7px 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    vertical-align: middle;
}

.cfv-informe-proy-table th {
    text-align: left;
    font-weight: 600;
    color: #334155;
    white-space: nowrap;
}

.cfv-informe-proy-section th {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-size: 11px;
    color: #1e293b;
    background: rgba(255, 242, 204, 0.45);
}

.cfv-informe-proy-section td {
    background: rgba(255, 242, 204, 0.25);
    font-weight: 600;
}

.cfv-informe-proy-spacer td {
    padding: 4px 0;
    border: none;
    background: transparent;
}

.cfv-informe-num--calc {
    color: #92400e;
    font-weight: 700;
}

.cfv-informe-proy-table--compact {
    background: rgba(255, 242, 204, 0.18);
    border-radius: 10px;
    overflow: hidden;
}

.cfv-informe-proy-table--compact th,
.cfv-informe-proy-table--compact td {
    background: rgba(255, 242, 204, 0.18);
}

@media (max-width: 960px) {
    .cfv-view-btn-label {
        font-size: 11px;
    }

    .cfv-cat-table tbody th {
        white-space: normal;
    }
}

