@font-face { font-family: "Geist"; src: url("/assets/fonts/Geist-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Geist"; src: url("/assets/fonts/Geist-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Geist"; src: url("/assets/fonts/Geist-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --ink: #101011;
  --cream: #f2f0ea;
  --cream-muted: rgba(242, 240, 234, 0.6);
  --cream-faint: rgba(242, 240, 234, 0.45);
  --lilac: #b48cff;
  --button-text: #1a1816;
  --line: rgba(255, 255, 255, 0.08);
  --surface: rgba(255, 255, 255, 0.06);
  --glass: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  --nav-fill: rgba(20, 19, 18, 0.55);
  --nav-border: rgba(255, 255, 255, 0.12);
  --glass-solid: rgba(22, 22, 23, 0.92);
  --input-fill: rgba(255, 255, 255, 0.04);

  --space-gutter: 64px;
  --space-stack: 48px;
  --space-nav: 36px;
  --space-heading: 16px;

  --radius-card: 28px;
  --radius-pill: 999px;
  --radius-solid: 24px;
  --radius-input: 12px;

  --blur-glass: 18px;
  --blur-nav: 24px;
  --shadow-nav: inset 0px 1px 0px 0px rgba(255, 255, 255, 0.1), 0px 16px 40px -20px rgba(0, 0, 0, 0.7);
  --shadow-float: 0px 24px 60px -24px rgba(0, 0, 0, 0.7);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font-sans: "Geist", system-ui, -apple-system, sans-serif;

  --frame-inset: 16px;
  --frame-bottom: 44px;
  --pad: var(--space-gutter);
  --grain: none;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  letter-spacing: -0.02em;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; letter-spacing: inherit; }

/* ---------- elrendezés: balra menüsáv (mint a Notion), jobbra a keretes ablak ---------- */

:root { --side-w: 264px; }

.app { height: 100%; display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); grid-template-rows: 100%; overflow: hidden; }

.sidebar {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 24px 12px 16px 16px;
  overflow: hidden;
}
.side-top { display: flex; align-items: center; justify-content: space-between; padding: 8px 8px 24px; }
.side-top .logo img { width: 80px; height: 13px; display: block; object-fit: contain; }
.side-close { display: none; }

.side-nav { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.12) transparent; }
.side-item {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 36px;
  padding: 0 10px;
  border-radius: 10px;
  color: var(--cream-muted);
  font-weight: 500;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.side-item svg { flex: none; opacity: 0.8; }
.side-item .label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-item .count { font-size: 13px; line-height: 1; color: var(--cream-faint); font-variant-numeric: tabular-nums; }
.side-item:hover { background: var(--surface); color: var(--cream); }
.side-item.active { background: rgba(255, 255, 255, 0.08); color: var(--cream); }
.side-item.client { padding-left: 14px; }
.side-label { font-size: 13px; line-height: 1; font-weight: 500; color: var(--cream-faint); padding: 24px 10px 10px; }

.side-foot { display: flex; flex-direction: column; gap: 12px; padding: 16px 8px 0; border-top: 1px solid var(--line); margin-top: 16px; }
.side-meta { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; line-height: 1.4; font-weight: 500; color: var(--cream-faint); }
.side-meta a:hover { color: var(--cream); }

.main-col { min-width: 0; height: 100%; display: flex; flex-direction: column; padding: var(--frame-inset) var(--frame-inset) 0 0; }
.main-col.solo { padding: var(--frame-inset) var(--frame-inset) 0; }
.mobilebar { display: none; }
.scrim { display: none; }

.frame {
  position: relative;
  flex: 1;
  min-height: 0;
  border-radius: var(--radius-solid);
  border: 1px solid var(--glass-border);
  overflow-y: auto;
  overflow-x: hidden;
  background-color: var(--ink);
  background-image:
    var(--grain),
    linear-gradient(rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.85)),
    url("/assets/ascii-bg.jpg");
  background-size: 180px 180px, cover, cover;
  background-position: 0 0, center, center;
  background-repeat: repeat, no-repeat, no-repeat;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.under {
  height: var(--frame-bottom);
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 500;
  color: var(--cream-faint);
}

.shell { max-width: 1100px; margin: 0 auto; padding: 0 var(--pad) var(--space-gutter); }

/* ---------- ügyfél oldal ---------- */

.page-nav { display: flex; align-items: center; gap: 8px; padding-top: 32px; font-size: 13px; line-height: 1; font-weight: 500; color: var(--cream-faint); }
.page-nav .crumb:hover { color: var(--cream); }
.page-nav .crumb-current { color: var(--cream-muted); }
.page-nav .arrows { margin-left: auto; display: flex; gap: 8px; }
.round {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0px 1px 0px 0px rgba(255, 255, 255, 0.12);
  color: var(--cream);
  transition: transform 0.4s var(--ease);
}
.round:hover { transform: scale(0.98); }
.round:active { transform: scale(0.95); }

.page-head { padding-top: 48px; }
.page-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 32px; }

.props { margin-top: 48px; border-top: 1px solid var(--line); }
.prop { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.prop .k { color: var(--cream-faint); font-size: 13px; line-height: 1.4; font-weight: 500; }
.prop .v { display: flex; flex-direction: column; gap: 2px; font-variant-numeric: tabular-nums; }
.prop .v span + span { color: var(--cream-muted); }
.prop .v a { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }

.progress-pane { margin-top: 16px; display: flex; flex-direction: column; gap: 16px; }

.lilac { color: var(--lilac) !important; }
.faint { color: var(--cream-faint); }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.linkish { transition: color 0.3s var(--ease); }
.linkish:hover { color: var(--lilac); }

/* ---------- üveg ---------- */

.glass {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-card);
  backdrop-filter: blur(var(--blur-glass)) saturate(140%);
  -webkit-backdrop-filter: blur(var(--blur-glass)) saturate(140%);
}

/* ---------- gombok ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 24px;
  border-radius: var(--radius-pill);
  border: 0;
  background: var(--cream);
  color: var(--button-text);
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.4s var(--ease), opacity 0.3s var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: scale(0.98); }
.btn:active { transform: scale(0.95); }
.btn.sm { height: 36px; padding: 0 16px; font-size: 13px; }
.btn.secondary { background: var(--surface); color: var(--cream); border: 1px solid var(--glass-border); }
.btn[disabled] { opacity: 0.6; cursor: default; }
.btn.block { width: 100%; }

/* ---------- tipográfia ---------- */

.h2 { font-size: 48px; line-height: 1.05; letter-spacing: -0.025em; font-weight: 500; margin: 0; }
.row-title { font-size: 32px; line-height: 1.15; letter-spacing: -0.02em; font-weight: 500; margin: 0; }
.title { font-size: 20px; line-height: 1.35; letter-spacing: -0.01em; font-weight: 500; margin: 0; }
.lead { font-size: 17px; line-height: 1.5; color: var(--cream-muted); margin: var(--space-heading) 0 0; }
.body { color: var(--cream-muted); }
.small { font-size: 13px; line-height: 1.4; font-weight: 500; color: var(--cream-faint); }
.big { font-size: 44px; line-height: 1; letter-spacing: -0.04em; font-weight: 500; color: var(--lilac); font-variant-numeric: tabular-nums; }
.big .of { color: var(--cream-faint); }
.num { font-variant-numeric: tabular-nums; }

/* ---------- szekciók ---------- */

.hero { padding-top: 80px; }
section.block { padding-top: var(--space-gutter); }
.block-head { margin-bottom: var(--space-stack); }

/* ---------- összesítő számok ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-top: var(--space-stack);
}
.stat { padding: 24px; display: flex; flex-direction: column; gap: 16px; min-height: 148px; justify-content: space-between; }
.stat .big { font-size: clamp(30px, 2.2vw, 44px); white-space: nowrap; }
.stat .label { font-size: 15px; line-height: 1.5; color: var(--cream-muted); }

/* ---------- ügyfél kártyák ---------- */

.clients { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }

.card { padding: 32px; display: flex; flex-direction: column; gap: 32px; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.card-head .who { display: flex; flex-direction: column; gap: 8px; }
.card-head .links { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.state { display: inline-flex; align-items: center; gap: 8px; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--cream-faint); display: inline-block; flex: none; }
.dot.on { background: var(--cream); }
.dot.alert { background: var(--lilac); }

.progress { display: flex; flex-direction: column; gap: 16px; }
.progress .top { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }

.bar { height: 8px; border-radius: var(--radius-pill); background: var(--surface); overflow: hidden; display: flex; }
.bar span { height: 100%; }
.bar .s-posted { background: var(--cream); }
.bar .s-scheduled { background: rgba(242, 240, 234, 0.7); }
.bar .s-ready { background: rgba(242, 240, 234, 0.45); }
.bar .s-filmed { background: rgba(242, 240, 234, 0.25); }
.bar .s-planned { background: rgba(242, 240, 234, 0.12); }

.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.legend span { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; line-height: 1.4; font-weight: 500; color: var(--cream-muted); }
.legend i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }

.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 16px; }
.fact { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.fact .v { font-size: 20px; line-height: 1.35; letter-spacing: -0.01em; font-weight: 500; font-variant-numeric: tabular-nums; }
.fact .v.alert { color: var(--lilac); }
.fact .sub { font-size: 13px; line-height: 1.4; color: var(--cream-faint); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- lenyitható listák (GYIK sor mintájára) ---------- */

.rows { border-top: 1px solid var(--line); }
details { border-bottom: 1px solid var(--line); }
details summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 0;
  font-weight: 500;
}
details summary::-webkit-details-marker { display: none; }
details summary .count { color: var(--cream-faint); font-variant-numeric: tabular-nums; }
details summary .plus { margin-left: auto; width: 16px; height: 16px; position: relative; transition: transform 0.4s var(--ease); }
details summary .plus::before, details summary .plus::after {
  content: ""; position: absolute; left: 50%; top: 50%; background: var(--cream-muted); border-radius: 1px;
}
details summary .plus::before { width: 12px; height: 1.5px; transform: translate(-50%, -50%); }
details summary .plus::after { width: 1.5px; height: 12px; transform: translate(-50%, -50%); }
details[open] summary .plus { transform: rotate(45deg); }
details .inner { padding: 0 0 16px; display: flex; flex-direction: column; gap: 8px; }
details .inner p { margin: 0; color: var(--cream-muted); }

.item { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 16px; align-items: baseline; }
.item.nodate { grid-template-columns: minmax(0, 1fr) auto; }
.item .d { font-size: 13px; line-height: 1.4; font-weight: 500; color: var(--cream-faint); font-variant-numeric: tabular-nums; }
.item a { color: var(--cream-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: color 0.3s var(--ease); }
.item a:hover { color: var(--cream); }
.item .st { font-size: 13px; line-height: 1.4; font-weight: 500; color: var(--cream-faint); white-space: nowrap; }

.empty { color: var(--cream-faint); font-size: 13px; line-height: 1.4; font-weight: 500; }

/* ---------- számlák és vágók ---------- */

.table { display: flex; flex-direction: column; }
.trow {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.trow.head { padding-top: 0; }
.trow.head span { font-size: 13px; line-height: 1.4; font-weight: 500; color: var(--cream-faint); }
.trow .name { font-weight: 500; }
.trow span { min-width: 0; }
.trow .muted { color: var(--cream-muted); }
.trow.billing { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 0.8fr) minmax(0, 0.8fr) minmax(0, 1fr) minmax(0, 1fr); }
.trow.overview { grid-template-columns: minmax(0, 1.6fr) minmax(0, 0.7fr) minmax(0, 0.8fr) minmax(0, 0.7fr) minmax(0, 1.2fr); }
.trow.alerts { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) minmax(0, 0.6fr) minmax(0, 0.8fr); }
.trow.list { grid-template-columns: 64px minmax(0, 1fr) auto; }
.trow.list.nodate { grid-template-columns: minmax(0, 1fr) auto; }
a.trow { color: var(--cream); }
.trow.editors { grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); }
button.trow { width: 100%; background: none; border: 0; border-bottom: 1px solid var(--line); color: var(--cream); text-align: left; font: inherit; letter-spacing: inherit; cursor: pointer; }
.trow.clickable { transition: color 0.3s var(--ease); }
.trow.clickable:hover .name { color: var(--lilac); }
.more { margin: 16px 0 0; }

.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.pane { padding: 32px; display: flex; flex-direction: column; gap: 16px; }
.pane .row-title { margin-bottom: 0; }

.editor-card { padding: 32px; display: flex; flex-direction: column; gap: 32px; }

/* ---------- értesítések ---------- */

.notice {
  margin-top: var(--space-stack);
  padding: 20px 24px;
  border-radius: var(--radius-solid);
  background: var(--glass-solid);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-float);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.notice p { margin: 0; color: var(--cream-muted); }

.loading { padding-top: 160px; text-align: center; color: var(--cream-faint); }

/* ---------- belépés ---------- */

.center { min-height: 100%; display: flex; align-items: center; justify-content: center; padding: 32px 16px; }
.login {
  width: 100%;
  max-width: 400px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 32px;
}
.login .mark { width: 40px; height: 40px; display: block; }
.login form { width: 100%; display: flex; flex-direction: column; gap: 16px; }
.login .heading { display: flex; flex-direction: column; gap: 8px; }
.login .heading p { margin: 0; color: var(--cream-muted); }
.input {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border-radius: var(--radius-input);
  border: 1px solid var(--glass-border);
  background: var(--input-fill);
  color: var(--cream);
  font: inherit;
  outline: none;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.input:hover { background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.18); }
.input:focus { border-color: rgba(242, 240, 234, 0.45); }
.input::placeholder { color: var(--cream-faint); }
.error { min-height: 18px; font-size: 13px; line-height: 1.4; font-weight: 500; color: var(--lilac); }
.login .foot { width: 100%; padding-top: 16px; border-top: 1px solid var(--line); }

/* ---------- reszponzív ---------- */

@media (max-width: 1199px) {
  :root { --pad: 36px; }
  .h2 { font-size: 40px; }
  .row-title { font-size: 28px; }
}

@media (max-width: 899px) {
  :root { --pad: 16px; --frame-inset: 8px; --frame-bottom: 40px; }
  .app { display: block; height: 100%; }
  .main-col { height: 100%; padding: 0 var(--frame-inset); }
  .mobilebar { display: flex; align-items: center; gap: 12px; height: 56px; flex: none; padding: 0 4px; }
  .mobile-logo { width: 80px; height: 13px; object-fit: contain; }
  .menu-btn, .side-close { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: var(--surface); border: 1px solid var(--glass-border); color: var(--cream); cursor: pointer; }
  .sidebar { position: fixed; z-index: 30; top: 0; bottom: 0; left: 0; width: 280px; background: var(--glass-solid); border-right: 1px solid var(--glass-border); backdrop-filter: blur(var(--blur-glass)); -webkit-backdrop-filter: blur(var(--blur-glass)); transform: translateX(-100%); transition: transform 0.4s var(--ease); }
  .sidebar.open { transform: none; }
  .scrim { display: block; position: fixed; inset: 0; z-index: 20; background: rgba(0, 0, 0, 0.5); opacity: 0; pointer-events: none; transition: opacity 0.3s var(--ease); }
  .scrim.open { opacity: 1; pointer-events: auto; }
  .frame { border-radius: 20px; }
}

@media (max-width: 809px) {
  .hero { padding-top: 48px; }
  .page-head { padding-top: 32px; }
  .h2 { font-size: 32px; }
  .row-title { font-size: 22px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { padding: 20px; min-height: 128px; }
  .big { font-size: 36px; }
  .pane, .editor-card { padding: 20px; gap: 24px; }
  .split { grid-template-columns: 1fr; }
  .card-head { flex-direction: column; }
  .card-head .links { justify-content: flex-start; }
  .prop { grid-template-columns: 120px minmax(0, 1fr); }
  .trow.overview, .trow.billing { grid-template-columns: minmax(0, 1fr) auto; }
  .trow.alerts { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); }
  .trow.editors { grid-template-columns: minmax(0, 1fr) auto auto; }
  .trow.list { grid-template-columns: 52px minmax(0, 1fr); }
  .trow.list .muted { display: none; }
  .trow .hide-m, .trow.alerts .state { display: none; }
  .under { font-size: 12px; }
}
