/* ========================================
   VARIABLES & RESET - ENHANCED
   ======================================== */

:root {
    /* Color Palette - Modern & Vibrant */
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --primary-darker: #1d4ed8;
    --primary-light: #60a5fa;
    --primary-lighter: #93c5fd;

    --secondary: #10b981;
    --secondary-dark: #059669;
    --secondary-light: #34d399;

    --accent: #8b5cf6;
    --accent-dark: #7c3aed;
    --accent-light: #a78bfa;

    --success: #10b981;
    --success-light: #d1fae5;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --info: #0ea5e9;
    --info-light: #e0f2fe;

    --neutral-50: #fafafa;
    --neutral-100: #f5f5f5;
    --neutral-200: #e5e5e5;
    --neutral-300: #d4d4d4;
    --neutral-400: #a3a3a3;
    --neutral-500: #737373;
    --neutral-600: #525252;
    --neutral-700: #404040;
    --neutral-800: #262626;
    --neutral-900: #171717;

    --bg-primary: #ffffff;
    --bg-secondary: #fafafa;
    --bg-tertiary: #f5f5f5;
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --bg-gradient-light: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);

    --text-primary: #171717;
    --text-secondary: #525252;
    --text-tertiary: #737373;

    --border-color: #e5e5e5;
    --border-light: #f5f5f5;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.05);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 24px;
    --radius-full: 9999px;

    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --spacing-3xl: 4rem;

    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-secondary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   LOADING SCREEN
   ======================================== */

.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #fb923c 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-card {
    text-align: center;
    color: white;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-card p {
    font-size: 16px;
    font-weight: 500;
    color: white;
    margin: 0;
}

/* ========================================
   ANIMATIONS
   ======================================== */

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

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* ========================================
   LOGIN SCREEN - ENHANCED
   ======================================== */

.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #fb923c 100%);
    background-size: 200% 200%;
    animation: gradient 15s ease infinite;
    padding: var(--spacing-lg);
    position: relative;
    overflow: hidden;
}

@keyframes gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.login-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: movePattern 20s linear infinite;
}

@keyframes movePattern {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-2xl), 0 0 0 1px rgba(255,255,255,0.1);
    width: 100%;
    max-width: 440px;
    padding: var(--spacing-3xl) var(--spacing-2xl);
    animation: scaleIn var(--transition-slow);
    position: relative;
    z-index: 1;
}

.login-header {
    text-align: center;
    margin-bottom: var(--spacing-2xl);
}

.login-header h1 {
    font-size: 38px;
    font-weight: 800;
    background: linear-gradient(135deg, #d97706 0%, #ea580c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--spacing-sm);
    letter-spacing: 0.05em;
    text-shadow: 0 2px 10px rgba(217, 119, 6, 0.2);
}

.login-header p {
    font-size: 15px;
    color: var(--text-secondary);
    font-weight: 400;
}

.login-hint {
    margin-top: var(--spacing-xl);
    padding: var(--spacing-lg);
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.15) 0%, rgba(245, 158, 11, 0.15) 100%);
    border-radius: var(--radius-lg);
    font-size: 13px;
    color: var(--text-secondary);
    text-align: center;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.login-hint p {
    margin: 0.4rem 0;
}

.login-hint strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* ========================================
   APP LAYOUT - ENHANCED
   ======================================== */

.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: var(--bg-secondary);
}

/* ========================================
   TOPBAR - ENHANCED
   ======================================== */

.topbar {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(8px);
    background: rgba(255, 255, 255, 0.9);
}

.topbar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--spacing-xl);
    height: 72px;
    max-width: 1600px;
    margin: 0 auto;
}

.topbar-brand {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.topbar-brand svg {
    color: var(--primary);
    filter: drop-shadow(0 2px 4px rgba(59, 130, 246, 0.2));
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--bg-secondary);
    border-radius: var(--radius-full);
}

.topbar-user #currentUser {
    font-weight: 600;
    color: var(--text-primary);
}

/* ========================================
   NAVIGATION TABS - ENHANCED
   ======================================== */

.tabs-container {
    background: var(--bg-primary);
    border-bottom: 2px solid var(--border-color);
    padding: 0 var(--spacing-xl);
}

.tabs {
    display: flex;
    gap: var(--spacing-xs);
    max-width: 1600px;
    margin: 0 auto;
}

.tab {
    background: transparent;
    border: none;
    padding: var(--spacing-md) var(--spacing-xl);
    font-family: 'Outfit', sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all var(--transition-base);
    position: relative;
}

.tab::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 80%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: var(--radius-full);
    transition: transform var(--transition-base);
}

.tab:hover {
    color: var(--primary);
    background: linear-gradient(180deg, transparent 0%, rgba(59, 130, 246, 0.05) 100%);
}

.tab.active {
    color: var(--primary);
    font-weight: 600;
}

.tab.active::before {
    transform: translateX(-50%) scaleX(1);
}

/* ========================================
   MAIN CONTENT - ENHANCED
   ======================================== */

.main-content {
    flex: 1;
    padding: var(--spacing-2xl) var(--spacing-xl);
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
    animation: fadeIn var(--transition-slow);
}

.tab-content {
    display: none;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-2xl);
    flex-wrap: wrap;
    gap: var(--spacing-lg);
}

.page-header h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.page-subtitle {
    font-size: 15px;
    color: var(--text-secondary);
    margin-top: var(--spacing-xs);
    font-weight: 400;
}

.header-actions {
    display: flex;
    gap: var(--spacing-md);
}

.filters {
    display: flex;
    gap: var(--spacing-md);
}

/* ========================================
   FORMS - ENHANCED
   ======================================== */

.form-group {
    margin-bottom: var(--spacing-lg);
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

input[type="text"],
input[type="password"],
input[type="date"],
input[type="number"],
textarea,
select,
.filter-select {
    width: 100%;
    padding: 0.75rem 1rem;
    font-family: 'Outfit', sans-serif;
    font-size: 15px;
    color: var(--text-primary);
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
}

input:hover,
textarea:hover,
select:hover {
    border-color: var(--neutral-300);
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
    background: var(--bg-primary);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

.filter-select {
    width: auto;
    min-width: 200px;
}

/* ========================================
   BUTTONS - ENHANCED
   ======================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: 0.75rem 1.5rem;
    font-family: 'Outfit', sans-serif;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(245, 158, 11, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(245, 158, 11, 0.5);
}

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

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--neutral-200);
    border-color: var(--neutral-300);
    transform: translateY(-1px);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 14px;
}

.btn-block {
    width: 100%;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-base);
}

.btn-icon:hover {
    background: var(--neutral-200);
    color: var(--text-primary);
    border-color: var(--neutral-300);
    transform: scale(1.05);
}

/* ========================================
   BADGES - ENHANCED
   ======================================== */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    font-size: 12px;
    font-weight: 700;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-primary {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(59, 130, 246, 0.1) 100%);
    color: var(--primary-dark);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.badge-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(16, 185, 129, 0.1) 100%);
    color: var(--secondary-dark);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(245, 158, 11, 0.1) 100%);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.badge-danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(239, 68, 68, 0.1) 100%);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.badge-info {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.15) 0%, rgba(14, 165, 233, 0.1) 100%);
    color: #0284c7;
    border: 1px solid rgba(14, 165, 233, 0.2);
}

.badge-secondary {
    background: var(--neutral-100);
    color: var(--neutral-700);
    border: 1px solid var(--neutral-200);
}

/* ========================================
   TABLES - ENHANCED
   ======================================== */

.table-container {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    overflow: hidden;
    animation: fadeIn var(--transition-slow);
}

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

thead {
    background: linear-gradient(180deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
}

thead tr {
    border-bottom: 2px solid var(--border-color);
}

th {
    padding: 1rem 1.25rem;
    text-align: left;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

td {
    padding: 1rem 1.25rem;
    font-size: 15px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-light);
}

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

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

tbody tr:hover {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.02) 0%, rgba(139, 92, 246, 0.02) 100%);
    transform: scale(1.002);
}

tbody tr:hover td:first-child {
    border-left: 3px solid var(--primary);
}

/* ========================================
   MODALS - ENHANCED
   ======================================== */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-lg);
    animation: fadeIn var(--transition-base);
}

.modal-content {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-2xl);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: scaleIn var(--transition-slow);
}

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

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-xl);
    border-bottom: 2px solid var(--border-color);
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.modal-header h3 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.modal-close {
    background: var(--bg-tertiary);
    border: none;
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
}

.modal-close:hover {
    background: var(--neutral-200);
    color: var(--text-primary);
    transform: rotate(90deg);
}

.modal-body {
    padding: var(--spacing-xl);
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--spacing-md);
    padding: var(--spacing-xl);
    border-top: 2px solid var(--border-color);
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

/* ========================================
   DROP ZONE - ENHANCED
   ======================================== */

.drop-zone {
    border: 3px dashed var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--spacing-3xl);
    text-align: center;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.02) 0%, rgba(139, 92, 246, 0.02) 100%);
    transition: all var(--transition-base);
    cursor: pointer;
}

.drop-zone:hover,
.drop-zone.dragover {
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(139, 92, 246, 0.08) 100%);
    transform: scale(1.01);
}

.drop-zone svg {
    color: var(--primary);
    margin-bottom: var(--spacing-md);
    filter: drop-shadow(0 2px 4px rgba(59, 130, 246, 0.2));
}

.drop-zone p {
    color: var(--text-secondary);
    margin: var(--spacing-sm) 0;
    font-weight: 500;
}

.drop-zone .small {
    font-size: 14px;
    color: var(--text-tertiary);
}

.drop-zone .hint {
    font-size: 13px;
    color: var(--text-tertiary);
    margin-top: var(--spacing-md);
}

/* ========================================
   CSV PREVIEW
   ======================================== */

.csv-preview {
    margin-top: var(--spacing-xl);
    animation: slideDown var(--transition-slow);
}

.csv-preview h4 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
}

/* ========================================
   SEARCH & SELECTED PRODUCTS - ENHANCED
   ======================================== */

.search-results {
    max-height: 350px;
    overflow-y: auto;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
}

.search-result-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--border-light);
    gap: var(--spacing-md);
    transition: all var(--transition-fast);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.04) 0%, rgba(139, 92, 246, 0.04) 100%);
}

.search-result-item.disabled {
    opacity: 0.5;
}

.search-result-info {
    flex: 1;
}

.search-result-info .small {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.selected-products {
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    max-height: 350px;
    overflow-y: auto;
}

.selected-product-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-md);
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-light);
    gap: var(--spacing-md);
    animation: slideDown var(--transition-base);
}

.selected-product-item:last-child {
    border-bottom: none;
}

.selected-product-info {
    flex: 1;
}

.selected-product-info .small {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.quantity-display {
    min-width: 50px;
    text-align: center;
    font-weight: 700;
    font-size: 16px;
    color: var(--primary);
}

.despacho-input {
    width: 80px;
    text-align: center;
    padding: 0.5rem;
    font-weight: 700;
    border: 2px solid var(--primary-light);
}

/* ========================================
   INFO GRID
   ======================================== */

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.info-item label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--spacing-xs);
}

.info-item span,
.info-item p {
    font-size: 15px;
    color: var(--text-primary);
    font-weight: 600;
}

/* ========================================
   CONSOLIDADO - ENHANCED
   ======================================== */

.consolidado-family {
    margin-bottom: var(--spacing-2xl);
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    animation: fadeIn var(--transition-slow);
}

.consolidado-family-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: var(--spacing-lg) var(--spacing-xl);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.01em;
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.3);
}

.consolidado-family table {
    margin: 0;
}

/* ========================================
   UTILITIES
   ======================================== */

.divider {
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, var(--border-color) 50%, transparent 100%);
    margin: var(--spacing-xl) 0;
}

.error-message {
    color: var(--danger);
    font-size: 14px;
    margin-top: var(--spacing-sm);
    font-weight: 600;
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--danger-light);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--danger);
    animation: slideDown var(--transition-base);
    display: none;
}

.error-message:not(:empty) {
    display: block;
}

.empty-state {
    color: var(--text-tertiary);
    font-style: italic;
    text-align: center;
    padding: var(--spacing-2xl);
}

.small {
    font-size: 13px;
}

/* ========================================
   SCROLLBAR - CUSTOM
   ======================================== */

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--neutral-300);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--neutral-400);
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .topbar-content {
        padding: 0 var(--spacing-md);
        height: 64px;
    }

    .topbar-brand span {
        display: none;
    }

    .tabs-container {
        padding: 0 var(--spacing-md);
        overflow-x: auto;
    }

    .tabs {
        min-width: max-content;
    }

    .main-content {
        padding: var(--spacing-lg) var(--spacing-md);
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .page-header h2 {
        font-size: 24px;
    }

    .header-actions {
        width: 100%;
        flex-direction: column;
    }

    .header-actions .btn {
        width: 100%;
    }

    .filters {
        width: 100%;
        flex-direction: column;
    }

    .filter-select {
        width: 100%;
    }

    .table-container {
        overflow-x: auto;
    }

    table {
        min-width: 600px;
    }

    .modal {
        padding: var(--spacing-sm);
    }

    .modal-body {
        padding: var(--spacing-md);
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .login-card {
        padding: var(--spacing-2xl) var(--spacing-lg);
    }

    .login-header h1 {
        font-size: 26px;
    }
}

/* ========================================
   DARK MODE SUPPORT (Optional)
   ======================================== */

@media (prefers-color-scheme: dark) {
    /* Comentado por ahora - descomentar si quieres dark mode automático */
    /*
    :root {
        --bg-primary: #1a1a1a;
        --bg-secondary: #0f0f0f;
        --bg-tertiary: #262626;
        --text-primary: #fafafa;
        --text-secondary: #a3a3a3;
        --text-tertiary: #737373;
        --border-color: #404040;
    }
    */
}
