/*
 * resrv.pl – hand-written stylesheet (no framework), mobile first.
 * resrv.pl has its own brand (dark ink + teal); the restaurants' pages use their own colours, set in their panel.
 * Light grey page, white rounded cards with a soft shadow, numbered steps in circles, Bootstrap-like form controls.
 * Colours and sizes live in the tokens below.
 */

:root {
    --primary: #0f766e;
    --primary-hover: #115e59;
    --ink: #0b1324;
    --on-ink: #e7ecf3;
    --on-ink-muted: #9aa8bc;
    --brand-light: #5eead4;
    --on-primary: #ffffff;
    --primary-soft: color-mix(in srgb, var(--primary) 8%, #ffffff);
    --primary-tint: color-mix(in srgb, var(--primary) 7%, #ffffff);
    --primary-line: color-mix(in srgb, var(--primary) 15%, #ffffff);
    --focus-ring: color-mix(in srgb, var(--primary) 25%, transparent);

    --text: #212529;
    --muted: #6c757d;
    --border: #dee2e6;
    --input-border: #ced4da;
    --page: #f6f7f9;
    --surface: #ffffff;

    --success: #146c43;
    --success-bg: #d1e7dd;
    --error: #b02a37;
    --error-bg: #f8d7da;
    --warning: #997404;
    --warning-bg: #fff3cd;
    --info: #055160;
    --info-bg: #cff4fc;

    --radius-card: 1rem;
    --radius: .5rem;
    --radius-sm: .375rem;
    --shadow-card: 0 1px 2px rgba(0, 0, 0, .04), 0 4px 16px rgba(0, 0, 0, .05);
    --shadow-bar: 0 1px 10px rgba(0, 0, 0, .06);
    --container: 1140px;
    --gutter: 16px;
    --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif;
    --font-mono: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text);
    background: var(--page);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
body > main { flex: 1 0 auto; }

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5rem; font-weight: 700; }
h1 { font-size: calc(1.4rem + 1vw); }
@media (min-width: 1200px) { h1 { font-size: 2.25rem; } }
h2, .h2 { font-size: calc(1.25rem + .6vw); }
@media (min-width: 1200px) { h2, .h2 { font-size: 1.75rem; } }
h3, .h3 { font-size: 1.1rem; font-weight: 600; }
p { margin: 0 0 1rem; }
a { color: var(--primary); }
a:hover { color: var(--primary-hover); }
img { max-width: 100%; height: auto; }
:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }

.visually-hidden {
    position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 760px; }
.section { padding: 48px 0; }
.section-sm { padding: 24px 0 48px; }
.muted { color: var(--muted); }
.lead { font-size: 1.1rem; }
.center { text-align: center; }
.small { font-size: .875rem; }
.strong { font-weight: 600; }
.nowrap { white-space: nowrap; }
.pre { white-space: pre-line; margin: 0; }
.mt { margin-top: 16px; }
.icon { width: 1rem; height: 1rem; flex-shrink: 0; vertical-align: -.125em; }
.icon-lg { width: 1.5rem; height: 1.5rem; }
code, .mono { font-family: var(--font-mono); font-size: .875em; }
code { color: #d63384; }

/* ---- Buttons ------------------------------------------------------------------------------------------------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .45em;
    padding: .5rem 1rem; border-radius: var(--radius); border: 1px solid transparent;
    font: inherit; font-weight: 500; line-height: 1.5; text-decoration: none; cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.btn-primary:hover, .btn-primary.active { background: var(--primary-hover); border-color: var(--primary-hover); color: var(--on-primary); }
.btn-outline { background: transparent; border-color: var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: var(--on-primary); }
.btn-ghost { background: var(--surface); border-color: var(--border); color: var(--text); }
.btn-ghost:hover { background: #f1f3f5; color: var(--text); }
.btn-danger { background: var(--error); border-color: var(--error); color: #fff; }
.btn-danger:hover { background: #8f1f2a; color: #fff; }
.btn-sm { padding: .3rem .75rem; font-size: .875rem; }
.btn-lg { padding: .7rem 1.4rem; font-size: 1.1rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.inline-form { display: inline; margin: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.actions-center { justify-content: center; }

/* ---- Top bar (public site and panel) ------------------------------------------------------------------------- */
.site-header {
    position: sticky; top: 0; z-index: 20;
    background: var(--ink); color: var(--on-primary); box-shadow: var(--shadow-bar);
    border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.site-header-inner {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
    gap: .5rem 1rem; min-height: 4.25rem; padding-top: .6rem; padding-bottom: .6rem;
}

.brand {
    display: inline-flex; align-items: center; gap: .6rem;
    color: inherit; text-decoration: none; font-weight: 700; font-size: 1.3rem; letter-spacing: .01em;
}
.brand:hover { color: inherit; }
.brand-mark {
    display: inline-grid; place-items: center; width: 2.1rem; height: 2.1rem; border-radius: .6rem;
    background: var(--primary); color: #fff; font-size: 1.1rem; line-height: 1;
}
.brand-tld { color: var(--brand-light); font-weight: 600; }
.brand-badge {
    font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em;
    padding: .15em .55em; border-radius: 999px;
    background: color-mix(in srgb, var(--on-primary) 18%, transparent);
}
.brand-center { justify-content: center; width: 100%; margin-bottom: 24px; color: var(--text); }
.brand-center .brand-mark { background: var(--primary); color: var(--on-primary); }
.brand-center .brand-tld { color: var(--primary); opacity: 1; }

.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem; }
.site-nav > a:not(.btn), .site-nav > .nav-cta {
    display: inline-flex; align-items: center; gap: .45rem;
    padding: .45rem .8rem; border-radius: 999px; color: var(--on-primary);
    font-size: .925rem; font-weight: 500; text-decoration: none; white-space: nowrap;
    opacity: .9; transition: background-color .15s ease;
}
.site-nav > a:not(.btn):hover, .site-nav > a:not(.btn):focus-visible {
    background: color-mix(in srgb, var(--on-primary) 10%, transparent); color: var(--on-primary); opacity: 1;
}
.site-nav > a.active:not(.btn) {
    background: color-mix(in srgb, var(--on-primary) 16%, transparent); font-weight: 600; opacity: 1;
}
/* "Chcę przetestować" in the bar: the brand button. */
.site-nav > .nav-cta { margin-left: .5rem; opacity: 1; background: var(--primary); font-weight: 600; }
.site-nav > a.nav-cta:hover, .site-nav > a.nav-cta:focus-visible, .site-nav > a.nav-cta.active {
    background: var(--primary-hover); color: #fff;
}
.site-nav .btn-ghost {
    background: transparent; color: var(--on-primary);
    border-color: color-mix(in srgb, var(--on-primary) 45%, transparent); border-radius: 999px;
}
.site-nav .btn-ghost:hover { background: color-mix(in srgb, var(--on-primary) 12%, transparent); color: var(--on-primary); }
.nav-user { font-size: .875rem; opacity: .8; padding: 0 .5rem; }
.site-header .badge-count { background: #ffc107; color: #212529; }

.nav-toggle {
    display: none; width: 44px; height: 44px; padding: 0; position: relative; cursor: pointer;
    border: 1px solid color-mix(in srgb, var(--on-primary) 40%, transparent); border-radius: var(--radius);
    background: transparent;
}
.nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after {
    position: absolute; left: 11px; width: 20px; height: 2px; background: var(--on-primary); content: "";
}
.nav-toggle-bar { top: 50%; margin-top: -1px; }
.nav-toggle-bar::before { left: 0; top: -6px; }
.nav-toggle-bar::after { left: 0; top: 6px; }

/* Phones: collapsible menu. Without JavaScript (no .js on <html>) it simply stays open. */
@media (max-width: 799px) {
    .js .nav-toggle { display: inline-block; }
    .site-nav { width: 100%; flex-direction: column; align-items: stretch; gap: .25rem; padding-bottom: .5rem; }
    .js .site-nav { display: none; }
    .js .site-nav.open { display: flex; }
    .site-nav > a:not(.btn), .site-nav > .nav-cta { justify-content: flex-start; border-radius: var(--radius); }
    .site-nav > .nav-cta { margin: .25rem 0 0; justify-content: center; }
    .site-nav > .inline-form .btn { width: 100%; }
    .nav-user { padding: .5rem .8rem 0; }
}

/* ---- Footer -------------------------------------------------------------------------------------------------- */
.site-footer {
    background: var(--surface); border-top: 1px solid var(--border);
    color: var(--muted); font-size: .9rem; padding: 32px 0 20px; margin-top: auto;
}
.site-footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; }
.brand-footer { color: var(--text); font-size: 1.1rem; margin-bottom: .25rem; }
.brand-footer .brand-tld { color: var(--primary); opacity: 1; }
.footer-heading { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; margin-bottom: .5rem; }
.footer-nav { display: flex; flex-direction: column; gap: .35rem; }
.footer-nav a { color: inherit; text-decoration: none; }
.footer-nav a:hover { color: var(--primary); text-decoration: underline; }
.footer-bottom { border-top: 1px solid var(--border); margin-top: 24px; padding-top: 16px; font-size: .85rem; }

/* ---- Hero ---------------------------------------------------------------------------------------------------- */
.hero {
    background:
        radial-gradient(60rem 30rem at 85% 0%, rgba(20, 184, 166, .22), transparent 60%),
        radial-gradient(40rem 24rem at 0% 100%, rgba(59, 130, 246, .12), transparent 60%),
        var(--ink);
    color: var(--on-ink); padding: 56px 0 72px; overflow: hidden;
}
.hero-inner { display: grid; gap: 48px; align-items: center; }
@media (min-width: 1000px) { .hero-inner { grid-template-columns: .9fr 1.25fr; } }
.hero h1 {
    color: #fff; max-width: 16ch; margin-bottom: 1rem; letter-spacing: -.02em;
    font-size: clamp(2rem, 1.4rem + 2.6vw, 3.1rem); line-height: 1.1;
}
.hero h1 em { font-style: normal; color: var(--brand-light); }
.hero .lead { color: var(--on-ink); opacity: .85; max-width: 38rem; }
.hero .btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .3); }
.hero .btn-ghost:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.eyebrow {
    display: inline-flex; align-items: center; gap: .4rem; margin-bottom: 1rem;
    padding: .3rem .75rem; border-radius: 999px; font-size: .8rem; font-weight: 600;
    background: var(--primary-soft); color: var(--primary);
}
.hero .eyebrow { background: rgba(94, 234, 212, .12); color: var(--brand-light); }
.hint { display: flex; align-items: center; gap: .4rem; font-size: .9rem; margin-top: 14px; }
.hint .icon { color: var(--success); }
.hero .hint { color: var(--on-ink-muted); }
.hero .hint .icon { color: var(--brand-light); }

/* Device frames around the screenshots. */
.browser {
    border-radius: 12px; overflow: hidden; background: var(--surface);
    box-shadow: 0 0 0 1px rgba(15, 23, 42, .08), 0 24px 60px -12px rgba(2, 6, 23, .35);
}
.browser-bar { display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; background: #eceff3; }
.browser-bar span { width: 10px; height: 10px; border-radius: 50%; background: #cfd5dd; }
.browser-bar span:nth-child(1) { background: #f87171; }
.browser-bar span:nth-child(2) { background: #fbbf24; }
.browser-bar span:nth-child(3) { background: #34d399; }
.browser img, .phone img { display: block; width: 100%; height: auto; }
/* A phone: dark body with a subtle edge highlight, camera island and side buttons. Screens keep the proportion
   of a real phone (390 x 844), so nothing is cut. */
.phone {
    position: relative; border-radius: 13.5% / 6.4%; padding: 3.4%;
    background: linear-gradient(150deg, #3a4150 0%, #161b26 22%, #0b0f17 60%, #262c38 100%);
    box-shadow:
        inset 0 0 0 1.5px rgba(255, 255, 255, .14),
        inset 0 0 0 4px #05070b,
        0 2px 4px rgba(2, 6, 23, .25),
        0 30px 60px -18px rgba(2, 6, 23, .55);
}
.phone::before {
    content: ""; position: absolute; z-index: 2; top: 3%; left: 50%; transform: translateX(-50%);
    width: 29%; height: 3.1%; border-radius: 999px; background: #05070b;
}
.phone::after {
    content: ""; position: absolute; right: -1.6%; top: 22%; width: 1.6%; height: 11%;
    border-radius: 0 3px 3px 0; background: #2a303c;
}
.phone img { border-radius: 10.5% / 4.9%; aspect-ratio: 390 / 844; object-fit: cover; object-position: top; }

/* Hero: the panel in a browser. */
.hero-visual { position: relative; }
@media (min-width: 1000px) {
    /* The panel runs past the container edge, so it can be big without squeezing the text. */
    .hero-visual { margin-right: calc(-1 * min(12vw, 160px)); }
}
.page-hero { padding: 32px 0 28px; }
.page-hero h1 { max-width: none; margin-bottom: .25rem; }

/* ---- Sections and cards -------------------------------------------------------------------------------------- */
.section-head { max-width: 44rem; margin-bottom: 24px; }
.section-head h2 { margin-bottom: .4rem; }
.section-lead { color: var(--muted); font-size: 1.05rem; margin: 0; }
section[id] { scroll-margin-top: 80px; }

.card {
    background: var(--surface); border-radius: var(--radius-card); padding: 24px;
    box-shadow: var(--shadow-card);
}
.card > :last-child { margin-bottom: 0; }
.card + .card { margin-top: 20px; }
.card-danger { box-shadow: 0 0 0 1px var(--error-bg), var(--shadow-card); }

.grid { display: grid; gap: 20px; }
@media (min-width: 640px) { .grid-2, .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.grid-2 { margin-top: 20px; }

.tile, .feature {
    background: var(--surface); border-radius: var(--radius-card); padding: 22px; box-shadow: var(--shadow-card);
}
.tile h3, .feature h3 { margin-bottom: .4rem; }
.tile p, .feature p { margin: 0; color: var(--muted); }
.feature-icon {
    display: inline-grid; place-items: center; width: 2.5rem; height: 2.5rem; margin-bottom: .75rem;
    border-radius: .75rem; background: var(--primary-soft); color: var(--primary);
}
.feature-icon .icon { width: 1.25rem; height: 1.25rem; }

/* Numbered circle, as in the steps of the guest reservation form. */
.step-no {
    display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
    width: 1.75rem; height: 1.75rem; border-radius: 50%;
    background: var(--primary); color: var(--on-primary); font-size: .9rem; font-weight: 600;
}
.steps { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 16px; }
@media (min-width: 640px) { .steps { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); } }
.steps li { background: var(--surface); border-radius: var(--radius-card); padding: 20px; box-shadow: var(--shadow-card); }
.steps h3 { display: flex; flex-direction: column; align-items: flex-start; gap: .6rem; font-size: 1.05rem; margin-bottom: .5rem; }
.steps p { margin: 0; color: var(--muted); font-size: .95rem; }

.screenshot { margin: 0; }

.feature-rows { display: grid; gap: 80px; }
.feature-row { display: grid; gap: 32px; align-items: center; }
@media (min-width: 900px) {
    .feature-row { grid-template-columns: 1fr 1.3fr; gap: 64px; }
    .feature-row.reverse { grid-template-columns: 1.3fr 1fr; }
    .feature-row.reverse > :first-child { order: 2; }
}
.feature-row h3 {
    font-size: clamp(1.4rem, 1.1rem + .9vw, 1.85rem); font-weight: 700; letter-spacing: -.01em; margin-bottom: .6rem;
}
.feature-row p { color: var(--muted); font-size: 1.05rem; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.checks li { display: flex; gap: .6rem; align-items: flex-start; }
.checks .icon { color: var(--primary); margin-top: .25rem; }
.shot-card {
    border-radius: var(--radius-card); overflow: hidden; background: var(--surface);
    box-shadow: 0 0 0 1px rgba(15, 23, 42, .06), 0 18px 44px -14px rgba(2, 6, 23, .25);
}
.shot-card img { display: block; width: 100%; height: auto; }
.visual-narrow { max-width: 440px; justify-self: center; width: 100%; }
.visual-phone { max-width: 260px; justify-self: center; width: 100%; }

/* Three restaurants, three steps of one reservation. */
.feature-wide h3 { font-size: clamp(1.4rem, 1.1rem + .9vw, 1.85rem); font-weight: 700; letter-spacing: -.01em; }
.feature-wide .section-head p:last-child { color: var(--muted); font-size: 1.05rem; }
.phone-story {
    list-style: none; margin: 8px auto 28px; padding: 0; max-width: 940px;
    display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(12px, 4vw, 48px); align-items: start;
}
.phone-story li { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.phone-story li:nth-child(2) { margin-top: 36px; }
.phone-story .phone { width: 100%; max-width: 270px; }
.phone-story p { margin: 0; display: flex; align-items: center; gap: .55rem; font-weight: 600; text-align: left; }
.phone-story .step-no { width: 1.6rem; height: 1.6rem; font-size: .8rem; }
@media (max-width: 639px) {
    .phone-story { gap: 10px; }
    .phone-story li:nth-child(2) { margin-top: 16px; }
    .phone-story p { flex-direction: column; text-align: center; font-size: .8rem; gap: .3rem; }
}
.checks-inline { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem 2rem; }

.screenshot img {
    display: block; width: 100%; border-radius: .75rem; background: var(--surface);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .06), 0 10px 30px rgba(0, 0, 0, .12);
}
.screenshot figcaption { margin-top: 10px; font-size: .9rem; color: var(--muted); text-align: center; }

.faq-layout { display: grid; gap: 32px; }
@media (min-width: 900px) { .faq-layout { grid-template-columns: 1fr 1.7fr; gap: 64px; align-items: start; } }
@media (min-width: 900px) { .faq-intro { position: sticky; top: 96px; } }
.faq-intro .section-lead { margin-bottom: 20px; }
.faq-contact { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.faq-contact a:not(.btn) {
    display: inline-flex; align-items: center; gap: .6rem; font-weight: 600; text-decoration: none; color: var(--text);
}
.faq-contact a:not(.btn) .icon {
    width: 2.2rem; height: 2.2rem; padding: .55rem; border-radius: .7rem; background: var(--primary-soft); color: var(--primary);
}
.faq-contact a:not(.btn):hover { color: var(--primary); }
.faq { display: grid; gap: 10px; }
.faq details {
    background: var(--page); border-radius: 14px; border: 1px solid transparent;
    transition: background-color .15s ease, border-color .15s ease;
}
.faq details[open] { background: var(--surface); border-color: var(--border); box-shadow: var(--shadow-card); }
.faq summary {
    cursor: pointer; list-style: none; position: relative; padding: 18px 56px 18px 22px; font-weight: 600; font-size: 1.02rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
    content: ""; position: absolute; right: 22px; top: 50%; width: 9px; height: 9px; margin-top: -7px;
    border-right: 2px solid var(--primary); border-bottom: 2px solid var(--primary); transform: rotate(45deg);
    transition: transform .2s ease, margin-top .2s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq summary:hover { color: var(--primary); }
.faq details p { color: var(--muted); margin: -4px 22px 20px; line-height: 1.65; }

.cta { text-align: center; }
.cta .card {
    padding: 44px 24px; color: var(--on-ink);
    background: radial-gradient(30rem 16rem at 100% 0%, rgba(20, 184, 166, .25), transparent 60%), var(--ink);
}
.cta .card h2 { color: #fff; }
.cta .card .lead { opacity: .9; }

.cta .contact { margin: 20px 0 0; opacity: .9; }
.cta .contact a { color: var(--brand-light); }

/* Text edited in the panel (documents, pricing). */
.prose h2 { font-size: 1.3rem; margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; }
.prose > :first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.4em; margin: 0 0 1em; }
.prose li { margin-bottom: .3em; }
.doc-meta { margin-bottom: 1.5rem; }

/* ---- Alerts, badges ------------------------------------------------------------------------------------------ */
.alert { padding: .75rem 1rem; border-radius: var(--radius); margin-bottom: 16px; border: 1px solid transparent; }
.alert-success { background: var(--success-bg); color: var(--success); border-color: #a3cfbb; }
.alert-error { background: var(--error-bg); color: var(--error); border-color: #f1aeb5; }
.alert-warning { background: var(--warning-bg); color: var(--warning); border-color: #ffe69c; }
.alert-info { background: var(--info-bg); color: var(--info); border-color: #9eeaf9; }
.badge {
    display: inline-block; font-size: .75rem; font-weight: 600; padding: .2em .6em; border-radius: 999px;
    background: var(--primary-soft); color: var(--primary);
}
.badge-count { background: var(--primary); color: var(--on-primary); margin-left: 4px; }
.badge-warning { background: var(--warning-bg); color: var(--warning); }

/* ---- Forms (Bootstrap-like controls) ------------------------------------------------------------------------- */
.form .field { margin-bottom: 16px; }
.form label { display: block; font-weight: 500; margin-bottom: .4rem; }
.form input[type="text"], .form input[type="email"], .form input[type="password"], .form input[type="tel"],
.form input[type="number"], .form input[type="date"], .form input[type="url"], .form input[type="search"],
.form select, .form textarea {
    display: block; width: 100%; padding: .5rem .75rem; font: inherit; color: inherit; line-height: 1.5;
    background: var(--surface); border: 1px solid var(--input-border); border-radius: var(--radius);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.form textarea { min-height: 120px; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus {
    border-color: color-mix(in srgb, var(--primary) 50%, #ffffff); outline: 0; box-shadow: 0 0 0 .25rem var(--focus-ring);
}
.form ::placeholder { color: #9aa0a6; }
.form .field-error { color: var(--error); font-size: .875rem; margin-top: 4px; }
.form .is-invalid { border-color: var(--error) !important; }
.form .is-invalid:focus { box-shadow: 0 0 0 .25rem color-mix(in srgb, var(--error) 25%, transparent) !important; }
.form-row { display: grid; gap: 0 16px; }
@media (min-width: 640px) { .form-row { grid-template-columns: 1fr 1fr; } }
.field-narrow { max-width: 240px; }
.label-optional { font-weight: 400; }
.checkbox-field { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; align-items: start; }
.checkbox-field input { width: 1.1rem; height: 1.1rem; margin: .2rem 0 0; accent-color: var(--primary); }
.checkbox-field label { font-weight: 400; margin: 0; }
.checkbox-field .field-error { grid-column: 2; }
.radio-group { border: 0; padding: 0; margin: 0 0 16px; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.radio-group legend { font-weight: 500; margin-bottom: 6px; padding: 0; }
.radio { display: inline-flex !important; align-items: center; gap: 6px; font-weight: 400 !important; }
.radio input { accent-color: var(--primary); width: 18px; height: 18px; margin: 0; }
/* Honeypot: off-screen rather than display:none, which some bots detect. */
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

.form-card-title { display: flex; align-items: center; gap: .6rem; font-size: 1.1rem; font-weight: 600; margin-bottom: 1rem; }

/* ---- Login, thank-you, error pages --------------------------------------------------------------------------- */
.auth { padding-top: 56px; padding-bottom: 56px; max-width: 440px; }
.success-mark {
    width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 50%; display: grid; place-items: center;
    background: var(--success-bg); color: var(--success);
}
.success-mark .icon { width: 2rem; height: 2rem; }
.error-page { text-align: center; }
.error-code { font-size: 4rem; font-weight: 800; color: var(--primary); line-height: 1; margin-bottom: .2em; }

/* ---- Panel ------------------------------------------------------------------------------------------------- */
.subtitle { margin: -.3em 0 0; }
.breadcrumb { margin-bottom: 4px; font-size: .9rem; }
.breadcrumb a { color: var(--muted); }
.title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-bottom: 16px; }
.title-row h1 { margin: 0; }
.title-row-end, .title-row > .btn { margin-left: auto; }
ul.plain { list-style: none; padding: 0; margin: 0; }
ul.plain li { padding: 4px 0; }

.layout-sidebar { display: grid; gap: 20px; align-items: start; }
.layout-sidebar aside { display: grid; gap: 20px; }
.layout-sidebar aside .card + .card { margin-top: 0; }
@media (min-width: 960px) { .layout-sidebar { grid-template-columns: 1fr 320px; } }
form > section.card { margin-bottom: 20px; }
form > section.card + section.card { margin-top: 0; }
.narrow-card { max-width: 640px; }

.status {
    display: inline-block; font-size: .8rem; font-weight: 600; padding: .2em .7em; border-radius: 999px;
    background: #e9ecef; color: #495057; white-space: nowrap;
}
.status-TRIAL, .status-IN_CONTACT { background: var(--primary-soft); color: var(--primary); }
.status-PAID { background: var(--success-bg); color: var(--success); }
.status-SUSPENDED { background: var(--warning-bg); color: var(--warning); }
.status-CANCELLED, .status-REJECTED { background: #e9ecef; color: var(--muted); }
.status-NEW { background: #ffc107; color: #212529; }
.status-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; padding: 0; }
.status-dot.status-TRIAL { background: var(--primary); }
.status-dot.status-PAID { background: #198754; }
.status-dot.status-SUSPENDED { background: #ffc107; }
.status-dot.status-CANCELLED { background: #adb5bd; }

.stats { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 800px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat {
    display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; text-decoration: none; color: var(--text);
    background: var(--surface); border-radius: var(--radius-card); box-shadow: var(--shadow-card);
    transition: box-shadow .15s ease;
}
.stat:hover { color: var(--text); box-shadow: 0 0 0 2px var(--primary-line), var(--shadow-card); }
.stat-value { font-size: 1.9rem; font-weight: 700; line-height: 1; }
.stat-label { color: var(--muted); font-size: .9rem; display: flex; align-items: center; }

ul.rows { list-style: none; padding: 0; margin: 0 0 12px; }
ul.rows li { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--border); }
ul.rows li:last-child { border-bottom: 0; }
.row-end { margin-left: auto; display: inline-flex; gap: 8px; align-items: center; font-size: .9rem; }

.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.tabs a {
    display: inline-flex; align-items: center; gap: .3rem;
    padding: .4rem .9rem; border-radius: 999px; text-decoration: none; color: var(--text);
    background: var(--surface); box-shadow: 0 0 0 1px var(--border); font-size: .925rem;
}
.tabs a:hover { color: var(--primary); }
.tabs a.active { background: var(--primary); color: var(--on-primary); box-shadow: none; }
.tabs a.active .badge:not(.badge-count) { background: color-mix(in srgb, var(--on-primary) 20%, transparent); color: var(--on-primary); }

.table-wrap { overflow-x: auto; background: var(--surface); border-radius: var(--radius-card); box-shadow: var(--shadow-card); }
.table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.table th, .table td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table th { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: #fafbfc; }
.row-highlight td:first-child { box-shadow: inset 3px 0 0 var(--primary); }
/* Phones: table rows become stacked cards. */
@media (max-width: 639px) {
    .table thead { display: none; }
    .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
    .table tr { padding: 10px 0; border-bottom: 1px solid var(--border); }
    .table td { border: 0; padding: 4px 16px; }
}
.pager { display: flex; gap: 12px; align-items: center; justify-content: center; margin-top: 16px; }

.filters {
    display: grid; gap: 0 16px; align-items: end; background: var(--surface); border-radius: var(--radius-card);
    box-shadow: var(--shadow-card); padding: 16px 16px 0; margin-bottom: 16px;
}
@media (min-width: 800px) { .filters { grid-template-columns: 2fr 1fr 1fr 1.4fr auto; } }
.filters-actions { display: flex; gap: 8px; margin-bottom: 16px; }

.list { display: grid; gap: 12px; }
.list-item {
    display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; align-items: center;
    background: var(--surface); border-radius: var(--radius-card); box-shadow: var(--shadow-card); padding: 18px 22px;
}
.list-item h2, .list-item p { margin: 0; }

dl.details { display: grid; grid-template-columns: minmax(120px, 34%) 1fr; gap: 8px 16px; margin: 0; }
dl.details dt { color: var(--muted); }
dl.details dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 479px) { dl.details { grid-template-columns: 1fr; gap: 2px; } dl.details dd { margin-bottom: 8px; } }

ol.history { list-style: none; padding: 0; margin: 0 0 12px; }
ol.history > li { padding: 10px 0; border-bottom: 1px solid var(--border); }
ol.history > li:first-child { padding-top: 0; }
.history-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-bottom: 4px; }
.history .old { text-decoration: line-through; color: var(--muted); }

.mail-preview {
    white-space: pre-wrap; font-family: var(--font); font-size: .95rem; background: var(--page);
    border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin: 0;
}
.preview { box-shadow: 0 0 0 2px var(--primary-line), var(--shadow-card); }
details.small summary { cursor: pointer; color: var(--primary); }
.section-white { background: var(--surface); }
.section-white .tile, .section-white .feature { background: var(--page); box-shadow: none; }

/* ---- Home: section heads, references, compact feature list, CTA band ------------------------------------------ */
.center-head { text-align: center; margin-left: auto; margin-right: auto; }
.center-head .section-lead { margin: 0 auto; }
.section-white .steps li { background: var(--page); box-shadow: none; }
.plans { display: grid; gap: 24px; max-width: 920px; margin: 0 auto; align-items: stretch; }
@media (min-width: 800px) { .plans { grid-template-columns: 1fr 1fr; } }
.plan {
    position: relative; display: flex; flex-direction: column; gap: 14px; padding: 32px 28px 28px;
    background: var(--surface); border-radius: 1.25rem; box-shadow: var(--shadow-card);
}
.plan h3 { margin: 0; font-size: 1.25rem; }
.plan .btn { margin-top: auto; }
.plan-featured { box-shadow: 0 0 0 2px var(--primary), 0 18px 40px -16px rgba(15, 118, 110, .45); }
.plan-badge {
    position: absolute; top: -12px; left: 28px; padding: .2rem .7rem; border-radius: 999px;
    background: var(--primary); color: #fff; font-size: .75rem; font-weight: 700; letter-spacing: .03em;
}
.plan-price { margin: 4px 0 0; font-size: 3rem; font-weight: 800; line-height: 1; letter-spacing: -.02em; }
.plan-price small { display: block; margin-top: .5rem; font-size: 1rem; font-weight: 500; letter-spacing: 0; line-height: 1.4; color: var(--muted); }
.plan-badge-ink { background: var(--ink); }
.plan-note { margin: 0 0 6px; color: var(--muted); }
.plan .checks { margin-bottom: 8px; }
.plan-body { flex: 1; color: var(--muted); }
.plan-body h2, .plan-body h3 { color: var(--text); font-size: 1rem; margin: 1.2em 0 .5em; }
.plan-body ul { list-style: none; padding: 0; display: grid; gap: .5rem; }
.plan-body li { position: relative; padding-left: 1.6rem; color: var(--text); }
.plan-body li::before {
    content: ""; position: absolute; left: .2rem; top: .35em; width: .45rem; height: .8rem;
    border-right: 2px solid var(--primary); border-bottom: 2px solid var(--primary); transform: rotate(45deg);
}

/* "Zaufali nam": venue names with a monogram, then quotes. */
.venues {
    list-style: none; margin: 0 0 32px; padding: 0;
    display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 28px;
}
.venues li { display: flex; align-items: center; gap: .6rem; }
.venue-mark {
    display: inline-grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: .7rem;
    background: var(--ink); color: var(--brand-light); font-weight: 700; font-size: 1.1rem;
}
.venue-name { display: block; font-weight: 700; line-height: 1.2; }
.venue-city { display: block; color: var(--muted); font-size: .85rem; }
.quotes { display: grid; gap: 20px; }
@media (min-width: 800px) { .quotes { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); } }
.quote {
    margin: 0; padding: 28px 24px 22px; border-radius: var(--radius-card); background: var(--page);
    display: flex; flex-direction: column; gap: 16px; position: relative;
}
.quote::before {
    content: "“"; position: absolute; top: 4px; left: 18px; font-size: 3.5rem; line-height: 1;
    color: var(--primary); opacity: .35; font-family: Georgia, serif;
}
.quote blockquote { margin: 0; font-size: 1.05rem; line-height: 1.6; padding-top: 10px; }
.quote figcaption { display: flex; flex-direction: column; gap: 2px; font-size: .9rem; margin-top: auto; }
.quote figcaption span { color: var(--muted); }
.quote figcaption a { font-size: .85rem; margin-top: 4px; }

/* "A do tego": compact list instead of a second grid of cards. */
.feature-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px 32px; }
@media (min-width: 640px) { .feature-list { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .feature-list { grid-template-columns: repeat(3, 1fr); } }
.feature-list li { display: flex; gap: 14px; align-items: flex-start; }
.feature-list .feature-icon { margin: 0; flex-shrink: 0; }
.feature-list strong { display: block; margin-bottom: 2px; }
.feature-list li > span:last-child { color: var(--muted); font-size: .95rem; }
.feature-list li > span:last-child strong { color: var(--text); font-size: 1rem; }

/* Closing call to action: full width, dark, text on the left and the actions in a panel on the right. */
.cta-band {
    color: var(--on-ink); padding: 88px 0;
    background:
        radial-gradient(50rem 26rem at 90% 10%, rgba(20, 184, 166, .28), transparent 60%),
        radial-gradient(36rem 20rem at 0% 100%, rgba(59, 130, 246, .14), transparent 60%),
        var(--ink);
}
.cta-inner { display: grid; gap: 32px; align-items: center; }
@media (min-width: 900px) { .cta-inner { grid-template-columns: 1.3fr 1fr; gap: 64px; } }
.cta-band h2 { color: #fff; font-size: clamp(1.9rem, 1.3rem + 2vw, 2.8rem); letter-spacing: -.02em; line-height: 1.1; }
.cta-band .lead { color: var(--on-ink); opacity: .85; margin-bottom: 1.2rem; }
.checks-light { gap: .8rem; }
.checks-light li { color: var(--on-ink); font-size: 1.05rem; }
.checks-light .icon {
    width: 1.4rem; height: 1.4rem; padding: .25rem; margin-top: 0; border-radius: 50%; background: rgba(94, 234, 212, .14);
}
.checks-light .icon { color: var(--brand-light); }
.cta-box-title { margin: 0; color: #fff; font-weight: 700; font-size: 1.2rem; }
.cta-box-note { margin: -4px 0 8px; color: var(--on-ink-muted); }
.cta-box {
    display: grid; gap: 12px; padding: 28px; border-radius: 1.25rem;
    background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1);
}
.cta-box .btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .3); }
.cta-box .btn-ghost:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.cta-contact {
    display: flex; flex-wrap: wrap; gap: .4rem 1rem; justify-content: center; align-items: center;
    padding-top: 6px; color: var(--on-ink-muted); font-size: .9rem;
}
.cta-contact span:first-child { width: 100%; text-align: center; }
.cta-contact a { color: #fff; text-decoration: none; display: inline-flex; gap: .4rem; align-items: center; }
.cta-contact a:hover { color: var(--brand-light); }

/* ---- Panel layout: dark sidebar on wide screens, top bar with a menu button on phones -------------------------- */
body.admin { background: var(--page); }
.admin-sidebar { background: var(--ink); color: var(--on-ink); z-index: 20; }
.admin-sidebar-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; }
.admin-sidebar .brand { font-size: 1.15rem; color: #fff; }
.admin-nav { display: flex; flex-direction: column; gap: 16px; padding: 0 12px 16px; }
.admin-nav-links { display: flex; flex-direction: column; gap: 2px; }
.admin-nav-links a {
    display: flex; align-items: center; gap: .7rem; padding: .6rem .75rem; border-radius: var(--radius);
    color: var(--on-ink-muted); text-decoration: none; font-weight: 500; font-size: .95rem;
    transition: background-color .15s ease, color .15s ease;
}
.admin-nav-links a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.admin-nav-links a.active { background: rgba(94, 234, 212, .12); color: #fff; box-shadow: inset 3px 0 0 var(--brand-light); }
.admin-nav-links a.active .icon { color: var(--brand-light); }
.admin-nav-links .badge-count { margin-left: auto; background: #fbbf24; color: #1f2937; }
.admin-nav-heading {
    margin: 14px .75rem 4px; font-size: .7rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
    color: rgba(154, 168, 188, .7);
}
.admin-nav-user {
    display: flex; align-items: center; gap: .6rem; padding: .7rem .75rem; border-radius: var(--radius);
    background: rgba(255, 255, 255, .04); font-size: .85rem; color: var(--on-ink-muted);
}
.admin-avatar .icon { width: 1.4rem; height: 1.4rem; color: var(--on-ink-muted); }
.admin-user-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-logout {
    display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: var(--radius-sm);
    border: 0; background: transparent; color: var(--on-ink-muted); cursor: pointer;
}
.admin-logout:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.admin-sidebar .nav-toggle { display: none; }

@media (max-width: 999px) {
    .admin-sidebar { position: sticky; top: 0; }
    .js .admin-sidebar .nav-toggle { display: inline-block; }
    .js .admin-nav { display: none; }
    .js .admin-nav.open { display: flex; }
}
@media (min-width: 1000px) {
    body.admin { display: grid; grid-template-columns: 248px minmax(0, 1fr); align-items: start; }
    .admin-sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; }
    .admin-sidebar-top { padding: 22px 20px 18px; }
    .admin-nav { flex: 1; justify-content: space-between; }
    body.admin > main { grid-column: 2; }
}
body.admin > main.container { max-width: 1240px; margin: 0; padding: 32px var(--gutter) 56px; }
@media (min-width: 1000px) { body.admin > main.container { padding: 36px 40px 64px; } }
body.admin > main.container.narrow { max-width: 860px; }

/* Page title row: title and description on the left, actions on the right. */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px 24px; margin-bottom: 24px; }
.page-head h1 { margin: 0; font-size: clamp(1.5rem, 1.2rem + 1vw, 1.9rem); letter-spacing: -.01em; }
.page-subtitle { margin: .25rem 0 0; color: var(--muted); }
.page-head .actions { gap: 8px; }
.page-head .status { vertical-align: middle; margin-left: .5rem; font-size: .75rem; }
.page-head .cell-venue { align-items: center; gap: 14px; }
.page-head .venue-mark { width: 3rem; height: 3rem; font-size: 1.3rem; border-radius: .8rem; }

/* Cards inside grids never get the stacking margin (it misaligned the dashboard columns). */
.grid > .card, .grid > section.card { margin-top: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.card-head h2, .card-head h3 { margin: 0; }
.card-head a { font-size: .875rem; white-space: nowrap; }

/* Dashboard */
.stat { flex-direction: row; align-items: center; gap: 14px; }
.stat-icon {
    display: inline-grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: .8rem; flex-shrink: 0;
    background: var(--primary-soft); color: var(--primary);
}
.stat-icon .icon { width: 1.25rem; height: 1.25rem; }
.stat-icon.status-PAID { background: var(--success-bg); color: var(--success); }
.stat-icon.status-SUSPENDED { background: var(--warning-bg); color: var(--warning); }
.stat-icon.status-CANCELLED { background: #e9ecef; color: var(--muted); }
.stat-body { display: flex; flex-direction: column; gap: 2px; }
.empty {
    display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 24px 12px; text-align: center;
    color: var(--muted); font-size: .95rem;
}
.empty .icon { width: 1.75rem; height: 1.75rem; color: #adb5bd; }
ul.rows a { font-weight: 600; text-decoration: none; }
ul.rows a:hover { text-decoration: underline; }

/* Client and lead cards: summary strip, grouped details, danger zone. */
.summary { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); margin-bottom: 20px; }
@media (min-width: 900px) { .summary { grid-template-columns: repeat(4, 1fr); } }
.summary > div {
    background: var(--surface); border-radius: var(--radius-card); box-shadow: var(--shadow-card); padding: 14px 16px;
}
.summary dt { color: var(--muted); font-size: .8rem; margin-bottom: 4px; }
.summary dd { margin: 0; font-weight: 600; font-size: 1.05rem; overflow-wrap: anywhere; }
.summary dd small { display: block; font-weight: 400; color: var(--muted); font-size: .8rem; }
.detail-group + .detail-group { border-top: 1px solid var(--border); margin-top: 20px; padding-top: 20px; }
.detail-group h2 { font-size: 1rem; margin-bottom: 12px; }
.danger-zone { margin-top: 20px; border-radius: var(--radius-card); background: var(--surface); box-shadow: var(--shadow-card); }
.danger-zone summary { cursor: pointer; padding: 14px 20px; color: var(--error); font-weight: 500; list-style: none; }
.danger-zone summary::-webkit-details-marker { display: none; }
.danger-zone summary::before { content: "▸ "; }
.danger-zone[open] summary::before { content: "▾ "; }
.danger-zone > div { padding: 0 20px 20px; }
.quote-preview { margin: 0; padding: 12px 16px; border-left: 3px solid var(--primary); background: var(--page); border-radius: 0 var(--radius) var(--radius) 0; }

/* Tables: venue initial in the first column. */
.cell-venue { display: flex; align-items: center; gap: 10px; }
.cell-venue .venue-mark { width: 2rem; height: 2rem; font-size: .9rem; border-radius: .55rem; flex-shrink: 0; }
@media (max-width: 639px) { .checks-inline { flex-direction: column; align-items: flex-start; } }
.plan-footnote { margin: auto 0 0; padding: 14px 0 4px; border-top: 1px dashed var(--border); color: var(--muted); font-size: .9rem; }
.plan-footnote + .btn { margin-top: 0; }

/* Pricing: trial, monthly, yearly + what every plan includes. */
@media (min-width: 900px) { .plans-3 { grid-template-columns: repeat(3, 1fr); max-width: 1080px; } }
.plan-price span { display: inline; }
.plan-text { margin: 0; color: var(--muted); }
.plan-includes {
    max-width: 1080px; margin: 24px auto 0; padding: 26px 28px; border-radius: 1.25rem; background: var(--surface);
    box-shadow: var(--shadow-card); display: grid; gap: 8px 32px;
}
@media (min-width: 900px) { .plan-includes { grid-template-columns: 220px 1fr; } }
.plan-includes h3 { margin: 0; font-size: 1.1rem; }
.plan-includes .prose > p { color: var(--muted); }
.plan-includes ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem 28px; }
@media (min-width: 640px) { .plan-includes ul { grid-template-columns: repeat(2, 1fr); } }
.plan-includes li { position: relative; padding-left: 1.6rem; margin: 0; }
.plan-includes li::before {
    content: ""; position: absolute; left: .2rem; top: .35em; width: .45rem; height: .8rem;
    border-right: 2px solid var(--primary); border-bottom: 2px solid var(--primary); transform: rotate(45deg);
}

/* "Zawsze pod ręką": the panel on a landscape tablet. */
.tablet {
    background: linear-gradient(145deg, #2b3445, #0f1522); border-radius: 4.5% / 6%; padding: 3%;
    box-shadow: 0 30px 60px -24px rgba(11, 19, 36, .45), inset 0 0 0 1px rgba(255, 255, 255, .08);
}
.tablet img { display: block; width: 100%; height: auto; border-radius: 1.6% / 2.1%; }

/* ---- Home on a phone ----------------------------------------------------------------------------------------- */
@media (max-width: 639px) {
    .section { padding: 36px 0; }
    .cta-band { padding: 48px 0; }
    .feature-rows { gap: 56px; }
    .steps { margin-bottom: 0; gap: 10px; }

    /* Hero: buttons full width; the panel runs off the right edge, so it is shown larger and stays readable. */
    .hero { padding: 32px 0 40px; }
    .hero-inner { gap: 32px; }
    .hero .actions .btn { flex: 1 1 100%; }
    .hero-visual { margin-right: calc(-1 * var(--gutter)); overflow: hidden; padding: 0 0 24px; }
    .hero-visual .browser { width: 150%; }

    /* Panel screenshots in the feature rows: the same, larger and cut at the screen edge. */
    .feature-row .screenshot:not(.visual-narrow) { margin-right: calc(-1 * var(--gutter)); overflow: hidden; padding: 4px 0 28px 4px; }
    .feature-row .screenshot:not(.visual-narrow) .browser,
    .feature-row .screenshot:not(.visual-narrow) .tablet { width: 150%; }

    /* "Dla kogo?": icon next to the heading instead of above it. */
    .tile { display: grid; grid-template-columns: auto 1fr; column-gap: 14px; align-items: center; padding: 18px; }
    .tile .feature-icon { margin: 0; }
    .tile h3 { margin: 0; }
    .tile p { grid-column: 1 / -1; margin-top: .5rem; }

    /* Trial steps: number and title in one line, tighter cards. */
    .steps li { padding: 14px 18px; }
    .steps h3 { flex-direction: row; align-items: center; margin-bottom: .25rem; }

    /* "W barwach": the three phones as a swipeable row instead of three tiny ones. */
    .phone-story {
        display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 16px; scrollbar-width: none;
        margin: 8px calc(-1 * var(--gutter)) 20px; padding: 4px var(--gutter) 12px;
    }
    .phone-story::-webkit-scrollbar { display: none; }
    .phone-story li { flex: 0 0 64%; scroll-snap-align: center; }
    .phone-story li:nth-child(2) { margin-top: 0; }
    .phone-story p { flex-direction: row; text-align: left; font-size: .95rem; gap: .5rem; }

    /* Shadows short enough to fit inside the clipped area, so no hard edge shows under the screenshots. */
    .hero-visual .browser, .feature-row .screenshot .browser { box-shadow: 0 0 0 1px rgba(15, 23, 42, .08), 0 10px 20px -10px rgba(2, 6, 23, .35); }
    .feature-row .screenshot .tablet { box-shadow: 0 10px 20px -10px rgba(11, 19, 36, .45); }

    /* "Zaufali nam": venues in a tidy left-aligned column, like the quotes below them. */
    .venues { display: grid; justify-content: start; gap: 12px; margin-bottom: 24px; }
}

/* ---- Panel on a phone ---------------------------------------------------------------------------------------- */
@media (max-width: 639px) {
    /* Table cells that need their column name once the header row is hidden. */
    .table td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); font-size: .85rem; }

    /* Client filters: search across, the three selects and the button below in two columns. */
    .filters { grid-template-columns: 1fr 1fr; }
    .filters > :first-child { grid-column: 1 / -1; }
    .filters-actions { align-self: end; }

    /* Settings tabs in one row that scrolls sideways instead of wrapping. */
    .tabs {
        flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
        margin-left: calc(-1 * var(--gutter)); margin-right: calc(-1 * var(--gutter));
        padding: 2px var(--gutter) 4px;
    }
    .tabs::-webkit-scrollbar { display: none; }
    .tabs a { flex-shrink: 0; }

    /* Long client form: the save button stays at hand at the bottom of the screen. */
    .form-sticky-actions {
        position: sticky; bottom: 0; z-index: 5; margin: 0 calc(-1 * var(--gutter));
        padding: 12px var(--gutter); background: var(--surface); box-shadow: 0 -6px 16px -8px rgba(15, 23, 42, .18);
    }

    .stat { gap: 10px; padding: 14px; }
    .stat-icon { width: 2.25rem; height: 2.25rem; flex-shrink: 0; }
    .stat-body { white-space: nowrap; min-width: 0; }
}
/* Stacked client card and request: "Usuń" goes to the very end, after the side cards. */
@media (max-width: 959px) {
    .layout-sidebar > div, .layout-sidebar > aside { display: contents; }
    .layout-sidebar .danger-zone { order: 1; margin-top: 0; }
    .layout-sidebar > div > .card, .layout-sidebar > div > section.card { margin: 0; }
}
