:root {
  --bg: #0b0d1a; --card: #12152a; --line: #262b4a; --text: #e8eaf6; --muted: #98a0c8;
  --violet: #7c6cff; --blue: #4aa8ff; --ok: #3ecf8e; --warn: #f5b84a; --bad: #ff6b81;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--blue); }
h1 { font-size: 1.6rem; margin: 0 0 .5rem; }
h2 { font-size: 1.05rem; margin: 0 0 .75rem; color: var(--muted); font-weight: 600; }
.top { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.5rem; padding: .75rem 1rem; border-bottom: 1px solid var(--line); background: #0e1122; }
.brand { color: var(--text); text-decoration: none; font-weight: 700; letter-spacing: .01em; }
.brand span { background: linear-gradient(90deg, var(--violet), var(--blue)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav a { color: var(--text); text-decoration: none; padding: .25rem .5rem; border-radius: 6px; }
.nav a[aria-current] { background: #1b2040; }
.who { margin-left: auto; display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1rem; font-size: .9rem; color: var(--muted); }
.who .tenant { color: var(--text); }
.who form { margin: 0; }
.wrap { max-width: 980px; margin: 0 auto; padding: 1.25rem 1rem 3rem; }
.bar { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; margin-bottom: 1rem; }
.bar h1 { margin: 0; }
.bar .btn { margin-left: auto; }
.crumb { margin: 0 0 .5rem; font-size: .9rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.1rem; margin-bottom: 1rem; }
.card.narrow { max-width: 460px; margin-left: auto; margin-right: auto; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.grid .card { margin-bottom: 0; }
.grid + .card { margin-top: 1rem; }
label { display: block; margin: 0 0 .85rem; font-size: .9rem; color: var(--muted); }
label i { color: var(--violet); font-style: normal; }
input, select, textarea { display: block; width: 100%; margin-top: .3rem; padding: .6rem .7rem; font: inherit; color: var(--text); background: #0b0e1f; border: 1px solid var(--line); border-radius: 8px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--violet); outline-offset: 1px; }
textarea { resize: vertical; }
.btn { display: inline-block; padding: .6rem 1rem; font: inherit; font-weight: 600; color: #fff; background: linear-gradient(90deg, var(--violet), var(--blue)); border: 0; border-radius: 8px; cursor: pointer; text-decoration: none; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
button.link { background: none; border: 0; color: var(--blue); cursor: pointer; font: inherit; padding: 0; }
.alert { background: #3a1620; border: 1px solid #6b2a3a; color: #ffd2da; padding: .6rem .8rem; border-radius: 8px; }
.empty { color: var(--muted); }
.lead { color: var(--muted); max-width: 46rem; margin: 0 0 1rem; }
.hint { color: var(--muted); font-size: .85rem; margin: .25rem 0 1rem; }
.notice { background: #12301f; border: 1px solid #1f5a3a; color: #c9f2dc; padding: .6rem .8rem; border-radius: 8px; }
fieldset.dayrow { border: 0; border-top: 1px solid var(--line); margin: 0; padding: .6rem 0; display: flex; flex-wrap: wrap; gap: .4rem .8rem; align-items: center; min-width: 0; }
fieldset.dayrow legend { float: left; width: 6.5rem; padding: 0; font-weight: 600; }
fieldset.dayrow .win { display: inline-flex; align-items: center; gap: .3rem; }
fieldset.dayrow input[type=time] { width: 7.2rem; margin: 0; padding: .4rem .5rem; }
label.check { display: flex; gap: .6rem; align-items: flex-start; color: var(--text); }
label.check input { width: auto; margin-top: .25rem; flex: none; }
.btn.danger { background: #8f2338; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .9rem; }
.chip { padding: .3rem .7rem; border: 1px solid var(--line); border-radius: 999px; color: var(--text); text-decoration: none; font-size: .9rem; }
.chip b { color: var(--muted); font-weight: 600; margin-left: .25rem; }
.chip.on { background: #1b2040; border-color: var(--violet); }
.search { display: flex; gap: .5rem; margin-bottom: 1rem; }
.search input { margin: 0; flex: 1; }
table.list { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
table.list th, table.list td { text-align: left; padding: .65rem .8rem; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list th { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; }
table.list tr:last-child td { border-bottom: 0; }
table.list small { display: block; color: var(--muted); overflow-wrap: anywhere; }
.pill { display: inline-block; padding: .1rem .55rem; border-radius: 999px; font-size: .8rem; font-weight: 600; background: #1b2040; color: var(--text); }
.pill.s-uj { background: #1d3b66; } .pill.s-elerve { background: #2b3a6b; } .pill.s-konzultacio { background: #4a2f86; }
.pill.s-ajanlat { background: #6b4a12; } .pill.s-ugyfel { background: #14573a; } .pill.s-elvesztett { background: #4b2230; }
dl { margin: 0 0 1rem; display: grid; grid-template-columns: 9rem 1fr; gap: .4rem 1rem; }
dt { color: var(--muted); font-size: .9rem; }
dd { margin: 0; overflow-wrap: anywhere; }
dd.pre, .note { white-space: pre-wrap; }
form.inline { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .5rem; }
form.inline label { margin: 0; flex: 1; min-width: 10rem; }
ul.plain { margin: 0; padding-left: 1.1rem; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 10.5rem 1fr; gap: .25rem 1rem; padding: .5rem 0; border-top: 1px solid var(--line); }
.timeline li:first-child { border-top: 0; }
.timeline time { color: var(--muted); font-size: .9rem; }
.pager { display: flex; gap: 1rem; justify-content: center; align-items: center; margin-top: 1rem; }
@media (max-width: 720px) {
  .grid { grid-template-columns: 1fr; }
  dl { grid-template-columns: 1fr; gap: .1rem 0; }
  dd { margin-bottom: .5rem; }
  .timeline li { grid-template-columns: 1fr; }
  table.list thead { display: none; }
  table.list, table.list tbody, table.list tr, table.list td { display: block; width: 100%; }
  table.list tr { border-bottom: 1px solid var(--line); padding: .5rem 0; }
  table.list td { border: 0; padding: .2rem .8rem; display: flex; gap: .75rem; justify-content: space-between; }
  table.list td::before { content: attr(data-label); color: var(--muted); font-size: .8rem; flex: 0 0 7rem; }
  table.list td:first-child { display: block; }
  table.list td:first-child::before { content: none; }
  .who { margin-left: 0; width: 100%; }
  .bar .btn { margin-left: 0; }
}
