/* Higos Group Premium Glassmorphic Design System */

:root {
    --bg-main: #0F1F18;
    --bg-body-gradient: radial-gradient(at 0% 0%, rgba(27, 58, 45, 0.4) 0px, transparent 40%),
                        radial-gradient(at 50% 0%, rgba(201, 168, 76, 0.08) 0px, transparent 50%),
                        radial-gradient(at 100% 50%, rgba(107, 142, 78, 0.1) 0px, transparent 45%),
                        #0F1F18;
    --bg-card: rgba(20, 43, 33, 0.65);
    --bg-card-hover: rgba(27, 58, 45, 0.8);
    --bg-sidebar: rgba(15, 31, 24, 0.92);
    
    --border-color: rgba(201, 168, 76, 0.12);
    --border-color-hover: rgba(201, 168, 76, 0.25);
    
    --primary: #C9A84C;
    --primary-hover: #D4AF37;
    --primary-gradient: linear-gradient(135deg, #C9A84C 0%, #D4AF37 50%, #A68B3A 100%);
    --primary-glow: rgba(201, 168, 76, 0.3);
    
    --secondary: #6B8E4E;
    --accent: #7DA35E;
    
    --success: #10b981;
    --success-glow: rgba(16, 185, 129, 0.15);
    
    --warning: #f59e0b;
    --warning-glow: rgba(245, 158, 11, 0.15);
    
    --danger: #ef4444;
    --danger-glow: rgba(239, 68, 68, 0.15);
    
    --info: #7DA35E;
    --info-glow: rgba(125, 163, 94, 0.15);
    
    --text-main: #F5F0E6;
    --text-muted: #A8B5A0;
    --text-dark: #0F1F18;
    
    --sidebar-width: 270px;
    --border-radius-sm: 8px;
    --border-radius-md: 14px;
    --border-radius-lg: 20px;
    --border-radius-xl: 28px;
    
    --font-outfit: 'Outfit', sans-serif;
    --font-inter: 'Inter', sans-serif;
    
    --transition-fast: all 0.2s ease;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --glass-blur: blur(16px);
    --shadow-premium: 0 8px 32px 0 rgba(0, 0, 0, 0.45);
}

/* Reset de estilos */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-inter);
    background: var(--bg-body-gradient);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-outfit);
    font-weight: 600;
    letter-spacing: -0.02em;
    color: #F5F0E6;
}

/* ================= COMPONENTES GENERALES ================= */

/* Botones */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-outfit);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 10px 20px;
    border-radius: var(--border-radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
}

.btn-primary {
    background: var(--primary-gradient);
    color: #ffffff;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(201, 168, 76, 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--border-color-hover);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    background: var(--danger);
    color: #ffffff;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
    border-radius: var(--border-radius-sm);
}

.btn-block {
    width: 100%;
}

.icon-sm {
    width: 16px;
    height: 16px;
}

/* Campos de Formulario */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-family: var(--font-outfit);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-muted);
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="date"],
select,
textarea {
    width: 100%;
    font-family: var(--font-inter);
    background: rgba(20, 43, 33, 0.7);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 12px 16px;
    color: #ffffff;
    outline: none;
    transition: var(--transition);
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
    background: rgba(20, 43, 33, 0.9);
}

.input-with-icon {
    position: relative;
}

.input-with-icon i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    width: 20px;
    height: 20px;
    transition: var(--transition-fast);
}

.input-with-icon input {
    padding-left: 46px;
}

.input-with-icon input:focus + i {
    color: var(--primary);
}

/* Grid de Formulario */
.form-grid {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
}

.col-12 { width: 100%; padding: 0 10px; }
.col-8 { width: 66.66%; padding: 0 10px; }
.col-6 { width: 50%; padding: 0 10px; }
.col-4 { width: 33.33%; padding: 0 10px; }
.col-3 { width: 25%; padding: 0 10px; }

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 20px;
}

/* Modales */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(3, 7, 18, 0.75);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-premium);
    backdrop-filter: var(--glass-blur);
    padding: 30px;
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .modal-box {
    transform: scale(1);
}

.modal-lg {
    max-width: 850px;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition-fast);
}

.modal-close:hover {
    color: #ffffff;
    transform: rotate(90deg);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

/* ================= PANTALLA DE LOGIN ================= */

.login-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-body-gradient);
    z-index: 999;
}

.login-card {
    background: var(--bg-card);
    border: 1px solid rgba(201, 168, 76, 0.2);
    box-shadow: var(--shadow-premium);
    backdrop-filter: var(--glass-blur);
    border-radius: var(--border-radius-xl);
    width: 90%;
    max-width: 420px;
    padding: 40px;
    animation: floatUp 0.8s ease;
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #C9A84C, #D4AF37, #C9A84C, transparent);
    background-size: 200% 100%;
    animation: goldShimmer 3s ease-in-out infinite;
}

.login-header {
    text-align: center;
    margin-bottom: 35px;
}

.logo-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: transparent;
    border-radius: var(--border-radius-md);
    margin-bottom: 15px;
    overflow: hidden;
}

.logo-badge img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.login-header h1 {
    font-size: 2rem;
    margin-bottom: 5px;
    background: linear-gradient(135deg, #C9A84C, #D4AF37, #E8D48B);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ================= ESTRUCTURA PRINCIPAL DE LA APP ================= */

.app-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar de navegación */
.app-sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    backdrop-filter: var(--glass-blur);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 100;
}

.sidebar-brand {
    padding: 25px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border-color);
}

.brand-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background: transparent;
    border-radius: var(--border-radius-sm);
    overflow: hidden;
}

.brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand-text h2 {
    font-size: 1.1rem;
    line-height: 1.2;
}

.brand-text span {
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.sidebar-menu {
    padding: 25px 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-muted);
    text-decoration: none;
    font-family: var(--font-outfit);
    font-weight: 500;
    border-radius: var(--border-radius-md);
    transition: var(--transition);
}

.menu-item i {
    width: 20px;
    height: 20px;
}

.menu-item:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.04);
}

.menu-item.active {
    color: #0F1F18;
    background: var(--primary-gradient);
    box-shadow: 0 4px 12px rgba(201, 168, 76, 0.3);
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.1);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.avatar {
    width: 36px;
    height: 36px;
    background: rgba(201, 168, 76, 0.1);
    border: 1px solid rgba(201, 168, 76, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.user-details .user-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #ffffff;
}

.user-details .user-role {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.btn-logout {
    width: 100%;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    padding: 8px;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    font-family: var(--font-outfit);
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
}

.btn-logout:hover {
    background: var(--danger);
    color: #ffffff;
}

/* Área de Contenido Principal */
.app-content {
    margin-left: var(--sidebar-width);
    flex-grow: 1;
    padding: 40px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.content-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 35px;
}

.header-title h1 {
    font-size: 2.2rem;
    margin-bottom: 4px;
}

.header-actions .date-display {
    pointer-events: none;
    font-weight: 500;
}

/* Secciones de la Aplicación */
.app-section {
    display: none;
    animation: fadeIn 0.4s ease-in-out forwards;
}

.app-section.active {
    display: block;
}

/* ================= ELEMENTOS DEL DASHBOARD ================= */

/* Tarjetas KPI */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 30px;
}

.kpi-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 24px;
    display: flex;
    align-items: flex-start;
    gap: 20px;
    box-shadow: var(--shadow-premium);
    backdrop-filter: var(--glass-blur);
    transition: var(--transition);
}

.kpi-card:hover {
    transform: translateY(-4px);
    background: var(--bg-card-hover);
    border-color: var(--border-color-hover);
}

.kpi-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.icon-revenue {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.icon-pending {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.icon-events {
    background: rgba(107, 142, 78, 0.1);
    color: var(--secondary);
    border: 1px solid rgba(107, 142, 78, 0.2);
}

.icon-clients {
    background: rgba(201, 168, 76, 0.1);
    color: var(--primary);
    border: 1px solid rgba(201, 168, 76, 0.2);
}

.kpi-info h3 {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.kpi-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
    margin-bottom: 6px;
    font-family: var(--font-outfit);
}

.kpi-label {
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Gráficos del Dashboard */
.charts-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    margin-bottom: 30px;
}

.chart-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-premium);
    backdrop-filter: var(--glass-blur);
}

.chart-card h3 {
    font-size: 1.15rem;
    margin-bottom: 20px;
    color: #ffffff;
}

.chart-container {
    position: relative;
    height: 320px;
    width: 100%;
}

/* Tablas Modernas */
.dashboard-table-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-premium);
    backdrop-filter: var(--glass-blur);
}

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

.card-header h3 {
    font-size: 1.15rem;
}

.table-responsive {
    overflow-x: auto;
    width: 100%;
}

.table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.table th, .table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.table th {
    font-family: var(--font-outfit);
    font-weight: 500;
    color: var(--text-muted);
}

.table tbody tr {
    transition: var(--transition-fast);
}

.table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.table-bordered {
    border: 1px solid var(--border-color);
}

.table-bordered th, .table-bordered td {
    border: 1px solid var(--border-color);
}

/* Badges de Estados */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-success { background: rgba(16, 185, 129, 0.15); color: var(--success); }
.badge-warning { background: rgba(245, 158, 11, 0.15); color: var(--warning); }
.badge-danger { background: rgba(239, 68, 68, 0.15); color: var(--danger); }
.badge-info { background: rgba(125, 163, 94, 0.15); color: var(--info); }
.badge-secondary { background: rgba(156, 163, 175, 0.15); color: var(--text-muted); }
.badge-partial { background: rgba(201, 168, 76, 0.15); color: var(--primary); }

/* Abono Summary Card */
.abono-summary {
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--border-radius-md);
    padding: 16px 20px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
}

.abono-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.abono-summary-row strong {
    color: #F5F0E6;
}

.abono-balance-row {
    border-top: 1px solid var(--border-color);
    margin-top: 6px;
    padding-top: 10px;
    font-size: 1rem;
}

.abono-balance-row strong {
    color: var(--primary);
    font-size: 1.1rem;
}

/* Abono Button in Table */
.btn-icon-abono:hover {
    color: var(--primary) !important;
    background: rgba(201, 168, 76, 0.1) !important;
}

/* Acciones en Tabla */
.table-actions {
    display: flex;
    gap: 8px;
}

.btn-icon {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.btn-icon.btn-icon-danger:hover {
    color: #f87171;
    background: rgba(239, 68, 68, 0.1);
}

/* ================= SECCIONES CRUD COMUNES ================= */

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

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

.search-box i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    width: 18px;
    height: 18px;
}

.search-box input {
    padding-left: 44px;
    padding-top: 10px;
    padding-bottom: 10px;
    font-size: 0.9rem;
}

.data-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-premium);
    backdrop-filter: var(--glass-blur);
    padding: 10px 0;
}

.form-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-premium);
    backdrop-filter: var(--glass-blur);
    padding: 30px;
}

.max-width-lg {
    max-width: 750px;
    margin: 0 auto;
}

/* ================= MODAL FACTURA Y DESGLOSE ================= */

.invoice-items-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 25px 0 15px 0;
}

.calc-totals-container {
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--border-radius-md);
    padding: 20px;
    border: 1px solid var(--border-color);
}

.calc-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(201, 168, 76, 0.08);
    font-size: 0.95rem;
}

.calc-row:last-child {
    border-bottom: none;
}

.calc-label {
    color: var(--text-muted);
    font-weight: 500;
}

.calc-val {
    color: #ffffff;
    font-weight: 600;
}

.discount-row input {
    width: 120px;
    padding: 6px 12px;
    text-align: right;
    font-size: 0.9rem;
}

.total-row {
    font-size: 1.3rem;
    padding-top: 15px;
    margin-top: 5px;
}

.total-row .calc-label {
    font-family: var(--font-outfit);
    color: #ffffff;
    font-weight: 700;
}

.total-row .calc-val {
    font-family: var(--font-outfit);
    color: var(--primary);
    font-weight: 800;
}

.mt-4 { margin-top: 20px; }
.py-4 { padding-top: 20px; padding-bottom: 20px; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }

/* ================= NOTIFICACIONES (TOAST) ================= */

.toast-container {
    position: fixed;
    top: 25px;
    right: 25px;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    background: rgba(20, 43, 33, 0.9);
    border: 1px solid var(--border-color);
    backdrop-filter: var(--glass-blur);
    box-shadow: var(--shadow-premium);
    padding: 14px 20px;
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    gap: 12px;
    color: #ffffff;
    font-size: 0.9rem;
    font-family: var(--font-outfit);
    font-weight: 500;
    min-width: 280px;
    max-width: 400px;
    animation: slideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.toast-success {
    border-left: 4px solid var(--success);
}

.toast-error {
    border-left: 4px solid var(--danger);
}

.toast i {
    width: 20px;
    height: 20px;
}

.toast-success i { color: var(--success); }
.toast-error i { color: var(--danger); }

/* ================= VISTA PREVIA IMPRESIÓN (PRINT PREVIEW) ================= */

.print-preview-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(3, 7, 18, 0.85);
    backdrop-filter: blur(8px);
    z-index: 9999;
    overflow-y: auto;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.print-preview-box {
    width: 100%;
    max-width: 850px;
}

.print-preview-actions {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 20px;
}

/* El documento estilizado para impresión */
.invoice-document {
    background: #ffffff;
    color: #1e293b;
    padding: 50px;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-premium);
    font-family: var(--font-inter);
}

.invoice-doc-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.company-brand-info h2 {
    color: #0f172a;
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 4px;
}

.company-sub {
    color: #C9A84C;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.company-brand-info p {
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.4;
}

.invoice-meta-info {
    text-align: right;
}

.invoice-doc-title {
    color: #0f172a;
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 15px;
    letter-spacing: 0.05em;
}

.meta-item {
    font-size: 0.9rem;
    color: #475569;
    margin-bottom: 4px;
}

.meta-val {
    font-weight: 700;
    color: #0f172a;
}

.meta-val.badge {
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 4px;
}

.invoice-divider {
    border: 0;
    height: 1px;
    background: #e2e8f0;
    margin: 30px 0;
}

.invoice-parties {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.party-box h3 {
    color: #475569;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 6px;
}

.party-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 8px;
}

.party-box p {
    font-size: 0.85rem;
    color: #475569;
    line-height: 1.5;
    margin-bottom: 2px;
}

.invoice-doc-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 40px;
}

.invoice-doc-table th {
    background: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
    color: #475569;
    font-family: var(--font-outfit);
    font-weight: 600;
    font-size: 0.85rem;
    padding: 12px;
    text-transform: uppercase;
}

.invoice-doc-table td {
    padding: 12px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.9rem;
    color: #334155;
}

.invoice-doc-footer-section {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 40px;
    margin-bottom: 50px;
}

.invoice-notes-block h4 {
    color: #475569;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.invoice-notes-block p {
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.5;
    background: #f8fafc;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.invoice-totals-block {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.total-row-doc {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #475569;
}

.total-row-doc.net-total {
    border-top: 2px solid #0f172a;
    padding-top: 12px;
    font-size: 1.25rem;
    font-weight: 800;
    color: #0f172a;
}

.invoice-signature-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    margin-top: 60px;
    text-align: center;
}

.sig-box {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sig-line {
    width: 200px;
    height: 1px;
    background: #94a3b8;
    margin-bottom: 8px;
}

.sig-box p {
    font-size: 0.8rem;
    color: #64748b;
}

/* ================= RESPONSIVIDAD GENERAL ================= */

@media (max-width: 1200px) {
    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }
    .app-sidebar {
        width: 80px;
    }
    .app-sidebar .brand-text,
    .app-sidebar .menu-item span,
    .app-sidebar .user-details,
    .app-sidebar .btn-logout span {
        display: none;
    }
    .app-content {
        margin-left: 80px;
    }
    .menu-item {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .kpi-grid {
        grid-template-columns: 1fr;
    }
    .app-content {
        padding: 20px;
    }
    .section-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .col-6, .col-3, .col-4 {
        width: 100%;
    }
    .calc-totals-container {
        margin-top: 20px;
    }
    .invoice-parties {
        grid-template-columns: 1fr;
    }
    .invoice-doc-footer-section {
        grid-template-columns: 1fr;
    }
}

/* ================= ANIMACIONES ================= */

@keyframes floatUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes goldShimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

/* ================= LANDING PAGE PÚBLICA (HIGOS GROUP) ================= */

.public-layout {
    background: var(--bg-main);
    color: var(--text-main);
    overflow-x: hidden;
}

.public-layout h1, 
.public-layout h2, 
.public-layout h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 600;
}

.public-layout p, 
.public-layout span, 
.public-layout a {
    font-family: var(--font-inter);
}

/* Cabecera / Navbar */
.public-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background: rgba(15, 31, 24, 0.75);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

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

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

.public-logo img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: var(--border-radius-sm);
}

.public-logo span {
    font-family: 'Playfair Display', serif;
    font-size: 1.35rem;
    font-weight: 700;
    background: linear-gradient(135deg, #C9A84C, #F5F0E6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 0.5px;
}

.public-nav {
    display: flex;
    gap: 30px;
}

.public-nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition-fast);
    letter-spacing: 0.5px;
}

.public-nav a:hover {
    color: var(--primary);
}

.public-actions {
    display: flex;
    align-items: center;
}

.btn-login-trigger {
    background: rgba(201, 168, 76, 0.1);
    color: var(--primary);
    border: 1px solid rgba(201, 168, 76, 0.2);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-login-trigger:hover {
    background: var(--primary-gradient);
    color: var(--text-dark);
    box-shadow: 0 4px 12px var(--primary-glow);
    transform: translateY(-2px);
}

/* Hero Section */
.public-hero {
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    padding: 0 20px;
    position: relative;
}

.hero-content {
    max-width: 800px;
    animation: floatUp 1s ease;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 4px;
    display: block;
    margin-bottom: 15px;
    font-weight: 600;
}

.hero-title {
    font-size: 3.8rem;
    line-height: 1.15;
    margin-bottom: 25px;
    color: var(--text-main);
    text-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

.hero-description {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 35px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

/* Quote Section */
.public-quote-section {
    padding: 100px 20px;
    background: linear-gradient(to bottom, rgba(15,31,24,0) 0%, rgba(20,43,33,0.3) 100%);
    display: flex;
    justify-content: center;
}

.quote-container {
    max-width: 900px;
    width: 100%;
}

.quote-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 60px 40px;
    border-radius: var(--border-radius-xl);
    text-align: center;
    box-shadow: var(--shadow-premium);
    position: relative;
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
}

.quote-icon {
    width: 48px;
    height: 48px;
    color: var(--primary);
    opacity: 0.3;
    margin-bottom: 25px;
}

.quote-text {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    line-height: 1.5;
    font-style: italic;
    color: var(--text-main);
    margin-bottom: 20px;
}

.quote-author {
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--primary);
    font-weight: 600;
}

/* Títulos de Sección */
.section-title-wrapper {
    text-align: center;
    margin-bottom: 60px;
    padding: 0 20px;
}

.section-subtitle {
    font-size: 0.9rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 600;
    display: block;
    margin-bottom: 10px;
}

.section-title {
    font-size: 2.6rem;
    color: var(--text-main);
    margin-bottom: 15px;
}

.section-divider {
    width: 60px;
    height: 2px;
    background: var(--primary-gradient);
    margin: 0 auto;
}

/* Galería / Portafolio */
.public-gallery-section {
    padding: 80px 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.gallery-item {
    position: relative;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    height: 380px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 30px 24px;
    background: linear-gradient(to top, rgba(15,31,24,0.95) 0%, rgba(15,31,24,0.4) 60%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    transform: translateY(10px);
    opacity: 0;
    transition: all 0.4s ease;
}

.gallery-overlay h4 {
    font-size: 1.25rem;
    color: var(--text-main);
    margin-bottom: 6px;
    font-weight: 600;
}

.gallery-overlay span {
    font-size: 0.85rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.gallery-item:hover img {
    transform: scale(1.08);
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
    opacity: 1;
}

/* Servicios Section */
.public-services-section {
    padding: 100px 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.service-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 45px 30px;
    border-radius: var(--border-radius-lg);
    text-align: center;
    box-shadow: 0 4px 25px rgba(0,0,0,0.15);
    transition: var(--transition);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
}

.service-card:hover {
    transform: translateY(-8px);
    border-color: rgba(201, 168, 76, 0.3);
    box-shadow: 0 8px 30px rgba(201, 168, 76, 0.1);
}

.service-icon {
    width: 65px;
    height: 65px;
    background: rgba(201, 168, 76, 0.1);
    color: var(--primary);
    border: 1px solid rgba(201, 168, 76, 0.25);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px auto;
    transition: var(--transition);
}

.service-card:hover .service-icon {
    background: var(--primary-gradient);
    color: var(--text-dark);
    box-shadow: 0 4px 15px var(--primary-glow);
}

.service-card h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--text-main);
}

.service-card p {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Footer de la Landing Page */
.public-footer {
    background: rgba(15, 31, 24, 0.95);
    border-top: 1px solid var(--border-color);
    padding: 80px 24px 30px 24px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 2fr 1fr;
    gap: 60px;
    margin-bottom: 50px;
}

.footer-brand h3 {
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.footer-brand p {
    color: var(--text-muted);
    max-width: 320px;
    line-height: 1.6;
    font-size: 0.95rem;
}

.footer-contact h4,
.footer-social h4 {
    font-size: 1.1rem;
    color: var(--text-main);
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.footer-contact p {
    color: var(--text-muted);
    font-size: 0.92rem;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-icon {
    width: 16px;
    height: 16px;
    color: var(--primary);
}

.footer-social .social-icons {
    display: flex;
    gap: 15px;
}

.footer-social .social-icons a {
    width: 40px;
    height: 40px;
    background: rgba(245, 240, 230, 0.05);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.footer-social .social-icons a:hover {
    background: var(--primary-gradient);
    color: var(--text-dark);
    box-shadow: 0 4px 10px var(--primary-glow);
    transform: translateY(-2px);
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.footer-bottom p {
    font-size: 0.85rem;
    color: var(--text-muted);
    opacity: 0.6;
}

/* WhatsApp Flotante */
.whatsapp-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #25D366;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 90;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.whatsapp-btn img {
    width: 32px;
    height: 32px;
}

.whatsapp-btn:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
}

/* Botones de Cotización y CTA de Lujo */
.btn-nav-quote {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary-gradient);
    color: var(--text-dark) !important;
    padding: 8px 18px;
    border-radius: var(--border-radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    margin-right: 15px;
    box-shadow: 0 4px 12px rgba(201, 168, 76, 0.15);
}

.btn-nav-quote:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(201, 168, 76, 0.35);
    color: var(--text-dark) !important;
}

.btn-nav-quote i {
    width: 14px;
    height: 14px;
}

.hero-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 30px;
}

.btn-hero-outline {
    background: rgba(20, 43, 33, 0.4);
    border: 1px solid rgba(201, 168, 76, 0.4);
    color: var(--primary) !important;
    padding: 14px 30px;
    border-radius: var(--border-radius-md);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.btn-hero-outline:hover {
    background: rgba(201, 168, 76, 0.1);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.btn-hero-quote {
    background: var(--primary-gradient);
    color: var(--text-dark) !important;
    padding: 14px 30px;
    border-radius: var(--border-radius-md);
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(201, 168, 76, 0.2);
}

.btn-hero-quote:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(201, 168, 76, 0.4);
}

.btn-hero-quote i {
    width: 18px;
    height: 18px;
    transition: transform 0.2s ease;
}

.btn-hero-quote:hover i {
    transform: translateX(3px);
}

/* Sección de Llamado a la Acción (CTA) */
.public-cta-section {
    padding: 120px 20px;
    background: linear-gradient(rgba(15, 31, 24, 0.8), rgba(15, 31, 24, 0.95)), url('/img/mesas.jpeg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    text-align: center;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.cta-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
    margin: 0 auto;
}

.cta-content h2 {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    color: var(--text-main);
    margin-bottom: 20px;
    background: linear-gradient(135deg, #F5F0E6 30%, #C9A84C 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.cta-content p {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 40px;
}

.btn-quote-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--primary-gradient);
    color: var(--text-dark) !important;
    padding: 16px 36px;
    border-radius: var(--border-radius-lg);
    font-size: 1.1rem;
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: 0 8px 24px rgba(201, 168, 76, 0.25);
    border: none;
    cursor: pointer;
}

.btn-quote-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(201, 168, 76, 0.45);
}

.btn-quote-primary i {
    width: 20px;
    height: 20px;
}

/* Adaptación a Móviles (Landing) */
@media (max-width: 992px) {
    .gallery-grid, 
    .services-grid {
        grid-template-columns: 1fr;
        max-width: 500px;
        margin: 0 auto;
    }
    .footer-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .hero-title {
        font-size: 2.8rem;
    }
    .public-nav {
        display: none; /* Simplificado para móviles en landing básica */
    }
}
