/* Aerial Events · kolory Fundacji Cyrkarium
   Układ: jedna kolumna; lista wydarzeń jak program festiwalu,
   z „biletem” daty po lewej; zakładki u góry. */
:root {
  --violet: #4B3373;
  --violet-ink: #FFFFFF;
  --green: #3D562B;
  --lilac: #CAC2DF;
  --lime: #D1DFA8;

  --bg: #F7F5FB;
  --surface: #FFFFFF;
  --ink: #2B2B2B;
  --muted: #6F6A7A;
  --line: #E4DFF0;
  --date-bg: #EFEBF7;
  --date-ink: #4B3373;
  --accent: #4B3373;
  --tag-bg: #EFEBF7;
  --tag-ink: #4B3373;

  --ok: #3D562B;
  --ok-soft: #E8EFD3;
  --warn: #7A5A00;
  --warn-soft: #FBF0D4;
  --bad: #A33A2E;
  --bad-soft: #F8E3E0;

  --font-display: "Outfit", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --font-body: "Figtree", "Segoe UI", system-ui, -apple-system, sans-serif;
  --r: 12px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16121E;
    --surface: #201A2B;
    --ink: #EDE9F5;
    --muted: #A79FB8;
    --line: #342B44;
    --date-bg: #2C2340;
    --date-ink: #D9D0EE;
    --accent: #CAC2DF;
    --violet-ink: #FFFFFF;
    --tag-bg: #2C2340;
    --tag-ink: #D9D0EE;
    --ok: #C3D58E;
    --ok-soft: #26301A;
    --warn: #E9C46A;
    --warn-soft: #33290F;
    --bad: #EE9A8F;
    --bad-soft: #3A1C18;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 20px 56px;
}
.wrap { max-width: 880px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }
h1, h2, h3 { font-family: var(--font-display); text-wrap: balance; margin: 0; }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
img { max-width: 100%; }

/* nagłówek */
.top { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit; min-width: 0; }
.logo-tile { width: 64px; height: 64px; border-radius: 14px; background: #FFFFFF; display: grid; place-items: center; flex: none; box-shadow: 0 0 0 1px var(--line); }
.logo-tile img { width: 58px; height: 58px; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.eyebrow { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; color: var(--green); }
@media (prefers-color-scheme: dark) { .eyebrow { color: var(--lime); } }
.brand-name { font-family: var(--font-display); font-size: clamp(28px, 6vw, 40px); font-weight: 800; line-height: 1.05; letter-spacing: -0.01em; color: var(--accent); }
.lede { color: var(--muted); max-width: 60ch; margin: -6px 0 0; }
.top-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.account { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); }
.account .who { max-width: 22ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lang { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: var(--surface); }
.lang button { border: 0; background: transparent; padding: 5px 12px; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: 13px; color: var(--muted); }
.lang button[aria-pressed="true"] { background: var(--violet); color: #FFFFFF; }

/* zakładki */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs a { padding: 10px 12px; font-weight: 600; color: var(--muted); text-decoration: none; border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.tabs a[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--lime); }
.tabs a[aria-selected="true"] span:first-child { color: var(--accent); }
.count { font-size: 12px; background: var(--violet); color: #FFFFFF; border-radius: 999px; padding: 0 7px; font-variant-numeric: tabular-nums; }

/* filtry */
.filters { display: flex; flex-direction: column; gap: 12px; margin-bottom: 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 14px; cursor: pointer; font-size: 14px; font-weight: 500; }
.chip[aria-pressed="true"] { background: var(--violet); border-color: var(--violet); color: #FFFFFF; }
.selects { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; }
.selects input, .selects select, .field input, .field select, .field textarea, .login input, .reason textarea {
  width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 10px 12px; min-width: 0;
}
.toggle { display: inline-flex; gap: 8px; align-items: center; font-size: 14px; color: var(--muted); cursor: pointer; }
.toggle input { accent-color: var(--violet); }

/* lista wydarzeń */
.list { display: flex; flex-direction: column; }
.month { font-family: var(--font-display); font-weight: 700; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--green); padding: 20px 0 8px; border-bottom: 2px solid var(--lime); }
@media (prefers-color-scheme: dark) { .month { color: var(--lime); } }
.ev { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.date { display: flex; flex-direction: column; align-items: center; background: var(--date-bg); color: var(--date-ink); border-radius: var(--r); padding: 10px 4px; height: fit-content; text-align: center; font-variant-numeric: tabular-nums; }
.date .d { font-family: var(--font-display); font-size: 26px; font-weight: 800; line-height: 1; }
.date .m { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin-top: 2px; }
.date .w { font-size: 11px; opacity: .8; }
.ev-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ev-title { font-size: 20px; font-weight: 700; line-height: 1.2; }
.meta { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--muted); font-size: 14px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 6px; background: var(--tag-bg); color: var(--tag-ink); }
.tag.free { background: var(--lime); color: #2F4320; }
.tag.lvl { background: transparent; border: 1px solid var(--line); color: var(--muted); }
.desc { margin: 0; overflow-wrap: anywhere; white-space: pre-line; }
.ev-actions, .actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 4px; }
.btn { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 9px 18px; font-weight: 600; cursor: pointer; text-decoration: none; border: 1px solid transparent; font-size: 14px; }
.btn.primary { background: var(--violet); color: #FFFFFF; }
@media (prefers-color-scheme: dark) { .btn.primary { background: var(--lilac); color: #2A1F40; } }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn.ok { background: var(--green); color: #FFFFFF; }
@media (prefers-color-scheme: dark) { .btn.ok { background: var(--lime); color: #2F4320; } }
.btn.bad { background: transparent; border-color: var(--bad); color: var(--bad); }
.btn.link { background: none; border: 0; padding: 4px 6px; color: var(--accent); text-decoration: underline; }
.btn[disabled] { opacity: .55; cursor: default; }
.small { font-size: 13px; color: var(--muted); }
.sub { font-size: 18px; margin-top: 28px; }

/* stany */
.empty, .card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 24px 22px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.empty { border-style: dashed; }
.empty h3, .card h3 { font-size: 20px; }
.empty p, .card p { margin: 0; color: var(--muted); max-width: 56ch; }
.notice { border-radius: var(--r); padding: 12px 14px; font-size: 14px; margin-bottom: 4px; }
.notice.info { background: var(--date-bg); color: var(--ink); }
.notice.ok { background: var(--ok-soft); color: var(--ok); }
.notice.bad { background: var(--bad-soft); color: var(--bad); }
.pill { font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 999px; }
.pill.pending { background: var(--warn-soft); color: var(--warn); }
.pill.approved { background: var(--ok-soft); color: var(--ok); }
.pill.rejected { background: var(--bad-soft); color: var(--bad); }
.reason-note { font-size: 14px; background: var(--bad-soft); color: var(--ink); border-left: 3px solid var(--bad); padding: 8px 12px; border-radius: 6px; }
.reason { display: flex; flex-direction: column; gap: 8px; width: 100%; margin-top: 6px; }

/* logowanie */
.login { display: flex; flex-direction: row; gap: 8px; flex-wrap: wrap; align-items: center; width: 100%; max-width: 440px; }
.login input { flex: 1 1 220px; height: 44px; }
.login .btn { height: 44px; }

/* formularz */
form { display: flex; flex-direction: column; gap: 20px; }
fieldset { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
legend { font-family: var(--font-display); font-weight: 700; font-size: 17px; margin-bottom: 10px; padding: 0; color: var(--accent); }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 13px; font-weight: 600; }
.hint { font-size: 12px; color: var(--muted); }
.req::after { content: " *"; color: var(--bad); }
.inline { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.price-input { max-width: 140px; }

@media (max-width: 560px) {
  fieldset { grid-template-columns: minmax(0, 1fr); }
  .ev { grid-template-columns: 62px minmax(0, 1fr); gap: 12px; }
  .date .d { font-size: 22px; }
  .logo-tile { width: 52px; height: 52px; }
  .logo-tile img { width: 46px; height: 46px; }
}
.foot { color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); padding-top: 14px; display: flex; gap: 14px; flex-wrap: wrap; justify-content: space-between; }
@media (prefers-reduced-motion: no-preference) { .btn, .chip, .tabs a { transition: background .15s, color .15s, border-color .15s; } }