:root {
    color-scheme: light;
    font-size: 14px;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #102a27;
    background: #f2f7f6;
}

* { box-sizing: border-box; }
body { margin: 0; background: #f2f7f6; color: #102a27; }
h1:focus { outline: none; }

.app-header {
    min-height: 76px;
    padding: 16px clamp(20px, 5vw, 72px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #073d37;
    color: white;
    box-shadow: 0 8px 24px rgba(7, 61, 55, .16);
}

.app-header div { display: grid; gap: 3px; }
.app-header strong { font-size: 1.35rem; }
.app-kicker { color: #9ed5ca; font-size: .7rem; font-weight: 800; letter-spacing: .14em; }
.environment-label { padding: 7px 11px; border: 1px solid #7bbfb2; border-radius: 999px; font-size: .78rem; }
.app-navigation { display: flex; align-items: center; gap: 8px; }
.app-navigation a { padding: 8px 11px; color: #d8f1ec; text-decoration: none; border-radius: 9px; font-size: .9rem; font-weight: 700; }
.app-navigation a.active, .app-navigation a:hover { color: white; background: rgba(255,255,255,.14); }
.app-navigation form { margin: 0; }
.user-label { color: #a7d9d0; padding-left: 8px; font-size: .85rem; }
.nav-button { padding: 8px 11px; border: 0; border-radius: 9px; background: rgba(255,255,255,.1); color: white; font: inherit; font-weight: 700; cursor: pointer; }
.app-content { width: min(1440px, calc(100% - 40px)); margin: 38px auto; }

.hero-card {
    padding: clamp(28px, 5vw, 60px);
    border-radius: 24px;
    background: linear-gradient(135deg, #ffffff 0%, #e5f4f0 100%);
    box-shadow: 0 20px 50px rgba(7, 61, 55, .1);
}

.hero-card h1 { margin: 8px 0 14px; font-size: clamp(2rem, 5vw, 3.6rem); line-height: 1.02; max-width: 780px; }
.hero-card p { max-width: 720px; color: #456560; font-size: 1.05rem; line-height: 1.65; }
.eyebrow { margin: 0; color: #087f70 !important; font-size: .78rem !important; font-weight: 900; letter-spacing: .16em; }

.status-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }
.status-grid article { display: grid; gap: 8px; padding: 22px; border: 1px solid #d5e5e1; border-radius: 16px; background: white; }
.status-grid span { color: #5b7470; }
.dashboard-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.dashboard-metrics article { display: grid; gap: 6px; min-height: 108px; padding: 16px; border: 1px solid #d6e5e2; border-radius: 14px; background: white; box-shadow: 0 10px 30px rgba(7,61,55,.05); }
.dashboard-metrics span { color: #5b7470; font-weight: 750; }
.dashboard-metrics strong { font-size: 1.55rem; }
.dashboard-metrics small { color: #607a75; }
.dashboard-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.quick-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 16px; }
.quick-actions a { text-decoration: none; }
.no-top-margin { margin-top: 0 !important; }
.cash-balance { margin: 18px 0 4px; font-size: 2rem; font-weight: 900; color: #075e54; }
.cash-entry { display: grid; grid-template-columns: minmax(200px, 1fr) auto auto; gap: 9px; align-items: end; margin-top: 14px; }
.dashboard-month { margin-top: 18px; }
.dashboard-bars { display: grid; gap: 13px; margin-top: 18px; }
.dashboard-bar-row { display: grid; grid-template-columns: minmax(210px, 1.3fr) minmax(220px, 2fr) 130px; gap: 12px; align-items: center; }
.dashboard-bar-row > div { height: 12px; overflow: hidden; border-radius: 999px; background: #e6efed; }
.dashboard-bar-row i { display: block; height: 100%; border-radius: inherit; background: #0b7668; }
.dashboard-bar-row strong { text-align: right; font-variant-numeric: tabular-nums; }

.valid.modified:not([type=checkbox]) { outline: 1px solid #26b050; }
.invalid { outline: 1px solid #e50000; }
.validation-message { color: #e50000; }

.page-heading { display: flex; justify-content: space-between; gap: 20px; align-items: end; margin-bottom: 16px; }
.page-heading h1 { margin: 4px 0; font-size: clamp(1.8rem, 3vw, 2.8rem); }
.page-heading p { margin: 0; color: #5b7470; }
.ba-grid { display: grid; gap: 18px; }
.panel { padding: 18px; border: 1px solid #d6e5e2; border-radius: 15px; background: white; box-shadow: 0 10px 30px rgba(7,61,55,.06); }
.panel h2 { margin: 0 0 4px; font-size: 1.15rem; }
.panel-subtitle { margin: 0 0 18px; color: #607a75; }
.form-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 11px; align-items: end; }
.field { display: grid; gap: 6px; color: #304c47; font-size: .84rem; font-weight: 750; }
.field input, .field select, .search-input { width: 100%; min-height: 36px; padding: 7px 9px; border: 1px solid #bcd1cc; border-radius: 8px; background: white; color: #102a27; font: inherit; }
.button-row { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 16px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 7px 12px; border: 1px solid #0b7668; border-radius: 8px; background: #0b7668; color: white; font: inherit; font-weight: 800; text-decoration: none; cursor: pointer; }
.button.secondary { background: white; color: #0b6258; }
.button.danger { border-color: #b63838; background: white; color: #a52b2b; }
.button:disabled { opacity: .5; cursor: not-allowed; }
.table-wrap { overflow: auto; border: 1px solid #d8e5e2; border-radius: 12px; }
.data-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.data-table th { padding: 8px 9px; text-align: left; white-space: nowrap; background: #eaf3f1; color: #385651; }
.data-table td { padding: 8px 9px; border-top: 1px solid #e0ebe8; vertical-align: top; }
.data-table input[type=number], .data-table input[type=date] { min-width: 110px; padding: 7px 8px; border: 1px solid #bfd1cd; border-radius: 7px; }
.data-table input[type=checkbox] { width: 18px; height: 18px; }
.summary-strip { display: flex; flex-wrap: wrap; gap: 16px; margin: 14px 0; padding: 12px 14px; border-radius: 10px; background: #e8f5f1; color: #234a43; }
.message { margin: 0 0 18px; padding: 13px 16px; border: 1px solid #9dccbf; border-radius: 11px; background: #e9f8f4; }
.message.error { border-color: #e1a5a5; background: #fff0f0; color: #8b2424; }
.muted { color: #607a75; }
.error-text { color: #a62e2e; }
.preview-items { max-width: 560px; line-height: 1.45; }
.inline-tools { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; margin-bottom: 14px; }
.inline-tools .search-input { width: min(420px, 100%); }
.actions-cell { display: flex; gap: 7px; white-space: nowrap; }
.actions-cell .button { min-height: 34px; padding: 6px 10px; font-size: .8rem; }
.editor-panel { margin-top: 18px; }
#reception-editor { position: fixed; inset: 18px; z-index: 120; margin: 0; overflow: auto; box-shadow: 0 0 0 9999px rgba(5, 35, 32, .58), 0 22px 65px rgba(5, 35, 32, .32); }
.page-heading.compact { align-items: center; margin-bottom: 16px; }
.page-heading.compact h2 { margin: 4px 0 0; }
.catalog-form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.catalog-form-grid .wide { grid-column: span 2; }
.check-field { display: flex; align-items: center; gap: 9px; padding-top: 24px; color: #304c47; font-size: .88rem; font-weight: 750; }
.check-field input { width: 18px; height: 18px; }
.compact-table { max-width: 620px; }
.partner-form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; align-items: end; }
.partner-form-grid .wide { grid-column: span 2; }
.role-checks { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-bottom: 18px; }
.role-checks label { display: flex; align-items: center; gap: 6px; color: #304c47; font-size: .88rem; font-weight: 750; }
.role-checks input { width: 17px; height: 17px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 22px; }
.section-heading h3 { margin: 0; }
.subform { display: grid; gap: 12px; margin: 10px 0; padding: 16px; border: 1px solid #d8e5e2; border-radius: 12px; background: #f8fbfa; }
.compact-button { justify-self: end; min-height: 34px; padding: 6px 10px; font-size: .8rem; }
.notes-field { margin-top: 20px; }
.notes-field textarea { min-height: 90px; padding: 10px; border: 1px solid #bcd1cc; border-radius: 9px; font: inherit; }
.confirmation-panel { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-top: 16px; }
.no-margin { margin-top: 0; }
.editor-fieldset { min-width: 0; padding: 0; border: 0; }
.editor-fieldset:disabled { opacity: .82; }
.waste-picker { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(280px, 2fr) auto; gap: 12px; align-items: end; margin: 12px 0; }
.waste-picker select { width: 100%; min-height: 42px; padding: 9px 11px; border: 1px solid #bcd1cc; border-radius: 9px; background: white; color: #102a27; font: inherit; }
.reception-items input { min-width: 88px; max-width: 150px; padding: 7px 8px; border: 1px solid #bfd1cd; border-radius: 7px; }
.document-links { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin: 14px 0; }
.document-links a { text-decoration: none; }
.stock-filters { display: grid; grid-template-columns: minmax(260px, 2fr) minmax(150px, 1fr) minmax(170px, 1fr) minmax(150px, .8fr) auto; gap: 12px; align-items: end; }
.stock-filters .wide { min-width: 0; }
.report-selector { display: flex; flex-wrap: wrap; gap: 9px; }
.report-filters { display: grid; grid-template-columns: repeat(6, minmax(140px, 1fr)); gap: 12px; align-items: end; }
.report-filters .wide { grid-column: span 2; }
.report-export-row { justify-content: flex-end; margin-bottom: 14px; }
.report-export-row a { text-decoration: none; }
.settings-section { margin-bottom: 16px; }
.company-settings-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin-top: 16px; }
.company-settings-grid .wide { grid-column: span 2; }
.company-settings-grid .full { grid-column: 1 / -1; }
.colors-row { max-width: 720px; }
.asset-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.asset-grid article { display: grid; gap: 10px; min-height: 180px; padding: 16px; border: 1px solid #d8e5e2; border-radius: 12px; background: #f8fbfa; }
.company-asset-preview { display: block; width: 100%; height: 100px; object-fit: contain; border-radius: 8px; background: white; }
.settings-save-row { justify-content: flex-end; }
.role-description-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 20px; }
.role-description-grid p { margin: 0; color: #456560; }
.audit-filters { display: grid; grid-template-columns: minmax(280px, 2fr) repeat(3, minmax(140px, 1fr)) auto; gap: 12px; align-items: end; }
.audit-filters .wide { min-width: 0; }
.number-cell { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.empty-cell { padding: 26px !important; text-align: center; color: #607a75; }
.selected-row { background: #f0faf7; }
.movement-direction { display: inline-flex; padding: 4px 8px; border-radius: 999px; font-size: .78rem; font-weight: 850; }
.movement-direction.incoming { background: #dff5e9; color: #17633d; }
.movement-direction.outgoing { background: #fff0e3; color: #944b14; }
.auth-card { width: min(480px, 100%); margin: 6vh auto; padding: 32px; border: 1px solid #d5e5e1; border-radius: 20px; background: white; box-shadow: 0 20px 50px rgba(7,61,55,.1); }
.auth-card h1 { margin: 7px 0 8px; }
.auth-form { display: grid; gap: 15px; margin-top: 22px; }
.auth-form .button { margin-top: 4px; }
.auth-footnote { margin: 20px 0 0; color: #607a75; font-size: .9rem; }
.auth-footnote a { color: #087f70; font-weight: 750; }

#blazor-error-ui { display: none; position: fixed; inset: auto 0 0; padding: 12px 24px; background: #b32121; color: white; }
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 18px; }

@media (max-width: 720px) {
    #reception-editor { inset: 8px; }
    .environment-label { display: none; }
    .app-header { align-items: flex-start; flex-wrap: wrap; }
    .app-navigation { order: 3; width: 100%; }
    .status-grid { grid-template-columns: 1fr; }
    .dashboard-metrics, .dashboard-columns { grid-template-columns: 1fr; }
    .cash-entry, .dashboard-bar-row { grid-template-columns: 1fr; }
    .dashboard-bar-row strong { text-align: left; }
    .app-content { margin-top: 24px; }
    .form-grid { grid-template-columns: 1fr; }
    .catalog-form-grid { grid-template-columns: 1fr; }
    .catalog-form-grid .wide { grid-column: auto; }
    .partner-form-grid { grid-template-columns: 1fr; }
    .partner-form-grid .wide { grid-column: auto; }
    .waste-picker { grid-template-columns: 1fr; }
    .stock-filters { grid-template-columns: 1fr; }
    .report-filters { grid-template-columns: 1fr; }
    .report-filters .wide { grid-column: auto; }
    .company-settings-grid { grid-template-columns: 1fr; }
    .company-settings-grid .wide, .company-settings-grid .full { grid-column: auto; }
    .asset-grid { grid-template-columns: 1fr; }
    .role-description-grid { grid-template-columns: 1fr; }
    .audit-filters { grid-template-columns: 1fr; }
    .confirmation-panel { align-items: flex-start; flex-direction: column; }
    .page-heading { align-items: start; flex-direction: column; }
}
