:root {
    /* Color Palette - Fintech Modern */
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --success: #10b981;
    --success-light: #d1fae5;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --info: #3b82f6;
    --info-light: #dbeafe;
    
    /* Grays & Neutrals */
    --bg-main: #f8fafc;
    --bg-surface: #ffffff;
    --bg-surface-hover: #f1f5f9;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    
    /* Layout */
    --sidebar-width: 64px;
    --sidebar-width-expanded: 260px;
    --header-height: 80px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Layout */
.app-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: 20;
    transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
}

.sidebar:hover {
    width: var(--sidebar-width-expanded);
    box-shadow: var(--shadow-lg);
}

.content {
    margin-left: var(--sidebar-width);
}

.logo-container {
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    border-bottom: 1px solid var(--border);
    overflow: hidden;
}

.sidebar-logo-icon {
    height: 28px;
    width: auto;
    display: block;
}

.sidebar-logo-full {
    height: 30px;
    width: auto;
    display: none;
}

.sidebar:hover .sidebar-logo-icon {
    display: none;
}

.sidebar:hover .sidebar-logo-full {
    display: block;
}

.navigation {
    flex: 1;
    padding: 16px 10px;
    overflow-y: auto;
    overflow-x: hidden;
}

.nav-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
    padding-left: 12px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.sidebar:hover .nav-label {
    opacity: 1;
}

.nav-list {
    list-style: none;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 11px 14px;
    margin-bottom: 4px;
    border-radius: var(--radius-md);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    font-weight: 500;
    white-space: nowrap;
}

.nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background-color: var(--primary);
    transform: scaleY(0);
    transition: transform 0.3s ease;
    border-radius: 0 4px 4px 0;
}

.nav-item:hover {
    background-color: var(--bg-surface-hover);
    color: var(--text-main);
}

.nav-item:hover i,
.nav-item:hover svg {
    color: var(--primary);
    transform: scale(1.1);
}

.nav-item.active {
    background-color: var(--info-light);
    color: var(--primary);
    font-weight: 600;
}

.nav-item.active::before {
    transform: scaleY(1);
}

.nav-item.active i,
.nav-item.active svg {
    color: var(--primary);
}

.nav-item i,
.nav-item svg {
    width: 20px;
    height: 20px;
    min-width: 20px;
    margin-right: 14px;
    flex-shrink: 0;
    transition: transform 0.3s ease, color 0.3s ease;
}

.nav-item span {
    font-weight: inherit;
    font-size: 0.9rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.sidebar:hover .nav-item span {
    opacity: 1;
}

.nav-subitem {
    margin-left: 16px;
    padding-left: 24px;
    font-size: 0.85rem;
    border-left: 2px solid var(--border);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    position: relative;
}

.nav-subitem i {
    width: 16px;
    height: 16px;
    margin-right: 8px;
    opacity: 0.7;
}

.nav-subitem::before {
    content: '';
    position: absolute;
    left: -2px;
    top: 50%;
    width: 2px;
    height: 0;
    background-color: var(--primary);
    transition: var(--transition);
}

.nav-subitem:hover::before,
.nav-subitem.active::before {
    height: 100%;
    top: 0;
}

.user-profile {
    padding: 12px 10px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    overflow: hidden;
    min-width: var(--sidebar-width-expanded);
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: var(--bg-surface-hover);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.8rem;
    margin-right: 10px;
    flex-shrink: 0;
    border: 1px solid var(--border);
}

.user-info {
    flex: 1;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.sidebar:hover .user-info {
    opacity: 1;
}

.user-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-main);
}

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

/* Main Content */
.content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin-left: var(--sidebar-width);
    transition: margin-left 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Top Bar */
.top-bar {
    height: var(--header-height);
    background-color: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
}

.header-left {
    display: flex;
    align-items: center;
}

.menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    margin-right: 16px;
}

#view-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.025em;
}

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

.quick-filters {
    display: flex;
    gap: 4px;
    background: var(--bg-main);
    padding: 4px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
    margin-right: 16px;
    overflow-x: auto;
    max-width: 50vw;
}

.quick-filters::-webkit-scrollbar {
    display: none;
}

.quick-filter-btn {
    background: transparent;
    border: none;
    padding: 6px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.quick-filter-btn:hover {
    color: var(--text-main);
}

.quick-filter-btn.active {
    background: var(--bg-surface);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.date-filter {
    display: flex;
    align-items: center;
    background-color: var(--bg-main);
    padding: 8px 16px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
    transition: var(--transition);
    cursor: pointer;
    min-width: 260px;
}

.date-filter:hover {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--info-light);
}

.date-filter i {
    width: 16px;
    height: 16px;
    color: var(--primary);
    margin-right: 8px;
}

.date-filter .dropdown-icon {
    margin-right: 0;
    margin-left: 8px;
    color: var(--text-muted);
}

.date-filter input {
    background: transparent;
    border: none;
    outline: none;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-main);
    cursor: pointer;
    font-family: inherit;
    flex: 1;
    text-align: center;
}

/* Flatpickr Custom Theme for Fintech Vibe */
.flatpickr-calendar {
    box-shadow: var(--shadow-lg) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-md) !important;
    font-family: 'Inter', sans-serif !important;
    padding: 10px !important;
}

.flatpickr-day.selected, .flatpickr-day.startRange, .flatpickr-day.endRange, .flatpickr-day.selected.inRange, .flatpickr-day.startRange.inRange, .flatpickr-day.endRange.inRange, .flatpickr-day.selected:focus, .flatpickr-day.startRange:focus, .flatpickr-day.endRange:focus, .flatpickr-day.selected:hover, .flatpickr-day.startRange:hover, .flatpickr-day.endRange:hover, .flatpickr-day.selected.prevMonthDay, .flatpickr-day.startRange.prevMonthDay, .flatpickr-day.endRange.prevMonthDay, .flatpickr-day.selected.nextMonthDay, .flatpickr-day.startRange.nextMonthDay, .flatpickr-day.endRange.nextMonthDay {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
}

.flatpickr-day.inRange {
    background: var(--info-light) !important;
    border-color: var(--info-light) !important;
    box-shadow: -5px 0 0 var(--info-light), 5px 0 0 var(--info-light) !important;
}

.notifications-btn {
    position: relative;
    cursor: pointer;
    color: var(--text-muted);
    padding: 8px;
    border-radius: var(--radius-full);
    transition: var(--transition);
}

.notifications-btn:hover {
    background-color: var(--bg-surface-hover);
    color: var(--text-main);
}

.notifications-btn .badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background-color: var(--danger);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    border: 2px solid var(--bg-surface);
}

/* View Container */
.view-container {
    flex: 1;
    overflow-y: auto;
    padding: 32px;
    animation: fadeIn 0.4s ease-out;
}

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

/* Resumen Toolbar */
.resumen-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 16px;
}

/* Resumen KPIs Strip */
.resumen-kpis {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.resumen-kpis-secondary {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.kpi-card {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    transition: box-shadow 0.2s;
}

.kpi-card:hover {
    box-shadow: var(--shadow-md);
}

.kpi-card.kpi-highlight {
    background: var(--bg-surface);
    border: 2px solid var(--primary);
}

.kpi-card.kpi-highlight .kpi-label {
    color: var(--text-muted);
}

.kpi-card.kpi-highlight .kpi-value,
.kpi-card.kpi-highlight .kpi-value-secondary {
    color: var(--text-main);
}

.kpi-card.kpi-highlight .kpi-trend {
    color: var(--text-muted);
}

.kpi-card.kpi-highlight .kpi-icon {
    background: var(--info-light);
    color: var(--primary);
}

.kpi-card.kpi-alert {
    min-width: 0;
}

.kpi-card.kpi-alert.warning {
    border-left: 3px solid var(--warning);
}

.kpi-card.kpi-alert.danger {
    border-left: 3px solid var(--danger);
}

.kpi-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.kpi-icon i {
    width: 18px;
    height: 18px;
}

.kpi-icon.success,
.kpi-icon.danger,
.kpi-icon.warning { background: var(--bg-surface-hover); color: var(--text-muted); }

.kpi-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
    gap: 4px;
}

.kpi-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1;
}

.kpi-amounts {
    display: flex;
    gap: 10px;
    align-items: baseline;
}

.kpi-amount {
    display: flex;
    align-items: baseline;
    gap: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kpi-amount .currency-tag {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.03em;
}

.kpi-amount .amount-value {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.kpi-card.kpi-highlight .kpi-amount .currency-tag {
    color: var(--text-muted);
}

.kpi-card.kpi-highlight .kpi-amount .amount-value {
    color: var(--text-main);
}

.kpi-amounts .kpi-divider {
    width: 1px;
    height: 14px;
    background: var(--border);
    flex-shrink: 0;
}

.kpi-card.kpi-highlight .kpi-amounts .kpi-divider {
    background: var(--border);
}

/* Legacy single-value support */
.kpi-value {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.02em;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kpi-value-secondary {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kpi-trend {
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
}

.kpi-trend i {
    width: 13px;
    height: 13px;
}

.kpi-trend.positive { color: var(--success); }
.kpi-trend.negative { color: var(--danger); }

.kpi-link {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    transition: color 0.2s, background 0.2s;
    flex-shrink: 0;
}

.kpi-link i {
    width: 16px;
    height: 16px;
}

.kpi-link:hover {
    color: var(--primary);
    background: var(--info-light);
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 24px;
}

/* Cards */
.card {
    background-color: var(--bg-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    padding: 24px;
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

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

.card-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.card-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-icon i {
    width: 20px;
    height: 20px;
}

.card-icon.success { background-color: var(--success-light); color: var(--success); }
.card-icon.danger { background-color: var(--danger-light); color: var(--danger); }
.card-icon.info { background-color: var(--info-light); color: var(--info); }
.card-icon.warning { background-color: var(--warning-light); color: var(--warning); }

.card-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.025em;
    margin-bottom: 8px;
}

.card-trend {
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    font-weight: 500;
}

.card-trend i {
    width: 14px;
    height: 14px;
    margin-right: 4px;
}

.card-trend.positive { color: var(--success); }
.card-trend.negative { color: var(--danger); }

.trend-text {
    color: var(--text-muted);
    margin-left: 6px;
    font-weight: 400;
}

/* Layout Utilities */
.col-span-3 { grid-column: span 3; }
.col-span-4 { grid-column: span 4; }
.col-span-6 { grid-column: span 6; }
.col-span-8 { grid-column: span 8; }
.col-span-12 { grid-column: span 12; }

/* Chart Container */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

/* Tables */
.table-container {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table th {
    background-color: var(--bg-main);
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.table th:first-child { border-top-left-radius: var(--radius-md); }
.table th:last-child { border-top-right-radius: var(--radius-md); }

.table td {
    padding: 16px;
    font-size: 0.9rem;
    color: var(--text-main);
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

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

.table tr:hover td {
    background-color: var(--bg-surface-hover);
}

.table tr.clickable-row {
    cursor: pointer;
}

.table tr.clickable-row:hover td {
    background-color: var(--primary-light, #eff6ff);
}

.cell-bold {
    font-weight: 600;
}

/* Badges */
.badge-status {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.025em;
}

.badge-status::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-right: 6px;
}

.badge-success {
    background-color: #f0fdf4;
    color: #15803d;
}
.badge-success::before { background-color: #15803d; }

.badge-warning {
    background-color: #fefce8;
    color: #a16207;
}
.badge-warning::before { background-color: #a16207; }

.badge-danger {
    background-color: #fef2f2;
    color: #b91c1c;
}
.badge-danger::before { background-color: #b91c1c; }

.badge-caja {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 500;
    background: var(--bg-surface-hover);
    color: var(--text-muted);
    white-space: nowrap;
    border: 1px solid var(--border);
}

/* Factura Buttons */
.btn-factura {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid;
    transition: var(--transition);
    white-space: nowrap;
}
.btn-factura.ver {
    background: var(--bg-surface);
    color: var(--text-muted);
    border-color: var(--border);
}
.btn-factura.ver:hover {
    background: var(--bg-surface-hover);
    color: var(--text-main);
    border-color: var(--text-muted);
}
.btn-factura.generar {
    background: var(--bg-surface);
    color: var(--text-muted);
    border-color: var(--border);
}
.btn-factura.generar:hover {
    background: var(--bg-surface-hover);
    color: var(--text-main);
    border-color: var(--text-muted);
}

/* Caja Cards */
.caja-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: var(--transition);
}
.caja-card:hover {
    box-shadow: var(--shadow-md);
}
.caja-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.caja-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.caja-icon i { width: 16px; height: 16px; }
.caja-icon.ars,
.caja-icon.usd { background: var(--bg-surface-hover); color: var(--text-muted); }
.caja-moneda-tag {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 2px 8px;
    border-radius: var(--radius-full);
}
.caja-moneda-tag.ars,
.caja-moneda-tag.usd { background: var(--bg-surface-hover); color: var(--text-muted); }
.caja-nombre {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
}
.caja-saldo {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

/* Amounts */
.amount {
    font-family: 'Inter', sans-serif;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

.amount.income { color: #15803d; }
.amount.expense { color: #b91c1c; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-family: inherit;
}

.btn i, .btn svg {
    width: 16px;
    height: 16px;
    margin-right: 6px;
    flex-shrink: 0;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}
.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.btn-success {
    background-color: var(--text-main);
    color: white;
}
.btn-success:hover {
    background-color: #334155;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--border);
    color: var(--text-main);
}
.btn-outline:hover {
    background-color: var(--bg-surface-hover);
    border-color: var(--text-muted);
}

.btn-sm {
    padding: 6px 12px !important;
    font-size: 0.75rem !important;
    height: 28px;
}
.btn-sm svg, .btn-sm i {
    width: 14px;
    height: 14px;
    margin-right: 4px;
}

.btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.btn-icon:hover {
    background: var(--bg-surface-hover);
    color: var(--primary);
    border-color: var(--primary);
}

.btn-icon i { margin: 0; }

.btn-mov-ingreso {
    background-color: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
    font-weight: 600;
    padding: 8px 16px;
    font-size: 0.85rem;
}
.btn-mov-ingreso:hover {
    background-color: #dcfce7;
    border-color: #86efac;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(21, 128, 61, 0.1);
}

.btn-mov-egreso {
    background-color: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
    font-weight: 600;
    padding: 8px 16px;
    font-size: 0.85rem;
}
.btn-mov-egreso:hover {
    background-color: #fee2e2;
    border-color: #fca5a5;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(185, 28, 28, 0.1);
}

.btn-whatsapp {
    background-color: transparent;
    color: var(--text-main);
    border: 1px solid var(--border);
}
.btn-whatsapp:hover {
    background-color: var(--bg-surface-hover);
    border-color: var(--text-muted);
}

/* Filtros Panel */
.filtros-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
    background: var(--bg-main);
    padding: 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.filtros-row {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.filtro-group {
    min-width: 0;
}

.filtro-actions {
    flex: 0 0 auto;
}

/* Form Elements */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    font-size: 0.95rem;
    color: var(--text-main);
    background-color: var(--bg-surface);
    transition: var(--transition);
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--info-light);
}

.autocomplete-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    max-height: 200px;
    overflow-y: auto;
    z-index: 10;
}

.autocomplete-item {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.autocomplete-item:hover {
    background: var(--primary-light, rgba(99, 102, 241, 0.08));
    color: var(--primary);
}

.impersonate-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 2000;
    padding: 8px 24px;
    background: linear-gradient(135deg, var(--primary), #4338ca);
    color: white;
    font-size: 0.85rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.impersonate-exit-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    background: rgba(255,255,255,0.15);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: var(--radius);
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.2s;
}

.impersonate-exit-btn:hover {
    background: rgba(255,255,255,0.3);
}

body.impersonating .app-container {
    padding-top: 0;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    background-color: var(--bg-surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    min-width: 300px;
    border-left: 4px solid var(--primary);
    animation: slideInRight 0.3s ease-out forwards;
}

.toast.success { border-left-color: var(--success); }
.toast.danger { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }

.toast-icon {
    margin-right: 12px;
}
.toast.success .toast-icon { color: var(--success); }
.toast.danger .toast-icon { color: var(--danger); }

.toast-content {
    flex: 1;
}

.toast-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.toast-message {
    font-size: 0.8rem;
    color: var(--text-muted);
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(100%); }
}

/* Utilidad visuales */
.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mt-6 { margin-top: 1.5rem; }
.gap-4 { gap: 1rem; }

/* Socios Grid */
.socios-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.socio-row {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background-color: var(--bg-main);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.socio-name {
    flex: 2;
    font-weight: 600;
}

.socio-percent {
    flex: 1;
    display: flex;
    align-items: center;
}

.socio-percent input {
    width: 80px;
    text-align: right;
}

.socio-amount {
    flex: 1;
    text-align: right;
    font-weight: 600;
    color: var(--text-main);
}

.validation-message {
    color: var(--danger);
    font-size: 0.85rem;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
}

.modal-overlay.active {
    display: block;
}

.modal-container {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl, 0 20px 60px rgba(0,0,0,0.15));
    z-index: 1001;
    width: 90%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 32px;
}

.modal-container.active {
    display: block;
}

.modal-container.modal-lg {
    max-width: 760px;
}

.modal-container.modal-fullscreen {
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    top: 0;
    left: 0;
    transform: none;
    border-radius: 0;
    padding: 24px 32px;
}

.modal-container.modal-fullscreen.active {
    display: flex;
    flex-direction: column;
}

.modal-container.modal-fullscreen .modal-header {
    flex-shrink: 0;
}

.modal-container.modal-fullscreen .table-container {
    flex: 1;
    overflow-y: auto;
}

.modal-container.modal-fullscreen .modal-actions {
    flex-shrink: 0;
}

/* ── Reparto Modal ── */
.reparto-hero {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.reparto-hero-card {
    flex: 1;
    background: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    text-align: center;
}

.reparto-hero-card .hero-currency {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.reparto-hero-card .hero-amount {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main);
}

.reparto-hero-input {
    display: flex;
    align-items: center;
    gap: 6px;
}

.reparto-hero-prefix {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

.reparto-hero-input input {
    font-size: 1.2rem;
    font-weight: 700;
    text-align: right;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    background: var(--bg-surface);
    color: var(--text-main);
    width: 100%;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.reparto-hero-input input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.btn-max {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--primary);
    background: transparent;
    border: 1px solid var(--primary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: var(--transition);
}

.btn-max:hover {
    background: var(--primary);
    color: #fff;
}

.pct-display {
    display: inline-block;
    width: 100%;
    text-align: center;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    border: 1px solid transparent;
    transition: var(--transition);
}

.reparto-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 14px;
}

.reparto-section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.reparto-fondos-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 20px;
}

.reparto-caja-card {
    background: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px;
    transition: border-color 0.2s;
}

.reparto-caja-card.has-error {
    border-color: #fca5a5;
    background: #fef2f2;
}

.reparto-caja-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 10px;
    gap: 4px;
}

.reparto-caja-name {
    font-weight: 600;
    font-size: 0.82rem;
    color: var(--text-main);
    white-space: nowrap;
}

.reparto-caja-saldo {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-align: right;
    white-space: nowrap;
}

.reparto-caja-input-wrap {
    position: relative;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.reparto-caja-input-wrap .currency-prefix {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    pointer-events: none;
}

.reparto-caja-input-wrap input {
    flex: 1;
    min-width: 0;
    padding: 8px 12px 8px 34px;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: right;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-surface);
    color: var(--text-main);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.reparto-caja-input-wrap input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.reparto-caja-input-wrap input.input-error {
    border-color: #ef4444;
    color: #b91c1c;
    background: #fef2f2;
}

.reparto-caja-bar {
    height: 4px;
    border-radius: 2px;
    background: var(--border);
    overflow: hidden;
}

.reparto-caja-bar-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s, background 0.3s;
    background: var(--primary);
}

.reparto-caja-bar-fill.bar-warning { background: var(--warning); }
.reparto-caja-bar-fill.bar-danger { background: var(--danger); }

.reparto-totals {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 24px;
}

.reparto-total-card {
    border-radius: var(--radius-md);
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.reparto-total-card .status-label {
    font-size: 0.72rem;
    font-weight: 500;
    opacity: 0.8;
}

.reparto-total-card .status-value {
    font-size: 0.85rem;
    font-weight: 700;
}

.reparto-total-card.status-ok {
    background: var(--success-light);
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.reparto-total-card.status-pending {
    background: var(--warning-light);
    color: #92400e;
    border: 1px solid #fde68a;
}

.reparto-total-card.status-error {
    background: var(--danger-light);
    color: #991b1b;
    border: 1px solid #fecaca;
}

.reparto-socio-card {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.reparto-socio-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    margin-right: 12px;
    flex-shrink: 0;
}

.reparto-socio-info {
    flex: 1;
    min-width: 0;
}

.reparto-socio-info .socio-label {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-main);
}

.reparto-socio-pct {
    width: 64px;
    text-align: center;
    margin: 0 12px;
}

.reparto-socio-amounts {
    text-align: right;
    flex-shrink: 0;
}

.reparto-socio-amounts .amount-primary {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-main);
}

.reparto-socio-amounts .amount-secondary {
    font-size: 0.78rem;
    color: var(--text-muted);
}


.pct-display:hover {
    background: var(--bg-surface-hover);
    border-color: var(--border) !important;
}

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

.modal-header h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-main);
}

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 4px;
    border-radius: var(--radius-sm);
    transition: background 0.2s;
}

.modal-close:hover {
    background: var(--bg-surface-hover);
}

.modal-form .form-group {
    margin-bottom: 16px;
}

.modal-form .form-row {
    display: flex;
    gap: 12px;
}

.modal-form .form-row > * {
    flex: 1;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

/* ============================
   LOGIN SCREEN
   ============================ */

.login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 50%, #ede9fe 100%);
    padding: 20px;
}

.login-card {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08), 0 1px 4px rgba(0, 0, 0, 0.04);
    padding: 40px;
    width: 100%;
    max-width: 420px;
}

.login-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.login-logo-img {
    height: 48px;
    width: auto;
    object-fit: contain;
}

.login-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 28px;
    margin-top: 4px;
}

.login-card .form-group {
    margin-bottom: 18px;
}

.login-btn {
    width: 100%;
    padding: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    margin-top: 8px;
}

.login-error {
    background: var(--danger-light);
    color: var(--danger);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 12px;
}

.login-success, .auth-success {
    background: var(--success-light);
    color: var(--success);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 12px;
}
.login-error a {
    color: var(--primary);
    text-decoration: underline;
    font-weight: 600;
}

.auth-links {
    text-align: center;
    margin-top: 20px;
    font-size: 0.85rem;
}

.auth-links a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.auth-links a:hover {
    text-decoration: underline;
}

.auth-links-divider {
    margin: 0 8px;
    color: var(--text-muted);
}

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

/* Sidebar overlay for mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    z-index: 19;
}

.sidebar-overlay.active {
    display: block;
}

@media (max-width: 768px) {
    .sidebar {
        width: var(--sidebar-width-expanded);
        transform: translateX(-100%);
        z-index: 30;
    }

    .sidebar:hover {
        width: var(--sidebar-width-expanded);
        box-shadow: none;
    }

    .sidebar.open {
        transform: translateX(0);
        box-shadow: var(--shadow-lg);
    }

    .sidebar.open .logo,
    .sidebar.open .nav-label,
    .sidebar.open .nav-item span,
    .sidebar.open .user-info {
        opacity: 1;
    }

    .content {
        margin-left: 0;
    }

    .menu-btn {
        display: flex;
    }

    .top-bar {
        padding: 0 16px;
    }

    #view-title {
        font-size: 1.15rem;
    }

    .header-right .quick-filters {
        display: none;
    }

    .view-container {
        padding: 16px;
    }

    /* Grid: all cols to full width */
    .col-span-3,
    .col-span-4,
    .col-span-6,
    .col-span-8 {
        grid-column: span 12;
    }

    .dashboard-grid {
        gap: 16px;
    }

    /* KPI cards stack */
    .resumen-kpis {
        grid-template-columns: 1fr;
    }

    .resumen-kpis-secondary {
        grid-template-columns: 1fr;
    }

    /* Filtros: stack vertically */
    .filtros-row {
        flex-direction: column;
        gap: 10px;
    }

    .filtro-group {
        flex: 1 1 100% !important;
    }

    /* Table horizontal scroll */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .table {
        min-width: 600px;
    }

    /* Modal full-screen */
    .modal-container {
        width: 100% !important;
        max-width: 100% !important;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
        top: 0;
        left: 0;
        transform: none;
    }

    .modal-container.modal-lg {
        max-width: 100% !important;
    }

    /* Reparto grid */
    .reparto-hero {
        flex-direction: column;
    }

    .reparto-fondos-grid {
        grid-template-columns: 1fr;
    }

    .reparto-totals {
        grid-template-columns: 1fr;
    }

    .modal-form .form-row {
        flex-direction: column;
    }

    /* Utilidad KPI */
    .col-span-12.card[style*="display:flex"] {
        flex-direction: column;
        padding: 24px;
        text-align: center;
    }

    /* Toast */
    .toast-container {
        left: 16px;
        right: 16px;
        bottom: 16px;
    }

    .toast {
        min-width: auto;
    }

    /* Date filter in header */
    .date-filter {
        min-width: 180px;
    }
}

@media (max-width: 480px) {
    .view-container {
        padding: 12px;
    }

    .card {
        padding: 16px;
    }

    .card-header {
        flex-direction: column;
        gap: 12px;
    }

    .btn {
        font-size: 0.8rem;
        padding: 6px 12px;
    }
}

/* Entry Animations */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}

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

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-16px); }
    to { opacity: 1; transform: translateX(0); }
}

.kpi-card,
.caja-card,
.card,
.filtros-panel,
.table-container,
.resumen-toolbar,
.quick-filters {
    animation: fadeInUp 0.4s ease-out both;
}

.dashboard-grid > .col-span-3:nth-child(1),
.dashboard-grid > .col-span-4:nth-child(1) { animation-delay: 0ms; }
.dashboard-grid > .col-span-3:nth-child(2),
.dashboard-grid > .col-span-4:nth-child(2) { animation-delay: 60ms; }
.dashboard-grid > .col-span-3:nth-child(3),
.dashboard-grid > .col-span-4:nth-child(3) { animation-delay: 120ms; }
.dashboard-grid > .col-span-3:nth-child(4),
.dashboard-grid > .col-span-4:nth-child(4) { animation-delay: 180ms; }
.dashboard-grid > .col-span-8 { animation-delay: 100ms; }
.dashboard-grid > .col-span-12 { animation-delay: 150ms; }

.dashboard-grid > [class*="col-span"] {
    animation: fadeInUp 0.45s ease-out both;
}

.kpi-card {
    animation: fadeInScale 0.35s ease-out both;
}

.caja-card {
    animation: fadeInScale 0.4s ease-out both;
}

.filtros-panel {
    animation: fadeInUp 0.35s ease-out 100ms both;
}

.table-container {
    animation: fadeInUp 0.4s ease-out 180ms both;
}

.table tbody tr {
    animation: fadeInUp 0.3s ease-out both;
}
.table tbody tr:nth-child(1) { animation-delay: 50ms; }
.table tbody tr:nth-child(2) { animation-delay: 80ms; }
.table tbody tr:nth-child(3) { animation-delay: 110ms; }
.table tbody tr:nth-child(4) { animation-delay: 140ms; }
.table tbody tr:nth-child(5) { animation-delay: 170ms; }
.table tbody tr:nth-child(6) { animation-delay: 200ms; }
.table tbody tr:nth-child(7) { animation-delay: 230ms; }
.table tbody tr:nth-child(8) { animation-delay: 260ms; }
.table tbody tr:nth-child(n+9) { animation-delay: 280ms; }

.nav-item {
    animation: slideInLeft 0.3s ease-out both;
}
.nav-item:nth-child(1) { animation-delay: 50ms; }
.nav-item:nth-child(2) { animation-delay: 80ms; }
.nav-item:nth-child(3) { animation-delay: 110ms; }
.nav-item:nth-child(4) { animation-delay: 140ms; }
.nav-item:nth-child(5) { animation-delay: 170ms; }
.nav-item:nth-child(6) { animation-delay: 200ms; }
.nav-item:nth-child(7) { animation-delay: 230ms; }
.nav-item:nth-child(8) { animation-delay: 260ms; }
.nav-item:nth-child(9) { animation-delay: 290ms; }

.modal-container.active {
    animation: modalFadeIn 0.25s ease-out both;
}

.modal-container.modal-fullscreen.active {
    animation: modalFullscreenFadeIn 0.2s ease-out both;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translate(-50%, -50%) scale(0.95); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

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

@media (max-width: 768px) {
    .modal-container.active {
        animation: modalFullscreenFadeIn 0.25s ease-out both;
    }
}

.toast {
    animation: fadeInUp 0.3s ease-out both;
}

.badge-status,
.badge-caja {
    animation: fadeInScale 0.2s ease-out both;
}

.btn {
    transition: all 0.2s ease-out;
}

.btn:active {
    transform: scale(0.96);
}

.login-card {
    animation: fadeInUp 0.5s ease-out both;
}

.login-logo {
    animation: fadeInScale 0.4s ease-out 100ms both;
}

/* Skeleton Loading */
@keyframes skeleton-pulse {
    0% { opacity: 0.6; }
    50% { opacity: 0.3; }
    100% { opacity: 0.6; }
}

.skeleton {
    background: var(--border);
    border-radius: 6px;
    animation: skeleton-pulse 1.4s ease-in-out infinite;
}

.skeleton-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
}

.skeleton-line {
    height: 14px;
    margin-bottom: 10px;
    background: var(--border);
    border-radius: 6px;
    animation: skeleton-pulse 1.4s ease-in-out infinite;
}

.skeleton-line.w-30 { width: 30%; }
.skeleton-line.w-50 { width: 50%; }
.skeleton-line.w-70 { width: 70%; }
.skeleton-line.w-100 { width: 100%; }
.skeleton-line.h-24 { height: 24px; }
.skeleton-line.h-40 { height: 40px; }
.skeleton-line.h-200 { height: 200px; }

/* ── Admin Accounts Grid ── */
.admin-accounts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 16px;
}

.admin-account-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.admin-account-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.admin-account-card.inactive {
    opacity: 0.55;
}

.admin-account-card.inactive:hover {
    opacity: 0.8;
}

.admin-account-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-account-avatar {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--primary), var(--info));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
    letter-spacing: 0.02em;
}

.admin-account-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-account-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}

.admin-account-stats {
    display: flex;
    gap: 20px;
    padding: 10px 14px;
    background: var(--bg-main);
    border-radius: var(--radius-sm);
}

.admin-account-stat {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.admin-account-stat strong {
    color: var(--text-main);
    font-weight: 600;
}

.admin-account-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

@media (max-width: 768px) {
    .admin-accounts-grid {
        grid-template-columns: 1fr;
    }
}

/* Config switch rows */
.config-switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
}
.config-switch-row:hover {
    background: var(--bg-main);
}

/* Toggle switch */
.switch {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.switch-slider {
    position: absolute;
    inset: 0;
    background: var(--border);
    border-radius: 24px;
    transition: var(--transition);
    cursor: pointer;
}
.switch-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: var(--transition);
}
.switch input:checked + .switch-slider {
    background: var(--primary);
}
.switch input:checked + .switch-slider::before {
    transform: translateX(20px);
}

.grecaptcha-badge { visibility: hidden; }
