/* ==========================================================================
   STABVIEW PREMIUM UI - WHITE EDITION (2026)
   ========================================================================== */

:root {
    /* --- Renk Paleti (Saf Beyaz & Indigo) --- */
    --sv-primary: #4f46e5;       /* Indigo 600 */
    --sv-primary-hover: #4338ca; 
    --sv-primary-light: #eef2ff; 
    --sv-secondary: #10b981;     
    
    --sv-bg-surface: #ffffff;    /* Saf Beyaz */
    --sv-bg-body: #ffffff;       /* Saf Beyaz (Gri yok) */
    
    --sv-text-main: #0f172a;     
    --sv-text-muted: #64748b;    
    --sv-border: #f1f5f9;        /* Çok silik sınır çizgisi */
    
    /* --- Yapısal Değişkenler --- */
    --sv-radius: 16px;           /* Biraz daha keskin ama yumuşak */
    --sv-spacing: 1.2rem;
    
    /* --- Hafif Gölgeler --- */
    --sv-shadow-soft: 0 2px 10px rgba(0, 0, 0, 0.03);
    --sv-shadow-hover: 0 10px 30px -5px rgba(0, 0, 0, 0.06);
}

/* ==========================================================================
   1. ANA KONTEYNER
   ========================================================================== */
.stabview {
    background: var(--sv-bg-surface);
    margin: 20px 0;
    border: 1px solid var(--sv-border);
    border-radius: var(--sv-radius);
    box-shadow: var(--sv-shadow-soft);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    overflow: hidden;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stabview:hover {
    box-shadow: var(--sv-shadow-hover);
    border-color: #e2e8f0;
}

/* ==========================================================================
   2. SEKMELER (TABS)
   ========================================================================== */
.stabview-tabnames {
    display: flex;
    align-items: center;
    background: #ffffff; /* Saf Beyaz */
    padding: 0.8rem var(--sv-spacing);
    border-bottom: 1px solid var(--sv-border);
}

.stabview-tabnames-container {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
}
.stabview-tabnames-container::-webkit-scrollbar { display: none; }

/* Sekme Butonu */
.stabview-tabnames-item {
    padding: 0.6rem 1rem;
    border-radius: 8px; /* Hap yerine kutu */
    color: var(--sv-text-muted);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    display: flex; align-items: center; gap: 8px;
    white-space: nowrap;
    background: #f8fafc; /* Çok hafif gri buton */
}

.stabview-tabnames-item:hover:not(.active) {
    background: #f1f5f9;
    color: var(--sv-primary);
}

.stabview-tabnames-item.active {
    background: var(--sv-primary);
    color: #fff;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.25);
}
.stabview-tabnames-item.active i { color: #fff; }

/* Yenile Butonu */
.stabview-refresh {
    margin-left: auto;
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 8px;
    background: #f8fafc;
    color: var(--sv-text-muted);
    cursor: pointer;
    transition: all 0.4s ease;
    border: 1px solid var(--sv-border);
}

.stabview-refresh:hover {
    background: var(--sv-primary); color: #fff; transform: rotate(180deg);
}

.stabview-tabnames-mitem { display: none; }

/* ==========================================================================
   3. BAŞLIKLAR (TCAT) - Beyaz
   ========================================================================== */
.stabview-tcater {
    background: #ffffff;
    border-bottom: 1px solid var(--sv-border);
    display: flex;
}

.stabview-tcat {
    padding: 0.75rem var(--sv-spacing);
    font-size: 0.7rem; font-weight: 800;
    text-transform: uppercase; letter-spacing: 0.05em;
    color: #94a3b8; display: flex; align-items: center;
}

/* Grid Ayarları */
.stabview-tcat:nth-child(1) { flex: 1; }
.stabview-tcat:nth-child(2) { flex-basis: 12%; justify-content: center; }
.stabview-tcat:nth-child(3) { flex-basis: 20%; justify-content: flex-start; padding-left: 20px;} /* Genişlettim ve sola yasladım */
.stabview-tcat:nth-child(4) { flex-basis: 12%; justify-content: center; }
.stabview-tcat:nth-child(5) { flex-basis: 15%; justify-content: center; }

/* ==========================================================================
   4. SATIRLAR (ROWS) - Beyaz
   ========================================================================== */
.stabview_content { background: #ffffff; }
.stabview-rowlist { margin: 0; }

.stabview-row {
    display: flex; align-items: center;
    padding: 1rem var(--sv-spacing);
    border-bottom: 1px solid var(--sv-border);
    background: #ffffff;
    transition: all 0.2s ease;
    position: relative;
}

.stabview-row:last-child { border-bottom: none; }

.stabview-row:hover {
    background: #fafafa; /* Hoverda çok hafif ton farkı */
    z-index: 2;
    transform: scale(1.002);
    box-shadow: 0 5px 15px rgba(0,0,0,0.03);
}

/* Sol Çizgi */
.stabview-row::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
    background: var(--sv-primary); opacity: 0; transition: 0.2s;
}
.stabview-row:hover::before { opacity: 1; }

/* ==========================================================================
   5. İÇERİKLER
   ========================================================================== */
.stabview-row-item { display: flex; align-items: center; }

/* Grid Hizalama */
.stabview-row-main     { flex: 1; overflow: hidden; gap: 15px; }
.stabview-row-rv       { flex-basis: 12%; justify-content: center; }
.stabview-row-lastpost { flex-basis: 20%; justify-content: flex-start; } /* Sola yasladım */
.stabview-row-dateline { flex-basis: 12%; justify-content: center; }
.stabview-row-category { flex-basis: 15%; justify-content: center; }

/* --- Konu & Avatar --- */
.stabview-row-avatar-avatar {
    position: relative; width: 40px; height: 40px; flex-shrink: 0;
}
.stabview-row-avatar-avatar img {
    width: 100%; height: 100%; border-radius: 12px;
    object-fit: cover; border: 1px solid #f1f5f9;
}
.stabview-row-avatar-avatar:hover img { border-color: var(--sv-primary); }

.stabview-row-status {
    position: absolute; bottom: -2px; right: -2px;
    width: 10px; height: 10px; border-radius: 50%; border: 2px solid #fff;
}
.stabview-row-status[status="online"] { background: var(--sv-secondary); }
.stabview-row-status[status="offline"] { background: #cbd5e1; }

/* --- Konu Başlığı --- */
.stabview-row-subject { display: flex; flex-direction: column; gap: 3px; overflow: hidden; }
.m-subject-wrapper { display: flex; align-items: center; width: 100%; }
.m-subject-link {
    font-size: 0.95rem; font-weight: 600; color: var(--sv-text-main);
    text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.m-subject-link:hover { color: var(--sv-primary); }
.stabview-google-icon { color: #cbd5e1; font-size: 12px; margin-right: 8px; transition:0.2s; }
.stabview-google-icon:hover { color: #ea4335; }

/* --- İstatistikler (Dikey) --- */
.m-stat-group { display: flex; flex-direction: column; gap: 4px; width: 100%; max-width: 80px; }
.m-stat-pill {
    display: flex; align-items: center; justify-content: space-between;
    font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 4px;
}
.m-stat-pill.reply { background: #f1f5f9; color: var(--sv-primary); }
.m-stat-pill.view { color: var(--sv-text-muted); }

/* --- SON MESAJ (YAN YANA DÜZEN) --- */
.stabview-row-lastpost {
    display: flex; 
    flex-direction: row; /* Yan Yana */
    align-items: center; /* Ortala */
    gap: 12px; /* Avatar ile İsim arası boşluk */
    padding-left: 20px; /* Hizalama için boşluk */
}

/* Avatar Grubu (Solda) */
.m-last-avatars-group { 
    display: flex; align-items: center; justify-content: flex-start;
    height: 30px; 
}
.m-last-avatars-group a {
    display: flex; align-items: center; justify-content: center;
    position: relative; border-radius: 50%; z-index: 1;
}
.m-last-avatars-group a + a { margin-left: -10px; } /* Örtüşme */

.m-last-avatars-group a img {
    width: 28px !important; height: 28px !important;
    border-radius: 50% !important; object-fit: cover;
    border: 2px solid #ffffff; background: #f8fafc;
    display: block;
}
.m-last-avatars-group a:hover { z-index: 10; transform: scale(1.1); }

/* İsim Bilgisi (Sağda) */
.m-last-user-info { 
    display: flex; flex-direction: column; align-items: flex-start; line-height: 1.3;
    text-align: left;
}
.stabview-row-lastavatars-username { font-size: 12px; font-weight: 700; color: #334155; text-decoration: none; }
.m-last-date { font-size: 10px; color: #94a3b8; }

/* --- Tarih Kutusu --- */
.m-date-box {
    display: flex; align-items: center; gap: 6px;
    font-size: 11px; font-weight: 600; color: #64748b;
    background: #f8fafc; padding: 6px 12px; border-radius: 6px;
}

/* --- Kategori --- */
.m-category-pill {
    display: inline-block; padding: 4px 10px; border-radius: 6px;
    background: #ffffff; border: 1px solid #e2e8f0;
    color: #64748b; font-size: 10px; font-weight: 800;
    text-transform: uppercase; text-decoration: none; transition: 0.2s;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.m-category-pill:hover { border-color: var(--sv-primary); color: var(--sv-primary); }

/* ==========================================================================
   6. FOOTER
   ========================================================================== */
.stabview-showmore {
    background: #ffffff;
    color: var(--sv-text-muted);
    font-weight: 700; font-size: 0.85rem;
    text-transform: uppercase; letter-spacing: 1px;
    padding: 1.2rem;
    border-top: 1px solid var(--sv-border);
    cursor: pointer; transition: all 0.3s;
    display: flex; align-items: center; justify-content: center;
}
.stabview-showmore:hover { color: var(--sv-primary); background: #f8fafc; }

/* ==========================================================================
   7. MOBİL UYUM
   ========================================================================== */
.m-mobile-meta { display: none; font-size: 11px; color: #94a3b8; margin-top: 4px; gap: 6px; align-items: center; }

@media (max-width: 900px) {
    .stabview-tcat:nth-child(4), .stabview-row-dateline,
    .stabview-tcat:nth-child(5), .stabview-row-category { display: none; }
}

@media (max-width: 768px) {
    .stabview-row-rv, .stabview-row-lastpost, .stabview-tcater { display: none !important; }
    .m-mobile-meta { display: flex; }
    
    .stabview-tabnames { padding: 0.5rem; display: block; }
    .stabview-refresh { display: none; }
    .stabview-tabnames-mitem {
        display: flex; justify-content: space-between; align-items: center;
        background: #f8fafc; padding: 10px 15px; border-radius: 8px; border: 1px solid var(--sv-border);
        font-weight: 700; cursor: pointer;
    }
    .stabview-tabnames-container { display: flex; flex-direction: column; gap: 2px; margin-top: 10px; padding: 0; max-height: 500px; }
    .stabview-tabnames-container.close { max-height: 0; margin: 0; overflow: hidden; opacity: 0; }
    .stabview-tabnames-item { width: 100%; justify-content: flex-start; }
}

/* Dark Mode Uyumunu Kaldırdım (Sadece Beyaz İstediğin İçin) */
/* Eğer sistem dark olsa bile burası beyaz kalacak */