/* SiteBox · Apple Human Interface Guidelines layer (design only, loaded after style.css).
   San Francisco system font, iOS system colours and grouped backgrounds, translucent bars, rounded controls,
   hairline separators, quiet shadows, 44 pt touch targets, iOS-like motion. Remove the <link> to go back. */

:root {
  /* iOS system colours (light) */
  --sys-blue: #007aff; --sys-blue-press: #0062cc; --sys-red: #ff3b30; --sys-orange: #ff9500; --sys-green: #34c759;
  --label: #000; --label-2: rgba(60, 60, 67, .6); --label-3: rgba(60, 60, 67, .3);
  --sep: rgba(60, 60, 67, .29); --sep-opaque: #c6c6c8;
  --fill: rgba(120, 120, 128, .12); --fill-2: rgba(120, 120, 128, .16); --fill-3: rgba(118, 118, 128, .24);
  --grouped: #f2f2f7; --grouped-2: #fff; --grouped-3: #f2f2f7;
  --bar: rgba(249, 249, 249, .82);
  --tint-50: rgba(0, 122, 255, .1); --tint-100: rgba(0, 122, 255, .18);

  /* map the existing tokens onto them */
  --bg: var(--grouped); --card: #fff; --ink: #1c1c1e; --ink-2: #3a3a3c; --muted: #8a8a8e; --faint: #aeaeb2;
  --line: rgba(60, 60, 67, .18); --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);
  --open: var(--sys-red); --warn: var(--sys-orange); --ok: var(--sys-green);
  --r: 12px; --r-sm: 10px; --r-lg: 16px;
  --sh-1: 0 0 0 .5px rgba(0, 0, 0, .04), 0 1px 2px rgba(0, 0, 0, .04);
  --sh-2: 0 0 0 .5px rgba(0, 0, 0, .05), 0 4px 14px rgba(0, 0, 0, .07);
  --sh-3: 0 0 0 .5px rgba(0, 0, 0, .06), 0 18px 50px rgba(0, 0, 0, .18), 0 4px 12px rgba(0, 0, 0, .06);
  --ring: 0 0 0 4px rgba(0, 122, 255, .28);
  --ease: cubic-bezier(.25, .1, .25, 1);
  --ease-out: cubic-bezier(.32, .72, 0, 1);         /* sheets and popovers */
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", "Segoe UI Variable Text", "Segoe UI",
    Roboto, "Noto Sans", Arial, sans-serif;
}

body { font: 15px/1.4 var(--font); letter-spacing: -.008em; color: var(--ink); background: var(--grouped); }
::selection { background: rgba(0, 122, 255, .22); }
svg.ic { stroke-width: 1.7; }
a:hover { color: var(--sys-blue-press); }

/* ---------- navigation bar: translucent, hairline ---------- */
header#top { background: var(--bar); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-bottom: .5px solid var(--sep); height: 52px; }
.brand { font-weight: 600; font-size: 17px; letter-spacing: -.022em; }
.brand img { box-shadow: none; }
#crumb { color: var(--label-2); font-weight: 400; font-size: 15px; border-left: .5px solid var(--sep); }
#nav a { color: var(--sys-blue); font-weight: 400; font-size: 15px; border-radius: 8px; }
#nav a:hover { background: var(--fill); color: var(--sys-blue); }
.avatar { background: linear-gradient(180deg, #a1a1a6, #8e8e93); font-weight: 600; letter-spacing: 0; }

/* ---------- type: large titles, sentence-case section headers ---------- */
h1 { font-size: 30px; font-weight: 700; letter-spacing: -.026em; line-height: 1.15; }
h2 { font-size: 20px; font-weight: 600; letter-spacing: -.02em; }
.page-head .sub, .muted { color: var(--label-2); }
th, .side-h, .m-left h4, .pv-side h3, .panel h4 { text-transform: none; letter-spacing: -.004em; font-size: 13px; font-weight: 400; color: var(--label-2); }
label { font-size: 13px; font-weight: 500; color: var(--label-2); }

/* ---------- grouped content: white rounded groups on #F2F2F7, no outlines ---------- */
.card, .pcard, .sheet-card, .frows, table, .empty, .modal-card { border: 0; border-radius: var(--r); box-shadow: var(--sh-1); }
.card.link:hover, .pcard:hover, .sheet-card:hover { box-shadow: var(--sh-2); transform: none; border: 0; }
.empty { border: 0; background: #fff; color: var(--label-2); }
th { background: #fff; border-bottom: .5px solid var(--sep); padding-top: 12px; padding-bottom: 8px; }
th, td { border-bottom: .5px solid var(--line); }
td { font-size: 15px; padding-top: 12px; padding-bottom: 12px; vertical-align: middle; }
tr.click { transition: background .2s var(--ease); }
tr.click:hover { background: rgba(120, 120, 128, .06); }
tr.click:active, .frow:active { background: rgba(120, 120, 128, .16); transition: none; }
td strong { font-weight: 600; }

/* ---------- buttons: filled (primary), gray tinted (secondary), plain (icons) ---------- */
button, .btn { border: 0; background: var(--fill); color: var(--sys-blue); font-weight: 500; font-size: 15px; border-radius: var(--r-sm);
  min-height: 40px; padding: 8px 16px; box-shadow: none; letter-spacing: -.01em;
  transition: background .2s var(--ease), color .2s var(--ease), opacity .2s var(--ease), transform .15s var(--ease); }
button:hover, .btn:hover { background: var(--fill-2); color: var(--sys-blue); border-color: transparent; }
button:active, .btn:active { opacity: .55; transition: none; }
button:focus-visible, .btn:focus-visible, a:focus-visible { box-shadow: var(--ring); }
button.primary, .btn.primary { background: var(--sys-blue); color: #fff; box-shadow: none; font-weight: 600; }
button.primary:hover, .btn.primary:hover { background: var(--sys-blue-press); color: #fff; }
button.danger { color: var(--sys-red); background: rgba(255, 59, 48, .1); }
button.danger:hover { background: rgba(255, 59, 48, .16); color: var(--sys-red); border-color: transparent; }
button.primary.danger { background: var(--sys-red); color: #fff; }
button.primary.danger:hover { background: #d70015; }
button.on { background: var(--tint-100); color: var(--sys-blue); border-color: transparent; }
button.slim, .slim { min-height: 32px; font-size: 14px; border-radius: 8px; }
button.x { background: none; color: var(--label-3); }
.kebab, .drawer .close, .m-head .close, .pv-head .close { background: transparent; color: var(--sys-blue); border: 0; }
.kebab:hover, .kebab:focus-visible { background: var(--fill); color: var(--sys-blue); }
.drawer .close, .m-head .close, .pv-head .close, .vw-x { background: var(--fill); color: var(--label-2); font-weight: 600; }
.drawer .close:hover, .m-head .close:hover { background: var(--fill-2); }
.linkbtn { color: var(--sys-blue); background: none; }

/* ---------- text fields: filled, borderless ---------- */
input, select, textarea { background-color: var(--fill); border: 0; border-radius: var(--r-sm); min-height: 40px; font-size: 15px;
  padding: 9px 12px; transition: background .2s var(--ease), box-shadow .2s var(--ease); }
input:hover, select:hover, textarea:hover { background-color: var(--fill-2); }
input:focus, select:focus, textarea:focus { background-color: #fff; box-shadow: var(--ring); }
input::placeholder, textarea::placeholder { color: var(--label-3); }
input:disabled, select:disabled, textarea:disabled { background-color: rgba(120, 120, 128, .06); color: var(--label-3); }
select { padding-right: 34px; background: var(--fill) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23007aff' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E") no-repeat right 12px center; }
select:hover { background-color: var(--fill-2); }
input[type=checkbox], input[type=radio] { accent-color: var(--sys-blue); background: none; box-shadow: none; }
.attr select, .attr input { background-color: #fff; box-shadow: inset 0 0 0 .5px var(--sep); }
.composer { border: 0; background: var(--fill); border-radius: 18px; }
.composer:focus-within { background: #fff; box-shadow: var(--ring); }
.composer textarea { background: transparent; }

/* ---------- segmented control ---------- */
.seg { background: rgba(118, 118, 128, .12); border-radius: 9px; padding: 2px; gap: 0; }
.seg button { background: none; color: var(--label); font-weight: 500; font-size: 14px; border-radius: 7px; min-height: 30px; padding: 4px 16px; }
.seg button:hover { background: none; color: var(--label); }
.seg button.on { background: #fff; color: var(--label); font-weight: 600; box-shadow: 0 3px 8px rgba(0, 0, 0, .12), 0 3px 1px rgba(0, 0, 0, .04), 0 0 0 .5px rgba(0, 0, 0, .04); }

/* ---------- badges, tags, status pill ---------- */
.badge { font-weight: 600; font-size: 12px; padding: 3px 10px; letter-spacing: 0; }
.tag { background: var(--fill); border: 0; color: var(--ink-2); }
.net { background: var(--fill); color: var(--label-2); font-weight: 500; }
.net.on { background: rgba(52, 199, 89, .14); color: #248a3d; } .net.on::before { background: var(--sys-green); }
.net.sync { background: rgba(255, 149, 0, .14); color: #c93400; } .net.sync::before { background: var(--sys-orange); }
.net.off { background: rgba(255, 59, 48, .12); color: #d70015; } .net.off::before { background: var(--sys-red); }
.overdue { color: var(--sys-red); font-weight: 500; }

/* ---------- login ---------- */
.login-page { background: var(--grouped); }
.login { border-radius: 20px; box-shadow: var(--sh-2); padding: 36px 32px 30px; }
.login .logo img { box-shadow: none; }
.login h1 { font-size: 22px; letter-spacing: -.02em; }
.login button.primary { min-height: 50px; font-size: 17px; border-radius: 12px; }

/* ---------- projects ---------- */
.pcard .pi { background: linear-gradient(180deg, #5ac8fa, #007aff); color: #fff; border-radius: 8px; }
.pcard .pn { font-weight: 600; }
.sbar { background: var(--fill); gap: 1.5px; }
.alert { background: rgba(255, 149, 0, .1); border: 0; color: #9a4b00; border-radius: var(--r); }

/* ---------- project: iPadOS sidebar ---------- */
.side { background: var(--grouped); border-right: .5px solid var(--sep); }
.side .tab { color: var(--label); font-weight: 400; border-radius: var(--r-sm); transition: background .2s var(--ease), color .2s var(--ease); }
.side .tab svg { color: var(--sys-blue); }
.side .tab:hover { background: var(--fill); color: var(--label); }
.side .tab.on { background: var(--sys-blue); color: #fff; font-weight: 600; }
.side .tab.on svg { color: #fff; }
.chip, .cat { color: var(--label); font-weight: 400; border-radius: var(--r-sm); background: none; }
.chip:hover, .cat:hover { background: var(--fill); }
.chip.on, .cat.on { background: var(--tint-50); color: var(--sys-blue); font-weight: 600; }
.cat .n { background: none; color: var(--label-2); font-weight: 400; }
.cat.on .n { background: none; color: var(--sys-blue); }
.toolbar { background: var(--bar); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border-bottom: .5px solid var(--sep); }
#map { background: #e5e5ea; }
.listpane { padding: 20px; }
.hint { background: rgba(28, 28, 30, .86); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); font-weight: 500; }

/* ---------- plans grid, folders ---------- */
.fold-h { font-size: 17px; font-weight: 600; color: var(--label); letter-spacing: -.02em; }
.fold-h svg { color: var(--sys-blue); }
.sheet-card img { background: #fff; border-bottom: .5px solid var(--line); }
.sc-code { font-weight: 600; font-size: 14px; }
.sc-t { color: var(--label-2); }
.ver { background: var(--tint-50); color: var(--sys-blue); }
.sheet-card .kebab { background: rgba(255, 255, 255, .9); border: 0; box-shadow: var(--sh-1); }
.sheet-card.picked { box-shadow: 0 0 0 3px var(--sys-blue); }
.archzone { border-top: .5px solid var(--sep); }

/* ---------- floating tool palettes: blurred material ---------- */
.drawbar, .colors, .pinbar { background: rgba(255, 255, 255, .86); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border: 0; border-radius: 14px; box-shadow: var(--sh-2); }
.drawbar button { color: var(--label); border-radius: 9px; background: none; }
.drawbar button:hover { background: var(--fill); }
.drawbar button.on { background: var(--sys-blue); color: #fff; }
.drawbar .sep { background: var(--sep); height: .5px; }
.leaflet-bar { border: 0 !important; border-radius: 12px !important; overflow: hidden; box-shadow: var(--sh-2) !important; }
.leaflet-bar a { background: rgba(255, 255, 255, .9); color: var(--sys-blue); border-bottom: .5px solid var(--sep) !important; }
.pin.overdue { color: #fff; }
.pin { border-width: 2.5px; box-shadow: 0 2px 8px rgba(0, 0, 0, .28); }
.pin.sel, .pin.picked { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--sys-blue), 0 4px 12px rgba(0, 0, 0, .3); }

/* ---------- kanban ---------- */
.col { background: rgba(118, 118, 128, .08); border: 0; border-radius: 14px; }
.col.over { background: var(--tint-50); box-shadow: inset 0 0 0 2px var(--sys-blue); }
.col-h { font-weight: 600; font-size: 15px; }
.col > .col-h { background: #e8e8ed; }
.col.over > .col-h { background: linear-gradient(var(--tint-50), var(--tint-50)) #f2f2f7; }
.col-h .n { background: none; color: var(--label-2); font-weight: 400; }
.kcard { border: 0; border-left: 4px solid #888; border-radius: 12px; box-shadow: var(--sh-1); transition: box-shadow .2s var(--ease), transform .2s var(--ease); }
.kcard:hover { box-shadow: var(--sh-2); }
.kcard .kt { font-weight: 500; }

/* ---------- sheets, popovers, menus ---------- */
.drawer { border-left: 0; box-shadow: var(--sh-3); padding: 24px; animation: slidein .35s var(--ease-out); }
@keyframes slidein { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer h3 { font-size: 22px; font-weight: 700; letter-spacing: -.022em; }
.modal { background: rgba(0, 0, 0, .3); -webkit-backdrop-filter: none; backdrop-filter: none; animation: fade .25s var(--ease); }
.m-box { border-radius: 18px; box-shadow: var(--sh-3); animation: sheet .4s var(--ease-out); }
.m-box.again { animation: none; }
@keyframes sheet { from { transform: translateY(24px) scale(.985); opacity: 0; } to { transform: none; opacity: 1; } }
.m-head { border-bottom: .5px solid var(--sep); background: var(--bar); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); }
.m-num { background: var(--tint-50); color: var(--sys-blue); border-radius: 7px; font-weight: 600; }
.m-title { font-weight: 700; letter-spacing: -.022em; background: transparent; }
input.m-title:hover { background: var(--fill); border-color: transparent; }
input.m-title:focus { background: #fff; border-color: transparent; }
.m-right { background: var(--grouped); border-left: .5px solid var(--sep); }
.m-pending { background: rgba(255, 149, 0, .12); color: #9a4b00; border-bottom: 0; }
.link-chip { background: var(--fill); border: 0; }
.checklist { border: 0; background: #fff; border-radius: var(--r-sm); box-shadow: inset 0 0 0 .5px var(--sep); }
.checklist li { border-bottom: .5px solid var(--line); padding: 10px 12px; }
.checklist label { font-weight: 400; }
.progress { background: var(--fill); }
.timeline li { border-top: .5px solid var(--line); }
.timeline li::before { background: var(--label-3); }
.timeline img { border: 0; border-radius: var(--r-sm); }

.kmenu, .ppdrop { background: rgba(252, 252, 252, .97); -webkit-backdrop-filter: saturate(180%) blur(30px); backdrop-filter: saturate(180%) blur(30px);
  border: 0; border-radius: 14px; padding: 0; overflow: hidden; min-width: 230px; box-shadow: 0 0 0 .5px rgba(0, 0, 0, .08), 0 20px 60px rgba(0, 0, 0, .22);
  animation: pop .2s var(--ease); }
@keyframes pop { from { opacity: 0; } to { opacity: 1; } }   /* opacity only: the menu's position is exact from the first frame */
.kmenu button, .ppdrop button { border-radius: 0; min-height: 44px; padding: 11px 16px; font-size: 16px; color: var(--label); justify-content: space-between;
  flex-direction: row-reverse; background: none; border-bottom: .5px solid var(--sep); }
.kmenu button:last-child, .ppdrop button:last-child { border-bottom: 0; }
.kmenu button:hover, .ppdrop button:hover { background: rgba(120, 120, 128, .12); }
.kmenu button .ic, .ppdrop button .ic { color: var(--label); width: 20px; height: 20px; }
.kmenu button.danger, .kmenu button.danger .ic { color: var(--sys-red); background: none; }
.kmenu button.danger:hover { background: rgba(255, 59, 48, .08); }

.toast { background: rgba(28, 28, 30, .88); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); border-radius: 14px; font-size: 15px;
  padding: 12px 20px; animation: rise .35s var(--ease-out); }
@keyframes rise { from { transform: translate(-50%, 16px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
.bulkbar { background: var(--sys-blue); border-radius: 12px; }
.bulkbar button, .bulkbar button.primary { background: rgba(255, 255, 255, .95); color: var(--sys-blue); }

/* ---------- files, photos, forms ---------- */
.frow { border-bottom: .5px solid var(--line); min-height: 56px; transition: background .2s var(--ease); }
.frow:hover { background: rgba(120, 120, 128, .06); }
.ftype { border-radius: 8px; font-weight: 700; }
.fr-t { font-weight: 500; }
.ph { border: 0; border-radius: 12px; background: var(--fill); }
.phtag { box-shadow: var(--sh-2); }
.phfilters .chip { background: var(--fill); }
.lock-note { background: var(--fill); border: 0; }
.yn button.on, .chip2.on { background: var(--sys-blue); color: #fff; }
.chip2 { border-radius: 99px; }
#sigc { border: 1.5px dashed var(--label-3); border-radius: 14px; }
.pv-box { border-radius: 18px; }
.pv-head, .pv-acts { border-color: var(--sep); }
.pv-side { border-left: .5px solid var(--sep); }
.pv-link, .tpick button { border: 0; background: var(--fill); }
.tpick button.on { background: var(--tint-50); box-shadow: inset 0 0 0 1.5px var(--sys-blue); }
.warnbox { border: 0; background: rgba(255, 59, 48, .1); color: #d70015; }
.rights { background: var(--tint-50); }
tr.picked td, .frow.picked { background: var(--tint-50); }
.delbtn { background: none; }
.delbtn:hover { background: rgba(255, 59, 48, .12); transform: none; }
.fcount { background: var(--sys-red); }
.fab { background: var(--sys-blue); box-shadow: 0 8px 24px rgba(0, 122, 255, .35); }

/* ---------- tablet: icon rail keeps the sidebar idea ---------- */
@media (min-width: 768px) and (max-width: 1199px) {
  .side { flex-basis: 78px; padding: 10px 6px; }
  .side .tab { font-size: 11px; font-weight: 500; border-radius: 12px; padding: 10px 2px; }
  .side .tab.on { background: var(--sys-blue); }
}

/* ---------- phone: iOS tab bar ---------- */
@media (max-width: 767px) {
  .side { background: var(--bar); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
    border-top: .5px solid var(--sep); box-shadow: none; }
  .side .tab, .side .navmore { color: #999; font-weight: 500; background: none; }
  .side .tab svg, .navmore .ic { color: #999; }
  .side .tab.on, .navmore.on { background: none; color: var(--sys-blue); }
  .side .tab.on svg { color: var(--sys-blue); }
  .drawer { border-radius: 14px 14px 0 0; animation: sheetup .4s var(--ease-out); }
  .drawer::before { content: ""; display: block; width: 36px; height: 5px; border-radius: 3px; background: var(--fill-3); margin: -10px auto 12px; }
  .tcard { border: 0; border-left: 4px solid #888; box-shadow: var(--sh-1); }
  .tcard.picked { background: var(--tint-50); }
  table.rtable tr { border: 0; box-shadow: var(--sh-1); }
  h1 { font-size: 28px; }
  .m-box { animation: sheetup .4s var(--ease-out); }
}
@keyframes sheetup { from { transform: translateY(60px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- touch ---------- */
@media (pointer: coarse) {
  button, .btn, select, input:not([type=checkbox]):not([type=radio]) { min-height: 44px; }
  .toolbar select, .toolbar input, .toolbar button { min-height: 44px; }
  .seg button { min-height: 36px; }
  input[type=checkbox], input[type=radio] { width: 22px; height: 22px; }
  .kebab { width: 44px; height: 44px; }
  .side .tab { min-height: 48px; }
  .chip, .cat { min-height: 44px; }
  .kmenu button, .ppdrop button { min-height: 48px; }
  button:hover, .btn:hover { background: var(--fill); }
  button.primary:hover { background: var(--sys-blue); }
  .seg button:hover { background: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

