:root {
  --bg: #f4f1ee;
  --surface: #ffffff;
  --surface-2: #17111d;
  --ink: #160f17;
  --muted: #6e6471;
  --line: #e9e0dc;
  --line-dark: rgba(255,255,255,.12);
  --accent: #ff5f6d;
  --accent-2: #ff9f77;
  --good: #18a06a;
  --warn: #d97a14;
  --danger: #c43b46;
  --shadow: 0 18px 48px rgba(21, 13, 25, .10);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: radial-gradient(circle at top left, rgba(255,95,109,.12), transparent 24%), linear-gradient(180deg, #140d1a 0%, #1a1320 18%, var(--bg) 58%); color: var(--ink); min-height: 100%; }
body { min-height: 100vh; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
textarea { resize: vertical; }

.shell {
  min-height: 100vh;
  padding: 18px;
}

.app-grid {
  max-width: 1680px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 18px;
}

.sidebar {
  background: rgba(23, 17, 29, .94);
  color: #fff;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius-xl);
  padding: 18px;
  box-shadow: 0 30px 100px rgba(10, 8, 16, .35);
  position: sticky;
  top: 18px;
  height: fit-content;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent), #ff84a6, var(--accent-2));
  font-weight: 800;
}

.brand-meta small,
.kicker,
.eyebrow,
.stat-label,
.panel-label,
.field-label,
.table-label,
.section-label,
.helper-label {
  display: block;
  letter-spacing: .16em;
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 700;
}

.brand-title { font-size: 15px; font-weight: 800; }
.brand-subtitle { color: rgba(255,255,255,.58); margin-top: 4px; font-size: 12px; }

.operator-card {
  margin-top: 16px;
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  padding: 16px;
}

.operator-name { font-size: 22px; font-weight: 800; margin: 8px 0 4px; }
.operator-email { color: rgba(255,255,255,.64); font-size: 14px; word-break: break-word; }
.role-pill,
.badge,
.status-pill,
.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.role-pill { margin-top: 12px; background: rgba(255,255,255,.08); color: #fff; }

.nav {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.08);
  color: rgba(255,255,255,.76);
  background: rgba(255,255,255,.04);
  transition: .18s ease;
}

.nav a.active {
  background: #fff;
  color: var(--ink);
  border-color: #fff;
}

.nav a:hover { background: rgba(255,255,255,.1); color: #fff; }
.nav a.active:hover { color: var(--ink); }

.main {
  min-width: 0;
  display: grid;
  gap: 18px;
}

.card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  border: 1px solid rgba(22, 15, 23, .05);
}

.card.dark {
  background: rgba(23, 17, 29, .92);
  color: #fff;
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 30px 100px rgba(10, 8, 16, .24);
}

.card-header {
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--line);
}
.card.dark .card-header { border-bottom-color: rgba(255,255,255,.08); }
.card-body { padding: 18px 22px 22px; }

.hero {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) auto;
}
.hero-title { font-size: clamp(32px, 5vw, 50px); line-height: .92; letter-spacing: -.05em; font-weight: 900; margin: 10px 0 0; }
.hero-copy { color: rgba(255,255,255,.68); max-width: 64ch; line-height: 1.7; margin-top: 12px; }
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 12px;
}
.stat-card {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px;
  padding: 14px;
  min-width: 0;
}
.card:not(.dark) .stat-card {
  background: #faf7f5;
  border-color: #f0e7e2;
}
.stat-value { font-size: 24px; font-weight: 900; letter-spacing: -.04em; margin-top: 8px; }

.toolbar {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}
.toolbar-main {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
}

.field,
.field-inline {
  display: grid;
  gap: 8px;
}

.field input,
.field select,
.field textarea,
.field-inline input,
.field-inline select,
.field-inline textarea {
  min-height: 46px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 0 14px;
  color: var(--ink);
}
.field textarea,
.field-inline textarea { min-height: 120px; padding: 12px 14px; }

.actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.btn {
  min-height: 44px;
  border-radius: 14px;
  border: 1px solid transparent;
  padding: 0 16px;
  font-weight: 700;
}
.btn.primary { background: var(--ink); color: #fff; }
.btn.secondary { background: #fff; border-color: var(--line); color: var(--ink); }
.btn.soft { background: #f6efeb; color: var(--ink); }
.btn.danger { background: var(--danger); color: #fff; }
.btn.ghost { background: transparent; border-color: rgba(255,255,255,.12); color: #fff; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

.content-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr);
}

.list-card {
  overflow: hidden;
}
.list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.list {
  display: grid;
}
.item {
  padding: 18px 22px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
}
.item:first-child { border-top: none; }
.item:hover { background: #fbf8f6; }
.item.active { background: #fff2ee; }
.item-title { font-size: 22px; font-weight: 800; letter-spacing: -.04em; }
.item-meta { margin-top: 8px; color: var(--muted); line-height: 1.6; }
.item-tags { display: flex; flex-wrap: wrap; gap: 8px; }

.badge {
  background: #fff0ea;
  color: var(--accent);
}
.status-pill.live,
.status-pill.active,
.status-pill.kész { background: #eefaf4; color: var(--good); }
.status-pill.pending,
.status-pill.folyamatban,
.status-pill.draft { background: #fff6e9; color: var(--warn); }
.status-pill.archived,
.status-pill.tiltott,
.status-pill.disabled,
.status-pill.danger { background: #fff0f1; color: var(--danger); }
.status-pill.free,
.status-pill.extra,
.status-pill.premium { background: #f4efff; color: #6847d8; }

.detail-grid {
  display: grid;
  gap: 12px;
}

.kv {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: 14px;
  background: #faf6f4;
  padding: 13px 14px;
}

.kv-value { text-align: right; font-weight: 700; }
.muted { color: var(--muted); }
.prewrap { white-space: pre-wrap; }
.empty {
  padding: 24px;
  border-radius: 18px;
  background: #faf7f5;
  color: var(--muted);
  line-height: 1.7;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(100%, 480px);
  background: rgba(23, 17, 29, .95);
  color: #fff;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 32px;
  padding: 28px;
  box-shadow: 0 32px 120px rgba(10, 8, 16, .44);
}

.login-card .field input { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.12); color: #fff; }
.login-card .field-label { color: rgba(255,255,255,.68); }

.notice {
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.5;
}
.notice.error { background: #fff0f1; color: #8b1f2c; }
.notice.success { background: #eefaf4; color: #176c4f; }
.notice.info { background: #edf5ff; color: #1a4c7a; }

footer.helper {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

@media (max-width: 1280px) {
  .app-grid { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .content-grid { grid-template-columns: 1fr; }
}

@media (max-width: 920px) {
  .hero { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .toolbar { grid-template-columns: 1fr; }
  .toolbar-main { grid-template-columns: 1fr 1fr; }
  .item { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .shell { padding: 10px; }
  .toolbar-main { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: 1fr; }
  .card-header, .card-body, .item { padding-left: 16px; padding-right: 16px; }
  .brand-title { font-size: 14px; }
  .item-title { font-size: 18px; }
  .hero-title { font-size: 32px; }
}

