/* ---------------------------------------------------------
   1. RESET + GENEL AYARLAR
--------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; width: 100%; overflow-x: hidden; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: #f5f7fb; color: #333; line-height: 1.6;
}
a { color: #007bff; text-decoration: none; }
a:hover { color: #0056b3; }

/* ---------------------------------------------------------
   2. YERLEŞİM (LAYOUT)
--------------------------------------------------------- */
.wrapper {
    width: 100%; max-width: 1400px; margin: 0 auto; padding: 20px;
}
/* Kart genel stil */
.card {
    background: #fff; padding: 18px; border-radius: 16px; margin-bottom: 20px; width: 100%;
    box-shadow: 0 4px 8px rgba(0,0,0,0.04);
}
h1 { margin: 0 0 6px 0; font-size: 30px; color: #222; }
h2 { margin: 0 0 10px 0; font-size: 20px; color: #222; }
.subtitle { margin: 0 0 20px 0; font-size: 15px; color: #555; }

/* ---------------------------------------------------------
   3. ÜST BAR (TOPBAR)
--------------------------------------------------------- */
.topbar {
    width: 100%; background: #fff; border-bottom: 1px solid #e5e5e5; padding: 15px 20px;
    display: flex; align-items: center; justify-content: space-between;
}
.topbar-left { font-weight: 600; font-size: 18px; color: #222; }
.topbar-right { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.topbar-right span { font-size: 14px; color: #444; }

/* ---------------------------------------------------------
   4. BUTONLAR (RENKLER DÜZELTİLDİ)
--------------------------------------------------------- */
.btn-primary, .btn-secondary, .btn-approve, .btn-reject, .btn-danger-outline, .btn-xs, .btn-sm {
    display: inline-block; padding: 12px 18px; border-radius: 10px; font-size: 15px; font-weight: 600;
    text-align: center; border: none; cursor: pointer; transition: all 0.2s ease-in-out; text-decoration: none;
}
.btn-primary { background: #0d6efd; color: #fff; } .btn-primary:hover { background: #0b5ed7; }
.btn-secondary { background: #e8ebf0; color: #333; } .btn-secondary:hover { background: #d4d7dc; }
.btn-approve { background: #16a34a; color: #fff; } .btn-approve:hover { background: #15803d; }
.btn-reject { background: #dc2626; color: #fff; } .btn-reject:hover { background: #b91c1c; }
.btn-danger-outline { background: #fff; border: 2px solid #dc2626; color: #dc2626; } .btn-danger-outline:hover { background: #fee2e2; }
.btn-xs { padding: 6px 12px; font-size: 13px; border-radius: 6px; }
.btn-sm { padding: 8px 14px; font-size: 14px; }
.submit-row { margin-top: 24px; } .submit-row .btn-primary { width: 100%; }

/* ---------------------------------------------------------
   5. DASHBOARD GRID YAPISI (3 SÜTUNLU SİSTEM) - KRİTİK KISIM
--------------------------------------------------------- */
.main-grid-layout {
    display: grid;
    /* Masaüstünde 3 eşit kolon oluştur: Ayarlar | Paylaşım 1 | Paylaşım 2 */
    grid-template-columns: repeat(3, 1fr); 
    gap: 20px;
    width: 100%;
}
.main-grid-layout .card {
    margin-bottom: 0; /* Grid boşluğu (gap) kullanıyoruz */
    height: 100%;     /* Tüm kartlar eşit boyda olsun */
}
.label { font-size: 14px; font-weight: 600; margin: 12px 0 6px 0; }
.platforms label { display: block; margin-bottom: 4px; font-size: 14px; }
select, input[type="text"], input[type="date"], input[type="time"], textarea {
    width: 100%; padding: 10px 12px; border-radius: 8px; border: 1px solid #d4d7dc; font-size: 14px; outline: none; transition: border-color 0.15s; background: #fff;
}
select:focus, input:focus, textarea:focus { border-color: #0d6efd; }
textarea.small-input { min-height: 70px; resize: vertical; }
.small-input { margin-top: 4px; }
.inline-row { display: flex; gap: 10px; margin-top: 8px; } .inline-row > div { flex: 1; }
.radio-group { display: flex; flex-direction: column; gap: 4px; margin: 6px 0 8px 0; font-size: 14px; }
.radio-group label { display: flex; align-items: center; gap: 6px; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: #e0f2fe; font-size: 12px; color: #0369a1; }
.badge-dot { width: 8px; height: 8px; border-radius: 999px; background: #22c55e; }

/* ---------------------------------------------------------
   6. GÖREV LİSTESİ VE TABLOSU
--------------------------------------------------------- */
.tasks-filters { display: flex; align-items: center; margin-bottom: 20px; }
.tasks-filters-left { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 13px; }
.chip { padding: 8px 14px; background: #e8ebf3; border-radius: 20px; color: #333; font-size: 14px; cursor: pointer; transition: background 0.15s; }
.chip:hover { background: #dcdfe5; } .chip-active { background: #0d6efd; color: #fff !important; }
.status-pill { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 500; }
.status-pending  { background: #facc15; color: #333; } .status-approved { background: #4ade80; color: #052e16; } .status-rejected { background: #f87171; color: #450a0a; }

.desktop-only { display: block; } .mobile-only  { display: none; }
.tasks-table-wrapper { width: 100%; overflow-x: auto; }
.tasks-table { width: 100%; min-width: 800px; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; }
.tasks-table th, .tasks-table td { padding: 12px 15px; font-size: 14px; border-bottom: 1px solid #edf0f4; text-align: left; vertical-align: middle; }
.tasks-table th { font-weight: 600; color: #666; background: #f9fafb; }
.table-actions { display: flex; gap: 6px; }

/* Mobil Kart Görünümü */
.task-card-mobile { padding: 18px; border-bottom: 1px solid #eee; margin-bottom: 15px; background: #fff; border-radius: 12px; }
.task-card-header { display: flex; justify-content: space-between; align-items: center; padding-bottom: 10px; margin-bottom: 10px; border-bottom: 1px solid #edf0f4; }
.task-card-actions { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }

/* Son Görev Kartı */
.last-task-card { background: #fff; padding: 18px; border-radius: 16px; margin-top: 20px; box-shadow: 0 4px 8px rgba(0,0,0,0.04); }
.last-task-card h3 { margin-top: 0; }
.last-task-grid { display: grid; grid-template-columns: 220px 1fr; gap: 16px; align-items: flex-start; }
.last-task-grid img { width: 100%; height: auto; border-radius: 14px; object-fit: contain; }

/* ---------------------------------------------------------
   7. GÖRSELLER (THUMBNAILS)
--------------------------------------------------------- */
.task-table-thumb { width: 50px; height: 50px; object-fit: cover; border-radius: 8px; border: 1px solid #eee; display: block; }
.task-mobile-thumb { width: 100%; max-width: 120px; height: 120px; object-fit: cover; border-radius: 8px; border: 1px solid #eee; }

/* ---------------------------------------------------------
   8. RESPONSIVE (MOBİL VE TABLET AYARLARI)
--------------------------------------------------------- */
/* Tablet (1200px altı): 2 Sütun yap */
@media (max-width: 1200px) {
    .main-grid-layout { grid-template-columns: repeat(2, 1fr); }
}
/* Mobil (768px altı): Tek Sütun yap */
@media (max-width: 768px) {
    .wrapper { padding: 16px; max-width: 100%; }
    .topbar { flex-direction: column; align-items: flex-start; gap: 8px; } .topbar-right { width: 100%; justify-content: space-between; }
    
    .main-grid-layout { grid-template-columns: 1fr; gap: 20px; }
    
    .desktop-only { display: none !important; } .mobile-only  { display: block !important; }
    .task-card-actions a, .task-card-actions button { width: 100%; display: block; }
    .last-task-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) { .wrapper { padding: 10px; } .card { padding: 14px; } }
/* ---------------------------------------------------------
   GÜNCELLENMİŞ GÖRSEL VE "PENCERE MODU" TOOLTIP
--------------------------------------------------------- */

/* Masaüstü tablosundaki küçük resim */
.task-table-thumb {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #eee;
    display: block;
    margin: 0 auto;
}

/* Tooltip Kapsayıcısı */
.tooltip-wrapper {
    position: relative;
    display: inline-block;
    cursor: help;
    max-width: 200px;
    vertical-align: middle;
}

/* Kısaltılmış Metin (...) */
.text-truncated {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-bottom: 1px dashed #bbb;
    padding-bottom: 2px;
    color: #333;
    transition: color 0.2s;
}

.tooltip-wrapper:hover .text-truncated {
    color: #0d6efd; /* Üzerine gelince yazı mavi olsun */
}

/* EKRANIN ORTASINDA AÇILAN PENCERE (POPUP) */
.tooltip-popup {
    visibility: hidden;
    opacity: 0;
    
    /* Konumlandırma: EKRANIN TAM ORTASI (FIXED) */
    position: fixed; 
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999999; /* Tüm elementlerin en üstünde */
    
    /* Boyut ve Görünüm */
    width: 400px;         /* Genişlik */
    max-width: 90vw;      /* Mobilde ekranı taşmasın */
    max-height: 80vh;     /* Çok uzunsa ekranı taşmasın */
    overflow-y: auto;     /* Çok uzunsa kaydırma çubuğu çıksın */
    
    background-color: rgba(30, 30, 30, 0.95); /* Hafif saydam koyu siyah */
    color: #fff;
    backdrop-filter: blur(5px); /* Arka planı hafif buzlu cam yap */
    
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5); /* Derin gölge */
    border: 1px solid rgba(255,255,255,0.1);
    
    /* Yazı Stili */
    text-align: left;
    font-size: 14px;
    line-height: 1.6;
    white-space: normal;
    pointer-events: none; /* Mouse etkileşimini kapat (titremeyi engeller) */
    transition: all 0.2s ease-in-out;
}

/* Başlık Stili */
.tooltip-popup strong {
    color: #ffd700; /* Altın sarısı başlık */
    display: block;
    margin-bottom: 8px;
    font-size: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    padding-bottom: 5px;
}

/* Mouse üzerine gelince GÖRÜNÜR YAP ve BÜYÜT */
.tooltip-wrapper:hover .tooltip-popup {
    visibility: visible;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1); /* Hafif büyüme efekti eklenebilir */
}
/* ---- MOBİL ÖNİZLEME YAZI DÜZELTME ---- */
@media (max-width: 768px) {
    .task-card-mobile .task-value,
    .task-card-mobile p,
    .task-card-mobile span,
    .task-card-mobile div {
        white-space: normal !important;
        text-align: left !important;
        writing-mode: horizontal-tb !important;
        word-break: break-word !important;
    }
}
/* ================================
   PAYLAŞIM 1–5 RENKLİ BAŞLIK SİSTEMİ
================================ */

.slot-card .slot-header {
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 14px;
}

/* Paylaşım 1 */
.slot-card[data-index="1"] .slot-header {
    background: #e3f2fd;
    color: #0d47a1;
}

/* Paylaşım 2 */
.slot-card[data-index="2"] .slot-header {
    background: #e8f5e9;
    color: #1b5e20;
}

/* Paylaşım 3 */
.slot-card[data-index="3"] .slot-header {
    background: #fff3e0;
    color: #e65100;
}

/* Paylaşım 4 */
.slot-card[data-index="4"] .slot-header {
    background: #f3e5f5;
    color: #4a148c;
}

/* Paylaşım 5 */
.slot-card[data-index="5"] .slot-header {
    background: #ffebee;
    color: #b71c1c;
}

