/* Amp Street Projects: mobile first, dark */
:root {
  --bg: #000000;
  --surface: #111111;
  --raised: #1A1A1A;
  --line: #262626;
  --line-strong: #333333;
  --text: #FFFFFF;
  --muted: #A3A3A3;
  --faint: #6B6B6B;
  --lime: #B9DB20;
  --lime-dim: rgba(185, 219, 32, .12);
  --amber: #F5A524;
  --amber-dim: rgba(245, 165, 36, .14);
  --red: #EF4444;
  --red-dim: rgba(239, 68, 68, .14);
  --blue-dim: rgba(255, 255, 255, .08);
  --r-lg: 20px;
  --r-md: 14px;
  --r-sm: 10px;
  --tap: 48px;
  --gutter: 16px;
  --tabbar: 68px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01";
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; letter-spacing: -0.025em; line-height: 1.15; }
h1 { font-size: 1.75rem; font-weight: 800; }
h2 { font-size: 1.0625rem; font-weight: 700; display: flex; align-items: center; gap: 8px; }
h3 { font-size: 1.125rem; font-weight: 700; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.icon { flex-shrink: 0; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 100; background: var(--lime); color: #000; padding: 10px 14px; border-radius: 10px; }

.eyebrow { color: var(--muted); font-size: .875rem; font-weight: 500; margin-bottom: 4px; }
.eyebrow a:hover { color: var(--text); }

/* ---------- Shell ---------- */
.shell { min-height: 100vh; }
.sidebar { display: none; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  height: 60px; padding: 0 var(--gutter);
  padding-top: env(safe-area-inset-top, 0px);
  background: rgba(0, 0, 0, .86);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar .brand img { height: 30px; width: auto; }
.top-back { display: flex; align-items: center; gap: 4px; min-height: var(--tap); color: var(--muted); font-weight: 600; max-width: 70vw; }
.top-back span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-back:hover { color: var(--text); }

.main {
  padding: 20px var(--gutter) calc(var(--tabbar) + var(--safe-b) + 32px);
  max-width: 1120px; margin: 0 auto;
}

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; height: calc(var(--tabbar) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: rgba(17, 17, 17, .96);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
}
.tabbar a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--faint); font-size: .75rem; font-weight: 600;
}
.tabbar a.active { color: var(--lime); }
.tabbar a.active .icon { stroke-width: 2.4; }

.avatar {
  display: inline-grid; place-items: center; flex-shrink: 0;
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--raised); border: 1px solid var(--line-strong);
  font-size: .8125rem; font-weight: 700; color: var(--text);
}
.avatar.sm { width: 28px; height: 28px; font-size: .6875rem; }

.user-menu { position: relative; }
.user-menu summary { list-style: none; cursor: pointer; padding: 6px; margin-right: -6px; }
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu-panel {
  position: absolute; right: 0; top: 54px; width: 260px;
  background: var(--raised); border: 1px solid var(--line-strong); border-radius: var(--r-md);
  padding: 16px; display: grid; gap: 4px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .6);
}
.user-menu-panel small { color: var(--muted); margin-bottom: 10px; word-break: break-all; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--tap); padding: 0 20px;
  border-radius: 999px; border: 1px solid transparent;
  font: inherit; font-weight: 700; font-size: .9375rem; letter-spacing: -0.01em;
  cursor: pointer; white-space: nowrap; user-select: none;
  transition: background-color .15s, border-color .15s, transform .08s;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--lime); color: #000; }
.btn-primary:hover { background: #C8E83A; }
.btn-ghost { background: var(--raised); color: var(--text); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: #4A4A4A; }
.btn-danger { background: var(--red-dim); color: #FF8A8A; border-color: rgba(239, 68, 68, .35); }
.btn-text-danger { background: none; color: #FF8A8A; }
.btn-text-danger:hover { background: var(--red-dim); }
.btn-block { width: 100%; }
.btn-lg { min-height: 54px; font-size: 1rem; }
.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px;
  background: none; border: 0; border-radius: 12px; color: var(--muted); cursor: pointer;
}
.icon-btn:hover { background: var(--raised); color: var(--text); }
.icon-btn.danger:hover { color: #FF8A8A; background: var(--red-dim); }
.text-link { color: var(--lime); font-weight: 600; font-size: .9375rem; cursor: pointer; }
.text-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.center-link { display: block; text-align: center; margin-top: 18px; padding: 8px; }

.fab {
  position: fixed; right: 18px; bottom: calc(var(--tabbar) + var(--safe-b) + 18px); z-index: 25;
  display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%;
  background: var(--lime); color: #000;
  box-shadow: 0 10px 30px rgba(185, 219, 32, .25), 0 4px 12px rgba(0, 0, 0, .6);
}

/* ---------- Page head ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.page-head .muted { margin-top: 6px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 12px; flex-wrap: wrap; }
.count {
  display: inline-grid; place-items: center; min-width: 24px; height: 22px; padding: 0 7px;
  border-radius: 999px; background: var(--raised); color: var(--muted);
  font-size: .75rem; font-weight: 700; letter-spacing: 0;
}
.narrow { max-width: 680px; margin-left: auto; margin-right: auto; }
.page-head.narrow { margin-bottom: 22px; }

/* ---------- Cards & lists ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.pad { padding: 18px; }
.narrow > .card + .card, .narrow > section, .narrow > .card + section { margin-top: 14px; }
.narrow > p.small { margin-top: 18px; }
.empty { color: var(--muted); padding: 6px 0; }
.empty-card {
  display: grid; justify-items: center; gap: 10px; text-align: center;
  padding: 32px 20px; border: 1px dashed var(--line-strong); border-radius: var(--r-lg); color: var(--muted);
}
.empty-card.big { padding: 56px 20px; }
.empty-card .icon { color: var(--lime); }
.empty-card strong { color: var(--text); }

.list { list-style: none; margin: 0; padding: 0; overflow: hidden; }
.list > li + li { border-top: 1px solid var(--line); }
.list-row {
  display: flex; align-items: center; gap: 12px;
  min-height: 68px; padding: 12px 16px; cursor: pointer;
  transition: background-color .12s;
}
.list-row:hover { background: var(--raised); }
.row-text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.row-text strong { font-weight: 650; font-size: .9875rem; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.row-text small { color: var(--muted); font-size: .8125rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-end { flex-shrink: 0; display: flex; align-items: center; gap: 8px; }
.stack-end { flex-direction: column; align-items: flex-end; gap: 6px; }
.row-late { box-shadow: inset 3px 0 0 var(--red); background: linear-gradient(90deg, rgba(239, 68, 68, .07), transparent 60%); }
.row-done .row-text strong { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--faint); }
.late-text { color: #FF8A8A !important; font-weight: 600; }
.kind { color: var(--faint); font-weight: 600; margin-right: 2px; }
.doc-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--raised); color: var(--muted); }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; height: 26px; padding: 0 10px;
  border-radius: 999px; font-size: .75rem; font-weight: 700; white-space: nowrap;
  background: var(--blue-dim); color: var(--muted);
}
.badge-in_progress { background: rgba(255, 255, 255, .1); color: var(--text); }
.badge-review { background: var(--amber-dim); color: var(--amber); }
.badge-done { background: var(--lime-dim); color: var(--lime); }
.badge-overdue { background: var(--red-dim); color: #FF8A8A; }
.badge-archived { background: var(--raised); color: var(--faint); }
.badge-admin { background: var(--lime-dim); color: var(--lime); }
.badge-member { background: var(--raised); color: var(--muted); }

/* ---------- Progress: the signature element ---------- */
.progress { height: 10px; border-radius: 999px; background: var(--raised); overflow: hidden; }
.progress span { display: block; height: 100%; border-radius: 999px; background: var(--lime); min-width: 0; transition: width .5s cubic-bezier(.2, .8, .2, 1); }
.progress-label { display: flex; justify-content: space-between; margin-top: 8px; font-size: .8125rem; color: var(--muted); }
.progress-label strong { color: var(--text); font-weight: 700; }
.project-progress { margin: 18px 0 20px; }
.project-progress .progress { height: 14px; }
.row-progress { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.row-progress .progress { flex: 1; height: 6px; max-width: 220px; }
.row-progress small { color: var(--muted); font-size: .75rem; font-weight: 600; }

/* ---------- Dashboard ---------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 28px; }
.stat {
  display: grid; gap: 2px; padding: 14px; border-radius: var(--r-md);
  background: var(--surface); border: 1px solid var(--line);
}
.stat strong { font-size: 1.75rem; font-weight: 800; letter-spacing: -0.04em; line-height: 1.1; }
.stat span { font-size: .75rem; color: var(--muted); font-weight: 600; }
.stat-alert { border-color: rgba(239, 68, 68, .4); }
.stat-alert strong { color: #FF8A8A; }
.stat-warn strong { color: var(--amber); }
.dash-grid { display: grid; gap: 32px; }
.project-grid { display: grid; gap: 12px; }
.project-card { display: grid; gap: 14px; padding: 18px; transition: border-color .15s; }
.project-card:hover { border-color: var(--line-strong); }
.card-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.client { color: var(--muted); font-size: .8125rem; font-weight: 600; }
.project-card h3 { font-size: 1.25rem; font-weight: 800; }
.due { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: .8125rem; }
.due.is-late { color: #FF8A8A; font-weight: 600; }
.date-chip {
  display: grid; place-items: center; width: 46px; height: 50px; flex-shrink: 0;
  border-radius: 12px; background: var(--raised); color: var(--muted);
  font-size: .6875rem; font-weight: 600; line-height: 1.05;
}
.date-chip b { font-size: 1.125rem; color: var(--text); font-weight: 800; }
.date-chip.late { background: var(--red-dim); color: #FF8A8A; }
.date-chip.late b { color: #FF8A8A; }

/* ---------- My tasks ---------- */
.task-group { margin-bottom: 26px; }
.group-late h2 { color: #FF8A8A; }

/* ---------- Toolbar / segmented ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; align-items: center; }
.segmented { display: inline-flex; padding: 4px; gap: 4px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.seg {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px;
  background: none; border: 0; color: var(--muted); font: inherit; font-weight: 600; font-size: .875rem; cursor: pointer;
}
.seg.active { background: var(--raised); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-strong); }
.search { flex: 1; min-width: 180px; }

/* ---------- Project page ---------- */
.project-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.project-head h1 { font-size: 2rem; }
.meta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 12px; }
.meta { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: .875rem; }

.files-bar { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 0 6px; margin-bottom: 18px; }
.files-bar-head { padding: 0 16px; margin-bottom: 10px; }
.files-bar-head h2 { font-size: .9375rem; }
.chips {
  display: flex; gap: 8px; overflow-x: auto; padding: 2px 16px 10px;
  scroll-snap-type: x proximity; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent;
}
.chip {
  display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; scroll-snap-align: start;
  max-width: 260px; min-height: 44px; padding: 0 14px 0 6px;
  border-radius: 999px; background: var(--raised); border: 1px solid var(--line-strong);
  font-size: .875rem; font-weight: 600;
}
.chip span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip:hover { border-color: #4A4A4A; }
.chip-empty { color: var(--muted); padding: 0 14px; font-weight: 500; }
.files-all summary { list-style: none; padding: 6px 16px 10px; display: inline-block; }
.files-all summary::-webkit-details-marker { display: none; }
.files-all-body { padding: 4px 16px 12px; border-top: 1px solid var(--line); }

.prov {
  display: inline-flex; align-items: center; height: 30px; padding: 0 10px; flex-shrink: 0;
  border-radius: 999px; font-size: .6875rem; font-weight: 700; white-space: nowrap;
  background: #262626; color: var(--muted);
}
.prov-gdrive { background: rgba(66, 133, 244, .16); color: #8AB4F8; }
.prov-gdocs { background: rgba(66, 133, 244, .16); color: #8AB4F8; }
.prov-gsheets { background: rgba(52, 168, 83, .16); color: #81C995; }
.prov-gslides { background: rgba(251, 188, 4, .16); color: #FDD663; }
.prov-zoho { background: rgba(226, 64, 64, .16); color: #F28B82; }
.prov-upload { background: var(--lime-dim); color: var(--lime); }

.file-list { list-style: none; margin: 8px 0 12px; padding: 0; }
.file-list li { display: flex; align-items: center; gap: 4px; border-bottom: 1px solid var(--line); }
.file-list li:last-child { border-bottom: 0; }
.file-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 8px 0; color: var(--text); }
.file-main > .icon { color: var(--faint); }
.file-main:hover > .icon { color: var(--text); }
.file-text { flex: 1; min-width: 0; display: grid; }
.file-text strong { font-weight: 600; font-size: .9375rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-text small { color: var(--muted); font-size: .75rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.add-file { margin-top: 8px; }
.add-file > summary { list-style: none; }
.add-file > summary::-webkit-details-marker { display: none; }
.add-file[open] > summary { display: none; }
.add-file .segmented { margin: 4px 0 14px; }

.tabs {
  display: flex; gap: 4px; margin: 0 calc(var(--gutter) * -1) 18px; padding: 0 var(--gutter);
  border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none;
}
.tabs a {
  display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap); padding: 0 14px;
  color: var(--muted); font-weight: 650; white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs a.active { color: var(--text); border-bottom-color: var(--lime); }
.tabs a:hover { color: var(--text); }

.overview-grid { display: grid; gap: 14px; }
.overview-grid > .card + .card { margin-top: 0; }
.overview-grid h2 { margin-bottom: 12px; }
.overview-grid .section-head h2 { margin: 0; }
.facts { margin: 0; display: grid; }
.facts div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.facts div:last-child { border-bottom: 0; }
.facts dt { color: var(--muted); font-size: .875rem; }
.facts dd { margin: 0; text-align: right; font-weight: 600; font-size: .9375rem; }
.mini-list { list-style: none; padding: 0; margin: 0; }
.mini-list a { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 56px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.mini-list li:last-child a { border-bottom: 0; }
.mini-list a > span:first-child { display: grid; min-width: 0; }
.mini-list strong { font-weight: 600; font-size: .9375rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-list small { color: var(--muted); font-size: .8125rem; }
.mini-list .icon { color: var(--faint); }

.add-task { margin-bottom: 14px; padding: 0; overflow: hidden; }
.add-task > summary { list-style: none; border-radius: 0; }
.add-task > summary::-webkit-details-marker { display: none; }
.add-task[open] > summary { background: var(--raised); color: var(--text); border-bottom: 1px solid var(--line); }
.add-task form { padding: 18px; }

.prose { line-height: 1.65; overflow-wrap: anywhere; max-width: 72ch; }
.prose a { color: var(--lime); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(185, 219, 32, .4); }
.doc-body { min-height: 160px; font-size: 1rem; }
.prose h2 + * { margin-top: 10px; }
.card h2 + .prose { margin-top: 10px; }

/* ---------- Forms ---------- */
.stack { display: grid; gap: 14px; }
.form-card { padding: 20px; }
.form-card h2 { margin-bottom: 2px; }
label { display: grid; gap: 7px; font-size: .875rem; font-weight: 600; color: var(--text); }
.optional { color: var(--faint); font-weight: 500; }
input, select, textarea {
  width: 100%; min-height: var(--tap);
  padding: 12px 14px; border-radius: var(--r-sm);
  background: var(--bg); color: var(--text);
  border: 1px solid var(--line-strong);
  font: inherit; font-size: 16px; font-weight: 400; /* 16px stops iPhone zoom */
  transition: border-color .12s, box-shadow .12s;
}
input::placeholder, textarea::placeholder { color: var(--faint); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--lime); box-shadow: 0 0 0 3px var(--lime-dim); }
input[type="date"] { color-scheme: dark; }
input[type="file"] { padding: 10px; }
input[type="file"]::file-selector-button {
  margin-right: 12px; padding: 8px 14px; border: 0; border-radius: 999px;
  background: var(--raised); color: var(--text); font: inherit; font-weight: 600; cursor: pointer;
}
select {
  appearance: none; -webkit-appearance: none; padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%23A3A3A3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 8 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
textarea { resize: vertical; line-height: 1.55; }
.doc-editor { min-height: 50vh; }
.hint { color: var(--muted); font-size: .8125rem; margin-top: -6px; }
.field-error { color: #FF8A8A; font-size: .8125rem; font-weight: 600; margin-top: -6px; }
.two-col { display: grid; gap: 14px; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; padding-top: 4px; }
.form-actions .btn { flex: 1; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { font-size: .875rem; font-weight: 600; margin-bottom: 8px; padding: 0; }

.status-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pick { display: block; position: relative; }
.pick input { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; }
.pick span {
  display: flex; align-items: center; justify-content: center; min-height: var(--tap);
  border-radius: var(--r-sm); border: 1px solid var(--line-strong); background: var(--bg);
  color: var(--muted); font-weight: 650; font-size: .875rem; cursor: pointer; text-align: center;
  transition: background-color .12s, border-color .12s, color .12s;
}
.pick input:focus-visible + span { outline: 2px solid var(--lime); outline-offset: 2px; }
.pick-not_started input:checked + span { background: var(--raised); color: var(--text); border-color: #555; }
.pick-in_progress input:checked + span { background: rgba(255, 255, 255, .12); color: var(--text); border-color: #777; }
.pick-review input:checked + span { background: var(--amber-dim); color: var(--amber); border-color: var(--amber); }
.pick-done input:checked + span { background: var(--lime); color: #000; border-color: var(--lime); }

.inline-form { display: flex; gap: 10px; align-items: flex-end; }
.inline-form label { flex: 1; }
.danger-zone h2, .form-card h2 { font-size: 1rem; }

/* ---------- Flash ---------- */
.flash {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px; border-radius: var(--r-md); margin-bottom: 16px;
  font-size: .9375rem; font-weight: 500;
  background: var(--raised); border: 1px solid var(--line-strong);
}
.flash-ok { border-color: rgba(185, 219, 32, .4); background: var(--lime-dim); color: #DFF28A; }
.flash-error { border-color: rgba(239, 68, 68, .4); background: var(--red-dim); color: #FFB3B3; }
.flash-info { color: var(--muted); }

/* ---------- Team ---------- */
.team-grid { display: grid; gap: 18px; }
.person > summary { list-style: none; }
.person > summary::-webkit-details-marker { display: none; }
.person[open] > summary { background: var(--raised); }
.person-off .row-text strong, .person-off .avatar { opacity: .5; }
.person-actions { display: grid; gap: 10px; padding: 14px 16px 18px; background: var(--raised); border-top: 1px solid var(--line); }
.share-card { border-color: rgba(185, 219, 32, .45); margin-bottom: 18px; }
.share-card h2 { color: var(--lime); margin-bottom: 8px; }
.share-card .muted { margin-bottom: 12px; }
.copy-row { display: flex; gap: 8px; margin-bottom: 10px; }
.copy-row input { font-size: .875rem; }
.hint + .hint { margin-top: 0; }

/* ---------- Auth ---------- */
.auth-body { min-height: 100vh; display: grid; }
.auth { width: 100%; max-width: 420px; margin: 0 auto; padding: 48px 20px 32px; display: flex; flex-direction: column; justify-content: center; }
.auth-logo { width: 110px; height: auto; margin: 0 auto 32px; }
.auth-card { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 28px 22px; }
.auth-card h1 { margin-bottom: 6px; }
.auth-card > .muted { margin-bottom: 22px; }
.auth-card .stack { margin-top: 22px; }
.auth-card.center .btn { margin-top: 22px; }
.auth-foot { text-align: center; color: var(--faint); font-size: .8125rem; margin-top: 28px; }

/* ---------- Utilities ---------- */
.hide-mobile { display: none !important; }
.show-mobile { display: inline; }

/* ---------- Tablet ---------- */
@media (min-width: 640px) {
  :root { --gutter: 24px; }
  h1 { font-size: 2.125rem; }
  .project-head h1 { font-size: 2.5rem; }
  .two-col { grid-template-columns: 1fr 1fr; }
  .project-grid { grid-template-columns: 1fr 1fr; }
  .form-actions .btn { flex: 0 0 auto; }
  .status-pick { grid-template-columns: repeat(4, 1fr); }
  .stat { padding: 18px; }
  .stat strong { font-size: 2.25rem; }
  .stat span { font-size: .8125rem; }
}

/* ---------- Desktop: sidebar ---------- */
@media (min-width: 1024px) {
  :root { --gutter: 40px; }
  .shell { display: grid; grid-template-columns: 248px 1fr; }
  .topbar, .tabbar, .fab { display: none; }
  .hide-mobile { display: inline-flex !important; }
  .show-mobile { display: none; }
  .sidebar {
    display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
    padding: 28px 16px 20px; border-right: 1px solid var(--line); background: var(--bg);
  }
  .sidebar .brand { display: flex; align-items: center; gap: 12px; padding: 0 10px; margin-bottom: 36px; }
  .sidebar .brand img { width: 64px; height: auto; }
  .sidebar .brand span { font-weight: 700; color: var(--muted); font-size: .9375rem; padding-left: 12px; border-left: 1px solid var(--line-strong); }
  .side-nav { display: grid; gap: 4px; }
  .side-nav a {
    display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 0 12px;
    border-radius: 12px; color: var(--muted); font-weight: 600;
  }
  .side-nav a:hover { color: var(--text); background: var(--surface); }
  .side-nav a.active { color: #000; background: var(--lime); }
  .side-user { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 14px 8px 0; border-top: 1px solid var(--line); }
  .side-user-text { flex: 1; min-width: 0; display: grid; }
  .side-user-text strong { font-size: .875rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .side-user-text small { color: var(--muted); font-size: .75rem; }
  .main { padding: 40px var(--gutter) 64px; width: 100%; }
  .dash-grid { grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr); align-items: start; }
  .overview-grid { grid-template-columns: 1fr 1fr; }
  .overview-grid > :first-child { grid-row: span 2; align-self: start; }
  .team-grid { grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr); align-items: start; }
  .team-grid > section:last-child { position: sticky; top: 40px; }
  .tabs { margin-left: 0; margin-right: 0; padding: 0; }
  .sticky-actions { position: static; }
  .stats { max-width: 640px; }
}

@media (max-width: 639px) {
  .sticky-actions {
    position: sticky; bottom: calc(var(--tabbar) + var(--safe-b));
    margin: 0 -20px -20px; padding: 12px 20px calc(12px);
    background: linear-gradient(to top, var(--surface) 70%, transparent);
    border-radius: 0 0 var(--r-lg) var(--r-lg);
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
.notes-card + .form-card { margin-top: 14px; }
