/* Longview customer portal — the page a homeowner opens from a text message.
   Ported from the customer_portal prototype.

   Every brand-specific value is a custom property set on :root at runtime by
   js/portal.js from the API's `brand` object. The defaults below are Longview's
   and also the fallback for an org that has configured nothing — an unbranded
   portal is acceptable, a broken one is not.

   The furniture colours (paper/card/ink/line) are deliberately NOT configurable.
   They were within a shade of each other across all four prototype brands, so
   exposing them would be four more settings nobody can meaningfully answer. */

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

:root {
  --font-body: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Space Grotesk", "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --brand: #33506B;
  --brand-deep: #22374C;
  --accent: #8A6D3B;
  --accent-soft: #EFE9DE;

  --paper: #F5F6F7;
  --card: #FFFFFF;
  --ink: #232930;
  --ink-soft: #5D6873;
  --line: #E2E5E8;
  --good: #2F7A54;
  --good-soft: #E6F1EA;
}

*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, p, ul, ol, li, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }

body {
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 40px;
}

a { color: var(--brand); }
button { font-family: inherit; cursor: pointer; }
[hidden] { display: none !important; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---- Header ---------------------------------------------------------- */

.hdr { background: var(--brand-deep); color: #fff; }

.hdr-inner {
  max-width: 1060px; margin: 0 auto; padding: 14px 18px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}

.logo { display: flex; align-items: center; gap: 11px; min-width: 0; }

.logo-mark {
  width: 42px; height: 42px; flex: none; border-radius: 10px;
  background: var(--accent); color: #fff;
  display: grid; place-items: center;
  font-weight: 700; font-size: 16px; letter-spacing: 0.5px;
  font-family: var(--font-display);
}

.logo-img-wrap {
  flex: none; height: 46px; padding: 4px 8px; border-radius: 10px;
  background: #fff; display: grid; place-items: center;
}
.logo-img { height: 38px; width: auto; max-width: 132px; object-fit: contain; display: block; }

.logo-text { display: flex; flex-direction: column; min-width: 0; }
.logo-text strong {
  font-size: 15px; letter-spacing: 0.2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.logo-text em { font-style: normal; font-size: 11.5px; opacity: 0.72; }

.hdr-call {
  display: flex; align-items: center; gap: 7px; flex: none;
  color: #fff; text-decoration: none; font-weight: 600; font-size: 13px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  padding: 8px 13px; border-radius: 999px;
}
.hdr-call:active { background: rgba(255, 255, 255, 0.22); }

@media (max-width: 480px) {
  .hdr-call span { display: none; }
  .hdr-call { padding: 9px; }
}

/* ---- Project banner -------------------------------------------------- */

.hdr-project { background: var(--brand); padding: 22px 18px 26px; color: #fff; }
.hdr-project-inner { max-width: 1060px; margin: 0 auto; }

.eyebrow {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.65); font-weight: 700; margin-bottom: 4px;
}

.hdr-project h1 {
  font-family: var(--font-display);
  font-size: 28px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.12;
}

.hdr-sub { font-size: 13px; color: rgba(255, 255, 255, 0.78); margin-top: 4px; }

/* ---- Stage rail ------------------------------------------------------ */

.phase-rail { max-width: 1060px; margin: 22px auto 0; display: flex; align-items: flex-start; }

.phase {
  flex: 1; position: relative;
  display: flex; flex-direction: column; align-items: center;
  background: none; border: 0; padding: 0; color: inherit;
  cursor: help;
}

.phase-dot {
  width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.18);
  border: 2px solid rgba(255, 255, 255, 0.45);
  color: var(--brand); z-index: 1;
}
.phase-done .phase-dot { background: #fff; border-color: #fff; }
.phase-now .phase-dot {
  background: var(--accent); border-color: #fff;
  box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.16);
}

.phase-bar {
  position: absolute; top: 10px; left: 50%; width: 100%; height: 2px;
  background: rgba(255, 255, 255, 0.3);
}
.phase-done .phase-bar { background: rgba(255, 255, 255, 0.85); }

.phase-name {
  margin-top: 8px; font-size: 11px; text-align: center; line-height: 1.25;
  color: rgba(255, 255, 255, 0.72); max-width: 72px; font-weight: 600;
  border-bottom: 1px dotted rgba(255, 255, 255, 0.45); padding-bottom: 1px;
}
.phase-done .phase-name { color: rgba(255, 255, 255, 0.9); }
.phase-now .phase-name { color: #fff; font-weight: 800; }

.phase:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }

@media (max-width: 420px) {
  .phase-name { font-size: 10px; max-width: 60px; }
}

.phase-tip {
  position: absolute; bottom: calc(100% + 10px); left: 50%; transform: translateX(-50%);
  width: 216px; z-index: 40; text-align: left; cursor: default;
  background: #fff; color: var(--ink); border-radius: 11px;
  padding: 10px 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}
.phase-tip::after {
  content: ""; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  border: 7px solid transparent; border-top-color: #fff;
}
.phase-tip strong { display: block; font-size: 12.5px; font-weight: 800; margin-bottom: 3px; }
.phase-tip p { font-size: 12px; color: var(--ink-soft); line-height: 1.45; }

/* First and last tooltips would hang off the screen edge if centred. */
.phase:first-child .phase-tip { left: 0; transform: none; }
.phase:first-child .phase-tip::after { left: 28px; }
.phase:last-child .phase-tip { left: auto; right: 0; transform: none; }
.phase:last-child .phase-tip::after { left: auto; right: 28px; }

/* Shown instead of the rail when the org has no stage mapping for this
   status. Saying so beats a rail with nothing lit, which reads as a bug. */
/* Sits under the rail it explains, not instead of it. Dashed so it reads as
   a note about the timeline rather than a step in it. */
.rail-unconfigured {
  max-width: 1060px; margin: 16px auto 0;
  background: rgba(255, 255, 255, 0.08);
  border: 1px dashed rgba(255, 255, 255, 0.3);
  border-radius: 12px; padding: 10px 14px;
  font-size: 12.5px; color: rgba(255, 255, 255, 0.8);
}

/* ---- Job blocks (one per Albiware project) ---------------------------- */

/* A household with a mitigation, a contents and a rebuild job gets three of
   these. With one job the block is invisible furniture; with several it is what
   keeps three rails from reading as one confusing timeline. */
.jobs-intro {
  max-width: 1060px;
  margin: 20px auto 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.78);
}

.job-block { max-width: 1060px; margin: 0 auto; }

.job-block-multi {
  margin-top: 14px;
  padding: 14px 15px 15px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
}

/* Nested panels inside a job block would be a box in a box in a box. Flatten
   them: the block itself is already the container. */
.job-block-multi .heartbeat,
.job-block-multi .whats-next {
  background: none;
  border: 0;
  padding: 10px 0 0;
  margin: 0;
}
.job-block-multi .phase-rail { margin-top: 14px; }

.job-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 12px;
}

/* With one job there is no block chrome around this, so it needs its own
   breathing room under the address. */
.job-head-single { margin-top: 12px; }

.job-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}

.job-number {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.6);
}

.job-stage {
  margin-left: auto;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}
.job-stage-done {
  background: rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.85);
}

/* Compact rail for the multi-job layout. Three full-size rails stacked would
   push everything below them off a phone screen. */
.phase-rail-mini .phase-dot { width: 18px; height: 18px; }
.phase-rail-mini .phase-bar { top: 8px; }
.phase-rail-mini .phase-name { font-size: 10px; max-width: 64px; margin-top: 6px; }

/* ---- Right now ------------------------------------------------------- */

.heartbeat {
  max-width: 1060px; margin: 20px auto 0;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px; padding: 12px 15px;
  display: flex; gap: 11px; align-items: flex-start;
}
.heartbeat p { font-size: 13.5px; color: rgba(255, 255, 255, 0.92); }

.pulse {
  flex: none; width: 10px; height: 10px; margin-top: 5px; border-radius: 50%;
  background: #6FD598; box-shadow: 0 0 0 0 rgba(111, 213, 152, 0.7);
  animation: pulse 2.2s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(111, 213, 152, 0.55); }
  70%  { box-shadow: 0 0 0 9px rgba(111, 213, 152, 0); }
  100% { box-shadow: 0 0 0 0 rgba(111, 213, 152, 0); }
}
@media (prefers-reduced-motion: reduce) { .pulse { animation: none; } }

/* ---- What to expect next --------------------------------------------- */

.whats-next {
  max-width: 1060px; margin: 10px auto 0;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px; padding: 12px 15px 13px;
}

.wn-label {
  font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.13em;
  color: rgba(255, 255, 255, 0.6); margin-bottom: 10px;
}

.wn-list {
  display: flex; align-items: stretch; gap: 10px;
  overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.wn-list::-webkit-scrollbar { display: none; }

.wn-item { display: flex; align-items: center; gap: 10px; flex: none; }
.wn-num {
  flex: none; width: 21px; height: 21px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff; font-size: 11px; font-weight: 800;
  display: grid; place-items: center;
}
.wn-item:first-child .wn-num { background: var(--accent); border-color: transparent; }
.wn-text { display: flex; flex-direction: column; }
.wn-step { font-size: 12.5px; font-weight: 700; color: #fff; white-space: nowrap; }
.wn-eta { font-style: normal; font-size: 11px; color: rgba(255, 255, 255, 0.62); white-space: nowrap; }
.wn-arrow { color: rgba(255, 255, 255, 0.4); display: grid; place-items: center; flex: none; }

/* ---- Body ------------------------------------------------------------ */

.body {
  max-width: 1060px; margin: 22px auto 0; padding: 0 14px;
  display: grid; gap: 16px; grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .body { grid-template-columns: 1.35fr 1fr; align-items: start; }
}
.col { display: grid; gap: 16px; align-content: start; }

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 20px 18px;
}

.section-label {
  font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.13em;
  color: var(--accent); margin-bottom: 12px;
}

.card-lede { font-size: 13.5px; color: var(--ink-soft); margin: -6px 0 16px; }
.card-empty { font-size: 13.5px; color: var(--ink-soft); }

/* ---- Team ------------------------------------------------------------ */

.avatar {
  display: inline-grid; place-items: center; border-radius: 50%; flex: none;
  font-weight: 800; letter-spacing: 0.03em; color: #fff; background: var(--brand);
  font-family: var(--font-display);
}
.avatar-accent { background: var(--accent); }

.pm { display: flex; gap: 15px; align-items: center; }
.pm-role {
  font-size: 12px; font-weight: 700; color: var(--ink-soft);
  text-transform: uppercase; letter-spacing: 0.08em;
}
.pm-name { font-family: var(--font-display); font-size: 21px; font-weight: 700; margin: 1px 0 4px; }
.pm-contact { font-size: 13px; color: var(--ink-soft); }
.pm-contact a { color: var(--brand); text-decoration: none; }
.pm-contact a:hover { text-decoration: underline; }

.team-row {
  margin-top: 17px; padding-top: 15px; border-top: 1px solid var(--line);
  display: grid; gap: 14px; grid-template-columns: 1fr;
}
@media (min-width: 560px) { .team-row { grid-template-columns: 1fr 1fr; } }

.team-member { display: flex; gap: 10px; align-items: center; }
.tm-name { font-weight: 700; font-size: 14px; }
.tm-role { font-size: 12px; color: var(--ink-soft); }
.tm-contact { font-size: 12px; }
.tm-contact a { color: var(--brand); text-decoration: none; }

/* ---- Visits ---------------------------------------------------------- */

.next-visit {
  display: flex; gap: 14px; align-items: flex-start;
  border-left: 4px solid var(--accent);
}
.nv-icon {
  flex: none; width: 40px; height: 40px; border-radius: 10px;
  background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center;
}
.nv-main { flex: 1; min-width: 0; }
.nv-when { font-weight: 800; font-size: 15.5px; }
.nv-who { font-size: 13.5px; color: var(--ink-soft); margin-top: 2px; }
.nv-what { font-size: 13.5px; color: var(--ink-soft); margin-top: 4px; }

.visit-list { display: grid; gap: 12px; }
.visit-row {
  display: flex; gap: 12px; align-items: baseline;
  padding-top: 12px; border-top: 1px solid var(--line);
}
.visit-row:first-child { padding-top: 0; border-top: 0; }
.visit-when { font-weight: 700; font-size: 13.5px; flex: none; min-width: 116px; }
.visit-what { font-size: 13.5px; color: var(--ink-soft); }

/* ---- Activity -------------------------------------------------------- */

.activity { display: grid; gap: 14px; }
.act-row { display: flex; gap: 11px; align-items: flex-start; }
.act-dot {
  flex: none; width: 26px; height: 26px; border-radius: 50%; margin-top: 1px;
  background: var(--good-soft); color: var(--good);
  display: grid; place-items: center;
}
.act-text { font-size: 13.5px; }
.act-meta { font-size: 12px; color: var(--ink-soft); margin-top: 1px; }

/* ---- Insurance ------------------------------------------------------- */

.kv { display: grid; gap: 10px; }
.kv-row { display: flex; justify-content: space-between; gap: 14px; font-size: 13.5px; }
.kv-key { color: var(--ink-soft); flex: none; }
.kv-val { font-weight: 700; text-align: right; word-break: break-word; }

/* ---- Buttons --------------------------------------------------------- */

.btn-primary {
  display: inline-block; margin-top: 4px;
  background: var(--accent); color: #fff; text-decoration: none;
  font-weight: 700; font-size: 14px;
  padding: 11px 18px; border-radius: 999px; border: 0;
}
.btn-primary:active { filter: brightness(0.92); }

/* ---- Coming-soon placeholders ---------------------------------------- */

/* Dashed rather than solid so it is legible at a glance that this is a
   section still being built, not one that happens to be empty today. */
.stub {
  border-style: dashed; background: transparent;
}
.stub .section-label { color: var(--ink-soft); }
.stub-note { font-size: 13px; color: var(--ink-soft); }
.pill {
  display: inline-block; margin-top: 10px;
  padding: 3px 11px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
  font-size: 10.5px; font-weight: 800; letter-spacing: 0.09em; text-transform: uppercase;
}

/* ---- Footer ---------------------------------------------------------- */

.foot {
  max-width: 1060px; margin: 26px auto 0; padding: 0 18px;
  font-size: 12px; color: var(--ink-soft); text-align: center;
}

/* ---- Whole-page states ----------------------------------------------- */

.page-state {
  min-height: 70vh; display: grid; place-items: center; padding: 32px 20px; text-align: center;
}
.page-state-inner { max-width: 420px; }
.page-state h1 { font-family: var(--font-display); font-size: 22px; margin-bottom: 10px; }
.page-state p { color: var(--ink-soft); font-size: 14px; }
.page-state .btn-primary { margin-top: 18px; }

.spinner {
  width: 30px; height: 30px; margin: 0 auto 16px;
  border: 3px solid var(--line); border-top-color: var(--brand);
  border-radius: 50%; animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }

/* ---- Send your team a note ------------------------------------------- */

.field-label {
  display: block;
  margin: 14px 0 6px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-soft);
}

.field {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  font-size: 14px;
  background: var(--paper);
  color: var(--ink);
}
.field:focus {
  outline: 2px solid var(--accent-soft);
  border-color: var(--accent);
}
.field-area { resize: vertical; min-height: 92px; line-height: 1.5; }

#contactCard .btn-primary { margin-top: 14px; width: 100%; text-align: center; }

.secondary-btn {
  width: 100%;
  padding: 11px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--brand);
  font: inherit;
  font-weight: 700;
  font-size: 14px;
}
.secondary-btn:active { background: var(--paper); }

.or-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 14px;
  color: var(--ink-soft);
  font-size: 12px;
}
.or-divider::before,
.or-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* Radio group rather than a select: four options, and on a phone a row of taps
   beats a dropdown that covers the screen. */
.cb-times { display: flex; flex-wrap: wrap; gap: 8px; }
.cb-time {
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink-soft);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
}
.cb-time-on {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}
.cb-time:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.msg-sent {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 14px;
  border-radius: 12px;
  background: var(--good-soft);
  color: var(--ink);
  font-size: 13.5px;
  line-height: 1.5;
}

.link-btn {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 2px;
}

#contactCard .error {
  margin-top: 12px;
  font-size: 13px;
  color: var(--error, #b91c1c);
  font-weight: 600;
}

/* ---- Request a change to a visit ------------------------------------- */

.nv-change-btn { margin-top: 12px; }

.nv-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 12px;
  flex-wrap: wrap;
}
/* The primary here sits beside "Never mind" rather than alone in a card, so it
   should not stretch the way the note form's send button does. */
.nv-actions .btn-primary { margin-top: 0; width: auto; }

.field-optional { font-weight: 500; color: var(--ink-soft); }

.nv-sent {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--good-soft);
  font-size: 13.5px;
  line-height: 1.5;
}

/* The next-visit card is a flex row with the calendar icon beside the body, so
   the form inside it needs to stay in the body column. */
.next-visit .nv-main { min-width: 0; }
.next-visit .field { max-width: 100%; }

/* ---- Photos, videos and documents ------------------------------------ */

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}

.media-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
}
.media-tile:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.media-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  background: var(--accent-soft);
}

/* Used when there is no thumbnail, or one failed to load. Keeps the tile the
   same height as its neighbours so the grid does not go ragged. */
.media-tile-plain { min-height: 108px; justify-content: flex-end; }
.media-tile-plain .media-caption { background: var(--accent-soft); }

.media-play {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -60%);
  width: 34px; height: 34px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 13px;
  pointer-events: none;
}

.media-caption {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 7px 9px;
  font-size: 11.5px;
  line-height: 1.3;
}
.media-name {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.media-date { font-style: normal; color: var(--ink-soft); font-size: 10.5px; }

.doc-list { display: grid; gap: 2px; }
.media-grid + .doc-list { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }

.doc-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 6px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--ink);
}
.doc-row:hover { background: var(--paper); }
.doc-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.doc-row svg { color: var(--accent); flex: none; }

.doc-text { display: flex; flex-direction: column; min-width: 0; }
.doc-name {
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.doc-date { font-style: normal; font-size: 11.5px; color: var(--ink-soft); }

/* One tab per job, only when there is more than one. */
.file-tabs {
  display: flex;
  gap: 4px;
  margin: -4px 0 14px;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid var(--line);
}
.file-tabs::-webkit-scrollbar { display: none; }

.file-tab {
  border: 0;
  background: none;
  padding: 8px 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.file-tab:hover { color: var(--ink); }
.file-tab-on { color: var(--accent); border-bottom-color: var(--accent); }
.file-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

/* Sub-tabs: photos, videos and documents never share a view. Lighter than the
   job tabs above them so the two levels stay distinguishable. */
.file-subtabs {
  display: flex;
  gap: 6px;
  margin: 0 0 14px;
  flex-wrap: wrap;
}

.file-subtab {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  padding: 5px 12px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
}
.file-subtab:hover { color: var(--ink); }
.file-subtab-on {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}
.file-subtab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.pager-btn {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  padding: 7px 14px;
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--brand);
}
.pager-btn:disabled { opacity: 0.4; cursor: default; color: var(--ink-soft); }
.pager-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.pager-range { font-size: 12px; color: var(--ink-soft); }
