/* A Fókusz saját színei (személyes app — nem Verbo/WD arculat), az iOS Palette.swift tükre. */
:root {
  --sun: #F2B10C;
  --sun-deep: #B27F00;
  --slate: #46708F;
  --ink: #1E2F44;
  --sky: #5A8DB5;
  --teal: #4A8A88;
  --dusk: #7468A0;
  --sage: #4E8F64;
  --late: #C0533A;

  --p-verbo: #D9467A;
  --p-wd: #5856D6;
  --p-personal: #3FB8A9;
  --p-wir: #46708F;

  --bg: #F6F7F9;
  --surface: #FFFFFF;
  --line: #E3E6EB;
  --weekend: #F0F2F5;
  --text: #1E2F44;
  --muted: #6B7787;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --sun: #F6C440;
    --sun-deep: #F6C440;
    --slate: #8DB0CC;
    --sky: #9CC0DE;
    --teal: #8CC4C1;
    --dusk: #ADA4D4;
    --sage: #8FC7A0;
    --late: #E58A72;
    --p-wir: #8DB0CC;

    --bg: #121A25;
    --surface: #1A2433;
    --line: #2A3647;
    --weekend: #161F2C;
    --text: #E6ECF2;
    --muted: #8D9AAB;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.4 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.spacer { flex: 1; }

/* Belépés */
.login { min-height: 100%; display: grid; place-items: center; padding: 16px; }
.login-card { width: min(360px, 100%); background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; padding: 28px; }
.login-card h1 { margin: 0 0 4px; font-size: 22px; }
.login-card form { display: flex; gap: 8px; margin-top: 16px; }
.login-card input { flex: 1; min-width: 0; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--bg); }

button[type=submit], .primary { background: var(--sun); color: var(--ink); border: 0; border-radius: 8px;
  padding: 9px 14px; font-weight: 600; }
.ghost { background: transparent; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; }
.ghost:hover { border-color: var(--slate); }

/* Fejléc */
.topbar { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: var(--surface);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.brand { font-weight: 700; font-size: 16px; }
.brand::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%;
  background: var(--sun); margin-right: 8px; }
.tabs { display: flex; gap: 4px; }
.tabs button { background: none; border: 0; padding: 6px 10px; border-radius: 8px; color: var(--muted); }
.tabs button.active { color: var(--text); background: var(--bg); font-weight: 600; }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 4px 11px;
  display: inline-flex; align-items: center; gap: 6px; }
.chip.active { border-color: var(--slate); box-shadow: inset 0 0 0 1px var(--slate); }
.chip .dot, .dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.check { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button { background: var(--surface); border: 0; padding: 5px 10px; color: var(--muted); }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.active { background: var(--bg); color: var(--text); font-weight: 600; }

main { padding: 0 16px 24px; }
.view { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.empty { padding: 32px; text-align: center; color: var(--muted); }
.note { padding: 10px 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }

/* Idővonal (Gantt) */
.gantt { display: grid; grid-template-columns: minmax(180px, 300px) 1fr; max-height: calc(100vh - 150px);
  overflow: auto; position: relative; }
.g-labels { position: sticky; left: 0; z-index: 3; background: var(--surface); border-right: 1px solid var(--line); }
.g-head-l { height: 44px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface);
  z-index: 4; display: flex; align-items: end; padding: 0 12px 6px; color: var(--muted); font-size: 12px; }
.g-group, .g-row { height: 32px; display: flex; align-items: center; gap: 8px; padding: 0 12px;
  border-bottom: 1px solid var(--line); white-space: nowrap; }
.g-group { font-weight: 600; background: var(--bg); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.g-row { cursor: pointer; }
.g-row:hover { background: var(--bg); }
.g-row .t { overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; }
.g-canvas { position: relative; }
.g-head { height: 44px; position: sticky; top: 0; z-index: 2; background: var(--surface);
  border-bottom: 1px solid var(--line); }
.g-month { position: absolute; top: 4px; font-size: 12px; font-weight: 600; padding-left: 4px;
  border-left: 1px solid var(--line); height: 36px; }
.g-day { position: absolute; bottom: 4px; font-size: 10px; color: var(--muted); text-align: center;
  font-variant-numeric: tabular-nums; }
.g-body { position: relative; }
.g-weekend { position: absolute; top: 0; bottom: 0; background: var(--weekend); }
.g-today { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--sun); z-index: 1; }
.g-line { height: 32px; border-bottom: 1px solid var(--line); position: relative; }
.g-line.grp { background: color-mix(in srgb, var(--bg) 60%, transparent); }
.bar { position: absolute; top: 7px; height: 18px; border-radius: 5px; cursor: pointer; min-width: 6px;
  display: flex; align-items: center; padding: 0 6px; font-size: 11px; color: #fff; white-space: nowrap;
  overflow: hidden; z-index: 1; }
.bar.late { box-shadow: inset 0 0 0 2px var(--late); }
.milestone.focus { opacity: .5; }   /* csak ütemezve (Ma-nap), nincs határidő */
.milestone { position: absolute; top: 9px; width: 14px; height: 14px; transform: rotate(45deg);
  border-radius: 3px; cursor: pointer; z-index: 1; }

/* Jelvények */
.badge { font-size: 11px; padding: 1px 7px; border-radius: 999px; background: var(--bg); color: var(--muted);
  white-space: nowrap; font-variant-numeric: tabular-nums; }
.badge.late { color: #fff; background: var(--late); }
.badge.soon { color: var(--ink); background: var(--sun); }
.prio { font-size: 11px; font-weight: 700; color: var(--sun-deep); }

/* Lista */
table.list { width: 100%; border-collapse: collapse; }
.list th { text-align: left; font-weight: 600; font-size: 12px; color: var(--muted); padding: 8px 12px;
  border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); cursor: pointer; }
.list td { padding: 8px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.list tr.row { cursor: pointer; }
.list tr.row:hover td { background: var(--bg); }
.list td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.list-wrap { max-height: calc(100vh - 150px); overflow: auto; }

/* Részletek */
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100%); background: var(--surface);
  border-left: 1px solid var(--line); z-index: 10; padding: 20px; overflow: auto;
  box-shadow: -12px 0 32px rgba(0,0,0,.12); }
.drawer h2 { font-size: 17px; margin: 0 0 4px; }
.drawer .close { position: absolute; top: 14px; right: 14px; }
.field { display: grid; gap: 4px; margin-top: 14px; }
.field label { font-size: 12px; color: var(--muted); }
.field input, .field select, .field textarea { padding: 8px 10px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--bg); }
.row-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.actions { display: flex; gap: 8px; margin-top: 20px; }
.kv { display: grid; grid-template-columns: 120px 1fr; gap: 6px 10px; margin-top: 14px; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.drawer a { color: var(--slate); }

@media (max-width: 640px) {
  .topbar { flex-wrap: wrap; }
  .gantt { grid-template-columns: 140px 1fr; }
}
