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

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

:root {
  /* Varsayılan renkler - Ayarlardan değiştirilebilir */
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --dark: #0f172a;
  --text: #334155;
  --bg: #f8fafc;
  --card-bg: #ffffff;
}

body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-light);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* Login Page */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  padding: 20px;
}

.login-container {
  max-width: 440px;
  width: 100%;
}

.login-box {
  background: white;
  border-radius: 24px;
  padding: 48px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.login-header {
  text-align: center;
  margin-bottom: 36px;
}

.login-header h1 {
  font-size: 32px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 8px;
}

.login-header p {
  color: var(--text);
  font-size: 15px;
}

.login-footer {
  margin-top: 28px;
  padding-top: 28px;
  border-top: 2px solid #f1f5f9;
  text-align: center;
}

.login-footer small {
  color: var(--text);
  font-size: 14px;
}

/* Dashboard Layout - TOP NAVBAR */
.dashboard {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* TOP NAVBAR */
.sidebar {
  width: 100%;
  height: auto;
  position: sticky;
  top: 0;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  padding: 0;
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.sidebar-header h2 {
  font-size: 0;
  margin: 0;
  display: none;
}

.sidebar-header p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
}

.sidebar-header p strong {
  color: white;
  font-weight: 700;
}

.sidebar-nav {
  display: flex;
  gap: 8px;
  padding: 0 40px 16px;
  align-items: center;
}

.nav-section {
  display: flex;
  gap: 8px;
  align-items: center;
}

.nav-section:first-child::after {
  content: '';
  width: 1px;
  height: 24px;
  background: rgba(255, 255, 255, 0.2);
  margin: 0 16px;
}

.nav-section:last-child {
  margin-left: auto;
}

.nav-section-title {
  display: none;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  transition: all 0.2s ease;
  font-size: 14px;
  font-weight: 600;
  border: 2px solid transparent;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.15);
  color: white;
}

.nav-item.active {
  background: white;
  color: var(--primary);
  border-color: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.nav-item .icon {
  font-size: 18px;
}

/* Main Content - FULL WIDTH */
.main-content {
  flex: 1;
  padding: 40px 60px;
  max-width: 1600px;
  margin: 0 auto;
  width: 100%;
}

.content-header {
  margin-bottom: 40px;
  text-align: center;
}

.content-header h1 {
  font-size: 42px;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.content-header p {
  font-size: 18px;
  color: var(--text);
  font-weight: 500;
}

/* Stats Grid - HORIZONTAL */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.stat-card {
  background: var(--card-bg);
  border-radius: 20px;
  padding: 32px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border: 2px solid transparent;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--primary);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.stat-card:hover::before {
  opacity: 1;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
  border-color: var(--primary);
}

.stat-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
}

.stat-card.stat-success .stat-icon {
  background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
}

.stat-card.stat-success::before {
  background: var(--success);
}

.stat-card.stat-warning .stat-icon {
  background: linear-gradient(135deg, var(--warning) 0%, #d97706 100%);
}

.stat-card.stat-warning::before {
  background: var(--warning);
}

.stat-info h3 {
  font-size: 38px;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 8px;
  letter-spacing: -1px;
}

.stat-info p {
  font-size: 15px;
  color: var(--text);
  font-weight: 600;
}

/* Cards */
.detail-card {
  background: var(--card-bg);
  border-radius: 20px;
  padding: 32px;
  margin-bottom: 32px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border: 2px solid #f1f5f9;
}

.detail-card h3 {
  font-size: 22px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 24px;
}

.detail-grid {
  display: grid;
  gap: 24px;
}

.detail-item label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
  display: block;
}

.copy-box {
  display: flex;
  gap: 12px;
}

.copy-box code {
  flex: 1;
  background: #f8fafc;
  padding: 16px 20px;
  border-radius: 12px;
  font-size: 15px;
  border: 2px solid #e2e8f0;
  font-family: 'Courier New', monospace;
  font-weight: 600;
  color: var(--dark);
}

.copy-box button {
  padding: 16px 28px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 15px;
}

.copy-box button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(99, 102, 241, 0.3);
}

/* Table */
.table-container {
  background: var(--card-bg);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border: 2px solid #f1f5f9;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table thead {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.data-table th {
  padding: 18px 20px;
  text-align: left;
  font-weight: 700;
  color: white;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.data-table td {
  padding: 18px 20px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 15px;
  color: var(--text);
}

.data-table tbody tr {
  transition: all 0.2s ease;
}

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

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.short-code {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  color: #1e40af;
  padding: 6px 16px;
  border-radius: 10px;
  font-family: 'Courier New', monospace;
  font-weight: 700;
  font-size: 14px;
}

.url-cell {
  max-width: 350px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
}

.action-buttons {
  display: flex;
  gap: 10px;
}

.btn-icon {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 20px;
  padding: 8px;
  border-radius: 10px;
  transition: all 0.2s ease;
}

.btn-icon:hover {
  background: #f1f5f9;
  transform: scale(1.1);
}

.btn-icon.btn-danger:hover {
  background: #fee2e2;
  color: var(--danger);
}

/* Badges */
.badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.badge-info {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  color: #1e40af;
}

.badge-success {
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  color: #065f46;
}

.badge-warning {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #92400e;
}

.badge.active {
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  color: #065f46;
}

.badge.inactive {
  background: #f1f5f9;
  color: #64748b;
}

.badge.used {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  color: #991b1b;
}

/* Buttons */
.btn {
  padding: 14px 28px;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
  background: #f1f5f9;
  color: var(--text);
}

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

.btn-warning {
  background: linear-gradient(135deg, var(--warning) 0%, #d97706 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.btn-warning:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(245, 158, 11, 0.4);
}

.btn-block {
  width: 100%;
  justify-content: center;
}

/* Forms */
.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  margin-bottom: 10px;
  font-weight: 700;
  color: var(--dark);
  font-size: 15px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-size: 15px;
  font-family: inherit;
  transition: all 0.3s ease;
  background: white;
  color: var(--dark);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.form-group small {
  display: block;
  margin-top: 8px;
  color: var(--text);
  font-size: 13px;
}

/* Color Picker */
.color-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.color-picker-item {
  background: white;
  padding: 20px;
  border-radius: 16px;
  border: 2px solid #f1f5f9;
}

.color-picker-item label {
  display: block;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 12px;
  font-size: 14px;
}

.color-input-wrapper {
  display: flex;
  gap: 12px;
  align-items: center;
}

.color-input-wrapper input[type="color"] {
  width: 60px;
  height: 50px;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
  padding: 4px;
}

.color-input-wrapper input[type="text"] {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  font-size: 14px;
  font-family: 'Courier New', monospace;
  font-weight: 600;
  text-transform: uppercase;
}

.color-preview {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  padding: 16px;
  background: #f8fafc;
  border-radius: 12px;
}

.color-preview-box {
  flex: 1;
  height: 60px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 13px;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: white;
  border-radius: 24px;
  width: 90%;
  max-width: 650px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 32px;
  border-bottom: 2px solid #f1f5f9;
}

.modal-header h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--dark);
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: var(--text);
  transition: all 0.2s ease;
}

.modal-close:hover {
  color: var(--dark);
  transform: rotate(90deg);
}

.modal-form {
  padding: 32px;
}

.modal-footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 32px;
  padding-top: 32px;
  border-top: 2px solid #f1f5f9;
}

/* Alert */
.alert {
  padding: 18px 24px;
  border-radius: 12px;
  margin-bottom: 24px;
  font-weight: 600;
  font-size: 15px;
  border-left: 4px solid;
}

.alert-error {
  background: #fee2e2;
  color: #991b1b;
  border-color: var(--danger);
}

.alert-success {
  background: #d1fae5;
  color: #065f46;
  border-color: var(--success);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 80px 32px;
}

.empty-state-icon {
  font-size: 72px;
  margin-bottom: 20px;
  opacity: 0.4;
}

.empty-state h3 {
  font-size: 22px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 10px;
}

.empty-state p {
  font-size: 16px;
  color: var(--text);
}

/* Bot/Human Rows */
.bot-row {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%) !important;
}

.human-row {
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%) !important;
}

/* Responsive */
@media (max-width: 1024px) {
  .main-content {
    padding: 30px 40px;
  }

  .sidebar-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .sidebar-nav {
    flex-wrap: wrap;
  }

  .content-header h1 {
    font-size: 32px;
  }

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

@media (max-width: 768px) {
  .main-content {
    padding: 20px;
  }

  .sidebar-header,
  .sidebar-nav {
    padding: 20px;
  }

  .content-header h1 {
    font-size: 28px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .color-picker-grid {
    grid-template-columns: 1fr;
  }
}

/* Loading */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s ease-in-out infinite;
}

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

/* Bot Types Grid */
.bot-types-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.bot-type-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 12px;
  border: 2px solid #e2e8f0;
  transition: all 0.3s ease;
}

.bot-type-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-color: var(--primary);
}

.bot-name {
  font-weight: 600;
  color: var(--dark);
  font-size: 14px;
}

.bot-count {
  font-size: 13px;
  color: var(--text);
  background: white;
  padding: 6px 12px;
  border-radius: 8px;
  font-weight: 600;
}

/* Geo-Location Stats Grid */
.geo-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.geo-stat-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: white;
  border-radius: 12px;
  border: 2px solid #e2e8f0;
  transition: all 0.3s ease;
}

.geo-stat-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
  border-color: #10b981;
}

.geo-flag {
  font-size: 32px;
  line-height: 1;
}

.geo-name {
  flex: 1;
  font-weight: 600;
  color: var(--dark);
  font-size: 15px;
}

.geo-count {
  font-size: 13px;
  color: var(--text);
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  color: #065f46;
  padding: 6px 12px;
  border-radius: 8px;
  font-weight: 700;
}
