/* ========================================
   Paylaşılan sayfa stilleri
   Tüm sayfalarda ortak kullanılan sınıflar
   ======================================== */

/* ── Yakında Geliyor bileşeni ──────────────────────────────────────────── */
.yaklinda-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3rem 1.5rem 4rem;
    gap: .75rem;
}

.yaklinda-svg {
    width: 160px;
    height: auto;
    margin-bottom: .5rem;
    animation: yaklinda-sway 4s ease-in-out infinite;
    transform-origin: 130px 210px;
}

@keyframes yaklinda-sway {
    0%, 100% { transform: rotate(0deg); }
    30%       { transform: rotate(3deg); }
    70%       { transform: rotate(-2.5deg); }
}

.yaklinda-ikon-wrap {
    font-size: 2.2rem;
    color: var(--accent);
    line-height: 1;
    animation: yaklinda-tick 2s steps(12, end) infinite;
}

@keyframes yaklinda-tick {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.yaklinda-baslik {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-1);
    margin: .25rem 0 0;
}

.yaklinda-mesaj {
    font-size: .9rem;
    line-height: 1.75;
    color: var(--text-2);
    margin: 0 0 .75rem;
}

.yaklinda-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: .5rem 1.3rem;
    border: 1.5px solid var(--accent);
    border-radius: 20px;
    color: var(--accent);
    font-size: .88rem;
    font-weight: 600;
    text-decoration: none;
    transition: background .15s, color .15s;
}
.yaklinda-btn:hover {
    background: var(--accent);
    color: #fff;
}
/* ─────────────────────────────────────────────────────────────────────── */

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.82rem;
    color: var(--color-muted);
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}
.breadcrumb a {
    color: var(--color-primary);
    text-decoration: none;
}
.breadcrumb a:hover { text-decoration: underline; }
.bc-sep { font-size: 0.7rem; opacity: 0.5; }

/* Sayfa başlığı */
.page-header { margin-bottom: 1.25rem; display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.page-title { font-size: 1.7rem; font-weight: 700; margin: 0 0 .3rem; }
.page-subtitle { font-size: .9rem; color: var(--color-muted); margin: 0; }

/* Sayfa başlığındaki birincil eylem butonu (örn. "Yeni Kayıt") */
.btn-yeni-kayit {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: .5rem 1.1rem;
    border-radius: 8px;
    background: var(--color-primary);
    color: #fff;
    font-size: .88rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: filter .15s;
}
.btn-yeni-kayit:hover { filter: brightness(1.08); }

/* Filtre paneli */
.filter-panel {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: .75rem;
}
.filter-search {
    position: relative;
    max-width: 360px;
}
.search-icon {
    position: absolute;
    left: .75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-muted);
    pointer-events: none;
}
.filter-input {
    width: 100%;
    padding: .55rem .75rem .55rem 2.2rem;
    border: 1px solid var(--color-border);
    border-radius: 7px;
    background: var(--color-bg);
    color: var(--color-text);
    font-size: .9rem;
}
.filter-input:focus { outline: none; border-color: var(--color-primary); }
.filter-row {
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
}
.filter-select {
    padding: .5rem .75rem;
    border: 1px solid var(--color-border);
    border-radius: 7px;
    background: var(--color-bg);
    color: var(--color-text);
    font-size: .9rem;
    min-width: 180px;
}
.filter-tags {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}
.tag-btn {
    padding: .35rem .85rem;
    border: 1.5px solid var(--color-border);
    border-radius: 20px;
    background: transparent;
    color: var(--color-muted);
    font-size: .82rem;
    cursor: pointer;
    transition: all .15s;
}
.tag-btn:hover, .tag-btn.active {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: color-mix(in srgb, var(--color-primary) 8%, transparent);
}

/* Sonuç bilgisi */
.result-info {
    font-size: .85rem;
    color: var(--color-muted);
    margin: 0 0 .75rem;
}

/* Tablo */
.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    margin-bottom: 1rem;
}
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .875rem;
}
.data-table thead th {
    padding: .65rem 1rem;
    text-align: left;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .04em;
    color: var(--color-muted);
    border-bottom: 1px solid var(--color-border);
    white-space: nowrap;
    user-select: none;
}
.data-table th.sortable { cursor: pointer; }
.data-table th.sortable:hover { color: var(--color-text); }
.sort-icon { font-size: .85rem; vertical-align: middle; opacity: .4; }
.sort-icon.active { opacity: 1; color: var(--color-primary); }
.data-table tbody tr {
    border-bottom: 1px solid var(--color-border);
    transition: background .12s;
}
.data-table tbody tr:last-child { border-bottom: none; }
.data-table tbody tr.clickable-row { cursor: pointer; }
.data-table tbody tr.clickable-row:hover { background: var(--color-hover); }
.data-table td {
    padding: .6rem 1rem;
    vertical-align: middle;
}
.scientific-name { font-weight: 500; }
.num-cell { text-align: right; }
.herb-count {
    background: color-mix(in srgb, var(--color-primary) 12%, transparent);
    color: var(--color-primary);
    font-size: .8rem;
    font-weight: 600;
    padding: .1rem .45rem;
    border-radius: 10px;
}
.table-link { color: var(--color-primary); text-decoration: none; }
.table-link:hover { text-decoration: underline; }
.table-link.italic { font-style: italic; }
.loading-cell, .empty-cell {
    text-align: center;
    padding: 2rem;
    color: var(--color-muted);
}

/* Badge'ler */
.badge {
    display: inline-block;
    padding: .15rem .55rem;
    border-radius: 12px;
    font-size: .75rem;
    font-weight: 600;
    white-space: nowrap;
}
.badge.badge-endemik { background: #e0f2f1 !important; color: #00695c !important; border: none !important; }
.badge.badge-tibbi   { background: #e8f5e9 !important; color: #2e7d32 !important; border: none !important; }
.badge.badge-toksik  { background: #fce4ec !important; color: #b71c1c !important; border: none !important; }
.badge.badge-iucn    { font-weight: 700 !important; }
.badge.badge-iucn-lc { background: #e3f2fd !important; color: #1565c0 !important; border: none !important; }
.badge.badge-iucn-vu { background: #fffde7 !important; color: #f57f17 !important; border: none !important; }
.badge.badge-iucn-en { background: #ffebee !important; color: #b71c1c !important; border: none !important; }
html.dark .badge.badge-endemik { background: #00352d !important; color: #80cbc4 !important; }
html.dark .badge.badge-tibbi   { background: #1b3c1b !important; color: #a5d6a7 !important; }
html.dark .badge.badge-toksik  { background: #3c1b1b !important; color: #ef9a9a !important; }
html.dark .badge.badge-iucn-lc { background: #0d2744 !important; color: #90caf9 !important; }
html.dark .badge.badge-iucn-vu { background: #2c2300 !important; color: #fff176 !important; }
html.dark .badge.badge-iucn-en { background: #3c0d0d !important; color: #ef9a9a !important; }

/* BitkiDetay & HerbaryumDetay badge renkleri */
.badge.b-green { background: #EAF3DE !important; color: #3B6D11 !important; border: none !important; }
.badge.b-amber { background: #FAEEDA !important; color: #854F0B !important; border: none !important; }
.badge.b-blue  { background: #E6F1FB !important; color: #185FA5 !important; border: none !important; }
.badge.b-red   { background: #FDECEA !important; color: #9B1C1C !important; border: none !important; }
.badge.b-gray  { background: var(--bg-surface2) !important; color: var(--text-2) !important; border: .5px solid var(--border) !important; }
html.dark .badge.b-green { background: #1a3a0a !important; color: #97C459 !important; }
html.dark .badge.b-amber { background: #3a2000 !important; color: #EF9F27 !important; }
html.dark .badge.b-blue  { background: #0a2040 !important; color: #85B7EB !important; }
html.dark .badge.b-red   { background: #3a0a0a !important; color: #F87171 !important; }

.row-badge {
    display: inline-flex;
    align-items: center;
    font-size: .7rem;
    padding: .1rem .3rem;
    border-radius: 8px;
    margin-left: 4px;
    vertical-align: middle;
}
.row-badge.tibbi  { background: #e8f5e9; color: #2e7d32; }
.row-badge.toksik { background: #fce4ec; color: #b71c1c; }

/* Sayfalama */
.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .75rem;
    padding: .75rem 0;
}
.page-info { font-size: .82rem; color: var(--color-muted); }
.page-btns { display: flex; gap: 4px; }
.page-btn {
    min-width: 32px;
    height: 32px;
    padding: 0 .4rem;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    background: var(--color-card);
    color: var(--color-text);
    font-size: .85rem;
    cursor: pointer;
    transition: all .12s;
}
.page-btn:hover:not(:disabled):not(.active) { border-color: var(--color-primary); color: var(--color-primary); }
.page-btn.active { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.page-btn:disabled { opacity: .35; cursor: default; }
.page-dots { display: flex; align-items: center; padding: 0 4px; color: var(--color-muted); }

/* Bölüm başlıkları */
.section { margin-top: 1.5rem; }
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: .75rem;
}
.section-title { font-size: 1rem; font-weight: 600; margin: 0 0 .75rem; display: flex; align-items: center; gap: 6px; }
.btn-link-sm { font-size: .82rem; color: var(--color-primary); text-decoration: none; }
.btn-link-sm:hover { text-decoration: underline; }

/* Örnek kartları (Bitkiler & HerbaryumDetay'da ortak) */
.sample-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: .75rem;
}
.sample-card {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: .75rem 1rem;
    text-decoration: none;
    color: var(--color-text);
    transition: border-color .15s, box-shadow .15s;
    display: block;
}
.sample-card:hover { border-color: var(--color-primary); box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.sample-code { font-weight: 700; color: var(--color-primary); font-size: .9rem; margin-bottom: .35rem; }
.sample-loc, .sample-date {
    font-size: .8rem;
    color: var(--color-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Leaflet harita */
.leaflet-map {
    height: 360px;
    border-radius: 10px;
    border: 1px solid var(--color-border);
    overflow: hidden;
}
.map-footer { font-size: .82rem; color: var(--color-muted); margin: .5rem 0 0; display: flex; align-items: center; gap: 5px; }

/* Loading / not found */
.loading-page, .not-found {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 4rem;
    color: var(--color-muted);
    gap: 1rem;
    font-size: .95rem;
}
.loading-page i, .not-found i { font-size: 2.5rem; }
.aciklama-text { font-size: .9rem; line-height: 1.7; color: var(--color-text); }

@keyframes spin { to { transform: rotate(360deg); } }
.spin { display: inline-block; animation: spin .8s linear infinite; }

/* Info kartlar (FamilyaDetay / CinsDetay) */
.info-card {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 1rem 1.25rem;
}
.mb-3 { margin-bottom: 1rem; }
.mt-2 { margin-top: .5rem; }
.info-card-title {
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--color-muted);
    margin-bottom: .75rem;
    display: flex;
    align-items: center;
    gap: 5px;
}
.info-card-title i { color: var(--color-primary); }
.info-rows { display: flex; flex-direction: column; gap: 0; }
.info-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 5px 0;
    border-bottom: 1px solid var(--color-border);
    font-size: .875rem;
    gap: 8px;
}
.info-row:last-child { border-bottom: none; }
.info-label {
    font-size: .78rem;
    color: var(--color-muted);
    white-space: nowrap;
    flex-shrink: 0;
}
.info-text { font-size: .9rem; line-height: 1.7; margin: 0; }

/* Cins grid (FamilyaDetay) */
.cins-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: .5rem;
    margin-top: .5rem;
}
.cins-card {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: .55rem .85rem;
    text-decoration: none;
    color: var(--color-text);
    transition: border-color .15s;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.cins-card:hover { border-color: var(--color-primary); }
.cins-ad { font-weight: 500; font-size: .875rem; color: var(--color-primary); }
.cins-sinonim { font-size: .78rem; color: var(--color-muted); }

