@font-face { font-family: 'Circular'; src: url('fonts/CircularStd-Book.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Circular'; src: url('fonts/CircularStd-Medium.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Circular'; src: url('fonts/CircularStd-Bold.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Circular'; src: url('fonts/CircularStd-Black.woff2') format('woff2'); font-weight: 900; font-display: swap; }

:root {
  --paper: #fbfaf7;
  --cream: #f4f1ea;
  --ink: #1a1613;
  --ink-2: #514c46;
  --ink-3: #8a847c;
  --line: #e2ddd2;
  --red: #e5322a;
  --red-deep: #b8261f;
  --green: #2e7d4f;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Circular', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: inherit; }

/* ===== App keret ===== */
.shell { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }

/* ===== Oldalsáv ===== */
.side {
  background: var(--ink);
  color: var(--cream);
  padding: 28px 20px;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.side .logo { display: block; padding: 4px 10px 26px; border-bottom: 1px solid rgba(244,241,234,0.12); margin-bottom: 22px; }
.side .logo img { height: 44px; width: auto; }
.side nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border-radius: 10px;
  color: rgba(244,241,234,0.75); text-decoration: none;
  font-size: 14.5px; font-weight: 500;
  margin-bottom: 4px;
  transition: background 0.15s ease, color 0.15s ease;
}
.side nav a:hover { background: rgba(244,241,234,0.07); color: var(--cream); }
.side nav a.active { background: var(--red); color: #fff; font-weight: 700; }
.side nav .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: 0.65; flex-shrink: 0; }
.side .bottom { margin-top: auto; padding-top: 18px; border-top: 1px solid rgba(244,241,234,0.12); }
.side .bottom .who { font-size: 13px; color: rgba(244,241,234,0.6); padding: 0 14px 10px; }
.side .bottom a { display: block; padding: 9px 14px; font-size: 13.5px; color: rgba(244,241,234,0.75); text-decoration: none; border-radius: 10px; }
.side .bottom a:hover { background: rgba(244,241,234,0.07); color: var(--cream); }

/* ===== Fő terület ===== */
.main { padding: 40px 48px 70px; max-width: 1160px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 30px; flex-wrap: wrap; }
.page-head .kicker {
  font-size: 12px; font-weight: 700; color: var(--red);
  letter-spacing: 0.18em; text-transform: uppercase; margin-bottom: 8px;
}
.page-head h1 { font-size: 34px; font-weight: 900; letter-spacing: -0.02em; line-height: 1.05; }
.page-head .sub { font-size: 14.5px; color: var(--ink-2); margin-top: 8px; max-width: 640px; }

/* ===== Gombok ===== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--red); color: #fff;
  font: inherit; font-size: 14.5px; font-weight: 700;
  padding: 11px 22px; border: none; border-radius: 10px;
  text-decoration: none; cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}
.btn:hover { background: var(--red-deep); transform: translateY(-1px); }
.btn.ghost {
  background: transparent; color: var(--ink);
  border: 1px solid var(--line);
}
.btn.ghost:hover { background: var(--cream); transform: none; }
.btn.small { font-size: 13px; padding: 7px 14px; border-radius: 8px; }
.btn.danger { background: transparent; color: var(--red); border: 1px solid #f3c9c6; }
.btn.danger:hover { background: #fdf0ef; }

/* ===== Kártyák, statok ===== */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 34px; }
@media (max-width: 1100px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat {
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 22px 24px;
}
.stat .label { font-size: 11.5px; font-weight: 700; color: var(--ink-3); letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 10px; }
.stat .value { font-size: 34px; font-weight: 900; letter-spacing: -0.02em; line-height: 1; }
.stat .value small { font-size: 14px; font-weight: 500; color: var(--ink-3); margin-left: 4px; }
.stat.accent { border-top: 3px solid var(--red); }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 28px 30px; margin-bottom: 22px;
}
.card h2 { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 18px; }

/* ===== Táblázat ===== */
table.list { width: 100%; border-collapse: collapse; font-size: 14.5px; }
table.list th {
  text-align: left; font-size: 11px; font-weight: 700; color: var(--ink-3);
  letter-spacing: 0.14em; text-transform: uppercase;
  padding: 10px 14px; border-bottom: 2px solid var(--ink);
}
table.list td { padding: 13px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.list tr:last-child td { border-bottom: none; }
table.list tr:hover td { background: #faf8f4; }
table.list .main-cell { font-weight: 700; }
table.list .sub-cell { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; font-weight: 400; }
table.list .right { text-align: right; }
.empty {
  padding: 44px 20px; text-align: center; color: var(--ink-3); font-size: 14.5px;
  border: 1px dashed var(--line); border-radius: 12px;
}

/* ===== Címkék ===== */
.tag {
  display: inline-block; font-size: 11.5px; font-weight: 700;
  letter-spacing: 0.05em; padding: 4px 11px; border-radius: 999px;
}
.tag.piszkozat { background: var(--cream); color: var(--ink-2); }
.tag.kikuldve  { background: #fdeeed; color: var(--red-deep); }
.tag.elfogadva { background: #e8f4ed; color: var(--green); }
.tag.lezart    { background: #ececec; color: #666; }
.tag.hourly    { background: #f4f1ea; color: var(--ink-2); }
.tag.project   { background: #1a1613; color: var(--cream); }

/* ===== Űrlapok ===== */
form .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; }
@media (max-width: 900px) { form .grid2 { grid-template-columns: 1fr; } }
.field { margin-bottom: 4px; }
.field label {
  display: block; font-size: 11.5px; font-weight: 700; color: var(--ink-2);
  letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 7px;
}
.field input[type="text"], .field input[type="email"], .field input[type="password"],
.field input[type="number"], .field textarea, .field select {
  width: 100%; font: inherit; font-size: 14.5px;
  padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; color: var(--ink);
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(229, 50, 42, 0.12);
}
.field textarea { min-height: 90px; resize: vertical; }
.field .hint { font-size: 12px; color: var(--ink-3); margin-top: 5px; }
.form-actions { display: flex; gap: 12px; align-items: center; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }

/* díjazás váltó */
.billing-toggle { display: flex; gap: 10px; }
.billing-toggle label {
  flex: 1; display: block; cursor: pointer;
  border: 1px solid var(--line); border-radius: 10px; padding: 13px 16px;
  font-size: 14px; font-weight: 700; text-align: center;
  text-transform: none; letter-spacing: 0; color: var(--ink-2);
}
.billing-toggle input { display: none; }
.billing-toggle input:checked + span { color: var(--red); }
.billing-toggle label:has(input:checked) {
  border-color: var(--red); background: #fdf0ef; color: var(--red-deep);
}

/* ===== Flash üzenet ===== */
.flash {
  background: #e8f4ed; color: var(--green); border: 1px solid #cbe5d6;
  padding: 13px 18px; border-radius: 10px; font-size: 14px; font-weight: 500;
  margin-bottom: 22px;
}

/* ===== Kereső sor ===== */
.toolbar { display: flex; gap: 12px; margin-bottom: 18px; }
.toolbar input[type="text"] {
  flex: 1; max-width: 360px; font: inherit; font-size: 14px;
  padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff;
}
.toolbar input:focus { outline: none; border-color: var(--red); }

/* ===== Login ===== */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: var(--ink); position: relative; overflow: hidden;
}
.login-wrap::before {
  content: ''; position: absolute; inset: 0;
  background: url('cover-bg.jpg') center / cover no-repeat;
  filter: brightness(0.35) saturate(1.15);
}
.login-card {
  position: relative; z-index: 2;
  width: 400px; max-width: calc(100vw - 40px);
  background: var(--paper); border-radius: 18px;
  padding: 44px 42px 38px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.45);
}
.login-card img.logo { height: 52px; margin-bottom: 26px; }
.login-card h1 { font-size: 22px; font-weight: 900; letter-spacing: -0.015em; margin-bottom: 4px; }
.login-card .sub { font-size: 13.5px; color: var(--ink-3); margin-bottom: 26px; }
.login-card .btn { width: 100%; justify-content: center; margin-top: 8px; }
.login-error {
  background: #fdf0ef; color: var(--red-deep); border: 1px solid #f3c9c6;
  font-size: 13.5px; padding: 11px 14px; border-radius: 10px; margin-bottom: 16px;
}
