html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #1d2b21;
    background: #f7f8f3;
}

* {
    box-sizing: border-box;
}

a {
    color: inherit;
}


/* =========================
   LAYOUT
   ========================= */

.app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
}


/* =========================
   TOP BAR
   ========================= */

.top-bar {
    height: 72px;
    background: rgba(247, 248, 243, 0.96);
    border-bottom: 1px solid #e2e6df;
    position: sticky;
    top: 0;
    z-index: 100;
}

.top-bar-content {
    max-width: 1200px;
    height: 100%;
    margin: 0 auto;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.brand-icon {
    font-size: 1.5rem;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    text-decoration: none;
    color: #536158;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

    .nav-link:hover {
        color: #315c3e;
    }

    .nav-link.active {
        color: #315c3e;
    }

/* =========================
   FOOTER
   ========================= */

.footer {
    background: #1d2b21;
    color: #e8eee8;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 32px;
    display: flex;
    justify-content: space-between;
    gap: 40px;
}

.footer-description {
    max-width: 500px;
}

    .footer-description h3 {
        margin: 0 0 12px;
        font-size: 1.2rem;
    }

    .footer-description p {
        margin: 0;
        color: #b7c3b9;
        line-height: 1.6;
    }

.footer-links a {
    color: #dce8dd;
    text-decoration: none;
    font-weight: 600;
}

    .footer-links a:hover {
        text-decoration: underline;
    }

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 32px;
    border-top: 1px solid #344238;
    color: #8e9b91;
    font-size: 0.85rem;
}

/* ============ przycisk do formularza ============ */
.plant-form-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 12px;
    padding: 12px 20px;
    background: #365b40;
    color: #ffffff;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

    .plant-form-button:hover {
        background: #284631;
        transform: translateY(-2px);
    }

    .plant-form-button span {
        font-size: 1.2rem;
        transition: transform 0.2s ease;
    }

    .plant-form-button:hover span {
        transform: translateX(3px);
    }

/* ---------- układ pól ---------- */
.submission-form .submission-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

    .submission-form .submission-field > label:not(.switch-label) {
        font-size: 0.875rem;
        font-weight: 600;
        color: #3d4a43;
    }

    /* ---------- pola tekstowe, liczbowe i listy ---------- */
    .submission-form .submission-field input:not([type="checkbox"]),
    .submission-form .submission-field select,
    .submission-form .submission-field textarea {
        width: 100%;
        padding: 10px 12px;
        border: 1px solid #dfe5e1;
        border-radius: 8px;
        background-color: #fff;
        font: inherit;
        color: inherit;
        box-sizing: border-box;
        transition: border-color 0.2s ease, box-shadow 0.2s ease;
    }

        .submission-form .submission-field input:not([type="checkbox"]):hover,
        .submission-form .submission-field select:hover,
        .submission-form .submission-field textarea:hover {
            border-color: #39815c;
        }

        .submission-form .submission-field input:not([type="checkbox"]):focus,
        .submission-form .submission-field select:focus,
        .submission-form .submission-field textarea:focus {
            outline: none;
            border-color: #39815c;
            box-shadow: 0 0 0 3px rgba(57, 129, 92, 0.15);
        }

        .submission-form .submission-field input::placeholder,
        .submission-form .submission-field textarea::placeholder {
            color: #7a857f;
        }

    /* ---------- lista rozwijana: własna strzałka ---------- */
    .submission-form .submission-field select {
        appearance: none;
        -webkit-appearance: none;
        padding-right: 36px;
        cursor: pointer;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' fill='none' stroke='%237a857f' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 12px center;
        background-size: 12px;
    }

        /* "Wybierz ..." (value 0 lub pusta) wyszarzone jak placeholder */
        .submission-form .submission-field select:has(option:checked[value="0"]),
        .submission-form .submission-field select:has(option:checked[value=""]) {
            color: #7a857f;
        }

        .submission-form .submission-field select option {
            color: #1f2a24;
        }

/* ---------- przełącznik ---------- */
.submission-form .switch-label {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    margin: 0;
    padding: 10px 14px;
    border: 1px solid #dfe5e1;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    font-weight: 500;
    user-select: none;
    transition: border-color 0.2s ease, background 0.2s ease;
}

    .submission-form .switch-label:hover {
        border-color: #39815c;
        background: #f6faf8;
    }

    /* ukryty, ale dostępny dla klawiatury i czytników ekranu */
    .submission-form .switch-label input.switch-input {
        position: absolute;
        width: 1px;
        height: 1px;
        margin: 0;
        padding: 0;
        border: 0;
        opacity: 0;
        pointer-events: none;
    }

    /* tor */
    .submission-form .switch-label .switch-slider {
        position: relative;
        display: inline-block;
        flex: 0 0 auto;
        width: 44px;
        height: 24px;
        border-radius: 999px;
        background: #b8c1bc;
        transition: background 0.2s ease;
    }

        /* gałka */
        .submission-form .switch-label .switch-slider::before {
            content: "";
            position: absolute;
            top: 3px;
            left: 3px;
            width: 18px;
            height: 18px;
            border-radius: 50%;
            background: #fff;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
            transition: transform 0.2s ease;
        }

    /* włączony */
    .submission-form .switch-label:has(.switch-input:checked) .switch-slider {
        background: #39815c;
    }

        .submission-form .switch-label:has(.switch-input:checked) .switch-slider::before {
            transform: translateX(20px);
        }

    /* fokus z klawiatury */
    .submission-form .switch-label:has(.switch-input:focus-visible) .switch-slider {
        outline: 2px solid #39815c;
        outline-offset: 3px;
    }

/* przełączniki sekcji (Czy posiada liście? itd.) */
.submission-section-toggle {
    margin: 8px 0;
}

    .submission-section-toggle .switch-label {
        font-weight: 600;
    }

    /* ---------- walidacja Blazora ---------- */
    .submission-form .submission-field .invalid {
        border-color: #c0392b;
    }

        .submission-form .submission-field .invalid:focus {
            box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.15);
        }

.submission-form .validation-message {
    font-size: 0.8rem;
    color: #c0392b;
}

.submission-form .validation-errors {
    margin: 0 0 16px;
    padding: 12px 16px 12px 32px;
    border: 1px solid #f1c4bf;
    border-radius: 8px;
    background: #fdf2f1;
    color: #c0392b;
}

/* ---------- zablokowane ---------- */
.submission-form .submission-field input:disabled,
.submission-form .submission-field select:disabled {
    background-color: #f3f5f4;
    color: #9aa39e;
    cursor: not-allowed;
}

.submission-form .submission-grid { /*2/3 kolumny w zaleznosci od szerokosci ekranu*/
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px 20px;
    align-items: start;
}

/* ---------- przycisk do panelu ---------- */
.admin-link {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border: 1px solid #39815c;
    border-radius: 8px;
    color: #39815c;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

    .admin-link:hover {
        background: #39815c;
        color: #fff;
    }

/* ---------- logowanie ---------- */
.admin-login-page {
    display: flex;
    justify-content: center;
    padding: 48px 16px;
}

.admin-login-card {
    width: 100%;
    max-width: 400px;
    padding: 32px;
    background: #fff;
    border: 1px solid #dfe5e1;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

    .admin-login-card h1 {
        margin: 6px 0 24px;
    }

    .admin-login-card .submission-form {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    .admin-login-card .submission-button {
        width: 100%;
    }

.admin-back {
    display: inline-block;
    margin-top: 16px;
    color: #7a857f;
    text-decoration: none;
}

    .admin-back:hover {
        color: #39815c;
    }

/* ---------- układ panelu ---------- */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 16px;
}

.admin-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 24px;
    align-items: start;
}

.admin-tabs {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 6px;
    background: #fff;
    border: 1px solid #dfe5e1;
    border-radius: 10px;
}

.admin-tab {
    padding: 10px 12px;
    border: 0;
    border-radius: 6px;
    background: none;
    font: inherit;
    color: inherit;
    text-align: left;
    white-space: nowrap;
    cursor: pointer;
}

    .admin-tab:hover {
        background: #f0f6f2;
    }

    .admin-tab.active {
        background: #e3f0e8;
        color: #39815c;
        font-weight: 600;
    }

.admin-content {
    min-width: 0;
    padding: 24px;
    background: #fff;
    border: 1px solid #dfe5e1;
    border-radius: 10px;
}

    .admin-content h2 {
        margin-top: 0;
    }

@media (max-width: 760px) {
    .admin-layout {
        grid-template-columns: 1fr;
    }

    .admin-tabs {
        flex-direction: row;
        overflow-x: auto;
    }
}

/* ---------- pola ---------- */
.admin-add {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.admin-input {
    flex: 1 1 200px;
    padding: 10px 12px;
    border: 1px solid #dfe5e1;
    border-radius: 8px;
    background: #fff;
    font: inherit;
    color: inherit;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

    .admin-input:hover {
        border-color: #39815c;
    }

    .admin-input:focus {
        outline: none;
        border-color: #39815c;
        box-shadow: 0 0 0 3px rgba(57, 129, 92, 0.15);
    }

    .admin-input.rgb {
        flex: 0 0 76px;
        width: 76px;
    }

.admin-table .admin-input:not(.rgb) {
    width: 100%;
}

/* ---------- przyciski ---------- */
.admin-btn {
    padding: 9px 14px;
    border: 1px solid #39815c;
    border-radius: 8px;
    background: #39815c;
    color: #fff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, opacity 0.2s ease;
}

    .admin-btn:hover {
        background: #2f6c4d;
    }

    .admin-btn:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

    .admin-btn.secondary {
        background: #fff;
        color: #39815c;
    }

        .admin-btn.secondary:hover {
            background: #f0f6f2;
        }

    .admin-btn.danger {
        background: #fff;
        color: #c0392b;
        border-color: #e5b5b0;
    }

        .admin-btn.danger:hover {
            background: #fdf2f1;
        }

        .admin-btn.danger.solid {
            background: #c0392b;
            color: #fff;
            border-color: #c0392b;
        }

    .admin-btn.small {
        padding: 6px 10px;
        font-size: 0.85rem;
    }

/* ---------- tabela ---------- */
.admin-table-wrap {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

    .admin-table th {
        padding: 10px 12px;
        border-bottom: 1px solid #dfe5e1;
        font-size: 0.8rem;
        font-weight: 600;
        color: #7a857f;
        text-align: left;
        text-transform: uppercase;
        letter-spacing: 0.04em;
    }

    .admin-table td {
        padding: 10px 12px;
        border-bottom: 1px solid #eef2ef;
        vertical-align: middle;
    }

    .admin-table tbody tr:hover td {
        background: #f9fbfa;
    }

.admin-id {
    width: 60px;
    color: #7a857f;
}

.admin-actions {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    white-space: nowrap;
}

.admin-swatch {
    display: inline-block;
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.2);
    vertical-align: middle;
}

/* ---------- komunikaty ---------- */
.admin-message {
    margin-bottom: 16px;
    padding: 10px 14px;
    border-radius: 8px;
}

    .admin-message.success {
        background: #e3f0e8;
        color: #2f6c4d;
    }

    .admin-message.error {
        background: #fdf2f1;
        color: #c0392b;
        border: 1px solid #f1c4bf;
    }

.admin-empty {
    padding: 16px 0;
    color: #7a857f;
}

.admin-hint {
    margin: 0 0 20px;
    padding: 10px 14px;
    border-radius: 8px;
    background: #f6faf8;
    border: 1px solid #dfe5e1;
    color: #5f6b65;
    font-size: 0.9rem;
}

/* ---------- przełącznik sekcji panelu: Słowniki / Zgłoszenia ---------- */
/*.admin-sections {
    display: flex;
    gap: 4px;
    width: fit-content;
    margin: 0 0 24px;
    padding: 4px;
    background: #fff;
    border: 1px solid #dfe5e1;
    border-radius: 10px;
}

.admin-section-link {
    padding: 8px 18px;
    border-radius: 7px;
    color: #3d4a43;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

    .admin-section-link:hover {
        background: #f0f6f2;
    }

    .admin-section-link.active {
        background: #e3f0e8;
        color: #2f6c4d;
    }

    .admin-section-link:focus-visible {
        outline: 2px solid #39815c;
        outline-offset: 2px;
    }*/


/* ---------- górny pasek panelu admina ---------- */
.admin-topbar {
    position: sticky;
    top: var(--admin-topbar-offset, 0px);
    z-index: 50;
    margin: 0 0 24px;
    padding: 10px 0;
    background: rgba(247, 248, 244, 0.92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid #e2e9df;
}

.admin-topbar-inner {
    display: flex;
    align-items: center;
    gap: 16px;
}

.admin-topbar-title {
    flex: 0 0 auto;
    color: #284631;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
}

/* zakładki – przy wielu sekcjach przewijają się poziomo */
.admin-sections {
    display: flex;
    gap: 4px;
    min-width: 0;
    max-width: 100%;
    padding: 4px;
    overflow-x: auto;
    scrollbar-width: thin;
    background: #fff;
    border: 1px solid #dfe5e1;
    border-radius: 10px;
}

.admin-section-link {
    flex: 0 0 auto;
    padding: 8px 16px;
    border-radius: 7px;
    color: #3d4a43;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s ease, color 0.2s ease;
}

    .admin-section-link:hover {
        background: #f0f6f2;
    }

    .admin-section-link.active {
        background: #e3f0e8;
        color: #2f6c4d;
    }

    .admin-section-link:focus-visible {
        outline: 2px solid #39815c;
        outline-offset: 2px;
    }

.admin-topbar-logout {
    flex: 0 0 auto;
    margin-left: auto;
}

@media (max-width: 640px) {
    .admin-topbar-title {
        display: none;
    }

    .admin-topbar-inner {
        gap: 8px;
    }
}


/* ---------- lista zgłoszeń ---------- */
.admin-content-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

    .admin-content-head h2 {
        margin: 0;
    }

.admin-count {
    min-width: 28px;
    padding: 2px 10px;
    border-radius: 999px;
    background: #fdf3e1;
    color: #9a6a12;
    font-size: 0.85rem;
    font-weight: 700;
    text-align: center;
}

.admin-plant-names {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

    .admin-plant-names span {
        color: #7a857f;
        font-size: 0.85rem;
    }

.admin-parts {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.admin-part {
    padding: 2px 8px;
    border-radius: 999px;
    background: #f0f6f2;
    color: #2f6c4d;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
}

.admin-muted {
    color: #7a857f;
    font-size: 0.85rem;
}

.admin-row-corrupted td {
    background: #fdf2f1;
}

/* link wyglądający jak przycisk (Edytuj) */
a.admin-btn {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

/* ---------- przyciski formularza ---------- */
.submission-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px;
}

.submission-button.secondary {
    background: #fff;
    color: #2f6243;
    border: 1px solid #2f6243;
}

    .submission-button.secondary:hover {
        background: #f0f6f2;
    }

.admin-success-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
}

/* ---------- przełącznik sekcji panelu: Słowniki / Zgłoszenia ---------- */
.admin-sections {
    display: flex;
    gap: 4px;
    width: fit-content;
    margin: 0 0 24px;
    padding: 4px;
    background: #fff;
    border: 1px solid #dfe5e1;
    border-radius: 10px;
}

.admin-section-link {
    padding: 8px 18px;
    border-radius: 7px;
    color: #3d4a43;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

    .admin-section-link:hover {
        background: #f0f6f2;
    }

    .admin-section-link.active {
        background: #e3f0e8;
        color: #2f6c4d;
    }

    .admin-section-link:focus-visible {
        outline: 2px solid #39815c;
        outline-offset: 2px;
    }

/* ---------- lista zgłoszeń ---------- */
.admin-content-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

    .admin-content-head h2 {
        margin: 0;
    }

.admin-count {
    min-width: 28px;
    padding: 2px 10px;
    border-radius: 999px;
    background: #fdf3e1;
    color: #9a6a12;
    font-size: 0.85rem;
    font-weight: 700;
    text-align: center;
}

.admin-plant-names {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

    .admin-plant-names span {
        color: #7a857f;
        font-size: 0.85rem;
    }

.admin-parts {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.admin-part {
    padding: 2px 8px;
    border-radius: 999px;
    background: #f0f6f2;
    color: #2f6c4d;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
}

.admin-muted {
    color: #7a857f;
    font-size: 0.85rem;
}

.admin-row-corrupted td {
    background: #fdf2f1;
}

/* link wyglądający jak przycisk (Edytuj) */
a.admin-btn {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

/* ---------- przyciski formularza ---------- */
.submission-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px;
}

.submission-button.secondary {
    background: #fff;
    color: #2f6243;
    border: 1px solid #2f6243;
}

    .submission-button.secondary:hover {
        background: #f0f6f2;
    }

.admin-success-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
}

/* ---------- rośliny w panelu admina ---------- */
.admin-plant-link {
    color: inherit;
    text-decoration: none;
}

    .admin-plant-link:hover strong {
        color: #2f6c4d;
        text-decoration: underline;
    }

.admin-edit-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
}

/* ---------- przełącznik sekcji panelu: Słowniki / Zgłoszenia ---------- */
.admin-sections {
    display: flex;
    gap: 4px;
    width: fit-content;
    margin: 0 0 24px;
    padding: 4px;
    background: #fff;
    border: 1px solid #dfe5e1;
    border-radius: 10px;
}

.admin-section-link {
    padding: 8px 18px;
    border-radius: 7px;
    color: #3d4a43;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

    .admin-section-link:hover {
        background: #f0f6f2;
    }

    .admin-section-link.active {
        background: #e3f0e8;
        color: #2f6c4d;
    }

    .admin-section-link:focus-visible {
        outline: 2px solid #39815c;
        outline-offset: 2px;
    }

/* ---------- lista zgłoszeń ---------- */
.admin-content-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

    .admin-content-head h2 {
        margin: 0;
    }

.admin-count {
    min-width: 28px;
    padding: 2px 10px;
    border-radius: 999px;
    background: #fdf3e1;
    color: #9a6a12;
    font-size: 0.85rem;
    font-weight: 700;
    text-align: center;
}

.admin-plant-names {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

    .admin-plant-names span {
        color: #7a857f;
        font-size: 0.85rem;
    }

.admin-parts {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.admin-part {
    padding: 2px 8px;
    border-radius: 999px;
    background: #f0f6f2;
    color: #2f6c4d;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
}

.admin-muted {
    color: #7a857f;
    font-size: 0.85rem;
}

.admin-row-corrupted td {
    background: #fdf2f1;
}

/* link wyglądający jak przycisk (Edytuj) */
a.admin-btn {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

/* ---------- przyciski formularza ---------- */
.submission-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px;
}

.submission-button.secondary {
    background: #fff;
    color: #2f6243;
    border: 1px solid #2f6243;
}

    .submission-button.secondary:hover {
        background: #f0f6f2;
    }

.admin-success-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
}

/* ---------- rośliny w panelu admina ---------- */
.admin-plant-link {
    color: inherit;
    text-decoration: none;
}

    .admin-plant-link:hover strong {
        color: #2f6c4d;
        text-decoration: underline;
    }

.admin-edit-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
}

/* ---------- biblioteka: przełącznik niezweryfikowanych ---------- */
.library-filter {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
}

    .library-filter .switch-label {
        position: relative;
        display: inline-flex;
        align-items: center;
        gap: 10px;
        cursor: pointer;
        font-weight: 500;
        user-select: none;
    }

    .library-filter .switch-input {
        position: absolute;
        width: 1px;
        height: 1px;
        margin: 0;
        opacity: 0;
        pointer-events: none;
    }

    .library-filter .switch-slider {
        position: relative;
        flex: 0 0 auto;
        width: 44px;
        height: 24px;
        border-radius: 999px;
        background: #b8c1bc;
        transition: background 0.2s ease;
    }

        .library-filter .switch-slider::before {
            content: "";
            position: absolute;
            top: 3px;
            left: 3px;
            width: 18px;
            height: 18px;
            border-radius: 50%;
            background: #fff;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
            transition: transform 0.2s ease;
        }

    .library-filter .switch-label:has(.switch-input:checked) .switch-slider {
        background: #39815c;
    }

        .library-filter .switch-label:has(.switch-input:checked) .switch-slider::before {
            transform: translateX(20px);
        }

    .library-filter .switch-label:has(.switch-input:focus-visible) .switch-slider {
        outline: 2px solid #39815c;
        outline-offset: 3px;
    }

.library-filter-note {
    color: #7a857f;
    font-size: 0.9rem;
}

    .library-filter-note.error {
        color: #c0392b;
    }

/* karta niezweryfikowanej rośliny */
.plant-card.pending {
    border-style: dashed;
    border-color: #f1dcb0;
    background: #fffaf0;
}

.plant-type.plant-pending {
    background: #fdf3e1;
    color: #9a6a12;
    border-color: #f1dcb0;
}

.plant-card-note {
    margin-top: auto;
    color: #9a6a12;
    font-size: 0.85rem;
}

/* ---------- ustawienia wyszukiwania ---------- */
.search-options {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.match-slider {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

    .match-slider label {
        font-weight: 600;
        color: #3d4a43;
    }

    .match-slider strong {
        color: #2f6c4d;
    }

    .match-slider input[type="range"] {
        width: 100%;
        accent-color: #39815c;
        cursor: pointer;
    }

.match-scale {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    color: #7a857f;
    font-size: 0.8rem;
}

/* ---------- wyniki ---------- */
.search-results {
    margin-top: 32px;
}

.search-results-title {
    margin: 0 0 4px;
    outline: none;
    scroll-margin-top: 24px;
}

.search-results-meta {
    margin: 0 0 20px;
    color: #7a857f;
    font-size: 0.9rem;
}

.match-badge {
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
}

    .match-badge.high {
        background: #e3f0e8;
        color: #2f6c4d;
    }

    .match-badge.medium {
        background: #fdf3e1;
        color: #9a6a12;
    }

    .match-badge.low {
        background: #eef1ef;
        color: #5f6b65;
    }

.match-bar {
    height: 6px;
    margin-top: 12px;
    border-radius: 999px;
    background: #eef1ef;
    overflow: hidden;
}

    .match-bar span {
        display: block;
        height: 100%;
        border-radius: inherit;
        background: #39815c;
    }

.match-details {
    margin: 6px 0 0;
    color: #7a857f;
    font-size: 0.85rem;
}

@media (max-width: 500px) {

    .main-nav {
        gap: 12px;
    }

    .hero-actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero h1 {
        font-size: 3.2rem;
    }
}