/* Paragon Field App — mobile-first, aligned to mockups/src/styles.css */
:root {
  --blue: #008FBB;
  --blue-hover: #007AA0;
  --blue-soft: #E6F5FA;
  --charcoal: #2C2C2C;
  --charcoal-soft: #5A5A5A;
  --border: #E2E5E8;
  --bg: #F4F6F8;
  --surface: #FFFFFF;
  --surface-2: #F0F2F4;
  --text: #2C2C2C;
  --text-muted: #6B7280;
  --success: #1B8A4A;
  --success-bg: #E8F7EE;
  --danger: #C0392B;
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-btn: 0 2px 8px rgba(0,143,187,0.28);
  --hairline: #D1D5DB;
  --input-bg: #FFFFFF;
  --chip-bg: #EEF2F5;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --focus-ring: 0 0 0 3px var(--blue-soft);
}

@media (prefers-color-scheme: dark) {
  :root {
    --blue: #1AA3D4;
    --blue-hover: #008FBB;
    --blue-soft: #0A2A35;
    --charcoal: #E8EAED;
    --charcoal-soft: #A8ADB5;
    --border: #2A2E33;
    --bg: #0D0F12;
    --surface: #161A1F;
    --surface-2: #1E2329;
    --text: #F0F2F4;
    --text-muted: #9AA0A8;
    --success: #3DCF7A;
    --success-bg: #0F2A1A;
    --danger: #E57373;
    --shadow: 0 1px 3px rgba(0,0,0,0.4);
    --shadow-btn: 0 2px 10px rgba(26,163,212,0.35);
    --hairline: #333840;
    --input-bg: #1E2329;
    --chip-bg: #252A31;
  }
}

[data-theme="dark"] {
  --blue: #1AA3D4;
  --blue-hover: #008FBB;
  --blue-soft: #0A2A35;
  --charcoal: #E8EAED;
  --charcoal-soft: #A8ADB5;
  --border: #2A2E33;
  --bg: #0D0F12;
  --surface: #161A1F;
  --surface-2: #1E2329;
  --text: #F0F2F4;
  --text-muted: #9AA0A8;
  --success: #3DCF7A;
  --success-bg: #0F2A1A;
  --danger: #E57373;
  --shadow: 0 1px 3px rgba(0,0,0,0.4);
  --shadow-btn: 0 2px 10px rgba(26,163,212,0.35);
  --hairline: #333840;
  --input-bg: #1E2329;
  --chip-bg: #252A31;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--blue); }
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.btn:focus-visible,
.job-select-btn:focus-visible,
.admin-btn:focus-visible,
.menu-item:focus-visible,
.admin-action:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

#app {
  min-height: 100%;
  max-width: 520px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  padding-top: var(--safe-top);
  padding-bottom: var(--safe-bottom);
}
#app.wide, #admin-root.wide { max-width: 1100px; margin: 0 auto; }
#admin-root { background: var(--bg); color: var(--text); min-height: 100vh; }

/* Typography */
.h1 { font-size: 22px; font-weight: 700; letter-spacing: -0.4px; color: var(--text); }
.h2 { font-size: 17px; font-weight: 650; letter-spacing: -0.2px; color: var(--text); }
.label {
  font-size: 12px; font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.6px;
}
.muted { font-size: 13px; color: var(--text-muted); line-height: 1.35; }
.body { font-size: 15px; line-height: 1.4; color: var(--text); }

/* Logo — white plate in dark so charcoal wordmark stays legible */
.logo-wrap { display: flex; justify-content: center; padding: 8px 24px 4px; }
.logo-wrap img { height: 56px; width: auto; object-fit: contain; }
.logo-wrap.compact img { height: 42px; }
.logo-wrap.large img { height: 72px; }
.logo-plate { display: inline-flex; align-items: center; justify-content: center; }
@media (prefers-color-scheme: dark) {
  .logo-plate {
    background: #FFFFFF;
    border-radius: 14px;
    padding: 14px 18px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.35);
  }
  .logo-wrap.compact .logo-plate,
  .logo-plate.compact {
    padding: 8px 12px;
    border-radius: 10px;
  }
  .logo-wrap.compact .logo-plate img,
  .logo-plate.compact img { height: 36px; }
  .logo-wrap.large .logo-plate,
  .logo-plate.large { padding: 18px 22px; }
  .logo-wrap.large .logo-plate img,
  .logo-plate.large img { height: 64px; }
  .logo-wrap { padding-top: 4px; }
}
[data-theme="dark"] .logo-plate {
  background: #FFFFFF;
  border-radius: 14px;
  padding: 14px 18px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.35);
}
[data-theme="dark"] .logo-wrap.compact .logo-plate,
[data-theme="dark"] .logo-plate.compact {
  padding: 8px 12px;
  border-radius: 10px;
}
[data-theme="dark"] .logo-wrap.compact .logo-plate img,
[data-theme="dark"] .logo-plate.compact img { height: 36px; }
[data-theme="dark"] .logo-wrap.large .logo-plate,
[data-theme="dark"] .logo-plate.large { padding: 18px 22px; }
[data-theme="dark"] .logo-wrap.large .logo-plate img,
[data-theme="dark"] .logo-plate.large img { height: 64px; }

/* Cards / surfaces */
.card {
  background: var(--surface);
  border-radius: 14px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 16px;
}
.section { padding: 0 20px; margin-bottom: 16px; }
.pad-x { padding-left: 20px; padding-right: 20px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.spacer { flex: 1; }
.center { text-align: center; }

/* Buttons */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  border: none; border-radius: 12px;
  font-size: 16px; font-weight: 650; letter-spacing: -0.2px;
  padding: 15px 18px; cursor: pointer;
  width: 100%; text-decoration: none; color: inherit;
  -webkit-tap-highlight-color: transparent;
  min-height: 48px;
  font-family: inherit;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--blue); color: #fff; box-shadow: var(--shadow-btn); }
.btn-primary:active { background: var(--blue-hover); }
.btn-secondary {
  background: var(--surface); color: var(--blue);
  border: 1.5px solid var(--blue);
}
.btn-ghost {
  background: var(--surface-2); color: var(--text);
  border: 1px solid var(--border);
}
.btn-danger { background: var(--danger); color: #fff; }
.btn-lg { padding: 18px 18px; font-size: 17px; border-radius: 14px; min-height: 54px; }
.btn-sm { padding: 10px 14px; font-size: 14px; width: auto; min-height: 40px; }
.btn-row { display: flex; gap: 10px; }
.btn-row .btn { flex: 1; font-size: 14px; padding: 13px 10px; min-height: 48px; }

/* Inputs */
.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-size: 12px;
  font-weight: 650;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.7px;
  margin-bottom: 7px;
}
.field input, .field textarea, .field select,
.input {
  width: 100%;
  background: var(--input-bg);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 16px;
  color: var(--text);
  outline: none;
  font-family: inherit;
  min-height: 48px;
}
.field input::placeholder, .field textarea::placeholder {
  color: var(--text-muted); opacity: 0.7;
}
.field input:focus, .field textarea:focus, .field select:focus, .input:focus {
  border-color: var(--blue);
  box-shadow: var(--focus-ring);
}
.field textarea { min-height: 100px; resize: vertical; }

/* Chips */
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: 100px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.3px;
  text-transform: uppercase;
  background: var(--chip-bg); color: var(--text-muted);
}
.chip-admin {
  background: linear-gradient(135deg, #2C2C2C, #4A4A4A);
  color: #fff;
}
@media (prefers-color-scheme: dark) {
  .chip-admin { background: linear-gradient(135deg, #4A5560, #6B7280); color: #fff; }
}
[data-theme="dark"] .chip-admin {
  background: linear-gradient(135deg, #4A5560, #6B7280);
  color: #fff;
}
.chip-active { background: var(--blue-soft); color: var(--blue); }

/* Tappable Admin control (mockup 07) */
.admin-btn,
.chip-admin-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.2px;
  background: var(--blue);
  color: #fff;
  box-shadow: var(--shadow-btn);
  border: none;
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  min-height: 36px;
}
.admin-btn .chev { width: 14px; height: 14px; opacity: 0.9; }
.admin-row {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 8px;
  padding: 8px 0 0;
  min-height: 40px;
}
.job-home-body .admin-row { padding: 8px 0 0; }

/* Header / nav */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 16px 12px;
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 20;
}
.app-header .back {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text);
  flex-shrink: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  box-shadow: var(--shadow);
}
.app-header .back:active { background: var(--surface-2); }
.app-header .title {
  flex: 1; text-align: center; font-weight: 650; font-size: 16px; color: var(--text);
}
.app-header .title-block { flex: 1; min-width: 0; text-align: left; }
.app-header .title-block .h2 {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.app-header .title-block .muted { font-size: 12px; }
.app-header .logo-wrap { padding: 0; flex: 1; }
.app-header .logo-wrap.compact img { height: 36px; }

.scroll-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0 32px;
  -webkit-overflow-scrolling: touch;
}

/* Dropdown / job select */
.dropdown, .job-select-btn {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: 12px; padding: 14px 16px; cursor: pointer; width: 100%; text-align: left;
  box-shadow: var(--shadow);
  font-family: inherit; color: inherit;
  min-height: 56px;
  -webkit-tap-highlight-color: transparent;
}
.dd-text { flex: 1; min-width: 0; }
.dd-title {
  font-size: 12px; font-weight: 650; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 3px;
}
.dd-value {
  font-size: 15px; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.chevron { width: 20px; height: 20px; color: var(--text-muted); flex-shrink: 0; }

/* Menu list */
.menu-list {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.menu-item {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  font-weight: 550;
  font-size: 15px;
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
  min-height: 48px;
}
.menu-item:last-child { border-bottom: none; }
.menu-item:active { background: var(--surface-2); }
.menu-item .icon {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: var(--blue-soft);
  color: var(--blue);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  text-align: center;
}
.menu-item .meta {
  margin-left: auto; font-size: 13px; color: var(--text-muted); font-weight: 500;
}

/* Detail rows — horizontal key | value like mockups */
.detail-list { }
.detail-row {
  display: flex;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
  gap: 12px;
  align-items: flex-start;
}
.detail-row:last-child { border-bottom: none; }
.detail-row .k {
  width: 110px; flex-shrink: 0;
  font-size: 13px; font-weight: 600; color: var(--text-muted); padding-top: 1px;
  text-transform: none; letter-spacing: 0;
}
.detail-row .v {
  flex: 1; font-size: 15px; font-weight: 550; color: var(--text); margin-top: 0;
}

/* Login */
.login-screen {
  flex: 1; display: flex; flex-direction: column;
  padding: 12px 24px 8px;
  min-height: 100vh;
  min-height: 100dvh;
}
.login-title {
  text-align: center;
  font-size: 13px;
  font-weight: 650;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin: 18px 0 22px;
}
.login-form { margin-top: 8px; max-width: 360px; width: 100%; margin-left: auto; margin-right: auto; }
.hint {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  padding: 8px 24px;
  line-height: 1.4;
  margin-top: auto;
}

/* Job home */
.job-home-body {
  flex: 1; display: flex; flex-direction: column;
  padding: 8px 20px 16px;
  min-height: calc(100vh - var(--safe-top));
  min-height: calc(100dvh - var(--safe-top));
}

/* Section head + link add */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.link-add {
  font-size: 14px;
  font-weight: 650;
  color: var(--blue);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  padding: 4px 0;
  -webkit-tap-highlight-color: transparent;
}

/* List cards / todos / materials */
.list-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.list-item, .todo-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.list-card .todo-item, .list-card .mat-item, .list-card .list-item {
  margin-bottom: 0;
  border-radius: 0;
  border: none;
  border-bottom: 1px solid var(--border);
  box-shadow: none;
}
.list-card .todo-item:last-child,
.list-card .mat-item:last-child,
.list-card .list-item:last-child { border-bottom: none; }

.todo-item, .mat-item, .checkout-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 10px;
  box-shadow: var(--shadow);
}
.todo-item { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.todo-item input[type=checkbox] {
  width: 22px; height: 22px; margin-top: 1px;
  accent-color: var(--success);
  flex-shrink: 0;
  border-radius: 6px;
}
.todo-item.done .todo-text,
.todo-item .todo-text.done {
  text-decoration: line-through;
  color: var(--text-muted);
}
.todo-text { font-size: 15px; font-weight: 550; color: var(--text); }
.todo-meta {
  margin-top: 4px;
  font-size: 12px;
  color: var(--success);
  font-weight: 550;
}
.todo-meta.open { color: var(--text-muted); }

.mat-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
}
.mat-qty {
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 8px;
  min-width: 36px;
  text-align: center;
  flex-shrink: 0;
}

/* Tool checkout cards */
.tool-card, .checkout-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 10px;
  box-shadow: var(--shadow);
}
.tool-card .tool-name, .checkout-card .tool-name {
  font-size: 16px;
  font-weight: 650;
  color: var(--text);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.tool-card .tool-name .dot, .checkout-card .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #F59E0B;
  flex-shrink: 0;
}
.tool-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
}
.tool-meta-grid .tm label {
  display: block;
  font-size: 11px;
  font-weight: 650;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 2px;
}
.tool-meta-grid .tm span {
  font-size: 13px;
  font-weight: 550;
  color: var(--text);
}
.tool-meta-grid .tm.full { grid-column: 1 / -1; }

/* Admin action tiles */
.admin-action {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow);
  margin-bottom: 12px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  width: 100%;
  text-align: left;
  font-family: inherit;
  color: inherit;
}
.admin-action:active { background: var(--surface-2); }
.admin-action .aa-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: var(--blue-soft);
  color: var(--blue);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.admin-action .aa-body { flex: 1; min-width: 0; }
.admin-action .aa-title {
  font-size: 16px; font-weight: 650; color: var(--text); letter-spacing: -0.2px;
}
.admin-action .aa-sub {
  font-size: 13px; color: var(--text-muted); margin-top: 2px;
}
.admin-action .aa-chev {
  width: 20px; height: 20px; color: var(--text-muted); flex-shrink: 0;
}
.admin-action.disabled { opacity: 0.72; cursor: default; }
.badge-soon {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 100px;
  background: var(--chip-bg);
  color: var(--text-muted);
  margin-left: 6px;
  vertical-align: middle;
}

/* Upload / attach (phone admin) */
.upload-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 10px;
  box-shadow: var(--shadow);
}
.upload-card .uc-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.upload-card .uc-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--blue-soft);
  color: var(--blue);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.upload-card .uc-title { font-size: 15px; font-weight: 650; color: var(--text); }
.upload-card .uc-sub { font-size: 12px; color: var(--text-muted); }
.upload-zone, .attach-zone {
  border: 1.5px dashed var(--hairline);
  border-radius: 10px;
  background: var(--surface-2);
  padding: 14px 12px;
  text-align: center;
  color: var(--blue);
  font-size: 13px;
  font-weight: 650;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  flex-direction: column;
  min-height: 56px;
  -webkit-tap-highlight-color: transparent;
}
.attach-grid { display: flex; flex-direction: column; gap: 0; }
.attach-grid .attach-zone,
.attach-grid .upload-card { width: 100%; }
.attach-zone {
  min-height: 100px;
  border: 2px dashed var(--border);
  border-radius: 14px;
  padding: 20px 12px;
  background: var(--surface);
  margin-bottom: 10px;
  box-shadow: var(--shadow);
}
.attach-zone strong { font-size: 14px; color: var(--text); }
.attach-zone .sub { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.file-chip, .file-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--blue-soft); color: var(--blue); border-radius: 8px;
  padding: 6px 10px; font-size: 12px; font-weight: 600; margin-top: 8px; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.file-pill {
  display: flex; gap: 10px; border-radius: 10px; padding: 10px 12px; width: 100%;
  color: var(--text); margin-top: 0;
}
.file-pill .fp-name {
  font-size: 13px; font-weight: 600; color: var(--text); flex: 1; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.file-pill .fp-meta { font-size: 11px; color: var(--text-muted); }
.cloud-hint {
  font-size: 11px; color: var(--text-muted); text-align: center;
  margin: 4px 0 8px; display: flex; align-items: center; justify-content: center; gap: 4px;
}

/* Manage jobs */
.job-manage-card, .job-list-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 10px;
  box-shadow: var(--shadow);
}
.job-list-item {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.job-list-item .info { flex: 1; min-width: 0; }
.job-list-item .actions { display: flex; gap: 8px; flex-shrink: 0; flex-wrap: wrap; }
.job-manage-card .jm-top {
  display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px;
}
.job-manage-card .jm-info { flex: 1; min-width: 0; }
.job-manage-card .jm-name {
  font-size: 15px; font-weight: 650; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.job-manage-card .jm-addr { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.job-manage-card .jm-actions { display: flex; gap: 8px; }
.jm-btn {
  flex: 1;
  display: flex; align-items: center; justify-content: center; gap: 5px;
  padding: 9px 10px; border-radius: 10px;
  font-size: 13px; font-weight: 650; font-family: inherit;
  border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text);
  cursor: pointer; min-height: 40px;
  -webkit-tap-highlight-color: transparent;
}
.jm-btn.edit {
  background: var(--blue-soft); color: var(--blue); border-color: transparent;
}
.jm-btn.archive { color: var(--text-muted); }

/* Offline / sync / errors */
.offline-banner {
  background: #B45309; color: #fff; text-align: center;
  padding: 8px 12px; font-size: 13px; font-weight: 600;
  display: none;
}
.offline-banner.show { display: block; }
.sync-toast {
  position: fixed; bottom: calc(24px + var(--safe-bottom)); left: 50%; transform: translateX(-50%);
  background: var(--charcoal); color: #fff; padding: 10px 18px; border-radius: 999px;
  font-size: 13px; font-weight: 600; z-index: 100; display: none;
  max-width: 90%;
}
@media (prefers-color-scheme: dark) {
  .sync-toast { background: #E8EAED; color: #0D0F12; }
}
[data-theme="dark"] .sync-toast { background: #E8EAED; color: #0D0F12; }
.sync-toast.show { display: block; }
.error-msg { color: var(--danger); font-size: 14px; margin-top: 8px; text-align: center; }
.empty { text-align: center; padding: 32px 16px; color: var(--text-muted); }

/* Modals */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 50;
  display: flex; align-items: flex-end; justify-content: center;
}
.modal-sheet {
  background: var(--surface); border-radius: 20px 20px 0 0;
  width: 100%; max-width: 520px; max-height: 80vh; overflow-y: auto;
  padding: 20px 20px calc(20px + var(--safe-bottom));
}
.modal-sheet h3 { margin-bottom: 12px; }
.sheet-option {
  padding: 14px; border-bottom: 1px solid var(--border); cursor: pointer; font-weight: 550;
  min-height: 48px;
}
.sheet-option:active { background: var(--surface-2); }

/* Web admin */
.web-nav {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 28px; background: var(--surface); border-bottom: 1px solid var(--border);
}
.web-nav .brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--text); }
.web-nav .brand img {
  height: 40px;
  background: #fff;
  border-radius: 8px;
  padding: 4px 8px;
}
.web-nav .nav-links { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.web-nav .nav-links a, .web-nav .nav-links button {
  padding: 8px 14px; border-radius: 8px; border: none; background: transparent;
  color: var(--text-muted); font-weight: 600; cursor: pointer; text-decoration: none; font-size: 14px;
}
.web-nav .nav-links a.active, .web-nav .nav-links button.active {
  background: var(--blue-soft); color: var(--blue);
}
.web-body { padding: 28px 36px 40px; max-width: 960px; width: 100%; margin: 0 auto; }
.web-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; }
.web-grid-2 .field.full, .web-grid-2 > [style*="grid-column"] { grid-column: 1 / -1; }
.web-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  box-shadow: var(--shadow);
}
.web-page-title {
  font-size: 26px; font-weight: 700; color: var(--text);
  letter-spacing: -0.5px; margin-bottom: 6px;
}
.web-page-sub { font-size: 14px; color: var(--text-muted); margin-bottom: 24px; }
.web-form-actions {
  display: flex; gap: 12px; margin-top: 28px; justify-content: flex-end;
}
.web-form-actions .btn { width: auto; min-width: 140px; padding: 13px 24px; }
.web-job-select {
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 24px; padding: 14px 18px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
}
.web-attach-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
.web-attach-grid .upload-card { margin-bottom: 0; }
.web-attach-grid .upload-zone, .web-attach-grid .attach-zone { min-height: 72px; }

@media (max-width: 720px) {
  .web-grid-2, .web-attach-grid { grid-template-columns: 1fr; }
  .web-body { padding: 20px 16px 32px; }
  .web-nav { padding: 12px 16px; }
  .job-list-item { flex-direction: column; align-items: stretch; }
  .job-list-item .actions { width: 100%; }
  .job-list-item .actions .btn { flex: 1; }
}

.hidden { display: none !important; }
