/**
 * Baayim — ana stil
 * Tema: beyaz arkaplan, lacivert detaylar
 * CSS degiskenleri ile canli tema degistirme destegi
 */

/* ===== TEMA DEGİSKENLERİ ===== */
:root {
  /* Varsayilan: Beyaz + Lacivert */
  --bg:          #ffffff;
  --bg-2:        #f4f7fb;
  --bg-3:        #e8eef8;
  --surface:     #ffffff;
  --surface-2:   #f4f7fb;
  --surface-3:   #e8eef8;
  --primary:     #0f2d6b;
  --primary-2:   #1a3f8f;
  --primary-3:   #0a1f4e;
  --accent:      #1e56c8;
  --accent-soft: #4a7de8;
  --accent-glow: rgba(30, 86, 200, 0.18);
  --text:        #0a1f4e;
  --text-2:      #2a4a7f;
  --text-muted:  #5a7aaa;
  --border:      #c8d8f0;
  --border-2:    #dce8f8;
  --success:     #0d7a4e;
  --error:       #c0192e;
  --warning:     #b45309;
  --radius:      10px;
  --radius-lg:   14px;
  --shadow:      0 2px 16px rgba(15, 45, 107, 0.10);
  --shadow-lg:   0 8px 40px rgba(15, 45, 107, 0.15);
  --font:        "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --sidebar-w:   260px;
  --tr:          0.2s ease;
}

/* ===== KOYU TEMA ===== */
[data-tema="koyu"] {
  --bg:          #020810;
  --bg-2:        #071428;
  --bg-3:        #0e2347;
  --surface:     #020810;
  --surface-2:   #071428;
  --surface-3:   #0e2347;
  --primary:     #071428;
  --primary-2:   #0e2347;
  --primary-3:   #1a3a6e;
  --accent:      #5b8fff;
  --accent-soft: #82aaff;
  --accent-glow: rgba(91, 143, 255, 0.25);
  --text:        #e8f0ff;
  --text-2:      #b8ccf0;
  --text-muted:  #6a8ab8;
  --border:      rgba(91, 143, 255, 0.15);
  --border-2:    rgba(91, 143, 255, 0.08);
  --shadow:      0 2px 16px rgba(0,0,0,0.4);
  --shadow-lg:   0 8px 40px rgba(0,0,0,0.5);
}

/* ===== GECE MAVISI TEMA ===== */
[data-tema="gece"] {
  --bg:          #0d1b2a;
  --bg-2:        #1b2d45;
  --bg-3:        #243d5e;
  --surface:     #0d1b2a;
  --surface-2:   #1b2d45;
  --surface-3:   #243d5e;
  --primary:     #1b2d45;
  --primary-2:   #243d5e;
  --primary-3:   #2e5080;
  --accent:      #4d9fff;
  --accent-soft: #7ab8ff;
  --accent-glow: rgba(77, 159, 255, 0.25);
  --text:        #ddeeff;
  --text-2:      #a8c8ee;
  --text-muted:  #5a88b8;
  --border:      rgba(77, 159, 255, 0.18);
  --border-2:    rgba(77, 159, 255, 0.09);
  --shadow:      0 2px 16px rgba(0,0,0,0.35);
  --shadow-lg:   0 8px 40px rgba(0,0,0,0.45);
}

/* ===== TEMEL ===== */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s, color 0.3s;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== AUTH ===== */
.auth-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: var(--bg-2);
}

.auth-bg {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, var(--bg-2) 0%, var(--bg) 60%, var(--bg-3) 100%);
  z-index: 0;
}

.auth-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-lg);
  animation: fadeUp 0.45s cubic-bezier(0.16,1,0.3,1) both;
}

.auth-brand { text-align: center; margin-bottom: 1.5rem; }
.auth-brand h1 { font-size: 1.35rem; margin: 0.75rem 0 0.25rem; font-weight: 700; color: var(--text); }
.auth-brand p { color: var(--text-muted); margin: 0; font-size: 0.9rem; }

.brand-mark {
  display: inline-block;
  width: 12px; height: 12px;
  border-radius: 4px;
  background: linear-gradient(135deg, var(--accent), var(--primary-2));
}
.brand-mark-lg { width: 40px; height: 40px; border-radius: 10px; }

.auth-form { display: flex; flex-direction: column; gap: 1rem; }
.auth-hint { text-align: center; font-size: 0.85rem; color: var(--text-muted); margin-top: 1.25rem; }

/* ===== APP LAYOUT ===== */
.app-body {
  display: flex;
  min-height: 100vh;
  background: var(--bg);
  transition: background 0.3s;
}

/* ===== SIDEBAR ===== */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: linear-gradient(180deg, var(--primary-3) 0%, var(--primary) 50%, var(--primary-2) 100%);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 1rem 0.85rem 0.9rem;
  position: sticky;
  top: 0;
  height: 100vh;
  box-shadow: 4px 0 24px rgba(15,45,107,0.12);
  transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.3s;
  will-change: transform;
}

.sidebar:hover {
  box-shadow: 6px 0 32px rgba(15,45,107,0.2);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.15rem 0.5rem 1rem;
}

.brand-text { font-weight: 800; font-size: 1.08rem; display: block; color: #fff; line-height: 1.1; }
.brand-tag  { font-size: 0.73rem; color: rgba(255,255,255,0.58); display: block; margin-top: 0.22rem; line-height: 1.35; max-width: 16ch; }

.sidebar-hud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  padding: 0 0.5rem 1rem;
}

.env-badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.sidebar-hud-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.88);
}
.env-local      { background: rgba(245,158,11,0.25); color: #fcd34d; }
.env-production { background: rgba(16,185,129,0.25); color: #6ee7b7; }

.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 0;
  overflow: auto;
  scrollbar-width: thin;
}

.nav-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.4rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.nav-section-title {
  padding: 0 0.55rem;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.42);
}

.nav-section-items {
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.78rem 0.85rem;
  border-radius: 16px;
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: background var(--tr), color var(--tr), transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
  border: 1px solid transparent;
}

.nav-link:hover {
  background: rgba(255,255,255,0.11);
  color: #fff;
  text-decoration: none;
  transform: translateX(2px);
  border-color: rgba(255,255,255,0.08);
}

.nav-link.is-active {
  background: linear-gradient(135deg, rgba(255,255,255,0.18), rgba(255,255,255,0.08));
  color: #fff;
  font-weight: 600;
  border-color: rgba(255,255,255,0.22);
  box-shadow: 0 12px 28px rgba(6, 15, 36, 0.22);
}

.nav-link.is-active::before {
  content: "";
  position: absolute;
  left: 0.35rem;
  top: 0.55rem;
  bottom: 0.55rem;
  width: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
}

.nav-link.is-active .nav-icon {
  background: rgba(255, 255, 255, 0.18);
}

.nav-icon {
  min-width: 2.2rem;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.11);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.nav-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
}

.nav-copy strong {
  color: inherit;
  font-size: 0.92rem;
  line-height: 1.15;
}

.nav-copy small {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.71rem;
  line-height: 1.15;
}

.sidebar-footer {
  padding: 1rem 0.5rem 0;
  border-top: 1px solid rgba(255,255,255,0.12);
  margin-top: auto;
}

.user-chip { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; padding: 0.8rem 0.9rem; border-radius: 18px; background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.08); }
.user-chip strong { display: block; font-size: 0.9rem; color: #fff; }
.user-chip small  { color: rgba(255,255,255,0.5); font-size: 0.75rem; }

.user-avatar {
  width: 38px; height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255,255,255,0.28), rgba(255,255,255,0.16));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  color: #fff;
}

/* ===== MAIN CONTENT ===== */
.main-content {
  flex: 1;
  min-width: 0;
  padding: 1.75rem 2.25rem 2.75rem;
  background: var(--bg);
  animation: pageSlideIn 0.4s cubic-bezier(0.16,1,0.3,1) both;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(30, 86, 200, 0.12), transparent 32%),
    linear-gradient(135deg, rgba(255,255,255,0.96), rgba(244,247,255,0.92));
  box-shadow: var(--shadow);
}

.page-header h1 {
  margin: 0;
  font-size: clamp(1.7rem, 2.5vw, 2.15rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  animation: fadeDown 0.4s cubic-bezier(0.16,1,0.3,1) 0.05s both;
}

/* ===== COMPONENTS ===== */
.field, .auth-form label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.field span, .auth-form label > span:first-child {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

input[type="text"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="url"],
input:not([type]),
select {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  transition: border-color var(--tr), box-shadow var(--tr);
}

input:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.15rem;
  border: none;
  border-radius: var(--radius);
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: transform 0.15s, box-shadow var(--tr), background var(--tr), opacity var(--tr);
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: linear-gradient(135deg, var(--primary-3), var(--accent));
  color: #fff;
  box-shadow: 0 4px 14px var(--accent-glow);
}
.btn-primary:hover { box-shadow: 0 6px 20px var(--accent-glow); filter: brightness(1.08); }

.btn-secondary {
  background: var(--bg-3);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--border); }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--bg-2); color: var(--text); }

.btn-sm { padding: 0.4rem 0.85rem; font-size: 0.8rem; }
.btn-block { width: 100%; }

.checkbox {
  flex-direction: row !important;
  align-items: center;
  gap: 0.5rem !important;
  cursor: pointer;
}

/* ===== ALERTS ===== */
.alert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  font-size: 0.9rem;
  border-left: 4px solid;
}
.alert-error   { background: rgba(192,25,46,0.08);  color: #9b1224; border-color: var(--error); }
.alert-success { background: rgba(13,122,78,0.08);  color: #0a5c3a; border-color: var(--success); }

/* ===== PANEL ===== */
.panel {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  animation: fadeUp 0.45s cubic-bezier(0.16,1,0.3,1) both;
  transition: border-color var(--tr), box-shadow var(--tr), transform var(--tr);
}
.panel:hover {
  border-color: var(--accent-soft);
  box-shadow: var(--shadow-lg);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  gap: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-2);
}
.panel-head h2 { margin: 0; font-size: 1rem; font-weight: 700; color: var(--text); }

.panel-rich {
  padding: 1.4rem;
}

.panel-head-rich {
  align-items: flex-start;
}

/* ===== STATS ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  animation: fadeUp 0.45s cubic-bezier(0.16,1,0.3,1) both;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}
.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-soft);
}

.stat-card-accent {
  border-color: var(--accent);
  background: linear-gradient(135deg, var(--bg-2), var(--surface));
}

.stat-label { font-size: 0.78rem; color: var(--text-muted); display: block; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.stat-value { font-size: 2rem; font-weight: 800; color: var(--primary-3); letter-spacing: -0.03em; }

[data-tema="koyu"] .stat-value,
[data-tema="gece"] .stat-value { color: var(--accent); }

/* ===== GRID / TABLE ===== */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.table-wrap { overflow-x: auto; }

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.data-table th,
.data-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-2);
}
.data-table th {
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--bg-2);
}
.data-table tbody tr { transition: background 0.15s; }
.data-table tr:hover td { background: var(--bg-3); }

/* ===== BADGE ===== */
.badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--bg-3);
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.badge-success { background: rgba(13,122,78,0.12);  color: #0a5c3a; border-color: rgba(13,122,78,0.3); }
.badge-failed  { background: rgba(192,25,46,0.12);  color: #9b1224; border-color: rgba(192,25,46,0.3); }
.badge-running { background: rgba(180,83,9,0.12);   color: #92400e; border-color: rgba(180,83,9,0.3); }

[data-tema="koyu"] .badge-success,
[data-tema="gece"] .badge-success { background: rgba(16,185,129,0.2); color: #6ee7b7; border-color: rgba(16,185,129,0.3); }
[data-tema="koyu"] .badge-failed,
[data-tema="gece"] .badge-failed  { background: rgba(244,63,94,0.2);  color: #fda4af; border-color: rgba(244,63,94,0.3); }
[data-tema="koyu"] .badge-running,
[data-tema="gece"] .badge-running { background: rgba(245,158,11,0.2); color: #fcd34d; border-color: rgba(245,158,11,0.3); }

/* ===== TOOLBAR ===== */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}
.search-form { display: flex; gap: 0.5rem; flex: 1; max-width: 420px; }
.quick-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.bulk-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--border-2);
  background: linear-gradient(180deg, rgba(15,45,107,0.03) 0%, rgba(255,255,255,0.02) 100%);
}

.bulk-toolbar.is-card-bar {
  margin-bottom: 1rem;
  border: 1px solid var(--border-2);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.bulk-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.bulk-check {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  color: var(--text);
}

.bulk-count {
  font-size: 0.84rem;
  color: var(--text-muted);
}

.bulk-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.bulk-select-cell {
  width: 52px;
  text-align: center !important;
}

.bulk-card {
  position: relative;
}

.bulk-card-check {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  z-index: 2;
  width: 18px;
  height: 18px;
}

/* ===== FEED / CARDS ===== */
.feed-list { list-style: none; margin: 0; padding: 0; }
.feed-list li {
  padding: 0.7rem 0.5rem;
  border-bottom: 1px solid var(--border-2);
  border-radius: 6px;
  transition: background 0.15s, padding-left 0.2s;
}
.feed-list li:last-child { border: none; }
.feed-list li:hover { background: var(--bg-2); padding-left: 0.85rem; }
.feed-list strong { display: block; font-size: 0.9rem; color: var(--text); }
.feed-list span   { font-size: 0.78rem; color: var(--text-muted); }

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.news-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  animation: fadeUp 0.45s cubic-bezier(0.16,1,0.3,1) both;
  transition: border-color 0.25s, transform 0.3s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.25s;
}
.news-card:hover {
  border-color: var(--accent);
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}
.news-cat { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; color: var(--accent); letter-spacing: 0.06em; }
.news-card h3 { margin: 0.5rem 0; font-size: 1rem; line-height: 1.35; color: var(--text); }
.news-card p  { color: var(--text-muted); font-size: 0.88rem; margin: 0 0 1rem; }
.news-card footer { display: flex; justify-content: space-between; font-size: 0.78rem; color: var(--text-muted); }

.bots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem;
}
.bot-form { display: flex; flex-direction: column; gap: 0.85rem; }

/* ===== PAGINATION ===== */
.pagination { display: flex; gap: 0.35rem; margin-top: 1.5rem; flex-wrap: wrap; }
.pagination a {
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  background: var(--surface);
  color: var(--text-muted);
  text-decoration: none;
  border: 1px solid var(--border);
  transition: background var(--tr), color var(--tr), transform 0.2s;
}
.pagination a:hover { background: var(--bg-3); color: var(--text); transform: translateY(-2px); }
.pagination a.is-active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ===== WELCOME BANNER ===== */
.welcome-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, var(--primary-3) 0%, var(--primary-2) 100%);
  border-radius: var(--radius-lg);
  animation: fadeUp 0.4s cubic-bezier(0.16,1,0.3,1) both;
  position: relative;
  overflow: hidden;
}
.welcome-banner::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -5%;
  width: 250px; height: 250px;
  background: radial-gradient(circle, rgba(255,255,255,0.08), transparent 70%);
  pointer-events: none;
}
.welcome-banner h2 { margin: 0 0 0.35rem; font-size: 1.2rem; color: #fff; }
.welcome-banner p  { margin: 0; color: rgba(255,255,255,0.65); font-size: 0.88rem; }
.welcome-actions { display: flex; gap: 0.5rem; }

/* ===== INFO LIST ===== */
.info-list { list-style: none; margin: 0; padding: 0; }
.info-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border-2);
  font-size: 0.88rem;
}
.info-list li:last-child { border: none; }
.info-list strong { color: var(--text); }
.info-list span   { color: var(--text-muted); text-align: right; word-break: break-all; }

/* ===== MISC ===== */
.form-section { margin: 0.5rem 0 0; font-size: 0.82rem; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 0.05em; }
.app-footer {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-2);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}
.empty, .empty-state { color: var(--text-muted); text-align: center; padding: 2rem; }
.text-sm { font-size: 0.85rem; }
.meta { font-size: 0.8rem; color: var(--text-muted); }
code { background: var(--bg-3); padding: 0.15rem 0.4rem; border-radius: 4px; font-size: 0.85em; color: var(--accent); border: 1px solid var(--border); }

.admin-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.95fr);
  gap: 1rem;
  margin-bottom: 1.4rem;
  padding: 1.35rem 1.45rem;
  border: 1px solid var(--border);
  border-radius: 22px;
  background:
    radial-gradient(circle at top right, rgba(30, 86, 200, 0.16), transparent 34%),
    linear-gradient(135deg, rgba(15, 45, 107, 0.06), rgba(255, 255, 255, 0.92));
  box-shadow: var(--shadow);
}

.admin-kicker {
  display: inline-flex;
  align-items: center;
  padding: 0.34rem 0.7rem;
  border-radius: 999px;
  background: rgba(30, 86, 200, 0.1);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.admin-hero-copy h2 {
  margin: 0.9rem 0 0.55rem;
  font-size: clamp(1.5rem, 2.4vw, 2.05rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--text);
}

.admin-hero-copy p {
  margin: 0;
  max-width: 66ch;
  color: var(--text-muted);
  line-height: 1.7;
}

.admin-hero-stack {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  align-content: start;
}

.admin-hero-chip {
  padding: 1rem 0.9rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
}

.admin-hero-chip strong {
  display: block;
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--primary-3);
  letter-spacing: -0.03em;
}

.admin-hero-chip span {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.admin-stats-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.modules-form {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.module-head-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.6rem;
}

.module-groups {
  display: grid;
  gap: 1rem;
}

.module-group {
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,0.96) 0%, rgba(244,247,255,0.92) 100%);
}

.module-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.65rem;
}

.module-group-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.module-group-mark {
  width: 2.9rem;
  height: 2.9rem;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-3), var(--accent));
  color: #fff;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.module-group-brand h3 {
  margin: 0;
  font-size: 1.05rem;
  color: var(--text);
}

.module-group-brand p {
  margin: 0.18rem 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.module-group-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
}

.module-group-copy {
  margin: 0 0 0.95rem;
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.6;
}

.module-mini-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.72rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.84);
  color: var(--primary-2);
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.module-mini-btn:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 1);
  border-color: var(--accent-soft);
}

.module-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(265px, 1fr));
  gap: 0.9rem;
}

.module-card {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  padding: 1rem;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.92);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  min-height: 172px;
}

.module-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-soft);
  box-shadow: var(--shadow);
}

.module-card.is-on {
  box-shadow: inset 0 0 0 1px rgba(30, 86, 200, 0.08);
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(244,247,255,0.92));
}

.module-card.is-off {
  opacity: 0.88;
  background: rgba(249, 251, 255, 0.82);
}

.module-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
}

.module-card-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.45rem;
}

.module-card-title-row strong {
  color: var(--text);
  font-size: 0.98rem;
  line-height: 1.3;
}

.module-card p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.65;
  font-size: 0.88rem;
}

.module-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  cursor: pointer;
  white-space: nowrap;
}

.module-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.module-switch-ui {
  position: relative;
  width: 2.9rem;
  height: 1.7rem;
  border-radius: 999px;
  background: rgba(15, 45, 107, 0.12);
  transition: background 0.2s ease;
}

.module-switch-ui::after {
  content: "";
  position: absolute;
  top: 0.18rem;
  left: 0.18rem;
  width: 1.34rem;
  height: 1.34rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 3px 10px rgba(15, 45, 107, 0.18);
  transition: transform 0.2s ease;
}

.module-switch input:checked + .module-switch-ui {
  background: linear-gradient(135deg, var(--primary-3), var(--accent));
}

.module-switch input:checked + .module-switch-ui::after {
  transform: translateX(1.18rem);
}

.module-switch-text {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
}

.module-switch.is-disabled {
  opacity: 0.75;
  cursor: not-allowed;
}

.modules-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding-top: 0.35rem;
  border-top: 1px solid rgba(30, 86, 200, 0.08);
}

.toast {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  background: var(--bg-2);
  border-left: 3px solid var(--accent);
  font-size: 0.9rem;
  color: var(--text);
  animation: fadeUp 0.3s ease both;
}
.toast.is-error   { border-left-color: var(--error); }
.toast.is-success { border-left-color: var(--success); }

.brand-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(255,255,255,0.18);
  color: #fff;
  font-weight: 800;
  font-size: 1.18rem;
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.16);
}
.brand-logo-lg { width: 56px; height: 56px; font-size: 1.5rem; border-radius: 14px; }

/* ===== TEMA DEGİSTİRİCİ PANEL ===== */
.tema-panel {
  position: fixed;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.tema-toggle-btn {
  background: var(--primary-3);
  color: #fff;
  border: none;
  border-radius: 10px 0 0 10px;
  padding: 0.75rem 0.6rem;
  cursor: pointer;
  font-size: 1.1rem;
  box-shadow: -2px 0 12px rgba(15,45,107,0.2);
  transition: background var(--tr), transform var(--tr);
  writing-mode: vertical-rl;
  letter-spacing: 0.05em;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}
.tema-toggle-btn:hover { background: var(--accent); transform: translateX(-3px); }

.tema-secenekler {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-right: none;
  border-radius: 12px 0 0 12px;
  padding: 1rem;
  box-shadow: var(--shadow-lg);
  display: none;
  flex-direction: column;
  gap: 0.6rem;
  min-width: 160px;
  animation: slideInRight 0.25s cubic-bezier(0.16,1,0.3,1) both;
}
.tema-secenekler.acik { display: flex; }

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

.tema-secenekler h4 {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.tema-btn {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.75rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: var(--bg-2);
  color: var(--text);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color var(--tr), background var(--tr), transform 0.2s;
  text-align: left;
}
.tema-btn:hover { border-color: var(--accent); background: var(--bg-3); transform: translateX(-3px); }
.tema-btn.aktif { border-color: var(--accent); background: var(--accent); color: #fff; }

.tema-renk {
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(0,0,0,0.1);
  flex-shrink: 0;
}

/* ===== ANİMASYONLAR ===== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes pageSlideIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Staggered panel animasyonlari */
.panel:nth-child(1) { animation-delay: 0.05s; }
.panel:nth-child(2) { animation-delay: 0.10s; }
.panel:nth-child(3) { animation-delay: 0.15s; }
.panel:nth-child(4) { animation-delay: 0.20s; }
.stats-grid .stat-card:nth-child(1) { animation-delay: 0.05s; }
.stats-grid .stat-card:nth-child(2) { animation-delay: 0.10s; }
.stats-grid .stat-card:nth-child(3) { animation-delay: 0.15s; }
.stats-grid .stat-card:nth-child(4) { animation-delay: 0.20s; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .app-body { flex-direction: column; }
  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
    transform: none !important;
    padding: 0.9rem;
  }
  .sidebar-nav {
    overflow: visible;
  }
  .nav-section {
    padding: 0.55rem;
  }
  .nav-section-items {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .nav-link {
    width: calc(50% - 0.16rem);
  }
  .sidebar-footer {
    width: 100%;
    padding-bottom: 0;
  }
  .main-content { padding: 1rem; }
  .page-header,
  .module-group-head,
  .panel-head-rich,
  .modules-actions {
    flex-direction: column;
    align-items: flex-start;
  }
  .admin-hero {
    grid-template-columns: 1fr;
  }
  .admin-hero-stack {
    grid-template-columns: repeat(2, 1fr);
  }
  .module-head-actions,
  .module-group-tools {
    justify-content: flex-start;
  }
  .tema-panel { display: none; }
}

@media (max-width: 560px) {
  .nav-link,
  .module-mini-btn,
  .module-head-actions .btn,
  .modules-actions .btn {
    width: 100%;
  }

  .admin-hero-stack {
    grid-template-columns: 1fr;
  }

  .nav-section-items,
  .module-group-tools,
  .module-head-actions {
    width: 100%;
  }
}
.sidebar {
  background: linear-gradient(180deg, var(--admin-sidebar-bg-dark) 0%, var(--admin-sidebar-bg) 50%, var(--admin-sidebar-bg-soft) 100%);
  color: var(--admin-sidebar-text);
}

.sidebar .brand-text,
.sidebar .brand-tag,
.sidebar .nav-link,
.sidebar .user-chip strong,
.sidebar .user-chip small,
.sidebar .env-badge {
  color: var(--admin-sidebar-text);
}

.sidebar .brand-tag,
.sidebar .user-chip small,
.sidebar .env-badge {
  opacity: 0.78;
}

.sidebar .nav-link {
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(255, 255, 255, 0.08);
}

.sidebar .nav-link:hover,
.sidebar .nav-link.is-active {
  background: rgba(255, 255, 255, 0.14);
  text-decoration: none;
}

.brand-logo.has-image {
  padding: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(15, 45, 107, 0.08);
}

.brand-logo.has-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  padding: 0.28rem;
}

.settings-grid {
  align-items: start;
}

.settings-stack {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.compact-grid {
  gap: 0.85rem;
}

.textarea-lines {
  min-height: 140px;
  font-family: Consolas, "SFMono-Regular", Menlo, Monaco, monospace;
}

.brand-preview {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.brand-preview img {
  width: 74px;
  height: 74px;
  border-radius: 16px;
  object-fit: cover;
  background: #fff;
  border: 1px solid var(--border-2);
}

.brand-preview strong,
.brand-preview span {
  display: block;
}

.brand-preview span {
  margin-top: 0.2rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  word-break: break-all;
}

.field-check {
  margin-top: -0.2rem;
}

.field-check input[type="checkbox"] {
  margin-right: 0.45rem;
}

.ad-slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1rem;
}

.ad-slot-card {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.ad-slot-note {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.ad-preview-frame {
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: 0.9rem;
}

.ad-preview-frame img {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  display: block;
  border-radius: 12px;
  border: 1px solid var(--border-2);
  background: #fff;
}

.ad-preview-frame code {
  display: block;
  margin-top: 0.65rem;
  white-space: pre-wrap;
  word-break: break-word;
}
