/* =========================================
   SERIOUS STORE - ADMIN DASHBOARD
   Cocok dengan admin.html dan admin.js
========================================= */

body.admin-page {
    background: #f5f8f6;
    color: #26332c;
    font-family: Arial, Helvetica, sans-serif;
    min-height: 100vh;
}

/* ---------- Navbar atas ---------- */

.admin-navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    height: 64px;
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #123d2b;
    color: white;
}

.admin-logo {
    color: white;
    font-size: 21px;
    font-weight: bold;
    letter-spacing: 1px;
    text-decoration: none;
}

.admin-account {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 14px;
}

.logout-button,
#sidebarLogoutButton {
    padding: 9px 16px;
    background: #e85b5b;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
}

.logout-button:hover,
#sidebarLogoutButton:hover {
    background: #d64545;
}

/* ---------- Layout ---------- */

.admin-layout {
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
    min-height: calc(100vh - 64px);
}

.admin-sidebar {
    position: sticky;
    top: 64px;
    align-self: start;
    height: calc(100vh - 64px);
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: #0f3324;
}

.admin-sidebar h3 {
    margin-bottom: 12px;
    padding: 0 12px;
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #a8c2b3;
}

.admin-sidebar a {
    display: block;
    padding: 12px;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    text-decoration: none;
}

.admin-sidebar a:hover {
    background: #087e50;
}

.admin-sidebar #sidebarLogoutButton {
    margin-top: auto;
    width: 100%;
}

.admin-main {
    padding: 32px;
    min-width: 0;
}

/* ---------- Judul ---------- */

.admin-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 28px;
}

.admin-heading h1 {
    font-size: 28px;
    margin: 4px 0 8px;
}

.admin-heading p {
    color: #78877e;
    font-size: 14px;
}

.admin-heading .admin-subtitle,
.orders-heading .admin-subtitle {
    color: #087e50;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 2px;
}

.refresh-button {
    padding: 11px 18px;
    background: #087e50;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    white-space: nowrap;
}

.refresh-button:hover {
    background: #06663f;
}

/* ---------- Kartu statistik ---------- */

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 40px;
}

.stat-card {
    padding: 22px;
    background: white;
    border-left: 4px solid #0a9560;
    border-radius: 12px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.05);
}

.stat-card p {
    margin-bottom: 12px;
    font-size: 13px;
    color: #78877e;
}

.stat-card h2 {
    margin: 0;
    font-size: 30px;
    color: #087e50;
}

/* ---------- Data pesanan ---------- */

.orders-section {
    padding: 26px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.05);
}

.orders-heading {
    margin-bottom: 20px;
}

.orders-heading h2 {
    margin-top: 4px;
    font-size: 22px;
}

.admin-message {
    margin-bottom: 14px;
    color: #087e50;
    font-size: 14px;
}

.empty-message {
    padding: 20px 0;
    color: #78877e;
}

.order-card {
    margin-bottom: 16px;
    padding: 20px;
    border: 1px solid #e6eee9;
    border-radius: 10px;
    background: #fff;
}

.order-card h3 {
    margin-bottom: 12px;
    color: #087e50;
}

.order-card h4 {
    margin: 4px 0 8px;
    font-size: 14px;
    color: #26332c;
}

.order-card p {
    margin-bottom: 7px;
    font-size: 14px;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.order-card hr {
    margin: 14px 0;
    border: none;
    border-top: 1px solid #e6eee9;
}

/* ---------- Verifikasi dan status ---------- */

.admin-verification {
    margin-top: 14px;
    padding: 14px;
    background: #fff8e6;
    border: 1px solid #f1e0a8;
    border-radius: 8px;
}

.admin-verification p {
    margin-bottom: 10px;
}

.verify-button,
.reject-button,
.update-button {
    padding: 10px 16px;
    margin-right: 8px;
    color: white;
    border: none;
    border-radius: 7px;
    cursor: pointer;
    font-size: 14px;
}

.verify-button,
.update-button {
    background: #087e50;
}

.verify-button:hover,
.update-button:hover {
    background: #06663f;
}

.reject-button {
    background: #d94b4b;
}

.reject-button:hover {
    background: #c03939;
}

.verify-button:disabled,
.reject-button:disabled,
.update-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.order-status {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.order-status select {
    flex: 1;
    min-width: 180px;
    padding: 10px;
    border: 1px solid #d5e0d9;
    border-radius: 7px;
}

/* ---------- Responsif ---------- */

@media (max-width: 900px) {
    .stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .admin-layout {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        position: static;
        height: auto;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        padding: 12px 16px;
    }

    .admin-sidebar h3 {
        display: none;
    }

    .admin-sidebar .logout-button,
    .admin-sidebar #sidebarLogoutButton {
        margin-top: 0;
        width: auto;
    }

    .admin-main {
        padding: 20px 16px;
    }

    .admin-heading {
        flex-direction: column;
    }

    .admin-navbar {
        padding: 0 16px;
    }

    #adminEmail {
        display: none;
    }
}

@media (max-width: 480px) {
    .stat-grid {
        grid-template-columns: 1fr;
    }
}