/* ============================================================
   St. Edward Service System
   Mirrors the official St. Edward web design system
   (ses-website/src/styles/global.css, derived from the parish
   style guide, PMS-matched). Green is primary; gold is a sparing
   accent; navy is for links. Body text is near-black, surfaces
   are neutral, brand color is for emphasis only (60/30/10).
   Type: Crimson Text (display) + Noto Sans (body).
   ============================================================ */

:root {
  /* Brand (official style guide / PMS) */
  --green:       #00843D;   /* PMS 348C — primary: headings, primary CTA */
  --green-dark:  #005921;   /* hover, deep/structural green */
  --gold:        #DAAA00;   /* PMS 110C — secondary accent, used sparingly */
  --gold-light:  #DDCC71;   /* soft badge / selection background */
  --blue:        #003764;   /* PMS 2955C — links, record ids, alt accent */
  --offwhite:    #EEF4F1;   /* page background */

  /* Neutrals (most of the interface) */
  --ink:        #1a1a1a;    /* body text */
  --ink-soft:   #4a4a4a;    /* secondary text, labels */
  --muted:      #6b7280;    /* tertiary text, captions */
  --border:     #d6dad8;    /* hairlines */
  --border-soft:#e6ece9;
  --surface:    #f4f7f5;    /* faint neutral fill (table heads, wells) */
  --white:      #ffffff;

  /* Semantic status (off-brand on purpose: danger / state) */
  --red: #b3261e;        --red-bg: #fbe9e6;   --red-border: #eec4bd;
  --amber: #8a6a00;      --amber-bg: #f8efd6; --amber-border: #e6d49c;
  --ok-bg: #e3f1e7;      --ok-border: #bfe0c9;
  --info-bg: #e4eef6;    --info-border: #c3d8e9;
  --neutral-bg: #eef1f0; --neutral-fg: #586470; --neutral-border: #dde4e0;

  /* Type */
  --font-display: "Crimson Text", Georgia, "Times New Roman", serif;
  --font: "Noto Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --text-xs:   .8125rem;  /* 13 — micro labels, table heads */
  --text-min:  1rem;      /* 16 — floor for readable text */
  --text-base: 1.125rem;  /* 18 — body */
  --text-lg:   1.375rem;  /* 22 */
  --text-xl:   1.625rem;  /* 26 */
  --text-2xl:  2rem;      /* 32 */
  --text-3xl:  2.5rem;    /* 40 */

  --lh-tight: 1.15; --lh-snug: 1.3; --lh-body: 1.55;

  /* Spacing (4px base), radii (near-square per brand), container */
  --r-sq: 2px; --r-sm: 4px; --r-pill: 999px;
  --container: 1240px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }

/* Skip-to-content: off-screen until a keyboard user tabs to it (WCAG 2.4.1) */
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 1000;
  background: var(--white); color: var(--blue); font-weight: 700;
  padding: 11px 16px; border: 2px solid var(--green); border-radius: var(--r-sm);
  text-decoration: none; transition: top .15s ease;
}
.skip-link:focus { top: 12px; outline: none; }

/* Visible keyboard focus on every interactive element (WCAG 2.4.7). Blue ring on
   light surfaces, gold ring on the dark green header so it always contrasts. */
a:focus-visible,
.btn:focus-visible,
button:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 2px; }
.site-header a:focus-visible,
.nav-burger:focus-visible,
.act-as select:focus-visible,
.whoami-out:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .skip-link { transition: none; } }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  font-size: var(--text-base);
  line-height: var(--lh-body);
  color: var(--ink);
  background: var(--offwhite);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: var(--lh-tight); letter-spacing: -.005em; color: var(--green); margin: 0; }
a { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--green-dark); }
::selection { background: var(--gold-light); color: var(--ink); }
.muted { color: var(--muted); }
.right { margin-left: auto; }

/* ----- Header (structural green) -------------------------------------- */
.site-header {
  background: var(--green-dark);
  color: #fff;
  border-bottom: 2px solid var(--gold);
}
.header-inner {
  max-width: var(--container); margin: 0 auto;
  padding: 14px 24px; display: flex; align-items: center; gap: 26px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 13px; color: #fff; text-decoration: none; }
.brand:hover { text-decoration: none; color: #fff; }
.brand-shield {
  display: grid; place-items: center; width: 38px; height: 44px;
  background: rgba(0, 0, 0, .22); border: 1.5px solid var(--gold);
  border-radius: var(--r-sq); color: var(--gold-light);
  font-family: var(--font-display); font-weight: 700; font-size: 16px; letter-spacing: .5px;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 20px; letter-spacing: .2px; }
.brand-sub { font-size: 10.5px; color: var(--gold-light); letter-spacing: .24em; text-transform: uppercase; margin-top: 3px; }
.site-nav { display: flex; gap: 24px; margin-left: 12px; }
.site-nav a {
  position: relative; color: #e7efe9; font-size: 14px; font-weight: 600;
  text-decoration: none; padding: 6px 1px; letter-spacing: .01em;
}
.site-nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -1px; height: 2px; background: var(--gold); transition: right .25s ease; }
.site-nav a:hover { color: #fff; }
.site-nav a:hover::after { right: 0; }
/* Current page: gold label with a full underline, so you always know where you are */
.site-nav a.active { color: #fff; }
.site-nav a.active::after { right: 0; }
.act-as { margin-left: auto; display: flex; align-items: center; gap: 9px; }
.act-as label { font-size: 10.5px; color: var(--gold-light); text-transform: uppercase; letter-spacing: .14em; }
.act-as select {
  background: rgba(0, 0, 0, .24); color: #fff; border: 1px solid rgba(255, 255, 255, .28);
  border-radius: var(--r-sq); padding: 7px 10px; font: inherit; font-size: 14px;
}
.act-as select:focus { outline: 2px solid var(--gold); }
.whoami { gap: 14px; }
.whoami-name { font-size: 13px; font-weight: 600; color: var(--gold-light); }
.whoami-out { color: #fff; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.whoami-out:hover { color: var(--gold-light); }

/* ----- Layout --------------------------------------------------------- */
.container { max-width: var(--container); margin: 0 auto; padding: 36px 24px 80px; }
.page-head {
  position: relative; display: flex; align-items: flex-end; justify-content: space-between;
  gap: 18px; flex-wrap: wrap; padding-bottom: 18px; margin-bottom: 28px;
  border-bottom: 1px solid var(--border);
}
.page-head::after { content: ""; position: absolute; left: 0; bottom: -1px; width: 64px; height: 2px; background: var(--gold); }
.page-head h1 { font-size: clamp(1.9rem, 4vw, var(--text-3xl)); }
.page-head > div > p { margin: 8px 0 0; color: var(--ink-soft); font-size: var(--text-lg); line-height: var(--lh-snug); }
.form-narrow { max-width: 720px; margin-left: auto; margin-right: auto; }

/* ----- Cards (hairline border, no shadow per brand) ------------------- */
.card { background: var(--white); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 26px 28px; }
.card + .card { margin-top: 20px; }
.card h2 {
  font-family: var(--font); font-size: var(--text-min); font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em; color: var(--blue);
  margin: 0 0 18px; padding-bottom: 12px; border-bottom: 1px solid var(--border-soft);
}

/* ----- Stat row ------------------------------------------------------- */
.stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; margin-bottom: 28px; }
.stat { background: var(--white); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 18px 20px; }
.stat .num { font-family: var(--font-display); font-size: var(--text-3xl); font-weight: 700; line-height: 1; color: var(--ink); font-variant-numeric: lining-nums tabular-nums; }
.stat.warn .num { color: var(--amber); }
.stat.alert .num { color: var(--red); }
.stat .lbl { margin-top: 9px; font-size: var(--text-xs); color: var(--muted); text-transform: uppercase; letter-spacing: .12em; font-weight: 700; }
@media (max-width: 780px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* ----- Forms ---------------------------------------------------------- */
.field { margin-bottom: 20px; }
/* 15px, not 13: bifocals read these labels too (senior-user test). */
.field > label { display: block; font-weight: 700; font-size: 15px; margin-bottom: 8px; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-soft); }
.field .req { color: var(--red); }
.field .hint { font-weight: 400; color: var(--muted); font-size: var(--text-xs); text-transform: none; letter-spacing: 0; }
input[type=text], input[type=email], input[type=date], input[type=password], input[type=file], select, textarea {
  width: 100%; padding: 12px 13px; border: 1px solid #c2cac6; border-radius: var(--r-sm);
  font: inherit; font-size: var(--text-min); color: var(--ink); background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}
input[type=file] { padding: 10px 12px; background: var(--surface); }
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(0, 132, 61, .16); }
.radios, .role-radios { display: flex; gap: 9px; flex-wrap: wrap; }
.radio-pill { position: relative; }
.radio-pill input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.radio-pill span {
  display: inline-block; padding: 9px 16px; border: 1px solid #c2cac6; border-radius: var(--r-pill);
  cursor: pointer; font-size: var(--text-min); background: #fff; font-weight: 600; color: var(--ink-soft);
  transition: all .14s ease;
}
.radio-pill:hover span { border-color: var(--green); color: var(--green-dark); }
.radio-pill input:checked + span { background: var(--green); color: #fff; border-color: var(--green); }
.radio-pill input:focus-visible + span { box-shadow: 0 0 0 3px rgba(0, 132, 61, .25); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 640px) { .row2 { grid-template-columns: 1fr; } }

/* ----- Buttons (2px radius, uppercase, Noto 700 per brand) ------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 24px; border-radius: var(--r-sq);
  background: var(--green); color: #fff; border: 2px solid var(--green);
  font: inherit; font-weight: 700; font-size: 15px; text-transform: uppercase; letter-spacing: .04em;
  text-decoration: none; cursor: pointer; line-height: 1;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease;
}
.btn:hover { background: var(--green-dark); border-color: var(--green-dark); color: #fff; text-decoration: none; }
.btn.gold { background: var(--green); border-color: var(--green); color: #fff; }       /* primary CTA stays brand green on white */
.btn.gold:hover { background: var(--green-dark); border-color: var(--green-dark); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--border); }
.btn.ghost:hover { background: var(--offwhite); color: var(--green-dark); border-color: var(--green); }
.btn.sm { padding: 8px 15px; font-size: var(--text-xs); }
/* The one next-step button on a ticket (Start work / Mark completed): full
   width and 48px+ tall, because it gets pressed by work gloves and tremors. */
.btn.status-action { display: block; width: 100%; min-height: 48px; padding: 14px 18px; font-size: 16px; text-align: center; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

/* ----- Flash ---------------------------------------------------------- */
.flash { padding: 13px 16px; border-radius: var(--r-sm); margin-bottom: 16px; font-size: var(--text-min); font-weight: 600; border: 1px solid; display: flex; align-items: center; gap: 9px; }
.flash::before { content: ""; width: 8px; height: 8px; border-radius: 50%; flex: none; }
.flash-ok { background: var(--ok-bg); color: var(--green-dark); border-color: var(--ok-border); }
.flash-ok::before { background: var(--green); }
.flash-error { background: var(--red-bg); color: var(--red); border-color: var(--red-border); }
.flash-error::before { background: var(--red); }
/* Amber: something minor was skipped but the request itself is safe. Red
   reads as "broken" to a nervous submitter (senior-user test, Gloria). */
.flash-warn { background: #fdf3d7; color: #7a5b00; border-color: #ecd690; }
.flash-warn::before { background: #c9a227; }

/* ----- Badges --------------------------------------------------------- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: var(--r-pill); font-size: var(--text-xs); font-weight: 700; white-space: nowrap; letter-spacing: .02em; border: 1px solid transparent; }
.b-emergency { background: var(--red-bg); color: var(--red); border-color: var(--red-border); text-transform: uppercase; letter-spacing: .05em; }
.b-emergency::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--red); }
.b-important { background: var(--amber-bg); color: var(--amber); border-color: var(--amber-border); }
.b-fit { background: var(--neutral-bg); color: var(--neutral-fg); border-color: var(--neutral-border); }
.s-open { background: var(--info-bg); color: var(--blue); border-color: var(--info-border); }
.s-progress { background: var(--amber-bg); color: var(--amber); border-color: var(--amber-border); }
.s-completed { background: var(--ok-bg); color: var(--green-dark); border-color: var(--ok-border); }
.tag-overdue { background: var(--red); color: #fff; border-color: var(--red); text-transform: uppercase; letter-spacing: .04em; }
.role-chip { background: var(--green); color: #fff; }

/* ----- Tables --------------------------------------------------------- */
.table-wrap { overflow-x: auto; }
table.tickets, table.people { width: 100%; border-collapse: collapse; background: var(--white); }
table.tickets th, table.tickets td, table.people th, table.people td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--border-soft); font-size: var(--text-min); vertical-align: middle; }
table.tickets th, table.people th { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); background: var(--surface); font-weight: 700; border-bottom: 1px solid var(--border); }
table.tickets tbody tr { transition: background .14s ease; }
table.tickets tbody tr:hover { background: var(--surface); }
table.tickets tbody tr:last-child td, table.people tbody tr:last-child td { border-bottom: none; }
table.tickets tr.is-emergency { background: var(--red-bg); box-shadow: inset 3px 0 0 var(--red); }
table.tickets tr.is-emergency:hover { background: #f7dbd4; }
table.people tbody tr:hover { background: var(--surface); }
.tno { font-family: var(--font); font-weight: 700; font-size: var(--text-min); color: var(--blue); white-space: nowrap; letter-spacing: .01em; }
table.tickets th.th-sort { cursor: pointer; user-select: none; white-space: nowrap; }
table.tickets th.th-sort:hover { color: var(--green-dark); }
/* Reference tables on help/doc pages (if/then, key/value) */
.doc-table { width: 100%; border-collapse: collapse; background: var(--white); }
.doc-table th, .doc-table td { padding: 12px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border-soft); font-size: var(--text-min); }
.doc-table th { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); background: var(--surface); font-weight: 700; border-bottom: 1px solid var(--border); }
.doc-table tbody tr:last-child td { border-bottom: none; }
.sort-ind { display: inline-block; width: 9px; margin-left: 3px; font-size: 9px; color: var(--green); }

/* ----- Filters -------------------------------------------------------- */
.filters { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 18px; background: var(--white); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 16px 18px; }
.filters .field { margin-bottom: 0; }
.filters select { min-width: 158px; }

/* ----- Detail --------------------------------------------------------- */
.page-head h1 .badge, .page-head h1 .tno { vertical-align: middle; }
.page-head h1 .tno { font-size: var(--text-xl); }
.page-head h1 .badge { font-size: var(--text-xs); }
.detail-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 20px; align-items: start; }
@media (max-width: 820px) { .detail-grid { grid-template-columns: 1fr; } }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 12px 16px; font-size: var(--text-min); }
.kv dt { color: var(--muted); font-size: var(--text-xs); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; padding-top: 2px; }
.kv dd { margin: 0; color: var(--ink); }
.desc-box { margin-top: 18px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--blue); border-radius: var(--r-sm); white-space: pre-wrap; font-size: var(--text-min); color: var(--ink); }
.photo { margin-top: 16px; }
.photo img { max-width: 100%; border-radius: var(--r-sm); border: 1px solid var(--border); }

/* ----- Timeline ------------------------------------------------------- */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 20px 26px; border-left: 2px solid var(--border); }
.timeline li:last-child { border-left-color: transparent; padding-bottom: 2px; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 3px; width: 12px; height: 12px; border-radius: 50%; background: var(--green); border: 3px solid var(--white); box-shadow: 0 0 0 1px var(--green); }
.timeline .ev-detail { font-size: var(--text-min); }
.timeline .ev-meta { font-size: var(--text-xs); color: var(--muted); margin-top: 3px; }

/* ----- People --------------------------------------------------------- */
.role-radios .radio-pill span { padding: 6px 12px; font-size: var(--text-xs); }
.role-static {
  display: inline-block; padding: 6px 12px; border-radius: var(--r-pill);
  font-size: var(--text-xs); font-weight: 600;
  background: var(--green); color: #fff; border: 1px solid var(--green);
}
.you-tag { font-size: var(--text-xs); color: var(--ink-soft); margin-left: 6px; }
.inactive td { opacity: .5; }

/* Role legend: a definition list of what each role can do */
.role-legend { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; }
.role-legend dt { font-weight: 700; color: var(--green); white-space: nowrap; }
.role-legend dt .muted { font-weight: 400; font-size: var(--text-xs); }
.role-legend dd { margin: 0; color: var(--ink-soft); }
@media (max-width: 640px) {
  .role-legend { grid-template-columns: 1fr; gap: 2px 0; }
  .role-legend dd { margin-bottom: 12px; }
}

/* ----- Notifications -------------------------------------------------- */
.note-item { border: 1px solid var(--border); border-radius: var(--r-sm); padding: 16px 18px; margin-bottom: 14px; background: var(--white); }
.note-head { display: flex; align-items: center; gap: 11px; flex-wrap: wrap; margin-bottom: 9px; }
.note-head .subj { font-weight: 700; color: var(--ink); }
.note-body { white-space: pre-wrap; font-size: var(--text-min); color: var(--ink-soft); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 13px 15px; margin: 0; font-family: var(--font); }
.b-sent { background: var(--ok-bg); color: var(--green-dark); border-color: var(--ok-border); }
.b-preview { background: var(--neutral-bg); color: var(--neutral-fg); border-color: var(--neutral-border); }

/* ----- Banner --------------------------------------------------------- */
.banner { background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--gold); color: var(--ink-soft); padding: 13px 16px; border-radius: var(--r-sm); font-size: var(--text-min); margin-bottom: 18px; }

/* ----- Footer --------------------------------------------------------- */
.site-footer { text-align: center; color: var(--muted); font-size: var(--text-xs); padding: 32px 24px; text-transform: uppercase; letter-spacing: .12em; border-top: 1px solid var(--border); margin-top: 24px; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }

/* ===== Mobile: phone-friendly for older eyes and work gloves (big text, big targets, high contrast) ===== */
.wo-cards { display: none; }   /* desktop shows the table, not the cards */
.nav-toggle { display: none; }
.nav-burger { display: none; }

/* 1024px, not 720: iPads live on this app too (the senior-user test's Walt
   never got the friendly layout at 768px wide). */
@media (max-width: 1024px) {
  .container { padding: 20px 14px 64px; }
  .page-head { flex-direction: column; align-items: stretch; gap: 12px; }
  .page-head h1 { font-size: var(--text-xl); }
  .page-head .btn.right, .btn.gold.right { width: 100%; text-align: center; padding: 16px; min-height: 54px; font-size: 18px; }
  /* Finger-sized small buttons on every touch-class device. */
  .btn.sm { min-height: 48px; padding: 12px 16px; font-size: 15px; }

  /* top menu collapses behind a button */
  .nav-burger {
    display: flex; align-items: center; justify-content: center; margin-left: auto; flex: none;
    width: 48px; height: 48px; border-radius: 10px; cursor: pointer; font-size: 24px; line-height: 1;
    background: rgba(0, 0, 0, .2); border: 1px solid rgba(255, 255, 255, .32); color: #fff;
  }
  .site-nav, .act-as { display: none; flex-basis: 100%; }
  .nav-toggle:checked ~ .site-nav { display: flex; flex-direction: column; gap: 0; width: 100%; margin: 10px 0 0; }
  .nav-toggle:checked ~ .act-as { display: flex; width: 100%; margin: 10px 0 0; }
  .site-nav a { padding: 15px 6px; font-size: 17px; width: 100%; border-bottom: 1px solid rgba(255, 255, 255, .18); }
  .site-nav a::after { display: none; }
  .site-nav a.active { background: rgba(0, 0, 0, .2); box-shadow: inset 3px 0 0 var(--gold); padding-left: 12px; }
  .act-as { flex-direction: column; align-items: stretch; gap: 6px; }
  .act-as select { width: 100%; font-size: 16px; padding: 14px; min-height: 52px; }
  .whoami-name { font-size: 16px; padding: 6px; }
  .whoami-out { display: block; padding: 15px 6px; font-size: 17px; }

  /* count tiles */
  .stats { grid-template-columns: 1fr 1fr; gap: 11px; margin-bottom: 18px; }
  .stat { padding: 14px; border-radius: 12px; min-height: 70px; }
  .stat .num { font-size: 30px; }
  .stat .lbl { font-size: 14px; }

  /* filters: full-width, thumb-sized */
  .filters { flex-direction: column; align-items: stretch; gap: 10px; padding: 14px; }
  .filters .field { width: 100%; margin-bottom: 0; }
  .filters select { width: 100%; min-width: 0; font-size: 17px; padding: 14px; min-height: 52px; }
  .filters .btn.ghost.sm { width: 100%; text-align: center; padding: 14px; min-height: 52px; }

  /* swap the wide table for big tappable work-order cards */
  .tickets-table-card { display: none; }
  .wo-cards { display: block; }
  .wo {
    display: flex; align-items: stretch; text-decoration: none; color: var(--ink);
    background: var(--white); border: 1px solid var(--border); border-radius: 14px;
    margin-bottom: 12px; overflow: hidden; min-height: 92px; box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
  }
  .wo .stripe { width: 8px; flex: none; background: var(--green); }
  .wo.p-emergency .stripe { background: var(--red); }
  .wo.p-important .stripe { background: var(--gold); }
  .wo.p-fit .stripe { background: var(--green); }
  .wo.done .stripe { background: #9aa6a0; }
  .wo.is-emergency { background: var(--red-bg); }
  .wo-main { flex: 1; min-width: 0; padding: 13px 6px 13px 14px; }
  .wo-where { display: block; font-size: 19px; font-weight: 700; line-height: 1.2; color: var(--ink); }
  .wo.done .wo-where { color: var(--ink-soft); text-decoration: line-through; }
  .wo-desc { display: block; font-size: 14.5px; color: var(--muted); margin-top: 2px; line-height: 1.3; }
  .wo-no { display: block; font-size: 13.5px; color: var(--muted); font-weight: 600; margin-top: 5px; }
  .wo-tags { display: flex; flex-wrap: wrap; gap: 7px; margin: 9px 0 6px; }
  .wo-tags .badge { font-size: 13px; padding: 5px 11px; }
  .wo-meta { display: block; font-size: 15px; color: var(--ink-soft); line-height: 1.4; }
  .wo-meta b { color: var(--ink); }
  .wo-go { flex: none; width: 44px; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 28px; }
  .wo-empty { background: var(--white); border: 1px solid var(--border); border-radius: 14px; padding: 28px 16px; text-align: center; color: var(--muted); }

  /* keep form controls at 16px+ so phones do not zoom on focus */
  input[type="text"], input[type="email"], input[type="date"], select, textarea { font-size: 16px; }
}
