/* assets/styles/pages/admin.css */

/* ===============================
   ADMIN CONTAINER
================================ */
.admin-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

/* ===============================
   ADMIN HEADER
================================ */
.admin-header {
    background: linear-gradient(135deg, var(--bg-page), var(--bg-card));
    border-radius: 24px;
    padding: 3.5rem 3rem;
    margin-bottom: 3rem;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
}

.admin-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.admin-header p {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

/* ===============================
   ADMIN PANEL
================================ */
.admin-panel {
    background: var(--bg-card);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    margin-bottom: 2rem;
}

.admin-panel__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
}

.admin-panel__title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.admin-panel__actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* ===============================
   ADMIN TABLE
================================ */
.admin-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.admin-table thead {
    background: var(--bg-hover);
}

.admin-table thead th {
    padding: 1rem 1.25rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--border-color);
}

.admin-table thead th:first-child {
    border-top-left-radius: 12px;
}

.admin-table thead th:last-child {
    border-top-right-radius: 12px;
}

.admin-table tbody tr {
    transition: all 0.2s ease;
}

.admin-table tbody tr:hover {
    background: var(--bg-hover);
}

.admin-table tbody td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

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

.admin-table tbody tr:last-child td:first-child {
    border-bottom-left-radius: 12px;
}

.admin-table tbody tr:last-child td:last-child {
    border-bottom-right-radius: 12px;
}

/* ===============================
   USER CELL
================================ */
.user-cell {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-cell__avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), #3b82f6);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.user-cell__info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

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

.user-cell__email {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* ===============================
   ROLE BADGE
================================ */
.role-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.role-badge--admin {
    background: #fee2e2;
    color: #991b1b;
}

.role-badge--referent {
    background: #dbeafe;
    color: #1e40af;
}

.role-badge--user {
    background: #f3f4f6;
    color: #374151;
}

/* ===============================
   ACTION BUTTONS
================================ */
.admin-actions {
    display: flex;
    gap: 0.5rem;
}

.admin-actions .btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    border-radius: 8px;
}

.admin-actions .btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===============================
   ADMIN NAV BAR
================================ */
.admin-nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    background: var(--bg-card);
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
}

.admin-nav-bar__actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}

.admin-nav-bar .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    padding: 0.6rem 1rem;
    border-radius: 10px;
}

/* ===============================
   ADMIN ACTIONS BAR
================================ */
.admin-actions-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    background: var(--bg-hover);
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

.admin-actions-group {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}

.admin-actions-bar .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    padding: 0.6rem 1.1rem;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.admin-actions-bar .btn:hover {
    transform: translateY(-2px);
}

/* ===============================
   STATS GRID
================================ */
.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
    transition: all 0.25s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.12);
}

.stat-card__label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.stat-card__value {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}

.stat-card__icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-color), #3b82f6);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 8px 20px rgba(31, 95, 224, 0.25);
}

/* ===============================
   FILTERS
================================ */
.admin-filters {
    background: var(--bg-hover);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.admin-filters__group {
    flex: 1;
    min-width: 200px;
}

.admin-filters__group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.admin-filters__group select,
.admin-filters__group input {
    width: 100%;
}

/* ===============================
   EMPTY STATE
================================ */
.admin-empty {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.admin-empty__icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.admin-empty__title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.admin-empty__text {
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

/* ===============================
   PAGINATION
================================ */
.admin-pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

.admin-pagination__item {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    font-weight: 600;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.admin-pagination__item:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.admin-pagination__item--active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* ===============================
   RESPONSIVE
================================ */
@media (max-width: 1024px) {
    .admin-container {
        padding: 2rem 1.5rem;
    }

    .admin-header {
        padding: 2.5rem 2rem;
    }

    .admin-panel {
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    .admin-header h1 {
        font-size: 2rem;
    }

    .admin-panel__header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .admin-table {
        font-size: 0.875rem;
    }

    .admin-table thead th,
    .admin-table tbody td {
        padding: 0.75rem;
    }

    .user-cell {
        flex-direction: column;
        align-items: flex-start;
    }

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

    .admin-actions .btn {
        width: 100%;
    }
}
/* ===============================
   ADMIN PANEL – PROFESSIONAL
================================ */

.admin-panel {
    border: 1px solid var(--border-color);
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.04),
        0 8px 24px rgba(15, 23, 42, 0.06);
}
/* ===============================
   ADMIN PANEL HEADER – CLEAN
================================ */

.admin-panel__header {
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.admin-panel__title {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.admin-panel__title i {
    color: var(--primary-color);
    font-size: 1rem;
}
/* ===============================
   ADMIN BUTTONS – ENTERPRISE
================================ */

.admin-btn {
    box-shadow: none;
    border: 1px solid transparent;
}

.admin-btn:hover {
    opacity: 0.92;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.admin-btn--school-years {
    border-color: rgba(255,255,255,0.15);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.15);
}

.admin-btn--school-years:hover {
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.2);
}
.admin-panel__actions {
    gap: 0.5rem;
}
.admin-panel {
    transition: box-shadow 150ms ease;
}

.admin-panel:hover {
    box-shadow:
        0 2px 4px rgba(15, 23, 42, 0.05),
        0 12px 28px rgba(15, 23, 42, 0.08);
}
