/* ================================================================
   3bayt İş İstasyonu — CSS
   Koyu tema, flat, border-radius: 4px
   ================================================================ */

:root {
  --bg:       #111214;
  --bg2:      #1a1c1f;
  --bg3:      #23262b;
  --border:   #2c2f36;
  --text:     #e4e6ea;
  --text2:    #8b949e;
  --text3:    #555e6b;
  --accent:   #4f8ef7;
  --red:      #e05252;
  --yellow:   #d4a017;
  --green:    #3caa6e;
  --red-bg:   rgba(224,82,82,.12);
  --yel-bg:   rgba(212,160,23,.12);
  --grn-bg:   rgba(60,170,110,.12);
  --blu-bg:   rgba(79,142,247,.12);
  --radius:   4px;
  --font:     -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
}

/* ── Sidebar ──────────────────────────────────────────────── */
#sidebar {
  width: 200px;
  flex-shrink: 0;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 1rem 0.5rem;
  position: fixed;
  top: 0; left: 0; bottom: 0;
}

.sidebar-logo {
  font-size: 18px;
  font-weight: 600;
  padding: 0 8px 1.25rem;
  letter-spacing: -.3px;
}

.logo-dot { color: var(--accent); }

#sidebar ul { list-style: none; flex: 1; display: flex; flex-direction: column; gap: 2px; }

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius);
  color: var(--text2);
  text-decoration: none;
  transition: background .15s, color .15s;
  font-size: 13.5px;
}

.nav-link i { font-style: normal; font-size: 16px; width: 20px; text-align: center; }

.nav-link:hover { background: var(--bg3); color: var(--text); }
.nav-link.active { background: var(--bg3); color: var(--text); }

.sidebar-bottom {
  padding-top: 12px;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

/* ── Ana içerik ──────────────────────────────────────────── */
#content {
  margin-left: 200px;
  flex: 1;
  padding: 1.5rem;
  min-width: 0;
}

/* ── Arama çubuğu ────────────────────────────────────────── */
#search-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 1.5rem;
}

#search-input {
  flex: 1;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 9px 14px;
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border-color .15s;
}

#search-input:focus { border-color: var(--accent); }
#search-input::placeholder { color: var(--text3); }

button, .btn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 9px 16px;
  font-size: 13.5px;
  cursor: pointer;
  transition: opacity .15s;
}

button:hover, .btn:hover { opacity: .85; }
.btn-ghost {
  background: var(--bg3);
  color: var(--text);
}
.btn-danger { background: var(--red); }
.btn-sm { padding: 5px 10px; font-size: 12.5px; }

/* ── Arama sonucu ────────────────────────────────────────── */
#search-result {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1.5rem;
  white-space: pre-wrap;
}

/* ── Sayfalar ────────────────────────────────────────────── */
.page.hidden { display: none; }

/* ── Kartlar ─────────────────────────────────────────────── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
}

.stat-card .label { font-size: 12px; color: var(--text2); margin-bottom: 4px; }
.stat-card .value { font-size: 24px; font-weight: 500; }
.stat-card .value.warn { color: var(--yellow); }
.stat-card .value.danger { color: var(--red); }

/* ── Bölüm başlığı ───────────────────────────────────────── */
.section-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text);
}

/* ── Bildirim listesi ────────────────────────────────────── */
.notif-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 1.5rem; }

.notif-item {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.notif-icon {
  width: 34px; height: 34px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.notif-icon.danger  { background: var(--red-bg); }
.notif-icon.warning { background: var(--yel-bg); }
.notif-icon.info    { background: var(--blu-bg); }
.notif-icon.success { background: var(--grn-bg); }

.notif-body { flex: 1; min-width: 0; }
.notif-title { font-size: 13.5px; font-weight: 500; }
.notif-sub   { font-size: 12px; color: var(--text2); }
.notif-time  { font-size: 12px; color: var(--text3); flex-shrink: 0; }

/* ── Tablo ───────────────────────────────────────────────── */
.table-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1.5rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

thead th {
  background: var(--bg2);
  text-align: left;
  padding: 9px 12px;
  font-weight: 500;
  color: var(--text2);
  white-space: nowrap;
}

tbody tr { border-top: 1px solid var(--border); }
tbody tr:hover { background: var(--bg2); }
tbody td { padding: 9px 12px; }

.badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: var(--radius);
  font-size: 11.5px;
  font-weight: 500;
}

.badge-green  { background: var(--grn-bg); color: var(--green); }
.badge-red    { background: var(--red-bg); color: var(--red); }
.badge-yellow { background: var(--yel-bg); color: var(--yellow); }
.badge-blue   { background: var(--blu-bg); color: var(--accent); }

/* ── Form ────────────────────────────────────────────────── */
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 12px; color: var(--text2); margin-bottom: 5px; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 12px;
  color: var(--text);
  font-size: 13.5px;
  outline: none;
  transition: border-color .15s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--accent);
}

/* ── Ayarlar kartı ───────────────────────────────────────── */
.settings-section {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.settings-section h3 { font-size: 13.5px; font-weight: 600; margin-bottom: 1rem; }

/* ── Toolbar ─────────────────────────────────────────────── */
.toolbar { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.toolbar input {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 7px 12px;
  color: var(--text);
  font-size: 13px;
  outline: none;
  flex: 1;
  min-width: 180px;
  max-width: 320px;
}
.toolbar input:focus { border-color: var(--accent); }

/* ── Yardımcılar ─────────────────────────────────────────── */
.hidden { display: none !important; }
.text-danger  { color: var(--red); }
.text-warning { color: var(--yellow); }
.text-muted   { color: var(--text2); }
.mt-1 { margin-top: 8px; }
.flex { display: flex; gap: 8px; align-items: center; }

/* Spinner */
.spinner {
  display: inline-block;
  width: 16px; height: 16px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Toast */
#toast {
  position: fixed;
  bottom: 24px; right: 24px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 18px;
  font-size: 13px;
  z-index: 999;
  transition: opacity .3s;
}
#toast.hidden { display: none; }
