/* Panel właściciela ZnajdzStajnie.pl. Paleta i kroje z serwisu
   (assets/css/main.css), bez zewnętrznych zasobów: CSP dopuszcza tylko 'self'. */

@font-face {
  font-family: 'Alegreya';
  font-style: normal;
  font-weight: 700 800;
  font-display: swap;
  src: url(/fonts/alegreya-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Alegreya';
  font-style: normal;
  font-weight: 700 800;
  font-display: swap;
  src: url(/fonts/alegreya-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Karla';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/fonts/karla-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Karla';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/fonts/karla-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --forest: #1B3A2A;
  --forest-deep: #12281D;
  --moss: #2F6B47;
  --brass: #B0801F;
  --brass-ink: #7E5A12;
  --sand: #F5F0E6;
  --sand-deep: #EBE3D4;
  --border: #E4DCCD;
  --surface: #FFFFFF;
  --ink: #332E27;
  --ink-soft: #554E44;
  --stone: #6E655A;
  --danger: #A33A2B;
  --danger-bg: #FBEDEA;
  --ok-bg: #EAF3EC;
  --radius: 12px;
  --font-display: 'Alegreya', ui-serif, Georgia, serif;
  --font-sans: 'Karla', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--sand);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
}

[hidden] { display: none !important; }

h1, h2 {
  font-family: var(--font-display);
  color: var(--forest);
  line-height: 1.2;
  margin: 0 0 12px;
}
h1 { font-size: 1.75rem; font-weight: 800; }
h2 { font-size: 1.35rem; font-weight: 700; }
p { margin: 0 0 12px; }
a { color: var(--moss); }
code, .secret {
  font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: var(--forest);
  color: var(--sand);
}
.brand { display: flex; flex-direction: column; color: inherit; text-decoration: none; }
.brand-name { font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; color: #fff; }
.brand-sub { font-size: 0.8rem; color: #D9B45F; letter-spacing: 0.04em; text-transform: uppercase; }
.account { display: flex; align-items: center; gap: 10px; min-width: 0; }
.account-email { font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 45vw; }
.topbar .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, 0.4); }

.main {
  flex: 1;
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}
.card.narrow { max-width: 460px; margin-left: auto; margin-right: auto; }
.muted { color: var(--stone); font-size: 0.95rem; }

label { display: block; font-weight: 700; margin: 14px 0 6px; }
input[type='email'], input[type='tel'], input:not([type]), input[inputmode='numeric'] {
  width: 100%;
  padding: 12px 14px;
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 1px solid #CFC4B1;
  border-radius: 10px;
}
input:focus-visible, button:focus-visible, summary:focus-visible, a:focus-visible {
  outline: 3px solid var(--brass);
  outline-offset: 2px;
}
.code-input {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 1.5rem !important;
  letter-spacing: 0.4em;
  text-align: center;
  max-width: 260px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 10px 18px;
  margin-top: 16px;
  font: inherit;
  font-weight: 700;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-primary { background: var(--moss); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--forest); }
.btn-secondary { background: var(--sand); color: var(--forest); border-color: var(--border); }
.btn-secondary:hover:not(:disabled) { background: var(--sand-deep); }
.btn-danger { background: var(--danger-bg); color: var(--danger); border-color: #E9C3BC; }
.btn-ghost { background: transparent; color: var(--forest); border-color: var(--border); margin-top: 0; min-height: 36px; padding: 6px 12px; }
.btn-link {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--moss);
  text-decoration: underline;
  cursor: pointer;
}
.links { margin-top: 16px; font-size: 0.95rem; }
.row { display: flex; flex-wrap: wrap; gap: 10px; }
.row .btn { margin-top: 12px; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 400; }

.turnstile { margin-top: 16px; min-height: 65px; }

.recovery { margin-top: 20px; }
.recovery summary { cursor: pointer; color: var(--moss); font-weight: 700; }

.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  overflow-x: auto;
  border-bottom: 1px solid var(--border);
}
.tab {
  flex: 0 0 auto;
  padding: 10px 14px;
  font: inherit;
  font-weight: 700;
  color: var(--stone);
  background: none;
  border: 0;
  border-bottom: 3px solid transparent;
  cursor: pointer;
}
.tab[aria-selected='true'] { color: var(--forest); border-bottom-color: var(--brass); }

.notice {
  background: #FFF8E6;
  border: 1px solid #EBD39A;
  border-radius: 10px;
  padding: 12px 14px;
  margin-top: 12px;
}
.notice p { margin: 0; }
.status-ok { background: var(--ok-bg); border-radius: 10px; padding: 10px 14px; color: var(--forest); font-weight: 700; }

.steps { padding-left: 20px; margin: 0 0 12px; }
.steps li { margin-bottom: 6px; }
.secret { display: inline-block; padding: 2px 6px; background: var(--sand); border-radius: 6px; word-break: break-all; }
.qr { display: block; width: 240px; height: 240px; margin: 8px 0; background: #fff; border: 1px solid var(--border); border-radius: 8px; image-rendering: pixelated; }

.codes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 0;
  margin: 12px 0;
  list-style: none;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 1.05rem;
}
.codes li { background: var(--sand); border-radius: 8px; padding: 8px 10px; text-align: center; }

.sessions { list-style: none; padding: 0; margin: 0 0 8px; }
.sessions li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.sessions .meta { font-size: 0.9rem; color: var(--stone); }
.sessions .current { color: var(--moss); font-weight: 700; }

.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.kpi { background: var(--sand); border-radius: 10px; padding: 12px; }
.kpi strong { display: block; font-size: 1.5rem; color: var(--forest); }
.kpi span { font-size: 0.85rem; color: var(--stone); }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
caption { text-align: left; font-weight: 700; padding: 0 0 8px; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--stone); font-weight: 700; white-space: nowrap; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  max-width: calc(100% - 32px);
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--forest-deep);
  color: #fff;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
  z-index: 10;
}
.toast.error { background: var(--danger); }

.footer { padding: 16px; text-align: center; font-size: 0.85rem; color: var(--stone); }
.footer p { margin: 0; }

@media (max-width: 520px) {
  h1 { font-size: 1.5rem; }
  .card { padding: 16px; }
  .kpis { grid-template-columns: 1fr; }
  .codes { grid-template-columns: 1fr; }
}
