/* ======================================
   CAMPUS PLUG ADMIN DASHBOARD
====================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "DM Sans", sans-serif;
    background: #f8faf9;
    color: #172b22;
}

h1, h2, h3 {
    font-family: "Plus Jakarta Sans", sans-serif;
}

a {
    text-decoration: none;
}

[hidden] {
    display: none !important;
}

/* LAYOUT */

.admin-layout {
    display: flex;
    min-height: 100vh;
}

/* SIDEBAR */

.admin-sidebar {
    width: 260px;
    background: #14532d;
    color: #ffffff;
    padding: 28px 18px;

    display: flex;
    flex-direction: column;

    position: sticky;
    top: 0;
    height: 100vh;
    flex-shrink: 0;
}

.admin-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 40px;
}

.admin-brand img {
    width: 40px;
    height: 40px;
}

.admin-sidebar-label {
    font-size: 11px;
    letter-spacing: 2px;
    color: #86efac;
    margin: 0 12px 14px;
}

.admin-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.admin-nav a {
    padding: 13px 14px;
    border-radius: 10px;
    color: #dcfce7;
    font-size: 14px;
    font-weight: 600;
}

.admin-nav a:hover,
.admin-nav a.active {
    background: rgba(255, 255, 255, 0.12);
    color: white;
}

.admin-logout {
    background: transparent;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    padding: 12px;
    font: inherit;
    cursor: pointer;
}

.admin-logout:hover {
    background: #166534;
}

/* MAIN */

.admin-main {
    flex: 1;
    min-width: 0;
    padding: 32px 36px 60px;
}

.admin-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 30px;
}

.admin-topbar h1 {
    font-size: 27px;
}

.admin-subtitle {
    font-size: 13px;
    color: #64746b;
    margin-bottom: 5px;
}

.admin-role-badge {
    padding: 9px 14px;
    border-radius: 30px;
    background: #dcfce7;
    color: #166534;
    font-weight: 700;
    font-size: 12px;
}

/* STAT CARDS */

.admin-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-bottom: 28px;
}

.admin-stat-card {
    background: white;
    padding: 23px;
    border-radius: 17px;
    border: 1px solid #e5e7eb;
}

.stat-icon {
    display: inline-flex;
    font-size: 25px;
    margin-bottom: 18px;
}

.admin-stat-card p {
    color: #64746b;
    font-size: 13px;
    margin-bottom: 9px;
}

.admin-stat-card h2 {
    font-size: 32px;
    color: #166534;
    margin-bottom: 7px;
}

.admin-stat-card small {
    color: #94a3b8;
    font-size: 11px;
}

/* SECTIONS */

.admin-section {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 26px;
    margin-bottom: 25px;
}

.admin-section-heading {
    margin-bottom: 22px;
}

.admin-section-heading h2 {
    font-size: 20px;
    margin-bottom: 5px;
}

.admin-section-heading p {
    color: #64746b;
    font-size: 13px;
}

/* ENGAGEMENT */

.admin-engagement-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.admin-engagement-card {
    background: #f8faf9;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 22px;
}

.admin-engagement-card span {
    color: #64746b;
    font-size: 13px;
}

.admin-engagement-card strong {
    display: block;
    color: #166534;
    font-size: 29px;
    margin: 12px 0;
}

.admin-engagement-card p {
    color: #94a3b8;
    font-size: 12px;
}

/* TABLES */

.admin-table-wrapper {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.admin-table th {
    color: #64746b;
    font-size: 12px;
    padding: 14px 12px;
    border-bottom: 1px solid #e5e7eb;
}

.admin-table td {
    font-size: 13px;
    padding: 15px 12px;
    border-bottom: 1px solid #f1f5f9;
}

.admin-table tr:last-child td {
    border-bottom: none;
}

/* UNIVERSITY ACTIVITY */

.admin-university-list {
    display: grid;
    gap: 12px;
}

.admin-university-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f8faf9;
    border-radius: 10px;
    font-size: 14px;
}

.admin-university-item strong {
    color: #166534;
}

/* ACCESS MESSAGE */

.admin-access-message {
    padding: 60px 20px;
    text-align: center;
    color: #64746b;
    font-size: 16px;
}

/* MOBILE */

.admin-menu-toggle {
    display: none;
}

@media (max-width: 1100px) {
    .admin-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 850px) {
    .admin-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        z-index: 100;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
    }

    .admin-sidebar.open {
        transform: translateX(0);
    }

    .admin-menu-toggle {
        display: block;
        background: white;
        border: 1px solid #e5e7eb;
        border-radius: 9px;
        width: 43px;
        height: 43px;
        font-size: 20px;
        cursor: pointer;
    }

    .admin-main {
        padding: 22px 18px 40px;
    }

    .admin-topbar h1 {
        font-size: 21px;
    }
}

@media (max-width: 600px) {
    .admin-stats {
        grid-template-columns: 1fr;
    }

    .admin-engagement-grid {
        grid-template-columns: 1fr;
    }

    .admin-section {
        padding: 18px;
    }

    .admin-role-badge {
        display: none;
    }
}
/* ======================================
   ADMIN WEBSITE TRAFFIC CHART
====================================== */

.admin-chart-container {
    position: relative;
    width: 100%;
    height: 350px;
    padding: 10px 0;
}

@media (max-width: 600px) {
    .admin-chart-container {
        height: 280px;
    }
}
/* MOST VISITED STOREFRONTS */

.admin-store-link {
    display: inline-block;
    padding: 8px 12px;
    background: #dcfce7;
    color: #166534;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.admin-store-link:hover {
    background: #bbf7d0;
}

#adminTopStorefronts tr:first-child td:first-child {
    color: #ca8a04;
    font-weight: 800;
}

#adminTopStorefronts tr:nth-child(2) td:first-child {
    color: #64748b;
    font-weight: 800;
}

#adminTopStorefronts tr:nth-child(3) td:first-child {
    color: #b45309;
    font-weight: 800;
}
/* PROMOTION PAYMENT APPROVAL */

.admin-approve-btn {
    padding: 9px 15px;
    background: #166534;
    color: white;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
}

.admin-approve-btn:hover {
    background: #14532d;
}

.admin-approve-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}