/* --- NEW PREMIUM DARK ADMIN PANEL --- */
body.admin-body {
    background: #0a0a0a;
    color: #e0e0e0;
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
}

.admin-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar (Reusing style from sponsor dashboard if possible, but refined) */
.admin-sidebar {
    width: 250px;
    background: #111;
    border-right: 1px solid #222;
    display: flex;
    flex-direction: column;
    padding: 20px 0;
    flex-shrink: 0;
}

.admin-logo-area {
    padding: 0 25px 30px;
    border-bottom: 1px solid #222;
    margin-bottom: 20px;
}

.admin-logo-area img {
    max-width: 120px;
}

.admin-nav a {
    display: flex;
    align-items: center;
    padding: 15px 25px;
    color: #888;
    text-decoration: none;
    transition: all 0.3s;
    font-weight: 500;
}

.admin-nav a:hover,
.admin-nav a.active {
    color: #fff;
    background: linear-gradient(90deg, rgba(225, 6, 0, 0.1) 0%, transparent 100%);
    border-left: 3px solid #E10600;
}

.admin-nav a i {
    width: 25px;
}

/* Main Content */
.admin-main {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.admin-header h1 {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: 2rem;
    text-transform: uppercase;
    margin: 0;
}

.admin-date {
    color: #666;
    font-size: 0.9rem;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: #161616;
    border: 1px solid #252525;
    padding: 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: #1f1f1f;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #E10600;
}

.stat-info h3 {
    margin: 0;
    font-size: 1.8rem;
    color: #fff;
    font-family: 'Rajdhani', sans-serif;
}

.stat-info p {
    margin: 0;
    color: #666;
    font-size: 0.8rem;
    text-transform: uppercase;
}

/* Section Styling */
.section-header {
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-title {
    font-size: 1.1rem;
    color: #fff;
    text-transform: uppercase;
    font-weight: 700;
    border-left: 3px solid #E10600;
    padding-left: 15px;
}

/* Data Cards (Replacing Tables) */
.data-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.user-card-premium {
    background: linear-gradient(145deg, #1a1a1a 0%, #111 100%);
    border: 1px solid #252525;
    border-radius: 10px;
    padding: 25px;
    transition: transform 0.3s;
    position: relative;
    overflow: hidden;
}

.user-card-premium:hover {
    transform: translateY(-3px);
    border-color: #333;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.company-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 5px;
    display: block;
}

.user-role {
    font-size: 0.8rem;
    color: #666;
    text-transform: uppercase;
}

.card-avatar {
    width: 40px;
    height: 40px;
    background: #222;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #444;
}

.card-body {
    margin-bottom: 20px;
}

.info-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    color: #999;
    font-size: 0.9rem;
}

.info-row i {
    width: 16px;
    text-align: center;
    color: #444;
}

.card-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.btn-sm {
    padding: 8px 15px !important;
    font-size: 0.8rem !important;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.btn-approve {
    background: #2ecc71;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.btn-reject {
    background: transparent;
    border: 1px solid #e74c3c;
    color: #e74c3c;
    border-radius: 4px;
    cursor: pointer;
}

.btn-reject:hover {
    background: #e74c3c;
    color: #fff;
}

.btn-delete-full {
    background: #e74c3c;
    color: #fff;
    border: none;
}

.btn-details {
    background: #333;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* Modal Dark */
.modal-admin {
    display: none;
    /* JS toggles this to flex */
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    /* Center horizontally */
    align-items: center;
    /* Center vertically */
}

.modal-admin-content {
    background: #1a1a1a;
    border: 1px solid #333;
    color: #fff;
    margin: auto;
    /* Fallback */
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 800px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.8);
    position: relative;
    /* Reset any bottom/fixed quirks */
    top: auto;
    bottom: auto;
    left: auto;
    right: auto;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-modal:hover {
    color: #fff;
}

/* --- MOBILE RESPONSIVENESS --- */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1100;
    background: #E10600;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    backdrop-filter: blur(2px);
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }

    .admin-sidebar {
        position: fixed;
        left: -260px;
        /* Hide off-screen */
        top: 0;
        height: 100vh;
        z-index: 1050;
        transition: left 0.3s ease;
        box-shadow: 5px 0 20px rgba(0, 0, 0, 0.5);
    }

    .admin-sidebar.active {
        left: 0;
    }

    .mobile-overlay.active {
        display: block;
    }

    .admin-main {
        padding: 20px;
        padding-top: 70px;
        /* Space for toggle button */
    }

    .admin-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        margin-bottom: 30px;
    }

    .admin-header h1 {
        font-size: 1.5rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        /* Stack stats */
    }
}

/* --- ADMIN LOGIN OVERLAY --- */
.admin-login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: #000;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-box {
    background: #111;
    padding: 40px;
    border-radius: 10px;
    border: 1px solid #333;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 0 50px rgba(225, 6, 0, 0.2);
}

.login-box h2 {
    color: #fff;
    margin-bottom: 10px;
    font-family: 'Rajdhani', sans-serif;
    text-transform: uppercase;
    font-size: 2rem;
}

.login-box p {
    color: #666;
    margin-bottom: 30px;
}

.login-input {
    width: 100%;
    padding: 15px;
    background: #0a0a0a;
    border: 1px solid #333;
    color: #fff;
    margin-bottom: 15px;
    border-radius: 5px;
    font-size: 1rem;
    box-sizing: border-box;
    /* Important for padding */
}

.login-input:focus {
    border-color: #E10600;
    outline: none;
}

.btn-login {
    width: 100%;
    padding: 15px;
    background: #E10600;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    font-size: 1rem;
    margin-top: 10px;
    transition: background 0.3s;
}

.btn-login:hover {
    background: #ff0700;
}

.error-msg {
    color: #e74c3c;
    margin-top: 15px;
    font-size: 0.9rem;
    display: none;
    /* Hidden by default */
}