:root {
    --ink: #17211f;
    --muted: #74817e;
    --line: #e8ecea;
    --canvas: #f5f7f6;
    --green: #157b63;
    --green-dark: #0e604e;
    --green-soft: #e7f4ef;
    --navy: #172c2a;
    --white: #fff;
    --shadow: 0 8px 26px rgba(24, 50, 44, .045);
    font-family: "DM Sans", "Segoe UI", sans-serif;
    color: var(--ink);
    background: var(--canvas);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--canvas); font-size: 14px; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button { cursor: pointer; }
.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 5; display: flex; flex-direction: column; width: 248px; padding: 26px 16px 18px; color: #dce8e4; background: var(--navy); }
.brand { display: flex; align-items: center; gap: 11px; color: var(--ink); }
.sidebar .brand { padding: 0 8px 29px; color: #fff; }
.brand-mark { display: grid; width: 37px; height: 37px; flex: 0 0 37px; place-items: center; border-radius: 12px; color: #fff; background: var(--green); font: 800 21px Manrope, sans-serif; }
.brand strong, .brand small { display: block; letter-spacing: .11em; }
.brand strong { font: 800 14px Manrope, sans-serif; }
.brand small { margin-top: 3px; color: #94aaa3; font-size: 9px; font-weight: 700; }
.workspace-label { padding: 8px 11px 10px; color: #728a82; font-size: 9px; font-weight: 700; letter-spacing: .16em; }
.side-nav { display: grid; gap: 5px; }
.side-nav a { position: relative; display: flex; align-items: center; gap: 12px; min-height: 43px; padding: 0 11px; border-radius: 8px; color: #a9bbb5; font-size: 12px; font-weight: 500; transition: .18s ease; }
.side-nav a:hover { color: #fff; background: rgba(255,255,255,.06); }
.side-nav a.active { color: #fff; background: #25443e; font-weight: 600; }
.side-nav a.active:before { position: absolute; inset: 9px auto 9px -16px; width: 3px; border-radius: 0 3px 3px 0; background: #55c5a1; content: ""; }
.nav-icon { display: inline-grid; width: 19px; place-items: center; color: #91aca2; font-size: 17px; }
.active .nav-icon { color: #67d1af; }
.nav-dot { width: 6px; height: 6px; margin-left: auto; border-radius: 50%; background: #6bd5b2; }
.sidebar-bottom { margin-top: auto; }
.user-tile { display: flex; align-items: center; gap: 10px; padding: 14px 6px; border-top: 1px solid rgba(226,244,238,.1); }
.avatar { display: grid; width: 34px; height: 34px; flex: 0 0 34px; place-items: center; border-radius: 50%; color: #137258; background: #dcf1e9; font-size: 12px; font-weight: 700; }
.user-tile strong, .user-tile small { display: block; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-tile strong { color: #f2f7f5; font-size: 11px; }
.user-tile small { margin-top: 4px; color: #8ca49b; font-size: 8px; letter-spacing: .1em; }
.logout-button { display: flex; width: 100%; justify-content: space-between; padding: 11px 9px; border: 0; border-radius: 7px; color: #9fb3ab; background: transparent; font-size: 11px; text-align: left; }
.logout-button:hover { color: #fff; background: rgba(255,255,255,.06); }
.main-content { min-height: 100vh; margin-left: 248px; }
.topbar { display: flex; height: 69px; align-items: center; justify-content: space-between; padding: 0 38px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.86); }
.crumb { color: #98a29f; font-size: 9px; font-weight: 700; letter-spacing: .12em; }
.crumb span { padding: 0 7px; color: #c8d0cd; }
.topbar-date { margin: 5px 0 0; color: #5d6b67; font-size: 11px; }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.live-pill { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border: 1px solid #e6efeb; border-radius: 20px; color: #668078; background: #fbfdfc; font-size: 8px; font-weight: 700; letter-spacing: .07em; white-space: nowrap; }
.live-pill i, .sync-dot { width: 6px; height: 6px; border-radius: 50%; background: #31aa81; box-shadow: 0 0 0 3px #e1f4ec; }
.avatar-top { width: 30px; height: 30px; min-width: 30px; }
.page-wrap { max-width: 1500px; min-height: calc(100vh - 112px); margin: 0 auto; padding: 31px 38px 38px; }
.page-heading, .welcome-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 23px; }
.page-heading h1, .welcome-row h1 { margin: 5px 0 6px; font: 700 25px Manrope, sans-serif; letter-spacing: -.045em; }
.eyebrow { margin: 0; color: #81928c; font-size: 9px; font-weight: 700; letter-spacing: .15em; }
.muted { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.button { display: inline-flex; min-height: 38px; align-items: center; justify-content: center; gap: 9px; padding: 0 15px; border: 1px solid transparent; border-radius: 7px; font-size: 11px; font-weight: 700; white-space: nowrap; transition: .18s ease; }
.button.primary { color: #fff; background: var(--green); box-shadow: 0 4px 10px rgba(21,123,99,.13); }
.button.primary:hover { background: var(--green-dark); }
.button.secondary { border-color: #e2e8e5; color: #354843; background: #fff; }
.button.secondary:hover { border-color: #b7cfc5; background: #f9fcfa; }
.wide { width: 100%; min-height: 43px; margin-top: 5px; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 0 0 20px; }
.metric-card { min-width: 0; padding: 18px 18px 17px; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: var(--shadow); }
.metric-label { display: flex; min-height: 22px; align-items: center; justify-content: space-between; gap: 5px; color: #82908c; font-size: 8px; font-weight: 700; letter-spacing: .09em; }
.metric-card > strong { display: block; margin: 13px 0 5px; overflow: hidden; font: 700 22px Manrope, sans-serif; letter-spacing: -.04em; text-overflow: ellipsis; white-space: nowrap; }
.metric-card > small { color: #98a39f; font-size: 10px; }
.metric-icon { display: grid; width: 24px; height: 24px; flex: 0 0 24px; place-items: center; border-radius: 7px; font-size: 13px; }
.green { color: #188163; }.orange { color: #cc8550; }.purple { color: #8873c5; }.red { color: #d16d67; }.blue { color: #5485bf; }.teal { color: #1a9679; }
.metric-icon.green { background: #e8f6f0; }.metric-icon.orange { background: #fff2e8; }.metric-icon.purple { background: #f2effb; }.metric-icon.red { background: #fff0ef; }.metric-icon.blue { background: #edf4fc; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(260px, .95fr); gap: 16px; align-items: start; margin-bottom: 18px; }
.form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.users-grid { grid-template-columns: minmax(300px, .9fr) minmax(360px, 1.1fr); }
.panel { min-width: 0; margin-bottom: 17px; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: var(--shadow); }
.panel-heading { display: flex; min-height: 67px; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid #eef1f0; }
.panel-heading h2 { margin: 0 0 5px; font: 700 13px Manrope, sans-serif; letter-spacing: -.02em; }
.panel-heading p { margin: 0; color: #929d99; font-size: 10px; }
.text-link { color: #168065; font-size: 10px; font-weight: 700; white-space: nowrap; }
.text-link:hover { color: #0e604e; }
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; white-space: nowrap; }
thead { background: #fbfcfc; }
th { padding: 11px 15px; color: #9ba6a2; font-size: 8px; font-weight: 700; letter-spacing: .09em; }
td { padding: 12px 15px; border-top: 1px solid #f0f2f1; color: #485752; font-size: 10px; }
td strong, td small { display: block; }
td strong { color: #273630; font-size: 10px; font-weight: 600; }
td small { max-width: 260px; margin-top: 4px; overflow: hidden; color: #98a39f; font-size: 9px; text-overflow: ellipsis; }
tbody tr:hover { background: #fcfdfd; }
.positive { color: #138065 !important; font-weight: 600; }
.negative { color: #bf695f !important; font-weight: 600; }
.status { display: inline-flex; align-items: center; padding: 5px 8px; border-radius: 20px; font-size: 8px; font-weight: 700; }
.status.approved { color: #167257; background: #e8f5ef; }
.status.pending { color: #a06e2c; background: #fff5e6; }
.status.rejected { color: #af5b53; background: #fff0ee; }
.status-panel { padding-bottom: 8px; }
.quick-link { display: flex; min-height: 62px; align-items: center; gap: 11px; padding: 10px 17px; border-bottom: 1px solid #f0f3f1; }
.quick-link:hover { background: #fbfdfc; }
.quick-icon { display: grid; width: 33px; height: 33px; flex: 0 0 33px; place-items: center; border-radius: 9px; background: #eaf6f1; font-size: 16px; }
.quick-icon.purple { background: #f1eef9; }.quick-icon.blue { background: #edf3fa; }
.quick-link span:nth-child(2) { flex: 1; }
.quick-link strong, .quick-link small { display: block; }
.quick-link strong { font-size: 10px; }
.quick-link small { margin-top: 4px; color: #98a39f; font-size: 9px; }
.quick-link b { color: #a4afaa; font-size: 14px; font-weight: 400; }
.sync-note { display: flex; align-items: center; gap: 11px; margin: 13px 14px 4px; padding: 11px; border-radius: 8px; background: #f5faf7; }
.sync-note strong, .sync-note small { display: block; }
.sync-note strong { color: #477262; font-size: 9px; }
.sync-note small { margin-top: 4px; color: #91a39b; font-size: 8px; }
.sync-dot { flex: 0 0 6px; }
.form-grid-inner { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 17px; }
label { display: grid; gap: 6px; color: #65736e; font-size: 9px; font-weight: 600; }
label small { color: #99a49f; font-size: 8px; font-weight: 400; }
input, select { width: 100%; min-height: 36px; padding: 8px 10px; border: 1px solid #e4e9e6; border-radius: 6px; outline: 0; color: #34443e; background: #fff; font-size: 10px; }
input:focus, select:focus { border-color: #65b59b; box-shadow: 0 0 0 3px rgba(43,155,119,.1); }
input::placeholder { color: #b6bfbb; }
.form-grid-inner .full { grid-column: 1 / -1; }
.form-grid-inner .button { justify-self: start; }
.compact-panel { margin-bottom: 17px; }
.form-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 11px; padding: 15px 17px 17px; }
.form-row label { flex: 1 1 130px; min-width: 115px; }
.form-row .wide-field { flex: 2 1 210px; }
.form-row .button { flex: 0 0 auto; }
.empty-state { padding: 31px 18px; color: #93a09b; font-size: 11px; text-align: center; }
.notice { margin-bottom: 16px; padding: 13px 15px; border: 1px solid #f0dfb8; border-radius: 8px; color: #85642b; background: #fff9ec; font-size: 11px; }
.alert { margin-bottom: 17px; padding: 12px 14px; border: 1px solid #cce8da; border-radius: 8px; color: #286d54; background: #eff9f3; font-size: 11px; }
.alert.error { border-color: #f1d7d2; color: #a24f44; background: #fff3f1; }
.inline-actions { display: flex; align-items: center; gap: 5px; }
.mini-button { padding: 6px 8px; border: 0; border-radius: 5px; font-size: 8px; font-weight: 700; }
.mini-button.approve { color: #167257; background: #eaf6f0; }.mini-button.reject { color: #a6574e; background: #fff0ee; }
.date-filter { display: flex; align-items: flex-end; gap: 8px; }
.date-filter label { min-width: 110px; }
.date-filter input { min-width: 145px; }
.report-heading { align-items: flex-end; }
.report-banner { display: flex; min-height: 105px; align-items: center; justify-content: space-between; margin-bottom: 15px; padding: 19px 24px; overflow: hidden; border-radius: 10px; color: #fff; background: linear-gradient(110deg, #173b33, #1d5b49 70%, #27745a); }
.report-banner .eyebrow { color: #a7c7b9; }
.report-banner strong, .report-banner small { display: block; }
.report-banner strong { margin-top: 6px; font: 700 18px Manrope, sans-serif; }
.report-banner small { margin-top: 4px; color: #b4cfc3; font-size: 9px; }
.banner-mark { color: rgba(255,255,255,.12); font: 800 100px Manrope, sans-serif; line-height: .8; }
.report-metrics { margin-bottom: 17px; }
.report-metrics .metric-card > strong { font-size: 19px; }
tfoot th { padding-top: 13px; padding-bottom: 13px; border-top: 1px solid #e9eeeb; color: #43544d; background: #f7faf8; }
.report-footnote { margin: -4px 0 16px; color: #929d99; font-size: 9px; line-height: 1.6; }
.user-list { padding: 0 16px; }
.user-list-item { display: flex; align-items: center; gap: 10px; min-height: 62px; border-bottom: 1px solid #f0f2f1; }
.user-list-item:last-child { border-bottom: 0; }
.user-list-item > div:nth-child(2) { flex: 1; min-width: 0; }
.user-list-item strong, .user-list-item small { display: block; }
.user-list-item strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; }
.user-list-item small { margin-top: 4px; color: #9aa49f; font-size: 9px; }
.user-role { text-align: right; }
.user-role small { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.footer { padding: 15px 38px 19px; border-top: 1px solid var(--line); color: #a3ada9; font-size: 8px; font-weight: 700; letter-spacing: .12em; }
.footer span { padding: 0 5px; color: #c6cfcb; }

.auth-layout { display: grid; min-height: 100vh; grid-template-columns: minmax(300px, .95fr) minmax(420px, 1.05fr); background: #fff; }
.auth-brand { position: relative; display: flex; flex-direction: column; justify-content: space-between; padding: 38px 7vw 32px; overflow: hidden; color: #fff; background: radial-gradient(circle at 75% 72%, rgba(52,147,111,.35), transparent 34%), linear-gradient(145deg, #142d29, #1c473a 72%, #1c5b45); }
.auth-brand:after { position: absolute; right: -170px; bottom: -270px; width: 560px; height: 560px; border: 1px solid rgba(207,239,222,.09); border-radius: 50%; box-shadow: 0 0 0 45px rgba(207,239,222,.025), 0 0 0 95px rgba(207,239,222,.022); content: ""; }
.brand-light { z-index: 1; color: #fff; }
.brand-light .brand-mark { color: #135c47; background: #a5e0c3; }
.brand-light small { color: #a6c4b5; }
.auth-message { position: relative; z-index: 1; max-width: 500px; margin: auto 0; padding: 45px 0 55px; }
.auth-message .eyebrow { color: #9bc7b1; }
.auth-message h1 { margin: 20px 0 16px; font: 700 clamp(38px, 5vw, 58px)/1.13 Manrope, sans-serif; letter-spacing: -.06em; }
.auth-message > p:last-child { max-width: 390px; color: #bfd2c8; font-size: 13px; line-height: 1.8; }
.auth-foot { z-index: 1; color: #9ebcaf; font-size: 8px; font-weight: 700; letter-spacing: .2em; }
.auth-form-wrap { display: grid; place-items: center; padding: 35px; }
.auth-card { width: min(100%, 370px); }
.brand-mark-small { width: 34px; height: 34px; margin-bottom: 35px; border-radius: 10px; font-size: 19px; }
.auth-card .eyebrow { margin-bottom: 8px; color: #278267; }
.auth-card h2 { margin: 0 0 8px; font: 700 25px Manrope, sans-serif; letter-spacing: -.04em; }
.auth-card > .muted { margin-bottom: 24px; }
.auth-card label { margin-bottom: 15px; color: #52635d; font-size: 10px; }
.auth-card input { min-height: 42px; font-size: 12px; }
.auth-card .form-hint { margin-top: 18px; color: #9aa49f; font-size: 9px; line-height: 1.6; text-align: center; }

@media (max-width: 1120px) {
    .sidebar { width: 218px; }
    .main-content { margin-left: 218px; }
    .page-wrap { padding-right: 24px; padding-left: 24px; }
    .topbar { padding-right: 24px; padding-left: 24px; }
    .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .content-grid, .users-grid { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
    .sidebar { position: static; width: auto; padding: 12px; }
    .sidebar .brand { padding: 0 5px 11px; }
    .workspace-label, .sidebar-bottom { display: none; }
    .side-nav { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 2px; }
    .side-nav a { flex: 0 0 auto; min-height: 36px; gap: 6px; padding: 0 9px; font-size: 10px; }
    .side-nav a.active:before { inset: auto 8px -2px; width: auto; height: 2px; border-radius: 2px; }
    .nav-icon { width: 15px; font-size: 14px; }
    .main-content { margin-left: 0; }
    .topbar { height: 56px; padding: 0 15px; }
    .topbar-right { gap: 8px; }
    .topbar-right .live-pill { max-width: 130px; overflow: hidden; font-size: 7px; }
    .page-wrap { min-height: calc(100vh - 160px); padding: 23px 14px; }
    .page-heading, .welcome-row { align-items: flex-start; flex-direction: column; gap: 12px; }
    .page-heading h1, .welcome-row h1 { font-size: 22px; }
    .metric-grid { gap: 9px; }
    .metric-card { padding: 13px; }
    .metric-label { font-size: 7px; }
    .metric-card > strong { font-size: 17px; }
    .metric-card > small { font-size: 9px; }
    .form-grid { grid-template-columns: 1fr; }
    .form-grid-inner { gap: 10px; padding: 13px; }
    .panel-heading { padding-right: 13px; padding-left: 13px; }
    .date-filter { width: 100%; flex-wrap: wrap; }
    .date-filter label { flex: 1 0 100%; }
    .date-filter input { flex: 1; }
    .report-banner { min-height: 90px; padding: 16px; }
    .banner-mark { font-size: 75px; }
    .footer { padding: 13px 14px; font-size: 7px; }
    .auth-layout { grid-template-columns: 1fr; }
    .auth-brand { min-height: 225px; padding: 22px 24px 18px; }
    .auth-message { padding: 28px 0 20px; }
    .auth-message h1 { margin: 10px 0; font-size: 34px; }
    .auth-message > p:last-child { margin-bottom: 0; font-size: 11px; }
    .auth-foot { display: none; }
    .auth-form-wrap { padding: 34px 22px 50px; }
    .brand-mark-small { margin-bottom: 24px; }
}
