/* SiteBox · field-friendly iOS theme overrides.
   Keep visual changes here: this file loads after the app styles. */
:root {
  /* iOS system palette */
  --sys-blue: #007aff;
  --sys-blue-press: #0062cc;
  --sys-red: #ff3b30;
  --sys-orange: #ff9500;
  --sys-green: #34c759;
  --label: #1c1c1e;
  --label-2: #5c5c63;
  --label-3: #8e8e93;
  --sep: rgba(60, 60, 67, .18);
  --sep-opaque: #c6c6c8;
  --fill: rgba(120, 120, 128, .1);
  --fill-2: rgba(120, 120, 128, .15);
  --fill-3: rgba(118, 118, 128, .22);
  --grouped: #f2f2f7;
  --grouped-2: #fff;
  --grouped-3: #f7f7fa;
  --bar: rgba(249, 249, 249, .9);
  --tint-50: rgba(0, 122, 255, .1);
  --tint-100: rgba(0, 122, 255, .18);

  /* Existing app tokens mapped to the system palette */
  --bg: var(--grouped);
  --card: var(--grouped-2);
  --ink: #1c1c1e;
  --ink-2: #3a3a3c;
  --muted: #636369;
  --faint: #8e8e93;
  --line: rgba(60, 60, 67, .16);
  --line-2: rgba(60, 60, 67, .1);
  --hover: rgba(120, 120, 128, .08);
  --brand: var(--sys-blue);
  --brand-dark: var(--sys-blue-press);
  --brand-50: var(--tint-50);
  --brand-100: var(--tint-100);
  --accent: var(--sys-blue);
  /* Distinct status colors for plan pins and issue states */
  --open: #d92d20;
  --warn: #b85c00;
  --ok: #16803c;
  --r: 14px;
  --r-sm: 11px;
  --r-lg: 20px;
  --sh-1: 0 1px 3px rgba(28, 28, 30, .06), 0 0 0 .5px rgba(28, 28, 30, .04);
  --sh-2: 0 5px 16px rgba(28, 28, 30, .1), 0 0 0 .5px rgba(28, 28, 30, .04);
  --sh-3: 0 18px 48px rgba(28, 28, 30, .18), 0 3px 10px rgba(28, 28, 30, .06);
  --ring: 0 0 0 4px rgba(0,  122, 255, .24);
  --ease: cubic-bezier(.25, .1, .25, 1);
  --ease-out: cubic-bezier(.32, .72, 0, 1);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", "Segoe UI", Roboto, "Noto Sans", Arial, sans-serif;
}

body { color: var(--ink); background: var(--bg); font-family: var(--font); -webkit-font-smoothing: antialiased; }

/* Comfortable touch targets and readable Greek labels */
button, .btn { border-radius: var(--r-sm); transition: background-color .16s var(--ease), color .16s var(--ease), box-shadow .16s var(--ease), transform .16s var(--ease); white-space: normal; line-height: 1.25; }
input, select, textarea { border-radius: var(--r-sm); max-width: 100%; }
.toolbar button, .toolbar .btn, .toolbar select, .toolbar input { min-height: 44px; }
.side .tab, .chip, .cat { min-height: 44px; }
.seg button { min-height: 44px; }
button:focus-visible, .btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; box-shadow: var(--ring); }

/* Neutral grouped surfaces with quiet depth */
.card, .pcard, .sheet-card, .frows, table, .empty, .modal-card { border-radius: var(--r); box-shadow: var(--sh-1); }
.card.link:hover, .pcard:hover, .sheet-card:hover { box-shadow: var(--sh-2); }
.toolbar { gap: 10px; background: var(--bar); }
.drawer { box-shadow: var(--sh-3); }

/* Preserve clear, text-readable sync state cues */
.net { white-space: nowrap; line-height: 1.35; }
.net.on { background: rgba(22, 128, 60, .12); color: #11632f; }
.net.on::before { background: var(--ok); }
.net.sync { background: rgba(184, 92, 0, .13); color: #874300; }
.net.sync::before { background: var(--warn); }
.net.off { background: rgba(217, 45, 32, .12); color: #ae241a; }
.net.off::before { background: var(--open); }
.badge { white-space: normal; line-height: 1.35; }

/* Keep project titles intact; hyphenate only long descriptive text */
.pcard .pn { white-space: normal; }
.pcard .pa { white-space: normal; hyphens: auto; }
.tcard { gap: 12px; }

/* Make plan actions and drawing tools comfortable on touch screens */
.sheet-card .kebab { width: 44px; height: 44px; }
.drawbar button { min-width: 44px; min-height: 44px; }

/* Reduce the footprint of the two first-run prompts without hiding them */
.pk-inv { padding: 22px; }
.pk-inv .big { width: 60px; height: 60px; margin-bottom: 8px; }
.pk-inv p { line-height: 1.4; }
.pushask { gap: 4px 10px; padding: 12px 14px; border-radius: var(--r); box-shadow: var(--sh-2); }
.pushask b { font-size: 15px; }
.pushask span { font-size: 13px; line-height: 1.3; }
.pushask .pa-b { gap: 6px; margin-top: 4px; }

@media (max-width: 767px) {
  .pk-inv { padding: 20px; }
  .pushask { width: min(480px, calc(100vw - 20px)); }
  form.card.row input.grow { flex-basis: 100%; min-width: 0; }
}

/* Give module headings a clear, calm surface across project pages */
.bm-ph {
  padding: 14px 16px;
  margin: 6px 2px 16px;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--sh-1);
}
.bm-ph h1 { line-height: 1.2; }

/* Keep the global search control comfortable for touch */
#nav .navsearch {
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  justify-content: center;
}

@media (max-width: 767px) {
  .bm-ph { padding: 12px; margin: 0 0 12px; gap: 8px; background: transparent; border: 0; box-shadow: none; }
  .empty { padding: 24px 14px; }
}

/* Make drawer and task modal close controls easy to tap */
.drawer .close, .m-head .close {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
}
