/* admin.css - Styles for the Admin Portal */

.admin-bg {
    background-color: #0b1326;
    color: #ffffff;
    min-height: 100vh;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.admin-sidebar {
    background-color: rgba(11, 19, 38, 0.95);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(16px);
}

.admin-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.2s ease;
    border-radius: 0.5rem;
    margin: 0.25rem 0.75rem;
    text-decoration: none;
    cursor: pointer;
}

.admin-nav-item:hover, .admin-nav-item.active {
    background-color: rgba(126, 168, 66, 0.15);
    color: #7ea842;
}

.admin-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
}

.admin-heading {
    font-size: 1.75rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.admin-subheading {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.6);
}

.admin-btn-primary {
    background-color: #7ea842;
    color: #ffffff;
    padding: 0.6rem 1.25rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.admin-btn-primary:hover {
    background-color: #8ebd4b;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(126, 168, 66, 0.3);
}

.admin-stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: #7ea842;
    margin-top: 0.5rem;
}

.admin-stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 600;
}

.admin-stat-icon {
    padding: 0.75rem;
    border-radius: 0.75rem;
    background-color: rgba(126, 168, 66, 0.15);
    color: #7ea842;
    display: flex;
    align-items: center;
    justify-content: center;
}

.admin-table-container {
    overflow-x: auto;
    width: 100%;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.admin-table th {
    text-align: left;
    padding: 1rem;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-weight: 600;
}

.admin-table td {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #ffffff;
    font-size: 0.9rem;
    vertical-align: middle;
}

.admin-table tr:hover td {
    background-color: rgba(255, 255, 255, 0.02);
}

.admin-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
}

.admin-badge-success {
    background-color: rgba(34, 197, 94, 0.2);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.admin-badge-warning {
    background-color: rgba(234, 179, 8, 0.2);
    color: #facc15;
    border: 1px solid rgba(234, 179, 8, 0.3);
}

.admin-badge-error {
    background-color: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Sidebar Layout Guarantees */
@media (max-width: 768px) {
    .admin-layout-sidebar {
        position: fixed !important;
        top: 0;
        left: 0;
        bottom: 0;
        width: 280px !important;
        z-index: 9999 !important;
        transform: translateX(-100%);
        background-color: #0b1326 !important;
        box-shadow: 4px 0 25px rgba(0,0,0,0.7);
        transition: transform 0.3s ease-in-out;
    }
    .admin-layout-sidebar.open {
        transform: translateX(0) !important;
    }
}
@media (min-width: 769px) {
    .admin-layout-sidebar {
        position: relative !important;
        width: 280px !important;
        transform: none !important;
        background-color: #0b1326 !important;
        z-index: 50 !important;
        transition: none !important;
    }
}

/* Custom Admin Toggles */
.admin-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}
.admin-toggle input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.admin-toggle-slider {
    width: 3rem; /* 48px */
    height: 1.5rem; /* 24px */
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 9999px;
    position: relative;
    transition: background-color 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
}
.admin-toggle-slider::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 1.125rem; /* 18px */
    height: 1.125rem; /* 18px */
    background-color: #9ca3af; /* gray-400 */
    border-radius: 9999px;
    transition: transform 0.3s ease, background-color 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
.admin-toggle input:checked + .admin-toggle-slider {
    background-color: rgba(126, 168, 66, 0.8); /* itcGreen */
    border-color: #7ea842;
}
.admin-toggle input:checked + .admin-toggle-slider::after {
    transform: translateX(1.5rem); /* 24px */
    background-color: #ffffff;
}
.admin-toggle input:focus-visible + .admin-toggle-slider {
    box-shadow: 0 0 0 2px #7ea842;
}
