/* Publiczne strony poza layoutem panelu - nowy jezyk wizualny.
   Uzywany przez:
     - resources/views/rejestrator-kierownik-publiczny.blade.php  (/r/{token}/kierownik)
     - resources/views/password-reset-request.blade.php           (/wejscie/reset)
     - resources/views/password-reset-form.blade.php              (/wejscie/nowe-haslo)

   Celowo NIE korzysta z rejestrator-publiczny.css, ktory zostaje w starym
   stylu dla pozostalych paneli rejestratora. Wzorzec: wejscie.css. */

/* zmienne na :root, nie na kontenerze - elementy renderowane poza .pub-page
   (np. komunikaty przegladarki, przyszle modale) tez maja do nich dostep */
:root {
    --pub-accent: #0f7c8a;
    --pub-accent-hover: #0c6a76;
    --pub-accent-dark-bg: #19b0bd;
    --pub-dark: #0d3b45;
    --pub-card-border: #e6ebef;
    --pub-title: #1d2f3c;
    --pub-text: #46606d;
    --pub-muted: #5c7383;
    --pub-section: #97a6b2;
    --pub-divider: #eef1f5;
    --pub-input-border: #e2e8f0;
}

* {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    min-height: 100vh;
    /* ten sam gradient co hero na froncie */
    background: linear-gradient(170deg, #0f3f61 0%, #0b5f7f 40%, #0b5f7f 100%);
    color: var(--pub-title);
    font-family: "Nunito Sans", "Segoe UI", Arial, sans-serif;
    overflow-x: hidden;
}

/* ── Uklad strony ─────────────────────────────────────────────────── */

.pub-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 34px 20px;
}

.pub-shell {
    width: 100%;
    max-width: 760px;
}

/* karty z krotkim formularzem (reset hasla) - jak /wejscie */
.pub-shell-narrow {
    max-width: 680px;
}

/* ── Karta ────────────────────────────────────────────────────────── */

.pub-card {
    width: 100%;
    background: #ffffff;
    border: 1px solid var(--pub-card-border);
    border-radius: 16px;
    box-shadow: 0 18px 40px rgba(4, 25, 30, 0.28);
    padding: 26px 28px 0;
}

.pub-card-head {
    margin-bottom: 20px;
}

.head .pub-eyebrow, .pub-eyebrow {
    margin: 0 0 8px;
    color: var(--pub-accent);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.pub-title {
    margin: 0;
    color: var(--pub-title);
    font-size: 24px;
    font-weight: 800;
    line-height: 1.25;
}

.pub-lead {
    margin: 8px 0 0;
    color: var(--pub-muted);
    font-size: 15px;
    line-height: 1.5;
}

.pub-section-label {
    margin: 0 0 10px;
    color: var(--pub-section);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* ── Komunikaty ───────────────────────────────────────────────────── */

.pub-ok,
.pub-error {
    margin: 0 0 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.45;
    padding: 10px 12px;
}

.pub-ok {
    border: 1px solid #a9dcc3;
    background: #f1faf5;
    color: #0f6d43;
}

.pub-error {
    border: 1px solid #f5c2c7;
    background: #fdf2f3;
    color: #b3253c;
}

.pub-note {
    margin: 0 0 16px;
    color: var(--pub-text);
    font-size: 14px;
    line-height: 1.5;
}

.pub-form-head {
    border-top: 1px solid var(--pub-divider);
    padding-top: 18px;
    margin-bottom: 18px;
}

.pub-form-head .pub-note {
    margin-bottom: 0;
}

/* ── Formularz ────────────────────────────────────────────────────── */

.pub-form {
    display: grid;
    gap: 16px;
}

.pub-field {
    display: grid;
    gap: 6px;
}

.pub-field label {
    color: var(--pub-title);
    font-size: 15px;
    font-weight: 700;
}

.pub-field label small {
    color: var(--pub-muted);
    font-size: 12px;
    font-weight: 600;
}

.pub-input {
    width: 100%;
    height: 56px;
    border-radius: 10px;
    border: 1px solid var(--pub-input-border);
    background: #ffffff;
    color: var(--pub-title);
    font-family: inherit;
    font-size: 17px;
    padding: 0 16px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.pub-input::placeholder {
    color: #a9bac6;
}

.pub-input:focus {
    outline: none;
    border-color: var(--pub-accent);
    box-shadow: 0 0 0 3px rgba(15, 124, 138, 0.14);
}

.pub-input-mono,
.pub-input-mono::placeholder {
    font-family: "SFMono-Regular", "Consolas", "Liberation Mono", "Menlo", monospace;
    letter-spacing: 0.02em;
}

/* ── Przyciski ────────────────────────────────────────────────────── */

.pub-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 56px;
    padding: 10px 18px;
    border: 0;
    border-radius: 10px;
    background: var(--pub-accent);
    color: #ffffff;
    font-family: inherit;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.pub-btn:hover {
    background: var(--pub-accent-hover);
    color: #ffffff;
}

.pub-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(15, 124, 138, 0.35);
}

.pub-btn-ghost {
    border: 1px solid var(--pub-input-border);
    background: #ffffff;
    color: #334155;
}

.pub-btn-ghost:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #334155;
}

.pub-btn-ghost:focus-visible {
    border-color: var(--pub-accent);
    box-shadow: 0 0 0 3px rgba(15, 124, 138, 0.14);
}

.pub-btn-sm {
    width: auto;
    min-height: 44px;
    padding: 0 14px;
    font-size: 15px;
    font-weight: 700;
}

.pub-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    line-height: 1;
}

.pub-btn-icon svg {
    display: block;
}

/* ── Linki pod karta ──────────────────────────────────────────────── */

.pub-links {
    margin-top: 16px;
    text-align: center;
}

.pub-links a {
    color: rgba(255, 255, 255, 0.72);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.pub-links a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.pub-links a:focus-visible {
    outline: 2px solid var(--pub-accent-dark-bg);
    outline-offset: 3px;
    border-radius: 4px;
}

/* ── Stopka karty (data robocza / czas serwera) ───────────────────── */

.pub-card-foot {
    margin-top: 22px;
    border-top: 1px solid var(--pub-divider);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pub-card-foot div {
    padding: 14px 0 18px;
}

.pub-card-foot div + div {
    border-left: 1px solid var(--pub-divider);
    padding-left: 18px;
}

.pub-card-foot span {
    display: block;
    color: var(--pub-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.pub-card-foot strong {
    display: block;
    color: var(--pub-title);
    font-size: 14px;
    font-weight: 700;
    font-family: "SFMono-Regular", "Consolas", "Liberation Mono", "Menlo", monospace;
}

.pub-card-foot-single {
    grid-template-columns: minmax(0, 1fr);
    text-align: center;
}

.pub-card-foot-single a {
    color: var(--pub-accent);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.pub-card-foot-single a:hover {
    color: var(--pub-accent-hover);
    text-decoration: underline;
}

.pub-card-foot-single a:focus-visible {
    outline: 2px solid var(--pub-accent);
    outline-offset: 3px;
    border-radius: 4px;
}

/* ── Panel kierownika: pasek zalogowania ──────────────────────────── */

.pub-authbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 14px;
    border: 1px solid var(--pub-card-border);
    border-radius: 12px;
    background: #fafcfd;
    padding: 12px 14px;
    margin-bottom: 20px;
}

.pub-authbar p {
    margin: 0;
    min-width: 0;
    color: var(--pub-text);
    font-size: 13px;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.pub-authbar p strong {
    display: inline-block;
    border-radius: 999px;
    background: #e6f4f6;
    color: var(--pub-accent);
    padding: 3px 10px;
    font-size: 13px;
    font-weight: 800;
}

.pub-authbar form {
    margin: 0;
    flex-shrink: 0;
}

/* ── Panel kierownika: tryb kiosku ────────────────────────────────── */

.pub-block {
    margin-bottom: 20px;
}

.pub-kiosk {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    border: 1px solid var(--pub-card-border);
    border-radius: 14px;
    background: #f4f8f9;
    padding: 8px;
}

.pub-kiosk-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 4px;
    min-height: 72px;
    padding: 10px 14px;
    border: 1px solid var(--pub-input-border);
    border-radius: 12px;
    background: #ffffff;
    color: var(--pub-title);
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.pub-kiosk-btn strong {
    display: block;
    font-size: 17px;
    font-weight: 800;
}

.pub-kiosk-btn small {
    display: block;
    color: var(--pub-muted);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
}

.pub-kiosk-btn:hover {
    border-color: #cbd5e1;
    background: #fafcfd;
}

.pub-kiosk-btn:focus-visible {
    outline: none;
    border-color: var(--pub-accent);
    box-shadow: 0 0 0 3px rgba(15, 124, 138, 0.14);
}

.pub-kiosk-btn.is-active {
    border-color: var(--pub-accent);
    background: #e6f4f6;
    box-shadow: inset 0 0 0 1px var(--pub-accent);
}

.pub-kiosk-btn.is-active strong {
    color: var(--pub-accent);
}

.pub-kiosk-btn.is-active small {
    color: #4d7f88;
}

/* ── Panel kierownika: lista budow ────────────────────────────────── */

.pub-sites {
    display: grid;
    /* dwie stale kolumny - jeden kafelek budowy zajmuje polowe szerokosci */
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.pub-site-btn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    min-height: 76px;
    padding: 12px 14px;
    border: 1px solid var(--pub-card-border);
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    text-decoration: none;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.pub-site-btn strong {
    display: block;
    color: var(--pub-title);
    font-size: 17px;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.pub-site-btn span {
    display: block;
    color: var(--pub-muted);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.pub-site-btn:hover {
    border-color: var(--pub-accent);
    background: #fafcfd;
}

.pub-site-btn:hover strong {
    color: var(--pub-accent);
}

.pub-site-btn:focus-visible {
    outline: none;
    border-color: var(--pub-accent);
    box-shadow: 0 0 0 3px rgba(15, 124, 138, 0.14);
}

/* ── Panel kierownika: akcje dodatkowe ────────────────────────────── */

.pub-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

/* ── Mobile ───────────────────────────────────────────────────────── */

@media (max-width: 560px) {
    .pub-page {
        justify-content: flex-start;
        gap: 14px;
        padding: 20px 7px;
    }

    .pub-card {
        border-radius: 14px;
        padding: 22px 16px 0;
    }

    .pub-title {
        font-size: 20px;
    }

    .pub-authbar {
        padding: 12px;
    }

    .pub-authbar form,
    .pub-authbar .pub-btn-sm {
        width: 100%;
    }

    .pub-kiosk,
    .pub-actions {
        grid-template-columns: minmax(0, 1fr);
    }

    .pub-sites {
        grid-template-columns: minmax(0, 1fr);
    }

    .pub-btn-sm {
        min-height: 44px;
    }

    .pub-card-foot div + div {
        padding-left: 14px;
    }
}
