* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-main: #07111f;
    --bg-sidebar: #0b1626;
    --bg-card: #101d2e;
    --bg-card-hover: #14243a;

    --gold: #d6b36a;
    --gold-soft: #b99a5d;

    --text-main: #f5f7fa;
    --text-muted: #8f9bad;

    --border: rgba(255, 255, 255, 0.07);

    --radius: 18px;
}

body {
    font-family: "Poppins", sans-serif;
    background: var(--bg-main);
    color: var(--text-main);
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}

.app {
    display: flex;
    min-height: 100vh;
}

/* SIDEBAR */

.sidebar {
    width: 260px;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    padding: 28px 20px;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
}

.sidebar-logo {
    margin-bottom: 38px;
}

.sidebar-logo h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: -0.5px;
}

.sidebar-logo span {
    display: block;
    margin-top: 3px;
    font-size: 11px;
    color: var(--text-muted);
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.menu-item {
    padding: 13px 15px;
    border-radius: 12px;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    transition: 0.25s ease;
}

.menu-item:hover {
    background: var(--bg-card-hover);
    color: var(--text-main);
}

.menu-item.active {
    background: rgba(214, 179, 106, 0.12);
    color: var(--gold);
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.sidebar-footer p {
    font-size: 10px;
    color: var(--text-muted);
}

/* MAIN */

.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 30px;
}

/* TOPBAR */

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 34px;
}

.topbar-left h1 {
    font-size: 26px;
    font-weight: 600;
}

.topbar-left p {
    margin-top: 4px;
    font-size: 13px;
    color: var(--text-muted);
}

.user-profile {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px 15px;
    font-size: 13px;
    color: var(--gold);
}

/* DASHBOARD */

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
}

.dashboard-header h2 {
    font-size: 18px;
    font-weight: 600;
}

.dashboard-header p {
    margin-top: 4px;
    font-size: 12px;
    color: var(--text-muted);
}

/* SUMMARY */

.summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 24px;
}

.summary-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    transition: 0.25s ease;
}

.summary-card:hover {
    transform: translateY(-3px);
    background: var(--bg-card-hover);
}

.summary-card p {
    font-size: 12px;
    color: var(--text-muted);
}

.summary-card h3 {
    margin: 10px 0 4px;
    font-size: 30px;
    font-weight: 600;
    color: var(--text-main);
}

.summary-card span {
    font-size: 11px;
    color: var(--gold-soft);
}

/* DASHBOARD PANELS */

.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 18px;
}

.dashboard-panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    min-height: 280px;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.panel-header h3 {
    font-size: 15px;
    font-weight: 600;
}

.panel-header a {
    font-size: 11px;
    color: var(--gold);
}

.empty-state {
    height: 190px;
    border: 1px dashed rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-state p {
    font-size: 12px;
    color: var(--text-muted);
}



/* =========================
   PAGE NAVIGATION
========================= */

.page {
    display: none;
}

.page.active {
    display: block;
}


/* =========================
   MODULE HEADER
========================= */

.module-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 22px;
}

.module-header h2 {
    font-size: 18px;
    font-weight: 600;
}

.module-header p {
    margin-top: 4px;
    font-size: 12px;
    color: var(--text-muted);
}


/* =========================
   BUTTON
========================= */

.primary-btn {
    border: none;
    outline: none;
    cursor: pointer;

    background: var(--gold);
    color: #07111f;

    padding: 11px 18px;
    border-radius: 11px;

    font-family: inherit;
    font-size: 12px;
    font-weight: 600;

    transition: 0.2s ease;
}

.primary-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}


/* =========================
   MODULE CARD
========================= */

.module-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}


/* =========================
   TOOLBAR
========================= */

.module-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;

    padding: 18px 20px;

    border-bottom: 1px solid var(--border);
}

.search-box {
    flex: 1;
    max-width: 360px;
}

.search-box input,
.toolbar-right select {
    width: 100%;

    background: #0c1828;
    color: var(--text-main);

    border: 1px solid var(--border);
    border-radius: 10px;

    padding: 10px 13px;

    outline: none;

    font-family: inherit;
    font-size: 11px;
}

.search-box input::placeholder {
    color: #68758a;
}

.search-box input:focus,
.toolbar-right select:focus {
    border-color: rgba(214, 179, 106, 0.4);
}

.toolbar-right {
    display: flex;
    gap: 10px;
}

.toolbar-right select {
    min-width: 145px;
}


/* =========================
   TABLE
========================= */

.table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.inventory-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 850px;
}

.inventory-table th {
    text-align: left;

    padding: 14px 20px;

    font-size: 10px;
    font-weight: 500;

    color: var(--text-muted);

    background: rgba(255, 255, 255, 0.015);

    border-bottom: 1px solid var(--border);
}

.inventory-table td {
    padding: 17px 20px;

    font-size: 11px;

    border-bottom: 1px solid var(--border);

    color: #dbe2eb;
}

.inventory-table tbody tr:last-child td {
    border-bottom: none;
}

.inventory-table tbody tr:not(.empty-table-row):hover {
    background: rgba(255, 255, 255, 0.018);
}


/* =========================
   EMPTY TABLE
========================= */

.table-empty-state {
    min-height: 240px;

    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    text-align: center;
    gap: 7px;
}

.table-empty-state strong {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-main);
}

.table-empty-state span {
    font-size: 10px;
    color: var(--text-muted);
}




/* TABLET */

@media (max-width: 1100px) {
    .summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

/* MOBILE */

@media (max-width: 768px) {
    .sidebar {
        display: none;
    }

    .main-content {
        margin-left: 0;
        padding: 20px 16px;
    }

    .topbar {
        align-items: flex-start;
    }

    .topbar-left h1 {
        font-size: 22px;
    }

    .summary-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .summary-card {
        padding: 17px;
    }

    .summary-card h3 {
        font-size: 25px;
    }
    
    .module-header {
    align-items: flex-end;
}

.module-toolbar {
    flex-direction: column;
    align-items: stretch;
}

.search-box {
    max-width: none;
}

.toolbar-right {
    width: 100%;
}

.toolbar-right select {
    flex: 1;
    min-width: 0;
}


.form-grid {
    grid-template-columns: 1fr;
}

.form-group-full {
    grid-column: auto;
}

.modal-box {
    max-height: 90vh;
    overflow-y: auto;
}

}
    

@media (max-width: 480px) {
    .summary-grid {
        grid-template-columns: 1fr;
    }
}




/* PAGE NAVIGATION */

.page {
    display: none;
}

.page.active {
    display: block;
}



/* =========================
   MODULE HEADER
========================= */

.module-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 22px;
}

.module-header h2 {
    font-size: 18px;
    font-weight: 600;
}

.module-header p {
    margin-top: 4px;
    font-size: 12px;
    color: var(--text-muted);
}


/* =========================
   BUTTONS
========================= */

.primary-btn {
    border: none;
    outline: none;
    cursor: pointer;

    background: var(--gold);
    color: #07111f;

    padding: 11px 18px;

    border-radius: 11px;

    font-family: inherit;
    font-size: 12px;
    font-weight: 600;

    transition: 0.2s ease;
}

.primary-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}


/* =========================
   MODULE CARD
========================= */

.module-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}


/* =========================
   TOOLBAR
========================= */

.module-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 16px;

    padding: 18px 20px;

    border-bottom: 1px solid var(--border);
}

.search-box {
    flex: 1;
    max-width: 360px;
}

.search-box input,
.toolbar-right select {
    width: 100%;

    background: #0c1828;
    color: var(--text-main);

    border: 1px solid var(--border);

    border-radius: 10px;

    padding: 10px 13px;

    outline: none;

    font-family: inherit;
    font-size: 11px;
}

.search-box input::placeholder {
    color: #68758a;
}

.search-box input:focus,
.toolbar-right select:focus {
    border-color: rgba(214, 179, 106, 0.4);
}

.toolbar-right {
    display: flex;
    gap: 10px;
}

.toolbar-right select {
    min-width: 145px;
}


/* =========================
   TABLE
========================= */

.table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.inventory-table {
    width: 100%;

    border-collapse: collapse;

    min-width: 850px;
}

.inventory-table th {
    text-align: left;

    padding: 14px 20px;

    font-size: 10px;
    font-weight: 500;

    color: var(--text-muted);

    background: rgba(255, 255, 255, 0.015);

    border-bottom: 1px solid var(--border);
}

.inventory-table td {
    padding: 17px 20px;

    font-size: 11px;

    border-bottom: 1px solid var(--border);

    color: #dbe2eb;
}

.inventory-table tbody tr:last-child td {
    border-bottom: none;
}

.inventory-table tbody tr:not(.empty-table-row):hover {
    background: rgba(255, 255, 255, 0.018);
}


/* =========================
   EMPTY TABLE
========================= */

.table-empty-state {
    min-height: 240px;

    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    text-align: center;

    gap: 7px;
}

.table-empty-state strong {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-main);
}

.table-empty-state span {
    font-size: 10px;
    color: var(--text-muted);
}



/* =========================
   MODAL
========================= */

.modal-overlay {
    position: fixed;
    inset: 0;

    background: rgba(2, 8, 17, 0.78);

    display: none;
    align-items: center;
    justify-content: center;

    padding: 20px;

    z-index: 9999;

    backdrop-filter: blur(5px);
}

.modal-overlay.active {
    display: flex;
}

.modal-box {
    width: 100%;
    max-width: 560px;

    background: #0e1a2b;

    border: 1px solid var(--border);
    border-radius: 20px;

    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);

    overflow: hidden;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;

    gap: 20px;

    padding: 22px 24px;

    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.modal-header p {
    margin-top: 4px;

    font-size: 10px;

    color: var(--text-muted);
}

.modal-close {
    width: 34px;
    height: 34px;

    border: 1px solid var(--border);
    border-radius: 9px;

    background: #101f32;
    color: var(--text-muted);

    cursor: pointer;

    font-family: inherit;
    font-size: 20px;

    display: flex;
    align-items: center;
    justify-content: center;

    transition: 0.2s ease;
}

.modal-close:hover {
    color: var(--text-main);
    border-color: rgba(214, 179, 106, 0.35);
}


/* =========================
   FORM
========================= */

#product-form {
    padding: 24px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);

    gap: 18px;
}

.form-group {
    display: flex;
    flex-direction: column;

    gap: 7px;
}

.form-group-full {
    grid-column: 1 / -1;
}

.form-group label {
    font-size: 10px;
    font-weight: 500;

    color: var(--text-muted);
}

.form-group input {
    width: 100%;

    border: 1px solid var(--border);
    border-radius: 10px;

    background: #091524;
    color: var(--text-main);

    padding: 11px 13px;

    outline: none;

    font-family: inherit;
    font-size: 11px;

    transition: 0.2s ease;
}

.form-group input::placeholder {
    color: #58667a;
}

.form-group input:focus {
    border-color: rgba(214, 179, 106, 0.5);
}


/* =========================
   MODAL FOOTER
========================= */

.modal-footer {
    display: flex;
    justify-content: flex-end;

    gap: 10px;

    margin-top: 24px;
    padding-top: 20px;

    border-top: 1px solid var(--border);
}

.secondary-btn {
    border: 1px solid var(--border);
    outline: none;

    background: #101d2e;
    color: var(--text-muted);

    padding: 11px 18px;

    border-radius: 11px;

    font-family: inherit;
    font-size: 11px;
    font-weight: 500;

    cursor: pointer;
}

.secondary-btn:hover {
    color: var(--text-main);
}


/* =========================
   PRODUCT TABLE DATA
========================= */

.product-name-cell {
    font-weight: 500;
    color: var(--text-main);
}

.stock-number {
    font-weight: 600;
}

.status-badge {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    padding: 5px 9px;

    border-radius: 20px;

    font-size: 9px;
    font-weight: 500;
}

.status-in-stock {
    background: rgba(61, 190, 128, 0.12);
    color: #67d6a1;
}

.status-low-stock {
    background: rgba(214, 179, 106, 0.14);
    color: var(--gold);
}

.status-out-of-stock {
    background: rgba(225, 91, 91, 0.12);
    color: #ef8888;
}

.table-action-btn {
    border: 1px solid var(--border);

    background: transparent;
    color: var(--text-muted);

    padding: 6px 10px;

    border-radius: 8px;

    font-family: inherit;
    font-size: 9px;

    cursor: pointer;

    transition: 0.2s ease;
}

.table-action-btn:hover {
    border-color: rgba(225, 91, 91, 0.35);
    color: #ef8888;
}


.table-actions {
    display: flex;
    align-items: center;
    gap: 7px;
}

.edit-btn:hover {
    color: var(--gold);
    border-color: rgba(214, 179, 106, 0.35);
}

.delete-btn:hover {
    color: #ef8888;
    border-color: rgba(225, 91, 91, 0.35);
}




