/**
 * SEO + Haber Sitesi Analiz ve Performans Platformu
 * Modern Dashboard & SaaS UI Stilleri (app.css)
 */

:root {
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    
    /* Açık Tema Değişkenleri */
    --bg-body: #f8fafc;
    --bg-surface: #ffffff;
    --bg-surface-elevated: #f1f5f9;
    --bg-sidebar: #0f172a;
    --text-sidebar: #cbd5e1;
    --text-sidebar-hover: #ffffff;
    --sidebar-active-bg: rgba(56, 189, 248, 0.15);
    --border-color: #e2e8f0;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --card-hover-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] {
    /* Koyu Tema Değişkenleri (Varsayılan Modern Dark SaaS) */
    --bg-body: #090d16;
    --bg-surface: #111827;
    --bg-surface-elevated: #1f2937;
    --bg-sidebar: #0b1120;
    --text-sidebar: #94a3b8;
    --text-sidebar-hover: #f8fafc;
    --sidebar-active-bg: rgba(59, 130, 246, 0.2);
    --border-color: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
    --card-hover-shadow: 0 12px 24px rgba(0, 0, 0, 0.5);
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-body);
    color: var(--text-primary);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    transition: background-color 0.25s ease, color 0.25s ease;
    overflow-x: hidden;
}

/* Layout Yapısı */
.app-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* Modern Kenar Çubuğu (Sidebar) */
.app-sidebar {
    width: 260px;
    background-color: var(--bg-sidebar);
    color: var(--text-sidebar);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1050;
}

.sidebar-header {
    height: 70px;
    display: flex;
    align-items: center;
    padding: 0 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #fff;
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: -0.02em;
}

.brand-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.1rem;
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.35);
}

.sidebar-menu {
    flex: 1;
    overflow-y: auto;
    padding: 20px 12px;
}

.menu-category {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
    padding: 12px 14px 6px;
    font-weight: 700;
}

.nav-link-custom {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    color: var(--text-sidebar);
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    margin-bottom: 2px;
}

.nav-link-custom i {
    width: 20px;
    font-size: 1rem;
    text-align: center;
    transition: transform 0.2s ease;
}

.nav-link-custom:hover {
    color: var(--text-sidebar-hover);
    background-color: rgba(255, 255, 255, 0.06);
    transform: translateX(3px);
}

.nav-link-custom.active {
    color: #38bdf8;
    background-color: var(--sidebar-active-bg);
    font-weight: 600;
}

.nav-link-custom.active i {
    color: #38bdf8;
}

/* Ana İçerik Alanı */
.app-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* Üst Menü Çubuğu (Topbar) */
.app-topbar {
    height: 70px;
    background-color: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 999;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-sidebar-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.25rem;
    cursor: pointer;
}

.site-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: var(--bg-surface-elevated);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid var(--border-color);
}

.site-badge .status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #22c55e;
    box-shadow: 0 0 8px #22c55e;
}

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

/* Demo Modu Rozeti */
.badge-demo-mode {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

/* Kartlar ve Yüzeyler */
.kmb-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    padding: 24px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-bottom: 24px;
}

.kmb-card:hover {
    box-shadow: var(--card-hover-shadow);
}

.card-header-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 14px;
}

.card-header-flex h2,
.card-header-flex h3,
.card-header-flex h4 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Gradient İstatistik Kartları */
.stat-card {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
    padding: 22px;
    color: #fff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card:hover {
    transform: translateY(-4px);
}

.stat-card .stat-icon {
    position: absolute;
    right: 18px;
    top: 18px;
    font-size: 2.2rem;
    opacity: 0.22;
}

.stat-card .stat-title {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
    opacity: 0.9;
}

.stat-card .stat-value {
    font-size: 1.85rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 6px;
}

.stat-card .stat-sub {
    font-size: 0.8rem;
    opacity: 0.85;
}

/* Canlı Gradientler */
.gradient-blue    { background: linear-gradient(135deg, #1e40af, #3b82f6); }
.gradient-emerald { background: linear-gradient(135deg, #065f46, #10b981); }
.gradient-violet  { background: linear-gradient(135deg, #5b21b6, #8b5cf6); }
.gradient-amber   { background: linear-gradient(135deg, #92400e, #f59e0b); }
.gradient-cyan    { background: linear-gradient(135deg, #0e7490, #06b6d4); }
.gradient-rose    { background: linear-gradient(135deg, #9f1239, #f43f5e); }
.gradient-slate   { background: linear-gradient(135deg, #334155, #64748b); }
.gradient-indigo  { background: linear-gradient(135deg, #3730a3, #6366f1); }

/* Skor Göstergesi (Radial Score Badge) */
.score-circle {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    font-weight: 800;
    font-size: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.score-circle.score-high {
    background: linear-gradient(135deg, #15803d, #22c55e);
    color: #fff;
}
.score-circle.score-medium {
    background: linear-gradient(135deg, #b45309, #f59e0b);
    color: #fff;
}
.score-circle.score-low {
    background: linear-gradient(135deg, #b91c1c, #ef4444);
    color: #fff;
}

/* Durum Rozetleri */
.badge-status {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
}
.badge-status-success { background: rgba(34, 197, 94, 0.15); color: #22c55e; }
.badge-status-warning { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.badge-status-danger  { background: rgba(239, 68, 68, 0.15);  color: #ef4444; }
.badge-status-info    { background: rgba(56, 189, 248, 0.15); color: #38bdf8; }

/* Responsive Tablolar */
.table-responsive-custom {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-custom {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    color: var(--text-primary);
}

.table-custom th {
    background-color: var(--bg-surface-elevated);
    padding: 14px 16px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}

.table-custom td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.88rem;
    vertical-align: middle;
}

.table-custom tr:hover td {
    background-color: rgba(255, 255, 255, 0.02);
}

/* SEO Denetim Öğesi (Audit Check Row) */
.audit-check-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-surface-elevated);
    margin-bottom: 12px;
}

.audit-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.95rem;
}

.audit-icon.success { background: rgba(34, 197, 94, 0.2); color: #22c55e; }
.audit-icon.warning { background: rgba(245, 158, 11, 0.2); color: #f59e0b; }
.audit-icon.danger  { background: rgba(239, 68, 68, 0.2);  color: #ef4444; }

/* Mobil Uyumluluk Medya Sorguları */
@media (max-width: 992px) {
    .app-sidebar {
        position: fixed;
        left: -270px;
        top: 0;
        bottom: 0;
        box-shadow: 10px 0 25px rgba(0, 0, 0, 0.5);
    }
    .app-sidebar.show {
        transform: translateX(270px);
    }
    .btn-sidebar-toggle {
        display: block;
    }
    .sidebar-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1040;
        display: none;
    }
    .sidebar-overlay.show {
        display: block;
    }
}
