@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=DM+Serif+Display&display=swap');

:root {
    --background: #f7f5f0;
    --surface: #ffffff;
    --text: #252823;
    --muted: #6d7068;
    --olive: #626d4c;
    --olive-dark: #424d35;
    --border: #e6e5de;
    --soft: #f0f1e9;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--background);
    color: var(--text);
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    line-height: 1.6;
}

h1,
h2 {
    font-family: 'DM Serif Display', serif;
    font-weight: 400;
}

.site-header {
    background: var(--text);
    color: white;
    padding: 55px 24px 48px;
}

.header-content,
.nav-content,
.dashboard {
    max-width: 1120px;
    margin: 0 auto;
}

.eyebrow {
    margin: 0 0 10px;
    color: #c8d0b6;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
}

.site-header h1 {
    margin: 0;
    font-size: 43px;
    line-height: 1.2;
}

.header-subtitle {
    margin: 12px 0 0;
    color: #d1d2cc;
    font-size: 15px;
}

.main-nav {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.nav-content {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
    padding: 0 24px;
}

.main-nav a {
    display: inline-block;
    padding: 17px 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 2px solid transparent;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--olive-dark);
    border-bottom-color: var(--olive);
}

.dashboard {
    padding: 46px 24px 65px;
}

.welcome {
    margin-bottom: 30px;
}

.section-label {
    margin: 0 0 8px;
    color: var(--olive);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.6px;
}

.welcome h2 {
    margin: 0 0 10px;
    font-size: 35px;
}

.welcome > p:last-child {
    max-width: 680px;
    margin: 0;
    color: var(--muted);
}

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

.stat-card {
    min-width: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 23px;
}

.card-top {
    margin-bottom: 14px;
}

.card-label {
    color: var(--olive);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
}

.stat-card h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
}

.stat-number {
    margin: 10px 0 8px;
    font-family: 'DM Serif Display', serif;
    font-size: 34px;
    line-height: 1.2;
    color: var(--text);
}

.card-description {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
}

.dashboard-section {
    margin-bottom: 24px;
    padding: 28px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.section-heading h2 {
    margin: 0;
    font-size: 27px;
}

.section-tag {
    display: inline-block;
    flex-shrink: 0;
    padding: 6px 12px;
    border-radius: 30px;
    background: var(--soft);
    color: var(--olive-dark);
    font-size: 11px;
    font-weight: 700;
}

.section-description {
    max-width: 760px;
    margin: 13px 0 22px;
    color: var(--muted);
    font-size: 14px;
}

.placeholder {
    padding: 30px;
    background: #f9f9f6;
    border: 1px dashed #d8dccf;
    border-radius: 8px;
    color: var(--muted);
    font-size: 13px;
    text-align: center;
}

/* Shared database tables */

.inventory-table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 9px;
}

.inventory-table {
    width: 100%;
    min-width: 680px;
    border-collapse: collapse;
    background: var(--surface);
    font-size: 13px;
}

.inventory-table thead {
    background: var(--soft);
}

.inventory-table th {
    padding: 15px 16px;
    color: var(--olive-dark);
    font-size: 11px;
    font-weight: 700;
    text-align: left;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.inventory-table td {
    padding: 15px 16px;
    border-top: 1px solid var(--border);
    color: var(--text);
    vertical-align: middle;
}

.inventory-table tbody tr:hover {
    background: #fafbf7;
}

.inventory-item-name {
    font-weight: 600;
}

.inventory-status {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.status-in-stock {
    background: #eaf1e5;
    color: #42623b;
}

.status-low-stock {
    background: #fce9e6;
    color: #a33e32;
}

.status-neutral {
    background: #f1f0eb;
    color: #67675f;
}

.empty-inventory {
    padding: 30px !important;
    text-align: center;
    color: var(--muted) !important;
}

.inventory-note {
    margin: 14px 0 0;
    color: var(--muted);
    font-size: 12px;
}

/* Purchasing, menu and catering summaries */

.purchasing-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    padding: 19px 22px;
    margin-bottom: 20px;
    background: var(--soft);
    border-radius: 9px;
}

.purchasing-summary > div {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.purchasing-summary-label {
    color: var(--olive-dark);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
}

.purchasing-summary strong {
    color: var(--text);
    font-family: 'DM Serif Display', serif;
    font-size: 26px;
    font-weight: 400;
}

.purchasing-table {
    min-width: 950px;
}

.purchasing-table td {
    white-space: nowrap;
}

.purchasing-table td:first-child {
    white-space: normal;
    min-width: 170px;
}

.purchase-amount {
    font-weight: 700;
    color: var(--olive-dark) !important;
}

/* Catering report */

.catering-table {
    min-width: 1000px;
}

.catering-table td {
    white-space: nowrap;
}

.catering-table td:first-child {
    font-weight: 600;
}

.catering-table td:nth-child(4) {
    white-space: normal;
    min-width: 135px;
}

/* Footer */

footer {
    padding: 27px 24px;
    background: var(--text);
    color: #d4d5ce;
    text-align: center;
    font-size: 12px;
}

footer p {
    margin: 4px 0;
}

footer span {
    padding: 0 5px;
    color: #92988a;
}

/* Responsive layout */

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

@media (max-width: 600px) {
    .site-header {
        padding: 38px 20px;
    }

    .site-header h1 {
        font-size: 33px;
    }

    .nav-content {
        gap: 20px;
        padding: 0 20px;
    }

    .dashboard {
        padding: 32px 16px 45px;
    }

    .dashboard-cards {
        grid-template-columns: 1fr;
    }

    .dashboard-section {
        padding: 21px;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .section-heading h2 {
        font-size: 25px;
    }
}