/* ============================================================
   GENEL TEMA VE YAPI
   ============================================================ */
:root { --accent:#ff7a00; --fg:#eaeaea; --bg:#0b0e14; --muted:#94a3b8; --radius:12px; }
body { font-family: 'Roboto', system-ui, -apple-system, Segoe UI, Arial, sans-serif; font-size: 12px; color: var(--fg); background: var(--bg); }
.sidebar { width: 248px; background:#0d1117; color:#eee; position:relative; border-right:1px solid #171a21; transition: width .18s ease; }
.sidebar[data-collapsed="true"] { width: 72px; }
.sidebrand { display:flex; align-items:center; gap:10px; padding:10px 8px; }
.sidebrand .brand-logo { width:26px; height:26px; object-fit:contain; border-radius:6px; }
.brand-text { font-weight:700; font-size: 12px; letter-spacing:.2px; }
.sidenav { display:flex; flex-direction:column; gap:4px; padding:6px; }
.sidenav a { display:flex; align-items:center; gap:8px; padding:7px 8px; border-radius:10px; color:#e7e7e7; text-decoration:none; font-size: 12px; }
.sidenav a:hover { background:#131827; }
.sidenav a .ico { width:16px; display:inline-flex; justify-content:center; }
.sidenav a .txt { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.sidebar[data-collapsed="true"] .brand-text { display:none; }
.sidebar[data-collapsed="true"] .sidenav a { justify-content:center; padding:9px 6px; }
.sidebar[data-collapsed="true"] .sidenav a .txt { display:none; }
.sidebar[data-collapsed="true"] .sidenav a .ico { margin:0; }
.collapse-btn { position:absolute; bottom:10px; left:10px; background:#0f141d; border:1px solid #1b2230; color:#cfd8e3; border-radius:10px; padding:5px 7px; cursor:pointer; font-size:11px; }

.main { padding: 14px; min-width:0; }
.container .card { background:#0f141d; border:1px solid #1b2230; border-radius:12px; padding:12px; margin-bottom:12px; }
.table { width:100%; border-collapse:collapse; font-size: 12px; }
.table th, .table td { border-bottom:1px solid #1b2230; padding:6px 8px; text-align:left; }
.input { background:#0c1017; border:1px solid #1b2230; color:#e7e7e7; border-radius:8px; padding:6px 8px; font-size:12px; width:100%; }
.btn { background:var(--accent); color:#000; border:none; border-radius:10px; padding:8px 12px; cursor:pointer; font-weight:700; }
.btn.small { padding:5px 9px; font-size:11px; }
.alert { background:#13231a; border:1px solid #254; color:#cfe; padding:8px 10px; border-radius:8px; }
.muted { color: var(--muted); }

/* Stat row */
.stats-row { display: grid; grid-template-columns: repeat(5, minmax(150px, 1fr)); gap: 12px; margin-top: 8px; }
.stat { display: block; text-decoration: none; color: #e7e7e7; background: #0f141d; border: 1px solid #1b2230; border-radius: 12px; padding: 10px; }
.stat:hover { background: #131b27; border-color: #223049; }
.stat-num { font-weight: 700; font-size: 22px; line-height: 1.2; }
.stat-label { font-size: 12px; opacity: .85; }

/* Side Group */
.sidegroup { margin-top: 4px; }
.sidegroup-head { display: flex; justify-content: space-between; align-items: center; padding: 6px 12px; font-size: 13px; color: #ddd; cursor: pointer; user-select: none; }
.sidegroup-head:hover { background: #262626; }
.sidegroup-body { padding-left: 4px; }
.sidegroup[data-open="0"] .sidegroup-body { display: none; }
.sg-arrow { font-size: 10px; opacity: 0.7; transition: transform 0.15s ease; }
.sidegroup[data-open="0"] .sg-arrow { transform: rotate(-90deg); }

/* ============================================================
   KUSURSUZ BUTON STANDARDİZASYONU (TÜM SAYFALAR İÇİN KESİN KURAL)
   ============================================================ */

/* 1. Tüm İkon Butonları (Kare, 36px) */
.btn.xsmall, 
.btn-action,
.action-group a,
.action-group button {
    width: 36px !important;       
    height: 36px !important;      
    min-width: 36px !important;   
    padding: 0 !important;        
    border-radius: 8px !important; 
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease !important;
    border: 1px solid transparent !important; 
    text-decoration: none !important;
    box-sizing: border-box !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
}

/* 2. İkon Boyutu */
.btn.xsmall i, 
.btn-action i,
.action-group i {
    font-size: 18px !important;
    line-height: 1 !important;
    margin: 0 !important;
    display: block !important;
}

/* Hover Efekti */
.btn.xsmall:hover, .btn-action:hover, .btn.text-btn:hover, .btn.fit-text:hover, .action-group a:hover, .action-group button:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15) !important;
}

/* 3. SADECE YAZI İÇEREN BUTONLAR (Tümü, Toplu Hatırlat vb. Yükseklik 36px) */
.btn.text-btn,
.btn.fit-text,
a.btn.fit-text {
    width: max-content !important;
    max-width: none !important;
    min-width: 80px !important;
    height: 36px !important; 
    padding: 0 16px !important;
    border-radius: 8px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
    border: 1px solid transparent !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
}

/* ============================================================
   AŞIRI BASKIN RENK ZORLAMALARI (TÜM SAYFALARI EZER GEÇER)
   ============================================================ */

/* A. DÜZENLE BUTONU (Mavi - #007fff) */
.btn-edit, 
.btn.xsmall.ghost, 
.btn.text-btn.ghost, 
.btn.fit-text.ghost,
.action-group a[href*="edit"] {
    background-color: #007fff !important;
    border-color: #0066cc !important;
    color: #FFFFFF !important;
}
/* İçindeki her şeyi (İkonları) zorla beyaz yap */
.btn-edit *, 
.btn.xsmall.ghost *, 
.btn.text-btn.ghost *, 
.btn.fit-text.ghost *,
.action-group a[href*="edit"] * {
    color: #FFFFFF !important;
}
.btn-edit:hover, .btn.xsmall.ghost:hover, .btn.fit-text.ghost:hover, .action-group a[href*="edit"]:hover {
    background-color: #0055b3 !important; /* Koyu Mavi Hover */
}


/* B. SİL BUTONU (Kırmızı - #cc0000) */
.btn-del, 
.btn.xsmall.danger, 
.del-icon,
.btn.text-btn.danger, 
.btn.fit-text.danger,
.action-group a[href*="delete"],
.action-group button[class*="del"] {
    background-color: #cc0000 !important;
    border-color: #b30000 !important;
    color: #FFFFFF !important;
}
/* İçindeki her şeyi (İkonları) zorla beyaz yap */
.btn-del *, 
.btn.xsmall.danger *, 
.del-icon *,
.btn.fit-text.danger *,
.action-group a[href*="delete"] *,
.action-group button[class*="del"] * {
    color: #FFFFFF !important;
}
.btn-del:hover, .btn.xsmall.danger:hover, .del-icon:hover, .action-group a[href*="delete"]:hover, .action-group button[class*="del"]:hover {
    background-color: #990000 !important; /* Koyu Kırmızı Hover */
}


/* C. WHATSAPP BUTONU (Yeşil - #25D366) */
.btn-wa, 
.btn.xsmall.wa, 
.btn.text-btn.wa, 
.btn.fit-text.wa,
td[data-label="WA"] a, 
td[data-label="WhatsApp"] a,
.action-group a[href*="wa.me"] {
    background-color: #25D366 !important;
    border-color: #20B958 !important;
    color: #FFFFFF !important;
}
/* İçindeki her şeyi (İkonları) zorla beyaz yap */
.btn-wa *, 
.btn.xsmall.wa *, 
.btn.fit-text.wa *,
td[data-label="WA"] a *, 
td[data-label="WhatsApp"] a *,
.action-group a[href*="wa.me"] * {
    color: #FFFFFF !important;
}
.btn-wa:hover, .btn.xsmall.wa:hover, .btn.fit-text.wa:hover, td[data-label="WA"] a:hover, td[data-label="WhatsApp"] a:hover, .action-group a[href*="wa.me"]:hover {
    background-color: #1EBE55 !important; /* Koyu Yeşil Hover */
}

/* ------------------------------------------------------------
   GRUP HİZALAMASI (Tablo İçi)
   ------------------------------------------------------------ */
.action-group {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important; 
    margin: 0 auto !important;
}

td[data-label="İşlem"], 
td[data-label="WA"],
td[data-label="WhatsApp"],
th[style*="text-align:center"] {
    text-align: center !important;
    vertical-align: middle !important;
}