/* =========================================
   DASHBOARD GRID
========================================= */

.dashboard-grid {
    display: grid;

    grid-template-columns:
        repeat(auto-fit, minmax(220px, 1fr));

    gap: 25px;

    margin-bottom: 35px;
}

/* =========================================
   DASHBOARD CARD
========================================= */

.dashboard-card {
    background: white;

    padding: 30px;

    border-radius: 24px;

    box-shadow:
        0 10px 30px rgba(15, 23, 42, 0.06);

    transition: 0.25s ease;

    position: relative;

    overflow: hidden;
}

.dashboard-card:hover {
    transform: translateY(-4px);

    box-shadow:
        0 14px 35px rgba(15, 23, 42, 0.12);
}

.dashboard-card span {
    font-size: 34px;

    display: block;

    margin-bottom: 16px;
}

.dashboard-card h3 {
    color: #64748b;

    margin-bottom: 14px;

    font-size: 15px;

    font-weight: 600;
}

.dashboard-card h2 {
    font-size: 38px;

    color: #0f172a;

    font-weight: 800;
}

/* =========================================
   OPERATIONS HERO
========================================= */

.operations-hero {
    background:
        linear-gradient(135deg,
            #0f172a,
            #14532d);

    color: white;

    border-radius: 30px;

    padding: 40px;

    margin-bottom: 35px;

    display: flex;

    justify-content: space-between;

    gap: 40px;

    flex-wrap: wrap;

    align-items: center;
}

.operations-hero-left {
    flex: 1;

    min-width: 280px;
}

.operations-hero-left h1 {
    font-size: 42px;

    margin-bottom: 18px;

    line-height: 1.1;
}

.operations-hero-left p {
    line-height: 1.7;

    opacity: 0.92;

    max-width: 700px;
}

.operations-hero-right {
    text-align: center;
}

.operations-hero-right img {
    width: 110px;

    margin-bottom: 18px;
}

.operations-hero-right h3 {
    margin-bottom: 8px;
}

/* =========================================
   QUICK LINKS
========================================= */

.operations-quick-links {
    display: flex;

    gap: 14px;

    flex-wrap: wrap;

    margin-top: 28px;
}

.operations-quick-links a {
    text-decoration: none;

    color: white;

    padding: 12px 20px;

    border-radius: 999px;

    background:
        rgba(255, 255, 255, 0.12);

    border:
        1px solid rgba(255, 255, 255, 0.15);

    font-weight: 700;

    transition: 0.25s ease;
}

.operations-quick-links a:hover {
    background:
        rgba(255, 255, 255, 0.22);
}

/* =========================================
   OPERATIONS GRID
========================================= */

.operations-grid {
    display: grid;

    grid-template-columns:
        repeat(auto-fit, minmax(320px, 1fr));

    gap: 25px;

    margin-bottom: 35px;
}

/* =========================================
   OPERATIONS PANEL
========================================= */

.operations-panel {
    background: white;

    border-radius: 24px;

    padding: 30px;

    box-shadow:
        0 10px 30px rgba(15, 23, 42, 0.05);
}

.operations-panel h3 {
    margin-bottom: 22px;

    color: #0f172a;
}

/* =========================================
   OPERATIONS ACTIONS
========================================= */

.operations-actions {
    display: flex;

    gap: 14px;

    flex-wrap: wrap;
}

.operations-actions button {
    border: none;

    background:
        linear-gradient(135deg,
            #14532d,
            #166534);

    color: white;

    padding: 14px 20px;

    border-radius: 14px;

    cursor: pointer;

    font-weight: 700;

    transition: 0.25s ease;
}

.operations-actions button:hover {
    transform: translateY(-2px);

    opacity: 0.95;
}

/* =========================================
   SYSTEM STATUS
========================================= */

.system-status-grid {
    display: grid;

    grid-template-columns:
        repeat(auto-fit, minmax(220px, 1fr));

    gap: 18px;
}

.system-status-card {
    background:
        #f8fafc;

    border-radius: 18px;

    padding: 20px;

    display: flex;

    justify-content: space-between;

    align-items: center;
}

.system-status-card strong {
    color: #0f172a;
}

.system-status-card span {
    font-weight: 700;
}

/* =========================================
   ADMIN LOADING
========================================= */

.admin-loading {
    padding: 60px;

    text-align: center;

    color: #64748b;

    font-weight: 700;
}

/* =========================================
   ADMIN ERROR
========================================= */

.admin-error-card {
    background: #fff;

    border-radius: 24px;

    padding: 40px;

    text-align: center;

    box-shadow:
        0 10px 30px rgba(15, 23, 42, 0.06);
}

.admin-error-card h3 {
    color: #b91c1c;

    margin-bottom: 12px;
}

/* =========================================
   RESPONSIVE
========================================= */

@media (max-width: 768px) {

    .operations-hero {
        padding: 30px;
    }

    .operations-hero-left h1 {
        font-size: 32px;
    }

    .operations-actions {
        flex-direction: column;
    }

    .operations-actions button {
        width: 100%;
    }

}

/* ================================
   ADMIN CONTROL CENTER UPGRADE
================================ */

.admin-command-header {
    background: linear-gradient(135deg, #07152f, #0f2f4a);
    color: #ffffff;
    border-radius: 24px;
    padding: 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    box-shadow: 0 18px 45px rgba(7, 21, 47, 0.25);
}

.admin-command-header h1 {
    margin: 8px 0;
    font-size: 32px;
}

.admin-command-header p {
    margin: 0;
    color: #cbd5e1;
}

.admin-app-label {
    display: inline-block;
    background: rgba(0, 194, 122, 0.18);
    color: #7dffca;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1px;
}

.admin-store-switch-btn {
    background: #00c27a;
    color: #07152f;
    text-decoration: none;
    padding: 12px 18px;
    border-radius: 14px;
    font-weight: 800;
    white-space: nowrap;
}

.admin-control-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-top: 24px;
}

.admin-control-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-left: 6px solid #07152f;
    border-radius: 20px;
    padding: 20px;
    text-decoration: none;
    color: #0f172a;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
    transition: 0.2s ease;
}

.admin-control-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 35px rgba(15, 23, 42, 0.14);
    border-left-color: #00c27a;
}

.admin-control-card strong {
    display: block;
    font-size: 17px;
    margin-bottom: 8px;
}

.admin-control-card span {
    display: block;
    color: #64748b;
    font-size: 14px;
    line-height: 1.5;
}

@media (max-width: 900px) {
    .admin-command-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .admin-control-grid {
        grid-template-columns: 1fr;
    }

    .admin-store-switch-btn {
        width: 100%;
        text-align: center;
    }
}

/* =====================================================
   INVOICE MODAL
===================================================== */

.invoice-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.7);
    padding: 40px;
    overflow-y: auto;
}

.invoice-modal.active {
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.invoice-box {
    position: relative;
    width: 100%;
    max-width: 900px;
    background: #ffffff;
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.invoice-close-btn {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    background: #005f2f;
    color: #ffffff;
    font-size: 18px;
    cursor: pointer;
}

.invoice-actions {
    margin-top: 24px;
    display: flex;
    justify-content: flex-end;
}

.loading-text {
    text-align: center;
    padding: 40px;
    color: #64748b;
}

.admin-control-card-group {
    display: contents;
}