/*
 * Messe Turkey Platform — Theme (mockup stili)
 * Bootstrap 5 override. Tüm sayfalarda ortak.
 */

/* === Temel === */
body {
  background: #11111b !important;
  color: #cdd6f4 !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
}
a { color: #89b4fa !important; text-decoration: none; }
a:hover { color: #b4d0fb !important; }

/* === Başlıklar === */
h1, h2, h3, h4, h5, h6 { color: #cdd6f4 !important; }
.text-muted, .text-secondary { color: #a6adc8 !important; }
.text-dark, .text-body { color: #cdd6f4 !important; }
.small, small { color: inherit !important; }
strong, b, label { color: #cdd6f4 !important; }
.card-body { color: #cdd6f4 !important; }

/* === Sol panel stat kartlar === */
.mini-stat {
  padding: 8px 6px;
  color: #fff !important;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
  font-size: 13px;
}
.mini-stat:hover { transform: scale(1.05); }
.mini-stat.active { transform: scale(1.08); }
.mini-stat .num { font-size: 18px; font-weight: 800; line-height: 1.1; }
.mini-stat .lbl { font-size: 13px; opacity: 0.9; margin-top: 2px; }

/* === Navbar === */
.navbar {
  background: #1e1e2e !important;
  border-bottom: 1px solid #313244;
  padding: 10px 16px !important;
}
.navbar-brand {
  color: #cdd6f4 !important;
  font-weight: 700;
  font-size: 19px !important;
}
.navbar .text-white { color: #cdd6f4 !important; }
.navbar .text-white-50 { color: #6c7086 !important; }
.navbar .badge {
  border-radius: 0 !important;
  font-weight: 500;
}

/* === Container genişliği === */
.container { max-width: 100% !important; padding: 0 16px !important; }

/* === Sol panel (stat kartlar + kullanici durum) === */
.left-stats {
  width: 200px !important;
  flex-shrink: 0;
  background: #1e1e2e !important;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
  border-right: 1px solid #313244;
}

.mini-stat {
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  border: none !important !important;
}
.mini-stat .sayi { font-size: 18px; font-weight: 700; }
.mini-stat .etiket { font-size: 9px; opacity: .7; }

/* === Kullanici durum === */
.kullanici-durum {
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px solid #313244;
}
.kd-baslik {
  font-size: 9px;
  color: #6c7086 !important;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}
.kd-satir {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 6px;
  font-size: 11px;
  border-radius: 4px;
  margin-bottom: 1px;
}
.kd-satir.online { color: #a6e3a1 !important; }
.kd-satir.offline { color: #585b70 !important; }
.kd-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.kd-dot.online { background: #a6e3a1 !important; }
.kd-dot.offline { background: #e94560 !important; }
.kd-rol {
  font-size: 8px;
  padding: 0 4px;
  border-radius: 0;
  margin-left: auto;
  white-space: nowrap;
}
.kd-rol.admin { background: rgba(233,69,96,.2) !important; color: #e94560 !important; }
.kd-rol.yonetici { background: rgba(249,226,175,.2) !important; color: #f9e2af !important; }
.kd-rol.yetkili { background: rgba(137,180,250,.2) !important; color: #89b4fa !important; }
.kd-rol.ms { background: rgba(166,227,161,.15) !important; color: #a6e3a1 !important; }

/* === Ana içerik alanı === */
.dashboard-content {
  background: #11111b !important;
}

/* === Filtre çubuğu === */
.filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  padding: 8px 0;
}

/* === Form elemanları === */
select, input[type="text"], input[type="search"], input[type="email"],
input[type="password"], input[type="date"], input[type="tel"], textarea,
.form-select, .form-control, .form-control:focus {
  background: #313244 !important;
  color: #cdd6f4 !important;
  border: 1px solid #45475a !important !important;
  border-radius: 4px !important;
  padding: 6px 10px !important;
  font-size: 12px !important;
  box-shadow: none !important;
  outline: none !important;
}
select:focus, input:focus, textarea:focus, .form-select:focus, .form-control:focus {
  border-color: #89b4fa !important;
  box-shadow: 0 0 0 1px rgba(137,180,250,.3) !important;
}
select option, .form-select option {
  background: #1e1e2e !important;
  color: #cdd6f4 !important;
}

/* === Butonlar === */
.btn {
  border-radius: 4px !important;
  font-size: 12px !important;
  padding: 6px 12px !important;
  font-weight: 500;
  border: none !important !important;
}
.btn-success { background: #a6e3a1 !important; color: #11111b !important; }
.btn-success:hover { background: #8bd88b !important; }
.btn-primary { background: #89b4fa !important; color: #11111b !important; }
.btn-primary:hover { background: #74a8f8 !important; }
.btn-danger { background: #e94560 !important; color: #fff !important; }
.btn-danger:hover { background: #d63350 !important; }
.btn-secondary { background: #45475a !important; color: #cdd6f4 !important; }
.btn-secondary:hover { background: #585b70 !important; }
.btn-outline-light {
  background: transparent !important;
  color: #cdd6f4 !important;
  border: 1px solid #45475a !important !important;
  border-radius: 4px !important;
  font-size: 12px !important;
  padding: 6px 12px !important;
}

/* === Dosya sec butonu === */
input[type="file"] {
  background: #313244 !important;
  color: #cdd6f4 !important;
  border: 1px solid #45475a !important !important;
  border-radius: 4px !important;
  font-size: 12px !important;
}
input[type="file"]::file-selector-button {
  background: #a6e3a1 !important;
  color: #11111b !important;
  border: none !important !important;
  border-radius: 4px !important;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
}

/* === Badge === */
.dropdown-menu {
  background: #1e1e2e !important;
  border: 1px solid #45475a !important !important;
  border-radius: 4px !important;
}
.dropdown-item {
  color: #cdd6f4 !important;
  font-size: 12px !important;
}
.dropdown-item:hover { background: #313244 !important; color: #cdd6f4 !important; }
.badge {
  border-radius: 0 !important;
  font-size: 10px !important;
  font-weight: 500 !important;
  padding: 2px 6px !important;
}
.bg-secondary { background: #45475a !important; }
.bg-primary { background: #89b4fa !important; color: #11111b !important; }
.bg-danger { background: #e94560 !important; }

/* === Tablo (Grid.js ve fallback) === */
.gridjs-table { border-collapse: collapse; width: 100%; }
.gridjs-th, .gridjs-td { padding: 7px 10px !important; font-size: 15px !important; }
.gridjs-tr:hover .gridjs-td { background: rgba(205,214,244,.03) !important; }

table, .table, #fallbackTablo {
  color: #cdd6f4 !important;
  background: #1e1e2e !important;
}
.table-striped > tbody > tr:nth-of-type(odd) > * {
  background: rgba(205,214,244,.03) !important;
  color: #cdd6f4 !important;
}
th { color: #6c7086 !important; font-weight: 500; border-bottom: 1px solid #313244; padding: 8px 10px; text-align: left; }
td { padding: 7px 10px; border-bottom: 1px solid #1e1e2e; }
tr:hover td { background: rgba(205,214,244,.03) !important; }

.kd-baslik, .rp-head {
  font-size: 11px;
  color: #6c7086 !important;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}
.card {
  background: #1e1e2e !important;
  border: 1px solid #313244 !important !important;
  border-radius: 6px !important;
}
.card-header {
  background: #1e1e2e !important;
  border-bottom: 1px solid #313244 !important;
  color: #cdd6f4 !important;
  font-weight: 600;
}

/* === Modal === */
.modal-content {
  background: #1e1e2e !important;
  color: #cdd6f4 !important;
  border: 1px solid #45475a !important !important;
  border-radius: 8px !important;
}
.modal-header {
  border-bottom: 1px solid #313244 !important;
  color: #cdd6f4 !important;
}
.modal-footer { border-top: 1px solid #313244 !important; }
.modal-title { color: #cdd6f4 !important; font-weight: 600; }
.btn-close { filter: invert(1); opacity: .5; }

/* === Sağ panel === */
.right-panel {
  background: #1e1e2e !important;
  border-left: 1px solid #313244;
}

/* === Alert / Toast === */
.alert { border-radius: 4px !important; border: 1px solid !important !important; }
.alert-info { background: rgba(137,180,250,.1) !important; color: #89b4fa !important; border-color: rgba(137,180,250,.3) !important; }
.alert-danger { background: rgba(233,69,96,.1) !important; color: #e94560 !important; border-color: rgba(233,69,96,.3) !important; }

/* === Spinner === */
.spinner-border { color: #89b4fa !important; }

/* === KvKK / form check === */
.form-check-input {
  background-color: #313244 !important;
  border-color: #45475a !important;
}
.form-check-input:checked {
  background-color: #a6e3a1 !important;
  border-color: #a6e3a1 !important;
}

/* === Scrollbar === */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #11111b !important; }
::-webkit-scrollbar-thumb { background: #45475a !important; border-radius: 3px; }

/* === Chat === */
.chat-msg { margin-bottom: 6px; font-size: 11px; }
.chat-msg .sender { font-weight: 600; font-size: 10px; margin-bottom: 1px; }
.chat-msg .text { padding: 5px 8px; border-radius: 6px; display: inline-block; max-width: 90%; word-break: break-word; }
.chat-msg.me .text { background: #89b4fa !important; color: #11111b !important; }
.chat-msg.me .sender { text-align: right; }
.chat-msg.other .text { background: #313244 !important; color: #cdd6f4 !important; }
.chat-msg .time { font-size: 8px; color: #6c7086 !important; margin-top: 2px; }
.chat-msg.me .time { text-align: right; }

/* === Border-radius sıfırlama (Bootstrap varsayilan) === */
.rounded, .rounded-1, .rounded-2, .rounded-3 { border-radius: 4px !important; }

/* ═══════════════════════════════════════════
   AÇIK TEMA — TÜM ELEMENTLER
   ═══════════════════════════════════════════ */

/* === TEMEL === */
body.light-theme { background: #f5f0e8 !important; color: #5c5148 !important; }
body.light-theme a { color: #5a7a8a !important; }
body.light-theme a:hover { color: #4a6780 !important; }
body.light-theme h1, body.light-theme h2, body.light-theme h3,
body.light-theme h4, body.light-theme h5, body.light-theme h6 { color: #5c5148 !important; }
body.light-theme .text-muted, body.light-theme .text-secondary,
body.light-theme .text-white-50 { color: #7a6e62 !important; }
body.light-theme .text-dark, body.light-theme .text-body { color: #5c5148 !important; }
body.light-theme .text-white { color: #5c5148 !important; }
body.light-theme .small, body.light-theme small { color: inherit !important; }
body.light-theme strong, body.light-theme b, body.light-theme label { color: #5c5148 !important; }
body.light-theme .card-body { color: #5c5148 !important; }

/* === NAVBAR === */
body.light-theme .navbar { background: #fff !important; border-bottom: 1px solid #e0d8cd; }
body.light-theme .navbar a, body.light-theme .navbar span,
body.light-theme .navbar-brand { color: #5c5148 !important; }
body.light-theme .navbar .badge { color: #fff !important; }

/* === SOL PANEL === */
body.light-theme .left-stats { background: #fff !important; border-right: 1px solid #e0d8cd; }
body.light-theme .mini-stat { background: #ede4d8 !important; color: #5c5148 !important; }
body.light-theme .mini-stat:hover { background: #e0d8cd !important; }
body.light-theme .kd-baslik, body.light-theme .rp-head { color: #7a6e62 !important; }

/* === KARTLAR === */
body.light-theme .card { background: #f5f0e8 !important; border-color: #e0d8cd !important; }
body.light-theme .card-header { background: #f5f0e8 !important; color: #5c5148 !important; border-color: #e0d8cd !important; }

/* === FILTRE BAR === */
body.light-theme .filter-bar { background: #fdfbf8 !important; border-bottom: 1px solid #e0d8cd; }
body.light-theme .dashboard-content { background: #f5f0e8 !important; }
body.light-theme .form-label { color: #7a6e62 !important; }

/* === FORM === */
body.light-theme .form-control, body.light-theme .form-select {
  background: #fff !important; color: #5c5148 !important; border-color: #e0d8cd !important;
}
body.light-theme .form-control:focus, body.light-theme .form-select:focus { border-color: #5a7a8a !important; }
body.light-theme .form-select option { background: #fff !important; color: #5c5148 !important; }
body.light-theme .form-control::placeholder { color: #9ca3af !important; }

/* === BUTONLAR === */
body.light-theme .btn-success { background: #5a7a5a !important; color: #fff !important; border-color: #5a7a5a !important; }
body.light-theme .btn-success:hover { background: #047857 !important; }
body.light-theme .btn-primary { background: #5a7a8a !important; color: #fff !important; border-color: #5a7a8a !important; }
body.light-theme .btn-primary:hover { background: #4a6780 !important; }
body.light-theme .btn-danger { background: #dc2626 !important; color: #fff !important; border-color: #dc2626 !important; }
body.light-theme .btn-danger:hover { background: #b91c1c !important; }
body.light-theme .btn-secondary { background: #ede4d8 !important; color: #5c5148 !important; border-color: #e0d8cd !important; }
body.light-theme .btn-secondary:hover { background: #e0d8cd !important; }
body.light-theme .btn-outline-secondary { color: #7a6e62 !important; border-color: #e0d8cd !important; background: transparent !important; }
body.light-theme .btn-outline-secondary:hover { background: #f5f0e8 !important; }
body.light-theme .btn-close { filter: invert(0); }
body.light-theme .edit-btn { color: #5a7a5a !important; }

/* === DROPDOWN === */
body.light-theme .dropdown-menu {
  background: #fff !important; border-color: #e0d8cd !important; color: #5c5148 !important;
}
body.light-theme .dropdown-menu label { color: #5c5148 !important; }
body.light-theme .dropdown-item { color: #5c5148 !important; }
body.light-theme .dropdown-item:hover { background: #f5f0e8 !important; color: #5c5148 !important; }
body.light-theme .dropdown-menu .form-check-input { background: #fff !important; border-color: #e0d8cd !important; }

/* === MODAL === */
body.light-theme .modal-content {
  background: #fff !important; color: #5c5148 !important; border-color: #e0d8cd !important;
}
body.light-theme .modal-header { background: #f5f0e8 !important; border-color: #e0d8cd !important; color: #5c5148 !important; }
body.light-theme .modal-footer { border-color: #e0d8cd !important; background: #fdfbf8 !important; }
body.light-theme .modal-title { color: #5c5148 !important; }

/* === ALERT === */
body.light-theme .alert-info { background: #eff6ff !important; color: #5a7a8a !important; border-color: #bfdbfe !important; }
body.light-theme .alert-danger { background: #fef2f2 !important; color: #dc2626 !important; border-color: #fecaca !important; }

/* === TABLE (HTML fallback) === */
body.light-theme th { color: #7a6e62 !important; border-bottom-color: #e0d8cd !important; }
body.light-theme td { border-bottom-color: #ede4d8 !important; }
body.light-theme tr:hover td { background: #fdfbf8 !important; }

/* === GRID.JS (CSS fallback) === */
body.light-theme .gridjs-tr:hover .gridjs-td { background: #fdfbf8 !important; }
body.light-theme table { background: #f5f0e8 !important; color: #5c5148 !important; }

/* === SAĞ PANEL === */
body.light-theme .right-panel { background: #f5f0e8 !important; border-left: 1px solid #e0d8cd; }

/* === CHAT === */
body.light-theme .chat-msg.me .text { background: #5a7a8a !important; color: #fff !important; }
body.light-theme .chat-msg.other .text { background: #ede4d8 !important; color: #5c5148 !important; }
body.light-theme .chat-msg .time { color: #9ca3af !important; }
body.light-theme .chat-input { background: #fff !important; color: #5c5148 !important; border-color: #e0d8cd !important; }

/* === BADGE === */
body.light-theme .badge.bg-primary { background: #5a7a8a !important; color: #fff !important; }
body.light-theme .badge.bg-secondary { background: #7a6e62 !important; color: #fff !important; }
body.light-theme .badge.bg-success { background: #5a7a5a !important; color: #fff !important; }
body.light-theme .badge.bg-danger { background: #dc2626 !important; color: #fff !important; }
body.light-theme .bg-primary { background: #5a7a8a !important; color: #fff !important; }
body.light-theme .bg-secondary { background: #7a6e62 !important; color: #fff !important; }
body.light-theme .bg-danger { background: #dc2626 !important; color: #fff !important; }

/* === ROL BADGELERI === */
body.light-theme .kd-rol.admin { background: #fef2f2 !important; color: #dc2626 !important; }
body.light-theme .kd-rol.yonetici { background: #fffbeb !important; color: #92400e !important; }
body.light-theme .kd-rol.yetkili { background: #eff6ff !important; color: #5a7a8a !important; }
body.light-theme .kd-rol.ms { background: #ecfdf5 !important; color: #5a7a5a !important; }

/* === INLINE EDIT === */
body.light-theme .inline-edit { background: #fdfbf8 !important; }

/* === SCROLLBAR === */
body.light-theme ::-webkit-scrollbar-track { background: #f5f0e8 !important; }
body.light-theme ::-webkit-scrollbar-thumb { background: #9ca3af !important; }

/* === TOAST === */
body.light-theme .toast-msg { background: #5a7a5a !important; color: #fff !important; }
body.light-theme .toast-msg.error { background: #dc2626 !important; }

/* === SPINNER === */
body.light-theme .spinner-border { color: #5a7a8a !important; }

/* === GOREV === */
body.light-theme .gorev-item { background: #fdfbf8 !important; border-color: #ede4d8 !important; }

/* === ROUNDED OVERRIDE === */
body.light-theme .rounded, body.light-theme .rounded-1,
body.light-theme .rounded-2, body.light-theme .rounded-3 { border-radius: 4px !important; }
