/* ============================================================
   AVIS DECOR — Custom CSS
   Tailwind CDN obsługuje utility classes,
   tutaj tylko to czego Tailwind nie pokrywa.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

/* ---- CSS Variables ---- */
:root {
    --gold: #FF8C00;
    --gold-light: #FFB800;
    --gold-dark: #E06500;
    --bg: #0D1117;
    --bg-card: rgba(255,255,255,0.04);
    --border: rgba(255,255,255,0.08);
}

/* ---- Base ---- */
* { box-sizing: border-box; }

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg);
    color: #fff;
    -webkit-font-smoothing: antialiased;
}

/* ---- Glassmorphism card ---- */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: 1.25rem;
}

/* ---- Gold gradient text ---- */
.text-gold-gradient {
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ---- Gold button ---- */
.btn-gold {
    background: var(--gold);
    color: #0D1117;
    font-weight: 600;
    border-radius: 0.875rem;
    padding: 0.8rem 1.5rem;
    min-height: 44px;
    border: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.btn-gold:hover {
    background: var(--gold-light);
    box-shadow: 0 0 24px rgba(255,140,0,0.35);
    transform: translateY(-1px);
}
.btn-gold:active { transform: translateY(0); }
.btn-gold:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ---- Outline button ---- */
.btn-outline {
    background: transparent;
    color: #fff;
    font-weight: 500;
    border-radius: 0.875rem;
    padding: 0.8rem 1.5rem;
    min-height: 44px;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.btn-outline:hover {
    border-color: rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.05);
}

/* ---- Input field ---- */
.input-field {
    width: 100%;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border);
    border-radius: 0.875rem;
    padding: 0.85rem 1rem;
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s, background 0.2s;
    min-height: 44px;
}
.input-field::placeholder { color: rgba(255,255,255,0.3); }
.input-field:focus {
    border-color: var(--gold);
    background: rgba(255,255,255,0.08);
}

/* ---- Tab toggle ---- */
.tab-btn {
    flex: 1;
    padding: 0.65rem;
    border-radius: 0.65rem;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    color: rgba(255,255,255,0.5);
    background: transparent;
    border: none;
}
.tab-btn.active {
    background: var(--gold);
    color: #0D1117;
}

/* ---- Stat card ---- */
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.25rem;
    transition: border-color 0.2s;
}
.stat-card:hover { border-color: rgba(255,140,0,0.3); }

/* ---- Module nav card ---- */
.module-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 1.25rem;
    padding: 1.5rem 1rem;
    cursor: pointer;
    transition: all 0.25s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: #fff;
}
.module-card:hover {
    border-color: var(--gold);
    background: rgba(255,140,0,0.06);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.module-card.disabled {
    opacity: 0.55;
    cursor: default;
    pointer-events: none;
}
.module-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255,140,0,0.08);
    border: 1px solid rgba(255,140,0,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
    flex-shrink: 0;
}

/* ---- Background subtle pattern ---- */
.bg-pattern {
    background-image:
        radial-gradient(circle at 20% 20%, rgba(255,140,0,0.06) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255,140,0,0.04) 0%, transparent 50%);
}

/* ---- Fade-in animation ---- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeInUp 0.4s ease forwards; }
.fade-in-delay { animation: fadeInUp 0.4s ease 0.1s both; }

/* ---- Divider with text ---- */
.divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: rgba(255,255,255,0.3);
    font-size: 0.8rem;
}
.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* ---- Scrollbar (webkit) ---- */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: rgba(255,140,0,0.3);
    border-radius: 2px;
}

/* ---- Toast transition ---- */
#toast {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* ============================================================
   NAWIGACJA
   Mobile: dolny fixed pasek
   Desktop (≥1024px): lewy fixed sidebar
   ============================================================ */

/* ---- Sidebar (desktop) ---- */
#app-sidebar {
    display: none;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 220px;
    background: #0d1018;
    border-right: 1px solid var(--border);
    flex-direction: column;
    z-index: 50;
    padding: 0;
}
.sidebar-logo {
    overflow: hidden;
    padding: 0;
    border-bottom: 1px solid rgba(255,140,0,0.15);
    margin-bottom: 0.75rem;
    flex-shrink: 0;
}
.sidebar-brand { letter-spacing: -0.02em; }
.sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0 0.75rem;
}
.sidebar-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 0.85rem;
    border-radius: 0.75rem;
    text-decoration: none;
    color: rgba(255,255,255,0.5);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
    position: relative;
}
.sidebar-item:hover:not(.soon) {
    background: rgba(255,255,255,0.06);
    color: #fff;
}
.sidebar-item.active {
    background: rgba(255,140,0,0.12);
    color: var(--gold);
}
.sidebar-item.soon { opacity: 0.4; cursor: default; }
.sidebar-icon { display: flex; align-items: center; justify-content: center; width: 22px; flex-shrink: 0; }
.soon-badge {
    margin-left: auto;
    font-size: 0.65rem;
    background: rgba(255,255,255,0.08);
    padding: 2px 7px;
    border-radius: 99px;
    color: rgba(255,255,255,0.4);
    font-weight: 400;
}
.sidebar-footer {
    padding: 0.75rem;
    border-top: 1px solid var(--border);
    margin-top: 0.5rem;
}
.sidebar-logout {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.6rem 0.85rem;
    border-radius: 0.75rem;
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.35);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Outfit', sans-serif;
}
.sidebar-logout:hover {
    background: rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.7);
}

/* ---- Bottom nav (mobile) ---- */
#app-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 64px;
    background: rgba(13,17,23,0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--border);
    z-index: 50;
    padding-bottom: env(safe-area-inset-bottom);
}
.bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    text-decoration: none;
    color: rgba(255,255,255,0.35);
    font-size: 0.6rem;
    font-weight: 500;
    transition: color 0.2s;
    min-height: 44px;
}
.bottom-nav-item.active { color: var(--gold); }
.bottom-nav-item.soon { opacity: 0.4; cursor: default; }
.bottom-nav-icon { display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; }
.bottom-nav-label { letter-spacing: 0.02em; }

/* ---- Layout dostosowany do nawigacji ---- */
@media (max-width: 1023px) {
    /* Na mobile: padding-bottom żeby treść nie chowała się pod paskiem */
    body.has-nav main,
    body.has-nav .page-content {
        padding-bottom: 80px;
    }
}
@media (min-width: 1024px) {
    /* Na desktop: sidebar widoczny, bottom nav ukryty */
    #app-sidebar { display: flex; }
    #app-bottom-nav { display: none; }

    body.has-nav main,
    body.has-nav .page-content {
        margin-left: 220px;
        max-width: none;
        padding-left: 2rem;
        padding-right: 2rem;
        padding-top: 1.5rem;
    }
}

/* ============================================================
   KARTA PTAKA (mini — lista Spis)
   ============================================================ */
.bird-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.22s;
    text-decoration: none;
    color: #fff;
    display: block;
}
.bird-card:hover {
    border-color: rgba(255,140,0,0.4);
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(0,0,0,0.35);
}
.bird-card-photo {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    background: rgba(255,255,255,0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
}
.bird-card-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.bird-card-body { padding: 0.75rem; }
.bird-card-ring {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--gold);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.bird-card-name {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.6);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.bird-card-meta {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.4);
    margin-top: 2px;
}

/* ---- Badges ---- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 99px;
}
.badge-active   { background: rgba(16,185,129,0.15); color: #10b981; }
.badge-sold     { background: rgba(99,102,241,0.15); color: #818cf8; }
.badge-deceased { background: rgba(239,68,68,0.12);  color: #f87171; }
.badge-other    { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.5); }
.badge-male     { background: rgba(59,130,246,0.15); color: #60a5fa; }
.badge-female   { background: rgba(236,72,153,0.15); color: #f472b6; }
.badge-intense  { background: rgba(255,140,0,0.15); color: var(--gold); }

/* ---- FAB (Floating Action Button) ---- */
.fab {
    position: fixed;
    bottom: 80px; /* nad bottom nav */
    right: 1.25rem;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--gold);
    color: #0D1117;
    font-size: 1.5rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(255,140,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 40;
}
.fab:hover {
    background: var(--gold-light);
    transform: scale(1.08);
    box-shadow: 0 6px 28px rgba(255,140,0,0.5);
}
@media (min-width: 1024px) {
    .fab { bottom: 1.5rem; right: 2rem; }
}

/* ============================================================
   MODAL
   ============================================================ */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(4px);
    z-index: 60;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
}
@media (min-width: 640px) {
    .modal-backdrop {
        align-items: center;
        padding: 1rem;
    }
}
.modal-box {
    background: #111520;
    border: 1px solid var(--border);
    border-radius: 1.5rem 1.5rem 0 0;
    width: 100%;
    max-width: 560px;
    max-height: 92vh;
    overflow-y: auto;
    padding: 1.5rem;
}
@media (min-width: 640px) {
    .modal-box {
        border-radius: 1.5rem;
        max-height: 85vh;
    }
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}
.modal-title {
    font-size: 1.1rem;
    font-weight: 700;
}
.modal-close {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    border: none;
    color: rgba(255,255,255,0.6);
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.modal-close:hover { background: rgba(255,255,255,0.14); color: #fff; }

/* ---- Gender toggle ---- */
.gender-toggle { display: flex; gap: 0.5rem; }
.gender-btn {
    flex: 1;
    padding: 0.7rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border);
    background: transparent;
    color: rgba(255,255,255,0.5);
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 44px;
}
.gender-btn:hover { border-color: rgba(255,255,255,0.2); color: #fff; }
.gender-btn.selected-male   { border-color: #60a5fa; background: rgba(59,130,246,0.12); color: #60a5fa; }
.gender-btn.selected-female { border-color: #f472b6; background: rgba(236,72,153,0.12); color: #f472b6; }
.gender-btn.selected-unknown { border-color: rgba(255,255,255,0.3); background: rgba(255,255,255,0.06); color: #fff; }

/* ---- Sekcja formularza ---- */
.form-section {
    border-top: 1px solid var(--border);
    margin-top: 1.25rem;
    padding-top: 1.25rem;
}
.form-section-title {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255,255,255,0.3);
    margin-bottom: 1rem;
}
.form-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.4rem;
}
.form-required { color: var(--gold); margin-left: 2px; }

/* ============================================================
   DRZEWO GENEALOGICZNE (Pedigree)
   ============================================================ */
.pedigree-wrap {
    overflow-x: auto;
    overflow-y: visible;
    padding: 1rem 0 1.5rem;
    -webkit-overflow-scrolling: touch;
}
.pedigree-tree {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0;
    min-width: max-content;
}
.pedigree-col {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    gap: 6px;
}
.pedigree-col + .pedigree-col {
    margin-left: 8px;
}
.pedigree-node {
    width: 110px;
    min-height: 58px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 0.65rem;
    padding: 0.5rem 0.6rem;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: block;
}
.pedigree-node:hover { border-color: rgba(255,140,0,0.5); background: rgba(255,140,0,0.06); }
.pedigree-node.pedigree-empty {
    border-style: dashed;
    border-color: rgba(255,255,255,0.1);
    background: transparent;
    cursor: default;
}
.pedigree-node.pedigree-root {
    border-color: var(--gold);
    background: rgba(255,140,0,0.08);
    width: 120px;
}
.pedigree-node-ring {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--gold);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pedigree-node-info {
    font-size: 0.62rem;
    color: rgba(255,255,255,0.4);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pedigree-connector {
    width: 16px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

/* ============================================================
   PROFIL PTAKA (ptak.html)
   ============================================================ */
.bird-hero-photo {
    width: 120px;
    height: 120px;
    border-radius: 1.25rem;
    object-fit: cover;
    background: rgba(255,255,255,0.06);
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    flex-shrink: 0;
    overflow: hidden;
}
.bird-hero-photo img {
    width: 100%; height: 100%;
    object-fit: cover;
}
.data-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.7rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    gap: 1rem;
}
.data-row:last-child { border-bottom: none; }
.data-key {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.4);
    flex-shrink: 0;
    min-width: 100px;
}
.data-val {
    font-size: 0.85rem;
    color: #fff;
    text-align: right;
    word-break: break-word;
}

/* ---- Photo upload preview ---- */
.photo-upload-area {
    border: 2px dashed var(--border);
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s;
    position: relative;
}
.photo-upload-area:hover { border-color: var(--gold); }
.photo-upload-area input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}
.photo-preview {
    width: 80px;
    height: 80px;
    border-radius: 0.75rem;
    object-fit: cover;
    margin: 0 auto 0.5rem;
    display: none;
}
.photo-preview.visible { display: block; }

/* ============================================================
   SELECT — custom strzałka (usuwa natywny styl przeglądarki)
   ============================================================ */
select.input-field {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.3)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.85rem center;
    padding-right: 2.5rem;
    cursor: pointer;
}
select.input-field option {
    background: #111520;
    color: #fff;
}

/* ============================================================
   WIDOK LISTY — przełącznik + wiersze
   ============================================================ */
.view-btn {
    width: 34px;
    height: 34px;
    border-radius: 0.6rem;
    border: 1px solid rgba(255,255,255,0.1);
    background: transparent;
    color: rgba(255,255,255,0.4);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-family: 'Outfit', sans-serif;
}
.view-btn:hover { border-color: rgba(255,255,255,0.25); color: #fff; }
.view-btn.active {
    background: rgba(255,140,0,0.15);
    border-color: rgba(255,140,0,0.4);
    color: var(--gold);
}

.bird-list-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 0.875rem;
    padding: 0.65rem 0.75rem;
    text-decoration: none;
    color: #fff;
    transition: all 0.2s;
}
.bird-list-item:hover {
    border-color: rgba(255,140,0,0.4);
    background: rgba(255,140,0,0.04);
}
.bird-list-item .bird-card-photo {
    width: 40px;
    height: 40px;
    border-radius: 0.5rem;
    flex-shrink: 0;
    aspect-ratio: 1;
}
.bird-list-body {
    flex: 1;
    min-width: 0;
}
.bird-list-badges {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
    flex-shrink: 0;
}
.bird-list-arrow {
    color: rgba(255,255,255,0.25);
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-left: 2px;
}

/* ============================================================
   PARENT SEARCH (wyszukiwarka ojca / matki)
   ============================================================ */
.parent-search {
    position: relative;
}
.parent-selected {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,140,0,0.08);
    border: 1px solid rgba(255,140,0,0.3);
    border-radius: 0.875rem;
    padding: 0.75rem 1rem;
    min-height: 44px;
}
.parent-selected-text {
    flex: 1;
    font-size: 0.9rem;
    color: #fff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.parent-clear-btn {
    background: rgba(255,255,255,0.08);
    border: none;
    color: rgba(255,255,255,0.5);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.15s;
}
.parent-clear-btn:hover { background: rgba(255,255,255,0.14); color: #fff; }
.parent-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0; right: 0;
    background: #111520;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 0.875rem;
    z-index: 100;
    max-height: 220px;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
.parent-result {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 0.9rem;
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.parent-result:last-child { border-bottom: none; }
.parent-result:hover { background: rgba(255,255,255,0.06); }
.parent-result-text {
    flex: 1;
    font-size: 0.85rem;
    color: #fff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.parent-add-archive {
    display: block;
    width: 100%;
    padding: 0.65rem 0.9rem;
    text-align: left;
    background: transparent;
    border: none;
    border-top: 1px dashed rgba(255,140,0,0.2);
    color: var(--gold);
    font-size: 0.85rem;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    transition: background 0.15s;
}
.parent-add-archive:hover { background: rgba(255,140,0,0.06); }
.parent-no-results {
    padding: 0.65rem 0.9rem;
    font-size: 0.82rem;
    color: rgba(255,255,255,0.3);
    text-align: center;
}

/* ============================================================
   RODOWÓD PIONOWY (drzewo genealogiczne w dół)
   ============================================================ */
.pedigree-wrap {
    overflow-x: auto;
    overflow-y: visible;
    padding: 0.5rem 0 1rem;
    -webkit-overflow-scrolling: touch;
}
.pedigree-tree-vertical {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.pedigree-row-label {
    font-size: 0.58rem;
    color: rgba(255,255,255,0.22);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 6px 2px 2px;
    white-space: nowrap;
}
.pedigree-row {
    display: flex;
    flex-direction: row;
    gap: 4px;
    align-items: stretch;
}
/* W układzie pionowym węzły rozciągają się poziomo */
.pedigree-tree-vertical .pedigree-node {
    flex: 1;
    min-width: 80px;
    width: auto;
}
.pedigree-tree-vertical .pedigree-root {
    width: auto;
}

/* ============================================================
   RODOWÓD — Hodowca w węźle (pedigree-node-breeder)
   ============================================================ */
.pedigree-node-breeder {
    font-size: 0.58rem;
    color: rgba(255,255,255,0.28);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-style: italic;
}

/* ============================================================
   BANER POKREWIEŃSTWA (cele-legowe.html)
   ============================================================ */
.kinship-banner-base {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    border-radius: 0.6rem;
    padding: 0.65rem 0.85rem;
    font-size: 0.8rem;
}
.kinship-banner-danger {
    background: rgba(239,68,68,0.08);
    border: 1px solid rgba(239,68,68,0.3);
}
.kinship-banner-warning {
    background: rgba(255,140,0,0.08);
    border: 1px solid rgba(255,140,0,0.3);
}
.kinship-banner-info {
    background: rgba(99,102,241,0.08);
    border: 1px solid rgba(99,102,241,0.25);
}
.kinship-banner-none {
    background: rgba(16,185,129,0.08);
    border: 1px solid rgba(16,185,129,0.2);
}
.kinship-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 1px;
}
.kinship-label {
    font-weight: 600;
    color: #fff;
}
.kinship-coi {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.5);
    margin-top: 2px;
}
.kinship-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.15);
    border-top-color: var(--gold, #D4AF37);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    flex-shrink: 0;
    margin-left: auto;
    align-self: center;
}

/* ============================================================
   PARY LĘGOWE / CELE LĘGOWE (pary.html → cele-legowe.html)
   ============================================================ */
.pair-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.07);
    border-left: 3px solid #FF8C00;
    border-radius: 1rem;
    padding: 1rem;
    margin-bottom: 0.75rem;
}
.pair-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.6rem;
}
.pair-card-cage {
    font-size: 0.9rem;
    font-weight: 700;
    color: #FF8C00;
}
.pair-card-season {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.4);
}
.pair-card-species {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.35);
    margin-bottom: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.pair-bird-row {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    padding: 0.3rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.pair-bird-row:last-of-type { border-bottom: none; }
.pair-bird-gender {
    font-size: 0.9rem;
    flex-shrink: 0;
}
.pair-bird-ring {
    font-size: 0.82rem;
    font-weight: 600;
    color: #fff;
}
.pair-bird-mutation {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.45);
}
.pair-bird-breeder {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.3);
    font-style: italic;
    margin-left: auto;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100px;
}
.pair-parents-section {
    margin-top: 0.6rem;
    padding-top: 0.6rem;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.pair-parents-label {
    font-size: 0.65rem;
    color: rgba(255,255,255,0.3);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-bottom: 0.3rem;
}
.pair-parents-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.3rem 0.6rem;
}
.pair-parent-cell {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.5);
}
.pair-parent-cell strong {
    color: rgba(255,255,255,0.75);
    font-weight: 600;
}
.pair-clutch-strip {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.6rem;
    border-top: 1px solid rgba(255,255,255,0.07);
    flex-wrap: wrap;
}
.pair-clutch-count {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.4);
    margin-right: auto;
}
.btn-pair-action {
    font-size: 0.72rem;
    padding: 0.3rem 0.7rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(255,140,0,0.3);
    color: #FF8C00;
    background: rgba(255,140,0,0.06);
    cursor: pointer;
    transition: all 0.18s;
    font-family: 'Outfit', sans-serif;
    min-height: 32px;
}
.btn-pair-action:hover {
    background: rgba(255,140,0,0.14);
    border-color: rgba(255,140,0,0.55);
}
.btn-pair-delete {
    font-size: 0.72rem;
    padding: 0.3rem 0.5rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(239,68,68,0.2);
    color: rgba(239,68,68,0.6);
    background: transparent;
    cursor: pointer;
    transition: all 0.18s;
    font-family: 'Outfit', sans-serif;
    min-height: 32px;
}
.btn-pair-delete:hover {
    color: rgb(239,68,68);
    border-color: rgba(239,68,68,0.5);
    background: rgba(239,68,68,0.06);
}

/* ============================================================
   GNIAZDO — KARTA LĘGU (gniazdo.html)
   ============================================================ */
.clutch-meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem 1rem;
    margin-bottom: 1rem;
}
.clutch-meta-item {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}
.clutch-meta-label {
    font-size: 0.62rem;
    color: rgba(255,255,255,0.3);
    text-transform: uppercase;
    letter-spacing: 0.07em;
}
.clutch-meta-value {
    font-size: 0.88rem;
    font-weight: 600;
    color: #fff;
}
.clutch-meta-hint {
    font-size: 0.62rem;
    color: rgba(255,140,0,0.6);
    font-style: italic;
}
.clutch-section-title {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: rgba(255,255,255,0.3);
    margin-bottom: 0.5rem;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid rgba(255,255,255,0.07);
}
.chick-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.8rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 0.6rem;
    margin-bottom: 0.4rem;
    cursor: pointer;
    transition: border-color 0.18s, background 0.18s;
    min-height: 44px;
}
.chick-row:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.12);
}
.chick-gender-icon {
    font-size: 1rem;
    flex-shrink: 0;
    width: 22px;
    text-align: center;
}
.chick-ring {
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
    min-width: 80px;
}
.chick-mutation {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.45);
    flex: 1;
}
.chick-date {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.3);
    white-space: nowrap;
}
