:root { --bs-primary: #235c49; --bs-primary-rgb: 35,92,73; }
body { background: #f5f7f8; color: #263632; }
.brand { letter-spacing: .045em; color: #235c49; }
.brand-mark { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 8px; background: #235c49; color: white; margin-right: 8px; }
.navbar { min-height: 70px; }
.panel-shell { display: grid; grid-template-columns: 230px minmax(0,1fr); min-height: calc(100vh - 70px); }
.sidebar { padding: 32px 16px; }
.sidebar .nav-link { color: #486058; padding: 12px 16px; }
.sidebar .nav-link.active { background: #e8f1ed; color: #174c39; font-weight: 600; }
.main-content { padding: 32px; min-width: 0; }
.public-shell { max-width: 1120px; margin: auto; }
.btn-primary { --bs-btn-bg:#235c49; --bs-btn-border-color:#235c49; --bs-btn-hover-bg:#194535; --bs-btn-hover-border-color:#194535; --bs-btn-active-bg:#194535; }
a { color: #235c49; }
h1 { font-size: 1.75rem; font-weight: 650; }
.page-heading { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; flex-wrap: wrap; margin-bottom: 24px; }
.card { border-color: #e0e7e3; border-radius: 10px; box-shadow: 0 2px 6px #18392b04; }
.stat-value { font-size: 2.2rem; font-weight: 650; }
.table > :not(caption) > * > * { padding: 14px 16px; vertical-align: middle; }
.table thead th { background: #f8faf9; color: #63736c; font-size: .78rem; font-weight: 600; white-space: nowrap; }
.table .actions { white-space: nowrap; }
.field-validation-error, .validation-summary-errors { color: #b02a37; font-size: .875rem; }
.input-validation-error { border-color: #dc3545; }
.login-card { max-width: 440px; margin: 6vh auto; }
.form-card { max-width: 900px; }
@media (max-width: 991.98px) { .panel-shell { display: block; } .sidebar { padding: 16px; border-bottom: 1px solid #e0e7e3; } .main-content { padding: 24px 16px; } }
@media (max-width: 575.98px) { .brand { font-size: 1rem; } h1 { font-size: 1.5rem; } .login-card { margin: 16px auto; } }

/* Product/order screens share the existing Bootstrap panel. */
.order-number { overflow-wrap: anywhere; font-size: .82rem; }
.commerce-table { min-width: 850px; }
.commerce-table th:first-child { width: 23%; }
.commerce-table th:last-child { width: 30%; }
.order-entry { min-width: 880px; }
.order-entry th:first-child { width: 35%; }
.order-entry th:nth-child(2) { width: 140px; }
.order-totals { min-width: 275px; max-width: 100%; }
.order-totals > div { display: flex; justify-content: space-between; gap: 2rem; }
.order-totals dt { font-weight: 500; }
.order-totals dd { font-variant-numeric: tabular-nums; text-align: right; }

.validation-summary-valid { display: none; }
@media (max-width: 767.98px) {
    .order-entry { display: block; min-width: 0; }
    .order-entry thead { display: none; }
    .order-entry tbody { display: block; }
    .order-entry .order-row { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); border-bottom: 1px solid #e0e7e3; }
    .order-entry td { display: block; border: 0; padding: 10px 16px; min-width: 0; }
    .order-entry td:first-child, .order-entry td:last-child { grid-column: 1 / -1; }
    .order-entry td:last-child { text-align: right; }
    .order-entry td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 6px; font-size: .75rem; color: #63736c; }
}
