/* Panel crosello — styl spójny z landingiem crosello.io: białe tło, Inter + Space Grotesk, granatowe logo, zielone przyciski. */
:root {
  --bg: #FFFFFF; --soft: #F6F8FB; --surface: #FFFFFF; --text: #0A0E1A; --muted: #4B5873; --faint: #5B6680; --line: #E3E8F0;
  --navy: #001A4D; --green: #00875A; --mint: #00C97A; --link: #0064E4;
  --ok: #00704B; --ok-bg: #E6F7EF; --warn: #8A5A00; --warn-bg: #FFF4DE; --err: #B42318; --err-bg: #FDECEA;
  --chip: #EEF2F7; --code: #F6F8FB;
  --grad: linear-gradient(100deg, #00C97A 0%, #18D08C 55%, #3FB4C8 100%);
  --radius: 20px; --shadow: 0 1px 2px rgba(10, 14, 26, .04), 0 20px 40px -28px rgba(10, 14, 26, .18);
  --font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Space Grotesk", Inter, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--link); }
a:hover { color: var(--navy); }

/* górna belka jak menu landingu: logo, menu, Dokumentacja API */
header.top { position: sticky; top: 0; z-index: 20; padding: 0 max(24px, env(safe-area-inset-right, 0px)) 0 max(24px, env(safe-area-inset-left, 0px)); background: #FFFFFF; border-bottom: 1px solid rgba(20, 33, 61, .08); font-family: var(--font); line-height: normal; }
/* te same wymiary co belka landingu (.crs-menu / .crs-wrap): szerokość do 1480 px, wysokość 68 px, logo 132×44 */
header.top .top-in { box-sizing: border-box; max-width: 1480px; margin: 0 auto; min-height: 68px; display: flex; align-items: center; gap: 24px; }
header.top .brand { display: inline-flex; flex: 0 0 auto; }
header.top .brand img { display: block; width: 132px; height: 44px; margin: -4px 0; }
header.top .menu { margin-left: auto; display: flex; align-items: center; gap: 4px; }
header.top .menu a, header.top .menu .linkbtn { min-height: 0; line-height: normal; padding: 8px 14px; border: 0; border-radius: 9999px; background: transparent; color: #14213D; font-size: 15px; font-weight: 500; text-decoration: none; }
header.top #nav-login, header.top #logout { min-width: 107px; justify-content: center; text-align: center; } /* „Logowanie” i „Wyloguj” w tym samym miejscu */
header.top .menu a:hover, header.top .menu .linkbtn:hover { background: #F1F4F9; color: var(--navy); }
header.top .cta { min-height: 0; line-height: normal; border: 0; padding: 8px 16px; font-size: 13px; }
header.top .burger { display: none; width: 40px; height: 40px; min-height: 0; flex: 0 0 auto; padding: 0; border: 1px solid #DDE3EC; border-radius: 9999px; background: #FFFFFF; color: var(--navy); }
header.top .burger svg { width: 18px; height: 18px; display: block; }
header.top .burger .x { display: none; }
header.top.open .burger .x { display: block; } header.top.open .burger .b { display: none; }
@media (max-width: 760px) {
  header.top .top-in { gap: 10px; }
  header.top .cta { margin-left: auto; }
  header.top .burger { display: inline-flex; }
  header.top .menu { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 2px; margin: 0; padding: 8px max(16px, env(safe-area-inset-left, 0px)) 14px; background: #FFFFFF; border-bottom: 1px solid rgba(20, 33, 61, .08); box-shadow: 0 18px 30px -18px rgba(10, 14, 26, .35); }
  header.top.open .menu { display: flex; }
  header.top .menu a, header.top .menu .linkbtn { padding: 12px 10px; border-radius: 10px; font-size: 16px; text-align: left; justify-content: flex-start; }
}

main { max-width: 1100px; margin: 0 auto; padding: 40px 24px 80px; }
.page-head { margin: 0 0 28px; }
.page-head h1 { margin: 0 0 6px; font-family: var(--display); font-size: clamp(28px, 3.4vw, 38px); font-weight: 700; line-height: 1.15; letter-spacing: -.02em; color: var(--text); }
.page-head p { margin: 0; color: var(--muted); font-size: 16px; max-width: 760px; }
.eyebrow { display: inline-block; margin: 0 0 10px; font-size: 12.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--green); }

section.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px 28px; margin-bottom: 20px; }
section.card h2 { margin: 0 0 6px; font-family: var(--display); font-size: 21px; font-weight: 700; letter-spacing: -.015em; color: var(--text); }
section.card h3 { font-family: var(--display); font-weight: 600; letter-spacing: -.01em; }
section.card p.sub, p.sub { margin: 0 0 18px; color: var(--muted); font-size: 14.5px; }

/* logowanie i rejestracja */
.auth-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: 48px; align-items: center; max-width: 1000px; margin: 24px auto 0; }
.auth-intro h1 { margin: 0 0 12px; font-family: var(--display); font-size: clamp(30px, 4vw, 44px); font-weight: 700; line-height: 1.12; letter-spacing: -.02em; }
.auth-intro h1 em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
.auth-intro p { margin: 0 0 18px; color: var(--muted); font-size: 16px; }
.auth-intro ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.auth-intro li { display: flex; gap: 10px; align-items: baseline; color: var(--text); font-size: 15px; }
.auth-intro li::before { content: ""; flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 3px rgba(0, 201, 122, .18); transform: translateY(-2px); }
.auth { margin: 0; }
@media (max-width: 860px) { .auth-wrap { grid-template-columns: minmax(0, 1fr); gap: 28px; margin-top: 0; } }

.tabs { display: flex; gap: 4px; margin-bottom: 18px; padding: 4px; border-radius: 9999px; background: var(--soft); border: 1px solid var(--line); }
.tabs button { flex: 1; justify-content: center; border: 0; background: transparent; color: var(--muted); border-radius: 9999px; padding: 9px 14px; font-weight: 600; box-shadow: none; }
.tabs button.primary { background: var(--surface); color: var(--text); background-image: none; box-shadow: 0 1px 2px rgba(10, 14, 26, .08), 0 0 0 1px var(--line); }

label { display: block; font-size: 13px; font-weight: 500; color: var(--muted); margin: 12px 0 6px; }
input[type=text], input[type=email], input[type=password], input[type=file], select, textarea { width: 100%; min-height: 46px; padding: 11px 14px; border: 1px solid #D5DCE7; border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; font-size: 15px; outline: none; transition: border-color .18s, box-shadow .18s; }
input[type=file] { height: 46px; padding: 6px 8px; background: var(--soft); font-size: 14px; }
input::file-selector-button { margin-right: 12px; padding: 5px 14px; border: 1px solid var(--line); border-radius: 9999px; background: var(--surface); color: var(--text); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
input::placeholder, textarea::placeholder { color: #8A94AA; }
input:hover, select:hover, textarea:hover { border-color: #B9C3D3; }
input:focus, select:focus, textarea:focus { border-color: var(--mint); box-shadow: 0 0 0 3px rgba(0, 201, 122, .18); }
textarea { font-family: var(--mono); font-size: 13px; min-height: 90px; }

button, .btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 8px 18px; border-radius: 9999px; border: 1px solid #D5DCE7; background: var(--surface); color: var(--text); font: inherit; font-size: 14.5px; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; transition: filter .18s, transform .18s, background-color .18s, border-color .18s; }
button:hover, .btn:hover { border-color: #B9C3D3; background: var(--soft); color: var(--text); }
button:focus-visible, .btn:focus-visible, a:focus-visible { outline: 3px solid #34E5A0; outline-offset: 3px; }
button.primary, .btn.primary { background: var(--grad); border-color: transparent; color: #06231A; font-weight: 700; }
button.primary:hover, .btn.primary:hover { filter: brightness(1.05); transform: translateY(-1px); background: var(--grad); border-color: transparent; }
form > p > button.primary, #auth-submit { min-height: 48px; padding: 12px 28px; font-size: 16px; width: 100%; }
button.danger { color: var(--err); }
button.danger:hover { border-color: #F2B8B5; background: var(--err-bg); color: var(--err); }
button:disabled { opacity: .55; cursor: default; transform: none !important; filter: none !important; }

.row { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end; }
.row > * { flex: 1 1 200px; }
.row > .fit { flex: 0 0 auto; }
.row > .fit button { min-height: 46px; }

table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #FAFBFD; }
th { white-space: nowrap; color: var(--faint); font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; border-bottom-color: #D5DCE7; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td a { font-weight: 600; text-decoration: none; }
td a:hover { text-decoration: underline; }
.table-wrap { overflow-x: auto; }
td.actions { gap: 6px; }
td.actions button, td.actions .btn, td > button { min-height: 32px; padding: 5px 12px; font-size: 13px; }

.badge { display: inline-block; padding: 3px 9px; border-radius: 6px; font-size: 12px; font-weight: 700; background: var(--chip); color: #2A3550; }
.badge.ready { background: var(--ok-bg); color: var(--ok); }
.badge.processing, .badge.queued { background: var(--warn-bg); color: var(--warn); }
.badge.error { background: var(--err-bg); color: var(--err); }

.msg { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: var(--soft); border: 1px solid var(--line); font-size: 14px; white-space: pre-wrap; }
.msg.err { color: var(--err); background: var(--err-bg); border-color: #F6C9C5; }
.msg.ok { color: var(--ok); background: var(--ok-bg); border-color: #BFE8D4; }
.hidden { display: none !important; }

code, pre { font-family: var(--mono); font-size: 13px; background: var(--code); border-radius: 8px; }
code { padding: 1px 6px; border: 1px solid var(--line); }
pre { padding: 14px 16px; overflow-x: auto; margin: 8px 0; border: 1px solid var(--line); color: #1D2742; }

.lists { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-top: 14px; }
.lists > * { padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--soft); }
.lists ol { margin: 6px 0 0; padding-left: 20px; }
.lists li { margin-bottom: 8px; }
.lists .meta { color: var(--faint); font-size: 12px; }
.key { font-family: var(--mono); word-break: break-all; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.mapgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 4px 14px; }
details { margin-top: 14px; }
details summary { cursor: pointer; color: var(--muted); font-size: 14px; font-weight: 500; }
ul, ol { padding-left: 22px; }
li { margin-bottom: 4px; }

footer.foot { border-top: 1px solid var(--line); background: var(--soft); color: var(--faint); font-size: 13px; }
footer.foot .in { max-width: 1100px; margin: 0 auto; padding: 22px 24px; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
footer.foot a { color: var(--muted); text-decoration: none; }
footer.foot a:hover { color: var(--navy); }

@media (max-width: 640px) {
  main { padding: 28px 16px 64px; }
  section.card { padding: 20px 18px; border-radius: 16px; }
  #feeds th:nth-child(4), #feeds td:nth-child(4), #keys th:nth-child(4), #keys td:nth-child(4) { display: none; }
  .row > .fit, .row > .fit button { width: 100%; }
}
