/* ANDhitektura projects — same palette and type as andhitektura.com (src/styles/global.css there). */
@font-face { font-family: 'and_Lubrifont'; src: url('/fonts/and_Lubrifont/andLubrifont-Light.woff2') format('woff2'); font-weight: 300; font-display: swap; }
@font-face { font-family: 'and_Lubrifont'; src: url('/fonts/and_Lubrifont/andLubrifont-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'and_Lubrifont'; src: url('/fonts/and_Lubrifont/andLubrifont-Bold.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'and_Lubrifont'; src: url('/fonts/and_Lubrifont/andLubrifont-Italic.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }

:root {
  --bg: #232323;
  --bg-2: #1c1c1c;
  --bg-3: #2b2b2b;
  --ink: #e1e1e1;
  --mute: #afafaf;
  --dim: #7d7d7d;
  --line: #555;
  --line-2: #3a3a3a;
  --card: #afafaf;
  --card-ink: #232323;
  --red: #e14b4b;
  --green: #46a064;
  --teal: #64aaaa;
  --yellow: #f0c84b;
  --font: 'and_Lubrifont', system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --grid: 10mm;
  --pad: clamp(16px, 4vw, 10mm);
  --r: 2px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 0 0, rgb(225 225 225 / 0.12) 1.2px, transparent 1.7px) 0 0 / var(--grid) var(--grid) fixed, var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ---------- top bar ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 16px;
  padding: 12px var(--pad);
  background: rgb(35 35 35 / 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line-2);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.mark { height: 22px; width: auto; display: block; }
.brand-label { color: var(--mute); letter-spacing: 0.04em; }
.crumbs { display: flex; gap: 8px; align-items: center; min-width: 0; color: var(--mute); overflow: hidden; }
.crumbs a { text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumbs a:hover { color: var(--ink); }
.crumbs .sep { color: var(--dim); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 16px; flex: none; }
.top-link { text-decoration: none; color: var(--mute); }
.top-link:hover, .top-link[aria-current='page'] { color: var(--ink); }
.lang { background: none; border: 0; padding: 4px 0; color: var(--dim); cursor: pointer; }
.lang [data-l].on { color: var(--ink); }
.who { color: var(--mute); display: inline-flex; align-items: center; gap: 8px; }
.who .av { width: 26px; height: 26px; font-size: 11px; }
@media (max-width: 640px) {
  .who .name, .brand-label { display: none; }
  .top { gap: 10px; }
}

/* ---------- common ---------- */
.app { padding: 8mm var(--pad) 20mm; max-width: 1600px; margin: 0 auto; outline: none; }
.loading { color: var(--dim); }
.head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 6mm; }
.head h1 { font-size: 28px; font-weight: 300; letter-spacing: 0.01em; }
.head .sub { color: var(--mute); }
.head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.eyebrow { color: var(--dim); font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; }
.muted { color: var(--mute); }
.dim { color: var(--dim); }
.empty { color: var(--dim); padding: 6mm 0; }

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: var(--r);
  background: transparent; border: 1px solid var(--line); color: var(--ink);
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: border-color 0.2s, background 0.2s;
}
.btn:hover { border-color: var(--mute); }
.btn.primary { background: var(--ink); color: var(--card-ink); border-color: var(--ink); }
.btn.primary:hover { background: #fff; }
.btn.danger { border-color: rgb(225 75 75 / 0.5); color: var(--red); }
.btn.danger:hover { border-color: var(--red); }
.btn.small { padding: 3px 10px; font-size: 13px; }
.btn .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); }

input[type='text'], input[type='email'], input[type='date'], input[type='search'], select, textarea {
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--r);
  padding: 7px 10px; width: 100%; min-width: 0;
}
input:focus, select:focus, textarea:focus { border-color: var(--mute); outline: none; }
textarea { resize: vertical; min-height: 90px; line-height: 1.5; }
input[type='date'] { color-scheme: dark; }
label.field { display: grid; gap: 4px; }
label.field > span { color: var(--dim); font-size: 13px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.check { display: inline-flex; gap: 6px; align-items: center; color: var(--mute); }

/* avatars: initials in a circle, colour from the person */
.av {
  display: inline-grid; place-items: center; flex: none;
  width: 24px; height: 24px; border-radius: 50%;
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.02em;
  color: var(--card-ink); background: var(--card);
}
.av.c1 { background: var(--teal); } .av.c2 { background: var(--yellow); } .av.c3 { background: var(--green); }
.av.c4 { background: #c98a8a; } .av.c5 { background: #8a9ec9; } .av.c0 { background: var(--card); }
.av.none { background: transparent; border: 1px dashed var(--line); color: var(--dim); }

.pill { display: inline-block; padding: 1px 8px; border-radius: 99px; font-size: 12px; border: 1px solid var(--line); color: var(--mute); white-space: nowrap; }
.pill.active { border-color: var(--green); color: var(--green); }
.pill.on_hold { border-color: var(--yellow); color: var(--yellow); }
.pill.done { border-color: var(--teal); color: var(--teal); }
.pill.archived { color: var(--dim); }
.pill.role-lead { border-color: var(--teal); color: var(--teal); }
.pill.role-viewer { color: var(--dim); }

.bar { height: 4px; background: var(--line-2); border-radius: 2px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--green); }

/* ---------- dashboard ---------- */
.dash { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 10mm; align-items: start; }
@media (max-width: 1100px) { .dash { grid-template-columns: 1fr; } }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 5mm; }
.card {
  display: grid; gap: 10px; padding: 16px 18px 18px;
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--r);
  text-decoration: none; transition: border-color 0.2s, transform 0.3s var(--ease);
  position: relative;
}
.card:hover { border-color: var(--line); transform: translateY(-1px); }
.card .code { color: var(--dim); font-size: 13px; letter-spacing: 0.04em; }
.card h2 { font-size: 19px; font-weight: 400; line-height: 1.25; }
.card .meta { color: var(--mute); font-size: 13px; }
.card .phase { font-size: 13px; color: var(--ink); }
.card .phase::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--teal); margin-right: 7px; vertical-align: 1px; }
.card .stats { display: flex; gap: 14px; font-size: 13px; color: var(--mute); flex-wrap: wrap; }
.card .stats .late { color: var(--red); }
.card .stats .mine { color: var(--yellow); }
.card .pill { position: absolute; top: 14px; right: 14px; }
.card.is-archived, .card.is-done { opacity: 0.7; }

.side h3 { font-size: 13px; color: var(--dim); letter-spacing: 0.06em; text-transform: uppercase; font-weight: 400; margin-bottom: 10px; }
.mytasks { display: grid; gap: 2px; }
.mytask { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 10px 12px; background: var(--bg-2); border-left: 3px solid var(--line); text-decoration: none; }
.mytask:hover { background: var(--bg-3); }
.mytask.s-doing { border-left-color: var(--yellow); }
.mytask.s-review { border-left-color: var(--teal); }
.mytask .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mytask .p { grid-column: 1; font-size: 12px; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mytask .d { grid-row: 1 / 3; grid-column: 2; align-self: center; font-size: 13px; color: var(--mute); }
.mytask .d.late { color: var(--red); }

/* ---------- project ---------- */
.p-head { display: grid; gap: 6px; margin-bottom: 5mm; }
.p-head h1 { font-size: 28px; font-weight: 300; }
.p-head .meta { color: var(--mute); display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line-2); margin-bottom: 5mm; overflow-x: auto; scrollbar-width: none; }
.tabs a { padding: 9px 14px; text-decoration: none; color: var(--mute); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current='page'] { color: var(--ink); border-bottom-color: var(--red); }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 4mm; }
.toolbar select, .toolbar input { width: auto; }
.toolbar input[type='search'] { width: 200px; }
.toolbar .grow { flex: 1; }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: var(--r); }
.seg button { background: none; border: 0; padding: 6px 12px; color: var(--mute); cursor: pointer; }
.seg button[aria-pressed='true'] { background: var(--bg-3); color: var(--ink); }

/* kanban */
.board { display: grid; grid-template-columns: repeat(4, minmax(240px, 1fr)); gap: 4mm; overflow-x: auto; padding-bottom: 8px; }
.col { background: rgb(28 28 28 / 0.7); border: 1px solid var(--line-2); border-radius: var(--r); display: flex; flex-direction: column; min-height: 200px; }
.col-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line-2); }
.col-head .sw { width: 9px; height: 9px; border-radius: 50%; }
.col-head .n { color: var(--dim); margin-left: auto; font-size: 13px; }
.col-head .add { background: none; border: 0; color: var(--dim); cursor: pointer; font-size: 18px; line-height: 1; padding: 0 2px; }
.col-head .add:hover { color: var(--ink); }
.col-body { padding: 8px; display: grid; gap: 6px; align-content: start; flex: 1; }
.col.over { border-color: var(--mute); }
.sw.todo { background: var(--dim); } .sw.doing { background: var(--yellow); } .sw.review { background: var(--teal); } .sw.done { background: var(--green); }
.tcard {
  background: var(--bg-3); border: 1px solid transparent; border-radius: var(--r);
  padding: 9px 10px; cursor: pointer; display: grid; gap: 7px; user-select: none;
}
.tcard:hover { border-color: var(--line); }
.tcard.dragging { opacity: 0.4; }
.tcard .tt { line-height: 1.3; }
.tcard .tm { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--dim); }
.tcard .tm .ph { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.tcard .tm .due.late { color: var(--red); }
.tcard .tm .due.soon { color: var(--yellow); }
.tcard.prio-2 { box-shadow: inset 3px 0 0 var(--red); }
.tcard.is-done .tt { color: var(--mute); text-decoration: line-through; text-decoration-color: var(--dim); }
.drop-mark { height: 2px; background: var(--red); border-radius: 1px; margin: -4px 0; }

/* gantt */
.gantt { display: grid; grid-template-columns: minmax(180px, 300px) 1fr; border: 1px solid var(--line-2); border-radius: var(--r); background: rgb(28 28 28 / 0.75); overflow: hidden; }
.g-left { border-right: 1px solid var(--line-2); min-width: 0; }
.g-right { overflow-x: auto; position: relative; }
.g-row { height: 34px; display: flex; align-items: center; border-bottom: 1px solid #2a2a2a; }
.g-left .g-row { padding: 0 12px; gap: 8px; min-width: 0; }
.g-left .g-row .lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.g-left .g-row.task { padding-left: 26px; cursor: pointer; color: var(--mute); }
.g-left .g-row.task:hover { color: var(--ink); }
.g-left .g-row.phase { font-weight: 700; background: rgb(255 255 255 / 0.025); }
.g-head { height: 48px; border-bottom: 1px solid var(--line); position: relative; }
.g-left .g-head { display: flex; align-items: flex-end; padding: 0 12px 6px; color: var(--dim); font-size: 13px; }
.g-canvas { position: relative; }
.g-month { position: absolute; top: 0; height: 24px; padding: 4px 6px; font-size: 12px; color: var(--mute); border-left: 1px solid var(--line); white-space: nowrap; overflow: hidden; }
.g-tick { position: absolute; top: 24px; height: 24px; font-size: 11px; color: var(--dim); padding: 5px 0 0 3px; border-left: 1px solid var(--line-2); }
.g-vline { position: absolute; top: 0; bottom: 0; width: 1px; background: #2c2c2c; }
.g-weekend { position: absolute; top: 0; bottom: 0; background: rgb(255 255 255 / 0.018); }
.g-today { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--red); z-index: 3; }
.g-today::before { content: ''; position: absolute; top: -1px; left: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--red); }
.g-bar {
  position: absolute; height: 20px; top: 7px; border-radius: 3px; z-index: 2;
  background: var(--line); cursor: pointer; overflow: hidden; touch-action: none;
}
.g-bar > .fill { position: absolute; inset: 0 auto 0 0; background: rgb(255 255 255 / 0.22); }
.g-bar > .txt { position: absolute; left: 6px; right: 6px; top: 1px; font-size: 12px; color: var(--card-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.g-bar.todo { background: #8c8c8c; } .g-bar.doing { background: var(--yellow); } .g-bar.review { background: var(--teal); } .g-bar.done { background: var(--green); }
.g-bar.editable { cursor: grab; }
.g-bar .grip { position: absolute; top: 0; bottom: 0; width: 8px; cursor: ew-resize; }
.g-bar .grip.l { left: 0; } .g-bar .grip.r { right: 0; }
.g-bar.late { outline: 2px solid var(--red); outline-offset: 1px; }
.g-phase { position: absolute; top: 12px; height: 10px; z-index: 2; border: 2px solid var(--ink); border-top-width: 0; border-radius: 0 0 2px 2px; }
.g-phase::before, .g-phase::after { content: ''; position: absolute; top: 0; width: 0; height: 0; }
.g-ms { position: absolute; top: 10px; width: 14px; height: 14px; transform: rotate(45deg); background: var(--red); z-index: 2; cursor: pointer; }
.g-nodate { font-size: 12px; color: var(--dim); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--mute); margin-top: 3mm; }
.legend span { display: inline-flex; gap: 6px; align-items: center; }

/* team, phases, people tables */
.list { display: grid; gap: 1px; background: var(--line-2); border: 1px solid var(--line-2); border-radius: var(--r); overflow: hidden; }
.li { display: grid; grid-template-columns: auto 1fr auto auto; gap: 12px; align-items: center; padding: 10px 14px; background: var(--bg-2); }
.li .nm { min-width: 0; }
.li .nm .em { color: var(--dim); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li select { width: auto; }
.form-card { background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--r); padding: 16px; display: grid; gap: 12px; max-width: 720px; margin-top: 6mm; }
.form-card h3 { font-weight: 400; font-size: 17px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; align-items: end; }
.ph-row { display: grid; grid-template-columns: 28px 1.4fr 1.2fr 140px 140px auto; gap: 8px; align-items: center; padding: 8px 12px; background: var(--bg-2); }
.ph-row .n { color: var(--dim); text-align: right; }
.ph-row .acts { display: flex; gap: 4px; }
@media (max-width: 820px) { .ph-row { grid-template-columns: 24px 1fr 1fr; } .ph-row .d, .ph-row .acts { grid-column: 2 / -1; } }
table.people { width: 100%; border-collapse: collapse; background: var(--bg-2); border: 1px solid var(--line-2); }
table.people th, table.people td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.people th { color: var(--dim); font-weight: 400; font-size: 13px; }
table.people td .em { color: var(--dim); font-size: 13px; }
.table-wrap { overflow-x: auto; }
.act { display: grid; grid-template-columns: 130px 1fr; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line-2); font-size: 14px; }
.act .when { color: var(--dim); font-size: 13px; }

/* drawer */
.drawer {
  position: fixed; z-index: 40; top: 0; right: 0; bottom: 0;
  width: min(480px, 100vw); background: var(--bg-2); border-left: 1px solid var(--line);
  box-shadow: -20px 0 60px rgb(0 0 0 / 0.4);
  display: flex; flex-direction: column;
  animation: slide 0.35s var(--ease);
}
@keyframes slide { from { transform: translateX(30px); opacity: 0; } }
.drawer-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line-2); }
.drawer-head .x { margin-left: auto; background: none; border: 0; color: var(--mute); font-size: 22px; line-height: 1; cursor: pointer; padding: 4px; }
.drawer-body { padding: 18px; display: grid; gap: 14px; overflow-y: auto; align-content: start; flex: 1; }
.drawer-body .title-in { font-size: 19px; background: transparent; border-color: transparent; padding: 4px 6px; margin-left: -7px; }
.drawer-body .title-in:hover { border-color: var(--line-2); }
.drawer-foot { padding: 14px 18px; border-top: 1px solid var(--line-2); display: flex; gap: 8px; align-items: center; }
.drawer-foot .saved { color: var(--dim); font-size: 13px; margin-right: auto; }
.progress-in { display: flex; gap: 10px; align-items: center; }
.progress-in input { flex: 1; accent-color: var(--green); }
.scrim { position: fixed; inset: 0; z-index: 35; background: rgb(0 0 0 / 0.35); }

.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 60; background: var(--ink); color: var(--card-ink); padding: 9px 16px; border-radius: var(--r); font-size: 14px; }
.toast.err { background: var(--red); color: #fff; }

.gate { max-width: 560px; margin: 12vh auto; display: grid; gap: 14px; }
.gate h1 { font-size: 28px; font-weight: 300; }
@media (max-width: 700px) {
  .board { grid-template-columns: repeat(4, 84vw); scroll-snap-type: x mandatory; }
  .col { scroll-snap-align: start; }
  .gantt { grid-template-columns: 150px 1fr; }
}
