@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap");

:root {
  color-scheme: light;
  --ink: #20342c;
  --muted: #6b7a72;
  --green: #1f5b48;
  --green-deep: #183e32;
  --green-light: #e8f1ec;
  --paper: #f5f7f4;
  --white: #fff;
  --line: #e1e8e3;
  --amber: #b57022;
  --red: #aa463f;
  --shadow: 0 12px 32px rgb(27 59 45 / 6%);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "DM Sans", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }

.topbar {
  min-height: 76px;
  padding: 0 clamp(20px, 5vw, 72px);
  display: flex;
  align-items: center;
  gap: 38px;
  color: #f3f7f3;
  background: var(--green-deep);
  box-shadow: 0 4px 14px rgb(18 45 35 / 12%);
}
.brand { display: inline-flex; align-items: center; gap: 11px; flex: 0 0 auto; }
.brand-mark {
  display: grid; place-items: center; width: 36px; height: 36px;
  border: 1px solid rgb(220 238 225 / 33%); border-radius: 11px;
  color: #dcefe2; font-family: Manrope, sans-serif; font-weight: 800; font-size: 18px;
}
.brand-copy { display: grid; line-height: 1.1; gap: 4px; }
.brand-copy strong { font-family: Manrope, sans-serif; font-size: 14px; letter-spacing: -.25px; }
.brand-copy small { color: #9cb9a8; font-size: 9px; letter-spacing: 1.8px; font-weight: 700; }
.main-nav { display: flex; align-items: center; align-self: stretch; gap: 7px; }
.main-nav a {
  display: flex; align-items: center; align-self: stretch; padding: 2px 14px 0;
  color: #bdcec4; border-bottom: 2px solid transparent; font-size: 13px; transition: color .18s, border-color .18s;
}
.main-nav a:hover, .main-nav a.active { color: #fff; border-color: #a7cbb3; }
.account-menu { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.account-name { color: #e3ece6; font-size: 12px; font-weight: 600; }
.role-pill { border: 1px solid rgb(206 228 212 / 25%); border-radius: 99px; padding: 4px 9px; color: #b8d4c1; font-size: 10px; }
.account-link { color: #b5c9bd; font-size: 12px; }
.account-link:hover { color: #fff; }
.account-menu form { margin: 0; }
.logout-button { border: 0; background: transparent; padding: 8px 0 8px 6px; color: #d1dfd6; font-size: 12px; }
.logout-button:hover { color: #fff; }
.public-topbar {
  min-height: 72px; padding: 0 clamp(20px, 6vw, 90px); display: flex;
  align-items: center; justify-content: space-between; background: var(--green-deep);
}
.public-label { color: #b6c9bd; font-size: 12px; }

.page-shell { max-width: 1370px; width: 100%; margin: 0 auto; padding: 38px clamp(20px, 5vw, 72px) 56px; min-height: calc(100vh - 134px); }
.public-shell { display: grid; place-items: center; min-height: calc(100vh - 120px); padding-top: 50px; padding-bottom: 50px; }
.page-heading { margin: 0 0 24px; }
.page-heading h1 { margin: 5px 0 8px; font: 700 clamp(25px, 3vw, 34px)/1.2 Manrope, sans-serif; letter-spacing: -1.15px; }
.page-heading p { max-width: 700px; margin: 0; color: var(--muted); font-size: 14px; }
.heading-with-actions { display: flex; justify-content: space-between; align-items: flex-end; gap: 22px; }
.heading-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.eyebrow { display: inline-block; color: #72877a; font-size: 10px; letter-spacing: 1.35px; line-height: 1.4; font-weight: 700; }
.back-link { display: block; width: fit-content; margin: 0 0 16px; color: var(--green); font-weight: 600; font-size: 12px; }
.back-link:hover { color: var(--green-deep); }

.button {
  min-height: 40px; border: 1px solid transparent; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 0 16px; font-weight: 700; font-size: 12px; transition: transform .15s, background .15s, box-shadow .15s;
}
.button:hover { transform: translateY(-1px); }
.button-primary { background: var(--green); color: #fff; box-shadow: 0 3px 7px rgb(31 91 72 / 14%); }
.button-primary:hover { background: #184b3a; box-shadow: 0 6px 13px rgb(31 91 72 / 20%); }
.button-secondary { background: #fff; border-color: #dce5df; color: #344b3f; }
.button-secondary:hover { background: #f3f7f4; border-color: #c4d5ca; }
.button-ghost { background: transparent; color: #66776d; }
.button-ghost:hover { background: #f2f5f2; }
.button-danger-outline { border-color: #e6c8c5; color: #9c3f39; background: #fff; }
.button-danger-outline:hover { background: #fbf3f2; border-color: #d9a9a4; }
.button-wide { width: 100%; }
.text-link, .row-link { color: var(--green); font-size: 12px; font-weight: 700; white-space: nowrap; }
.text-link:hover, .row-link:hover { color: #123c2e; text-decoration: underline; text-underline-offset: 3px; }
.link-danger, .link-action { border: 0; background: transparent; padding: 5px 0; color: var(--red); font-size: 11px; font-weight: 700; }
.link-action { color: var(--green); }
.link-danger:hover, .link-action:hover { text-decoration: underline; }

.month-filter, .filter-bar {
  display: flex; align-items: flex-end; gap: 9px; padding: 12px 14px;
  background: rgb(255 255 255 / 77%); border: 1px solid var(--line); border-radius: 10px;
}
.month-filter label, .filter-bar label { display: grid; gap: 4px; color: #68776f; font-size: 10px; font-weight: 700; }
.month-filter-inline { width: fit-content; margin: -4px 0 18px; }
.month-filter input, .filter-bar input, .filter-bar select {
  min-height: 36px; padding: 0 10px; border: 1px solid #dce5df; border-radius: 7px;
  outline: none; background: white; color: var(--ink); font-size: 12px;
}
.month-filter input:focus, .filter-bar input:focus, .filter-bar select:focus { border-color: #7ca690; box-shadow: 0 0 0 3px rgb(64 124 91 / 12%); }
.filter-bar { width: fit-content; margin: 0 0 18px; }
.filter-bar label { min-width: 160px; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 24px 0; }
.metric-card {
  min-height: 139px; padding: 20px 21px; display: flex; flex-direction: column; align-items: flex-start;
  background: #fff; border: 1px solid var(--line); border-radius: 11px; box-shadow: 0 3px 12px rgb(37 63 48 / 2%);
}
.metric-card.metric-dark { background: var(--green-deep); border-color: var(--green-deep); color: #fff; }
.metric-label { color: #73837a; font-size: 11px; font-weight: 600; }
.metric-dark .metric-label { color: #b6cabb; }
.metric-card strong { margin-top: 11px; font: 700 29px/1 Manrope, sans-serif; letter-spacing: -.75px; }
.metric-card strong small { font: 600 12px "DM Sans", sans-serif; letter-spacing: 0; }
.metric-foot { margin-top: 9px; color: #89968f; font-size: 10px; }
.metric-dark .metric-foot { color: #aec1b5; }
.metric-link { margin-top: auto; padding-top: 11px; color: #426954; font-size: 11px; font-weight: 700; }
.metric-link:hover { color: #183e32; }
.employee-metrics { margin-top: 18px; }

.panel { margin: 18px 0; padding: 22px 24px 14px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin: 0 0 16px; }
.section-heading h2 { margin: 4px 0 2px; font: 700 17px/1.35 Manrope, sans-serif; letter-spacing: -.35px; }
.section-heading p { margin: 2px 0 0; color: #829087; font-size: 11px; }
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { padding: 10px 12px; color: #829087; border-bottom: 1px solid #e7ece8; font-size: 9px; letter-spacing: .75px; text-transform: uppercase; font-weight: 700; white-space: nowrap; }
td { padding: 12px; border-bottom: 1px solid #edf0ed; color: #3d5046; font-size: 12px; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fbfcfb; }
td strong { color: #2c4036; font-weight: 700; }
.table-sub { display: block; margin-top: 3px; color: #89968e; font-size: 10px; line-height: 1.4; }
.review-note { max-width: 220px; color: #9f514b; }
.person-cell { display: flex; align-items: center; gap: 9px; min-width: 155px; }
.person-cell > span:last-child { display: block; }
.avatar { width: 30px; height: 30px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; background: #edf4ef; color: #3c7258; font-weight: 700; font-size: 12px; }
.person-cell small { display: block; color: #8b9990; font-size: 10px; }
.status { display: inline-flex; align-items: center; width: fit-content; max-width: 190px; border-radius: 99px; padding: 5px 9px; font-size: 10px; line-height: 1.2; font-weight: 700; white-space: nowrap; }
.status::before { content: ""; width: 5px; height: 5px; border-radius: 99px; margin-right: 6px; background: currentColor; }
.status-approved, .status-active { background: #e8f3ec; color: #34734e; }
.status-pending { background: #fff3df; color: #96621c; }
.status-draft, .status-none { background: #eef1ef; color: #748078; }
.status-rejected { background: #faeae8; color: #a34840; }
.status-inactive { background: #f1eeec; color: #88766c; }
.actions-cell { white-space: nowrap; }
.actions-cell form { display: inline-block; margin-left: 9px; }
.empty-inline { padding: 28px 5px 32px; color: #819087; font-size: 12px; }
.empty-state { min-height: 225px; padding: 30px; display: flex; align-items: center; flex-direction: column; justify-content: center; text-align: center; }
.empty-icon { width: 37px; height: 37px; margin-bottom: 12px; display: grid; place-items: center; border-radius: 11px; background: var(--green-light); color: var(--green); font: 700 12px Manrope, sans-serif; }
.empty-state h3 { margin: 0 0 5px; font: 700 16px Manrope, sans-serif; }
.empty-state p { max-width: 380px; margin: 0 0 17px; color: #839087; font-size: 12px; }
.notice { margin: 16px 0; padding: 12px 14px; border: 1px solid; border-radius: 8px; font-size: 12px; }
.notice-info { border-color: #d8e8dd; background: #f0f6f2; color: #426550; }
.notice-warn { border-color: #eadbbc; background: #fff8e9; color: #875c1e; }
.notice strong { font-weight: 700; }

.form-card { width: 100%; max-width: 760px; padding: 26px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.compact-form { max-width: 540px; }
.form-card label { display: flex; flex-direction: column; gap: 6px; margin: 0 0 15px; color: #374b3f; font-size: 11px; font-weight: 700; }
.form-card input, .form-card textarea, .form-card select {
  width: 100%; min-height: 41px; padding: 9px 11px; border: 1px solid #dce5df; border-radius: 7px;
  outline: none; background: #fff; color: #263c31; font-size: 12px; font-weight: 400; transition: border .15s, box-shadow .15s;
}
.form-card textarea { min-height: 92px; resize: vertical; }
.form-card input:focus, .form-card textarea:focus, .form-card select:focus { border-color: #6f9a7e; box-shadow: 0 0 0 3px rgb(64 124 91 / 12%); }
.form-card label small { color: #849187; font-size: 10px; font-weight: 400; }
.form-card h2 { margin: 4px 0; font: 700 19px Manrope, sans-serif; letter-spacing: -.4px; }
.muted { color: #78867e; }
.required { color: #a84e46; }
.optional { color: #929c95; font-size: 10px; font-weight: 400; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.full-label { display: block; margin-top: 4px !important; }
.form-section-title { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 17px; }
.form-section-title > span { display: grid; place-items: center; width: 28px; height: 28px; flex: 0 0 auto; border-radius: 8px; background: #eaf2ed; color: var(--green); font-size: 10px; font-weight: 700; }
.form-section-title h2 { margin: 0 0 3px; font: 700 14px Manrope, sans-serif; }
.form-section-title p { margin: 0; color: #8a968e; font-size: 10px; }
.form-section-spaced { margin-top: 24px; padding-top: 22px; border-top: 1px solid #edf0ed; }
.form-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 9px; margin-top: 20px; padding-top: 17px; border-top: 1px solid #edf0ed; }
.entry-form { max-width: 800px; }
.filter-bar .button { align-self: flex-end; }

.expense-summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(185px, 1fr)); gap: 14px; margin: 20px 0; }
.expense-summary-grid .metric-card { min-height: 124px; }
.expense-summary-grid .metric-card strong { font-size: 25px; overflow-wrap: anywhere; }
.expense-summary-grid .metric-card strong small { margin-left: 2px; }
.expense-form { max-width: 900px; }
.expense-photo-section { padding-bottom: 22px; border-bottom: 1px solid #edf0ed; }
.expense-photo-section > div:first-child { margin-bottom: 13px; }
.expense-photo-section > div:first-child p { margin: 5px 0 0; font-size: 11px; }
.expense-photo-layout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: stretch; }
.expense-upload-tile {
  min-height: 210px; margin: 0 !important; padding: 19px; justify-content: center;
  border: 1px dashed #b9cbbf; border-radius: 11px; background: #f8faf8; cursor: pointer;
}
.expense-upload-tile:hover { border-color: #6f9a7e; background: #f3f8f4; }
.expense-upload-tile strong { color: #2f4e3d; font-size: 12px; }
.expense-upload-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: #e8f1eb; color: var(--green); font-size: 21px; }
.expense-upload-tile > span.muted { font-size: 10px; font-weight: 400; }
.expense-upload-tile input { min-height: 40px !important; padding: 5px !important; background: #fff !important; font-size: 10px !important; }
.expense-preview {
  min-height: 210px; padding: 12px; display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 7px; overflow: hidden; border: 1px solid #e5ece7;
  border-radius: 11px; background: #f6f8f6; color: #86948b; text-align: center;
}
.expense-preview img { display: block; max-width: 100%; max-height: 260px; object-fit: contain; border-radius: 5px; }
.expense-preview > span { max-width: 100%; overflow-wrap: anywhere; font-size: 10px; }
.expense-preview-empty { display: grid; gap: 8px; justify-items: center; font-size: 10px; }
.expense-preview-empty span:first-child { color: #91a196; font-size: 28px; }
.expense-preview-pdf { display: grid; justify-items: center; gap: 9px; max-width: 100%; color: #5e6f64; text-align: center; }
.expense-preview-pdf strong { max-width: 100%; overflow-wrap: anywhere; color: #34483c; font-size: 11px; }
.expense-preview-pdf > span:last-child { font-size: 10px; }
.expense-file-badge {
  width: 54px; height: 64px; display: grid; place-items: center; border-radius: 8px;
  background: #fbe9e6; color: #a83d31; font-size: 13px; font-weight: 800; letter-spacing: .04em;
}
.expense-scan-row { display: grid; grid-template-columns: max-content 1fr; gap: 13px; align-items: center; margin-top: 13px; }
.expense-scan-row .button { min-height: 42px; }
.expense-scan-message { margin: 0; color: #728277; font-size: 10px; line-height: 1.55; }
.expense-scan-message.is-error { color: #a34840; }
.expense-scan-row .button:disabled { cursor: wait; opacity: .65; transform: none; }
.expense-fields-section { margin-top: 23px; }
.expense-form .form-grid { margin-top: 15px; }
.expense-form .form-grid label { min-width: 0; }
.expense-form .form-grid .full-label { grid-column: 1 / -1; }
.expense-form .notice { line-height: 1.6; }
.expense-table { min-width: 850px; }
.expense-actions { display: flex; align-items: center; gap: 10px; }
.expense-actions form { margin: 0; }
.expense-actions .link-danger { white-space: nowrap; }

.auth-layout { width: min(940px, 100%); display: grid; grid-template-columns: 1fr minmax(330px, 400px); gap: clamp(30px, 7vw, 84px); align-items: center; }
.auth-intro { max-width: 440px; }
.auth-intro h1 { max-width: 440px; margin: 9px 0 14px; color: #f4f7f3; font: 700 clamp(30px, 4vw, 46px)/1.13 Manrope, sans-serif; letter-spacing: -1.8px; }
.auth-intro > p { margin: 0; color: #bdcbc2; font-size: 14px; line-height: 1.8; }
.auth-intro .eyebrow { color: #a3c2ae; }
.auth-note { display: flex; gap: 10px; align-items: center; margin-top: 28px; color: #d2dfd6; font-size: 11px; }
.note-icon { width: 23px; height: 23px; display: grid; place-items: center; border: 1px solid #789582; border-radius: 50%; color: #cce0d2; font-size: 11px; }
.auth-card { padding: 30px; background: white; border: 1px solid #e5ece7; border-radius: 14px; box-shadow: 0 20px 60px rgb(7 29 20 / 20%); }
.auth-card h2 { margin: 0 0 4px; font: 700 20px Manrope, sans-serif; letter-spacing: -.5px; }
.auth-card > p { margin: 0 0 22px; color: #8a968e; font-size: 11px; }
.auth-card label { display: flex; flex-direction: column; gap: 6px; margin-bottom: 15px; color: #364a3e; font-size: 11px; font-weight: 700; }
.auth-card input { min-height: 42px; padding: 9px 11px; border: 1px solid #dce5df; border-radius: 7px; outline: none; color: #253b30; font-size: 12px; }
.auth-card input:focus { border-color: #6f9a7e; box-shadow: 0 0 0 3px rgb(64 124 91 / 12%); }
.auth-card label small { color: #86948b; font-size: 9px; font-weight: 400; }
.auth-card .button { margin-top: 9px; }
.public-shell { background: radial-gradient(ellipse at 20% 40%, #255443 0, #183e32 62%, #15372d 100%); }
.public-shell .flash-stack { justify-self: stretch; align-self: end; margin-bottom: 12px; }
.public-shell:has(.auth-layout) { grid-template-rows: auto; }

.review-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(290px, .75fr); gap: 18px; align-items: start; }
.review-summary { margin: 0; }
.review-form { max-width: none; }
.review-form h2 { margin-top: 6px; }
.review-form > p { margin: 7px 0 20px; font-size: 11px; line-height: 1.6; }
.review-form .button + .button { margin-top: 10px; }
.detail-grid { margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; }
.detail-grid > div { padding: 13px 4px; border-bottom: 1px solid #edf0ed; }
.detail-grid dt { color: #829087; font-size: 10px; }
.detail-grid dd { margin: 3px 0 0; color: #30473a; font-size: 13px; font-weight: 700; }
.detail-total { grid-column: 1 / -1; }
.detail-total dd { color: var(--green); font-size: 18px; }
.notes-box { margin-top: 18px; padding: 14px; border-radius: 8px; background: #f5f8f5; }
.notes-box p { margin: 5px 0 0; color: #4c5e53; font-size: 12px; }

.flash-stack { width: min(100%, 920px); margin: 0 auto 16px; }
.flash { padding: 11px 14px; border: 1px solid; border-radius: 8px; font-size: 12px; }
.flash + .flash { margin-top: 7px; }
.flash-success { border-color: #cfe3d5; background: #edf7f0; color: #336749; }
.flash-error { border-color: #edd0cd; background: #fff1ef; color: #9e433d; }
.flash-info { border-color: #d8e8dd; background: #f0f6f2; color: #426550; }
.error-card { width: min(560px, 100%); margin: 60px auto; padding: 42px; text-align: center; background: white; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.error-code { color: #91aa9a; font: 800 12px Manrope, sans-serif; letter-spacing: 2px; }
.error-card h1 { margin: 9px 0; font: 700 23px Manrope, sans-serif; }
.error-card p { margin: 0 0 20px; color: #75847b; }
.footer { display: flex; justify-content: space-between; gap: 15px; padding: 13px clamp(20px, 5vw, 72px); border-top: 1px solid #e5ebe6; color: #87938c; background: #f9faf8; font-size: 10px; }

@media (max-width: 1000px) {
  .topbar { flex-wrap: wrap; gap: 0 18px; padding-top: 13px; }
  .main-nav { order: 3; width: 100%; height: 42px; }
  .main-nav a { padding-left: 10px; padding-right: 10px; }
  .account-menu { margin-left: auto; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .review-layout { grid-template-columns: 1fr; }
  .review-form { max-width: 620px; }
}
@media (max-width: 700px) {
  .topbar { padding-left: 17px; padding-right: 17px; }
  .account-name, .role-pill, .account-link { display: none; }
  .main-nav { gap: 2px; overflow-x: auto; }
  .main-nav a { white-space: nowrap; font-size: 11px; }
  .page-shell { padding: 26px 16px 42px; }
  .heading-with-actions { align-items: flex-start; flex-direction: column; }
  .heading-actions { width: 100%; }
  .heading-actions .month-filter { flex: 1; }
  .heading-actions .button { flex: 1; }
  .metric-grid { gap: 9px; margin: 17px 0; }
  .metric-card { min-height: 125px; padding: 15px; }
  .metric-card strong { font-size: 25px; }
  .panel { padding: 17px 14px 9px; }
  .section-heading { align-items: flex-start; }
  .section-heading .text-link { white-space: normal; text-align: right; }
  .month-filter-inline { width: 100%; }
  .month-filter-inline input { flex: 1; }
  .filter-bar { width: 100%; flex-wrap: wrap; }
  .filter-bar label { flex: 1; min-width: 130px; }
  th, td { padding: 10px 8px; }
  .form-card { padding: 20px 16px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-actions { justify-content: stretch; }
  .form-actions .button { flex: 1 1 auto; }
  .auth-layout { grid-template-columns: 1fr; gap: 23px; }
  .auth-intro h1 { font-size: 32px; }
  .auth-note { margin-top: 15px; }
  .auth-card { padding: 24px 19px; }
  .public-shell { align-items: start; }
  .public-label { font-size: 10px; }
  .footer { flex-direction: column; padding: 12px 17px; gap: 2px; }
  .detail-grid { grid-template-columns: 1fr 1fr; }
}

/* Employee month calendar */
.calendar-heading { margin-bottom: 20px; }
.calendar-heading h1 { margin-bottom: 5px; }
.calendar-form { --calendar-border: #dfe8e1; }
.calendar-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 17px 20px; margin-bottom: 12px; background: #fff;
  border: 1px solid var(--calendar-border); border-radius: 12px 12px 0 0;
}
.month-switcher { display: flex; align-items: center; gap: 13px; }
.month-title h2 { margin: 2px 0 0; color: var(--ink); font: 700 20px/1.25 Manrope, sans-serif; letter-spacing: -.55px; text-transform: capitalize; }
.month-title .eyebrow { font-size: 9px; }
.month-arrow {
  width: 35px; height: 35px; display: grid; place-items: center; border: 1px solid #dce6df;
  border-radius: 9px; color: #365a46; background: #fbfcfb; font: 400 26px/1 "DM Sans", sans-serif;
  transition: background .16s, border-color .16s, transform .16s;
}
.month-arrow:hover { background: #eff5f0; border-color: #b8cebf; transform: translateY(-1px); }
.month-arrow.is-disabled { color: #bdc8c0; background: #f8faf8; }
.calendar-key { display: flex; align-items: center; gap: 19px; color: #718078; font-size: 10px; }
.calendar-key span { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.key-dot { width: 8px; height: 8px; display: inline-block; border-radius: 50%; }
.key-editable { background: #4f8a67; }
.key-locked { background: #aebbb2; }
.key-weekend { background: #d1a354; }
.calendar-panel { overflow: hidden; background: #fff; border: 1px solid var(--calendar-border); border-radius: 0 0 12px 12px; box-shadow: var(--shadow); }
.weekday-headings, .calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.weekday-headings { min-height: 37px; align-items: center; background: #f5f8f5; border-bottom: 1px solid var(--calendar-border); }
.weekday-headings span { padding: 0 13px; color: #76867b; font-size: 9px; font-weight: 700; letter-spacing: .55px; text-transform: uppercase; }
.calendar-day {
  min-width: 0; min-height: 225px; padding: 12px 11px 10px; position: relative;
  background: #fff; border-right: 1px solid #e7ede8; border-bottom: 1px solid #e7ede8;
  transition: background .16s, box-shadow .16s;
}
.calendar-day:nth-child(7n) { border-right: 0; }
.calendar-day.is-editable:hover { z-index: 1; background: #fcfefc; box-shadow: inset 0 0 0 1px #b9d2c0; }
.calendar-day.is-weekend { background: #fbfaf6; }
.calendar-day.is-weekend.is-editable:hover { background: #fffdf8; box-shadow: inset 0 0 0 1px #dec995; }
.calendar-day.is-locked { background: #f8faf8; }
.calendar-day.is-weekend.is-locked { background: #f8f6f0; }
.day-topline { min-height: 31px; display: flex; align-items: flex-start; justify-content: space-between; gap: 5px; margin-bottom: 9px; }
.day-date { display: flex; align-items: baseline; gap: 6px; }
.day-weekday { display: none; color: #849188; font-size: 9px; }
.day-number { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; color: #385444; font: 700 12px Manrope, sans-serif; }
.is-weekend .day-number { color: #977340; }
.day-state { padding-top: 5px; color: #a0aaa3; font-size: 9px; font-weight: 600; }
.day-state.state-open { color: #538066; }
.day-state.state-alert { color: #a74b42; }
.calendar-day .status { max-width: 100%; padding: 4px 7px; font-size: 9px; }
.calendar-day .status::before { width: 5px; height: 5px; margin-right: 5px; }
.day-fields { display: grid; gap: 9px; }
.time-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 7px; }
.time-fields label { display: grid; gap: 4px; color: #849188; font-size: 9px; font-weight: 600; }
.time-fields input, .location-field input {
  width: 100%; min-width: 0; min-height: 33px; padding: 5px 7px; border: 1px solid #dfe7e1;
  border-radius: 6px; outline: none; background: #fff; color: #2c4435; font-size: 11px;
  font-variant-numeric: tabular-nums; transition: border-color .15s, box-shadow .15s, background .15s;
}
.time-fields input:focus, .location-field input:focus { border-color: #6e9b7b; box-shadow: 0 0 0 3px rgb(64 124 91 / 11%); background: #fff; }
.location-field { display: grid; gap: 4px; color: #849188; font-size: 9px; font-weight: 600; }
.location-field input { font-size: 10px; }
.location-field input::placeholder { color: #aab4ad; }
.day-overtime { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 1px 5px; padding-top: 7px; border-top: 1px solid #edf1ed; }
.day-overtime > span { color: #829087; font-size: 9px; }
.day-overtime strong { color: #34684a; font: 700 11px Manrope, sans-serif; white-space: nowrap; }
.day-overtime small { flex: 0 0 100%; color: #92a097; font-size: 8px; line-height: 1.35; }
.review-feedback { padding: 7px 8px; border-left: 2px solid #d19651; border-radius: 0 5px 5px 0; background: #fff8ed; }
.review-feedback span { color: #966529; font-size: 8px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; }
.review-feedback p { margin: 2px 0 0; color: #795c38; font-size: 9px; line-height: 1.4; overflow-wrap: anywhere; }
.day-readonly { display: grid; gap: 11px; }
.readonly-hours, .readonly-location { display: grid; gap: 2px; }
.readonly-hours span, .readonly-location span { color: #89968e; font-size: 9px; }
.readonly-hours strong, .readonly-location strong { color: #43574a; font-size: 11px; font-weight: 700; overflow-wrap: anywhere; }
.readonly-overtime { display: grid; gap: 3px; padding-top: 8px; border-top: 1px solid #e8ede9; color: #426b50; font-size: 10px; font-weight: 700; }
.readonly-overtime small { color: #89978e; font-size: 9px; font-weight: 400; }
.locked-message { margin: 8px 0 0; color: #89958d; font-size: 10px; line-height: 1.5; }
.calendar-padding { min-height: 225px; background: #f7f9f7; border-right: 1px solid #e7ede8; border-bottom: 1px solid #e7ede8; }
.calendar-bottom { display: grid; grid-template-columns: minmax(230px, .8fr) minmax(0, 1.2fr); gap: 18px; align-items: center; margin-top: 15px; }
.overtime-summary { min-height: 83px; display: flex; align-items: center; gap: 12px; padding: 13px 15px; background: #eaf2ec; border: 1px solid #d7e5da; border-radius: 10px; }
.summary-mark { width: 32px; height: 32px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 9px; background: #d4e5d9; color: #38684a; font: 700 16px Manrope, sans-serif; }
.summary-copy { min-width: 0; display: grid; gap: 2px; }
.summary-copy .eyebrow { color: #728b79; font-size: 8px; }
.summary-copy strong { color: #31533c; font: 700 13px Manrope, sans-serif; }
.summary-copy small { color: #718579; font-size: 9px; }
.overtime-summary > p { margin: 0 0 0 auto; max-width: 128px; color: #839287; font-size: 9px; line-height: 1.45; text-align: right; }
.calendar-actions { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 9px; }
.save-hint { margin-right: auto; color: #87938b; font-size: 10px; }
.calendar-actions .button { min-height: 42px; }
.calendar-form button:focus-visible, .calendar-form a:focus-visible, .calendar-form input:focus-visible { outline: 3px solid rgb(75 128 91 / 28%); outline-offset: 2px; }

@media (max-width: 1050px) {
  .calendar-day, .calendar-padding { min-height: 212px; padding-left: 8px; padding-right: 8px; }
  .weekday-headings span { padding: 0 8px; }
  .calendar-bottom { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .calendar-toolbar { align-items: flex-start; flex-direction: column; padding: 14px; }
  .calendar-key { flex-wrap: wrap; gap: 8px 14px; }
  .calendar-panel { overflow: visible; border: 0; background: transparent; box-shadow: none; }
  .weekday-headings { display: none; }
  .calendar-grid { grid-template-columns: 1fr; gap: 8px; }
  .calendar-padding { display: none; }
  .calendar-day { min-height: 0; padding: 12px; border: 1px solid var(--calendar-border); border-radius: 9px; }
  .calendar-day:nth-child(7n) { border-right: 1px solid var(--calendar-border); }
  .day-topline { align-items: center; min-height: 28px; margin-bottom: 9px; }
  .day-date { align-items: center; gap: 8px; }
  .day-weekday { display: inline; }
  .day-number { width: auto; height: auto; font-size: 13px; }
  .day-fields { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: end; }
  .time-fields { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; }
  .location-field { grid-column: 1 / -1; }
  .day-overtime { grid-column: 1 / -1; }
  .review-feedback { grid-column: 1 / -1; }
  .day-readonly { grid-template-columns: 1fr 1fr; align-items: start; }
  .locked-message, .review-feedback, .readonly-overtime { grid-column: 1 / -1; }
  .calendar-bottom { margin-top: 12px; }
  .overtime-summary { align-items: flex-start; }
  .overtime-summary > p { max-width: 105px; }
  .calendar-actions { justify-content: stretch; }
  .save-hint { flex: 1 0 100%; }
  .calendar-actions .button { flex: 1 1 100%; }
}
@media (max-width: 390px) {
  .overtime-summary { flex-wrap: wrap; }
  .overtime-summary > p { margin-left: 44px; max-width: none; text-align: left; }
}

/* Receipt review: keep the source document and editable values in view together. */
.expense-form {
  width: 100%;
  max-width: 1180px;
  padding: clamp(18px, 2.4vw, 30px);
}
.expense-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(330px, .92fr);
  gap: clamp(22px, 3vw, 38px);
  align-items: start;
}
.expense-photo-section {
  min-width: 0;
  padding: 0;
  border: 0;
}
.expense-section-intro { margin-bottom: 15px; }
.expense-section-intro .eyebrow { color: #708878; }
.expense-section-intro h2 {
  margin: 5px 0 4px;
  color: #2b4034;
  font: 700 18px/1.3 Manrope, sans-serif;
  letter-spacing: -.35px;
}
.expense-section-intro p { margin: 0; font-size: 11px; line-height: 1.55; }
.expense-upload-tile {
  min-height: 0;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  justify-content: initial;
  gap: 10px 12px;
  margin: 0 0 12px !important;
  padding: 13px 14px;
  border: 1px dashed #b9cbbf;
  border-radius: 10px;
  background: #f8faf8;
  cursor: pointer;
}
.expense-upload-tile:hover { border-color: #6f9a7e; background: #f3f8f4; }
.expense-upload-icon { width: 38px; height: 38px; grid-row: span 2; }
.expense-upload-copy { display: grid; gap: 2px; min-width: 0; }
.expense-upload-copy strong { color: #2f4e3d; font-size: 12px; }
.expense-upload-copy .muted { font-size: 10px; font-weight: 400; line-height: 1.4; }
.expense-upload-tile input {
  grid-column: 2;
  min-width: 0;
  min-height: 42px !important;
  padding: 6px !important;
  font-size: 11px !important;
}
.expense-preview {
  min-width: 0;
  min-height: 290px;
  padding: 10px;
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  gap: 0;
  overflow: hidden;
  border-color: #dfe8e1;
  background: #edf1ed;
  text-align: left;
}
.expense-preview img {
  width: 100%;
  max-width: 100%;
  max-height: min(64vh, 650px);
  object-fit: contain;
  border-radius: 4px;
}
.expense-document-frame {
  display: block;
  width: 100%;
  height: min(68vh, 700px);
  min-height: 370px;
  flex: 1 1 auto;
  border: 0;
  border-radius: 5px;
  background: #e5e9e5;
}
.expense-preview-caption {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 7px 12px;
  width: 100%;
  padding: 9px 3px 2px;
  color: #66776c;
  font-size: 10px;
}
.expense-preview-name { min-width: 0; overflow-wrap: anywhere; color: #405448; font-weight: 600; }
.expense-preview-caption .row-link { min-height: 36px; display: inline-flex; align-items: center; white-space: normal; }
.expense-preview-empty {
  min-height: 258px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 7px;
  color: #74847a;
  font-size: 11px;
  text-align: center;
}
.expense-preview-empty strong { color: #43594a; font-size: 12px; }
.expense-empty-mark {
  width: 45px;
  height: 52px;
  display: grid;
  place-items: center;
  margin-bottom: 3px;
  border: 1px solid #cfdbd1;
  border-radius: 7px;
  background: #f8faf8;
  color: #688271;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .06em;
}
.expense-pdf-note { margin: 8px 0 0; color: #86938a; font-size: 10px; line-height: 1.5; }
.expense-fields-section {
  min-width: 0;
  margin: 0;
  padding: 2px 0 0;
}
.expense-fields-section .form-section-title { margin-bottom: 12px; }
.expense-fields-section .form-section-title p { font-size: 11px; line-height: 1.5; }
.expense-scan-row {
  grid-template-columns: minmax(0, max-content) minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  margin: 0 0 19px;
  padding: 12px;
  border: 1px solid #e4ece6;
  border-radius: 9px;
  background: #f7faf7;
}
.expense-scan-row .button { min-height: 44px; }
.expense-scan-message { padding-top: 2px; font-size: 10px; }
.expense-form .form-grid { gap: 0 14px; margin-top: 0; }
.expense-form .form-grid label {
  min-width: 0;
  margin-bottom: 14px;
  gap: 6px;
  color: #42554a;
  font-size: 11px;
}
.expense-form .form-grid input { min-height: 46px; font-size: 13px; }
.expense-form .form-grid .full-label { margin-top: 0 !important; }
.expense-form .notice { margin-top: 2px; padding: 11px 12px; font-size: 10px; }
.expense-form .form-actions { margin-top: 22px; }
.expense-form :focus-visible {
  outline: 3px solid rgb(75 128 91 / 34%);
  outline-offset: 2px;
}

@media (max-width: 900px) {
  .expense-workspace { grid-template-columns: minmax(0, 1fr) minmax(300px, .95fr); gap: 22px; }
  .expense-scan-row { grid-template-columns: 1fr; }
  .expense-scan-row .button { width: 100%; }
  .expense-document-frame { height: 58vh; min-height: 330px; }
}
@media (max-width: 700px) {
  .expense-form { padding: 19px 16px; }
  .expense-workspace { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .expense-photo-section { padding-bottom: 21px; border-bottom: 1px solid #edf0ed; }
  .expense-upload-tile { grid-template-columns: 34px minmax(0, 1fr); padding: 12px; }
  .expense-upload-icon { width: 34px; height: 34px; }
  .expense-upload-tile input { grid-column: 1 / -1; }
  .expense-preview { min-height: 240px; }
  .expense-document-frame { height: 58vh; min-height: 300px; }
  .expense-preview img { max-height: 55vh; }
  .expense-preview-empty { min-height: 218px; }
  .expense-fields-section .form-grid { grid-template-columns: minmax(0, 1fr); }
  .expense-form .form-grid .full-label { grid-column: auto; }
  .expense-scan-row { padding: 11px; }
  .expense-form .form-actions { flex-direction: column-reverse; }
  .expense-form .form-actions .button { width: 100%; min-height: 48px; }
}

/* Spreadsheet-style employee timesheet */
.timesheet-toolbar {
  align-items: center;
  padding: 16px 20px;
  margin-bottom: 12px;
  border: 1px solid #dfe8e1;
  border-radius: 12px;
  background: #fff;
}
.timesheet-toolbar .month-filter { display: flex; align-items: center; gap: 9px; }
.timesheet-toolbar .month-filter label { margin: 0; color: #728078; font-size: 10px; font-weight: 700; }
.timesheet-toolbar .month-filter input { min-height: 38px; }
.table-help {
  margin: 0 0 12px; padding: 11px 14px; border: 1px solid #e1e9e2;
  border-radius: 9px; background: #f7faf7; color: #6f7e74; font-size: 11px; line-height: 1.5;
}
.table-help strong { color: #3a5945; }
.timesheet-panel { padding: 0; overflow: hidden; }
.timesheet-wrap { max-height: min(68vh, 760px); overflow: auto; }
.timesheet-table { min-width: 1120px; border-collapse: separate; border-spacing: 0; }
.timesheet-table thead th {
  position: sticky; top: 0; z-index: 3; min-height: 38px; padding: 11px 12px;
  background: #f2f6f2; color: #718078; border-bottom: 1px solid #dfe8e1;
  font-size: 9px; letter-spacing: .35px; text-transform: uppercase; white-space: nowrap;
}
.timesheet-table tbody td {
  padding: 7px 10px; border-bottom: 1px solid #e9eeea; vertical-align: middle;
}
.timesheet-table tbody tr:last-child td { border-bottom: 0; }
.timesheet-table tbody tr:not(.is-locked):hover td { background: #f7fbf7; }
.timesheet-table tbody tr.is-weekend td { background: #fbfaf6; }
.timesheet-table tbody tr.is-locked td { background: #f8faf8; }
.timesheet-table tbody tr.is-weekend.is-locked td { background: #f8f6f0; }
.timesheet-date { min-width: 110px; white-space: nowrap; }
.timesheet-date strong, .timesheet-date small { display: block; }
.timesheet-date strong { color: #385444; font-size: 11px; }
.timesheet-date small { margin-top: 2px; color: #8b978f; font-size: 9px; }
.timesheet-table select, .timesheet-table input {
  min-height: 34px; padding: 5px 8px; border: 1px solid #dce5de;
  border-radius: 6px; outline: none; background: #fff; color: #314739;
  font: 400 11px "DM Sans", sans-serif;
}
.timesheet-table select { width: 175px; }
.timesheet-table input:focus, .timesheet-table select:focus {
  border-color: #6e9b7b; box-shadow: 0 0 0 3px rgb(64 124 91 / 11%);
}
.timesheet-table input:disabled, .timesheet-table select:disabled {
  background: #f3f5f3; color: #7f8b82; opacity: 1;
}
.timesheet-time { width: 105px; font-variant-numeric: tabular-nums; }
.timesheet-location { width: 190px; }
.timesheet-overtime { min-width: 170px; }
.timesheet-overtime strong, .timesheet-overtime small { display: block; white-space: nowrap; }
.timesheet-overtime strong { color: #34684a; font: 700 11px Manrope, sans-serif; }
.timesheet-overtime small { margin-top: 2px; color: #89978e; font-size: 9px; }
.timesheet-status { min-width: 155px; }
.timesheet-status .status { white-space: nowrap; font-size: 9px; }
.timesheet-status .table-sub { max-width: 190px; white-space: normal; overflow-wrap: anywhere; }
.timesheet-status .day-state { color: #538066; font-size: 10px; }
.monthly-review-form { margin-top: 16px; }
.monthly-review-note { display: grid; gap: 7px; color: #4d6254; font-size: 11px; font-weight: 700; }
.monthly-review-note span { color: #8b968e; font-size: 10px; font-weight: 400; }
.monthly-review-note textarea {
  width: 100%; min-height: 80px; padding: 10px 11px; border: 1px solid #dce5de;
  border-radius: 7px; resize: vertical; color: #314739; font-size: 12px;
}
.button-danger { border-color: #a34e46; background: #a34e46; color: #fff; }
.button-danger:hover { border-color: #883e38; background: #883e38; }
.timesheet-form button:focus-visible,
.timesheet-form input:focus-visible,
.timesheet-form select:focus-visible {
  outline: 3px solid rgb(75 128 91 / 28%); outline-offset: 2px;
}

@media (max-width: 700px) {
  .timesheet-toolbar { align-items: stretch; gap: 13px; padding: 14px; }
  .timesheet-toolbar .month-filter { flex-wrap: wrap; }
  .timesheet-toolbar .month-filter label { flex: 1 0 100%; }
  .timesheet-toolbar .month-filter input { flex: 1 1 140px; }
  .timesheet-toolbar .month-filter .button { flex: 0 0 auto; }
  .timesheet-wrap { max-height: 65vh; }
  .timesheet-bottom { grid-template-columns: 1fr; }
  .timesheet-bottom .overtime-summary { align-items: flex-start; }
  .timesheet-bottom .overtime-summary > p { max-width: 120px; }
  .timesheet-bottom .calendar-actions { justify-content: stretch; }
  .timesheet-bottom .save-hint { flex: 1 0 100%; }
  .timesheet-bottom .calendar-actions .button { flex: 1 1 100%; }
}

/* Shared responsive refinements */
:where(a, button, input, select, textarea):focus-visible {
  outline: 3px solid rgb(75 128 91 / 32%);
  outline-offset: 2px;
}
.topbar { position: relative; }
.main-nav, .account-menu { min-width: 0; }
.account-menu { flex-wrap: wrap; }
.table-wrap {
  overscroll-behavior-x: contain;
  scrollbar-color: #a9bdb0 #f2f5f2;
  scrollbar-width: thin;
}
.table-wrap::-webkit-scrollbar { height: 8px; }
.table-wrap::-webkit-scrollbar-track { background: #f2f5f2; border-radius: 8px; }
.table-wrap::-webkit-scrollbar-thumb { background: #a9bdb0; border: 2px solid #f2f5f2; border-radius: 8px; }
.review-note, td { overflow-wrap: anywhere; }
.role-chip {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
}
.role-chip-admin { color: #654d8d; background: #f1ecf8; border-color: #e7def2; }
.role-chip-employee { color: #3d6d50; background: #eaf3ec; border-color: #dceade; }
.account-table { min-width: 900px; }
.account-actions { min-width: 175px; white-space: nowrap; }
.account-actions form { margin: 0; }
.account-actions form, .account-actions a { display: inline-flex; margin-right: 10px; }
.admin-people-table { min-width: 790px; }
.admin-recent-table { min-width: 790px; }
.admin-entries-table { min-width: 740px; }
.employee-history-table { min-width: 700px; }
.employee-detail-table { min-width: 960px; }
.monthly-review-table { min-width: 700px; }
.month-filter input, .filter-bar input, .filter-bar select { min-width: 0; }
.auth-card, .form-card, .panel, .metric-card { min-width: 0; }

@media (max-width: 1000px) {
  .topbar { column-gap: 16px; }
  .account-menu { gap: 9px; }
  .heading-actions { flex-wrap: wrap; }
  .page-heading p, .section-heading p { overflow-wrap: anywhere; }
}

@media (max-width: 700px) {
  .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0 10px;
    min-height: 0;
    padding: 11px 15px 0;
  }
  .brand { grid-column: 1; grid-row: 1; }
  .account-menu {
    grid-column: 2;
    grid-row: 1;
    justify-content: flex-end;
    align-items: center;
    gap: 4px 10px;
  }
  .account-name, .role-pill { display: none; }
  .account-link {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    color: #d1dfd6;
    font-size: 11px;
  }
  .logout-button { min-height: 40px; padding: 8px 0 8px 4px; font-size: 11px; }
  .main-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    height: 47px;
    margin-top: 7px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
    scrollbar-color: #6f927e transparent;
    scroll-snap-type: x proximity;
  }
  .main-nav a { flex: 0 0 auto; min-height: 44px; padding-inline: 12px; scroll-snap-align: start; }
  .page-shell { min-height: calc(100svh - 128px); padding: 24px 14px 36px; }
  .public-shell { min-height: calc(100svh - 120px); }
  .page-heading { margin-bottom: 19px; }
  .page-heading h1 { letter-spacing: -.7px; }
  .heading-with-actions { gap: 14px; }
  .heading-actions { width: 100%; }
  .heading-actions .month-filter { flex: 1 1 100%; min-width: 0; }
  .heading-actions > .button { flex: 1 1 auto; }
  .section-heading { flex-wrap: wrap; }
  .section-heading .text-link { text-align: left; }
  .panel { margin-block: 14px; }
  .month-filter-inline { display: flex; flex-wrap: wrap; gap: 8px; }
  .month-filter-inline label { flex: 1 0 100%; }
  .month-filter-inline input { flex: 1 1 140px; }
  .month-filter-inline .button { flex: 0 0 auto; }
  .table-wrap { border-radius: 8px; }
  .table-wrap table:not(.account-table) { max-width: none; }
  .admin-people-table, .admin-recent-table, .admin-entries-table,
  .employee-history-table, .employee-detail-table, .monthly-review-table {
    font-size: 11px;
  }
  .account-table-wrap { overflow: visible; }
  .account-table { display: block; width: 100%; min-width: 0; }
  .account-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
  .account-table tbody { display: grid; gap: 11px; }
  .account-table tbody tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 15px;
    padding: 5px 13px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 4px 14px rgb(27 59 45 / 5%);
  }
  .account-table tbody tr:hover { background: #fff; }
  .account-table tbody td {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    padding: 10px 0;
    border-bottom: 1px solid #edf0ed;
    overflow-wrap: anywhere;
  }
  .account-table tbody td::before {
    content: attr(data-label);
    color: #829087;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .55px;
    text-transform: uppercase;
  }
  .account-table tbody td:first-child,
  .account-table tbody td:nth-child(4),
  .account-table tbody td:last-child { grid-column: 1 / -1; }
  .account-table tbody td:first-child { padding-top: 12px; }
  .account-table tbody td:last-child { border-bottom: 0; }
  .account-actions { flex-direction: row !important; align-items: center !important; gap: 8px; white-space: normal; }
  .account-actions form, .account-actions a { margin: 0 8px 0 0; }
  .account-table .person-cell { min-width: 0; }
  .account-table .status { white-space: normal; }
  .form-card { padding: 21px 17px; }
  .form-actions { gap: 8px; }
  .form-actions .button { min-height: 44px; }
  .monthly-review-form .form-actions .button { flex: 1 1 100%; }
  .timesheet-wrap { max-height: 65vh; }
  .timesheet-table thead th { padding-inline: 10px; }
  .timesheet-table input, .timesheet-table select { min-height: 40px; }
  .footer { padding-bottom: max(12px, env(safe-area-inset-bottom)); }
}

@media (max-width: 420px) {
  .topbar { padding-inline: 12px; }
  .brand { gap: 8px; }
  .brand-copy strong { font-size: 12px; }
  .account-menu { gap: 3px 8px; }
  .account-link, .logout-button { font-size: 10px; }
  .page-shell { padding-inline: 12px; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .metric-card { min-height: 116px; padding: 13px 11px; }
  .metric-card strong { font-size: 22px; }
  .metric-label, .metric-foot { overflow-wrap: anywhere; }
  .auth-card { padding: 22px 17px; }
  .account-table tbody tr { column-gap: 10px; padding-inline: 11px; }
}

@media (max-width: 350px) {
  .metric-grid { grid-template-columns: 1fr; }
  .account-table tbody tr { grid-template-columns: 1fr; }
  .account-table tbody td:first-child,
  .account-table tbody td:nth-child(4),
  .account-table tbody td:last-child { grid-column: 1; }
}

@media (max-width: 700px) {
  .expense-scan-row { grid-template-columns: 1fr; gap: 7px; }
  .expense-scan-row .button { width: 100%; min-height: 46px; }
  .expense-form .form-grid { grid-template-columns: 1fr; }
  .expense-form .form-grid .full-label { grid-column: 1; }
  .expense-summary-grid { grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: 9px; }
  .expense-summary-grid .metric-card { min-height: 112px; padding: 14px; }
  .expense-summary-grid .metric-card strong { font-size: 21px; }
  .expense-actions { flex-wrap: wrap; }
  .expense-form .form-actions .button { flex: 1 1 auto; min-height: 46px; }
  .month-filter-inline { width: 100%; }
  .month-filter-inline label { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}