/* AnnYeong – wspólne style (aplikacja i panel) */
@font-face { font-family: Poppins; font-weight: 500; font-display: swap; src: url(../fonts/poppins-500.woff) format('woff'); }
@font-face { font-family: Poppins; font-weight: 700; font-display: swap; src: url(../fonts/poppins-700.woff) format('woff'); }
@font-face { font-family: Inter; font-weight: 400; font-display: swap; src: url(../fonts/inter-400.woff) format('woff'); }
@font-face { font-family: Inter; font-weight: 500; font-display: swap; src: url(../fonts/inter-500.woff) format('woff'); }
@font-face { font-family: Inter; font-weight: 600; font-display: swap; src: url(../fonts/inter-600.woff) format('woff'); }
@font-face { font-family: Inter; font-weight: 700; font-display: swap; src: url(../fonts/inter-700.woff) format('woff'); }

:root {
  --navy: #2B4598;
  --navy-dark: #1F3478;
  --navy-soft: #EEF1FA;
  --navy-line: #C9D2F0;
  --red: #E1262F;
  --red-text: #C21D25;
  --red-soft: #FDECEC;
  --yellow: #F2D33A;
  --gold: #F2C230;
  --yellow-soft: #FFF6D6;
  --yellow-text: #5C4A00;
  --teal: #12655A;
  --teal-soft: #E4F2EF;
  --bg: #F6F5F1;
  --card: #FFFFFF;
  --line: #E4E2DA;
  --line-soft: #F0EEE7;
  --field: #FBFAF7;
  --field-line: #D6D3C9;
  --ink: #16192B;
  --ink-2: #3A3F52;
  --muted: #5A5F73;
  --radius: 20px;
  --shadow: 0 1px 2px rgba(22,25,43,.06), 0 8px 24px rgba(22,25,43,.05);
  --font-head: Poppins, system-ui, sans-serif;
  --font: Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; }
a { color: var(--navy); }
a:hover { color: var(--navy-dark); }
h1, h2, h3 { font-family: var(--font-head); font-weight: 700; margin: 0; line-height: 1.25; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* przyciski */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border: 0; border-radius: 14px;
  background: var(--navy); color: #fff; font: 700 15px var(--font-head); text-decoration: none; transition: background .15s; }
.btn:hover { background: var(--navy-dark); color: #fff; }
.btn:disabled { opacity: .55; cursor: default; }
.btn.red { background: var(--red); } .btn.red:hover { background: #C21D25; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--field-line); font-family: var(--font); font-weight: 600; }
.btn.ghost:hover { background: var(--line-soft); color: var(--ink); }
.btn.small { min-height: 40px; padding: 0 14px; font-size: 14px; border-radius: 11px; }
.btn.block { width: 100%; }
.btn.danger-ghost { background: transparent; color: var(--red-text); border: 1px solid #F1C2C4; font-family: var(--font); font-weight: 600; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--navy); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; min-height: 32px; }

/* formularze */
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field input, .field select, .field textarea { height: 48px; border: 1px solid var(--field-line); border-radius: 12px; padding: 0 14px; font: 500 16px var(--font); background: var(--field); color: var(--ink); width: 100%; }
.field textarea { height: auto; min-height: 110px; padding: 12px 14px; line-height: 1.5; resize: vertical; }
.field small { font-weight: 400; color: var(--muted); }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 14px; color: var(--ink-2); }
.check input { width: 20px; height: 20px; margin: 0; accent-color: var(--navy); flex: none; }

/* karty, etykiety */
.card { background: var(--card); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.pill { display: inline-flex; align-items: center; gap: 4px; font: 700 12px var(--font); padding: 4px 9px; border-radius: 999px; white-space: nowrap; }
.pill.red { background: var(--red-soft); color: var(--red-text); }
.pill.navy { background: var(--navy-soft); color: var(--navy); }
.pill.teal { background: var(--teal-soft); color: var(--teal); }
.pill.gray { background: var(--line-soft); color: var(--ink-2); }
.pill.yellow { background: var(--yellow-soft); color: var(--yellow-text); }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.icon { width: 22px; height: 22px; flex: none; }

/* treści z Markdown */
.md { font-size: 15px; line-height: 1.6; color: var(--ink-2); }
.md > * + * { margin-top: 10px; }
.md h1, .md h2, .md h3 { color: var(--ink); margin-top: 18px; }
.md h1 { font-size: 22px; } .md h2 { font-size: 19px; } .md h3 { font-size: 16px; }
.md ul, .md ol { padding-left: 22px; margin-bottom: 0; }
.md li + li { margin-top: 4px; }
.md blockquote { margin-left: 0; padding: 8px 14px; border-radius: 12px; background: var(--navy-soft); color: var(--ink); }
.md strong { color: var(--ink); }
.md a { font-weight: 600; word-break: break-word; }

/* komunikaty */
.toast-wrap { position: fixed; left: 0; right: 0; bottom: calc(96px + env(safe-area-inset-bottom)); display: flex; justify-content: center; pointer-events: none; z-index: 100; padding: 0 16px; }
.toast { background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 14px; font-size: 14px; font-weight: 500; box-shadow: 0 8px 24px rgba(0,0,0,.2); max-width: 480px; pointer-events: auto; animation: toastIn .2s ease-out; }
.toast.error { background: var(--red-text); }
.toast.ok { background: var(--teal); }
@keyframes toastIn { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }

.modal-back { position: fixed; inset: 0; background: rgba(22,25,43,.55); z-index: 90; display: flex; align-items: flex-end; justify-content: center; padding: 16px; }
.modal { background: var(--card); border-radius: 22px; width: 100%; max-width: 560px; max-height: calc(100vh - 32px); overflow: auto; padding: 22px; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
@media (min-width: 700px) { .modal-back { align-items: center; } }
.modal h2 { font-size: 20px; margin-bottom: 12px; }

.err-box { background: var(--red-soft); color: var(--red-text); border-radius: 12px; padding: 10px 12px; font-size: 14px; font-weight: 500; }
.spinner { width: 28px; height: 28px; border: 3px solid var(--navy-line); border-top-color: var(--navy); border-radius: 50%; animation: spin .8s linear infinite; margin: 40px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
