:root {
  --bg: #f4f1ea;
  --bg-deep: #ece6da;
  --paper: #fffdf8;
  --paper-2: #f9f5ed;
  --ink: #1e2733;
  --ink-soft: #3f4a57;
  --muted: #777c83;
  --line: #e6dfd2;
  --line-strong: #d8cfbf;
  --accent: #b85c36;
  --accent-dark: #96462a;
  --accent-soft: #f6e7df;
  --green: #3d6e57;
  --green-soft: #e7f2eb;
  --red: #a7443d;
  --red-soft: #f9e9e7;
  --amber: #96651d;
  --amber-soft: #fbf0d9;
  --blue: #456586;
  --blue-soft: #e8eff7;
  --shadow: 0 1px 2px rgba(30, 39, 51, .04), 0 14px 34px rgba(30, 39, 51, .07);
  --shadow-soft: 0 1px 2px rgba(30, 39, 51, .04), 0 6px 18px rgba(30, 39, 51, .05);
  --radius: 20px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
  --sidebar-w: 248px;
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html {
  min-height: 100%;
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(1200px 600px at 92% -10%, rgba(184, 92, 54, .08), transparent 60%),
    radial-gradient(900px 500px at -10% 100%, rgba(61, 110, 87, .05), transparent 55%),
    var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.sheet-open,
body.viewer-open {
  overflow: hidden;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4, p { margin: 0; }

h1 {
  font-family: var(--serif);
  font-weight: 700;
  letter-spacing: -.025em;
  font-size: 34px;
  line-height: 1.08;
}

h2 {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -.01em;
}

h3 { font-size: 15px; font-weight: 700; }

[hidden] { display: none !important; }

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

.icon {
  width: 20px;
  height: 20px;
  display: block;
  flex: 0 0 auto;
}

.icon-slot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ------------------------------------------------------------------ shell */

.app-shell { min-height: 100vh; }

.sidebar {
  display: none;
  position: fixed;
  top: 0; bottom: 0; left: 0;
  width: var(--sidebar-w);
  background:
    radial-gradient(500px 300px at 100% 0, rgba(184, 92, 54, .22), transparent 70%),
    #1e2733;
  color: #f5efe5;
  padding: 26px 18px 20px;
  flex-direction: column;
  z-index: 40;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  padding: 0 4px;
  margin-bottom: 26px;
}

.brand-mark { display: block; line-height: 0; }
.logo-mark { display: block; border-radius: 12px; }

.brand-text {
  display: flex;
  flex-direction: column;
  margin-left: 11px;
}
.brand-text strong {
  font-family: var(--serif);
  font-size: 23px;
  letter-spacing: -.02em;
  line-height: 1;
}
.brand-text small {
  font-size: 10.5px;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: rgba(245, 239, 229, .55);
  margin-top: 5px;
}

.sidebar-new {
  width: 100%;
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  margin-bottom: 22px;
}

.side-nav { display: flex; flex-direction: column; }

.side-link {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 46px;
  padding: 0 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: rgba(245, 239, 229, .68);
  text-align: left;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 3px;
}
.side-link .icon { margin-right: 11px; width: 19px; height: 19px; }
.side-link:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.side-link.active { background: rgba(255, 255, 255, .1); color: #fff; }

.sidebar-foot {
  margin-top: auto;
  padding: 14px 6px 0;
  border-top: 1px solid rgba(255, 255, 255, .09);
}
.sidebar-note {
  display: block;
  font-size: 11px;
  color: rgba(245, 239, 229, .48);
  margin-bottom: 3px;
}
.sidebar-foot small {
  font-size: 10px;
  color: rgba(245, 239, 229, .35);
  letter-spacing: .1em;
  text-transform: uppercase;
}

.view {
  padding: 16px 16px 112px;
  padding-top: max(16px, calc(var(--safe-top) + 10px));
  max-width: 880px;
  margin: 0 auto;
  min-height: 100vh;
}

.page { animation: pageIn .24s ease-out; }
@keyframes pageIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: none; }
}

.page-head { margin-bottom: 18px; }

.head-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.eyebrow {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

.page-sub {
  color: var(--muted);
  font-size: 13.5px;
  margin-top: 6px;
}

/* ------------------------------------------------------------------ buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  font-weight: 650;
  font-size: 14px;
  line-height: 1;
  text-decoration: none;
  transition: transform .12s ease, background .15s ease, border-color .15s ease, opacity .15s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(.985); }
.btn:disabled { cursor: default; }
.btn .icon { margin-right: 8px; width: 18px; height: 18px; }
.btn > .icon:last-child { margin-right: 0; margin-left: 8px; }
.btn span + span { margin-left: 6px; }

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }

.btn-secondary {
  background: var(--paper);
  border-color: var(--line-strong);
  color: var(--ink);
}
.btn-secondary:hover { background: var(--paper-2); }

.btn-ghost {
  color: var(--ink-soft);
}
.btn-ghost:hover { background: rgba(30, 39, 51, .055); }

.btn-danger-soft {
  background: var(--red-soft);
  color: var(--red);
  border-color: transparent;
}
.btn-danger-soft:hover { background: #f4dcd9; }

.btn-danger {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

.btn-sm {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 11px;
  font-size: 13px;
}
.btn-block { width: 100%; }

.btn.is-busy {
  opacity: .75;
  pointer-events: none;
  position: relative;
}
.btn.is-busy::after {
  content: "";
  width: 14px; height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  margin-left: 8px;
  animation: spin .7s linear infinite;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: var(--ink);
}
.icon-btn:hover { background: rgba(30, 39, 51, .055); }
.icon-btn.small { width: 34px; height: 34px; border-radius: 10px; }
.icon-btn.tiny { width: 28px; height: 28px; border-radius: 8px; }
.icon-btn.danger { color: var(--red); }

.spinner {
  display: inline-block;
  width: 18px; height: 18px;
  border: 2px solid rgba(30, 39, 51, .22);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .75s linear infinite;
  flex: 0 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------------ forms */

.field {
  display: block;
  margin-bottom: 14px;
}
.field > span {
  display: block;
  font-size: 12.5px;
  font-weight: 650;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.field > span small {
  color: var(--muted);
  font-weight: 500;
  margin-left: 3px;
}

.input {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 12px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.4;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
  -webkit-appearance: none;
}
.input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(184, 92, 54, .13);
}
textarea.input {
  min-height: 92px;
  resize: vertical;
}
select.input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23777c83' stroke-width='2' stroke-linecap='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  padding-right: 38px;
}
.input-lg {
  min-height: 56px;
  font-size: 19px;
  letter-spacing: .18em;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 0 12px;
}

.form-hint {
  font-size: 12.8px;
  line-height: 1.45;
  color: var(--muted);
  margin: -4px 0 14px;
}
.form-error {
  color: var(--red);
  font-size: 13px;
  margin: 0 0 12px;
}
.form-card h2 { margin-bottom: 12px; }
.form-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.form-card-head h2 { margin: 0; }
.lang-badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.check-row {
  display: flex;
  align-items: center;
  font-size: 13px;
  color: var(--ink-soft);
  margin: 0 0 14px;
}
.check-row input { margin: 0 9px 0 0; width: 18px; height: 18px; }

.form-footer-note {
  display: flex;
  align-items: flex-start;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.4;
  padding: 2px 4px 100px;
}
.form-footer-note .icon { color: var(--accent); margin-right: 8px; width: 18px; height: 18px; }

.form-savebar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  padding: 10px 16px calc(10px + var(--safe-bottom));
  background: rgba(244, 241, 234, .96);
  border-top: 1px solid var(--line);
  z-index: 35;
}
.form-savebar .btn { min-height: 50px; }

/* ------------------------------------------------------------------ cards */

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 17px;
  margin-bottom: 15px;
  box-shadow: var(--shadow-soft);
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 13px;
}
.section-head h2 { display: flex; align-items: center; }
.section-head p {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.4;
  margin-top: 4px;
  max-width: 520px;
}
.section-head.compact { margin-bottom: 9px; }

.section-title {
  display: flex;
  align-items: center;
}
.section-title h2 { margin-left: 8px; }
.section-title .icon { color: var(--accent); }

.section-label {
  display: flex;
  align-items: center;
  font-size: 10.5px;
  font-weight: 750;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}
.section-label .icon { width: 15px; height: 15px; margin-right: 5px; }

.count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  margin-left: 7px;
  border-radius: 999px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  vertical-align: 1px;
}

/* ------------------------------------------------------------------ home */

.stats-card {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background:
    radial-gradient(400px 200px at 100% 0, rgba(184, 92, 54, .35), transparent 70%),
    #1e2733;
  color: #f8f3e9;
  border-radius: 22px;
  padding: 18px 16px;
  margin-bottom: 16px;
  box-shadow: 0 16px 34px rgba(30, 39, 51, .18);
  overflow: hidden;
}
.stat { padding: 0 10px; }
.stat:first-child { padding-left: 2px; }
.stat + .stat { border-left: 1px solid rgba(248, 243, 233, .14); }
.stat-value {
  display: block;
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.1;
  white-space: nowrap;
}
.stat-label {
  display: block;
  margin-top: 4px;
  font-size: 9.5px;
  font-weight: 650;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(248, 243, 233, .58);
}

.toolbar { margin-bottom: 16px; }

.searchbox { position: relative; }
.searchbox > .icon {
  position: absolute;
  left: 14px;
  top: 50%;
  width: 18px; height: 18px;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}
.search-input {
  width: 100%;
  height: 49px;
  padding: 0 42px 0 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  font-size: 16px;
  color: var(--ink);
  outline: none;
  -webkit-appearance: none;
}
.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(184, 92, 54, .11);
}
.search-clear {
  position: absolute;
  right: 8px; top: 50%;
  transform: translateY(-50%);
  width: 34px; height: 34px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.search-clear .icon { width: 16px; height: 16px; }

.chips {
  display: flex;
  align-items: center;
  overflow-x: auto;
  padding: 11px 1px 2px;
  margin: 0 -1px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  height: 36px;
  padding: 0 13px;
  margin-right: 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink-soft);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}
.chip.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.chip-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 17px;
  height: 17px;
  padding: 0 5px;
  margin-left: 6px;
  border-radius: 999px;
  background: rgba(30, 39, 51, .08);
  font-size: 10px;
  font-weight: 700;
}
.chip.active .chip-count { background: rgba(255, 255, 255, .18); }

.job-grid {
  display: grid;
  grid-template-columns: 1fr;
  grid-gap: 14px;
}
.job-grid-single { grid-template-columns: 1fr; }

.job-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: var(--paper);
  overflow: hidden;
  text-align: left;
  box-shadow: var(--shadow-soft);
  transition: transform .16s ease, box-shadow .16s ease;
}
.job-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

.job-thumb {
  position: relative;
  height: 148px;
  background: var(--bg-deep);
  overflow: hidden;
}
.job-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.job-thumb.no-photo {
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(280px 160px at 80% 20%, rgba(184, 92, 54, .15), transparent 70%),
    #ebe4d8;
}
.job-thumb-icon { color: rgba(30, 39, 51, .2); }
.job-thumb-icon .icon { width: 60px; height: 60px; }
.card-status {
  position: absolute;
  left: 11px;
  top: 11px;
  background: rgba(255, 253, 248, .94);
  box-shadow: 0 2px 8px rgba(30, 39, 51, .1);
}
.job-card-body { padding: 13px 15px 14px; flex: 1; display: flex; flex-direction: column; }
.job-card-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}
.job-card-top h3 {
  font-size: 16.5px;
  letter-spacing: -.015em;
  line-height: 1.2;
  padding-right: 8px;
}
.job-date {
  flex: 0 0 auto;
  font-size: 11.5px;
  color: var(--muted);
}
.job-customer {
  color: var(--muted);
  font-size: 12.5px;
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.job-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 9px;
  color: var(--muted);
  font-size: 11.5px;
}
.job-meta span {
  display: inline-flex;
  align-items: center;
  margin-right: 12px;
}
.job-meta .icon { width: 14px; height: 14px; margin-right: 4px; }
.job-meta .running { color: var(--accent); font-weight: 700; }

.status-pill {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 9px;
  border: 0;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .01em;
  white-space: nowrap;
}
.status-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  margin-right: 5px;
}
.status-pill.interactive { height: 31px; padding: 0 11px; cursor: pointer; }
.pill-chev { width: 14px; height: 14px; margin-left: 4px; opacity: .7; }
.status-progress { background: var(--amber-soft); color: var(--amber); }
.status-waiting { background: var(--blue-soft); color: var(--blue); }
.status-fixed { background: var(--green-soft); color: var(--green); }
.status-partial { background: var(--amber-soft); color: var(--amber); }
.status-not { background: var(--red-soft); color: var(--red); }

.empty,
.no-results,
.error-state {
  text-align: center;
  padding: 42px 22px;
  background: var(--paper);
  border: 1px dashed var(--line-strong);
  border-radius: 22px;
}
.empty-icon {
  width: 66px; height: 66px;
  margin: 0 auto 16px;
  border-radius: 20px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}
.empty-icon .icon { width: 32px; height: 32px; }
.empty h2, .no-results h3, .error-state h2 { font-family: var(--serif); font-size: 22px; }
.empty p, .no-results p, .error-state p {
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.5;
  max-width: 360px;
  margin: 7px auto 18px;
}
.no-results > .icon { color: var(--muted); width: 34px; height: 34px; margin: 0 auto 12px; }

/* ------------------------------------------------------------------ customers */

.customer-list { display: block; }
.customer-card {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 13px 14px;
  margin-bottom: 9px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--paper);
  text-align: left;
  box-shadow: var(--shadow-soft);
}
.customer-card:hover { border-color: var(--line-strong); }
.avatar {
  width: 46px; height: 46px;
  flex: 0 0 auto;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 750;
  font-size: 14px;
  letter-spacing: .02em;
}
.avatar-lg { width: 74px; height: 74px; font-size: 22px; margin: 0 auto 12px; }
.customer-main {
  flex: 1;
  min-width: 0;
  margin-left: 12px;
  display: flex;
  flex-direction: column;
}
.customer-main strong {
  font-size: 15px;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.customer-main span {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}
.customer-main small {
  color: var(--muted);
  font-size: 11.5px;
  margin-top: 1px;
}
.customer-card .chev { color: var(--muted); width: 18px; height: 18px; margin-left: 8px; }

.customer-hero {
  text-align: center;
  padding: 24px 18px 20px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 22px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-soft);
}
.customer-hero h1 { font-size: 29px; }
.customer-hero p { color: var(--muted); font-size: 13px; margin-top: 3px; }
.customer-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 15px;
}
.customer-actions .btn { margin: 0 4px 6px; }

/* ------------------------------------------------------------------ job detail */

.detail-topbar {
  display: flex;
  align-items: center;
  min-height: 48px;
  margin-bottom: 10px;
}
.topbar-title {
  flex: 1;
  text-align: center;
  font-size: 13px;
  font-weight: 650;
  color: var(--ink-soft);
  letter-spacing: .01em;
}
.topbar-actions { display: flex; }
.form-topbar .topbar-title { text-align: left; margin-left: 4px; }

.job-cover {
  position: relative;
  height: 236px;
  border-radius: 24px;
  overflow: hidden;
  margin-bottom: 12px;
  background: #1e2733;
  box-shadow: var(--shadow);
}
.cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.cover-overlay {
  position: absolute;
  left: 0; right: 0; bottom: 0; top: 0;
  background: linear-gradient(to top, rgba(12, 18, 24, .88), rgba(12, 18, 24, .28) 55%, rgba(12, 18, 24, .08));
}
.cover-content {
  position: absolute;
  left: 18px; right: 18px; bottom: 17px;
  color: #fff;
}
.cover-content h1 {
  font-size: 29px;
  margin-top: 9px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .2);
}
.cover-content p {
  font-size: 12.5px;
  color: rgba(255, 255, 255, .78);
  margin-top: 2px;
}
.job-cover.no-photo .cover-pattern {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  color: rgba(255, 255, 255, .14);
}
.job-cover.no-photo .cover-pattern .icon { width: 100px; height: 100px; }

.job-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  padding: 0 3px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 12px;
}
.job-meta-row span {
  display: inline-flex;
  align-items: center;
  margin-right: 14px;
  margin-bottom: 3px;
}
.job-meta-row .icon { width: 15px; height: 15px; margin-right: 4px; }

.job-actions-row {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  grid-gap: 9px;
  margin-bottom: 16px;
}
.job-actions-row .btn { min-width: 0; padding: 0 10px; }

.photos-card .section-head { margin-bottom: 6px; }
.stages { margin: 0 -2px; }
.stage-block {
  padding: 13px 0 14px;
  border-top: 1px solid var(--line);
}
.stage-block:first-child { border-top: 0; padding-top: 7px; }
.stage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 9px;
}
.stage-head h3 {
  font-size: 14px;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
}
.stage-head h3 span {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--muted);
  margin-left: 7px;
}
.mini-add {
  width: 36px; height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent);
  flex: 0 0 auto;
}
.mini-add .icon { width: 19px; height: 19px; }

.stage-thumbs {
  display: flex;
  align-items: stretch;
  overflow-x: auto;
  padding: 1px 1px 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.stage-thumbs::-webkit-scrollbar { display: none; }
.thumb {
  position: relative;
  flex: 0 0 auto;
  width: 104px;
  height: 104px;
  padding: 0;
  margin-right: 8px;
  border: 0;
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg-deep);
}
.thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.thumb-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 20px 6px 5px;
  background: linear-gradient(transparent, rgba(10, 15, 20, .82));
  color: #fff;
  font-size: 9.5px;
  line-height: 1.25;
  text-align: left;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.thumb-hidden {
  position: absolute;
  top: 5px; right: 5px;
  width: 22px; height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: rgba(10, 15, 20, .65);
  color: #fff;
}
.thumb-hidden .icon { width: 13px; height: 13px; }
.thumb-add {
  flex: 0 0 auto;
  width: 104px;
  height: 104px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  background: var(--paper-2);
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
}
.thumb-add .icon { width: 23px; height: 23px; margin-bottom: 5px; color: var(--accent); }

.timer-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background:
    linear-gradient(120deg, rgba(184, 92, 54, .06), transparent 55%),
    var(--paper);
}
.timer-main { min-width: 0; }
.timer-value {
  font-family: var(--serif);
  font-size: 31px;
  font-weight: 700;
  letter-spacing: .01em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  margin-top: 3px;
}
.timer-sub {
  display: flex;
  align-items: center;
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 2px;
}
.live-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 5px;
  animation: pulse 1.5s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .3; }
}
.timer-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  flex: 0 0 auto;
  margin-left: 10px;
}
.timer-actions .btn { min-height: 38px; padding: 0 12px; font-size: 12.5px; margin: 3px 0; }

.text-card .section-head { margin-bottom: 5px; }
.prose {
  white-space: pre-wrap;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-soft);
  word-wrap: break-word;
}
.inline-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 58px;
  padding: 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  background: var(--paper-2);
  color: var(--muted);
  font-size: 13px;
}
.inline-empty .icon { width: 17px; height: 17px; margin-right: 7px; color: var(--accent); }
.text-card.recommendation {
  background:
    linear-gradient(120deg, rgba(184, 92, 54, .055), transparent 60%),
    var(--paper);
}

/* translation */

.ai-badge {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 10.5px;
  font-weight: 750;
  letter-spacing: .05em;
}
.ai-badge .icon { width: 14px; height: 14px; margin-right: 5px; }
.translate-empty { text-align: center; padding: 8px 4px 4px; }
.translate-icon {
  width: 54px; height: 54px;
  margin: 0 auto 12px;
  border-radius: 17px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}
.translate-icon .icon { width: 27px; height: 27px; }
.translate-empty h3 { font-family: var(--serif); font-size: 20px; }
.translate-empty p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  max-width: 380px;
  margin: 5px auto 14px;
}
.translate-empty .btn { margin-bottom: 6px; }
.translate-empty .hint { font-size: 11.5px; margin-bottom: 0; }

.notice {
  display: flex;
  align-items: flex-start;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 12.5px;
  line-height: 1.45;
  margin-bottom: 12px;
}
.notice .icon { width: 17px; height: 17px; margin-right: 8px; flex: 0 0 auto; margin-top: 1px; }
.notice.warning { background: var(--amber-soft); color: var(--amber); }

.summary-box {
  padding: 13px 14px;
  border-radius: 12px;
  background: var(--paper-2);
  border-left: 3px solid var(--accent);
  margin-bottom: 12px;
}
.summary-box p { font-size: 14.5px; line-height: 1.52; margin-top: 5px; }
.translated-fields { margin-bottom: 10px; }
.translated-field { padding: 9px 0; border-top: 1px solid var(--line); }
.translated-field > span {
  display: block;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  font-weight: 700;
}
.translated-field p { font-size: 13.8px; line-height: 1.5; margin-top: 3px; white-space: pre-wrap; }
.translation-actions { display: flex; flex-wrap: wrap; margin-top: 12px; }
.translation-actions .btn { margin: 0 8px 8px 0; }
.translation-actions .btn:last-child { margin-right: 0; }
.translation-date { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* checklist */

.save-state {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 7px;
  margin-left: 7px;
  border-radius: 999px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .03em;
  background: var(--paper-2);
  color: var(--muted);
  vertical-align: 1px;
}
.save-state.saving { background: var(--amber-soft); color: var(--amber); }
.save-state.saved { background: var(--green-soft); color: var(--green); }
.save-state.error { background: var(--red-soft); color: var(--red); }

.check-group { border-top: 1px solid var(--line); }
.check-group:first-child { border-top: 0; }
.check-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 13px 0;
  border: 0;
  background: transparent;
  text-align: left;
}
.check-group-title { display: flex; flex-direction: column; }
.check-group-title strong { font-size: 14px; }
.check-group-title small { font-size: 11px; color: var(--muted); margin-top: 1px; }
.check-group-meta {
  display: flex;
  align-items: center;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}
.group-chev { width: 17px; height: 17px; margin-left: 5px; transition: transform .18s ease; }
.check-group.open .group-chev { transform: rotate(180deg); }
.check-group-body { padding-bottom: 8px; }
.check-item { padding: 11px 0; border-top: 1px dashed var(--line); }
.check-item:first-child { border-top: 0; }
.check-item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 6px;
}
.check-name { font-size: 13.5px; font-weight: 650; }
.check-name small { font-size: 11px; font-weight: 500; color: var(--muted); margin-left: 4px; }
.check-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 9px;
}
.check-fields label > span {
  display: block;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}
.check-input {
  min-height: 58px;
  padding: 8px 10px;
  font-size: 16px;
  line-height: 1.35;
}

/* details */

.details-list { margin: 0; }
.details-list > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}
.details-list > div:first-child { border-top: 0; }
.details-list dt { color: var(--muted); font-size: 12.5px; }
.details-list dd {
  margin: 0 0 0 14px;
  text-align: right;
  font-size: 13px;
  word-break: break-word;
}
.details-list dd a { color: var(--accent); }
.internal-notes {
  margin-top: 10px;
  padding: 12px;
  border-radius: 11px;
  background: var(--paper-2);
}
.internal-notes p { font-size: 13px; line-height: 1.5; margin-top: 3px; white-space: pre-wrap; }

.job-footer-actions {
  display: flex;
  flex-wrap: wrap;
  margin: 4px 0 24px;
}
.job-footer-actions .btn { margin: 0 8px 8px 0; }

/* ------------------------------------------------------------------ settings */

.preset-row { display: flex; flex-wrap: wrap; margin-bottom: 13px; }
.preset-row .chip { margin: 0 7px 7px 0; }
.settings-actions { display: flex; flex-wrap: wrap; margin-top: 2px; }
.settings-actions .btn { margin: 0 8px 8px 0; }
.test-result {
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 12.5px;
  line-height: 1.45;
  margin-top: 4px;
  word-break: break-word;
}
.test-result.success { background: var(--green-soft); color: var(--green); }
.test-result.error { background: var(--red-soft); color: var(--red); }
.about-text { font-size: 13.5px; line-height: 1.5; margin-bottom: 8px; }
code {
  padding: 1px 5px;
  border-radius: 4px;
  background: #eee8dc;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .9em;
}

/* ------------------------------------------------------------------ report */

.report-toolbar {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  padding: calc(8px + var(--safe-top)) 12px 8px;
  background: rgba(244, 241, 234, .95);
  border-bottom: 1px solid var(--line);
}
.report-sheet {
  max-width: 820px;
  margin: 20px auto 60px;
  padding: 34px 34px 30px;
  background: #fff;
  color: #1c2430;
  border-radius: 6px;
  box-shadow: 0 18px 50px rgba(30, 39, 51, .14);
}
.report-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 2px solid #1c2430;
}
.report-brand { display: flex; align-items: center; }
.report-brand .logo-mark { border-radius: 12px; }
.report-brand > div { margin-left: 11px; }
.report-brand strong {
  display: block;
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.1;
}
.report-brand span {
  display: block;
  font-size: 10.5px;
  color: #6b7280;
  margin-top: 4px;
  line-height: 1.4;
}
.report-title { text-align: right; }
.report-title span {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #9a6a22;
}
.report-title strong {
  display: block;
  font-size: 17px;
  margin-top: 3px;
  letter-spacing: .03em;
}
.report-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-gap: 14px 18px;
  margin: 20px 0 24px;
}
.report-meta-grid div > span {
  display: block;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #8a8f96;
  margin-bottom: 2px;
}
.report-meta-grid strong { font-size: 13px; font-weight: 650; }
.report-status { display: inline-block; }
.report-status.status-fixed { color: #2f604b; background: none; }
.report-status.status-not { color: #9c3d36; background: none; }
.report-status.status-progress,
.report-status.status-partial { color: #8a5a17; background: none; }
.report-status.status-waiting { color: #3e5d7e; background: none; }

.report-section { margin: 18px 0; }
.report-section h2,
.report-checklist h2,
.report-photos h2 {
  font-size: 10.5px;
  font-weight: 750;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: #9a6a22;
  margin-bottom: 6px;
}
.report-section p {
  font-size: 13.5px;
  line-height: 1.55;
  white-space: pre-wrap;
}
.report-section p + p { margin-top: 4px; }
.report-section em { color: #8a8f96; }
.summary-section {
  padding: 13px 15px;
  background: #f7f3eb;
  border-left: 3px solid #b85c36;
  border-radius: 3px;
}
.summary-section p { font-size: 14px; }

.report-photos { margin-top: 24px; }
.report-photo-group { margin-top: 13px; page-break-inside: avoid; }
.report-photo-group h3 {
  font-size: 9.5px;
  font-weight: 750;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #8a8f96;
  margin-bottom: 6px;
}
.report-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  grid-gap: 9px;
}
.report-photo-grid figure {
  margin: 0;
  page-break-inside: avoid;
}
.report-photo-grid img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
  border-radius: 5px;
  background: #eee;
}
.report-photo-grid figcaption {
  font-size: 9.5px;
  color: #777c83;
  margin-top: 3px;
  line-height: 1.3;
}
.report-checklist { margin-top: 24px; page-break-inside: auto; }
.report-checklist table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 4px;
}
.report-checklist th {
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: #8a8f96;
  text-align: left;
  padding: 5px 7px;
  border-bottom: 1px solid #d8cfbf;
}
.report-checklist td {
  font-size: 11px;
  line-height: 1.35;
  padding: 6px 7px;
  border-bottom: 1px solid #ece6da;
  vertical-align: top;
}
.report-checklist td:first-child { font-weight: 600; width: 30%; }
.report-footer {
  margin-top: 30px;
  padding-top: 13px;
  border-top: 1px solid #d8cfbf;
}
.report-footer p { font-size: 12.5px; margin-bottom: 5px; }
.report-footer span { display: block; font-size: 10.5px; color: #777c83; }
.report-footer small { display: block; font-size: 9.5px; color: #9aa0a7; margin-top: 8px; }

/* ------------------------------------------------------------------ login */

.login-page {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background:
    radial-gradient(700px 420px at 80% 0, rgba(184, 92, 54, .28), transparent 65%),
    radial-gradient(600px 400px at 0 100%, rgba(61, 110, 87, .14), transparent 60%),
    #1e2733;
}
.login-card {
  width: 100%;
  max-width: 386px;
  padding: 30px 26px 24px;
  border-radius: 26px;
  background: var(--paper);
  text-align: center;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .32);
}
.login-logo { display: inline-block; margin-bottom: 13px; }
.login-card h1 { font-size: 31px; }
.login-card > p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  margin: 6px auto 20px;
  max-width: 280px;
}
.login-card form { text-align: left; }
.login-card .btn { margin-top: 6px; }
.login-foot {
  display: block;
  color: var(--muted);
  font-size: 10.5px;
  margin-top: 18px;
}

body.login-mode .sidebar,
body.login-mode .tabbar,
body.login-mode .fab { display: none !important; }
body.login-mode .view { margin: 0; padding: 0; max-width: none; }

/* ------------------------------------------------------------------ tabbar / fab */

.tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 38;
  display: flex;
  align-items: stretch;
  height: calc(62px + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: rgba(255, 253, 248, .97);
  border-top: 1px solid var(--line);
}
.tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 650;
  letter-spacing: .02em;
}
.tab .icon { width: 23px; height: 23px; margin-bottom: 3px; }
.tab.active { color: var(--accent); }
.tab.active .icon { color: var(--accent); }

.fab {
  position: fixed;
  right: 18px;
  bottom: calc(78px + var(--safe-bottom));
  z-index: 39;
  width: 56px; height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 18px;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 24px rgba(184, 92, 54, .38);
}
.fab .icon { width: 26px; height: 26px; }
.fab:active { transform: scale(.96); }

body.hide-tabbar .tabbar { display: none; }
body.hide-tabbar .view { padding-bottom: 40px; }

/* ------------------------------------------------------------------ overlays */

.sheet-overlay {
  position: fixed;
  left: 0; right: 0; top: 0; bottom: 0;
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(15, 20, 26, .46);
  opacity: 0;
  transition: opacity .2s ease;
}
.sheet-overlay.open { opacity: 1; }
.sheet {
  width: 100%;
  max-width: 560px;
  max-height: 89vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 7px 20px calc(18px + var(--safe-bottom));
  background: var(--paper);
  border-radius: 24px 24px 0 0;
  transform: translateY(26px);
  transition: transform .22s ease;
  box-shadow: 0 -20px 60px rgba(0, 0, 0, .18);
}
.sheet-overlay.open .sheet { transform: none; }
.sheet-grip {
  width: 36px; height: 4px;
  border-radius: 999px;
  background: var(--line-strong);
  margin: 3px auto 9px;
}
.sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}
.sheet-head h2 {
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: -.02em;
}
.sheet-head p {
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}
.sheet-body { margin-top: 10px; }
.sheet-message {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-soft);
  margin-bottom: 12px;
  white-space: pre-wrap;
}
.sheet-message.small { font-size: 11.5px; color: var(--muted); margin: 10px 0 0; }
.sheet-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 15px;
}
.sheet-actions .btn { margin-left: 8px; }
.sheet .field:last-child { margin-bottom: 0; }

.action-list {
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}
.action-row {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 12px 13px;
  border: 0;
  border-top: 1px solid var(--line);
  background: var(--paper);
  text-align: left;
}
.action-row:first-child { border-top: 0; }
.action-row:hover { background: var(--paper-2); }
.action-icon {
  width: 38px; height: 38px;
  flex: 0 0 auto;
  border-radius: 12px;
  background: var(--paper-2);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}
.action-icon .icon { width: 19px; height: 19px; }
.action-label {
  flex: 1;
  min-width: 0;
  margin-left: 11px;
  display: flex;
  flex-direction: column;
}
.action-label strong { font-size: 14px; }
.action-label small { color: var(--muted); font-size: 11.5px; margin-top: 1px; }
.action-chev { color: var(--muted); width: 17px; height: 17px; }
.action-row.danger .action-icon { background: var(--red-soft); color: var(--red); }
.action-row.danger strong { color: var(--red); }

/* viewer */

.viewer-overlay {
  position: fixed;
  left: 0; right: 0; top: 0; bottom: 0;
  z-index: 200;
  background: #0b0f14;
  color: #fff;
  display: flex;
  flex-direction: column;
}
.viewer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(8px + var(--safe-top)) 12px 7px;
}
.viewer-btn {
  width: 44px; height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .1);
  color: #fff;
}
.viewer-count { font-size: 12px; color: rgba(255, 255, 255, .72); }
.viewer-spacer { width: 44px; }
.viewer-stage {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  min-height: 0;
}
.viewer-stage img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}
.viewer-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px; height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .42);
  color: #fff;
}
.viewer-nav.prev { left: 10px; }
.viewer-nav.next { right: 10px; }
.viewer-nav .icon { width: 24px; height: 24px; }
.viewer-bottom {
  padding: 8px 16px calc(16px + var(--safe-bottom));
  background: linear-gradient(transparent, rgba(0, 0, 0, .7));
}
.viewer-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, .08);
  color: #fff;
  font-size: 13.5px;
  text-align: left;
}
.viewer-caption span { color: rgba(255, 255, 255, .5); }
.caption-edit { width: 15px; height: 15px; opacity: .5; margin-left: 10px; flex: 0 0 auto; }
.viewer-actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-around;
  margin-top: 9px;
}
.viewer-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, .66);
  font-size: 10px;
  padding: 2px 9px;
}
.viewer-action .icon { width: 22px; height: 22px; margin-bottom: 3px; }
.viewer-action.active { color: #f3c88b; }
.viewer-action.danger { color: #f0a69e; }

/* toast / loading */

.toast-root { position: fixed; left: 0; right: 0; bottom: 0; z-index: 400; pointer-events: none; }
#toast-root {
  position: fixed;
  left: 50%;
  bottom: calc(84px + var(--safe-bottom));
  z-index: 400;
  transform: translateX(-50%);
  width: auto;
  max-width: calc(100vw - 32px);
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  margin: 7px auto 0;
  padding: 11px 15px;
  border-radius: 13px;
  background: #1e2733;
  color: #f8f3e9;
  font-size: 13px;
  line-height: 1.35;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .2);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .2s ease, transform .2s ease;
  max-width: 420px;
}
.toast.show { opacity: 1; transform: none; }
.toast .icon { width: 18px; height: 18px; margin-right: 8px; flex: 0 0 auto; }
.toast-success { background: #2f5d49; }
.toast-error { background: #8f3c35; }

.loading-overlay {
  position: fixed;
  left: 0; right: 0; top: 0; bottom: 0;
  z-index: 250;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 20, 26, .48);
  padding: 22px;
  opacity: 0;
  transition: opacity .2s ease;
}
.loading-overlay.show { opacity: 1; }
.loading-card {
  width: 100%;
  max-width: 320px;
  padding: 24px 20px;
  border-radius: 20px;
  background: var(--paper);
  text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .24);
}
.loading-card .spinner { width: 28px; height: 28px; margin-bottom: 12px; }
.loading-card strong { display: block; font-size: 15px; }
.loading-card span { display: block; color: var(--muted); font-size: 11.5px; margin-top: 4px; }

/* upload tray */

.upload-tray {
  position: fixed;
  left: 16px; right: 16px;
  bottom: calc(84px + var(--safe-bottom));
  z-index: 120;
  max-width: 420px;
  margin: 0 auto;
  padding: 13px 15px;
  border-radius: 16px;
  background: #1e2733;
  color: #f8f3e9;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .26);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .2s ease, transform .2s ease;
}
.upload-tray.show { opacity: 1; transform: none; }
.upload-head { display: flex; align-items: center; font-size: 12.5px; }
.upload-head .spinner { width: 16px; height: 16px; border-color: rgba(255, 255, 255, .25); border-top-color: #f3c88b; margin-right: 8px; }
.upload-head strong { flex: 1; font-weight: 600; }
.upload-head > span:last-child { color: rgba(248, 243, 233, .55); font-size: 11px; margin-left: 8px; }
.upload-bar {
  height: 4px;
  margin-top: 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .15);
  overflow: hidden;
}
.upload-bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: #e19a6e;
  transition: width .25s ease;
}
.upload-note { font-size: 10.5px; color: rgba(248, 243, 233, .55); margin-top: 5px; }

/* skeleton / boot */

.skeleton-page { padding-top: 4px; }
.skeleton-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 14px;
}
.sk-line {
  height: 11px;
  border-radius: 6px;
  background: #e9e2d6;
  margin-bottom: 10px;
  animation: shimmer 1.4s ease-in-out infinite;
}
.sk-line-lg { width: 55%; height: 17px; }
.sk-line-sm { width: 30%; }
@keyframes shimmer {
  0%, 100% { opacity: .55; }
  50% { opacity: 1; }
}
.boot-screen {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  text-align: center;
}
.boot-logo { display: block; margin-bottom: 18px; }
.boot-screen p { font-size: 12.5px; margin-top: 11px; }
.noscript {
  position: fixed;
  left: 16px; right: 16px; bottom: 16px;
  z-index: 500;
  padding: 15px;
  border-radius: 14px;
  background: var(--red);
  color: #fff;
  font-size: 13px;
  text-align: center;
}

/* ------------------------------------------------------------------ responsive */

@media (min-width: 560px) {
  .job-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .job-grid-single { grid-template-columns: 1fr; }
  .timer-actions { flex-direction: row; align-items: center; }
  .timer-actions .btn { margin: 0 0 0 5px; }
}

@media (min-width: 700px) {
  .view { padding-left: 24px; padding-right: 24px; }
  .sheet-overlay { align-items: center; }
  .sheet {
    border-radius: 24px;
    max-height: 84vh;
    margin: 0 20px 4vh;
    padding: 9px 24px 22px;
  }
  .sheet-grip { display: none; }
  .report-sheet { padding: 40px 42px 34px; }
  .toast-root { bottom: 24px; }
  #toast-root { bottom: 24px; }
}

@media (min-width: 900px) {
  .sidebar { display: flex; }
  .view {
    margin-left: var(--sidebar-w);
    margin-right: 0;
    max-width: none;
    padding: 34px 38px 70px;
  }
  .tabbar { display: none !important; }
  .fab { display: none !important; }
  .desktop-hide { display: none !important; }
  .page { max-width: 1020px; margin: 0 auto; }
  .job-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .job-grid-single { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .job-cover { height: 280px; }
  .form-savebar { left: var(--sidebar-w); padding-left: 38px; padding-right: 38px; }
  .form-savebar .btn { max-width: 1020px; margin: 0 auto; display: flex; }
  .report-toolbar { padding-left: 30px; padding-right: 30px; }
  body.report-mode .view { margin-left: 0; padding: 0; }
  body.login-mode .view { margin-left: 0; }
  .customer-list { display: grid; grid-template-columns: 1fr 1fr; grid-gap: 10px; }
  .customer-card { margin-bottom: 0; }
}

@media (min-width: 1180px) {
  .job-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .job-grid-single { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
  h1 { font-size: 30px; }
  .stats-card { padding: 16px 12px; }
  .stat { padding: 0 7px; }
  .stat-value { font-size: 21px; }
  .stat-label { font-size: 8.5px; }
  .field-row { grid-template-columns: 1fr; grid-gap: 0; }
  .check-fields { grid-template-columns: 1fr; grid-gap: 7px; }
  .job-actions-row { grid-template-columns: 1fr 1fr; }
  .job-actions-row .btn { font-size: 12.5px; min-height: 44px; }
  .job-actions-row .btn .icon { margin-right: 6px; }
  .timer-card { align-items: flex-start; }
  .timer-actions { flex-direction: column; }
  .timer-actions .btn { margin: 3px 0; }
  .cover-content h1 { font-size: 25px; }
  .job-cover { height: 210px; }
  .report-sheet { margin: 12px 8px 30px; padding: 24px 18px; }
  .report-meta-grid { grid-template-columns: 1fr 1fr; }
  .report-header { flex-direction: column; }
  .report-title { text-align: left; margin-top: 12px; }
  .report-photo-grid { grid-template-columns: 1fr 1fr; }
  .report-photo-grid img { height: 120px; }
}

@media (max-width: 370px) {
  .stat-value { font-size: 18px; }
  .tab { font-size: 9px; }
  .job-actions-row { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------------ print */

@media print {
  @page { margin: 14mm; }
  html, body { background: #fff !important; }
  body { font-size: 11px; }
  .sidebar, .tabbar, .fab, .toast, #toast-root, .upload-tray,
  .report-toolbar, .no-print, .loading-overlay, .sheet-overlay, .viewer-overlay {
    display: none !important;
  }
  .view { margin: 0 !important; padding: 0 !important; max-width: none !important; }
  .report-sheet {
    margin: 0 !important;
    padding: 0 !important;
    max-width: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
  }
  .report-photo-grid img { height: 42mm; }
  .report-photo-grid { grid-template-columns: 1fr 1fr; }
  .report-section, .report-photo-group, .report-footer { page-break-inside: avoid; }
  .report-checklist { page-break-inside: auto; }
  .report-checklist tr { page-break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
}
