/* Veritral Admin Global Styles - Modern Redesign */

/* Design Tokens */
:root {
  --bg: #0c0d0f;
  --surface: #131417;
  --surface-2: #1a1b1f;
  --text: #e6e6e6;
  --muted: #a8a8a8;
  --primary: #ffd700;
  --primary-contrast: #151515;
  --accent: #4aa3ff;
  --success: #28a745;
  --danger: #dc3545;
  --warning: #ffb02e;
  --border: #2a2b30;
  --shadow: rgba(0,0,0,0.35);
}
/* Yapışkan tablo başlığı */
.table-sticky thead th {
  position: sticky;
  top: 0;
  background: rgba(30,31,34,0.95);
  backdrop-filter: blur(4px);
  z-index: 5;
}

/* Sidebar bölümleri için başlık ve collapse görünümü */
.sidebar-section {
  margin-bottom: 12px;
}
.sidebar-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  cursor: pointer;
}
.sidebar-section-header .label {
  font-weight: 600;
  color: #ddd;
}
.sidebar-section-body.collapsed { display: none; }
.sidebar-section-body { padding-top: 6px; }

/* Pinlenen tablo sütunları */
.pin-left {
  position: sticky;
  left: 0;
  z-index: 6;
  background: rgba(30,31,34,0.95);
}
.pin-shadow {
  box-shadow: 2px 0 0 rgba(255,255,255,0.06);
}

/* Seçim sütunu genişliği */
th.select-col, td.select-col { width: 36px; }

/* Ana bakiye vurguları */
td.balance-zero { color: #aaa; }
td.balance-low { color: #f0ad4e; }
td.balance-high { color: #5cb85c; font-weight: 600; }

/* Reset & base */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  background-color: var(--bg) !important;
  color: var(--text) !important;
  font-family: "Inter", Arial, Helvetica, sans-serif;
  font-size: 12px;
  line-height: 1.4;
}

/* Containers */
.container, .container-fluid { padding: 10px; }
/* Rows: dikey aralıkları artırarak bloklar arası nefes alanı oluştur */
.container .row, .container-fluid .row { row-gap: 16px; }

/* Genel bölüm başlık ve paragraflar için nefes alanı */
h1 { margin-bottom: 8px; font-size: 18px; }
h2 { margin-bottom: 6px; font-size: 15px; }
h3 { font-size: 13px; }
h4 { font-size: 12px; }
h5 { font-size: 11px; }
p { margin-bottom: 12px; }

/* Cards */
.card {
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  border: 1px solid var(--border);
  border-radius: 7px;
  box-shadow: 0 3px 8px var(--shadow);
  margin-bottom: 8px;
}
.card .card-body { padding: 8px; }
.card .card-header { padding: 6px 8px; }
.card .card-footer { padding: 6px 8px; }
.card-title { color: var(--primary); font-weight: 600; font-size: 13px; }
.card-text { color: var(--muted); }

/* Tables */
.table { color: var(--text); border-color: var(--border); font-size: 12px; }
.table thead th {
  color: var(--primary);
  border-bottom: 1px solid var(--border);
}
.table th, .table td { padding: 5px; }
.table-striped>tbody>tr:nth-of-type(odd)>* {
  --bs-table-accent-bg: rgba(255,255,255,0.04);
  color: var(--text) !important;
}
.table-hover tbody tr:hover { background-color: rgba(255,255,255,0.03); }

/* Tablo çevre boşluğu */
.table-responsive { padding: 8px; border-radius: 10px; }

/* Sidebar */
.sidebar {
  background: linear-gradient(180deg, #0d0e12, #0a0a0d);
  border-right: 1px solid var(--border);
}
.sidebar .sidebar-brand {
  font-weight: 700;
  letter-spacing: 0.3px;
  color: var(--primary);
  border-bottom: 1px solid var(--border);
  padding-bottom: 6px;
  margin-bottom: 6px;
  font-size: 14px;
}
.sidebar a { color: var(--muted); text-decoration: none; }
.sidebar .nav-link {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 7px; border-radius: 8px; color: var(--text);
  font-size: 11px;
  transition: background-color .2s ease, transform .15s ease;
}
.sidebar .nav-link:hover { background-color: rgba(255,255,255,0.06); transform: translateX(2px); }
.sidebar .nav-link.active {
  background-color: rgba(255, 215, 0, 0.16);
  color: var(--primary);
  border: 1px solid rgba(255, 215, 0, 0.35);
}

/* Buttons */
.btn { transition: background-color .2s ease, transform .15s ease; border: 1px solid var(--border); padding: 4px 8px; font-size: 11px; border-radius: 8px; }
.btn-sm { padding: 3px 6px; font-size: 10.5px; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background-color: var(--accent); border-color: transparent; }
.btn-success { background-color: var(--success); border-color: transparent; }
.btn-danger { background-color: var(--danger); border-color: transparent; }
.btn-warning { background-color: var(--warning); border-color: transparent; }

/* Forms */
.form-control, .form-select {
  background-color: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 5px 7px;
  font-size: 11px;
}
/* Light theme overrides */
body.theme-light{
  --bg: #f7f9fc;
  --surface: #ffffff;
  --surface-2: #f3f4f7;
  --text: #1b2430;
  --muted: #667085;
  --border: #dde3ec;
  --shadow: rgba(0,0,0,0.15);
}

/* Print sadeleştirme */
@media print{
  .sidebar, .topbar, .btn, .pagination, .bulk-toolbar, .filters, .modal{ display: none !important; }
  body{ background: #fff !important; color: #000 !important; }
  table{ border-color: #444 !important; }
  .table th, .table td{ color:#000 !important; }
}
.modal-content { background: rgba(11,11,11,.85); color: var(--text); border: 1px solid rgba(255,255,255,.08); backdrop-filter: blur(6px); }
.modal-header, .modal-footer { background: #0b0b0b; border-color: rgba(255,255,255,.08); }
.modal-title { color: #e5b645; }
.modal .btn-close { filter: invert(1); opacity: .85; }
.btn-secondary { background: rgba(255,255,255,.08); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: rgba(255,255,255,.12); }
.form-label { color: var(--muted); }

/* Primary button: yellow gradient for dark theme */
.btn-primary { background: linear-gradient(180deg,#e5b645,#d4a536); color: #0b1020; border: 1px solid rgba(255,255,255,.08); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-primary:active, .btn-primary:focus { filter: brightness(1.02); box-shadow: 0 0 0 .15rem rgba(229,182,69,.25); }
.form-control::placeholder { color: var(--muted); }
.input-group .btn { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.search-bar .form-control { border-top-right-radius: 0; border-bottom-right-radius: 0; }

/* User & Bet containers (bahis/guncellendi sayfaları) */
.user-container {
  background-color: #2c2c2c;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 4px 12px var(--shadow);
}
.user-container:hover { transform: translateY(-3px); }

.bet-container {
  background-color: #333;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 15px;
  box-shadow: 0 3px 6px rgba(0,0,0,0.15);
}

h1, h2, h3, h4, h5 { font-weight: 700; color: var(--primary); }
.card h5 { color: var(--primary); }

#pills-types .card,
#pills-types .card-header,
#pills-types .card-body,
#pills-types .card-footer { background: #000 !important; }

.bonus-type-card {
  background: #000 !important;
  border: 1px solid #333 !important;
  border-radius: 12px !important;
  padding: 12px !important;
  margin-bottom: 10px !important;
}
.bonus-type-card h6 { color: var(--text); }
.bonus-type-card .text-muted { color: var(--muted) !important; }

/* SweetAlert2 dark modal styling */
.swal2-popup.swal-dark { background: #000 !important; color: var(--text) !important; border: 1px solid #333 !important; }
.swal2-title { color: #e5b645 !important; }
.swal2-styled.swal2-confirm { background: linear-gradient(180deg,#e5b645,#d4a536) !important; color: #0b1020 !important; border: 1px solid rgba(255,255,255,.08) !important; }
.swal2-styled.swal2-cancel { background: rgba(255,255,255,.08) !important; color: var(--text) !important; border: 1px solid var(--border) !important; }
.swal2-html-container .form-control, 
.swal2-html-container textarea, 
.swal2-html-container input { background: #1b1b1b !important; color: #fff !important; border-color: #444 !important; }
.swal2-html-container .form-control::placeholder, 
.swal2-html-container textarea::placeholder { color: #aaa !important; }

/* Utilities */
.mt-5 { margin-top: 3rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.me-2 { margin-right: .5rem !important; }

/* Compact overrides for large UI elements across admin */
.display-6 { font-size: 1.3rem !important; }
.stats-number { font-size: 1.4rem !important; }
.device-icon { font-size: 1.1rem !important; }
.page-title { font-size: 16px !important; }
.stat-icon { font-size: 18px !important; }
.stat-value { font-size: 14px !important; }
.tab-btn, .nav-tabs .nav-link { padding: 5px 8px !important; font-size: 11px !important; }
.table-header, .tournament-row { padding: 8px !important; gap: 8px !important; }
.modal-title { font-size: 14px !important; }
.close-btn { font-size: 18px !important; }
.form-input, .form-select, .form-textarea { padding: 5px 7px !important; font-size: 11px !important; }
.btn-lg { padding: 7px 10px !important; font-size: 11px !important; }
.game-icon { font-size: 1.8rem !important; }
.game-card { padding: 12px !important; }

/* Users table spacing and actions layout */
#usersTable { font-size: 13px; }
#usersTable th,
#usersTable td {
  padding: 4px 6px; /* daha kompakt satırlar */
  vertical-align: middle;
}
#usersTable th:last-child,
#usersTable td.actions-cell {
  width: 220px; /* işlemler sütunu genişliği */
}
#usersTable td.actions-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 4px; /* buton arası boşluk */
}
#usersTable td.actions-cell .btn {
  padding: 3px 6px;
  font-size: 11px;
}
#usersTable td .badge { 
  margin-right: 4px; 
  font-size: 11px; 
  padding: .35em .5em; 
}

@media (max-width: 767px) {
  #usersTable th:last-child,
  #usersTable td.actions-cell { width: auto; }
}

/* Responsive */
@media (max-width: 991px) {
  .sidebar { min-height: auto; }
}

/* Edit User modal – dark theme */
#editUserModal .modal-content { background-color: #000; color: #fff; border: 1px solid #333; }
#editUserModal .modal-header, 
#editUserModal .modal-body, 
#editUserModal .modal-footer { background-color: #000; color: #fff; }
#editUserModal .btn-close { filter: invert(1); }
#editUserModal .form-label { color: #ddd; }
#editUserModal .form-control,
#editUserModal .form-select { background-color: #1b1b1b; color: #fff; border-color: #444; }
#editUserModal .form-control::placeholder { color: #aaa; }
#editUserModal .form-control:focus,
#editUserModal .form-select:focus { background-color: #1b1b1b; color: #fff; border-color: #666; box-shadow: 0 0 0 .15rem rgba(255,255,255,.1); }
#editUserModal small { color: #aaa; }

@media (max-width: 767px) {
  .table-responsive { overflow-x: auto; }
  
  /* Admin panel mobil optimizasyonları */
  .sidebar {
    position: fixed;
    top: 0;
    left: -250px;
    width: 250px;
    height: 100vh;
    z-index: 1000;
    transition: left 0.3s ease;
  }
  
  .sidebar.show {
    left: 0;
  }
  
  .main-content {
    margin-left: 0 !important;
    padding: 10px;
  }
  
  .navbar {
    padding: 8px 15px;
  }
  
  .card {
    margin-bottom: 15px;
  }
  
  .card-body {
    padding: 15px;
  }
  
  .btn {
    padding: 6px 12px;
    font-size: 12px;
  }
  
  .form-control {
    padding: 6px 10px;
    font-size: 13px;
  }
  
  .table {
    font-size: 12px;
  }
  
  .table th,
  .table td {
    padding: 6px;
  }
  
  .user-container,
  .bet-container {
    padding: 15px;
    margin-bottom: 15px;
  }
  
  h1 { font-size: 20px; }
  h2 { font-size: 18px; }
  h3 { font-size: 16px; }
  h4 { font-size: 14px; }
  h5 { font-size: 13px; }
}

@media (max-width: 575px) {
  .main-content {
    padding: 5px;
  }
  
  .card-body {
    padding: 10px;
  }
  
  .btn {
    padding: 4px 8px;
    font-size: 11px;
  }
  
  .form-control {
    padding: 4px 8px;
    font-size: 12px;
  }
  
  .table {
    font-size: 11px;
  }
  
  .table th,
  .table td {
    padding: 4px;
  }
  
  .user-container,
  .bet-container {
    padding: 10px;
    margin-bottom: 10px;
  }
  
  h1 { font-size: 18px; }
  h2 { font-size: 16px; }
  h3 { font-size: 14px; }
  h4 { font-size: 13px; }
  h5 { font-size: 12px; }
}

@media (max-width: 480px) {
  .main-content {
    padding: 2px;
  }
  
  .card {
    margin-bottom: 10px;
  }
  
  .card-body {
    padding: 8px;
  }
  
  .btn {
    padding: 3px 6px;
    font-size: 10px;
  }
  
  .form-control {
    padding: 3px 6px;
    font-size: 11px;
  }
  
  .table {
    font-size: 10px;
  }
  
  .table th,
  .table td {
    padding: 3px;
  }
  
  .user-container,
  .bet-container {
    padding: 8px;
    margin-bottom: 8px;
  }
  
  .search-bar .form-control {
    font-size: 11px;
  }
  
  .input-group .btn {
    font-size: 10px;
    padding: 3px 6px;
  }
}