:root {
    --brand: #087f72;
    --brand-dark: #05665c;
    --ink: #263b38;
    --muted: #667773;
    --line: #dce5e2;
    --surface: #f4f8f6;
}
html { background: #fff; }
body { color: var(--ink); font-family: "Trebuchet MS", Verdana, sans-serif; letter-spacing: 0; }
a { text-underline-offset: 4px; }
input, select, textarea, button { font: inherit; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.brand-link { display: inline-flex; align-items: center; text-decoration: none; flex-shrink: 0; }
.brand-link img { width: 210px; height: 48px; max-width: 100%; object-fit: contain; }
.header-user-info { gap: 24px; padding: 12px 0 20px !important; margin-bottom: 0 !important; min-height: 64px !important; }
.header-user-info .brand-link { order: -1; margin-right: auto; }
.header-user-info > div { min-width: 0; }
.header-user-info > div > div { overflow-wrap: anywhere; }
.header-user-info .user-action { border: 1px solid var(--line); background: #fff; color: var(--muted); border-radius: 6px; box-shadow: none; }
.header-user-info .user-action:hover { background: var(--surface); color: var(--brand); border-color: var(--brand); }
.nav { justify-content: center; gap: 8px; border-bottom: 1px solid var(--line); padding: 4px 0 0; margin-bottom: 28px; }
.nav .nav-btn { position: relative; flex: 0 1 auto; min-height: 48px; padding: 12px 17px; border: 0; border-radius: 0; color: var(--muted); background: transparent; box-shadow: none; font-size: 14px; font-weight: 600; transform: none; }
.nav .nav-btn:hover { color: var(--brand); background: var(--surface); border-color: transparent; box-shadow: none; transform: none; }
.nav .nav-btn.active { color: var(--brand-dark); background: transparent; border-color: transparent; }
.nav .nav-btn.active::after { content: ""; position: absolute; height: 3px; background: var(--brand); bottom: -1px; left: 17px; right: 17px; border-radius: 2px 2px 0 0; }
.nav .nav-btn:focus-visible { outline-color: var(--brand); }
.nav .nav-btn { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; }
.superadmin-page .header { flex-wrap: wrap; gap: 20px; }
.superadmin-page .header > div:first-child { flex-wrap: wrap; min-width: 0; }
.superadmin-page .header h1 { font-size: 22px; overflow-wrap: anywhere; }
.superadmin-page .container > .brand-link { margin-bottom: 12px; }
.superadmin-page input { max-width: 100%; box-sizing: border-box; }
.stats-grid { gap: 24px; border-block: 1px solid var(--line); padding: 20px 0; }
.dashboard-workspace { border: 1px solid #cbd8d3; border-radius: 8px; padding: 24px; margin-bottom: 28px; min-width: 0; }
.dashboard-workspace > h2 { margin-top: 0; }
.dashboard-workspace .upload-form { border: 0; margin-bottom: 0; padding: 0; }
.stat-card, .inventory-card { background: transparent !important; color: var(--ink); border-radius: 0; padding: 4px 0; box-shadow: none; min-width: 0; flex: 1 1 220px; align-items: flex-start; box-sizing: border-box; }
.stat-value { color: var(--brand-dark); font-size: 28px; }
.stat-label { color: var(--muted); }
.inventory-header, .inventory-item, .inventory-details-mobile { border-color: var(--line); }
.inventory-list { border: 1px solid #cbd8d3; border-radius: 6px; padding: 6px 12px; box-sizing: border-box; }
.inventory-details-mobile .location-item { color: var(--muted); }
.inventory-main-row { gap: 12px; }
.inventory-main-row > span { overflow-wrap: anywhere; min-width: 0; }
.upload-form { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 0 0 24px; box-shadow: none; }
.upload-form button[type="submit"], .form-group button { background: var(--brand); box-shadow: none; border-radius: 6px; }
.upload-form button[type="submit"]:hover, .form-group button:hover { background: var(--brand-dark); transform: none; box-shadow: none; }
.welcome-card-small { background: var(--surface); color: var(--ink); border-radius: 6px; box-shadow: none; min-width: 0; }
.welcome-card-small h3 { border-color: var(--line); }
.welcome-card-small label { color: var(--muted); }
.welcome-card-small textarea { background: white; border: 1px solid var(--line); }
.welcome-card-small button { background: var(--brand); color: white; border-color: var(--brand); }
.welcome-card-small button:hover { background: var(--brand-dark); }
body.auth-page { width: auto; max-width: 400px; padding: 44px 24px 24px; margin: 0 auto; min-height: 100vh; box-sizing: content-box; display: block; background: linear-gradient(180deg, #f4f8f6 0, #fff 260px); }
html:has(.auth-page) { background: linear-gradient(180deg, #f4f8f6 0, #fff 260px); }
.auth-brand { display: flex; justify-content: center; padding: 8px 0 36px; }
.auth-brand .brand-link img { width: 245px; height: 56px; }
.auth-page h2 { font-size: 26px; line-height: 1.25; font-weight: 600; color: var(--ink); margin: 0 0 28px; }
.auth-page form > label { display: block; font-size: 13px; font-weight: 600; margin-top: 16px; }
.auth-page input { min-height: 46px; border: 1px solid var(--line); background: #fff; border-radius: 6px; margin: 8px 0 0; }
.auth-page input:focus { border-color: var(--brand); }
.auth-page button { background: var(--brand); border-radius: 6px; min-height: 46px; box-shadow: none; margin-top: 24px; }
.auth-page button:hover { background: var(--brand-dark); transform: none; box-shadow: none; }
.auth-page .secondary-btn { background: transparent; border-color: transparent; color: var(--brand-dark); padding: 8px 0; }
.auth-page .secondary-btn:hover { background: var(--surface); }
.auth-page .footer { color: var(--muted); border-color: var(--line); margin-top: 36px; }
.history-pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin: 16px 0 28px; }
.history-pagination a, .history-pagination span { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 36px; padding: 0 4px; box-sizing: border-box; border: 1px solid var(--line); border-radius: 4px; text-decoration: none; color: var(--brand-dark); }
.history-pagination a:hover { background: var(--surface); }
.history-pagination [aria-current="page"] { background: var(--brand); color: white; border-color: var(--brand); }
.history-pagination [aria-disabled="true"] { color: #879590; background: #f8faf9; }
.buyer-history h2 { overflow-wrap: anywhere; }
@media (max-width: 600px) {
    body.buyer-history { margin: 0 auto; padding: 10px; width: 100%; box-sizing: border-box; }
    .buyer-history .header-user-info > div { justify-content: center; }
    .buyer-history .product-list { grid-template-columns: minmax(0, 1fr); }
    .dashboard-workspace { padding: 16px; }
    .stat-card, .inventory-card { flex: 0 1 auto; }
    .header-user-info { flex-direction: column; gap: 16px !important; padding-top: 8px !important; }
    .header-user-info .brand-link { margin: 0 auto; }
    .header-user-info > div { flex-wrap: wrap; gap: 12px !important; }
    .nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; }
    .nav .nav-btn { font-size: 12px; padding: 10px 8px; min-height: 44px; }
    .nav .nav-btn.active::after { left: 8px; right: 8px; }
    body.auth-page { width: auto; max-width: 400px; min-height: 100vh; padding: 28px 20px 20px; box-sizing: border-box; }
    .auth-brand { padding-bottom: 28px; }
    .auth-page .links-container { flex-direction: row; flex-wrap: wrap; }
}