/* Reset y base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --primary-light: #60a5fa;
    --success: #10b981;
    --success-light: #d1fae5;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --info: #6366f1;
    --info-light: #e0e7ff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --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);
    --radius: 0.5rem;
    --radius-lg: 0.75rem;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
    color: var(--gray-900);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navbar */
.navbar {
    background: linear-gradient(135deg, var(--gray-900) 0%, var(--gray-800) 100%);
    color: white;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-lg);
}

.nav-brand a {
    color: white;
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-brand a::before {
    content: '';
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--info) 100%);
    border-radius: 8px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0.25rem;
    flex-wrap: wrap;
    justify-content: center;
}

.nav-menu a {
    color: var(--gray-300);
    text-decoration: none;
    padding: 0.5rem 0.875rem;
    border-radius: var(--radius);
    transition: all 0.2s ease;
    font-size: 0.875rem;
    font-weight: 500;
}

.nav-menu a:hover {
    color: white;
    background: rgba(255,255,255,0.1);
}

.nav-menu a.active {
    color: white;
    background: var(--primary);
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info {
    color: var(--gray-300);
    font-size: 0.8rem;
    display: none;
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

/* Mobile only navbar */
.mobile-only {
    display: none;
}

/* Desktop Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 260px;
    background: linear-gradient(180deg, var(--gray-900) 0%, var(--gray-800) 100%);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    box-shadow: var(--shadow-lg);
}

.sidebar-header {
    padding: 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: white;
}

.sidebar-logo {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--info) 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.25rem;
    color: white;
}

.sidebar-brand span {
    font-weight: 700;
    font-size: 1.1rem;
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
    overflow-y: auto;
}

.nav-section {
    padding: 0 0.75rem;
    margin-bottom: 1.5rem;
}

.nav-section-title {
    display: block;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--gray-500);
    padding: 0 0.75rem;
    margin-bottom: 0.5rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 0.75rem;
    color: var(--gray-400);
    text-decoration: none;
    border-radius: var(--radius);
    margin-bottom: 0.25rem;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    font-weight: 500;
}

.nav-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.nav-item:hover {
    color: white;
    background: rgba(255,255,255,0.1);
}

.nav-item.active {
    color: white;
    background: var(--primary);
}

.nav-item.logout {
    color: var(--danger);
}

.nav-item.logout:hover {
    background: rgba(239, 68, 68, 0.15);
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    margin-bottom: 0.75rem;
}

.sidebar-user-avatar {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--info) 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    color: white;
}

.sidebar-user-info {
    display: flex;
    flex-direction: column;
}

.sidebar-user-name {
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
}

.sidebar-user-role {
    color: var(--gray-500);
    font-size: 0.7rem;
    text-transform: capitalize;
}

/* Main wrapper for sidebar layout */
.main-wrapper {
    margin-left: 260px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem;
    flex: 1;
    width: 100%;
}

/* Cards */
.card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
    overflow: hidden;
    border: 1px solid var(--gray-100);
}

.card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--gray-50);
}

.card-header h2 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-800);
}

.card-body {
    padding: 1.25rem;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: -1.25rem;
    padding: 1.25rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

th, td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-100);
}

th {
    background: var(--gray-50);
    font-weight: 600;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-500);
    position: sticky;
    top: 0;
}

tbody tr {
    transition: background 0.15s ease;
}

tbody tr:hover {
    background: var(--gray-50);
}

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

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

/* Tabla compacta */
.table-compact th,
.table-compact td {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
}

.table-compact th {
    font-size: 0.65rem;
}

/* Tabla sin wrap */
.table-nowrap td,
.table-nowrap th {
    white-space: nowrap;
}

/* Celda truncada */
.cell-truncate {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Dropdown menu */
.dropdown {
    position: relative;
    display: inline-block;
}

.btn-dropdown {
    background: transparent;
    border: none;
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    border-radius: var(--radius);
    color: var(--gray-500);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.btn-dropdown:hover {
    background: var(--gray-100);
    color: var(--gray-700);
}

.dropdown-menu {
    position: absolute;
    right: 0;
    top: 100%;
    min-width: 120px;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-200);
    z-index: 1000;
    display: none;
    overflow: hidden;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-item {
    display: block;
    width: 100%;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    color: var(--gray-700);
    text-decoration: none;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s ease;
}

.dropdown-item:hover {
    background: var(--gray-50);
}

.dropdown-item-danger {
    color: var(--danger);
}

.dropdown-item-danger:hover {
    background: var(--danger-light);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    gap: 0.5rem;
    white-space: nowrap;
}

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

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.4);
    transform: translateY(-1px);
}

.btn-success {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
    color: white;
}

.btn-outline {
    background: white;
    border: 1px solid var(--gray-300);
    color: var(--gray-700);
}

.btn-outline:hover {
    background: var(--gray-50);
    border-color: var(--gray-400);
}

.btn-sm {
    padding: 0.35rem 0.65rem;
    font-size: 0.75rem;
}

.btn-icon {
    padding: 0.5rem;
    min-width: 36px;
}

.btn-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.375rem;
    font-size: 0.875rem;
    color: var(--gray-700);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 0.875rem;
    transition: all 0.2s ease;
    background: white;
}

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

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

.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

/* Alerts */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideIn 0.3s ease;
}

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

.alert-success {
    background: var(--success-light);
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error {
    background: var(--danger-light);
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.badge-success {
    background: var(--success-light);
    color: #065f46;
}

.badge-warning {
    background: var(--warning-light);
    color: #92400e;
}

.badge-danger {
    background: var(--danger-light);
    color: #991b1b;
}

.badge-info {
    background: var(--info-light);
    color: #4338ca;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: white;
    padding: 1.25rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-100);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.stat-label {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-bottom: 0.375rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

.stat-value {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1.2;
    white-space: nowrap;
}

/* Stat cards con iconos */
.stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-card.highlight {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-color: var(--success);
}

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

.stat-content {
    flex: 1;
    min-width: 0;
}

.stat-sublabel {
    font-size: 0.65rem;
    color: var(--gray-400);
    margin-top: 0.25rem;
}

/* Quick stats bar */
.quick-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
    border: 1px solid var(--gray-100);
}

.quick-stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-right: 1rem;
    border-right: 1px solid var(--gray-200);
}

.quick-stat:last-child {
    border-right: none;
    padding-right: 0;
}

.quick-label {
    font-size: 0.75rem;
    color: var(--gray-500);
    font-weight: 500;
}

.quick-value {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--gray-800);
}

.quick-value.positive {
    color: var(--success);
}

.quick-value.negative {
    color: var(--danger);
}

.stat-value.positive {
    color: var(--success);
}

.stat-value.negative {
    color: var(--danger);
}

/* Charts */
.chart-container {
    position: relative;
    height: 280px;
    width: 100%;
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Filters */
.filters {
    background: white;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-100);
}

.filters-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: flex-end;
}

.filters .form-group {
    margin-bottom: 0;
    min-width: 140px;
    flex: 1;
}

.filters .form-group label {
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
}

.filters .form-group input,
.filters .form-group select {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
}

.filters .btn-group {
    flex-shrink: 0;
}

/* Estado de Cuentas */
.estado-cuentas {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-100);
}

.estado-cuentas-header {
    background: linear-gradient(135deg, var(--gray-900) 0%, var(--gray-800) 100%);
    color: white;
    padding: 1rem 1.5rem;
    font-weight: 600;
    font-size: 1rem;
}

.estado-cuentas-row {
    display: flex;
    justify-content: space-between;
    padding: 0.875rem 1.5rem;
    border-bottom: 1px solid var(--gray-100);
    font-size: 0.9rem;
}

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

.estado-cuentas-row.highlight {
    background: var(--gray-50);
    font-weight: 600;
}

.estado-cuentas-row.total {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
}

.estado-cuentas-row.negative span:last-child {
    color: var(--danger);
}

/* Resumen box */
.resumen-box {
    background: linear-gradient(135deg, var(--gray-800) 0%, var(--gray-900) 100%);
    color: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.resumen-box h3 {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-400);
    margin-bottom: 1rem;
}

.resumen-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
}

.resumen-item .label {
    font-size: 0.75rem;
    color: var(--gray-400);
}

.resumen-item .value {
    font-size: 1.5rem;
    font-weight: 700;
}

.resumen-item .value.positive {
    color: #34d399;
}

.resumen-item .value.negative {
    color: #f87171;
}

/* Login */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--gray-900) 0%, #1e3a5f 50%, var(--gray-800) 100%);
    padding: 1rem;
}

.login-box {
    background: white;
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 400px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.login-box h1 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--gray-900);
    font-size: 1.75rem;
}

/* Footer */
.footer {
    background: var(--gray-900);
    color: var(--gray-500);
    text-align: center;
    padding: 1rem;
    font-size: 0.8rem;
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-800);
}

/* Totals Row */
.totals-row {
    background: var(--gray-50);
    font-weight: 600;
}

.totals-row td {
    border-top: 2px solid var(--gray-300);
}

/* PDF Button */
.btn-pdf {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
}

.btn-pdf:hover {
    box-shadow: 0 4px 8px rgba(220, 38, 38, 0.3);
}

/* Responsive */
@media (max-width: 1024px) {
    .nav-menu {
        gap: 0.125rem;
    }

    .nav-menu a {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 768px) {
    /* Hide sidebar, show mobile navbar */
    .sidebar {
        display: none;
    }

    .mobile-only {
        display: flex;
    }

    .main-wrapper {
        margin-left: 0;
    }

    .navbar {
        flex-wrap: wrap;
        height: auto;
        padding: 0.75rem 1rem;
        gap: 0.5rem;
    }

    .user-info {
        display: block;
        color: var(--gray-300);
        font-size: 0.85rem;
    }

    .container {
        padding: 1rem;
    }

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

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

    .filters {
        padding: 1rem;
    }

    .filters-row {
        flex-direction: column;
    }

    .filters .form-group {
        width: 100%;
    }

    .filters .btn-group {
        width: 100%;
    }

    .filters .btn-group .btn {
        flex: 1;
    }

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

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-value {
        font-size: 1rem;
    }

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

    .chart-container {
        height: 220px;
    }

    table {
        font-size: 0.8rem;
    }

    th, td {
        padding: 0.5rem 0.75rem;
    }

    .btn-group {
        flex-direction: column;
    }

    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .estado-cuentas-row {
        flex-direction: column;
        gap: 0.25rem;
        padding: 0.75rem 1rem;
    }

    .estado-cuentas-row span:last-child {
        font-weight: 600;
    }

    .resumen-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .resumen-item .value {
        font-size: 1.25rem;
    }

    .login-box {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .stat-card {
        padding: 0.75rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .stat-icon {
        width: 36px;
        height: 36px;
    }

    .stat-icon svg {
        width: 18px;
        height: 18px;
    }

    .stat-label {
        font-size: 0.65rem;
        margin-bottom: 0;
    }

    .stat-value {
        font-size: 0.95rem;
    }

    .stat-sublabel {
        font-size: 0.55rem;
    }

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

    .table-responsive {
        margin: -1rem;
        padding: 1rem;
    }

    /* Añadir espacio para la toolbar en mobile */
    main {
        padding-bottom: 60px;
    }
}

/* Mobile Quick Actions Toolbar */
.mobile-toolbar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid var(--gray-200);
    padding: 0.35rem 0.5rem;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.08);
}

.mobile-toolbar-inner {
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.mobile-toolbar a,
.mobile-toolbar button {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    color: var(--gray-500);
    text-decoration: none;
    font-size: 0.6rem;
    padding: 0.2rem 0.4rem;
    border-radius: var(--radius);
    transition: all 0.2s;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-toolbar a span,
.mobile-toolbar button span {
    display: block;
}

.mobile-toolbar a:hover,
.mobile-toolbar a.active,
.mobile-toolbar button:hover {
    color: var(--primary);
}

.mobile-toolbar a svg,
.mobile-toolbar button svg {
    width: 20px;
    height: 20px;
}

.mobile-toolbar a.btn-add {
    background: var(--primary);
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    padding: 0;
    margin-top: -20px;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
    justify-content: center;
}

.mobile-toolbar a.btn-add svg {
    width: 24px;
    height: 24px;
}

.mobile-toolbar a.btn-add:hover {
    background: var(--primary-dark);
    color: white;
    transform: scale(1.05);
}

/* Mobile Menu Popup */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
    display: block;
    opacity: 1;
}

.mobile-menu-popup {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-radius: 1.5rem 1.5rem 0 0;
    z-index: 2001;
    max-height: 85vh;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.mobile-menu-popup.active {
    display: block;
    transform: translateY(0);
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    background: white;
    border-radius: 1.5rem 1.5rem 0 0;
}

.mobile-menu-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.mobile-menu-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--info) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    font-size: 1rem;
}

.mobile-menu-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--gray-900);
}

.mobile-menu-role {
    font-size: 0.75rem;
    color: var(--gray-500);
    text-transform: capitalize;
}

.mobile-menu-close {
    background: var(--gray-100);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--gray-600);
}

.mobile-menu-close:hover {
    background: var(--gray-200);
}

.mobile-menu-close svg {
    width: 20px;
    height: 20px;
}

.mobile-menu-nav {
    padding: 0.5rem;
}

.mobile-menu-nav a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    color: var(--gray-700);
    text-decoration: none;
    border-radius: var(--radius-lg);
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s;
}

.mobile-menu-nav a svg {
    width: 22px;
    height: 22px;
    color: var(--gray-500);
}

.mobile-menu-nav a:hover {
    background: var(--gray-100);
}

.mobile-menu-nav a.active {
    background: var(--primary);
    color: white;
}

.mobile-menu-nav a.active svg {
    color: white;
}

.mobile-menu-nav a.logout {
    color: var(--danger);
}

.mobile-menu-nav a.logout svg {
    color: var(--danger);
}

.mobile-menu-nav a.logout:hover {
    background: var(--danger-light);
}

.mobile-menu-divider {
    height: 1px;
    background: var(--gray-200);
    margin: 0.5rem 0;
}

.mobile-menu-section {
    display: block;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--gray-400);
    padding: 0.5rem 1rem;
}

@media (max-width: 768px) {
    .mobile-toolbar {
        display: block;
    }

    .footer {
        display: none;
    }
}

/* Animaciones */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.3s ease;
}

/* Skeleton loading */
.skeleton {
    background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%);
    background-size: 200% 100%;
    animation: skeleton 1.5s infinite;
    border-radius: var(--radius);
}

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