/**
 * Layout del panel interno — extraído de layouts/app.blade.php
 */
body {
    font-family: var(--lj-font-family);
    font-size: var(--lj-font-size-base);
    background-color: var(--lj-color-page-bg);
    color: var(--lj-color-text);
}

.navbar {
    background: linear-gradient(90deg, var(--lj-color-primary-dark) 0%, var(--lj-color-primary) 60%, var(--lj-color-primary-mid) 100%) !important;
    padding: 0.7rem 1rem;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.25);
}

.navbar-brand {
    font-size: 1.1rem;
}

.navbar-brand img {
    height: 35px !important;
}

.sidebar {
    min-height: calc(100vh - 56px);
    background-color: var(--lj-color-surface);
    padding: 20px 0;
    transition: all 0.3s ease;
    border-right: 1px solid var(--lj-color-border);
}

.sidebar a {
    color: var(--lj-color-sidebar-text);
    text-decoration: none;
    display: block;
    padding: 12px 20px;
    transition: all 0.3s;
    font-size: 0.95rem;
    border-left: 3px solid transparent;
}

.sidebar a:hover,
.sidebar a.active {
    background-color: var(--lj-color-sidebar-hover-bg);
    color: var(--lj-color-sidebar-active-text);
    border-left-color: var(--lj-color-secondary);
}

.sidebar a i {
    margin-right: 8px;
    width: 20px;
    text-align: center;
}

.sidebar .nav-section-title {
    font-size: var(--lj-font-size-xs);
    font-weight: var(--lj-font-weight-bold);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6c757d;
    padding: 14px 20px 6px;
}

.sidebar .nav-submenu a {
    padding-left: 42px;
    font-size: 0.9rem;
    color: #495057;
}

.sidebar .submenu-toggle::after {
    content: "\F282";
    font-family: bootstrap-icons;
    float: right;
    transition: transform 0.2s ease;
    font-size: 0.8rem;
}

.sidebar .submenu-toggle[aria-expanded="true"]::after {
    transform: rotate(90deg);
}

.card {
    border-radius: var(--lj-radius-lg);
    border: 1px solid var(--lj-color-border);
    box-shadow: var(--lj-shadow-md);
    margin-bottom: var(--lj-space-6);
    background-color: var(--lj-color-surface);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.1);
}

.card-header {
    background-color: var(--lj-color-primary);
    color: white;
    border-radius: var(--lj-radius-lg) var(--lj-radius-lg) 0 0 !important;
    padding: 0.85rem 1rem;
    font-weight: var(--lj-font-weight-semibold);
}

.btn-primary {
    background-color: var(--lj-color-secondary);
    border-color: var(--lj-color-secondary);
    padding: 0.5rem 1.5rem;
}

.btn-primary:hover {
    background-color: var(--lj-color-secondary-hover);
    border-color: var(--lj-color-secondary-hover);
}

.school-header {
    background: linear-gradient(135deg, #224976 0%, var(--lj-color-secondary) 100%);
    color: white;
    padding: 1.75rem 0;
    margin: 1rem 0 1.75rem;
    border-radius: var(--lj-radius-xl);
    box-shadow: var(--lj-shadow-lg);
}

.alert {
    border-radius: var(--lj-radius-sm);
}

.table thead {
    background-color: var(--lj-color-primary);
    color: white;
}

.table tbody tr:hover {
    background-color: #f8fbff;
}

.table-responsive {
    border-radius: var(--lj-radius-sm);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--lj-color-border);
    background-color: var(--lj-color-surface);
}

.text-muted {
    color: var(--lj-color-text-muted) !important;
}

.page-breadcrumb {
    background: var(--lj-color-surface);
    border: 1px solid var(--lj-color-border);
    border-radius: var(--lj-radius-md);
    padding: 0.6rem 1rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.page-breadcrumb .breadcrumb {
    margin-bottom: 0;
    font-size: 0.9rem;
}

.page-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    color: #94a3b8;
}

.pagination {
    margin: 1rem 0;
    gap: 0.5rem;
}

.pagination .page-link {
    min-width: 2.2rem;
    text-align: center;
    padding: 0.5rem 0.85rem;
    font-size: 0.9rem;
    line-height: 1.2;
    border-radius: 999px !important;
    border-color: #d1d9e6;
    background-color: var(--lj-color-surface);
}

.pagination .page-item.active .page-link {
    box-shadow: 0 4px 12px rgba(47, 128, 237, 0.25);
}

.pagination .page-item:first-child .page-link,
.pagination .page-item:last-child .page-link {
    padding: 0.4rem 0.6rem;
}

.pagination-wrapper .pagination-summary {
    margin-right: 0.5rem;
}

@media (max-width: 768px) {
    body {
        font-size: 14px;
    }

    .navbar-brand span {
        font-size: 0.9rem;
    }

    .navbar-brand img {
        height: 30px !important;
    }

    .sidebar {
        position: fixed;
        left: -100%;
        top: 56px;
        width: 250px;
        height: calc(100vh - 56px);
        z-index: 1040;
        background-color: #f8f9fa;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
        transition: left 0.3s ease;
        overflow-y: auto;
    }

    .sidebar.show {
        left: 0;
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 56px;
        left: 0;
        width: 100%;
        height: calc(100vh - 56px);
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 1039;
        opacity: 0;
        transition: opacity 0.3s ease;
        pointer-events: none;
    }

    .sidebar-overlay.show {
        display: block;
        opacity: 1;
        pointer-events: auto;
    }

    .mobile-sidebar-toggle {
        display: inline-block !important;
        cursor: pointer;
        padding: 10px 14px;
        background: linear-gradient(135deg, #3498db, #2980b9);
        border-radius: var(--lj-radius-md);
        border: 2px solid rgba(255, 255, 255, 0.4);
        box-shadow: 0 3px 10px rgba(52, 152, 219, 0.4);
        transition: all 0.3s ease;
        min-width: 48px;
        min-height: 48px;
        display: flex !important;
        align-items: center;
        justify-content: center;
        z-index: 1050;
        left: 15px !important;
        top: 50%;
        transform: translateY(-50%);
    }

    .mobile-sidebar-toggle:hover {
        background: linear-gradient(135deg, #2980b9, #3498db);
        transform: translateY(-50%) translateY(-2px);
        box-shadow: 0 5px 15px rgba(52, 152, 219, 0.5);
    }

    .mobile-sidebar-toggle:active {
        transform: translateY(-50%);
    }

    .navbar-toggler {
        padding: 10px 14px;
        border: 2px solid rgba(255, 255, 255, 0.5) !important;
        border-radius: var(--lj-radius-md);
        background: linear-gradient(135deg, var(--lj-color-accent), #c0392b);
        transition: all 0.3s ease;
        min-width: 48px;
        min-height: 48px;
        box-shadow: 0 3px 10px rgba(231, 76, 60, 0.4);
        z-index: 1050;
        right: 15px !important;
        top: 50%;
        transform: translateY(-50%);
    }

    .navbar-toggler:hover {
        background: linear-gradient(135deg, #c0392b, var(--lj-color-accent));
        border-color: rgba(255, 255, 255, 0.8) !important;
        transform: translateY(-50%) translateY(-2px);
        box-shadow: 0 5px 15px rgba(231, 76, 60, 0.5);
    }

    .navbar-toggler:focus {
        box-shadow: 0 0 0 0.25rem rgba(231, 76, 60, 0.25);
    }

    .navbar-toggler-icon {
        width: 24px;
        height: 24px;
        background-image: none !important;
    }

    .navbar-brand {
        font-size: 1rem;
        position: relative;
        z-index: 1;
    }

    .navbar .container-fluid {
        position: relative;
        min-height: 56px;
        display: flex;
        align-items: center;
    }

    main {
        padding: 15px !important;
    }

    .school-header {
        padding: 1.5rem 0;
        margin-bottom: 1rem;
    }

    .school-header h1 {
        font-size: 1.75rem !important;
    }

    .school-header .lead {
        font-size: 1rem;
    }

    .card-body {
        padding: 1rem;
    }

    .table {
        font-size: 0.85rem;
    }

    .table th,
    .table td {
        padding: 0.5rem;
        white-space: nowrap;
    }

    .btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }

    .btn-group .btn {
        padding: 0.25rem 0.5rem;
    }

    .col-md-3,
    .col-md-4,
    .col-md-6 {
        margin-bottom: 1rem;
    }

    .card.bg-primary,
    .card.bg-success,
    .card.bg-info,
    .card.bg-warning,
    .lj-stat-card {
        margin-bottom: 1rem !important;
    }

    .card.bg-primary h2,
    .card.bg-success h2,
    .card.bg-info h2,
    .card.bg-warning h2,
    .lj-stat-card__value {
        font-size: 1.5rem;
    }

    .card.bg-primary i,
    .card.bg-success i,
    .card.bg-info i,
    .card.bg-warning i,
    .lj-stat-card__icon {
        font-size: 2rem !important;
    }
}

@media (max-width: 576px) {
    .school-header h1 {
        font-size: 1.5rem !important;
    }

    .table {
        font-size: 0.75rem;
    }

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

    .btn-group .btn {
        margin-bottom: 0.25rem;
        width: 100%;
    }

    .pagination {
        font-size: 0.75rem;
    }

    .pagination .page-link {
        padding: 0.3rem 0.5rem;
        font-size: 0.75rem;
    }

    .pagination .page-item:first-child .page-link,
    .pagination .page-item:last-child .page-link {
        padding: 0.3rem 0.4rem;
    }
}

@media (min-width: 769px) {
    .mobile-sidebar-toggle {
        display: none !important;
    }
}
