:root {
    color-scheme: light;
    font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #23332d;
    background: #f4f6f2;
    font-synthesis: none;
    text-rendering: optimizeLegibility;
    --forest: #183f32;
    --green: #2f7253;
    --green-dark: #255d44;
    --mint: #e6f1e8;
    --ink: #23332d;
    --muted: #748179;
    --line: #e5e9e3;
    --paper: #fff;
    --canvas: #f4f6f2;
    --amber: #99651d;
    --amber-bg: #fff3dc;
    --red: #a64e43;
    --red-bg: #fff0ed;
    --shadow: 0 8px 24px rgba(28, 54, 41, .045);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--canvas); }
a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-dark); text-decoration: underline; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.danger { color: var(--red); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.topbar { position: sticky; z-index: 20; top: 0; display: flex; align-items: center; gap: 2rem; min-height: 76px; padding: 0 max(24px, calc((100% - 1220px) / 2)); background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); }
.brand { display: inline-flex; align-items: center; gap: 10px; min-width: 190px; color: var(--forest); text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand-mark { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 14px 14px 14px 5px; background: var(--forest); color: #fff; font: 800 24px Manrope, sans-serif; }
.brand-copy, .account-copy { display: grid; gap: 1px; }
.brand-copy strong { font: 800 16px Manrope, sans-serif; letter-spacing: .13em; }
.brand-copy small, .account-copy small { color: var(--muted); font-size: 11px; }
.main-nav { display: flex; align-self: stretch; gap: 5px; }
.nav-link { position: relative; display: grid; place-items: center; padding: 0 17px; color: #66746b; font-size: 14px; font-weight: 600; }
.nav-link:hover { color: var(--forest); text-decoration: none; }
.nav-link.active { color: var(--forest); }
.nav-link.active::after { position: absolute; right: 16px; bottom: -1px; left: 16px; height: 3px; border-radius: 3px 3px 0 0; background: #4a9369; content: ""; }
.account-menu { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.account-avatar { display: grid; width: 36px; height: 36px; place-items: center; border: 1px solid #dce8dd; border-radius: 50%; background: #edf4ed; color: var(--green); font-weight: 700; }
.account-copy { min-width: 86px; }
.account-copy strong { font-size: 13px; }
.page-shell { width: min(1220px, calc(100% - 48px)); margin: 28px auto 72px; }
.page-shell-auth { display: grid; min-height: calc(100vh - 120px); place-items: center; }
h1, h2, h3 { margin-top: 0; color: var(--ink); font-family: Manrope, "DM Sans", sans-serif; }
h1 { margin-bottom: 7px; font-size: clamp(26px, 3vw, 34px); font-weight: 800; letter-spacing: -.045em; }
h2 { margin-bottom: 17px; font-size: 19px; letter-spacing: -.025em; }
h3 { margin-bottom: 10px; font-size: 17px; }
p { line-height: 1.55; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 8px 0 23px; }
.eyebrow { margin: 0 0 5px; color: var(--green); font-size: 11px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.page-subtitle { margin: 0; color: var(--muted); font-size: 14px; }
.button { display: inline-flex; min-height: 40px; align-items: center; justify-content: center; gap: 7px; padding: 0 16px; border: 1px solid transparent; border-radius: 9px; background: var(--green); color: #fff; font-size: 13px; font-weight: 700; text-decoration: none; transition: background .16s ease, transform .16s ease, box-shadow .16s ease; }
.button:hover { transform: translateY(-1px); background: var(--green-dark); box-shadow: 0 5px 12px rgba(33,91,64,.16); color: #fff; text-decoration: none; }
.button:disabled { transform: none; cursor: wait; opacity: .6; }
.button-secondary { border-color: #dce7dc; background: #edf4ed; color: #315d43; }
.button-secondary:hover { background: #dfecdf; color: #244b34; }
.button-quiet { border-color: var(--line); background: #fff; color: #59675f; }
.button-quiet:hover { background: #f5f7f4; color: var(--forest); }
.button-danger { background: var(--red); }
.button-small { min-height: 33px; padding: 0 11px; border-radius: 8px; font-size: 12px; }
.button-link { min-height: 38px; }
button:not(.button) { display: inline-flex; min-height: 40px; align-items: center; justify-content: center; padding: 0 14px; border: 0; border-radius: 9px; background: var(--green); color: white; font-size: 13px; font-weight: 700; }
button:not(.button):hover { background: var(--green-dark); }
button.secondary:not(.button) { border: 1px solid #dce7dc; background: #edf4ed; color: #315d43; }
button.secondary:not(.button):hover { background: #dfecdf; }
.panel, section, .card { border: 1px solid var(--line); border-radius: 15px; background: var(--paper); box-shadow: var(--shadow); }
.panel, section { margin: 17px 0; padding: 22px; }
.card { padding: 19px; }
.muted { color: var(--muted); }
.error, .notice { margin: 14px 0; padding: 12px 15px; border: 1px solid #f1d4ce; border-radius: 10px; background: var(--red-bg); color: #883e35; }
.notice { border-color: #d4e6d4; background: #edf6ec; color: #356344; }
.inline { display: inline-flex; align-items: flex-end; gap: 9px; flex-wrap: wrap; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 15px; }
label { display: grid; min-width: 0; gap: 6px; color: #54635a; font-size: 12px; font-weight: 700; }
input, select, textarea { width: 100%; min-width: 0; min-height: 42px; padding: 9px 11px; border: 1px solid #dce3db; border-radius: 9px; outline: none; background: #fff; color: var(--ink); font-size: 14px; transition: border-color .16s ease, box-shadow .16s ease; }
input:focus, select:focus, textarea:focus { border-color: #70a887; box-shadow: 0 0 0 3px rgba(73,145,101,.13); }
input::placeholder, textarea::placeholder { color: #a0aaa2; }
textarea { min-height: 90px; resize: vertical; }
select[multiple] { min-height: 145px; }
.form-actions { display: flex; align-items: center; gap: 11px; margin-top: 4px; }
.notifications-panel { overflow: hidden; margin: 0 0 25px; border: 1px solid #e4e9e2; border-radius: 13px; background: #fff; box-shadow: 0 4px 14px rgba(28,54,41,.025); }
.notifications-panel summary { display: flex; min-height: 52px; align-items: center; gap: 10px; padding: 0 17px; color: #43544a; cursor: pointer; font-size: 13px; font-weight: 700; list-style: none; }
.notifications-panel summary::-webkit-details-marker { display: none; }
.notification-icon { color: #548466; font-size: 17px; }
.notification-count { display: grid; min-width: 21px; height: 21px; place-items: center; padding: 0 5px; border-radius: 20px; background: #eef3ed; color: #637267; font-size: 11px; }
.notifications-panel[data-unread="true"] .notification-count { background: #e4f1e5; color: #2e714d; }
.notification-summary { color: #89938b; font-size: 12px; font-weight: 400; }
.notification-chevron { margin-left: auto; color: #829087; font-size: 18px; transition: transform .16s ease; }
.notifications-panel[open] .notification-chevron { transform: rotate(180deg); }
.notification-content { padding: 3px 17px 14px; border-top: 1px solid #f0f2ee; }
.notification-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.notification-toolbar p { margin: 9px 0; font-size: 12px; }
.notification-actions { display: flex; gap: 7px; }
.notification-status { margin: 0; font-size: 12px; }
.notification-list { margin: 8px 0 0; padding: 0; list-style: none; }
.notification-list li { display: flex; align-items: flex-start; gap: 11px; padding: 12px 0; border-top: 1px solid #edf0ec; }
.notification-dot { width: 7px; height: 7px; flex: 0 0 7px; margin-top: 6px; border-radius: 50%; background: #64a078; }
.notification-list [data-read="true"] .notification-dot { background: #d5dcd5; }
.notification-copy { flex: 1; }
.notification-copy strong { font-size: 13px; }
.notification-copy p { margin: 2px 0 3px; color: #647168; font-size: 13px; }
.notification-copy small { color: #9aa39c; font-size: 11px; }
.notification-empty { color: var(--muted); font-size: 13px; }
.dashboard-tools { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; padding: 15px 17px; }
.date-filter { display: flex; align-items: flex-end; gap: 9px; }
.date-filter label { min-width: 170px; }
.search-wrap { position: relative; width: min(360px, 100%); }
.search-wrap input { padding-left: 37px; background: #fafbf9; }
.search-icon { position: absolute; top: 10px; left: 13px; color: #819087; font-size: 17px; }
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; margin: 0 0 22px; }
.metric { display: flex; align-items: center; gap: 13px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.metric-icon { display: grid; width: 41px; height: 41px; flex: 0 0 41px; place-items: center; border-radius: 12px; background: #edf4ed; color: #477656; font-size: 18px; }
.metric:nth-child(2) .metric-icon { background: #eef2f8; color: #607da7; }
.metric:nth-child(3) .metric-icon { background: #fbf1df; color: #aa7a31; }
.metric-copy { display: grid; gap: 1px; }
.metric-copy strong { font: 800 22px Manrope, sans-serif; letter-spacing: -.04em; }
.metric-copy small { color: var(--muted); font-size: 12px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 15px; }
.section-heading h2 { margin: 0; }
.section-heading .muted { margin: 0; font-size: 13px; }
.order-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.order-card { display: flex; flex-direction: column; min-width: 0; padding: 17px; border: 1px solid var(--line); border-radius: 13px; background: #fff; box-shadow: 0 3px 12px rgba(28,54,41,.025); transition: border .16s ease, box-shadow .16s ease, transform .16s ease; }
.order-card:hover { transform: translateY(-1px); border-color: #d6e2d5; box-shadow: var(--shadow); }
.order-card[hidden] { display: none; }
.order-topline, .order-title-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.order-number { color: #3c7453; font-size: 12px; font-weight: 700; }
.order-title { overflow: hidden; margin: 4px 0 13px; font: 700 17px Manrope, sans-serif; letter-spacing: -.025em; text-overflow: ellipsis; white-space: nowrap; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 99px; background: #eef3ed; color: #53675a; font-size: 11px; font-weight: 700; white-space: nowrap; }
.status-pill::before { width: 6px; height: 6px; border-radius: 50%; background: #849589; content: ""; }
.status-pill.status-active { background: #e7f2e8; color: #376a46; }
.status-pill.status-active::before { background: #519364; }
.status-pill.status-moving { background: #eef2fa; color: #566f9a; }
.status-pill.status-moving::before { background: #6787ba; }
.status-pill.status-done { background: #f0f2ef; color: #78827b; }
.status-pill.status-done::before { background: #8c978f; }
.order-details { display: grid; gap: 8px; padding: 12px 0; border-top: 1px solid #eef0ec; border-bottom: 1px solid #eef0ec; }
.detail-line { display: flex; align-items: flex-start; gap: 9px; color: #56645b; font-size: 13px; line-height: 1.45; }
.detail-icon { width: 17px; flex: 0 0 17px; color: #789080; text-align: center; }
.detail-line strong { color: #394a3f; font-weight: 600; }
.detail-line .detail-label { color: #8b968e; }
.order-footer { display: flex; flex-direction: column; gap: 12px; padding-top: 12px; }
.order-meta { display: flex; flex-wrap: wrap; gap: 7px 13px; color: #77837a; font-size: 12px; }
.order-comment { margin: 0; padding: 9px 11px; border-radius: 8px; background: #f7f8f5; color: #657168; font-size: 12px; white-space: pre-line; }
.order-links, .order-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.order-links a { font-size: 12px; font-weight: 700; }
.order-actions { justify-content: space-between; }
.order-actions .inline { flex: 1; }
.order-actions label { flex: 1; min-width: 150px; }
.assign-form { display: flex; align-items: flex-end; gap: 7px; width: 100%; }
.assign-form select { min-height: 36px; padding: 6px 9px; font-size: 12px; }
.assign-form label { gap: 4px; font-size: 11px; }
.empty-state { grid-column: 1 / -1; display: grid; min-height: 190px; place-items: center; padding: 30px; border: 1px dashed #dbe3da; border-radius: 13px; color: var(--muted); text-align: center; }
.empty-icon { margin-bottom: 9px; color: #92ae96; font-size: 27px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 14px; border-bottom: 1px solid #edf0ec; text-align: left; vertical-align: middle; font-size: 13px; }
th { background: #f8faf7; color: #68756c; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fbfcfa; }
td form { display: inline-flex; }
td .button { white-space: nowrap; }
.login-card { width: min(100%, 430px); padding: 32px; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: 0 16px 50px rgba(28,54,41,.08); }
.login-brand { display: grid; justify-items: center; margin-bottom: 22px; text-align: center; }
.login-brand .brand-mark { width: 54px; height: 54px; margin-bottom: 13px; font-size: 30px; }
.login-card h1 { margin-bottom: 7px; text-align: center; font-size: 25px; }
.login-card .page-subtitle { margin-bottom: 22px; text-align: center; }
.login-card form { display: grid; gap: 14px; }
.login-card .button { width: 100%; margin-top: 4px; }
.zone-card { display: grid; grid-template-columns: minmax(190px, .7fr) minmax(240px, 1fr) auto; align-items: end; gap: 15px; }
.zone-card h2 { margin: 0 0 5px; }
.zone-card p { margin: 0; font-size: 12px; }
.zone-link { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 17px; border: 1px solid #d8e6d8; border-radius: 12px; background: #f0f6ee; }
.zone-link p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.history-total { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 15px; padding: 15px 17px; border-radius: 11px; background: #f0f5ef; }
.history-total strong { color: #2f6744; font: 800 19px Manrope, sans-serif; }
.confirmation-card { max-width: 620px; margin: 60px auto; padding: 28px; }
.confirmation-card .warning-mark { display: grid; width: 46px; height: 46px; place-items: center; border-radius: 13px; background: var(--red-bg); color: var(--red); font-size: 22px; }
.confirmation-card .form-actions { margin-top: 24px; }
@media (max-width: 800px) {
    .topbar { min-height: 68px; gap: 12px; padding: 0 18px; }
    .brand { min-width: auto; }
    .brand-copy small, .account-copy { display: none; }
    .main-nav { margin-left: auto; }
    .nav-link { padding: 0 10px; font-size: 12px; }
    .account-menu { margin-left: 0; }
    .account-menu .button { padding: 0 9px; }
    .page-shell { width: min(100% - 32px, 650px); margin-top: 21px; }
    .order-grid { grid-template-columns: 1fr; }
    .zone-card { grid-template-columns: 1fr; }
}
@media (max-width: 540px) {
    .topbar { flex-wrap: wrap; justify-content: space-between; min-height: 64px; padding: 8px 15px; }
    .brand-mark { width: 35px; height: 35px; }
    .brand-copy strong { font-size: 14px; }
    .main-nav { order: 3; width: 100%; height: 39px; justify-content: center; margin: 0; border-top: 1px solid #eef0ec; }
    .nav-link { flex: 1; }
    .nav-link.active::after { right: 9px; left: 9px; }
    .account-avatar { width: 32px; height: 32px; }
    .page-shell { width: calc(100% - 24px); margin-top: 17px; }
    .page-heading { align-items: flex-start; flex-direction: column; margin-bottom: 16px; }
    .page-heading > .button { width: 100%; }
    .dashboard-tools { align-items: stretch; flex-direction: column; padding: 13px; }
    .date-filter { align-items: flex-end; }
    .date-filter label { flex: 1; min-width: 0; }
    .search-wrap { width: 100%; }
    .metrics { gap: 7px; }
    .metric { align-items: flex-start; flex-direction: column; gap: 7px; padding: 11px; }
    .metric-icon { width: 32px; height: 32px; flex-basis: 32px; font-size: 15px; }
    .metric-copy strong { font-size: 18px; }
    .metric-copy small { font-size: 10px; }
    section, .panel { padding: 16px; }
    .notification-summary { display: none; }
    .notification-toolbar { align-items: flex-start; flex-direction: column; }
    .notification-actions { flex-wrap: wrap; }
    .order-card { padding: 14px; }
    .order-title { font-size: 16px; }
    .assign-form { align-items: stretch; flex-direction: column; }
    .assign-form .button { width: 100%; }
    .login-card { padding: 25px 20px; }
    th, td { padding: 10px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; } }
