﻿/* Master Yönetim — paylaşılan tasarım sistemi. Tüm ekranlar bu dosyayı kullanır,
   sadece --accent gerekirse sayfa başına küçük bir <style> ile ezilir. */

:root {
  --bg: #08090d;
  --bg-elevated: #0d0f17;
  --surface: #12151f;
  --surface-hover: #171b28;
  --surface-solid: #131722;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #f5f6f8;
  --text-muted: #98a0b3;
  --text-dim: #616981;

  --accent: #f5a623;
  --accent-hover: #ffb746;
  --accent-ink: #1a1206;
  --accent-soft: rgba(245, 166, 35, 0.14);

  --primary: #3b82f6;
  --primary-soft: rgba(59, 130, 246, 0.14);
  --success: #22c55e;
  --success-soft: rgba(34, 197, 94, 0.14);
  --danger: #ef4444;
  --danger-soft: rgba(239, 68, 68, 0.14);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.5);

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { color-scheme: dark; }

body {
  background: var(--bg);
  background-image:
    radial-gradient(circle at 15% -10%, rgba(245, 166, 35, 0.06), transparent 45%),
    radial-gradient(circle at 100% 0%, rgba(59, 130, 246, 0.05), transparent 40%);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--accent); color: var(--accent-ink); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 12px 18px;
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.15s ease, background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

.btn-block { width: 100%; }
.btn-sm { padding: 8px 14px; font-size: 0.82rem; border-radius: var(--radius-sm); }

.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }

.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-secondary:hover:not(:disabled) { border-color: var(--border-strong); background: var(--surface-hover); }

.btn-success { background: var(--success); color: #052e14; }
.btn-success:hover:not(:disabled) { filter: brightness(1.08); }

.btn-info { background: var(--primary); color: #fff; }
.btn-info:hover:not(:disabled) { filter: brightness(1.08); }

.btn-danger { background: var(--danger-soft); color: var(--danger); border-color: rgba(239, 68, 68, 0.3); }
.btn-danger:hover:not(:disabled) { background: rgba(239, 68, 68, 0.22); }

.btn-ghost { background: transparent; color: var(--text-muted); border-color: var(--border); }
.btn-ghost:hover:not(:disabled) { color: var(--text); border-color: var(--border-strong); }

.btn-icon { width: 34px; height: 34px; padding: 0; border-radius: var(--radius-sm); }

.btn-spinner {
  width: 15px; height: 15px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: gc-spin 0.7s linear infinite;
}
@keyframes gc-spin { to { transform: rotate(360deg); } }

/* ---------- Surfaces ---------- */

.panel, .card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.panel { padding: 24px; }

.panel-title {
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  letter-spacing: -0.01em;
}
.panel-title i { color: var(--accent); }

/* ---------- Forms ---------- */

.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 7px;
}

input, select, textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 0.92rem;
  transition: border-color 0.15s ease, background 0.15s ease;
}
input::placeholder, textarea::placeholder { color: var(--text-dim); }
input:hover, select:hover, textarea:hover { border-color: var(--border-strong); }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface-solid);
}

/* ---------- Switch (toggle) ---------- */

.switch { position: relative; display: inline-block; width: 44px; height: 26px; flex-shrink: 0; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch-slider {
  position: absolute; inset: 0; cursor: pointer;
  background: var(--border-strong); border-radius: 999px;
  transition: background 0.15s ease;
}
.switch-slider::before {
  content: ""; position: absolute; left: 3px; top: 3px;
  width: 20px; height: 20px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  transition: transform 0.15s ease;
}
.switch input:checked + .switch-slider { background: var(--accent); }
.switch input:checked + .switch-slider::before { transform: translateX(18px); }
.switch input:focus-visible + .switch-slider { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Tables ---------- */

table { width: 100%; border-collapse: collapse; }
th {
  text-align: left;
  padding: 12px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
}
td { padding: 13px 12px; border-bottom: 1px solid var(--border); font-size: 0.88rem; }
tbody tr { transition: background 0.12s ease; }
tbody tr:hover { background: rgba(255, 255, 255, 0.02); }
tbody tr:last-child td { border-bottom: none; }

/* ---------- Badges ---------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.76rem;
}
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-info { background: var(--primary-soft); color: var(--primary); }
.badge-neutral { background: rgba(255, 255, 255, 0.06); color: var(--text-muted); }

/* ---------- Stat cards (dashboard / raporlar) ---------- */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.stat-card-title {
  font-size: 0.74rem;
  color: var(--text-dim);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}
.stat-card-val {
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.stat-card-sub {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: 4px;
}

/* ---------- Empty state ---------- */

.empty-state {
  text-align: center;
  color: var(--text-dim);
  padding: 56px 20px;
  font-size: 0.9rem;
}
.empty-state i { font-size: 1.8rem; margin-bottom: 12px; display: block; color: var(--text-dim); }

/* ---------- Modal ---------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 5, 8, 0.72);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  animation: gc-fade-in 0.15s ease;
}
@keyframes gc-fade-in { from { opacity: 0; } to { opacity: 1; } }

.modal-card {
  background: var(--surface-solid);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  padding: 36px;
  width: 420px;
  max-width: 100%;
  box-shadow: var(--shadow-lg);
  animation: gc-pop-in 0.18s cubic-bezier(0.2, 0.8, 0.3, 1);
}
@keyframes gc-pop-in { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: none; } }

.modal-icon {
  width: 52px; height: 52px;
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  margin: 0 auto 16px;
}
.modal-icon.danger { background: var(--danger-soft); color: var(--danger); }

.modal-title { font-weight: 800; font-size: 1.25rem; text-align: center; letter-spacing: -0.01em; }
.modal-subtitle { color: var(--text-muted); font-size: 0.86rem; text-align: center; margin-top: 6px; }
.modal-actions { display: flex; gap: 10px; margin-top: 22px; }
.modal-actions .btn { flex: 1; }

/* ---------- Toasts ---------- */

.toast-stack {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: min(360px, calc(100vw - 40px));
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--surface-solid);
  border: 1px solid var(--border-strong);
  border-left: 3px solid var(--text-dim);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  box-shadow: var(--shadow-md);
  font-size: 0.86rem;
  font-weight: 600;
  animation: gc-toast-in 0.2s cubic-bezier(0.2, 0.8, 0.3, 1);
}
.toast.hide { animation: gc-toast-out 0.18s ease forwards; }
@keyframes gc-toast-in { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes gc-toast-out { to { opacity: 0; transform: translateX(24px); } }

.toast-success { border-left-color: var(--success); }
.toast-error { border-left-color: var(--danger); }
.toast-info { border-left-color: var(--primary); }

.toast i { margin-top: 1px; }
.toast-success i { color: var(--success); }
.toast-error i { color: var(--danger); }
.toast-info i { color: var(--primary); }

/* ---------- Layout helpers ---------- */

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}
.brand .brand-badge {
  width: 30px; height: 30px;
  border-radius: 9px;
  background: var(--accent);
  color: var(--accent-ink);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.95rem;
  font-weight: 900;
}

.container { max-width: 1450px; margin: 0 auto; }

.grid-2 { display: grid; grid-template-columns: 380px 1fr; gap: 24px; }
.grid-1 { display: grid; grid-template-columns: 1fr; gap: 24px; }

@media (max-width: 900px) {
  .grid-2 { grid-template-columns: 1fr; }
}
