/* Amuma Cleaning — "Warm linen & deep teal" (from the landing page mockup) */
:root {
  --ground: #F5F1E8;
  --surface: #FFFFFF;
  --ink: #14302C;
  --teal: #174A43;
  --teal-deep: #123B35;
  --muted: #4A5752;
  --line: #E2DBCB;
  --field-line: #938A76; /* 3:1 against white and the page, for inputs (WCAG 1.4.11) */
  --accent: #E3A13B;
  --ok: #1F7A5C;
  --ok-tint: #E4F0EC;
  --warn-tint: #FDF1DD;
  --warn-ink: #7A4A06;
  --danger: #9B2C2C;
  --display: "Fraunces", Georgia, serif;
  --body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 20px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--ink); font-family: var(--body); font-size: 17px; line-height: 1.55; }
img { max-width: 100%; height: auto; }
a { color: var(--teal); }
a:hover { color: #0E2E2A; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
main:focus { outline: none; }
.skip-link { position: absolute; left: 16px; top: -100px; z-index: 100; padding: 12px 18px; background: var(--teal); color: #fff; border-radius: 12px; font-weight: 700; }
.skip-link:focus { top: 12px; color: #fff; }
h1, h2, h3 { line-height: 1.12; margin: 0; }
h1, h2 { font-family: var(--display); font-weight: 600; letter-spacing: -0.015em; }
p { margin: 0; }
.wrap { width: min(1248px, 100% - 40px); margin-inline: auto; }
.narrow { width: min(720px, 100% - 40px); margin-inline: auto; }
.muted { color: var(--muted); }
.small { font-size: 15px; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: var(--ground); position: sticky; top: 0; z-index: 10; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-name { font-family: var(--display); font-size: 27px; font-weight: 600; }
.brand-tag { font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); padding-top: 4px; }
.nav { display: flex; gap: 30px; font-weight: 500; }
.nav a { text-decoration: none; color: var(--ink); white-space: nowrap; }
.nav a:hover { text-decoration: underline; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.short-label { display: none; }
.menu { position: relative; display: none; }
.menu-toggle { list-style: none; display: grid; place-items: center; width: 48px; height: 48px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); cursor: pointer; }
.menu-toggle::-webkit-details-marker { display: none; }
.menu[open] .menu-toggle { border-color: var(--teal); }
.menu-panel { position: absolute; right: 0; top: calc(100% + 10px); width: min(280px, calc(100vw - 32px)); padding: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 16px 40px rgba(20, 48, 44, 0.14); display: flex; flex-direction: column; gap: 2px; }
.menu-panel a:not(.btn) { display: flex; align-items: center; min-height: 48px; padding: 0 14px; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 500; }
.menu-panel a:not(.btn):hover { background: var(--ground); }
.menu-panel .btn { margin-top: 8px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; white-space: nowrap; text-align: center; border-radius: 999px; font: inherit; font-size: 16px; font-weight: 700; text-decoration: none; cursor: pointer; border: 1.5px solid transparent; }
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: #0E2E2A; color: #fff; }
.btn-outline { border-color: var(--teal); color: var(--teal); background: transparent; }
.btn-lg { min-height: 58px; padding: 0 30px; font-size: 17px; }
.btn-block { width: 100%; }
.btn-outline:hover { background: var(--ok-tint); color: var(--teal); }
.btn-danger { border-color: var(--danger); color: var(--danger); background: transparent; }
.btn-danger:hover { background: #F9E3E3; color: var(--danger); }

/* Hero */
.hero { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 64px; align-items: center; padding: 80px 0 88px; }
.pill { display: inline-flex; align-items: center; gap: 10px; padding: 7px 15px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; font-size: 14px; font-weight: 700; }
.dot { width: 8px; height: 8px; border-radius: 999px; background: var(--accent); display: inline-block; }
.hero-copy { display: flex; flex-direction: column; gap: 26px; align-items: flex-start; }
.hero h1 { font-size: clamp(40px, 5.2vw, 68px); line-height: 1.04; letter-spacing: -0.02em; }
.hero .lede { font-size: 20px; color: var(--muted); max-width: 34em; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; }

/* Tracker card (hero + status page) */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.tracker { padding: 30px; display: flex; flex-direction: column; gap: 20px; box-shadow: 0 24px 60px rgba(20, 48, 44, 0.10); }
.tracker-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.ref-label { font-size: 13px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.ref { font-family: var(--display); font-size: 34px; font-weight: 600; letter-spacing: 0.02em; }
.badge { display: inline-flex; align-items: center; gap: 8px; padding: 7px 13px; border-radius: 999px; font-size: 14px; font-weight: 700; background: var(--ok-tint); color: var(--teal); white-space: nowrap; }
.badge .dot { background: var(--ok); }
.badge.wait { background: var(--warn-tint); color: var(--warn-ink); }
.badge.wait .dot { background: var(--accent); }
.badge.off { background: #EEEAE0; color: #4F4A40; }
.badge.off .dot { background: #8B8577; }
.steps { list-style: none; margin: 0; padding: 0; }
.step { display: grid; grid-template-columns: 26px 1fr; gap: 16px; position: relative; padding-bottom: 22px; }
.step:last-child { padding-bottom: 0; }
.step::before { content: ""; position: absolute; left: 12px; top: 26px; bottom: 0; width: 2px; background: var(--line); }
.step.done::before { background: var(--teal); }
.step:last-child::before { display: none; }
.marker { width: 26px; height: 26px; border-radius: 999px; border: 2px solid #C9C1AE; background: var(--surface); display: grid; place-items: center; }
.step.done .marker { background: var(--teal); border-color: var(--teal); }
.step.current .marker { border: 6px solid var(--accent); }
.step-body { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 1px; }
.step.current .step-label { font-weight: 700; }
.step.upcoming .step-label { color: var(--muted); }
.step-time { font-size: 14px; color: var(--muted); }
.note { padding: 14px 18px; background: var(--ground); border-radius: 14px; font-size: 15px; }
.note.warn { background: var(--warn-tint); color: var(--warn-ink); }

/* Promise strip */
.promises { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; padding: 30px 34px; }
.promise { display: flex; gap: 14px; align-items: flex-start; }
.promise strong { display: block; }

/* Sections */
.section { padding-top: 112px; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 48px; margin-bottom: 40px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(34px, 3.4vw, 48px); max-width: 16em; }
.section-head p { max-width: 28em; color: var(--muted); font-size: 18px; }
.kicker { font-size: 14px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; display: block; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 48px; }
.price-card { padding: 30px; display: flex; flex-direction: column; gap: 18px; }
.price-card .amount { font-family: var(--display); font-size: 52px; font-weight: 600; line-height: 1; }
.price-card .per { font-size: 15px; color: var(--muted); }
.step-num { width: 52px; height: 52px; border-radius: 999px; background: var(--accent); display: grid; place-items: center; font-family: var(--display); font-size: 24px; font-weight: 600; }
.how-step { display: flex; flex-direction: column; gap: 14px; }
.how-step h3 { font-size: 22px; }
.how-step p { color: var(--muted); }
.gcash-band { margin-top: 112px; padding: 68px 76px; background: var(--teal-deep); color: #D5E3DE; border-radius: 28px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 72px; align-items: center; }
.gcash-band h2 { color: #fff; font-size: clamp(32px, 3.2vw, 46px); margin-bottom: 20px; }
.gcash-band .kicker { color: #C9DBD5; }
.gcash-band p + p { margin-top: 16px; }
.pay-card { padding: 28px; display: flex; flex-direction: column; gap: 14px; color: var(--ink); }
.pay-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px; border: 1px solid var(--line); border-radius: 14px; }
.pay-row.key { border: 2px solid var(--accent); background: #FFFBF3; }
.pay-row .lbl { font-size: 13px; color: var(--muted); display: block; }
.pay-row .val { font-size: 20px; font-weight: 700; }
.copy { min-height: 44px; padding: 0 16px; background: var(--ground); border: 0; border-radius: 10px; font: inherit; font-size: 14px; font-weight: 700; color: var(--teal); cursor: pointer; }
.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 11px; font-size: 15px; }
.checklist li { display: flex; gap: 10px; }
.room { padding: 28px; display: flex; flex-direction: column; gap: 16px; }
.room h3, .who h3 { font-size: 20px; }
.who { padding: 34px; border-radius: 22px; display: flex; flex-direction: column; gap: 12px; }
.who h3 { font-family: var(--display); font-size: 28px; font-weight: 600; }
.faq-item { padding: 26px 0; border-top: 1px solid #D8D0BE; display: flex; flex-direction: column; gap: 8px; }
.faq-item h3 { font-size: 20px; }
.faq-item p { color: var(--muted); }
.cta-band { margin-top: 112px; padding: 52px 60px; background: var(--accent); border-radius: 28px; display: flex; justify-content: space-between; align-items: center; gap: 32px; flex-wrap: wrap; }
.cta-band h2 { font-size: 44px; }
.site-footer { margin-top: 96px; padding: 52px 0; background: var(--ink); color: #D5E3DE; font-size: 15px; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 48px; flex-wrap: wrap; }
.site-footer a { color: #D5E3DE; }
.footer-cols { display: flex; gap: 56px; flex-wrap: wrap; }
.footer-cols div { display: flex; flex-direction: column; gap: 8px; }
.footer-cols strong { color: #fff; }

/* Forms */
.page { padding: 56px 0 96px; }
.page h1 { font-size: clamp(34px, 4vw, 48px); margin-bottom: 12px; }
.book-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 40px; align-items: start; }
.form-card { padding: 32px; display: flex; flex-direction: column; gap: 28px; }
fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
legend { font-family: var(--display); font-size: 26px; font-weight: 600; margin-bottom: 6px; padding: 0; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .field-label { font-weight: 700; font-size: 16px; }
.field .help { font-size: 14px; color: var(--muted); }
.field .errorlist { list-style: none; margin: 0; padding: 0; color: var(--danger); font-size: 14px; font-weight: 500; }
.field-error .errorlist { display: flex; flex-direction: column; gap: 2px; }
.field-error .errorlist li::before { content: "⚠ "; }
.has-error input:not([type=radio]):not([type=checkbox]), .has-error textarea, .has-error select { border-color: var(--danger); border-width: 2px; }
.has-error .choices .opt { border-color: var(--danger); }
.optional { font-weight: 400; color: var(--muted); }
fieldset.choice-group { gap: 8px; min-width: 0; }
fieldset.choice-group > legend { font-family: var(--body); font-size: 16px; font-weight: 700; margin-bottom: 8px; letter-spacing: 0; }
input[type=file] { font: inherit; font-size: 15px; width: 100%; padding: 10px; border: 1.5px dashed var(--field-line); border-radius: 12px; background: #fff; }
input[type=file]::file-selector-button { font: inherit; font-weight: 700; margin-right: 12px; min-height: 40px; padding: 0 16px; border: 1.5px solid var(--teal); border-radius: 999px; background: transparent; color: var(--teal); cursor: pointer; }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=date], input[type=time], input[type=month], input[type=number], input:not([type]), textarea, select {
  font: inherit; width: 100%; padding: 12px 14px; min-height: 48px; border: 1.5px solid var(--field-line); border-radius: 12px; background: #fff; color: var(--ink);
}
textarea { min-height: 80px; }
.choices { display: flex; flex-wrap: wrap; gap: 10px; }
.choices label { display: inline-flex; position: relative; }
.choices input[type=radio], .choices input[type=checkbox] { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choices .opt { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 10px 16px; border: 1.5px solid var(--field-line); border-radius: 12px; background: #fff; cursor: pointer; font-weight: 500; }
.choices input:checked + .opt { border-color: var(--teal); background: var(--ok-tint); font-weight: 700; }
.choices input:focus-visible + .opt { outline: 3px solid var(--accent); outline-offset: 2px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
.check, .field > label.check { min-height: 44px; padding: 8px 0; cursor: pointer; font-weight: 500; }
.check input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--teal); flex-shrink: 0; }
.book-layout:has(#id_someone_else_paying:not(:checked)) .payer-only:not(:has(.has-error)) { display: none; }
.review { padding: 18px 20px; background: var(--ground); border-radius: 14px; }
.review-list { margin: 0; display: flex; flex-direction: column; gap: 10px; font-size: 15px; }
.review-list > div { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 12px; }
.review-list dt { font-weight: 700; }
.review-list dd { margin: 0; overflow-wrap: anywhere; }
.mobile-total { display: none; }
.row-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.summary { position: sticky; top: 96px; padding: 26px; display: flex; flex-direction: column; gap: 14px; }
.summary h2 { font-size: 24px; }
.sum-line { display: flex; justify-content: space-between; gap: 12px; }
.sum-total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 14px; border-top: 1px solid var(--line); }
.sum-total strong { font-family: var(--display); font-size: 34px; }
.alert { padding: 14px 18px; border-radius: 14px; background: var(--ok-tint); color: var(--teal); font-weight: 500; }
.alert.error { background: #F9E3E3; color: var(--danger); }
.big-ref { font-family: var(--display); font-size: clamp(48px, 9vw, 76px); font-weight: 600; letter-spacing: 0.03em; }
.stack { display: flex; flex-direction: column; gap: 18px; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.photos img { border-radius: 12px; aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Status page */
.tracker h1.ref { font-size: 34px; margin: 0; }
.pay-row > div { min-width: 0; }
.pay-row .val { overflow-wrap: anywhere; }
.pay-layout { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: start; }
.qr { margin: 0; width: 200px; display: flex; flex-direction: column; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 14px; }
.qr img { width: 180px; height: 180px; image-rendering: pixelated; }
.slot-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.slot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px; border: 1px solid var(--line); border-radius: 14px; }
.manage { padding: 24px 28px; display: flex; flex-direction: column; gap: 12px; }
.manage h2 { font-size: 22px; }

/* Policy pages */
.prose { display: flex; flex-direction: column; gap: 16px; }
.prose h2 { font-size: 26px; margin-top: 20px; }
.prose .lede { font-size: 19px; color: var(--muted); }
.prose ul, .prose ol { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.policy-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.policy-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1.5px solid var(--line); border-radius: 999px; color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 500; background: var(--surface); }
.policy-nav a[aria-current="page"] { border-color: var(--teal); background: var(--ok-tint); font-weight: 700; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.prose table { width: 100%; border-collapse: collapse; font-size: 16px; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 14px 16px; border-top: 1px solid var(--line); }
.prose thead th { border-top: 0; background: var(--ground); font-size: 14px; letter-spacing: 0.04em; text-transform: uppercase; }
.prose tbody th { font-weight: 500; width: 50%; }

/* Header: the inline nav needs room; below that, a menu */
@media (max-width: 1100px) {
  .nav { display: none; }
  .menu { display: block; }
}

/* Mobile */
@media (max-width: 960px) {
  .hero, .gcash-band, .book-layout { grid-template-columns: minmax(0, 1fr); }
  .hero { padding: 36px 0 56px; gap: 36px; }
  .grid-4, .promises { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .gcash-band { padding: 40px 24px; gap: 32px; }
  .summary { position: static; }
  .section { padding-top: 80px; }
  .mobile-total { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -8px 24px rgba(20, 48, 44, 0.08); }
  .mobile-total strong { font-family: var(--display); font-size: 24px; margin-left: 6px; }
  body.has-total-bar { padding-bottom: 76px; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .wrap, .narrow { width: calc(100% - 32px); }
  .site-header .wrap { gap: 10px; min-height: 64px; }
  .brand-tag, .header-book, .long-label { display: none; }
  .short-label { display: inline; }
  .header-actions .btn { min-height: 44px; padding: 0 16px; font-size: 15px; }
  .menu-toggle { width: 44px; height: 44px; }
  .brand-name { font-size: 24px; }
  .page { padding: 32px 0 64px; }
  .tracker-head { flex-wrap: wrap; }
  .pay-layout { grid-template-columns: minmax(0, 1fr); }
  .qr { display: none; } /* you can't scan your own phone's screen */
  .review-list > div { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .manage { padding: 20px; }
  .cta-row .btn { flex: 1 1 auto; }
  .prose tbody th { width: auto; }
  .grid-4, .promises, .grid-2, .row-2 { grid-template-columns: minmax(0, 1fr); }
  .form-card, .tracker { padding: 20px; }
  .cta-band { padding: 36px 24px; }
  .cta-band h2 { font-size: 34px; }
  .mobile-bar { position: fixed; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -8px 24px rgba(20, 48, 44, 0.08); z-index: 20; }
  .mobile-bar .from { display: flex; flex-direction: column; font-size: 13px; color: var(--muted); }
  .mobile-bar .from strong { font-family: var(--display); font-size: 24px; color: var(--ink); }
  body.has-bar { padding-bottom: 88px; }
}
@media (min-width: 601px) { .mobile-bar { display: none; } }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
/* Windows High Contrast etc.: backgrounds are dropped, so mark the chosen option another way */
@media (forced-colors: active) {
  .choices input:checked + .opt { outline: 3px solid Highlight; outline-offset: -3px; }
  .step.done .marker, .step.current .marker { forced-color-adjust: none; }
  .btn { border-color: ButtonText; }
}
/* Anchor jumps shouldn't hide headings under the sticky header */
[id] { scroll-margin-top: 96px; }
.site-footer :focus-visible, .gcash-band :focus-visible, .cta-band :focus-visible { outline-color: var(--ink); }
.site-footer :focus-visible { outline-color: var(--accent); }

/* Expenses (/expenses/): staff pages, phone first */
body.x { padding-bottom: env(safe-area-inset-bottom); }
.x-page { padding: 24px 0 64px; display: flex; flex-direction: column; gap: 20px; }
.x-page h1 { font-size: clamp(30px, 4vw, 40px); }
.x-h2 { font-size: 22px; }
.x-brand-tag { font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); padding-top: 4px; }
.x-btn-sm { min-height: 44px; padding: 0 16px; font-size: 15px; }
.x-tabs { border-bottom: 1px solid var(--line); background: var(--ground); }
.x-tabs .wrap { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.x-tabs a { display: inline-flex; align-items: center; min-height: 48px; padding: 0 14px; white-space: nowrap; color: var(--muted); font-weight: 700; text-decoration: none; border-bottom: 3px solid transparent; }
.x-tabs a[aria-current="page"] { color: var(--teal); border-bottom-color: var(--teal); }
.x-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.x-totals { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.x-total { padding: 16px 18px; display: flex; flex-direction: column; gap: 2px; }
.x-total strong { font-family: var(--display); font-size: 28px; }
.x-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.x-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; color: var(--ink); text-decoration: none; }
a.x-row:hover { border-color: var(--teal); color: var(--ink); }
.x-row-main { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }
.x-row-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }
.x-row-side .badge { padding: 4px 10px; font-size: 13px; }
.x-amount { font-variant-numeric: tabular-nums; white-space: nowrap; }
.x-empty { padding: 24px; display: flex; flex-direction: column; gap: 6px; }
.badge.x-flag { background: #F9E3E3; color: var(--danger); }
.badge.x-flag .dot { background: var(--danger); }
.x-items { gap: 10px; }
.x-item { display: grid; grid-template-columns: minmax(0, 1fr) 72px 110px 44px; gap: 8px; align-items: center; }
.x-item[hidden] { display: none; }
.x-item-head { font-size: 13px; font-weight: 700; color: var(--muted); }
.x-item-error { grid-column: 1 / -1; }
.x-remove { width: 44px; height: 44px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; color: var(--danger); font-size: 22px; cursor: pointer; }
.x-receipt-thumb { max-height: 220px; width: auto; border-radius: 12px; border: 1px solid var(--line); align-self: flex-start; }
.x-detail { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 20px; align-items: start; }
.x-receipt { padding: 12px; display: flex; flex-direction: column; gap: 8px; align-items: center; position: sticky; top: 96px; }
.x-receipt img { border-radius: 10px; max-height: 75vh; width: auto; }
.x-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.x-table th, .x-table td { text-align: left; padding: 10px 12px; border-top: 1px solid var(--line); }
.x-table thead th { border-top: 0; font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.x-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.x-history summary, .x-flag-form { cursor: pointer; }
.x-flag-form { margin-top: 14px; }
.x-events { margin: 12px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; font-size: 15px; }
.x-mid { max-width: 1000px; }
.x-check-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.x-filters { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; }
.x-filters label:not(.check) { display: flex; flex-direction: column; gap: 4px; font-size: 14px; font-weight: 700; }
.x-filters input[type=month], .x-filters select { min-width: 160px; }
.x-checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
/* Reviewer table: full width on a computer, cards on a phone */
.x-grid-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow-x: auto; }
.x-grid { font-size: 15px; }
.x-grid td { vertical-align: top; }
.x-grid td .small { display: block; }
.x-grid tbody tr { cursor: pointer; }
.x-grid tbody tr:hover { background: var(--ground); }
.x-grid .badge { padding: 4px 10px; font-size: 13px; }
.x-grid .x-c-date, .x-grid .x-c-status, .x-grid .x-unit-name { white-space: nowrap; }
@media (max-width: 800px) {
  .x-grid-wrap { background: none; border: 0; }
  .x-grid, .x-grid tbody { display: block; }
  .x-grid thead { display: none; }
  .x-grid tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; margin-bottom: 8px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
  .x-grid td { padding: 0; border: 0; }
  .x-grid .x-c-vendor { grid-column: 1; grid-row: 1; }
  .x-grid .x-c-amount { grid-column: 2; grid-row: 1; }
  .x-grid .x-c-status { grid-column: 2; grid-row: 2 / span 3; text-align: right; }
  .x-grid .x-c-unit, .x-grid .x-c-date, .x-grid .x-c-who { grid-column: 1; font-size: 14px; color: var(--muted); }
  .x-grid .x-c-unit .small, .x-grid .x-c-vendor .small { display: inline; }
  .x-grid .x-c-cat, .x-grid .x-c-paid { display: none; }
}
@media (max-width: 800px) {
  .x-detail { grid-template-columns: minmax(0, 1fr); }
  .x-receipt { position: static; }
  .x-receipt img { max-height: 60vh; }
}
@media (max-width: 600px) {
  .x-page { padding-top: 16px; }
  /* Item name on its own line, then qty, amount and remove */
  .x-item { grid-template-columns: 72px minmax(0, 1fr) 44px; gap: 6px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
  .x-item > input[name$=-description] { grid-column: 1 / -1; }
  .x-item-head { display: none; }
  .x-item input { padding: 10px; }
  .x-filters label:not(.check) { flex: 1 1 140px; }
  .x-filters input[type=month], .x-filters select { min-width: 0; }
}
