/**
 * İlanRadar - Dashboard Light Theme (Sahibinden Sarısı & Laciverti)
 */

:root {
  --bg-page: #F4F6F9;
  --bg-sidebar: #FFFFFF;
  --bg-card: #FFFFFF;
  --bg-input: #FFFFFF;
  --border: #E2E8F0;
  --border-focus: #123E74;
  --text-main: #1E293B;
  --text-muted: #64748B;
  --sh-yellow: #FFE800;
  --sh-yellow-hover: #F5DC00;
  --sh-navy: #123E74;
  --sh-navy-hover: #0E2E56;
  --primary: #FFE800;
  --primary-hover: #F5DC00;
  --success: #10B981;
  --success-hover: #059669;
  --danger: #EF4444;
  --danger-hover: #DC2626;
  --warning: #F59E0B;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font);
}

body {
  background-color: var(--bg-page);
  color: var(--text-main);
  min-height: 100vh;
}

.dashboard-layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 260px;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 20px;
  background: var(--sh-navy);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
}

.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid rgba(255, 232, 0, 0.4);
}

.brand-text h1 {
  font-size: 17px;
  font-weight: 800;
  color: #FFFFFF;
}

.brand-text h1 span {
  color: var(--sh-yellow);
}

.brand-text span {
  font-size: 11px;
  color: #CBD5E1;
}

.nav-menu {
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: #475569;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s;
  position: relative;
}

.nav-item:hover {
  background: #F1F5F9;
  color: var(--sh-navy);
}

.nav-item.active {
  background: #EBF2FA;
  color: var(--sh-navy);
  font-weight: 700;
  border-left: 3px solid var(--sh-navy);
}

.nav-item .icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.badge {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  background: var(--sh-yellow);
  color: var(--sh-navy);
  padding: 2px 7px;
  border-radius: 10px;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border);
}

.status-box {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #475569;
  font-weight: 600;
  background: #F8FAFC;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
}

/* Ana İçerik */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 24px 32px;
}

/* Topbar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.topbar-title h2 {
  font-size: 22px;
  font-weight: 800;
  color: var(--sh-navy);
}

.topbar-title p {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* İstatistik Satırı */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.stat-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.stat-num {
  font-size: 24px;
  font-weight: 800;
  color: var(--sh-navy);
  margin-top: 4px;
  display: block;
}

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: #FFFBE6;
  color: #B45309;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Tablolar & Kartlar */
.table-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  overflow: hidden;
}

.card-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--sh-navy);
}

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

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}

.data-table th {
  background: #F8FAFC;
  padding: 12px 16px;
  font-weight: 700;
  color: #475569;
  border-bottom: 1px solid var(--border);
}

.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #F1F5F9;
  color: var(--text-main);
}

.data-table tr:hover {
  background: #F8FAFC;
}

/* Butonlar */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-primary {
  background: var(--sh-yellow);
  color: var(--sh-navy);
  border-color: var(--sh-yellow);
  font-weight: 700;
}

.btn-primary:hover {
  background: var(--sh-yellow-hover);
  color: #000;
}

.btn-secondary {
  background: #E2E8F0;
  color: #334155;
}

.btn-secondary:hover {
  background: #CBD5E1;
}

.btn-success {
  background: var(--success);
  color: #FFFFFF;
}

.btn-danger {
  background: var(--danger);
  color: #FFFFFF;
}

.btn-sm {
  padding: 6px 10px;
  font-size: 11.5px;
}

/* Sekmeler */
.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

/* Form Elemanları */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 6px;
}

.form-group input, .form-group select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  background: #FFFFFF;
  color: var(--text-main);
  outline: none;
}

.form-group input:focus, .form-group select:focus {
  border-color: var(--sh-navy);
}

/* Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #CBD5E1;
  transition: .3s;
  border-radius: 20px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--sh-navy);
}

input:checked + .slider:before {
  transform: translateX(16px);
}

/* Modal Stilleri */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(18, 62, 116, 0.65);
  backdrop-filter: blur(3px);
  display: none !important;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  padding: 20px;
  overflow-y: auto;
}

.modal-backdrop.open,
.modal-backdrop.active {
  display: flex !important;
}

.modal-card {
  background: #FFFFFF;
  border-radius: 12px;
  padding: 24px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 15px 35px rgba(0,0,0,0.25);
  border: 1px solid var(--border);
  animation: popIn 0.2s ease-out;
  margin: auto;
}

@keyframes popIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.modal-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--sh-navy);
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
}

.modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

/* Responsive Uyumluluk */
@media (max-width: 900px) {
  .dashboard-layout {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .nav-menu {
    flex-direction: row;
    overflow-x: auto;
    padding: 10px 14px;
    gap: 8px;
  }
  .nav-item {
    white-space: nowrap;
    flex-shrink: 0;
  }
  .sidebar-footer {
    display: none;
  }
  .main-content {
    padding: 18px 14px;
  }
  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .topbar-actions {
    width: 100%;
  }
  .topbar-actions .btn {
    width: 100%;
  }
  .stats-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
}

@media (max-width: 540px) {
  .stats-row {
    grid-template-columns: 1fr;
  }
  .card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .header-tools {
    width: 100%;
    display: flex;
    gap: 6px;
  }
  .header-tools .btn {
    flex: 1;
  }
  .modal-card {
    padding: 16px;
    width: 100%;
  }
  .modal-actions {
    flex-direction: column-reverse;
  }
  .modal-actions .btn {
    width: 100%;
  }
}
