/* =========================================================
   Duvar.org - Tasarım Sistemi
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Lora:ital,wght@0,400;0,500;0,600;1,400&display=swap');

:root {
    --brand: #3d5afe;
    --brand-dark: #2541d6;
    --brand-light: #eef1ff;

    --ink: #0f172a;
    --ink-soft: #475569;
    --muted: #94a3b8;

    --bg: #f7f8fa;
    --surface: #ffffff;
    --border: #edf0f4;
    --border-hover: #dde1e8;

    --radius-sm: 8px;
    --radius: 14px;
    --radius-lg: 20px;

    --shadow-sm: 0 1px 2px rgba(15, 23, 42, .04);
    --shadow: 0 2px 12px rgba(15, 23, 42, .05);
    --shadow-lg: 0 12px 32px rgba(15, 23, 42, .08);

    --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-serif: 'Lora', Georgia, 'Times New Roman', serif;

    /* Admin panel istatistik ikonları için renk paleti */
    --cat0-bg: #eff6ff; --cat0-fg: #1d4ed8;
    --cat2-bg: #f0fdf4; --cat2-fg: #16a34a;
    --cat4-bg: #faf5ff; --cat4-fg: #9333ea;
}

/* Karanlık mod renk değişkenleri */
[data-theme="dark"] {
    --brand-light: rgba(61, 90, 254, .18);

    --ink: #f1f5f9;
    --ink-soft: #cbd5e1;
    --muted: #7c8aa3;

    --bg: #0b1220;
    --surface: #161e30;
    --border: #2a3650;
    --border-hover: #3a4a6b;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow: 0 2px 12px rgba(0, 0, 0, .35);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, .5);

    --cat0-bg: rgba(29, 78, 216, .18); --cat0-fg: #60a5fa;
    --cat2-bg: rgba(22, 163, 74, .18); --cat2-fg: #4ade80;
    --cat4-bg: rgba(147, 51, 234, .18); --cat4-fg: #c084fc;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg);
    color: var(--ink);
    font-family: var(--font-sans);
    font-size: 15.5px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    transition: background-color .2s ease, color .2s ease;
}

.site-header,
.sidebar-card,
.post-card,
.article-card,
.related-news,
.admin-stat-card,
.card,
.login-card,
.admin-sidebar,
.detail-source-link,
.post-category-badge,
.scroll-top-btn,
.site-sidebar {
    transition: background-color .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease;
}

@keyframes page-fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

a {
    color: var(--brand);
    text-decoration: none;
}

a:hover {
    color: var(--brand-dark);
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--ink);
}

/* =========================================================
   Bootstrap bileşen düzeltmeleri (admin + genel)
   ========================================================= */

.btn {
    border-radius: 999px;
    font-weight: 600;
    padding: 0.5rem 1.25rem;
    transition: all .15s ease;
}

.btn-sm {
    padding: 0.3rem 0.9rem;
    border-radius: 999px;
}

.btn-primary {
    background-color: var(--brand);
    border-color: var(--brand);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--brand-dark);
    border-color: var(--brand-dark);
}

.btn-outline-primary {
    color: var(--brand);
    border-color: var(--brand);
}

.btn-outline-primary:hover {
    background-color: var(--brand);
    border-color: var(--brand);
}

.btn-outline-secondary {
    border-color: var(--border);
    color: var(--ink-soft);
}

.btn-outline-secondary:hover {
    background-color: var(--ink);
    border-color: var(--ink);
    color: #fff;
}

.btn-success {
    background-color: #16a34a;
    border-color: #16a34a;
}

.card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.table {
    --bs-table-bg: transparent;
}

.table thead th {
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: .06em;
    color: var(--muted);
    border-bottom: 2px solid var(--border);
    font-weight: 700;
}

.table td, .table th {
    vertical-align: middle;
    border-color: var(--border);
}

.badge {
    font-weight: 600;
    border-radius: 999px;
    padding: 0.35em 0.7em;
}

.form-control, .form-select {
    border-radius: var(--radius-sm);
    border-color: var(--border);
    padding: 0.55rem 0.85rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 0.2rem rgba(61, 90, 254, .12);
}

.alert {
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
}

.alert-info {
    background-color: #eff6ff;
    color: #1d4ed8;
}

.alert-success {
    background-color: #f0fdf4;
    color: #15803d;
}

.alert-danger {
    background-color: #fef2f2;
    color: #b91c1c;
}

.alert-warning {
    background-color: #fffbeb;
    color: #b45309;
}

.alert-secondary {
    background-color: #f1f5f9;
    color: var(--ink-soft);
}

.pagination .page-link {
    border-radius: 999px !important;
    margin: 0 3px;
    border: 1px solid var(--border);
    color: var(--ink-soft);
}

.pagination .page-item.active .page-link {
    background-color: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

/* =========================================================
   Genel Sayfa Düzeni (Public)
   ========================================================= */

.container {
    max-width: 1036px;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.site-header .navbar {
    padding: 1.15rem 0;
}

.site-header .navbar-brand {
    font-family: var(--font-sans);
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -0.02em;
    color: var(--ink);
    display: flex;
    align-items: center;
    gap: 8px;
}

.site-header .navbar-brand .site-logo {
    height: 40px;
    width: auto;
    display: block;
}

.site-header .navbar-left,
.site-header .navbar-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.earthquake-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    background: var(--bg);
    color: var(--ink-soft);
    font-weight: 600;
    font-size: 0.85rem;
    white-space: nowrap;
    transition: background-color .15s ease, color .15s ease;
}

.earthquake-link:hover {
    background: var(--brand-light);
    color: var(--brand);
}

.hamburger-btn,
.theme-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    border: none;
    background: transparent;
    border-radius: 10px;
    color: var(--ink-soft);
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease;
}

.hamburger-btn:hover,
.theme-toggle-btn:hover {
    background: var(--bg);
    color: var(--ink);
}

.hamburger-btn {
    display: none;
    flex-direction: column;
    gap: 4px;
}

.hamburger-btn span {
    display: block;
    width: 19px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: transform .2s ease, opacity .2s ease;
}

.hamburger-btn[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.hamburger-btn[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.hamburger-btn[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

.theme-toggle-btn .icon-moon {
    display: block;
}

.theme-toggle-btn .icon-sun {
    display: none;
}

[data-theme="dark"] .theme-toggle-btn .icon-moon {
    display: none;
}

[data-theme="dark"] .theme-toggle-btn .icon-sun {
    display: block;
}

.sidebar-overlay {
    display: none;
}

.sidebar-close-btn {
    display: none;
}

/* =========================================================
   Sayfa Düzeni: Sidebar + İçerik
   ========================================================= */

.site-shell {
    display: flex;
    align-items: flex-start;
    gap: 32px;
    padding-top: 28px;
    padding-bottom: 64px;
}

.site-sidebar {
    width: 300px;
    flex-shrink: 0;
    position: sticky;
    top: 104px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.sidebar-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 22px 18px;
}

.sidebar-card-meta {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 4px 0;
}

.sidebar-heading {
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    font-weight: 700;
    color: var(--ink);
    padding: 0 4px 14px;
    margin-bottom: 8px;
    border-bottom: 2px solid var(--brand);
    display: inline-block;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 11px 14px;
    border-radius: 9px;
    color: var(--ink-soft);
    font-weight: 500;
    font-size: 0.96rem;
    line-height: 1.3;
    text-decoration: none;
    transition: background-color .15s ease, color .15s ease, padding-left .15s ease;
}

.sidebar-link:hover {
    background: var(--bg);
    color: var(--ink);
    padding-left: 18px;
}

.sidebar-link.active {
    background: var(--brand-light);
    color: var(--brand);
    font-weight: 700;
}

.sidebar-sublist {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 2px 0 6px 10px;
    padding-left: 10px;
    border-left: 2px solid var(--border);
}

.sidebar-sublist .sidebar-link {
    font-size: 0.89rem;
    padding: 8px 12px;
}

.sidebar-sublist .sidebar-link:hover {
    padding-left: 16px;
}

.sidebar-nav-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
}

.sidebar-nav-meta a {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--muted);
    text-decoration: none;
}

.sidebar-nav-meta a:hover {
    color: var(--brand);
}

.sidebar-meta-copyright {
    margin-top: 10px;
    font-size: 0.78rem;
    color: var(--muted);
    line-height: 1.5;
}

.site-main {
    flex: 1;
    min-width: 0;
    animation: page-fade-in .4s ease both;
}

/* =========================================================
   Akış / Feed
   ========================================================= */

.feed-wrapper {
    max-width: 760px;
}

.section-heading {
    font-size: 1.4rem;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-heading .bar {
    width: 6px;
    height: 22px;
    background: var(--brand);
    border-radius: 4px;
    display: inline-block;
}

/* Haber kartı (post-card) - tweet tarzı satır */
.post-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 30px 28px 22px;
    margin-bottom: 18px;
    display: flex;
    gap: 18px;
    text-decoration: none;
    color: inherit;
    transition: box-shadow .2s ease, border-color .2s ease;
}

.post-card:hover {
    box-shadow: var(--shadow);
    border-color: var(--border-hover);
    color: inherit;
}

.post-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--bg);
    border: 1px solid var(--border);
}

.post-body {
    flex: 1;
    min-width: 0;
}

.post-header {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 4px;
    min-height: 46px;
}

.post-source-name {
    font-weight: 700;
    color: var(--ink);
    font-size: 0.95rem;
}

.post-header .post-category-badge,
.article-source-card .post-category-badge {
    margin-left: auto;
}

.post-category-badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.72rem;
    letter-spacing: 0.01em;
    font-weight: 600;
    padding: 4px 11px;
    border-radius: 7px;
    background: var(--bg);
    color: var(--ink-soft);
    white-space: nowrap;
}

.post-time {
    color: var(--muted);
    font-size: 0.82rem;
}

.post-title {
    font-weight: 700;
    font-size: 1.02rem;
    margin-top: 14px;
    margin-bottom: 16px;
    color: var(--ink);
    line-height: 1.4;
}

.post-summary {
    color: var(--ink-soft);
    font-size: 0.92rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    margin-top: 10px;
}

/* Admin panel istatistik ikon renkleri */
.admin-stat-card .stat-icon.cat-c0 { background: var(--cat0-bg); color: var(--cat0-fg); }
.admin-stat-card .stat-icon.cat-c2 { background: var(--cat2-bg); color: var(--cat2-fg); }
.admin-stat-card .stat-icon.cat-c4 { background: var(--cat4-bg); color: var(--cat4-fg); }

/* =========================================================
   Haber Detay Sayfası
   ========================================================= */

.article-wrapper {
    max-width: 760px;
}

.article-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px 36px;
}

.article-cover {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
    border: 1px solid var(--border);
}

.article-source-card {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.article-source-card .post-avatar {
    width: 52px;
    height: 52px;
}

.article-source-card .source-name {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--ink);
}

.article-source-card .source-meta {
    color: var(--muted);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.article-title {
    font-family: var(--font-sans);
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 16px;
    color: var(--ink);
}

.article-content {
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 400;
    line-height: 1.7;
    color: var(--ink-soft);
}

.article-content p {
    margin-bottom: 1.2em;
    font-size: inherit;
    font-weight: inherit;
}

.article-content strong,
.article-content b {
    font-weight: 400;
    color: inherit;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4 {
    font-family: var(--font-sans);
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.4;
    margin: 1.4em 0 0.6em;
    color: var(--ink-soft);
}

/* RSS kaynaklarından gelen etiketler ne olursa olsun (h1-h4, span, font vb.)
   metin ağırlığı ve rengi her zaman gövde metniyle aynı kalsın */
.article-content *:not(a) {
    font-weight: inherit !important;
    color: inherit !important;
    font-size: inherit;
}

.article-content h2 {
    font-weight: 800 !important;
    color: var(--ink) !important;
}

.article-content ul,
.article-content ol {
    margin-bottom: 1.2em;
    padding-left: 1.4em;
}

.article-content li {
    margin-bottom: 0.4em;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    margin: 1.2em 0;
}

.article-content a {
    text-decoration: underline;
    text-decoration-color: var(--brand-light);
}

.article-content blockquote {
    border-left: 4px solid var(--brand);
    padding-left: 1em;
    color: var(--ink-soft);
    font-style: italic;
    margin: 1.5em 0;
}

/* Paylaşım butonları */
.share-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 28px;
}

.share-label {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--ink-soft);
    margin-right: 2px;
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--surface);
    color: var(--ink-soft);
    cursor: pointer;
    padding: 0;
    transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}

.share-btn:hover {
    background: var(--brand-light);
    color: var(--brand);
    border-color: var(--brand-light);
}

.share-copy .icon-check {
    display: none;
}

.share-copy.is-copied .icon-link {
    display: none;
}

.share-copy.is-copied .icon-check {
    display: block;
}

.share-copy.is-copied {
    color: #16a34a;
    border-color: #16a34a;
}

/* RSS sayfası: kategori bazlı feed linkleri */
.rss-feed-list {
    list-style: none;
    padding: 0;
    margin: 16px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rss-feed-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 14px 18px;
    background-color: var(--bg);
    border: 1px solid var(--border);
    color: var(--ink) !important;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}

.rss-feed-link:hover {
    background-color: var(--brand-light);
    border-color: var(--brand-light);
    color: var(--brand) !important;
}

.rss-feed-link-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand);
    flex-shrink: 0;
}

.detail-source-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 32px;
    padding: 16px 20px;
    background-color: var(--bg);
    border: 1px solid var(--border);
    color: var(--ink) !important;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.92rem;
    transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}

.detail-source-link:hover {
    background-color: var(--brand-light);
    border-color: var(--brand-light);
    color: var(--brand) !important;
}

.detail-source-link-arrow {
    flex-shrink: 0;
    transition: transform .15s ease;
}

.detail-source-link:hover .detail-source-link-arrow {
    transform: translateX(3px);
}

.related-news {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 32px;
    margin-top: 24px;
}

.related-news .section-heading {
    font-size: 1rem;
    margin-bottom: 12px;
}

.related-news .section-heading .bar {
    width: 4px;
    height: 16px;
}

.simple-news-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.simple-news-list li {
    border-bottom: 1px solid var(--border);
}

.simple-news-list li:last-child {
    border-bottom: none;
}

.simple-news-list a {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0;
    text-decoration: none;
    color: inherit;
    transition: color .15s ease;
}

.simple-news-list a:hover {
    color: var(--brand);
}

.simple-news-title {
    font-weight: 600;
    font-size: 0.96rem;
    color: var(--ink);
    line-height: 1.45;
}

.simple-news-list a:hover .simple-news-title {
    color: var(--brand);
}

.simple-news-time {
    flex-shrink: 0;
    color: var(--muted);
    font-size: 0.82rem;
    white-space: nowrap;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--ink-soft);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.back-link:hover {
    color: var(--brand);
}

/* =========================================================
   Footer
   ========================================================= */

.site-footer {
    color: var(--muted);
    font-size: 0.85rem;
}

.site-footer-inner {
    text-align: center;
    padding: 32px 0;
    margin-top: 24px;
    border-top: 1px solid var(--border);
}

/* Yukarı çık butonu */
.scroll-top-btn {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 46px;
    height: 46px;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--surface);
    color: var(--ink-soft);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 80;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s ease,
        background-color .2s ease, color .2s ease, border-color .2s ease;
}

.scroll-top-btn.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top-btn:hover {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

@media (max-width: 768px) {
    .scroll-top-btn {
        right: 16px;
        bottom: 16px;
        width: 42px;
        height: 42px;
    }
}

/* Lazy load göstergesi */
.feed-loading {
    text-align: center;
    padding: 24px 0;
    color: var(--muted);
    font-size: 0.85rem;
}

/* =========================================================
   Admin Panel
   ========================================================= */

.admin-shell {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 240px;
    flex-shrink: 0;
    background: var(--surface);
    color: var(--ink);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
}

.admin-sidebar .sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 22px 20px;
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--ink);
    border-bottom: 1px solid var(--border);
}

.admin-sidebar .sidebar-brand .site-logo {
    height: 26px;
    width: auto;
    display: block;
}

.admin-sidebar nav {
    flex: 1;
    padding: 14px 12px;
}

.admin-sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--ink-soft);
    padding: 11px 14px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.92rem;
    margin-bottom: 2px;
    transition: all .15s ease;
}

.admin-sidebar .nav-link:hover {
    background: var(--bg);
    color: var(--ink);
}

.admin-sidebar .nav-link.active {
    background: var(--brand-light);
    color: var(--brand);
}

.admin-sidebar .sidebar-footer {
    padding: 14px 12px;
    border-top: 1px solid var(--border);
}

.admin-main {
    flex: 1;
    min-width: 0;
    padding: 32px;
}

.admin-page-title {
    font-size: 1.6rem;
    margin-bottom: 4px;
}

.admin-stat-card {
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--surface);
    padding: 22px;
    box-shadow: var(--shadow-sm);
}

.admin-stat-card .stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-bottom: 14px;
    background: var(--bg);
}

.admin-stat-card .stat-value {
    font-size: 1.9rem;
    font-weight: 800;
    color: var(--ink);
}

.admin-stat-card .stat-label {
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 600;
}

/* =========================================================
   Admin Login
   ========================================================= */

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    padding: 20px;
}

.login-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 40px;
    width: 100%;
    max-width: 380px;
}

.login-card .login-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.4rem;
    margin-bottom: 4px;
}

.login-card .login-brand .site-logo {
    height: 32px;
    width: auto;
    display: block;
}

.login-card .login-subtitle {
    color: var(--muted);
    font-size: 0.9rem;
    margin-bottom: 24px;
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 900px) {
    .hamburger-btn {
        display: flex;
    }

    .site-shell {
        flex-direction: column;
        gap: 0;
        padding-top: 16px;
    }

    /* Sidebar artık mobilde ekranın üstünde değil; hamburger menüyle açılan
       soldan kayan bir "drawer" (off-canvas panel) olarak gösterilir. */
    .site-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 280px;
        max-width: 82vw;
        z-index: 1001;
        background: var(--surface);
        box-shadow: var(--shadow-lg);
        padding: 18px;
        overflow-y: auto;
        transform: translateX(-100%);
        transition: transform .25s ease;
    }

    .sidebar-close-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        top: 14px;
        right: 14px;
        width: 36px;
        height: 36px;
        border: none;
        background: var(--bg);
        border-radius: 50%;
        color: var(--ink-soft);
        cursor: pointer;
        z-index: 1;
        transition: background-color .15s ease, color .15s ease;
    }

    .sidebar-close-btn:hover {
        background: var(--brand-light);
        color: var(--brand);
    }

    .earthquake-link-text {
        display: none;
    }

    .earthquake-link {
        padding: 0.4rem;
        width: 38px;
        height: 38px;
        justify-content: center;
    }

    .site-sidebar.is-open {
        transform: translateX(0);
    }

    .sidebar-card {
        border: none;
        box-shadow: none;
        padding: 4px 2px;
    }

    .sidebar-heading {
        display: inline-block;
    }

    .sidebar-link {
        white-space: normal;
    }

    /* Hamburger menü açıkken sayfanın arkasını karartan örtü */
    .sidebar-overlay {
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, .45);
        z-index: 1000;
        opacity: 0;
        visibility: hidden;
        transition: opacity .25s ease, visibility .25s ease;
    }

    .sidebar-overlay.is-open {
        display: block;
        opacity: 1;
        visibility: visible;
    }

    body.sidebar-open {
        overflow: hidden;
    }
}

@media (max-width: 768px) {
    .post-card {
        padding: 16px 20px 20px 16px;
        gap: 12px;
    }

    .article-card {
        padding: 20px;
    }

    .related-news {
        padding: 20px;
    }

    .admin-shell {
        flex-direction: column;
    }

    .admin-sidebar {
        width: 100%;
        height: auto;
        position: relative;
        flex-direction: row;
        align-items: center;
        overflow-x: auto;
    }

    .admin-sidebar .sidebar-brand {
        border-bottom: none;
        border-right: 1px solid rgba(255,255,255,.08);
        flex-shrink: 0;
    }

    .admin-sidebar nav {
        display: flex;
        padding: 8px;
        overflow-x: auto;
    }

    .admin-sidebar .nav-link {
        white-space: nowrap;
        margin-bottom: 0;
        margin-right: 4px;
    }

    .admin-sidebar .sidebar-footer {
        border-top: none;
        border-left: 1px solid rgba(255,255,255,.08);
        flex-shrink: 0;
    }

    .admin-main {
        padding: 18px;
    }
}
