/* ==========================================================================
   Clarity Crew — shared design language
   Ported from the Claude-artifact prototypes (cream page, near-black ink,
   muted blue-grey accent, 12px radii, soft borders, mono section labels).
   ========================================================================== */
:root {
  --ink: #15171C;
  --ink-70: rgba(21, 23, 28, .70);
  --ink-55: rgba(21, 23, 28, .55);
  --ink-40: rgba(21, 23, 28, .40);
  --accent: #4A6A86;
  --accent-dark: #3B5670;
  --accent-soft: #E4EBF1;
  --bg: #F7F4EE;
  --bg-2: #EFEAE1;
  --card: #FFFFFF;
  --line: rgba(21, 23, 28, .10);
  --line-2: rgba(21, 23, 28, .16);
  --radius: 12px;
  --radius-sm: 9px;
  --green: #3F6E50;
  --green-soft: #E3EEE6;
  --amber: #8A4A0E;
  --amber-soft: #FBE9DA;
  --red: #8C3A2E;
  --red-soft: #F7E4DF;
  --violet: #5B4A86;
  --violet-soft: #ECE7F6;
  --shadow: 0 1px 2px rgba(21, 23, 28, .04), 0 8px 24px rgba(21, 23, 28, .05);
  --sans: "DM Sans", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "SF Mono", ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4, p { margin: 0; }
::selection { background: #D8E4EE; }

.mono {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .085em;
  text-transform: uppercase;
  color: var(--ink-55);
  font-weight: 500;
}
.muted { color: var(--ink-55); }
.small { font-size: 12.5px; }
.tiny { font-size: 11.5px; }
.strong { font-weight: 600; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
.spacer { flex: 1; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 10px; }
.right { text-align: right; }
.center { text-align: center; }

/* ---------- primitives ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-pad { padding: 18px 20px; }
.card-head {
  display: flex; align-items: center; gap: 12px;
  padding: 15px 20px;
  border-bottom: 1px solid var(--line);
}
.card-head h2 { font-size: 14.5px; font-weight: 600; letter-spacing: -.01em; }
.card-head .mono { margin-left: 2px; }
.card-body { padding: 18px 20px; }
.card-body.tight { padding: 12px 20px; }
.divider { height: 1px; background: var(--line); margin: 14px 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border: 1px solid var(--line-2);
  background: var(--card);
  color: var(--ink);
  border-radius: 9px;
  padding: 8px 13px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -.005em;
  transition: background .12s ease, border-color .12s ease, transform .06s ease;
  white-space: nowrap;
}
.btn:hover { background: #FBFAF7; border-color: rgba(21, 23, 28, .24); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-primary:hover { background: #24272E; border-color: #24272E; }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-70); }
.btn-ghost:hover { background: rgba(21, 23, 28, .045); border-color: transparent; }
.btn-danger { color: var(--red); border-color: rgba(140, 58, 46, .28); background: #fff; }
.btn-danger:hover { background: var(--red-soft); }
.btn-sm { padding: 5px 10px; font-size: 12px; border-radius: 8px; }
.btn-lg { padding: 11px 18px; font-size: 14px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-disabled {
  opacity: .45; cursor: not-allowed; pointer-events: none;
}
.btn-link {
  background: none; border: 0; padding: 0; color: var(--accent);
  font-size: 12.5px; font-weight: 500;
}
.btn-link:hover { text-decoration: underline; }

.pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 8px;
  border-radius: 99px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .02em;
  background: rgba(21, 23, 28, .06);
  color: var(--ink-70);
  white-space: nowrap;
}
.pill.green { background: var(--green-soft); color: var(--green); }
.pill.amber { background: var(--amber-soft); color: var(--amber); }
.pill.blue { background: var(--accent-soft); color: var(--accent); }
.pill.red { background: var(--red-soft); color: var(--red); }
.pill.violet { background: var(--violet-soft); color: var(--violet); }
.pill.live::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%;
  background: currentColor; animation: pulse 1.8s infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }

.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); flex: none; }

.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11.5px; font-weight: 600; letter-spacing: .02em; flex: none;
}
.avatar.lg { width: 44px; height: 44px; font-size: 14px; }
.avatar.xl { width: 58px; height: 58px; font-size: 17px; }
.avatar.sm { width: 26px; height: 26px; font-size: 9.5px; }
.avatar.ink { background: var(--ink); color: #fff; }

.field { display: flex; flex-direction: column; gap: 5px; }
.field > label, .field-label {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink-55); font-weight: 500;
}
.input, select.input, textarea.input {
  width: 100%;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  padding: 9px 11px;
  background: #fff;
  font-size: 13px;
  outline: none;
  transition: border-color .12s, box-shadow .12s;
}
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(74, 106, 134, .12); }
textarea.input { resize: vertical; min-height: 62px; line-height: 1.5; }
select.input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2315171C' stroke-opacity='.45' stroke-width='1.4' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  padding-right: 28px;
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }

.seg {
  display: inline-flex; padding: 3px; gap: 2px;
  background: rgba(21, 23, 28, .05); border-radius: 9px;
}
.seg button {
  border: 0; background: transparent; padding: 5px 12px; border-radius: 7px;
  font-size: 12.5px; font-weight: 500; color: var(--ink-55);
}
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(21, 23, 28, .10); }

.chipline { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  border: 1px solid var(--line-2); background: #fff; border-radius: 99px;
  padding: 5px 11px; font-size: 12.5px; color: var(--ink-70);
}
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }

.empty {
  padding: 34px 20px; text-align: center; color: var(--ink-55); font-size: 13px;
}
.empty .big { font-size: 15px; color: var(--ink); font-weight: 600; margin-bottom: 4px; }

/* toast */
#toasts {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  display: flex; flex-direction: column; gap: 8px; z-index: 400; align-items: center;
}
.toast {
  background: var(--ink); color: #fff; padding: 9px 16px; border-radius: 99px;
  font-size: 12.5px; font-weight: 500; box-shadow: 0 10px 30px rgba(21, 23, 28, .25);
  animation: toastIn .18s ease;
}
.toast.err { background: #7C3327; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }

/* modal */
.modal-back {
  position: fixed; inset: 0; background: rgba(21, 23, 28, .32);
  display: flex; align-items: center; justify-content: center; z-index: 300;
  padding: 24px; backdrop-filter: blur(1.5px);
}
.modal {
  background: var(--card); border-radius: 16px; width: 100%; max-width: 520px;
  max-height: 88vh; overflow: auto; box-shadow: 0 24px 70px rgba(21, 23, 28, .28);
}
.modal.wide { max-width: 720px; }
.modal-head { padding: 18px 22px 12px; display: flex; align-items: flex-start; gap: 12px; }
.modal-head h3 { font-size: 16px; font-weight: 600; letter-spacing: -.015em; }
.modal-body { padding: 0 22px 18px; }
.modal-foot {
  padding: 13px 22px; border-top: 1px solid var(--line);
  display: flex; justify-content: flex-end; gap: 8px; background: #FCFBF8;
  border-radius: 0 0 16px 16px; position: sticky; bottom: 0;
}
.icon-x {
  border: 0; background: transparent; font-size: 18px; line-height: 1;
  color: var(--ink-40); padding: 2px 4px; border-radius: 6px;
}
.icon-x:hover { background: rgba(21, 23, 28, .06); color: var(--ink); }

/* tables */
table.tbl { width: 100%; border-collapse: collapse; }
table.tbl th {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-40); font-weight: 500; text-align: left;
  padding: 9px 14px; border-bottom: 1px solid var(--line); background: #FCFBF8;
  white-space: nowrap;
}
table.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.tbl tr:last-child td { border-bottom: 0; }
table.tbl tbody tr:hover { background: #FCFBF8; }
table.tbl td.actions { text-align: right; white-space: nowrap; }

.notice {
  border: 1px solid var(--line); background: #FCFBF8; border-radius: var(--radius-sm);
  padding: 11px 13px; font-size: 12.5px; color: var(--ink-70);
}
.notice.warn { background: var(--amber-soft); border-color: rgba(138, 74, 14, .18); color: var(--amber); }
.notice.err { background: var(--red-soft); border-color: rgba(140, 58, 46, .22); color: var(--red); }
.notice.info { background: var(--accent-soft); border-color: rgba(74, 106, 134, .2); color: var(--accent-dark); }
.notice b { font-weight: 600; }

.badge-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px;
  background: rgba(21, 23, 28, .08); font-size: 10px; font-weight: 600;
  font-family: var(--mono); color: var(--ink-70);
}
.badge-count.hot { background: var(--red-soft); color: var(--red); }

/* ==========================================================================
   Office admin
   ========================================================================== */
body.admin { background: var(--bg); }

.shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }

.side {
  border-right: 1px solid var(--line);
  background: #FBF9F5;
  display: flex; flex-direction: column;
  padding: 20px 14px 18px;
  position: sticky; top: 0; height: 100vh;
}
.side .brand { padding: 2px 8px 18px; }
.side .brand .wordmark { font-size: 14.5px; font-weight: 600; letter-spacing: -.02em; }
.side .brand .mono { margin-top: 2px; display: block; }
.side nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 10px; border-radius: 8px;
  color: var(--ink-70); font-size: 13px; font-weight: 500;
  border: 0; background: transparent; text-align: left; width: 100%;
}
.nav-item:hover { background: rgba(21, 23, 28, .045); color: var(--ink); }
.nav-item.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(21, 23, 28, .07); }
.nav-item .badge-count { margin-left: auto; }
.nav-item .ico { width: 15px; text-align: center; opacity: .62; font-size: 13px; }
.nav-item.on .ico { opacity: .9; }
.side .postjob { margin-top: 14px; }

.side-foot { margin-top: auto; padding: 14px 8px 0; border-top: 1px solid var(--line); }

.main { padding: 26px 32px 60px; max-width: 1180px; width: 100%; }
.topbar { display: flex; align-items: baseline; gap: 12px; margin-bottom: 20px; }
.topbar .date { font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-55); }
.topbar h1 { font-size: 22px; font-weight: 600; letter-spacing: -.03em; margin-top: 3px; }
.topbar .right { margin-left: auto; }

.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 18px; }
.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 15px 17px; box-shadow: var(--shadow);
}
button.stat { text-align: left; font: inherit; color: inherit; cursor: pointer; width: 100%; transition: border-color .12s ease, box-shadow .12s ease; }
button.stat:hover { box-shadow: 0 2px 10px rgba(21,23,28,.08); }
.stat .k { display: flex; align-items: center; gap: 7px; }
.stat .v { font-size: 25px; font-weight: 600; letter-spacing: -.03em; margin-top: 6px; }
.stat .s { font-size: 12px; color: var(--ink-55); margin-top: 1px; }

.two-col { display: grid; grid-template-columns: 1.15fr .85fr; gap: 16px; align-items: start; }

.clock-row { display: flex; align-items: center; gap: 12px; padding: 13px 20px; border-bottom: 1px solid var(--line); }
.clock-row:last-child { border-bottom: 0; }
.clock-row .timer {
  font-family: var(--mono); font-size: 15px; font-weight: 500; letter-spacing: .02em;
  margin-left: auto; font-variant-numeric: tabular-nums;
}

.feed-row { display: flex; gap: 10px; padding: 11px 20px; border-bottom: 1px solid var(--line); }
.feed-row:last-child { border-bottom: 0; }
.feed-row .time { font-family: var(--mono); font-size: 10px; color: var(--ink-40); width: 52px; flex: none; padding-top: 3px; }
.feed-row .what { font-size: 12.5px; }
.feed-row .where { font-size: 11.5px; color: var(--ink-55); }

.sum-card { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.sum-card:last-child { border-bottom: 0; }
.sum-card .h { font-size: 13px; font-weight: 500; }
.sum-card .sub { font-size: 11.5px; color: var(--ink-55); }

.roster-row {
  display: flex; align-items: center; gap: 11px; padding: 11px 14px;
  border-radius: 9px; border: 1px solid transparent; text-align: left; background: none; width: 100%;
}
.roster-row:hover { background: #FBFAF7; }
.roster-row.on { background: #fff; border-color: var(--line-2); box-shadow: 0 1px 2px rgba(21, 23, 28, .05); }

.doc-row { display: flex; align-items: center; gap: 11px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.doc-row:last-child { border-bottom: 0; }
.pdf-tile {
  width: 30px; height: 36px; border-radius: 4px; background: var(--red-soft);
  color: var(--red); font-family: var(--mono); font-size: 8px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  border: 1px solid rgba(140, 58, 46, .18);
}

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); padding: 0 20px; }
.tabs button {
  border: 0; background: none; padding: 10px 4px; margin-right: 14px;
  font-size: 12.5px; font-weight: 500; color: var(--ink-55);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  display: inline-flex; align-items: center; gap: 6px;
}
.tabs button.on { color: var(--ink); border-bottom-color: var(--ink); }

.thread-row {
  display: flex; gap: 10px; padding: 12px 16px; width: 100%; text-align: left;
  border: 0; background: none; border-bottom: 1px solid var(--line); align-items: flex-start;
}
.thread-row:hover { background: #FBFAF7; }
.thread-row.on { background: #F4F7FA; }
.thread-row .last { font-size: 12px; color: var(--ink-55); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }

.bubble-row { display: flex; margin-bottom: 8px; }
.bubble-row.me { justify-content: flex-end; }
.bubble {
  max-width: 74%; padding: 8px 12px; border-radius: 13px;
  font-size: 12.5px; line-height: 1.45;
  background: #F1EFEA; color: var(--ink);
  border-bottom-left-radius: 4px;
}
.bubble-row.me .bubble { background: var(--ink); color: #fff; border-bottom-left-radius: 13px; border-bottom-right-radius: 4px; }

.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 8px; }
.photo-tile {
  aspect-ratio: 4 / 3; border-radius: 8px; border: 1px solid var(--line);
  background: linear-gradient(135deg, #F1EEE8, #E6E1D7);
  display: flex; align-items: flex-end; padding: 6px 7px;
  font-family: var(--mono); font-size: 8.5px; letter-spacing: .06em;
  color: var(--ink-55); text-transform: uppercase; position: relative; overflow: hidden;
}
.photo-tile.after { background: linear-gradient(135deg, #E6EDE9, #D6E4DB); color: var(--green); }
.photo-tile.pick { outline: 2px solid var(--accent); outline-offset: 1px; }
.photo-tile .tick {
  position: absolute; top: 5px; right: 5px; width: 15px; height: 15px; border-radius: 50%;
  background: var(--accent); color: #fff; font-size: 9px; display: flex; align-items: center; justify-content: center;
}

.avail-grid { display: grid; grid-template-columns: 150px repeat(7, 1fr); gap: 1px; background: var(--line); border-radius: 10px; overflow: hidden; }
.avail-grid > div { background: #fff; padding: 8px 9px; font-size: 11.5px; min-height: 54px; }
.avail-grid .hcell { background: #FCFBF8; font-family: var(--mono); font-size: 9px; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-55); min-height: 0; padding: 7px 9px; }
.avail-grid .namecell { font-size: 12px; font-weight: 500; display: flex; align-items: center; }
.avail-cell { cursor: pointer; }
.avail-cell:hover { background: #F4F7FA; }
.avail-cell .hrs { font-weight: 500; }
.avail-cell .note { color: var(--ink-55); font-size: 10.5px; }
.avail-cell.s-off { background: #F7F5F1; color: var(--ink-40); }
.avail-cell.s-away { background: var(--violet-soft); color: var(--violet); }
.avail-cell.s-asked { background: var(--amber-soft); color: var(--amber); }

/* post-a-job form */
.form-section { padding: 18px 20px; border-bottom: 1px solid var(--line); }
.form-section:last-of-type { border-bottom: 0; }
.form-section h3 { font-size: 13.5px; font-weight: 600; margin-bottom: 12px; letter-spacing: -.01em; }
.type-row { display: flex; gap: 7px; flex-wrap: wrap; }
.type-btn { border: 1px solid var(--line-2); background: #fff; border-radius: 9px; padding: 7px 12px; font-size: 12.5px; font-weight: 500; }
.type-btn.on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.mat-row { display: grid; grid-template-columns: 1fr 110px 30px; gap: 8px; margin-bottom: 7px; }
.send-opt {
  border: 1px solid var(--line-2); border-radius: 10px; padding: 12px 14px; text-align: left;
  background: #fff; width: 100%; display: block;
}
.send-opt.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: #FBFCFD; }
.send-opt .t { font-size: 13px; font-weight: 600; }
.send-opt .d { font-size: 11.5px; color: var(--ink-55); margin-top: 1px; }
.assignee-row {
  display: flex; align-items: center; gap: 9px; width: 100%; text-align: left;
  border: 1px solid var(--line); background: #fff; border-radius: 9px; padding: 8px 10px;
}
.assignee-row.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }

/* ==========================================================================
   Contractor phone app
   ========================================================================== */
body.phone-body {
  background: var(--bg-2);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 26px 16px 40px;
  min-height: 100vh;
}
.phone-wrap { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.phone-switch {
  display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--ink-55);
}
.phone {
  width: 390px; height: 844px; background: var(--bg);
  border-radius: 36px; border: 8px solid #1B1D22;
  box-shadow: 0 30px 70px rgba(21, 23, 28, .28);
  display: flex; flex-direction: column; overflow: hidden; position: relative;
}
.phone .status-bar {
  height: 34px; flex: none; display: flex; align-items: center; justify-content: space-between;
  padding: 0 22px; font-size: 11px; font-weight: 600; color: var(--ink);
}
.phone .screen { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 0 18px 16px; scrollbar-width: thin; }
.phone .screen::-webkit-scrollbar { width: 5px; }
.phone .screen::-webkit-scrollbar-thumb { background: rgba(21, 23, 28, .16); border-radius: 4px; }
.phone .tabbar {
  flex: none; display: grid; grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid var(--line); background: rgba(255, 255, 255, .92);
  padding: 7px 4px 10px; backdrop-filter: blur(8px);
}
.phone .tabbar button {
  border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 3px;
  font-size: 9.5px; color: var(--ink-40); font-weight: 500; padding: 2px 0; position: relative;
}
.phone .tabbar button .ic { font-size: 15px; line-height: 1; opacity: .75; }
.phone .tabbar button.on { color: var(--ink); }
.phone .tabbar button.on .ic { opacity: 1; }
.phone .tabbar .tabbadge {
  position: absolute; top: -2px; right: 50%; transform: translateX(14px);
  min-width: 15px; height: 15px; border-radius: 99px; background: var(--ink); color: #fff;
  font-size: 8.5px; display: flex; align-items: center; justify-content: center; padding: 0 4px;
}
.phead { padding: 6px 0 12px; }
.phead .day { font-family: var(--mono); font-size: 9.5px; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-55); }
.phead h1 { font-size: 21px; font-weight: 600; letter-spacing: -.03em; margin-top: 2px; }
.phead h2 { font-size: 19px; font-weight: 600; letter-spacing: -.025em; }
.pcard {
  background: #fff; border: 1px solid var(--line); border-radius: 13px;
  padding: 13px 14px; box-shadow: 0 1px 2px rgba(21, 23, 28, .04);
}
.pcard + .pcard { margin-top: 9px; }
.plabel { font-family: var(--mono); font-size: 9px; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-55); }
.ptitle { font-size: 14.5px; font-weight: 600; letter-spacing: -.015em; }
.jobrow {
  display: flex; align-items: stretch; gap: 11px; width: 100%; text-align: left;
  background: #fff; border: 1px solid var(--line); border-radius: 13px; padding: 12px 13px;
  box-shadow: 0 1px 2px rgba(21, 23, 28, .04);
}
.jobrow + .jobrow { margin-top: 8px; }
.jobrow .when { width: 54px; flex: none; }
.jobrow .when .t { font-size: 12.5px; font-weight: 600; }
.jobrow .when .d { font-size: 10px; color: var(--ink-55); }
.jobrow .bar { width: 3px; border-radius: 2px; background: var(--accent); flex: none; }
.jobrow .body { flex: 1; min-width: 0; }
.jobrow .meta { font-size: 11.5px; color: var(--ink-55); }
.type-badge {
  display: inline-flex; align-items: center; padding: 2px 7px; border-radius: 5px;
  font-size: 9.5px; font-weight: 600; letter-spacing: .015em;
}
.onclock {
  background: var(--ink); color: #fff; border-radius: 13px; padding: 13px 15px;
  display: flex; align-items: center; gap: 12px;
}
.onclock .timer { font-family: var(--mono); font-size: 17px; font-variant-numeric: tabular-nums; }
.onclock .sub { font-size: 10.5px; color: rgba(255, 255, 255, .6); }
.sheet-back {
  position: absolute; inset: 0; background: rgba(21, 23, 28, .3); z-index: 50;
  display: flex; align-items: flex-end;
}
.sheet {
  background: var(--bg); width: 100%; max-height: 91%; border-radius: 20px 20px 0 0;
  display: flex; flex-direction: column; animation: sheetUp .2s ease;
  overflow: hidden;
}
@keyframes sheetUp { from { transform: translateY(30px); opacity: .6; } }
.sheet-head {
  padding: 14px 18px 12px; border-bottom: 1px solid var(--line);
  display: flex; align-items: flex-start; gap: 10px; background: var(--bg); flex: none;
}
.sheet-body { overflow-y: auto; padding: 16px 18px; flex: 1; }
.sheet-foot {
  flex: none; padding: 11px 18px 16px; border-top: 1px solid var(--line);
  background: var(--bg); display: flex; flex-direction: column; gap: 7px;
}
.grab { width: 34px; height: 4px; border-radius: 2px; background: rgba(21, 23, 28, .16); margin: 7px auto 0; }

.kv { display: flex; justify-content: space-between; gap: 12px; font-size: 12.5px; padding: 5px 0; }
.kv .k { color: var(--ink-55); }
.kv.total { border-top: 1px solid var(--line-2); margin-top: 6px; padding-top: 9px; font-weight: 600; font-size: 14px; }

.scope-list { margin: 0; padding: 0; list-style: none; }
.scope-list li { display: flex; gap: 8px; font-size: 12.5px; padding: 4px 0; line-height: 1.45; }
.scope-list li::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--ink-40); margin-top: 7px; flex: none; }

.legend { display: flex; flex-wrap: wrap; gap: 8px 12px; font-size: 10.5px; color: var(--ink-55); }
.legend i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; margin-right: 4px; }

.calgrid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.calcell {
  aspect-ratio: 1; border-radius: 7px; border: 1px solid transparent; background: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  font-size: 11px; padding: 0; position: relative;
}
.calcell .t { font-size: 7.5px; font-family: var(--mono); letter-spacing: .02em; }
.calcell.dim { opacity: .35; }
.calcell.sel { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.calcell.off { background: #F1EEE8; color: var(--ink-40); }
.calcell.custom { background: var(--accent-soft); color: var(--accent); }
.calcell.away { background: var(--violet-soft); color: var(--violet); }
.calcell.asked { background: var(--amber-soft); color: var(--amber); }
.calcell .jobdot { position: absolute; bottom: 3px; width: 3px; height: 3px; border-radius: 50%; background: var(--green); }

.mini-bars { display: flex; align-items: flex-end; gap: 5px; height: 66px; }
.mini-bars .b { flex: 1; background: var(--accent-soft); border-radius: 3px 3px 0 0; position: relative; min-height: 2px; }
.mini-bars .b.hi { background: var(--accent); }

.doc-tile {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px;
}
.doc-tile + .doc-tile { margin-top: 6px; }

.switch { width: 34px; height: 20px; border-radius: 99px; background: rgba(21, 23, 28, .16); position: relative; border: 0; flex: none; transition: background .15s; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch.on { background: var(--green); }
.switch.on::after { transform: translateX(14px); }

.upload-box {
  border: 1px dashed var(--line-2); border-radius: 10px; padding: 18px;
  text-align: center; color: var(--ink-55); font-size: 12px; background: #FCFBF8; cursor: pointer;
}
.upload-box:hover { background: #F8F6F1; border-color: var(--accent); }

@media (max-width: 1040px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; align-items: center; gap: 10px; overflow-x: auto; padding: 10px 14px; }
  .side .brand, .side-foot { display: none; }
  .side nav { flex-direction: row; }
  .nav-item { white-space: nowrap; }
  .main { padding: 20px 18px 50px; }
  .two-col, .stat-row { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .phone { width: 100%; height: auto; min-height: 700px; border-width: 0; border-radius: 0; box-shadow: none; }
  body.phone-body { padding: 0; }
}

/* Feedback (Inchworm notes) */
.fb-item { padding: 14px 20px; border-top: 1px solid rgba(21, 23, 28, .10); }
.fb-item:first-of-type { border-top: 0; }
.fb-meta { gap: 8px; margin-bottom: 6px; }
.fb-target { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 6px; }
.fb-text { font-size: 13.5px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.fb-page { text-transform: none; letter-spacing: 0; }

/* Keep the bug button clear of the phone app's tab bar on a real phone */
@media (max-width: 720px) {
  body.phone-body #iw-fab { bottom: 68px; right: 14px; }
  body.phone-body #iw-panel { bottom: 128px; }
}
