:root {
    --ink: #1e2b28;
    --green: #253b35;
    --green-2: #344d45;
    --paper: #f5f6f3;
    --line: #e4e9e5;
    --muted: #75817b;
    --shadow: 0 10px 32px rgba(30, 43, 40, .055);
    --radius: 14px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 14px; }
.app-shell { min-height: 100vh; }
.sidebar { width: 254px; position: fixed; inset: 0 auto 0 0; background: #1f332e; color: #eef2ee; padding: 26px 18px; display: flex; flex-direction: column; z-index: 10; }
.brand { display: flex; align-items: center; gap: 11px; color: #fff; text-decoration: none; font-weight: 700; font-size: 15px; letter-spacing: 1.6px; padding: 4px 8px 26px; }
.brand:hover, .login-brand:hover { color: #fff; }
.brand small { display: block; color: #aab8b1; font-size: 8px; letter-spacing: 2px; margin-top: 3px; }
.brand-mark { width: 36px; height: 36px; border: 1px solid #71857b; color: #e3c88e; display: grid; place-items: center; font: 21px Georgia, serif; }
.nav-caption { font-size: 9px; letter-spacing: 1.8px; color: #83948c; padding: 9px 13px; }
.side-nav { display: grid; gap: 4px; }
.side-nav a { color: #c4cec8; text-decoration: none; padding: 11px 13px; border-radius: 8px; font-size: 13px; }
.side-nav a i { width: 25px; display: inline-block; font-size: 15px; }
.side-nav a:hover, .side-nav a.active { background: #324941; color: #fff; }
.sidebar-bottom { margin-top: auto; border-top: 1px solid #3c5049; padding-top: 16px; }
.user-chip { display: flex; align-items: center; gap: 10px; font-size: 12px; padding: 4px 5px 13px; }
.user-chip small { display: block; color: #a8b5ae; font-size: 10px; margin-top: 3px; }
.avatar { width: 31px; height: 31px; border-radius: 50%; background: #dfd3b5; color: #283d36; display: grid; place-items: center; font-weight: 700; }
.logout-link { color: #bdc9c2; font-size: 12px; text-decoration: none; padding: 5px; }
.logout-link:hover { color: #fff; }
.main-area { margin-left: 254px; min-height: 100vh; }
.topbar { min-height: 105px; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 20px 38px; }
.topbar h1 { font-size: 23px; font-weight: 600; letter-spacing: -.4px; margin: 3px 0 0; }
.eyebrow { font-size: 9px; letter-spacing: 1.7px; color: #87928c; font-weight: 700; margin: 0 0 5px; }
.topbar-date { color: var(--muted); font-size: 12px; }
.page-content { padding: 30px 38px 48px; max-width: 1600px; margin: auto; }
.btn { border-radius: 8px; font-weight: 550; font-size: 13px; padding: 9px 14px; }
.btn-primary { background: var(--green); border-color: var(--green); }
.btn-primary:hover, .btn-primary:focus { background: #172a25; border-color: #172a25; }
.btn-outline-secondary { color: var(--green-2); border-color: #ccd5d0; background: #fff; }
.btn-outline-secondary:hover { background: #edf1ee; color: var(--green); border-color: #b9c5be; }
.form-control, .form-select { border-color: #dbe1dd; border-radius: 7px; min-height: 39px; font-size: 13px; color: var(--ink); }
.form-control:focus, .form-select:focus { border-color: #8c9d92; box-shadow: 0 0 0 .2rem rgba(52, 77, 69, .11); }
label { font-size: 11px; font-weight: 600; color: #52605a; }
.form-label { font-size: 12px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px 18px; }
.form-grid label { display: grid; gap: 7px; }
.form-grid .wide { grid-column: 1 / -1; }
.panel { background: #fff; border: 1px solid #e8ece9; border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 24px; }
.form-panel { margin-bottom: 20px; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-bottom: 18px; }
.panel-heading h2 { font-size: 16px; font-weight: 650; margin: 0; letter-spacing: -.2px; }
.panel-heading > a { font-size: 12px; color: var(--green-2); text-decoration: none; }
.panel-heading > a:hover { text-decoration: underline; }
.muted-copy { color: var(--muted); font-size: 12px; line-height: 1.6; }
.section-title { font-size: 20px; letter-spacing: -.4px; margin: 0; font-weight: 650; }
.welcome-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)); gap: 14px; }
.metric-card { background: #fff; border: 1px solid #e8ece9; border-radius: 12px; box-shadow: var(--shadow); padding: 18px; min-height: 150px; }
.metric-icon { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; margin-bottom: 12px; font-size: 16px; }
.metric-icon.olive { background: #edf0e8; color: #667452; }
.metric-icon.blue { background: #e9eff3; color: #526f83; }
.metric-icon.amber { background: #f5efe2; color: #987b42; }
.metric-icon.green { background: #e7f0eb; color: #547764; }
.metric-label { font-size: 11px; color: var(--muted); }
.metric-value { font-size: 28px; line-height: 1.15; font-weight: 650; letter-spacing: -.7px; margin: 5px 0 8px; }
.metric-card > a { font-size: 10px; text-decoration: none; color: #66766d; }
.summary-strip { display: grid; grid-template-columns: repeat(3, 1fr); background: #eff2ed; border-radius: 10px; margin: 17px 0 22px; padding: 13px 20px; }
.summary-strip > div { display: flex; align-items: center; justify-content: space-between; padding: 4px 14px; border-right: 1px solid #dce2dc; }
.summary-strip > div:first-child { padding-left: 0; }
.summary-strip > div:last-child { border: 0; }
.summary-strip span { font-size: 11px; color: #68756f; }
.summary-strip strong { font-size: 15px; }
.summary-strip small { font-size: 10px; font-weight: 400; color: #78837d; }
.dashboard-columns { display: grid; grid-template-columns: 1.2fr .8fr; gap: 17px; }
.dashboard-columns .panel { min-width: 0; }
.table { margin: 0; }
.app-table { font-size: 12px; vertical-align: middle; }
.app-table thead th { background: #f7f8f6; color: #78837d; border-bottom: 1px solid #e3e8e4; font-size: 9px; text-transform: uppercase; letter-spacing: .8px; font-weight: 700; padding: 11px 13px; white-space: nowrap; }
.app-table tbody td { border-color: #edf0ed; padding: 11px 13px; color: #58645e; }
.table-main { font-weight: 600; color: var(--ink) !important; }
.table-main a, .text-link, .profile-link { color: inherit; text-decoration: none; }
.table-main a:hover, .profile-link:hover { color: #55725f; }
.table-sub { display: block; color: #78837d; font-size: 10px; font-weight: 400; margin-top: 3px; }
.compact-list { display: grid; }
.compact-item { display: flex; align-items: center; gap: 10px; padding: 11px 2px; border-bottom: 1px solid #edf0ed; }
.compact-item:last-child { border: 0; }
.compact-icon { width: 30px; height: 30px; border-radius: 8px; background: #eff2ed; color: #5d7164; display: grid; place-items: center; }
.compact-item > span:nth-child(2) { flex: 1; }
.compact-item strong { display: block; font-size: 11px; }
.compact-item small { display: block; color: #849089; font-size: 10px; margin-top: 3px; }
.compact-item b { font-size: 12px; color: #52745f; }
.page-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; }
.search-form { display: flex; align-items: center; gap: 9px; background: #fff; border: 1px solid #e2e7e3; border-radius: 8px; padding: 4px 5px 4px 12px; min-width: 340px; }
.search-form i { color: #87938c; }
.search-form input { border: 0; outline: 0; min-width: 0; flex: 1; font-size: 12px; }
.count-pill { display: inline-block; border-radius: 20px; background: #eff2ed; padding: 4px 8px; font-size: 10px; color: #66736c; margin-left: 4px; }
.status-pill { display: inline-block; border-radius: 20px; padding: 4px 8px; font-size: 10px; font-weight: 600; white-space: nowrap; }
.status-green { background: #e6f1e9; color: #477254; }
.status-gray { background: #edf0ee; color: #68746e; }
.status-blue { background: #e9eff2; color: #506e7e; }
.status-amber { background: #f5f0e2; color: #96793d; }
.row-actions { position: relative; }
.row-actions summary { cursor: pointer; color: #52675b; font-size: 11px; white-space: nowrap; }
.row-actions[open] .action-form { position: absolute; z-index: 5; right: 0; top: 24px; width: 280px; background: #fff; padding: 14px; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 14px 35px rgba(20, 35, 29, .16); display: grid; gap: 9px; }
.action-form label { display: grid; gap: 4px; }
.pagination-row { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); padding-top: 13px; color: var(--muted); font-size: 11px; margin-top: 14px; }
.pagination-row > div { display: flex; gap: 4px; }
.page-link { padding: 5px 9px; border: 1px solid var(--line); border-radius: 5px; text-decoration: none; color: #52675b; font-size: 11px; }
.page-link.active { background: var(--green); color: white; border-color: var(--green); }
.required-note { font-size: 10px; color: #89948e; }
.section-heading { margin: 25px 0 12px; }
.entry-line { margin-bottom: 13px; }
.entry-line-title { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.line-number { width: 25px; height: 25px; border-radius: 7px; background: #edf1ed; color: #53695a; display: grid; place-items: center; font-size: 10px; font-weight: 700; }
.size-grid { display: grid; grid-template-columns: repeat(8, minmax(55px, 1fr)); gap: 10px; margin-top: 20px; align-items: end; }
.size-grid label { display: grid; gap: 6px; font-size: 10px; }
.size-input { text-align: center; }
.line-total { border-left: 1px solid var(--line); padding-left: 14px; min-height: 39px; display: flex; flex-direction: column; justify-content: center; }
.line-total span { font-size: 9px; color: var(--muted); }
.form-submit-row { display: flex; align-items: center; justify-content: space-between; margin-top: 17px; }
.form-submit-row > span { font-size: 11px; color: var(--muted); }
.detail-header { display: flex; justify-content: space-between; align-items: center; }
.detail-header h2 { font-size: 19px; margin: 0; }
.contact-summary { display: grid; gap: 5px; text-align: right; color: #68756f; font-size: 11px; }
.worker-total span { display: block; font-size: 10px; color: var(--muted); }
.worker-total strong { font-size: 22px; }
.worker-total small { font-size: 11px; font-weight: 400; }
.item-detail { padding: 0 0 15px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.item-detail:last-child { border: 0; margin: 0; }
.item-detail-heading { display: flex; align-items: center; justify-content: space-between; margin: 5px 0 9px; }
.item-detail-heading strong, .item-detail-heading span { display: block; }
.item-detail-heading strong { font-size: 13px; }
.item-detail-heading div > span { font-size: 10px; color: var(--muted); margin-top: 4px; }
.alert { font-size: 12px; border-radius: 8px; }
.empty-state { text-align: center; margin: 10vh auto; max-width: 450px; padding: 32px; }
.empty-icon { width: 52px; height: 52px; display: grid; place-items: center; margin: 0 auto 16px; border-radius: 50%; background: #e9efeb; color: #5a7264; font-size: 20px; }
.empty-state h2 { font-size: 20px; }
.empty-state p { color: var(--muted); font-size: 13px; margin: 8px 0 20px; }
.login-page { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; background: #fff; }
.login-card { max-width: 410px; width: calc(100% - 48px); margin: auto; }
.login-brand { color: var(--green); padding: 0; }
.login-brand small { color: #87928c; }
.login-card h1 { font: 38px Georgia, serif; letter-spacing: -1px; margin: 0 0 8px; }
.login-card .muted-copy { font-size: 13px; }
.login-foot { font-size: 10px; color: #98a29c; margin-top: 24px; }
.remember-me { display: flex; min-height: 44px; align-items: center; gap: 9px; margin: 0 0 14px; color: #52605a; font-size: 13px; cursor: pointer; }
.remember-me input { flex: 0 0 auto; }
.login-art { background: linear-gradient(145deg, #243d35, #172c26); color: #fff; padding: 9%; display: flex; flex-direction: column; justify-content: space-between; min-height: 100vh; }
.art-label { font-size: 9px; letter-spacing: 2px; color: #c5b88f; }
.art-quote { font: clamp(35px, 5vw, 66px)/1.12 Georgia, serif; }
.art-bottom { font-size: 10px; letter-spacing: 1.5px; color: #e1e8e2; }
.table-responsive { overflow-x: auto; }
@media (max-width: 1100px) { .sidebar { width: 220px; } .main-area { margin-left: 220px; } .topbar, .page-content { padding-left: 24px; padding-right: 24px; } .size-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 760px) {
    .sidebar { position: relative; width: auto; height: auto; inset: auto; padding: 10px 13px; display: block; }
    .brand { padding: 3px 2px 10px; } .nav-caption, .sidebar-bottom { display: none; }
    .side-nav { display: flex; overflow-x: auto; gap: 4px; padding-bottom: 2px; }
    .side-nav a { white-space: nowrap; padding: 8px; font-size: 11px; }
    .side-nav a i { width: auto; margin-right: 4px; }
    .main-area { margin: 0; } .topbar { min-height: 76px; padding: 15px 17px; }
    .topbar h1 { font-size: 20px; } .page-content { padding: 18px 14px 30px; }
    .dashboard-columns { grid-template-columns: 1fr; } .metric-grid { gap: 9px; }
    .metric-card { padding: 13px; min-height: 135px; } .metric-value { font-size: 24px; }
    .summary-strip { padding: 10px; grid-template-columns: 1fr; gap: 0; }
    .summary-strip > div, .summary-strip > div:first-child { padding: 7px 2px; border-right: 0; border-bottom: 1px solid #dce2dc; }
    .summary-strip > div:last-child { border: 0; } .panel { padding: 17px 14px; }
    .page-toolbar { align-items: stretch; flex-wrap: wrap; } .search-form { min-width: 0; width: 100%; }
    .page-toolbar > .btn { width: 100%; } .form-grid { grid-template-columns: 1fr; }
    .form-grid .wide { grid-column: auto; } .size-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .line-total { border-left: 0; padding: 0; } .form-submit-row { align-items: stretch; flex-direction: column; gap: 12px; }
    .form-submit-row .btn { width: 100%; } .welcome-row { align-items: flex-start; gap: 12px; }
    .section-title { font-size: 17px; } .login-page { grid-template-columns: 1fr; }
    .login-card { padding: 54px 0; } .login-art { display: none; }
    .row-actions[open] .action-form { position: static; width: min(78vw, 300px); margin-top: 8px; }
    .detail-header { align-items: flex-start; gap: 12px; flex-direction: column; }
}