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

:root {
  --bg:       #0d0d14;
  --surface:  #13131f;
  --surface2: #1a1a28;
  --surface3: #22223a;
  --border:   rgba(255,255,255,.07);
  --border2:  rgba(255,255,255,.12);
  --accent:   #6c5ce7;
  --accent2:  #fd79a8;
  --accent3:  #00cec9;
  --green:    #00b894;
  --yellow:   #fdcb6e;
  --red:      #e17055;
  --text:     #e8e8f4;
  --muted:    #6b6b8a;
  --muted2:   #9090b0;
  --radius:   12px;
  --font-syne: 'Syne', sans-serif;
  --font-inter:'Inter', sans-serif;
}

* { margin:0; padding:0; box-sizing:border-box; }
body { font-family:var(--font-inter); background:var(--bg); color:var(--text); min-height:100vh; font-size:14px; line-height:1.6; }

/* ── LAYOUT ── */
.app { display:flex; min-height:100vh; }

/* ── SIDEBAR ── */
.sidebar {
  width:240px; flex-shrink:0;
  background:var(--surface);
  border-right:1px solid var(--border);
  display:flex; flex-direction:column;
  position:sticky; top:0; height:100vh; overflow-y:auto;
}
.sidebar-logo {
  padding:24px 20px 20px;
  border-bottom:1px solid var(--border);
  display:flex; align-items:center; gap:10px;
}
.logo-icon {
  width:36px; height:36px; background:var(--accent);
  border-radius:9px; display:flex; align-items:center;
  justify-content:center; font-size:18px; flex-shrink:0;
}
.logo-text { font-family:var(--font-syne); font-size:16px; font-weight:700; }
.logo-sub  { font-size:10px; color:var(--muted); letter-spacing:1px; text-transform:uppercase; }

.sidebar-nav { flex:1; padding:12px 0; }
.nav-section { padding:16px 20px 4px; font-size:10px; color:var(--muted); font-weight:600; letter-spacing:1.5px; text-transform:uppercase; }
.nav-item {
  display:flex; align-items:center; gap:10px;
  padding:9px 20px; margin:1px 8px; border-radius:8px;
  color:var(--muted2); text-decoration:none; font-size:13px; font-weight:500;
  transition:all .15s; cursor:pointer; border:none; background:none; width:calc(100% - 16px);
}
.nav-item:hover { background:var(--surface2); color:var(--text); }
.nav-item.active { background:rgba(108,92,231,.15); color:var(--accent); }
.nav-item .ni { width:18px; height:18px; flex-shrink:0; opacity:.7; }
.nav-item.active .ni { opacity:1; }
.nav-badge { margin-left:auto; background:var(--accent); color:#fff; font-size:10px; font-weight:700; padding:1px 6px; border-radius:100px; }

.sidebar-user {
  padding:16px 20px;
  border-top:1px solid var(--border);
  display:flex; align-items:center; gap:10px;
}
.user-avatar {
  width:32px; height:32px; border-radius:50%;
  background:linear-gradient(135deg,var(--accent),var(--accent2));
  display:flex; align-items:center; justify-content:center;
  font-size:13px; font-weight:700; flex-shrink:0;
}
.user-name  { font-size:13px; font-weight:500; }
.user-role  { font-size:11px; color:var(--muted); }
.logout-btn {
  margin-left:auto; background:none; border:none;
  color:var(--muted); cursor:pointer; font-size:16px;
  transition:color .15s;
}
.logout-btn:hover { color:var(--red); }

/* ── MAIN ── */
.main { flex:1; min-width:0; display:flex; flex-direction:column; }

.topbar {
  display:flex; align-items:center; justify-content:space-between;
  padding:0 28px; height:60px;
  background:var(--surface); border-bottom:1px solid var(--border);
  position:sticky; top:0; z-index:50;
}
.topbar-title { font-family:var(--font-syne); font-size:18px; font-weight:700; }
.topbar-date  { font-size:12px; color:var(--muted); }
.topbar-actions { display:flex; gap:10px; align-items:center; }

.content { padding:28px; flex:1; }

/* ── KARTLAR / GRİD ── */
.grid { display:grid; gap:16px; }
.grid-2 { grid-template-columns:repeat(2,1fr); }
.grid-3 { grid-template-columns:repeat(3,1fr); }
.grid-4 { grid-template-columns:repeat(4,1fr); }
@media(max-width:1100px){ .grid-4{grid-template-columns:repeat(2,1fr)} .grid-3{grid-template-columns:repeat(2,1fr)} }
@media(max-width:700px) { .grid-2,.grid-3,.grid-4{grid-template-columns:1fr} }

.card {
  background:var(--surface); border:1px solid var(--border);
  border-radius:var(--radius); padding:20px;
}
.card-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:16px; }
.card-title  { font-family:var(--font-syne); font-size:14px; font-weight:700; }

/* ── STAT KARTLAR ── */
.stat-card { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:20px; position:relative; overflow:hidden; }
.stat-card::before { content:''; position:absolute; inset:0; background:var(--card-glow,transparent); opacity:.06; pointer-events:none; }
.stat-icon  { font-size:28px; margin-bottom:10px; }
.stat-val   { font-family:var(--font-syne); font-size:32px; font-weight:800; line-height:1; margin-bottom:4px; }
.stat-label { font-size:12px; color:var(--muted); text-transform:uppercase; letter-spacing:.8px; }
.stat-sub   { font-size:12px; color:var(--muted2); margin-top:6px; }

/* ── BUTONLAR ── */
.btn {
  display:inline-flex; align-items:center; gap:6px;
  padding:9px 18px; border-radius:9px; border:none;
  font-size:13px; font-weight:600; cursor:pointer;
  font-family:var(--font-inter); transition:all .15s; text-decoration:none;
}
.btn-primary { background:var(--accent); color:#fff; }
.btn-primary:hover { opacity:.85; }
.btn-secondary { background:var(--surface2); color:var(--text); border:1px solid var(--border2); }
.btn-secondary:hover { background:var(--surface3); }
.btn-danger { background:rgba(225,112,85,.15); color:var(--red); border:1px solid rgba(225,112,85,.3); }
.btn-danger:hover { background:rgba(225,112,85,.25); }
.btn-sm { padding:6px 13px; font-size:12px; border-radius:7px; }
.btn-icon { padding:8px; border-radius:8px; background:var(--surface2); border:1px solid var(--border); color:var(--muted2); cursor:pointer; transition:all .15s; }
.btn-icon:hover { background:var(--surface3); color:var(--text); }

/* ── FORM ELEMANLARI ── */
.field-group { display:flex; flex-direction:column; gap:14px; }
.field-row   { display:flex; gap:14px; }
.field-row > * { flex:1; }
.field { display:flex; flex-direction:column; gap:5px; }
.field label { font-size:11px; color:var(--muted); font-weight:600; text-transform:uppercase; letter-spacing:.8px; }
.field input, .field select, .field textarea {
  background:var(--surface2); border:1px solid var(--border); border-radius:9px;
  padding:10px 14px; font-size:14px; color:var(--text);
  font-family:var(--font-inter); outline:none; transition:border-color .2s; width:100%;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color:var(--accent); }
.field textarea { resize:vertical; min-height:80px; }
.field select { appearance:none; background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' fill='none' stroke='%236b6b8a' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat:no-repeat; background-position:right 12px center; padding-right:32px; cursor:pointer; }

/* ── BADGE / TAG ── */
.badge { display:inline-flex; align-items:center; gap:4px; padding:3px 10px; border-radius:100px; font-size:11px; font-weight:700; letter-spacing:.3px; }
.badge-purple { background:rgba(108,92,231,.15); color:#a29bfe; border:1px solid rgba(108,92,231,.3); }
.badge-green  { background:rgba(0,184,148,.15);  color:#00cec9;  border:1px solid rgba(0,184,148,.3); }
.badge-yellow { background:rgba(253,203,110,.15); color:#fdcb6e;  border:1px solid rgba(253,203,110,.3); }
.badge-red    { background:rgba(225,112,85,.15);  color:#e17055;  border:1px solid rgba(225,112,85,.3); }
.badge-gray   { background:rgba(107,107,138,.15); color:var(--muted2); border:1px solid rgba(107,107,138,.3); }

/* ── TABLO ── */
.table-wrap { overflow-x:auto; border-radius:var(--radius); border:1px solid var(--border); }
table { width:100%; border-collapse:collapse; font-size:13px; }
thead { background:var(--surface2); }
th { padding:11px 14px; text-align:left; font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.5px; color:var(--muted); white-space:nowrap; }
td { padding:12px 14px; border-top:1px solid var(--border); vertical-align:middle; }
tbody tr:hover { background:rgba(255,255,255,.02); }
.td-muted { color:var(--muted2); font-size:12px; }

/* ── PROGRESS BAR ── */
.progress-wrap { margin-bottom:0; }
.progress-bar { height:5px; background:var(--surface3); border-radius:100px; overflow:hidden; }
.progress-fill { height:100%; border-radius:100px; transition:width .5s; }

/* ── MODAL ── */
.modal-backdrop {
  position:fixed; inset:0; background:rgba(0,0,0,.7);
  z-index:1000; display:flex; align-items:flex-start;
  justify-content:center; padding:40px 20px; overflow-y:auto;
  backdrop-filter:blur(4px);
}
.modal-box {
  background:var(--surface); border:1px solid var(--border2);
  border-radius:16px; width:100%; max-width:640px; overflow:hidden;
}
.modal-header {
  display:flex; align-items:center; justify-content:space-between;
  padding:20px 24px; border-bottom:1px solid var(--border);
}
.modal-title { font-family:var(--font-syne); font-size:16px; font-weight:700; }
.modal-close {
  background:none; border:none; color:var(--muted); cursor:pointer;
  font-size:20px; line-height:1; padding:4px 8px; border-radius:6px;
  transition:all .15s;
}
.modal-close:hover { background:var(--surface2); color:var(--text); }
.modal-body { padding:24px; }
.modal-footer { padding:16px 24px; border-top:1px solid var(--border); display:flex; gap:10px; justify-content:flex-end; }

/* ── ALERT ── */
.alert { padding:12px 16px; border-radius:9px; font-size:13px; margin-bottom:16px; display:none; }
.alert.visible { display:block; }
.alert-error   { background:rgba(225,112,85,.1); border:1px solid rgba(225,112,85,.3); color:var(--red); }
.alert-success { background:rgba(0,184,148,.1);  border:1px solid rgba(0,184,148,.3);  color:var(--green); }

/* ── ÇALIŞAN KART ── */
.emp-card {
  background:var(--surface); border:1px solid var(--border);
  border-radius:var(--radius); padding:20px; cursor:pointer;
  transition:all .2s; position:relative;
}
.emp-card:hover { border-color:rgba(108,92,231,.4); transform:translateY(-1px); }
.emp-avatar {
  width:44px; height:44px; border-radius:50%;
  background:linear-gradient(135deg,var(--accent),var(--accent2));
  display:flex; align-items:center; justify-content:center;
  font-size:16px; font-weight:700; margin-bottom:12px;
}
.emp-name  { font-family:var(--font-syne); font-size:15px; font-weight:700; margin-bottom:2px; }
.emp-role  { font-size:12px; color:var(--muted); margin-bottom:14px; }
.emp-stats { display:flex; gap:16px; margin-bottom:12px; }
.emp-stat  { text-align:center; }
.emp-stat-val { font-family:var(--font-syne); font-size:18px; font-weight:800; }
.emp-stat-lbl { font-size:10px; color:var(--muted); text-transform:uppercase; letter-spacing:.5px; }

/* ── MARKA KART ── */
.brand-card {
  background:var(--surface); border:1px solid var(--border);
  border-radius:var(--radius); padding:20px; cursor:pointer;
  transition:all .2s;
}
.brand-card:hover { border-color:rgba(108,92,231,.4); transform:translateY(-1px); }
.brand-name   { font-family:var(--font-syne); font-size:15px; font-weight:700; margin-bottom:3px; }
.brand-domain { font-size:12px; color:var(--muted); margin-bottom:14px; }
.brand-stats  { display:flex; gap:12px; flex-wrap:wrap; margin-bottom:12px; }
.brand-stat   { background:var(--surface2); border-radius:8px; padding:8px 12px; text-align:center; }
.brand-stat-val { font-family:var(--font-syne); font-size:16px; font-weight:800; }
.brand-stat-lbl { font-size:10px; color:var(--muted); }

/* ── İŞ TİPİ BADGE ── */
.type-badge {
  display:inline-flex; align-items:center; gap:5px;
  padding:3px 10px; border-radius:100px;
  font-size:11px; font-weight:700; font-family:var(--font-inter);
}

/* ── LOG SATIRI ── */
.log-row {
  background:var(--surface); border:1px solid var(--border);
  border-radius:10px; padding:14px 18px;
  display:flex; align-items:flex-start; gap:14px;
  margin-bottom:8px; cursor:pointer; transition:all .15s;
}
.log-row:hover { border-color:var(--border2); background:var(--surface2); }
.log-icon { font-size:20px; flex-shrink:0; margin-top:2px; }
.log-content { flex:1; min-width:0; }
.log-title   { font-size:14px; font-weight:500; margin-bottom:4px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.log-meta    { display:flex; gap:10px; flex-wrap:wrap; align-items:center; font-size:12px; color:var(--muted2); }
.log-actions { display:flex; gap:6px; flex-shrink:0; }

/* ── KANIT ── */
.evidence-item { display:flex; align-items:center; gap:8px; background:var(--surface2); border-radius:8px; padding:8px 12px; margin-bottom:6px; font-size:13px; }
.evidence-type { font-size:16px; flex-shrink:0; }
.evidence-link { color:var(--accent); text-decoration:none; }
.evidence-link:hover { text-decoration:underline; }
.evidence-del  { margin-left:auto; background:none; border:none; color:var(--muted); cursor:pointer; font-size:14px; padding:2px 6px; border-radius:4px; transition:color .15s; }
.evidence-del:hover { color:var(--red); }

/* ── SPINNER ── */
.spinner { display:inline-block; width:14px; height:14px; border:2px solid rgba(255,255,255,.3); border-top-color:#fff; border-radius:50%; animation:spin .7s linear infinite; vertical-align:middle; margin-right:6px; }
@keyframes spin { to { transform:rotate(360deg); } }

/* ── SEKSİYON ── */
.section-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:20px; flex-wrap:wrap; gap:10px; }
.section-title  { font-family:var(--font-syne); font-size:20px; font-weight:800; }

/* ── BOŞLUKLAR ── */
.mb-4{margin-bottom:4px} .mb-8{margin-bottom:8px} .mb-12{margin-bottom:12px}
.mb-16{margin-bottom:16px} .mb-20{margin-bottom:20px} .mb-24{margin-bottom:24px}
.mt-8{margin-top:8px} .mt-16{margin-top:16px}
.gap-8{gap:8px} .gap-12{gap:12px} .gap-16{gap:16px}
.flex{display:flex} .flex-wrap{flex-wrap:wrap} .items-center{align-items:center} .justify-between{justify-content:space-between}

/* ── PANEL GEÇİŞ ── */
.panel { display:none; }
.panel.active { display:block; }

/* ── CHART CANVAS ── */
canvas { max-width:100%; }

/* ── SKELETON ── */
.skeleton { background:linear-gradient(90deg,var(--surface2) 25%,var(--surface3) 50%,var(--surface2) 75%); background-size:200% 100%; animation:shimmer 1.5s infinite; border-radius:6px; }
@keyframes shimmer { 0%{background-position:200% 0} 100%{background-position:-200% 0} }

/* ── STATUS DOT ── */
.status-dot { width:8px; height:8px; border-radius:50%; flex-shrink:0; }
.status-dot.green  { background:var(--green); box-shadow:0 0 6px var(--green); }
.status-dot.yellow { background:var(--yellow); }
.status-dot.red    { background:var(--red); }

/* ── FILTER INPUT ── */
.filter-sel,.filter-inp{padding:8px 12px;background:var(--surface2);border:1px solid var(--border);border-radius:9px;color:var(--text);font-family:var(--font-inter);font-size:13px;outline:none;cursor:pointer}
.filter-sel{padding-right:28px;appearance:none}

/* ── İZİN TABLOSU ── */
.perm-table{border:1px solid var(--border);border-radius:10px;overflow:hidden}
.perm-header{display:grid;grid-template-columns:140px 1fr 80px;gap:12px;padding:9px 14px;background:var(--surface2);font-size:10px;color:var(--muted);font-weight:700;text-transform:uppercase;letter-spacing:.8px}
.perm-row{display:grid;grid-template-columns:140px 1fr 80px;gap:12px;padding:11px 14px;border-top:1px solid var(--border);align-items:center;transition:background .15s}
.perm-row:hover{background:rgba(255,255,255,.02)}
.perm-name{font-size:13px;font-weight:500}
.perm-desc{font-size:12px;color:var(--muted2)}

/* ── TOGGLE ── */
.toggle-label{display:inline-flex;align-items:center;cursor:pointer;user-select:none}
.toggle-label input[type=checkbox]{display:none}
.toggle-track{position:relative;width:36px;height:20px;background:var(--surface3);border-radius:100px;border:1px solid var(--border2);transition:background .2s}
.toggle-thumb{position:absolute;top:2px;left:2px;width:14px;height:14px;background:var(--muted2);border-radius:50%;transition:transform .2s,background .2s}
.toggle-label input:checked + .toggle-track{background:rgba(108,92,231,.25);border-color:var(--accent)}
.toggle-label input:checked + .toggle-track .toggle-thumb{transform:translateX(16px);background:var(--accent)}
