/* ProjectOS Stage 1 UI mockups — shared design system */
:root {
  --navy: #0B2545;
  --navy-2: #14365E;
  --navy-3: #1C4A75;
  --teal: #0E7C7B;
  --teal-2: #10908E;
  --teal-dark: #0A5E5D;
  --teal-soft: #E6F4F4;
  --teal-mid: #B7E0DF;
  --ink: #152033;
  --muted: #5C6B7C;
  --muted-2: #8A96A3;
  --line: #E3E9EF;
  --line-2: #D3DBE4;
  --bg: #F3F6F9;
  --card: #FFFFFF;
  --green: #0F8A5A;
  --green-soft: #E6F7EF;
  --red: #C0392B;
  --red-soft: #FDECEC;
  --amber: #B57908;
  --amber-soft: #FFF6E5;
  --blue-soft: #E8F0FA;
  --shadow: 0 8px 24px rgba(11, 37, 69, 0.08);
  --shadow-sm: 0 1px 2px rgba(11, 37, 69, 0.06), 0 1px 3px rgba(11, 37, 69, 0.04);
  --radius: 16px;
  --font: Inter, "Inter Tight", "Noto Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: #d9e0e8; font-family: var(--font); color: var(--ink); -webkit-font-smoothing: antialiased; }
img, svg { display: block; }

/* ===== Artboards ===== */
.artboard-phone {
  width: 780px;
  height: 1180px;
  background: #d9e0e8;
  position: relative;
  overflow: hidden;
}
.artboard-desktop {
  width: 1400px;
  height: 960px;
  background: #d9e0e8;
  position: relative;
  overflow: hidden;
}
.caption {
  position: absolute;
  top: 28px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 17px;
  font-weight: 650;
  letter-spacing: 0.01em;
  color: var(--navy);
  z-index: 2;
}
.caption span { color: var(--teal); font-weight: 750; }

.phone-wrap {
  position: absolute;
  top: 72px;
  left: 183px; /* centered in 780: (780-414)/2 */
}
.artboard-phone.with-inset .phone-wrap { left: 36px; }

.phone {
  width: 414px;
  height: 864px;
  background: #0E1218;
  border-radius: 52px;
  padding: 12px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.14),
    0 0 0 2px #1a222d,
    0 28px 60px rgba(11, 37, 69, 0.25);
  position: relative;
}
.phone::before {
  /* silent switch */
  content: "";
  position: absolute;
  top: 98px;
  left: -2px;
  width: 3px;
  height: 28px;
  background: #2a3340;
  border-radius: 2px 0 0 2px;
}
.phone::after {
  content: "";
  position: absolute;
  top: 140px;
  left: -2px;
  width: 3px;
  height: 52px;
  background: #2a3340;
  border-radius: 2px 0 0 2px;
}
.screen {
  width: 390px;
  height: 840px;
  border-radius: 40px;
  overflow: hidden;
  background: var(--bg);
  position: relative;
}
.island {
  position: absolute;
  z-index: 40;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 116px;
  height: 31px;
  background: #000;
  border-radius: 18px;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.4);
}

/* Status bar */
.status-bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 50px;
  z-index: 30;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0 26px 8px 28px;
  font-size: 14px;
  font-weight: 650;
  color: var(--ink);
  pointer-events: none;
}
.status-bar.light { color: #fff; }
.status-bar .sb-icons { display: flex; align-items: center; gap: 6px; }
.status-bar svg { display: block; }

.app {
  height: 840px;
  display: flex;
  flex-direction: column;
  padding-top: 50px;
  position: relative;
}

/* Header */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 20px 10px;
  min-height: 52px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
}
.brand .logo-mark {
  width: 24px;
  height: 27px;
  flex-shrink: 0;
  color: #3B4046;
}
.brand .logo-mark .logo-tick { stroke: var(--teal); }
.brand.worker-brand .logo-mark { color: var(--navy); }
.brand.worker-brand .logo-mark .logo-tick { stroke: var(--teal); }
.brand.worker-brand .logo .os { color: #E01E26; }
.brand .logo {
  font-size: 20px;
  font-weight: 750;
  letter-spacing: -0.03em;
  color: #3B4046;
}
.brand.worker-brand .logo { color: var(--navy); }
.brand .logo .os,
.sb-brand .logo .os { color: #E01E26; }
.brand .tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--teal);
  background: var(--teal-soft);
  border: 1px solid var(--teal-mid);
  padding: 2px 6px 1px;
  border-radius: 6px;
  position: relative;
  top: -1px;
}
.header-right { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
}

/* Content */
.content {
  flex: 1;
  overflow: hidden;
  padding: 0 20px 12px;
  display: flex;
  flex-direction: column;
}
.content.scroll { overflow: hidden; }

/* Bottom tabs */
.tabbar {
  height: 78px;
  background: #fff;
  border-top: 1px solid var(--line);
  display: flex;
  padding: 6px 8px 18px;
  position: relative;
  z-index: 10;
}
.tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--muted-2);
  font-size: 11px;
  font-weight: 600;
  min-width: 0;
}
.tab span { white-space: nowrap; }
.tab.active { color: var(--teal-dark); }
.tab svg { width: 22px; height: 22px; }

/* 5-tab bar with a raised centre Photo button (worker and supervisor) */
.tabbar-worker,
.tabbar-sup {
  padding: 6px 2px 18px;
  overflow: visible;
}
.app:has(.tabbar-worker) .content,
.app:has(.tabbar-sup) .content {
  padding-bottom: 20px;
}
.tabbar-worker .tab,
.tabbar-sup .tab {
  font-size: 10.5px;
  letter-spacing: -0.02em;
}
.tab-photo {
  position: relative;
  overflow: visible;
}
.photo-fab-slot {
  width: 22px;
  height: 22px;
  position: relative;
  display: block;
}
.photo-fab {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, calc(-50% - 20px));
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid #fff;
  box-shadow: 0 6px 16px rgba(14, 124, 123, 0.38);
  z-index: 12;
}
.photo-fab svg {
  width: 24px;
  height: 24px;
  stroke: #fff;
}
.tab-photo.active { color: var(--teal-dark); }
.tab-photo.active .photo-fab {
  background: var(--teal-dark);
  box-shadow: 0 0 0 5px rgba(14, 124, 123, 0.22), 0 6px 16px rgba(14, 124, 123, 0.45);
}
.home-ind {
  position: absolute;
  bottom: 7px;
  left: 50%;
  transform: translateX(-50%);
  width: 128px;
  height: 5px;
  background: #1a1a1a;
  border-radius: 4px;
  z-index: 50;
  pointer-events: none;
}

/* Buttons */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 56px;
  border-radius: 14px;
  font-size: 17px;
  font-weight: 650;
  border: none;
  font-family: inherit;
  width: 100%;
  letter-spacing: -0.01em;
}
.btn-primary { background: var(--teal); color: #fff; box-shadow: 0 4px 12px rgba(14,124,123,0.28); }
.btn-navy { background: var(--navy); color: #fff; }
.btn-danger { background: var(--red); color: #fff; box-shadow: 0 4px 12px rgba(192,57,43,0.22); }
.btn-outline {
  background: #fff;
  color: var(--navy);
  border: 1.5px solid var(--line-2);
}
.btn-ghost { background: transparent; color: var(--muted); height: 44px; font-size: 14px; font-weight: 600; }
.btn-sm {
  height: 36px;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 650;
  width: auto;
  border: none;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.btn-approve { background: var(--green); color: #fff; }
.btn-reject { background: var(--red-soft); color: var(--red); }
.btn:disabled, .btn.disabled { opacity: 0.45; box-shadow: none; }

/* Cards */
.card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(227,233,239,0.9);
}
.page-title {
  font-size: 22px;
  font-weight: 750;
  letter-spacing: -0.03em;
  color: var(--navy);
  line-height: 1.2;
}
.page-sub {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.45;
  margin-top: 6px;
}

/* Avatars */
.avatar {
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  letter-spacing: -0.02em;
  overflow: hidden;
}
.avatar img, .avatar svg { width: 100%; height: 100%; }
.av-32 { width: 32px; height: 32px; font-size: 12px; }
.av-40 { width: 40px; height: 40px; font-size: 14px; }
.av-48 { width: 48px; height: 48px; font-size: 16px; }
.av-56 { width: 56px; height: 56px; font-size: 18px; }
.av-64 { width: 64px; height: 64px; font-size: 22px; }

/* Pills / badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  letter-spacing: 0.01em;
}
.badge-green { background: var(--green-soft); color: var(--green); }
.badge-red { background: var(--red-soft); color: var(--red); }
.badge-amber { background: var(--amber-soft); color: var(--amber); }
.badge-teal { background: var(--teal-soft); color: var(--teal-dark); }
.badge-grey { background: #EEF1F4; color: var(--muted); }
.badge-navy { background: var(--navy); color: #fff; }

/* Forms */
.field { margin-bottom: 12px; }
.field label {
  display: block;
  font-size: 12px;
  font-weight: 650;
  color: var(--muted);
  margin-bottom: 6px;
}
.field input, .field select, .input {
  width: 100%;
  height: 48px;
  border: 1.5px solid var(--line-2);
  border-radius: 12px;
  padding: 0 14px;
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
  background: #fff;
  appearance: none;
}
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* Material-order item photos */
.photo-row { display: flex; align-items: stretch; gap: 8px; }
.photo-tile {
  width: 64px; height: 64px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  background: #C8CDD3;
  border: 1px solid rgba(11,37,69,0.06);
  position: relative;
}
.photo-tile svg, .photo-tile img { width: 100%; height: 100%; display: block; }
.photo-add {
  width: 64px; height: 64px;
  border-radius: 12px;
  border: 1.5px dashed var(--line-2);
  background: #F7FAFC;
  color: var(--teal-dark);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 9px;
  font-weight: 650;
  letter-spacing: -0.01em;
  line-height: 1.15;
  text-align: center;
  padding: 4px;
}
.photo-add svg { width: 18px; height: 18px; flex-shrink: 0; }
.req-thumb {
  width: 32px; height: 32px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: #C8CDD3;
  border: 1px solid rgba(11,37,69,0.06);
  position: relative;
}
.req-thumb svg, .req-thumb img { width: 100%; height: 100%; display: block; }
.req-cam {
  width: 22px; height: 22px;
  border-radius: 7px;
  background: var(--teal-soft);
  color: var(--teal-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.req-cam svg { width: 13px; height: 13px; }

/* ===== Inset (screen 3) ===== */
.inset {
  position: absolute;
  top: 430px;
  left: 470px;
  width: 270px;
}
.inset-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 8px;
  text-align: center;
}
.inset-phone {
  width: 270px;
  transform-origin: top left;
  /* visual scale of a mini device */
  background: #0E1218;
  border-radius: 34px;
  padding: 8px;
  box-shadow: 0 16px 36px rgba(11,37,69,0.28), 0 0 0 1px #1a222d;
}
.inset-screen {
  width: 254px;
  height: 400px;
  border-radius: 26px;
  overflow: hidden;
  background: var(--bg);
  position: relative;
}

/* ===== Desktop window ===== */
.desktop-wrap {
  position: absolute;
  top: 72px;
  left: 60px;
}
.window {
  width: 1280px;
  height: 836px;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(11,37,69,0.18), 0 0 0 1px rgba(11,37,69,0.08);
  display: flex;
  flex-direction: column;
}
.titlebar {
  height: 36px;
  background: #E9EEF3;
  display: flex;
  align-items: center;
  padding: 0 14px;
  gap: 8px;
  border-bottom: 1px solid #d8dee6;
  flex-shrink: 0;
}
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot-r { background: #FF5F57; }
.dot-y { background: #FEBC2E; }
.dot-g { background: #28C840; }
.urlbar {
  flex: 1;
  margin-left: 12px;
  height: 22px;
  background: #fff;
  border: 1px solid #d4dbe3;
  border-radius: 6px;
  font-size: 11px;
  color: var(--muted);
  display: flex;
  align-items: center;
  padding: 0 10px;
  gap: 6px;
  max-width: 520px;
}
.urlbar b { color: var(--ink); font-weight: 600; }

.desk {
  height: 800px;
  display: flex;
  background: var(--bg);
}

/* Sidebar */
.sidebar {
  width: 220px;
  background: var(--navy);
  color: #fff;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  padding: 18px 12px 14px;
}
.sb-brand { display: flex; align-items: center; gap: 7px; padding: 4px 8px 20px; }
.sb-brand .logo-mark { width: 24px; height: 27px; flex-shrink: 0; color: #fff; }
.sb-brand .logo-mark .logo-tick { stroke: var(--teal); }
.sb-brand .logo { font-size: 20px; font-weight: 750; letter-spacing: -0.03em; color: #fff; }
/* Rounded staff phone icon next to the ProjectOS wordmark */
.brand .staff-app-icon,
.sb-brand .staff-app-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  display: block;
  object-fit: contain;
}
.sb-brand .staff-app-icon {
  width: 36px;
  height: 36px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.28);
}
.sb-brand .tag {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #8FE0DE;
  background: rgba(15,144,142,0.25);
  border: 1px solid rgba(143,224,222,0.3);
  padding: 2px 5px 1px;
  border-radius: 5px;
}
.sb-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.sb-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 550;
  color: rgba(255,255,255,0.72);
}
.sb-item svg { width: 18px; height: 18px; flex-shrink: 0; opacity: 0.9; }
.sb-item.active { background: rgba(14,124,123,0.55); color: #fff; font-weight: 650; }
.sb-item.section {
  margin-top: 16px;
  margin-bottom: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.38);
  padding: 0 10px;
}
.sb-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 8px 4px;
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: 8px;
}
.sb-user .meta { line-height: 1.25; }
.sb-user .name { font-size: 13px; font-weight: 650; }
.sb-user .role { font-size: 11px; color: rgba(255,255,255,0.55); }

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--bg);
}
.main-bar {
  height: 64px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  flex-shrink: 0;
}
.main-bar h1 { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; color: var(--navy); }
.main-tools { display: flex; align-items: center; gap: 10px; }
.search {
  height: 36px;
  width: 240px;
  border: 1.5px solid var(--line-2);
  border-radius: 9px;
  padding: 0 12px 0 34px;
  font-family: inherit;
  font-size: 13px;
  background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%238A96A3' stroke-width='2' viewBox='0 0 24 24'><circle cx='11' cy='11' r='7'/><path d='M20 20l-3-3'/></svg>") 10px 50% no-repeat;
  color: var(--ink);
}
.main-body { flex: 1; padding: 18px 24px 20px; overflow: hidden; min-height: 0; }

/* Tables */
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: #fff;
}
table.data th {
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: #F8FAFC;
  white-space: nowrap;
}
table.data td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  vertical-align: middle;
}
table.data tr:last-child td { border-bottom: none; }
.table-wrap {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.toggle {
  width: 36px; height: 20px;
  background: var(--teal);
  border-radius: 10px;
  position: relative;
}
.toggle::after {
  content: "";
  position: absolute;
  top: 2px; left: 18px;
  width: 16px; height: 16px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.toggle.off { background: #C5CDD6; }
.toggle.off::after { left: 2px; }

.link { color: var(--teal-dark); font-weight: 650; font-size: 13px; }
.muted { color: var(--muted); }
.mono { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

/* misc helpers */
.flex { display: flex; }
.flex-c { display: flex; align-items: center; }
.gap-8 { gap: 8px; }
.gap-10 { gap: 10px; }
.gap-12 { gap: 12px; }
.mt-8 { margin-top: 8px; }
.mt-10 { margin-top: 10px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.just-between { justify-content: space-between; }
.grow { flex: 1; }
.fw7 { font-weight: 700; }
.t-13 { font-size: 13px; }
.t-12 { font-size: 12px; }
.t-14 { font-size: 14px; }
.t-15 { font-size: 15px; }

/* Address lookup (New / Amend project) */
.addr-find { display: flex; align-items: stretch; gap: 8px; }
.addr-find .input { flex: 1; min-width: 0; }
.addr-hits { margin-top: 6px; border: 1.5px solid var(--line-2); border-radius: 12px; overflow: hidden; background: #fff; }
.addr-hits button {
  display: block; width: 100%; text-align: left; padding: 10px 12px;
  background: #fff; border: 0; border-bottom: 1px solid var(--line);
  cursor: pointer; font: inherit; color: inherit;
}
.addr-hits button:last-child { border-bottom: 0; }
.addr-hits button:hover { background: var(--teal-soft, #e8f6f5); }

