/* Syncon Projects – Syncon brand (navy #0a1144, black rules, Arial, square edges) in Procore's layout. */
:root {
  --navy: #0a1144; --navy-2: #1d2560; --ink: #000; --muted: #4a4c52; --hair: #d6d7da; --wash: #f4f5f7;
  --steel: #93969d; --silver: #afb0b4; --warn: #b45309; --warn-bg: #fff8f0; --ok: #0a1144;
  --font: Arial, "Helvetica Neue", Helvetica, "Liberation Sans", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 14px/1.45 var(--font); color: var(--ink); background: #fff; }
a { color: var(--navy); }
a:hover { color: #000; }
:focus-visible { outline: 3px solid #4b74ff; outline-offset: 2px; }
.sr { position: absolute; left: -9999px; }

/* ---------- top bar ---------- */
.topbar { display: flex; flex-wrap: wrap; align-items: stretch; min-height: 64px; background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 20; }
.topbar .logo { display: flex; align-items: center; padding: 0 22px; background: #fff; }
.topbar .logo img { height: 26px; display: block; }
.topbar .tb-mid { flex: 1 1 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 14px; }
.picker { position: relative; }
.picker > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 14px; min-width: 200px; max-width: 360px; padding: 5px 12px; background: var(--navy-2); color: #fff; }
.picker > summary::-webkit-details-marker { display: none; }
.picker > summary small { display: block; font-size: 12px; color: #c9cad0; }
.picker > summary b { display: block; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.picker > summary::after { content: ""; border: 6px solid transparent; border-top-color: #fff; margin-top: 6px; }
.picker[open] > summary { background: #fff; color: var(--navy); }
.picker[open] > summary small { color: var(--muted); }
.picker[open] > summary::after { border-top-color: transparent; border-bottom-color: var(--navy); margin: -6px 0 0; }
.menu { position: absolute; left: 0; top: calc(100% + 6px); background: #fff; color: #000; border: 1px solid #000; box-shadow: 0 10px 30px rgba(0,0,0,.25); z-index: 30; }
.menu.projects { width: 420px; max-height: 70vh; overflow: auto; padding: 8px 0; }
.menu.projects a { display: block; padding: 8px 14px; text-decoration: none; color: #000; }
.menu.projects a:hover, .menu.projects a.cur { background: var(--wash); }
.menu.projects .num { color: var(--muted); font-size: 12px; margin-right: 6px; }
.menu.tools { position: fixed; left: 24px; right: 24px; top: 70px; max-height: calc(100vh - 90px); overflow: auto; padding: 24px 28px; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 24px 36px; }
.menu.tools h3 { margin: 0 0 8px; font-size: 16px; padding-bottom: 8px; border-bottom: 3px solid #000; }
.menu.tools ul { list-style: none; margin: 0; padding: 0; }
.menu.tools li { min-height: 32px; display: flex; align-items: center; gap: 8px; }
.menu.tools li a { color: #000; text-decoration: none; }
.menu.tools li a:hover { color: var(--navy); text-decoration: underline; }
.menu.tools li.cur a { font-weight: 700; color: var(--navy); }
.menu.tools li.soon { color: var(--steel); }
.menu.tools .tag { font-size: 10px; font-weight: 700; letter-spacing: .04em; padding: 1px 5px; border: 1px solid currentColor; }
.menu.tools .ext { color: var(--navy); font-weight: 700; }
.topbar .search { flex: 1 1 220px; max-width: 420px; }
.topbar .search input { width: 100%; height: 40px; border: 0; padding: 0 12px; font: inherit; }
.topbar .right { display: flex; align-items: center; gap: 8px; padding: 8px 14px 8px 0; }
.topbar .right a.app { color: #fff; text-decoration: none; background: var(--navy-2); padding: 5px 12px; }
.topbar .right a.app small { display: block; font-size: 12px; color: #c9cad0; }
.topbar .avatar { width: 40px; height: 40px; background: #fff; color: var(--navy); border: 0; font: 700 14px var(--font); cursor: pointer; }
.usermenu { right: 0; left: auto; width: 240px; padding: 12px 14px; }
.usermenu button { width: 100%; }
.picker.user > summary { all: unset; cursor: pointer; }
.picker.user > summary::after { display: none; }
.topbar .search { margin: 0; display: flex; }

/* ---------- page ---------- */
main { max-width: 1440px; margin: 0 auto; padding: 24px 28px 64px; }
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px 16px; padding-bottom: 14px; border-bottom: 3px solid #000; margin-bottom: 18px; }
.page-head h1 { margin: 0; font-size: 26px; line-height: 1.15; }
.page-head .sub { color: var(--muted); font-size: 13px; margin-top: 4px; }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.crumbs a { color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tabs { display: flex; flex-wrap: wrap; gap: 2px; border-bottom: 1px solid var(--hair); margin: -6px 0 18px; }
.tabs a { padding: 10px 14px; text-decoration: none; color: #000; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tabs a.on { border-bottom-color: var(--navy); font-weight: 700; color: var(--navy); }
h2 { font-size: 15px; letter-spacing: .02em; margin: 26px 0 10px; padding-bottom: 6px; border-bottom: 3px solid #000; }
h2:first-child { margin-top: 0; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 24px 32px; align-items: start; }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; padding: 0 16px; border: 1px solid #000; background: #fff; color: #000; font: 700 13px var(--font); text-decoration: none; cursor: pointer; border-radius: 0; white-space: nowrap; }
.btn:hover { background: var(--wash); color: #000; }
.btn.primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn.primary:hover { background: #000; border-color: #000; }
.btn.warn { border-color: var(--warn); color: var(--warn); }
.btn.sm { height: 32px; padding: 0 10px; font-size: 12px; }
.btn.link { border: 0; background: none; color: var(--navy); padding: 0 4px; height: auto; text-decoration: underline; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
form.inline { display: inline; }
label.f { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 700; color: #000; }
label.f span.hint { font-weight: 400; color: var(--muted); }
input[type=text], input[type=email], input[type=date], input[type=number], input[type=search], select, textarea {
  height: 40px; border: 1px solid #000; border-radius: 0; padding: 0 10px; font: 14px var(--font); background: #fff; color: #000; width: 100%; }
textarea { height: auto; padding: 8px 10px; min-height: 80px; }
input.num { text-align: right; font-variant-numeric: tabular-nums; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px 18px; }
.fields .wide { grid-column: 1 / -1; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.check input { width: 18px; height: 18px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.filters input[type=search] { width: 280px; }
.filters select { width: auto; }

/* ---------- messages ---------- */
.flash { padding: 12px 16px; margin-bottom: 14px; font-size: 14px; border-left: 6px solid var(--navy); background: #eef0f8; }
.flash.error { border-left-color: var(--warn); background: var(--warn-bg); color: #6b2f05; font-weight: 700; }
.empty { padding: 40px 16px; text-align: center; color: var(--muted); border: 1px dashed var(--silver); }
.empty .btn { margin-top: 12px; }

/* ---------- tables ---------- */
.tbox { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 13px; }
table.t th { text-align: left; font-size: 11px; font-weight: 700; letter-spacing: .03em; padding: 8px 10px; border-bottom: 2px solid #000; vertical-align: bottom; white-space: nowrap; }
table.t td { padding: 9px 10px; border-bottom: 1px solid var(--hair); vertical-align: top; }
table.t tr:hover td { background: #fafbfc; }
table.t .n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.t tfoot td { font-weight: 700; border-top: 2px solid #000; border-bottom: 2px solid #000; }
table.t tr.grp td { background: var(--wash); font-weight: 700; }
table.t tr.sub td { font-weight: 700; border-bottom: 1px solid #000; }
table.t tr.over td { background: var(--warn-bg); }
table.t td.over { color: var(--warn); font-weight: 700; }
table.t input { height: 34px; }
table.t input.num { width: 120px; }
table.t td:has(> div > input) { white-space: nowrap; }
table.kv td:first-child { width: 46%; }
.pill { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .03em; padding: 3px 8px; border: 1px solid #000; white-space: nowrap; }
.pill.Draft { border-color: var(--steel); color: var(--muted); }
.pill.Submitted, .pill.Out-for-Signature { border-color: var(--warn); color: var(--warn); }
.pill.Approved, .pill.Active { background: var(--navy); border-color: var(--navy); color: #fff; }
.pill.Paid { background: #000; color: #fff; }

/* ---------- figures ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; margin-bottom: 22px; }
.kpi { border-top: 3px solid #000; padding-top: 10px; }
.kpi span { display: block; font-size: 12px; font-weight: 700; }
.kpi b { display: block; font-size: 22px; color: var(--navy); margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi small { color: var(--muted); }
.bar { height: 10px; background: #e6e7ea; position: relative; }
.bar > i { position: absolute; inset: 0 auto 0 0; background: var(--navy); }

/* ---------- pay app ---------- */
.flow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; list-style: none; margin: 0 0 18px; padding: 0; }
.flow li { padding: 9px 12px; font-size: 12px; font-weight: 700; border: 1px solid var(--steel); color: var(--muted); }
.flow li.done { background: #e6e7ea; color: #000; border-color: #e6e7ea; }
.flow li.cur { background: var(--navy); color: #fff; border-color: var(--navy); }
.g702 td { padding: 7px 0; border-bottom: 1px solid var(--hair); }
.g702 td.n { padding-left: 16px; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.g702 tr.due td { background: var(--navy); color: #fff; font-weight: 700; font-size: 16px; padding: 12px 10px; }
.g702 tr.b td { font-weight: 700; }
.g702 td.ind { padding-left: 18px; }
.stickybar { position: sticky; bottom: 0; background: #fff; border-top: 3px solid #000; padding: 12px 0; display: flex; gap: 10px; justify-content: flex-end; align-items: center; z-index: 5; }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; place-items: center; background: var(--navy); padding: 24px; }
.login .card { background: #fff; width: min(420px, 100%); padding: 36px 32px; border-top: 6px solid #000; }
.login img { height: 34px; }
.login h1 { font-size: 20px; margin: 22px 0 6px; }
.login .btn { width: 100%; height: 46px; margin-top: 18px; }

@media (max-width: 720px) {
  main { padding: 16px; }
  .picker > summary { min-width: 0; }
  .menu.projects, .menu.tools { position: fixed; left: 8px; right: 8px; width: auto; top: 70px; }
  .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media print {
  .topbar, .stickybar, .actions, .tabs, form { display: none !important; }
}

/* ---------- release 2 ---------- */
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.thumbs.big { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.thumb { display: flex; flex-direction: column; gap: 4px; margin: 0; text-decoration: none; color: #000; }
.thumb img, .thumb .ficon { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--wash); border: 1px solid var(--hair); }
.thumb .ficon { display: grid; place-items: center; font-weight: 700; color: var(--muted); }
.thumb .fname { font-size: 12px; line-height: 1.3; word-break: break-word; }
.activity { list-style: none; padding: 0; margin: 12px 0 0; max-width: 800px; }
.activity li { padding: 10px 0; border-bottom: 1px solid var(--hair); }
.foldertree a { display: block; padding: 7px 14px; text-decoration: none; color: #000; border-left: 3px solid transparent; }
.foldertree a:hover { background: var(--wash); }
.foldertree a.on { border-left-color: var(--navy); background: var(--wash); font-weight: 700; }
.gantt { border: 1px solid var(--hair); padding: 8px 12px 12px; overflow-x: auto; }
.gmonths { position: relative; height: 22px; margin-left: 260px; border-bottom: 1px solid var(--hair); min-width: 600px; }
.gmonths span { position: absolute; top: 2px; font-size: 11px; color: var(--muted); padding-left: 4px; border-left: 1px solid var(--hair); }
.grow { display: grid; grid-template-columns: 260px minmax(600px, 1fr); align-items: center; min-height: 30px; }
.glabel { font-size: 13px; padding-right: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gtrack { position: relative; height: 30px; border-bottom: 1px solid #f0f1f3; }
.gbar { position: absolute; top: 8px; height: 14px; background: #c6c9d8; }
.gbar > i { position: absolute; inset: 0 auto 0 0; background: var(--navy); }
.gmile { position: absolute; top: 7px; width: 14px; height: 14px; background: #000; transform: translateX(-7px) rotate(45deg); }
.gtoday { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--warn); }
table.rows input, table.rows select { height: 34px; }
