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

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

:root {
  --sidebar-w: 260px;
  --topbar-h: 72px;
}

body {
  font-family: 'Inter', 'Segoe UI', sans-serif;
  background: #050B14;
  color: #fff;
  min-height: 100vh;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.92rem;
  border: none;
  cursor: pointer;
  transition: 0.2s ease;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, #00AEEF 0%, #0072BC 100%);
  color: #fff;
  box-shadow: 0 8px 24px rgba(0, 174, 239, 0.28);
}
.btn-primary:hover { transform: translateY(-1px); }
.btn-outline {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.16);
}
.btn-outline:hover { border-color: #00AEEF; color: #00AEEF; }
.btn-danger { background: #DC2626; color: #fff; }
.btn-ghost { background: transparent; color: #94A8BE; }
.btn-sm { padding: 8px 12px; font-size: 0.82rem; }
.btn-block { width: 100%; }

.auth-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(ellipse at top, rgba(0,174,239,0.18), transparent 50%),
    #050B14;
}
.auth-card {
  width: min(480px, 100%);
  background: #0C1829;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 24px;
  padding: 36px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
}
.auth-brand { text-align: center; margin-bottom: 24px; }
.auth-brand img { height: 56px; margin: 0 auto 16px; }
.auth-brand h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.6rem;
  margin-bottom: 8px;
}
.auth-brand p, .muted { color: #94A8BE; }
.auth-form { display: grid; gap: 14px; }
.auth-form h2 {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #00AEEF;
  margin-top: 8px;
}
.auth-form label, .field {
  display: grid;
  gap: 6px;
  font-size: 0.85rem;
  color: #94A8BE;
}
.auth-form input,
.field input,
.field select,
.field textarea,
.table-tools input,
.table-tools select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.08);
  background: #050B14;
  color: #fff;
}
.auth-form input:focus,
.field input:focus,
.field select:focus,
.field textarea:focus,
.table-tools input:focus,
.table-tools select:focus {
  outline: none;
  border-color: #00AEEF;
  box-shadow: 0 0 0 3px rgba(0,174,239,0.25);
}

.admin-app { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w);
  background: #020508;
  border-right: 1px solid rgba(255,255,255,0.06);
  padding: 24px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px;
}
.sidebar-brand img { height: 40px; }
.sidebar-brand strong {
  font-family: 'Outfit', sans-serif;
  letter-spacing: 0.04em;
}
.sidebar-brand span { display: block; color: #94A8BE; font-size: 0.75rem; }
.nav-list { display: grid; gap: 6px; }
.nav-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 12px;
  color: #94A8BE;
  font-weight: 500;
}
.nav-list a:hover, .nav-list a.active {
  background: rgba(0,174,239,0.12);
  color: #fff;
}
.sidebar-foot { margin-top: auto; padding: 0 8px; color: #94A8BE; font-size: 0.8rem; }

.main { flex: 1; min-width: 0; }
.topbar {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: rgba(5,11,20,0.92);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
}
.topbar-right { display: flex; align-items: center; gap: 16px; color: #94A8BE; }
.content { padding: 28px; }

.alert {
  padding: 12px 14px;
  border-radius: 12px;
  margin-bottom: 16px;
  font-size: 0.92rem;
}
.alert-success { background: rgba(16,185,129,0.15); color: #6EE7B7; }
.alert-error { background: rgba(220,38,38,0.15); color: #FCA5A5; }
.alert-info { background: rgba(0,174,239,0.12); color: #7DD3FC; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card, .panel {
  background: #0C1829;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 18px;
  padding: 20px;
}
.stat-card .label { color: #94A8BE; font-size: 0.85rem; }
.stat-card .value {
  font-family: 'Outfit', sans-serif;
  font-size: 2rem;
  margin-top: 8px;
}
.stat-card.accent .value { color: #00AEEF; }
.stat-card.ok .value { color: #10B981; }
.stat-card.warn .value { color: #F59E0B; }
.stat-card.bad .value { color: #F87171; }

.panel + .panel { margin-top: 16px; }
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.panel-head h2 { font-size: 1.05rem; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  font-size: 0.92rem;
  vertical-align: top;
}
th { color: #94A8BE; font-weight: 600; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; }
tr:hover td { background: rgba(255,255,255,0.02); }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-yeni { background: rgba(0,174,239,0.16); color: #7DD3FC; }
.badge-inceleniyor { background: rgba(245,158,11,0.16); color: #FBBF24; }
.badge-onaylandi { background: rgba(16,185,129,0.16); color: #6EE7B7; }
.badge-reddedildi { background: rgba(248,113,113,0.16); color: #FCA5A5; }
.badge-active { background: rgba(0,174,239,0.16); color: #7DD3FC; }
.badge-open { background: rgba(79,195,247,0.16); color: #BAE6FD; }
.badge-review { background: rgba(107,114,128,0.2); color: #D1D5DB; }

.table-tools {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.table-tools input, .table-tools select { max-width: 240px; }
.pager { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-grid .full { grid-column: 1 / -1; }
.field textarea { min-height: 110px; resize: vertical; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }

.detail-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 16px;
}
.kv { display: grid; gap: 12px; }
.kv div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.kv span { color: #94A8BE; }
.kv strong { text-align: right; }

.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.tab-btn {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.08);
  background: transparent;
  color: #94A8BE;
  cursor: pointer;
}
.tab-btn.active { background: rgba(0,174,239,0.16); color: #fff; border-color: transparent; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

.repeat-row {
  display: grid;
  grid-template-columns: 70px 1fr 90px 1.4fr;
  gap: 8px;
  margin-bottom: 8px;
}
.repeat-row.two { grid-template-columns: 1fr 1.6fr auto; }
.repeat-row.one { grid-template-columns: 1fr auto; }

.mobile-toggle {
  display: none;
  background: none;
  border: 0;
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
}

@media (max-width: 1100px) {
  .stat-grid, .form-grid, .detail-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    transform: translateX(-100%);
    z-index: 40;
    transition: transform 0.2s ease;
  }
  .sidebar.open { transform: none; }
  .mobile-toggle { display: inline-flex; }
  .stat-grid, .form-grid, .detail-grid, .repeat-row, .repeat-row.two { grid-template-columns: 1fr; }
  .content, .topbar { padding-left: 16px; padding-right: 16px; }
}
