/* ═══════════════════════════════════════════════════════
   VIBOO ADMIN — Premium Violet Design System
═══════════════════════════════════════════════════════ */

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

:root {
  /* Colors */
  --primary: #7c3aed;
  --primary-d: #6d28d9;
  --primary-glow: rgba(124, 58, 237, 0.25);
  --accent: #ec4899;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #0ea5e9;

  /* Backgrounds */
  --bg: #f5f3ff;
  --bg2: #ffffff;
  --bg3: #faf9ff;
  --card: #ffffff;
  --card-border: #e8e0ff;

  /* Text */
  --tx1: #111827;
  --tx: #1e1b4b;
  --tx2: #4c4775;
  --tx3: #a09bb8;

  /* Layout */
  --sidebar: 260px;
  --radius: 16px;
  --radius-sm: 10px;
  --ease: cubic-bezier(.4, 0, .2, 1);
}

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

html {
  scroll-behavior: smooth
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--tx);
  min-height: 100vh;
  overflow-x: hidden;
  font-size: 14px;
  line-height: 1.6
}

a {
  text-decoration: none;
  color: inherit
}

button {
  cursor: pointer;
  font-family: inherit
}

input,
textarea,
select {
  font-family: inherit;
  color: var(--tx)
}

.bot-combo {
  position: relative;
  width: 100%;
}

.bot-combo-card {
  overflow: visible !important;
  position: relative;
  z-index: 20;
}

.bot-combo-card:focus-within {
  z-index: 200;
}

.bot-combo input {
  width: 100%;
  border-radius: 12px;
  padding: 12px 40px 12px 12px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--tx);
  outline: none;
}

.bot-combo::after {
  content: "expand_more";
  position: absolute;
  right: 12px;
  top: 11px;
  font-family: 'Material Symbols Rounded';
  font-size: 20px;
  color: var(--tx3);
  pointer-events: none;
}

.bot-combo-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 300;
  max-height: 260px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  background: var(--card);
  box-shadow: 0 18px 40px rgba(17, 24, 39, 0.16);
}

.bot-combo-menu.open {
  display: block;
}

.bot-combo-option {
  width: 100%;
  border: 0;
  border-radius: 9px;
  background: transparent;
  padding: 10px 11px;
  color: var(--tx);
  text-align: left;
  font-weight: 650;
  cursor: pointer;
}

.bot-combo-option:hover,
.bot-combo-option.is-selected {
  background: var(--bg);
  color: var(--primary);
}

.bot-combo-empty {
  padding: 12px;
  color: var(--tx3);
  font-weight: 650;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px
}

::-webkit-scrollbar-track {
  background: transparent
}

::-webkit-scrollbar-thumb {
  background: var(--card-border);
  border-radius: 99px
}

/* ── ICONS ────────────────────────────────────────── */
.material-symbols-rounded {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0
}

.fire {
  color: var(--primary) !important
}

/* ── UTILITIES ────────────────────────────────────── */
.flex-between {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px
}

.accent {
  color: var(--primary)
}

/* ════════════════════════════════════════════════════
   AUTH
════════════════════════════════════════════════════ */
.auth-wrap {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  background: #f8fafc;
  overflow: hidden
}

.auth-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none
}

.auth-bg .orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.6;
  animation: floatOrb 10s infinite alternate ease-in-out
}

.auth-bg .orb-1 {
  width: 400px;
  height: 400px;
  background: rgba(59, 130, 246, 0.3);
  top: -100px;
  left: -100px;
  animation-delay: 0s
}

.auth-bg .orb-2 {
  width: 500px;
  height: 500px;
  background: rgba(139, 92, 246, 0.25);
  bottom: -150px;
  right: -100px;
  animation-delay: -3s
}

.auth-bg .orb-3 {
  width: 300px;
  height: 300px;
  background: rgba(236, 72, 153, 0.2);
  top: 40%;
  left: 60%;
  animation-delay: -6s
}

@keyframes floatOrb {
  0% {
    transform: translate(0, 0) scale(1)
  }

  100% {
    transform: translate(30px, -50px) scale(1.1)
  }
}

.auth-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 32px;
  padding: 48px 40px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, .04), inset 0 0 0 1px rgba(255, 255, 255, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center
}

.auth-logo {
  margin-bottom: 20px
}

.logo-icon-wrap {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 24px var(--primary-glow)
}

.logo-icon-wrap .material-symbols-rounded {
  font-size: 32px;
  color: #fff
}

.auth-brand {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -.5px;
  color: var(--tx);
  margin-bottom: 6px
}

.auth-sub {
  color: var(--tx2);
  font-size: 14px;
  margin-bottom: 32px;
  font-weight: 500
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%
}

.field {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 0 16px;
  transition: all .3s var(--ease);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .02)
}

.field:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-glow);
  transform: translateY(-1px)
}

.field-icon {
  color: var(--tx3);
  font-size: 22px
}

.field input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  padding: 16px 0;
  font-size: 15px;
  color: var(--tx);
  font-weight: 600
}

.field input::placeholder {
  color: var(--tx3);
  font-weight: 500
}

.btn-auth {
  margin-top: 8px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  border: none;
  border-radius: 14px;
  padding: 16px;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .5px;
  transition: all .3s var(--ease);
  box-shadow: 0 8px 24px var(--primary-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px
}

.btn-auth:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px var(--primary-glow)
}

.auth-error {
  color: var(--danger);
  font-size: 13px;
  min-height: 18px;
  text-align: center;
  font-weight: 600
}

/* ════════════════════════════════════════════════════
   LAYOUT
════════════════════════════════════════════════════ */
#adminPanel {
  display: flex;
  min-height: 100vh
}

#loginScreen {
  display: flex
}

/* ════════════════════════════════════════════════════
   SIDEBAR
════════════════════════════════════════════════════ */
.sidebar {
  width: var(--sidebar);
  flex-shrink: 0;
  background: var(--bg2);
  border-right: 1px solid var(--card-border);
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: sticky;
  top: 0;
  overflow-y: auto;
  box-shadow: 4px 0 24px rgba(0, 0, 0, .02);
}

.sb-top {
  flex: 1;
  padding: 24px 0
}

.sb-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 24px 24px;
  border-bottom: 1px solid var(--card-border);
  margin-bottom: 16px
}

.sb-logo .material-symbols-rounded {
  font-size: 28px;
  color: var(--primary)
}

.sb-brand {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.5px;
  color: var(--tx)
}

.sb-menu {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 16px
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--tx2);
  font-size: 14px;
  font-weight: 600;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  transition: all .2s var(--ease);
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap
}

.nav-item .material-symbols-rounded {
  font-size: 20px
}

.nav-item:hover {
  background: var(--bg);
  color: var(--primary)
}

.nav-item.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 12px var(--primary-glow);
}

.nav-item.active .material-symbols-rounded {
  color: #fff
}

.nav-dropdown {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 4px 0
}

.nav-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--tx2);
  font-size: 14px;
  font-weight: 600;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all .2s var(--ease);
  border: 1px solid transparent
}

.nav-dropdown-header:hover {
  background: var(--bg);
  color: var(--primary)
}

.nav-dropdown-header .chevron {
  font-size: 20px;
  transition: transform .3s var(--ease)
}

.nav-dropdown.open .nav-dropdown-header .chevron {
  transform: rotate(180deg)
}

.nav-dropdown.open .nav-dropdown-header {
  color: var(--primary);
  background: var(--bg)
}

.nav-dropdown-content {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding-left: 14px;
  border-left: 2px solid var(--card-border);
  margin-left: 24px;
  margin-top: 4px
}

.nav-dropdown.open .nav-dropdown-content {
  display: flex
}

.sb-divider {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--tx3);
  padding: 20px 16px 8px;
  margin-top: 8px
}

.sb-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-top: 1px solid var(--card-border);
  background: var(--bg3)
}

.sb-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center
}

.sb-avatar .material-symbols-rounded {
  font-size: 20px;
  color: #fff
}

.sb-info {
  flex: 1;
  overflow: hidden
}

.sb-name {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--tx);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis
}

.sb-role {
  font-size: 11px;
  color: var(--tx2);
  font-weight: 600
}

.sb-logout {
  background: var(--bg2);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 8px;
  color: var(--tx2);
  display: flex;
  transition: all .2s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, .02)
}

.sb-logout:hover {
  color: var(--danger);
  border-color: var(--danger);
  background: #fef2f2
}

.sb-theme-toggle {
  background: var(--bg2);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 8px;
  color: var(--tx2);
  display: flex;
  transition: all .2s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, .02);
  cursor: pointer;
}

.sb-theme-toggle:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--bg);
}

/* ── DARK MODE OVERRIDES ────────────────────────────────── */
body.dark-mode {
  --bg: #0b071e;
  --bg2: #140f31;
  --bg3: #0e0a25;
  --card: #140f31;
  --card-border: #221a48;
  --tx1: #f9fafb;
  --tx: #f3f4f6;
  --tx2: #c7c6dc;
  --tx3: #8a83a3;
  --primary-glow: rgba(124, 58, 237, 0.15);
}

body.dark-mode select,
body.dark-mode input,
body.dark-mode textarea {
  background: var(--bg3);
  border-color: var(--card-border);
}

body.dark-mode .nav-item:hover,
body.dark-mode .nav-item.active {
  background: rgba(124, 58, 237, 0.15);
}

body.dark-mode .modal-box {
  background: var(--bg2);
  border-color: var(--card-border);
}

body.dark-mode .overlay {
  background: rgba(0, 0, 0, 0.6);
}

body.dark-mode .sb-user {
  background: var(--bg3);
}

body.dark-mode .auth-wrap {
  background: #0b071e;
}

body.dark-mode .auth-card {
  background: rgba(20, 15, 49, 0.7);
  border-color: rgba(34, 26, 72, 0.8);
}


/* ════════════════════════════════════════════════════
   MAIN
════════════════════════════════════════════════════ */
.main {
  flex: 1;
  overflow-y: auto;
  padding: 32px 40px
}

.page {
  display: none;
  animation: fadeIn .3s var(--ease)
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px)
  }

  to {
    opacity: 1;
    transform: translateY(0)
  }
}

.page.active {
  display: block
}

body.dark-mode button[onclick="sendSavedUserMessage('contactApproved')"] {
  background: rgba(208, 119, 124, 0.12) !important;
  border-color: rgba(208, 119, 124, 0.35) !important;
  color: var(--danger) !important;
}

#bot_mesajlari.active {
  display: flex;
}

.page-head {
  margin-bottom: 32px
}

.page-head h1 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -.5px;
  color: var(--tx)
}

.page-head p {
  color: var(--tx2);
  font-size: 14px;
  margin-top: 6px;
  font-weight: 500
}

/* ════════════════════════════════════════════════════
   CARD
════════════════════════════════════════════════════ */
.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, .03)
}

/* ════════════════════════════════════════════════════
   KPI GRID (Dashboard)
════════════════════════════════════════════════════ */
.kpi-grid {
  margin-bottom: 32px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.kpi {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 24px;
  transition: all .3s cubic-bezier(.4, 0, .2, 1);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .02);
}

.kpi:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: 0 12px 30px var(--primary-glow);
}

.kpi-top {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--tx2);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 12px
}

.kpi-val {
  font-size: 32px;
  font-weight: 800;
  color: var(--tx);
  letter-spacing: -1px
}

.kpi-sub {
  font-size: 12px;
  color: var(--tx3);
  margin-top: 8px;
  font-weight: 500
}

/* ════════════════════════════════════════════════════
   CHARTS
════════════════════════════════════════════════════ */
.charts-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px
}

.chart-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .02)
}

.chart-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--tx);
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: .5px;
  display: flex;
  align-items: center;
  gap: 8px
}

.chart-title::before {
  content: "";
  display: block;
  width: 8px;
  height: 20px;
  background: var(--primary);
  border-radius: 4px
}

.chart-card canvas {
  max-height: 240px
}

/* ════════════════════════════════════════════════════
   TABLE
════════════════════════════════════════════════════ */
.table-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--card-border);
  background: var(--bg3)
}

.search-field {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg2);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 0 14px;
  transition: all .2s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, .02)
}

.search-field:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow)
}

.search-field .material-symbols-rounded {
  font-size: 18px;
  color: var(--tx3)
}

.search-field input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--tx);
  font-size: 14px;
  padding: 12px 0;
  width: 240px;
  font-weight: 500
}

.tbl-wrap {
  overflow-x: auto
}

.tbl {
  width: 100%;
  border-collapse: collapse
}

.tbl th {
  background: var(--bg3);
  color: var(--tx2);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid var(--card-border);
  white-space: nowrap
}

.tbl td {
  padding: 14px 20px;
  font-size: 14px;
  border-bottom: 1px solid var(--card-border);
  vertical-align: middle;
  color: var(--tx);
  font-weight: 500
}

.tbl tr:hover td {
  background: var(--bg3)
}

.tbl tr:last-child td {
  border-bottom: none
}

/* user cell */
.u-cell {
  display: flex;
  align-items: center;
  gap: 12px
}

.u-cell img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .1)
}

.u-cell .u-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--tx)
}

.u-cell .u-sub {
  font-size: 12px;
  color: var(--tx2);
  margin-top: 2px
}

/* badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 700
}

.badge-vip {
  background: #fef3c7;
  color: #d97706;
  border: 1px solid #fde68a
}

.badge-normal {
  background: var(--bg);
  color: var(--tx2);
  border: 1px solid var(--card-border)
}

.badge-online {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0
}

.badge-info {
  background: #dbeafe;
  color: #1d4ed8;
  border: 1px solid #bfdbfe
}

.diamond {
  font-weight: 800;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f3e8ff;
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 12px
}

/* ════════════════════════════════════════════════════
   PROFILE GRID (Kız Profilleri)
════════════════════════════════════════════════════ */
.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px
}

.profile-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: all .3s var(--ease);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .03)
}

.profile-card:hover {
  border-color: var(--primary);
  transform: translateY(-6px);
  box-shadow: 0 12px 24px rgba(59, 130, 246, .15)
}

.profile-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block
}

.profile-card .pc-info {
  padding: 16px
}

.pc-info h4 {
  font-size: 15px;
  font-weight: 800;
  color: var(--tx)
}

.pc-info p {
  font-size: 13px;
  color: var(--tx2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 4px;
  font-weight: 500
}

.pc-info .pc-gems {
  font-size: 13px;
  color: var(--accent);
  font-weight: 800;
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 4px
}

/* ════════════════════════════════════════════════════
   CHAT LAYOUT
════════════════════════════════════════════════════ */
.chat-layout {
  display: grid;
  grid-template-columns: 260px 260px 1fr;
  gap: 20px;
  height: calc(100vh - 200px);
  min-height: 520px
}

.chat-col {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg2);
  border: 1px solid var(--card-border);
  border-radius: var(--radius)
}

.col-head {
  font-size: 13px;
  font-weight: 700;
  color: var(--tx);
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: 20px 20px 0;
  display: flex;
  align-items: center;
  gap: 10px
}

.col-search {
  display: block;
  width: calc(100% - 40px);
  margin: 16px 20px;
  background: var(--bg3);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13px;
  color: var(--tx);
  outline: none;
  transition: all .2s;
  font-weight: 500
}

.col-search:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
  background: var(--bg2)
}

.list-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 8px 12px
}

/* list items */
.li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all .2s;
  font-size: 14px;
  font-weight: 700;
  border: 1px solid transparent;
  color: var(--tx)
}

.li:hover {
  background: var(--bg3)
}

.li.active {
  background: rgba(59, 130, 246, .08);
  color: var(--primary);
  border-color: var(--primary-glow)
}

.li img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .1)
}

.li .li-sub {
  font-size: 12px;
  color: var(--tx2);
  margin-top: 2px;
  font-weight: 600
}

.empty-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--tx3);
  text-align: center;
  padding: 40px 20px;
  height: 100%
}

.empty-hint .material-symbols-rounded {
  font-size: 48px;
  color: var(--card-border)
}

.empty-hint p {
  font-size: 14px;
  font-weight: 600
}

/* chat main */
.chat-main {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg2);
  border: 1px solid var(--card-border);
  border-radius: var(--radius)
}

.chat-hdr {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--card-border);
  background: var(--bg3)
}

.chat-hdr img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .15)
}

.hdr-name {
  font-size: 16px;
  font-weight: 800;
  color: var(--tx)
}

.hdr-sub {
  font-size: 13px;
  color: var(--tx2);
  font-weight: 600
}

.chat-msgs {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--bg)
}

.msg {
  max-width: 65%;
  padding: 12px 18px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.5;
  word-break: break-word;
  font-weight: 500;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .05)
}

.msg.kiz {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--primary), var(--primary-d));
  color: #fff;
  border-bottom-right-radius: 4px
}

.msg.erkek {
  align-self: flex-start;
  background: var(--bg2);
  border: 1px solid var(--card-border);
  color: var(--tx);
  border-bottom-left-radius: 4px
}

.msg .mtime {
  font-size: 11px;
  opacity: .7;
  margin-top: 6px;
  display: block;
  text-align: right;
  font-weight: 600
}

.chat-input-row {
  display: flex;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid var(--card-border);
  background: var(--bg2)
}

.chat-input-row input {
  flex: 1;
  background: var(--bg3);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  color: var(--tx);
  padding: 14px 18px;
  font-size: 14px;
  outline: none;
  transition: all .2s;
  font-weight: 500
}

.chat-input-row input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
  background: #fff
}

.send-btn {
  background: var(--primary);
  border: none;
  border-radius: var(--radius-sm);
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
  transition: all .2s;
  box-shadow: 0 4px 12px var(--primary-glow)
}

.send-btn:hover {
  background: var(--primary-d);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px var(--primary-glow)
}

/* ════════════════════════════════════════════════════
   SETTINGS
════════════════════════════════════════════════════ */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  max-width: 1000px
}

.settings-block {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .02)
}

.settings-block h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 800;
  color: var(--tx);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--card-border)
}

.settings-block h3 .material-symbols-rounded {
  color: var(--primary);
  font-size: 24px;
  background: var(--bg3);
  padding: 6px;
  border-radius: 8px
}

.fields-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px
}

.settings-footer {
  grid-column: 1/-1;
  display: flex;
  justify-content: flex-end;
  padding-top: 8px
}

/* ════════════════════════════════════════════════════
   BUTTONS
════════════════════════════════════════════════════ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--primary), var(--primary-d));
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 4px 12px var(--primary-glow);
  transition: all .2s var(--ease)
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px var(--primary-glow)
}

.btn-primary .material-symbols-rounded {
  font-size: 20px
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg2);
  border: 1px solid var(--card-border);
  color: var(--tx);
  border-radius: var(--radius-sm);
  padding: 11px 18px;
  font-size: 14px;
  font-weight: 600;
  transition: all .2s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, .02)
}

.btn-secondary:hover {
  background: var(--bg3);
  border-color: var(--tx3)
}

.btn-ghost {
  background: transparent;
  border: 1px solid transparent;
  color: var(--tx2);
  border-radius: var(--radius-sm);
  padding: 11px 18px;
  font-size: 14px;
  font-weight: 600;
  transition: all .2s
}

.btn-ghost:hover {
  color: var(--tx);
  background: var(--bg)
}

.icon-btn {
  background: var(--bg2);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--tx2);
  transition: all .2s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, .02)
}

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

/* ════════════════════════════════════════════════════
   MODAL
════════════════════════════════════════════════════ */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 8000;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px
}

.overlay.open {
  display: flex;
  animation: fadeInModal .3s var(--ease)
}

@keyframes fadeInModal {
  from {
    opacity: 0;
    backdrop-filter: blur(0)
  }

  to {
    opacity: 1;
    backdrop-filter: blur(8px)
  }
}

.modal-box {
  width: 100%;
  max-width: 540px;
  background: var(--bg2);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .15);
  display: flex;
  flex-direction: column;
  transform: scale(0.95);
  animation: scaleUp .3s var(--ease) forwards;
}

.reply-fullscreen-modal {
  padding: 0;
  align-items: stretch;
  justify-content: stretch;
}

.reply-fullscreen-modal.open {
  display: flex;
}

.reply-fullscreen-modal .modal-box {
  max-height: none;
  border: 0;
  box-shadow: none;
  transform: none;
  animation: none;
}

.reply-mobile-actions {
  display: none;
}

@keyframes scaleUp {
  to {
    transform: scale(1)
  }
}

.modal-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 28px 16px;
  border-bottom: 1px solid var(--card-border)
}

.modal-hdr h2 {
  font-size: 20px;
  font-weight: 800;
  color: var(--tx);
  display: flex;
  align-items: center;
  gap: 10px
}

.modal-body {
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 20px
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--card-border)
}

/* FORM FIELDS IN MODAL */
.fld {
  display: flex;
  flex-direction: column;
  gap: 8px
}

.fld label {
  font-size: 12px;
  font-weight: 800;
  color: var(--tx2);
  text-transform: uppercase;
  letter-spacing: .5px
}

.fld input,
.fld textarea,
.fld select {
  background: var(--bg3);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  color: var(--tx);
  padding: 14px 16px;
  font-size: 14px;
  outline: none;
  transition: all .2s;
  width: 100%;
  font-weight: 500
}

.fld input:focus,
.fld textarea:focus,
.fld select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
  background: var(--bg2)
}

.fld textarea {
  resize: vertical;
  min-height: 90px
}

/* ── MODERN PERMISSION TOGGLES ── */
.perm-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 8px
}

.perm-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--bg2);
  border: 2px solid var(--card-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all .2s var(--ease);
}

.perm-card:hover {
  border-color: var(--primary-glow);
  background: var(--bg3)
}

.perm-card input {
  display: none
}

.perm-card span.material-symbols-rounded {
  font-size: 20px;
  color: var(--tx3);
  transition: color .2s
}

.perm-card span.perm-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--tx2);
  transition: color .2s
}

.perm-card:has(input:checked) {
  border-color: var(--primary);
  background: rgba(59, 130, 246, .05)
}

.perm-card:has(input:checked) span.material-symbols-rounded {
  color: var(--primary)
}

.perm-card:has(input:checked) span.perm-label {
  color: var(--primary-d)
}

/* Custom File Upload */
.file-upload-box {
  border: 2px dashed var(--card-border);
  border-radius: var(--radius-sm);
  padding: 32px 20px;
  text-align: center;
  cursor: pointer;
  transition: all .2s;
  background: var(--bg3);
}

.file-upload-box:hover {
  border-color: var(--primary);
  background: rgba(59, 130, 246, .02);
}

.file-upload-box .material-symbols-rounded {
  font-size: 40px;
  color: var(--primary);
  margin-bottom: 12px
}

.file-upload-box p {
  font-size: 14px;
  font-weight: 700;
  color: var(--tx)
}

.file-upload-box span {
  font-size: 12px;
  color: var(--tx3);
  font-weight: 500
}

.img-pick {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 8px 0;
  margin-bottom: 16px
}

.img-pick img {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--card-border);
  box-shadow: 0 4px 16px rgba(0, 0, 0, .08)
}

/* ════════════════════════════════════════════════════
   TOAST
════════════════════════════════════════════════════ */
.toast {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 9999;
  background: var(--tx);
  border: none;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  padding: 14px 24px;
  border-radius: var(--radius-sm);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .2);
  opacity: 0;
  transform: translateY(16px) scale(.95);
  transition: all .3s var(--ease);
  pointer-events: none;
  max-width: 360px
}

.toast.show {
  opacity: 1;
  transform: translateY(0) scale(1)
}

.toast.err {
  background: var(--danger)
}

/* ════════════════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════════════════ */
@media(max-width:1200px) {
  .charts-row {
    grid-template-columns: 1fr
  }
}

@media(max-width:1024px) {
  .chat-layout {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 240px 1fr
  }

  .chat-main {
    grid-column: 1/-1
  }

  .perm-grid {
    grid-template-columns: 1fr
  }
}

@media(max-width:768px) {
  .sidebar {
    width: 72px
  }

  .sb-brand,
  .sb-menu span:not(.material-symbols-rounded),
  .sb-info,
  .sb-divider {
    display: none
  }

  .sb-logo {
    padding: 16px;
    justify-content: center
  }

  .sb-menu {
    padding: 0 8px
  }

  .nav-item {
    padding: 14px;
    justify-content: center
  }

  .sb-user {
    justify-content: center;
    padding: 16px 8px
  }

  .main {
    padding: 24px 20px
  }

  .kpi-grid {
    grid-template-columns: repeat(2, 1fr)
  }

  .fields-row {
    grid-template-columns: 1fr
  }

  .chat-layout {
    grid-template-columns: 1fr;
    height: auto
  }

  .bekleyen-layout {
    grid-template-columns: 1fr;
    height: auto
  }

  .bekleyen-list-col {
    max-height: 300px
  }
}

/* ════════════════════════════════════════════════════
   KEŞFET & BEĞEN
════════════════════════════════════════════════════ */
.kesfet-kiz-list {
  padding: 16px 20px
}

.kesfet-kiz-chip:hover {
  background: rgba(59, 130, 246, .08) !important;
  border-color: var(--primary-glow) !important
}

.kesfet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.kesfet-kart {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all .3s var(--ease);
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .03)
}

.kesfet-kart:hover {
  border-color: var(--primary);
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(59, 130, 246, .15)
}

.kart-foto-wrap {
  position: relative;
  aspect-ratio: 1
}

.kart-foto {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block
}

.kart-match-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  padding: 6px 12px;
  border-radius: 20px;
  box-shadow: 0 4px 12px var(--primary-glow)
}

.kart-bilgi {
  padding: 16px 20px 12px
}

.kart-isim {
  font-size: 16px;
  font-weight: 800;
  color: var(--tx);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis
}

.kart-adi {
  font-size: 13px;
  color: var(--tx2);
  margin-top: 4px;
  font-weight: 600
}

.kart-aksiyonlar {
  padding: 12px 20px 20px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: auto;
}

.btn-kart {
  flex: 1;
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s var(--ease);
  white-space: nowrap;
}

.btn-begen {
  background: linear-gradient(135deg, var(--primary), var(--primary-d));
  color: #fff;
  box-shadow: 0 4px 12px var(--primary-glow)
}

.btn-begen:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px var(--primary-glow)
}

.btn-begendi {
  background: linear-gradient(135deg, #a855f7, #7e22ce);
  color: #fff;
  box-shadow: 0 4px 12px rgba(168, 85, 247, .3)
}

.btn-begendi:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(168, 85, 247, .4)
}

.btn-eslestir {
  background: linear-gradient(135deg, #0ea5e9, #0369a1);
  color: #fff;
  box-shadow: 0 4px 12px rgba(14, 165, 233, .3)
}

.btn-eslestir:hover {
  transform: translateY(-2px)
}

.btn-eslesti {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
  cursor: default
}

.btn-kart:disabled:not(.btn-eslesti) {
  opacity: .5;
  cursor: not-allowed
}

/* ════════════════════════════════════════════════════
   BEKLEYEN MESAJLAR
════════════════════════════════════════════════════ */
.bekleyen-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 20px;
  height: calc(100vh - 200px);
  min-height: 560px;
}

.bekleyen-list-col {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg2);
  border: 1px solid var(--card-border);
  border-radius: var(--radius)
}

.bekleyen-chat-col {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg2);
  border: 1px solid var(--card-border);
  border-radius: var(--radius)
}

.bekleyen-li.bekleyen-urgent {
  background: rgba(239, 68, 68, .05)
}

.bekleyen-li.bekleyen-urgent:hover {
  background: rgba(239, 68, 68, .1)
}

.bekleyen-hdr {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--card-border);
  background: var(--bg3);
  flex-shrink: 0;
}

.bh-bot,
.bh-erkek {
  display: flex;
  align-items: center;
  gap: 12px
}

.bh-bot img,
.bh-erkek img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--card-border);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .08)
}

.bh-bot img {
  border-color: var(--primary-glow)
}

.bh-label {
  font-size: 11px;
  font-weight: 800;
  color: var(--tx3);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 2px
}

.bh-name {
  font-size: 15px;
  font-weight: 800;
  color: var(--tx)
}

.bh-bot .bh-name {
  color: var(--primary)
}

.bh-arrow {
  color: var(--tx3);
  background: var(--bg2);
  padding: 6px;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, .05)
}

/* ════════════════════════════════════════════════════
   BOT YÖNETİMİ
════════════════════════════════════════════════════ */
.bot-dashboard-layout {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.bot-create-card {
  flex: 0 0 380px;
  background: linear-gradient(135deg, #a855f7, #ec4899);
  border-radius: 24px;
  padding: 32px;
  color: #fff;
  box-shadow: 0 20px 40px rgba(168, 85, 247, 0.25);
}

.bot-card-hdr {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
}

.bot-card-hdr .bot-icon-wrap {
  width: 56px;
  height: 56px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

.bot-card-hdr h3 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 4px;
  letter-spacing: -0.5px;
}

.bot-card-hdr p {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
  line-height: 1.4;
}

.bot-form .form-row {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
}

.bot-form .fld {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bot-form label {
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.9);
}

.bot-form label .material-symbols-rounded {
  font-size: 18px;
}

.bot-form input,
.bot-form select {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  padding: 14px 16px;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  outline: none;
  transition: all 0.2s;
}

.bot-form input:focus,
.bot-form select:focus {
  border-color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.25);
}

.bot-form option {
  color: #333;
}

.bot-form .format-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.15);
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  font-size: 14px;
  font-weight: 600;
}

.bot-actions {
  display: flex;
  gap: 12px;
  margin-top: 32px;
}

.btn-bot-primary {
  flex: 1;
  background: #fff;
  color: #a855f7;
  border: none;
  padding: 16px;
  border-radius: 14px;
  font-weight: 800;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: transform 0.2s;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.btn-bot-primary:hover {
  transform: translateY(-2px);
}

.btn-bot-secondary {
  flex: 1;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.4);
  padding: 16px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-bot-secondary:hover {
  background: rgba(255, 255, 255, 0.3);
}

.bot-right-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

.bot-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.bot-stat-box {
  padding: 24px;
  border-radius: 20px;
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.06);
}

.box-purple {
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
}

.box-green {
  background: linear-gradient(135deg, #10b981, #059669);
}

.box-pink {
  background: linear-gradient(135deg, #f43f5e, #be123c);
}

.stat-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.stat-top .material-symbols-rounded {
  font-size: 32px;
  opacity: 0.9;
}

.stat-top .badge {
  background: rgba(255, 255, 255, 0.2);
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 700;
}

.stat-val {
  font-size: 42px;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 8px;
  letter-spacing: -1px;
}

.stat-label {
  font-size: 15px;
  font-weight: 600;
  opacity: 0.9;
}

.bot-list-header {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg2);
  padding: 20px 24px;
  border-radius: 20px;
  border: 1px solid var(--card-border);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.bot-list-header h3 {
  font-size: 18px;
  font-weight: 800;
  color: var(--tx);
  margin-bottom: 2px;
}

.bot-list-header p {
  font-size: 13px;
  color: var(--tx2);
  font-weight: 500;
}

.bot-profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.bot-card {
  background: var(--bg2);
  border-radius: 20px;
  padding: 20px;
  border: 1px solid var(--card-border);
  transition: all 0.2s;
  position: relative;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.02);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.bot-status {
  position: absolute;
  top: 20px;
  right: 20px;
  background: var(--bg3);
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--tx2);
  border: 1px solid var(--card-border);
}

.bot-status.online {
  color: #10b981;
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.1);
}

.bot-card-top {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 4px;
}

.bot-avatar-wrap {
  position: relative;
}

.bot-avatar-wrap img {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  object-fit: cover;
  border: 2px solid var(--primary);
}

.bot-gender-badge {
  position: absolute;
  bottom: -6px;
  right: -6px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ec4899;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  border: 2px solid var(--bg2);
}

.bot-info h4 {
  font-size: 16px;
  font-weight: 800;
  color: var(--tx);
  margin-bottom: 4px;
}

.bot-info p {
  font-size: 13px;
  color: var(--tx2);
  font-weight: 500;
}

.bot-card-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bot-btn-outline {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--card-border);
  padding: 10px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--tx);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: 0.2s;
}

.bot-btn-outline:hover {
  background: var(--bg);
  border-color: var(--tx3);
}

.bot-quick-actions {
  display: flex;
  gap: 8px;
}

.bqa-btn {
  flex: 1;
  padding: 10px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.2s;
  font-size: 18px;
}

.bqa-heart {
  background: rgba(244, 63, 94, 0.1);
  color: #f43f5e;
}

.bqa-heart:hover {
  background: #f43f5e;
  color: #fff;
}

.bqa-star {
  background: rgba(234, 179, 8, 0.1);
  color: #eab308;
}

.bqa-star:hover {
  background: #eab308;
  color: #fff;
}

.bqa-delete {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.bqa-delete:hover {
  background: #ef4444;
  color: #fff;
}

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

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

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.3);
  transition: .4s;
  border-radius: 34px;
}

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

.switch input:checked+.slider {
  background-color: #fff;
}

.switch input:checked+.slider:before {
  transform: translateX(16px);
  background-color: #a855f7;
}

.stat-badge {
  background: #10b981;
  color: #fff;
  padding: 8px 16px;
  border-radius: 99px;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.status-dot {
  width: 10px;
  height: 10px;
  background: #fff;
  border-radius: 50%;
  display: inline-block;
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
  }

  70% {
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(255, 255, 255, 0);
  }

  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
  }
}

/* ════════════════════════════════════════════════════
   BOT FOTO GRID (Modal)
════════════════════════════════════════════════════ */
.bot-foto-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 12px;
}

.foto-slot {
  aspect-ratio: 1;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
}

.foto-slot-inner {
  width: 100%;
  height: 100%;
  position: relative;
  background: var(--bg3);
  border: 2px dashed var(--card-border);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.foto-slot-inner:hover {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.05);
}

.foto-slot-inner.has-photo {
  border-style: solid;
  border-color: var(--primary);
}

.foto-slot-inner img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 14px;
}

.foto-slot-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--tx3);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  pointer-events: none;
}

.foto-slot-placeholder .material-symbols-rounded {
  font-size: 32px;
  color: var(--tx3);
}

.foto-slot-inner.has-photo .foto-slot-placeholder {
  display: none;
}

.foto-slot-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 24px;
  height: 24px;
  background: var(--primary);
  color: #fff;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.foto-slot:first-child .foto-slot-badge {
  background: linear-gradient(135deg, #a855f7, #ec4899);
}

.foto-slot-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  background: rgba(239, 68, 68, 0.9);
  color: #fff;
  border-radius: 99px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: 0.2s;
}

.foto-slot-remove .material-symbols-rounded {
  font-size: 16px;
}

.foto-slot-remove:hover {
  background: #ef4444;
  transform: scale(1.1);
}

/* ── AI ile toplu bot yükleme ───────────────────────────────────────────── */
.bulk-bot-modal{max-width:1050px;width:min(1050px,96vw);max-height:94vh;overflow:hidden}
.bulk-bot-modal>.modal-body{max-height:calc(94vh - 86px);overflow:auto;padding:20px 24px 28px}
.bulk-bot-header p{margin:5px 0 0;color:var(--tx3);font-size:12px}
.bulk-bot-toolbar{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:14px 16px;border:1px solid var(--border);background:var(--bg2);border-radius:14px;margin-bottom:16px}
.bulk-bot-toolbar>div{display:flex;flex-direction:column;gap:3px}.bulk-bot-toolbar span{font-size:12px;color:var(--tx3)}
.bulk-bot-toolbar button,.bulk-bot-footer button{display:flex;align-items:center;gap:7px}
.bulk-bot-slots{display:flex;flex-direction:column;gap:16px}
.bulk-bot-slot{padding:18px;border:1px solid var(--border);border-radius:18px;background:var(--card);box-shadow:0 5px 18px rgba(15,23,42,.05)}
.bulk-slot-title{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:15px}
.bulk-slot-title>div:first-child{display:flex;align-items:center;gap:11px}.bulk-slot-title>div:first-child>span{display:grid;place-items:center;width:34px;height:34px;border-radius:11px;color:#fff;font-weight:800;background:linear-gradient(135deg,#7c3aed,#db2777)}
.bulk-slot-title b,.bulk-slot-title small{display:block}.bulk-slot-title small{margin-top:3px;color:var(--tx3);font-size:11px}
.bulk-slot-actions{display:flex;gap:7px}.bulk-slot-actions button{width:35px;height:35px;display:grid;place-items:center;border-radius:10px;border:1px solid var(--border);background:var(--bg2);color:#7c3aed;cursor:pointer}.bulk-slot-actions button.danger{color:#ef4444}
.bulk-fields{display:grid;grid-template-columns:2fr .7fr 1.35fr 1.1fr;gap:12px}.bulk-fields .fld{margin:0}
.bulk-bot-slot textarea{resize:vertical;min-height:58px}
.bulk-upload-row{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:13px}
.bulk-upload-box{position:relative;display:flex;flex-direction:column;align-items:flex-start;min-height:128px;padding:14px;border:1px dashed #8b5cf6;border-radius:14px;background:rgba(124,58,237,.045);cursor:pointer;overflow:hidden}.bulk-upload-box.post{border-color:#ec4899;background:rgba(236,72,153,.045)}
.bulk-upload-box>input{position:absolute;width:1px;height:1px;opacity:0}.bulk-upload-box>.material-symbols-rounded{font-size:25px;color:#8b5cf6}.bulk-upload-box.post>.material-symbols-rounded{color:#ec4899}.bulk-upload-box>b{font-size:13px;margin-top:4px}.bulk-upload-box>small{font-size:10px;color:var(--tx3);margin-top:2px}
.bulk-file-preview{display:flex;gap:6px;flex-wrap:wrap;margin-top:10px;min-height:35px;width:100%}.bulk-file-thumb{position:relative;width:46px;height:46px}.bulk-file-thumb img{width:100%;height:100%;object-fit:cover;border-radius:9px}.bulk-file-thumb span{position:absolute;right:-3px;bottom:-3px;width:17px;height:17px;display:grid;place-items:center;border-radius:50%;background:#111827;color:#fff;font-size:9px}.bulk-empty-files{font-size:11px;color:var(--tx3);align-self:center}
.bulk-check{display:flex;align-items:center;gap:8px;margin-top:12px;font-size:12px;font-weight:650;color:var(--tx2)}.bulk-check input{width:17px;height:17px;accent-color:#8b5cf6}
.bulk-bot-status{padding:12px 14px;margin-top:16px;border-radius:12px;background:rgba(16,185,129,.1);color:#059669;font-size:13px;font-weight:700}.bulk-bot-status.error{background:rgba(239,68,68,.1);color:#dc2626}
.bulk-bot-footer{position:sticky;bottom:-28px;display:flex;justify-content:flex-end;gap:10px;margin:20px -24px -28px;padding:15px 24px;background:var(--card);border-top:1px solid var(--border);z-index:3}
@media(max-width:760px){.bulk-bot-toolbar{align-items:stretch;flex-direction:column}.bulk-fields{grid-template-columns:1fr 1fr}.bulk-upload-row{grid-template-columns:1fr}.bulk-bot-modal>.modal-body{padding:14px}.bulk-bot-footer{margin:18px -14px -28px;padding:13px 14px}.bulk-slot-title{align-items:flex-start}}

/* ── AI / manuel drip bot oluşturma ─────────────────────────────────────── */
.drip-create-modal{max-width:1050px;width:min(1050px,96vw);max-height:94vh;overflow:hidden}
.drip-create-modal>.modal-body{max-height:calc(94vh - 90px);overflow:auto;padding:20px 24px 30px}
.drip-create-header p{margin:5px 0 0;color:var(--tx3);font-size:12px;max-width:720px}
.drip-ai-bar{display:flex;align-items:center;gap:12px;padding:13px 15px;margin-bottom:16px;border:1px solid rgba(139,92,246,.28);border-radius:14px;background:linear-gradient(135deg,rgba(124,58,237,.09),rgba(219,39,119,.06))}
.drip-ai-bar>.material-symbols-rounded{font-size:30px;color:#8b5cf6}.drip-ai-bar>div{flex:1}.drip-ai-bar b,.drip-ai-bar small{display:block}.drip-ai-bar small{font-size:11px;color:var(--tx3);margin-top:3px}
.drip-create-fields{display:grid;grid-template-columns:2fr .7fr 1.4fr 1.1fr;gap:12px}.drip-create-fields .fld{margin-top:0}
.drip-profile-upload{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:15px;margin:14px 0;border:1px dashed #8b5cf6;border-radius:14px;background:rgba(124,58,237,.045);cursor:pointer}.drip-profile-upload>input{position:absolute;width:1px;height:1px;opacity:0}.drip-profile-upload>.material-symbols-rounded{font-size:30px;color:#8b5cf6}.drip-profile-upload>span:nth-of-type(2){min-width:220px}.drip-profile-upload b,.drip-profile-upload small{display:block}.drip-profile-upload small{margin-top:3px;font-size:10px;color:var(--tx3)}
.drip-post-upload{border-color:#ec4899;background:rgba(236,72,153,.045)}.drip-post-upload>.material-symbols-rounded{color:#ec4899}
.drip-create-file-preview{display:flex;gap:7px;flex-wrap:wrap;flex:1;justify-content:flex-end}.drip-create-file-preview img,.drip-step-media-preview img,.drip-step-media-preview video{width:54px;height:54px;object-fit:cover;border-radius:10px;background:#0b0b10}
.drip-flow-head{display:flex;align-items:flex-end;justify-content:space-between;gap:15px;margin:22px 0 12px}.drip-flow-head h3{margin:0 0 4px}.drip-flow-head p{margin:0;color:var(--tx3);font-size:11px}.drip-flow-head>div:last-child{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}.drip-flow-head button{padding:8px 10px;font-size:11px}
.drip-create-steps{display:flex;flex-direction:column;gap:10px}.drip-create-step{display:grid;grid-template-columns:38px minmax(0,1fr) auto;gap:10px;padding:12px;border:1px solid var(--border);border-radius:14px;background:var(--bg2)}
.drip-step-number{display:grid;place-items:center;width:32px;height:32px;border-radius:10px;background:linear-gradient(135deg,#f59e0b,#db2777);color:white;font-weight:800}.drip-step-title{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px}.drip-step-title b{font-size:13px}.drip-step-controls{display:flex;gap:5px}.drip-step-controls button{width:29px;height:29px;border:1px solid var(--border);border-radius:8px;background:var(--card);color:var(--tx2);cursor:pointer;display:grid;place-items:center}.drip-step-controls button:last-child{color:#ef4444}
.drip-step-text{width:100%;min-height:68px;resize:vertical}.drip-step-upload{display:flex;align-items:center;gap:10px;padding:12px;border:1px dashed var(--border);border-radius:11px;background:var(--card);cursor:pointer}.drip-step-upload input{position:absolute;width:1px;height:1px;opacity:0}.drip-step-upload small{color:var(--tx3)}
.drip-step-delay{display:grid;grid-template-columns:repeat(4,minmax(60px,1fr));gap:7px;margin-top:9px}.drip-step-delay label{font-size:10px;color:var(--tx3)}.drip-step-delay input{display:block;width:100%;margin-top:3px;padding:7px;border:1px solid var(--border);border-radius:8px;background:var(--card);color:var(--tx1)}
.drip-create-footer{position:sticky;bottom:-30px;display:flex;justify-content:flex-end;gap:9px;margin:20px -24px -30px;padding:15px 24px;background:var(--card);border-top:1px solid var(--border);z-index:3}.drip-create-footer button{display:flex;align-items:center;gap:6px}
@media(max-width:760px){.drip-create-fields{grid-template-columns:1fr 1fr}.drip-flow-head{align-items:stretch;flex-direction:column}.drip-flow-head>div:last-child{justify-content:flex-start}.drip-create-modal>.modal-body{padding:14px}.drip-create-footer{margin:18px -14px -30px;padding:12px 14px;flex-wrap:wrap}.drip-create-step{grid-template-columns:32px minmax(0,1fr)}.drip-create-step>.drip-step-controls{grid-column:2}.drip-ai-bar{align-items:flex-start;flex-wrap:wrap}}

/* ════════════════════════════════════════════════════
   BOT MESAJLARI (BM)
════════════════════════════════════════════════════ */
.bm-status-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 99px;
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
  font-weight: 700;
  font-size: 13px;
  border: none;
}

.bm-btn-outline {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 99px;
  background: var(--bg2);
  color: var(--tx2);
  border: 1px solid var(--border);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}

.bm-btn-outline .material-symbols-rounded {
  font-size: 16px;
}

.bm-container {
  display: flex;
  flex: 1;
  background: var(--card);
  border-radius: 24px;
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 1px solid var(--card-border);
  min-height: 500px;
}

.bm-sidebar {
  width: 320px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  background: var(--card);
}

.bm-sidebar-actions {
  display: flex;
  gap: 10px;
  padding: 20px;
}

.bm-btn-green {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #10b981;
  color: #fff;
  border: none;
  padding: 10px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}

.bm-btn-purple {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #8b5cf6;
  color: #fff;
  border: none;
  padding: 10px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}

.bm-btn-green .material-symbols-rounded,
.bm-btn-purple .material-symbols-rounded {
  font-size: 18px;
}

.bm-search-box {
  margin: 0 20px 20px;
  position: relative;
}

.bm-search-box .material-symbols-rounded {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--tx3);
  font-size: 20px;
}

.bm-search-box input {
  width: 100%;
  padding: 10px 10px 10px 40px;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 13px;
  color: var(--tx1);
  outline: none;
  background: var(--bg);
  transition: 0.2s;
}

.bm-search-box input:focus {
  border-color: #8b5cf6;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.bm-sidebar-stats {
  display: flex;
  gap: 16px;
  padding: 0 20px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  color: var(--tx2);
  font-weight: 600;
}

.bm-sidebar-stats span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.bm-sidebar-stats .material-symbols-rounded {
  font-size: 16px;
  color: #ec4899;
}

.bm-chat-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
}

.bm-chat-list::-webkit-scrollbar {
  width: 6px;
}

.bm-chat-list::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 10px;
}

.bm-chat-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: 0.2s;
  border-bottom: 1px solid transparent;
}

.bm-chat-item:hover {
  background: var(--bg);
  border-bottom-color: var(--border);
}

.bm-chat-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 18px;
  flex-shrink: 0;
}

.bm-chat-info {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.bm-chat-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 4px;
}

.bm-chat-top h4 {
  margin: 0;
  font-size: 14px;
  color: var(--tx1);
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bm-chat-top .bm-time {
  font-size: 11px;
  color: var(--tx3);
  font-weight: 600;
  flex-shrink: 0;
}

.bm-preview {
  margin: 0 0 6px;
  font-size: 13px;
  color: var(--tx2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bm-bot-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #8b5cf6;
  font-weight: 700;
}

.bm-bot-badge .material-symbols-rounded {
  font-size: 14px;
}

.bm-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}

.bm-empty-state {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.bm-empty-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(236, 72, 153, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ec4899;
}

.bm-empty-icon .material-symbols-rounded {
  font-size: 40px;
}

.bm-empty-state h2 {
  margin: 0;
  font-size: 22px;
  color: var(--tx1);
}

.bm-empty-state p {
  margin: 0;
  font-size: 14px;
  color: var(--tx2);
  line-height: 1.5;
  font-weight: 500;
}

.tm-quick-btn {
  padding: 6px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--tx1);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: 0.2s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.tm-quick-btn:hover {
  background: var(--bg2);
  border-color: #10b981;
  color: #10b981;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.1);
}

/* Switch Toggle */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  margin: 0;
}

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

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--border);
  transition: .3s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
}

input:checked+.slider {
  background-color: #10b981;
}

input:focus+.slider {
  box-shadow: 0 0 1px #10b981;
}

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

.slider.round {
  border-radius: 24px;
}

.slider.round:before {
  border-radius: 50%;
}

/* Custom Scrollbar for Bot List */
.bot-checkbox-list::-webkit-scrollbar {
  width: 6px;
}

.bot-checkbox-list::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 10px;
}

/* ════════════════════════════════════════════════════
   EXTRA RESPONSIVE OVERRIDES (MOBILE FRIENDLINESS)
   ════════════════════════════════════════════════════ */
@media(max-width:768px) {
  /* Sidebar profile stacking */
  .sb-user {
    flex-direction: column !important;
    gap: 10px !important;
    align-items: center !important;
    padding: 16px 4px !important;
  }
  .sb-theme-toggle {
    margin-right: 0 !important;
    margin-bottom: 4px !important;
  }
  .sb-logout {
    margin: 0 !important;
  }
  .chevron {
    display: none !important;
  }

  /* Page Head responsiveness */
  .page-head {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 16px !important;
  }
  .page-head > div:last-child {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
  }

  /* Reply Fullscreen Modal Overlay */
  #replySidebarToggleBtn {
    display: flex !important;
  }
  .reply-fullscreen-modal .modal-box {
    grid-template-columns: 1fr !important;
    width: 100% !important;
    max-width: 100% !important;
    position: relative !important;
    height: 100% !important;
    height: 100dvh !important;
    overflow: hidden !important;
  }
  .reply-fullscreen-modal {
    position: fixed !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100dvh !important;
    overflow: hidden !important;
  }
  .reply-chat-main {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }
  .reply-header {
    flex: 0 0 60px;
    width: 100%;
    min-width: 0;
  }
  .reply-header > div:first-child {
    min-width: 0;
    overflow: hidden;
  }
  .reply-header h2,
  .reply-header p {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .reply-mobile-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    flex: 0 0 auto;
    padding: 8px 10px;
    border-bottom: 1px solid var(--card-border);
    background: var(--bg2);
  }
  .reply-mobile-actions button {
    min-width: 0;
    min-height: 42px;
    border-radius: 10px;
    padding: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
  }
  .reply-mobile-actions button:disabled {
    opacity: .55;
    cursor: wait;
  }
  .reply-mobile-actions .material-symbols-rounded {
    font-size: 18px;
  }
  .reply-mobile-vip {
    color: #fff;
    border: 1px solid #7c3aed;
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
  }
  .reply-mobile-warning {
    color: #c2410c;
    border: 1px solid #fdba74;
    background: #fff7ed;
  }
  .reply-quick-replies-row {
    display: none !important;
  }
  .reply-input-row {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
  }
  .reply-media-actions {
    flex: 0 0 auto;
  }
  .reply-media-actions button {
    padding: 6px !important;
  }
  #replyChatInput {
    min-width: 0 !important;
    width: 0;
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  #replyChatSendBtn {
    flex: 0 0 40px;
  }
  .reply-fullscreen-modal aside {
    position: absolute !important;
    top: 60px !important; /* height of header */
    left: 0 !important;
    width: 100% !important;
    height: calc(100% - 60px) !important;
    z-index: 100 !important;
    transform: translateX(-100%) !important;
    transition: transform 0.3s ease !important;
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.25) !important;
  }
  .reply-fullscreen-modal aside.open {
    transform: translateX(0) !important;
  }
}

@media(max-width:480px) {
  /* Stack KPI cards in a single column on extra small screens */
  .kpi-grid {
    grid-template-columns: 1fr !important;
  }
  /* Reduce main body padding on mobile */
  .main {
    padding: 16px 12px !important;
  }
}

/* ── Drip Botları ───────────────────────────────────────────── */
.drip-adim {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  margin-bottom: 10px;
  cursor: grab;
}
.drip-adim.dragging { opacity: .45; }
.drip-adim.drop-target { border-color: #8b5cf6; border-style: dashed; }
.drip-adim-sira {
  width: 26px; height: 26px;
  flex-shrink: 0;
  border-radius: 50%;
  background: rgba(139, 92, 246, .15);
  color: #8b5cf6;
  font-size: 12px;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.drip-adim-govde { flex: 1; min-width: 0; }
.drip-adim-meta { font-size: 11.5px; color: var(--tx3); margin-top: 4px; }
.drip-adim-icerik {
  font-size: 13px;
  color: var(--tx1);
  word-break: break-word;
  white-space: pre-wrap;
}
.drip-etiket-btn {
  padding: 4px 9px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--tx2);
  font-size: 11.5px;
  font-family: ui-monospace, monospace;
  cursor: pointer;
}
.drip-etiket-btn:hover { border-color: #8b5cf6; color: #8b5cf6; }

.drip-bot-karti {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
}
.drip-bot-karti.havuzda { border-color: rgba(139, 92, 246, .55); }
.drip-bot-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg);
}
.drip-rozet {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 10.5px;
  font-weight: 800;
}
.drip-rozet.pending { background: rgba(59,130,246,.15); color: #3b82f6; }
.drip-rozet.sent { background: rgba(16,185,129,.15); color: #10b981; }
.drip-rozet.cancelled { background: rgba(107,114,128,.18); color: #6b7280; }
.drip-rozet.failed { background: rgba(239,68,68,.15); color: #ef4444; }

/* ── Konuşma Geçmişi ─────────────────────────────────────── */
.conversation-history-page {
  height: calc(100vh - 120px);
  min-height: 560px;
  flex-direction: column;
}
.conversation-history-page.active { display: flex !important; }
.conversation-history-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.conversation-history-readonly {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  color: var(--primary);
  background: rgba(124,58,237,.09);
  border: 1px solid rgba(124,58,237,.2);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.conversation-history-readonly .material-symbols-rounded { font-size: 18px; }
.conversation-history-shell {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(260px, .82fr) minmax(280px, .92fr) minmax(420px, 2fr);
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  box-shadow: 0 14px 45px rgba(76, 29, 149, .08);
}
.conversation-history-users,
.conversation-history-bots {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: var(--card);
  border-right: 1px solid var(--card-border);
}
.conversation-history-bots { background: var(--bg3); }
.conversation-history-panel-head {
  min-height: 68px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--card-border);
}
.conversation-history-panel-head > div { min-width: 0; display: grid; gap: 2px; }
.conversation-history-panel-head strong { color: var(--tx1); font-size: 14px; }
.conversation-history-panel-head span:not(.material-symbols-rounded) { color: var(--tx3); font-size: 11px; }
.conversation-history-panel-head > .material-symbols-rounded {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  flex: 0 0 36px;
  color: var(--primary);
  background: rgba(124,58,237,.09);
  border-radius: 11px;
  font-size: 20px;
}
.conversation-history-search {
  margin: 12px;
  padding: 0 12px;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  transition: border-color .2s, box-shadow .2s;
}
.conversation-history-search:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(124,58,237,.1);
}
.conversation-history-search .material-symbols-rounded { color: var(--tx3); font-size: 20px; }
.conversation-history-search input {
  width: 100%;
  min-width: 0;
  padding: 10px 0;
  color: var(--tx1);
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 12px;
}
.conversation-history-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 4px 8px 10px;
}
.conversation-history-list-item {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: 44px minmax(0,1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  color: var(--tx1);
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 13px;
  transition: background .15s, border-color .15s, transform .15s;
}
.conversation-history-list-item + .conversation-history-list-item { margin-top: 3px; }
.conversation-history-list-item:hover {
  background: rgba(124,58,237,.06);
  border-color: rgba(124,58,237,.12);
}
.conversation-history-list-item.active {
  background: linear-gradient(135deg, rgba(124,58,237,.14), rgba(236,72,153,.08));
  border-color: rgba(124,58,237,.32);
  box-shadow: 0 6px 20px rgba(124,58,237,.09);
}
.conversation-history-list-item > img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border: 2px solid var(--card);
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--card-border);
}
.conversation-history-item-copy { min-width: 0; display: grid; gap: 2px; }
.conversation-history-item-copy strong {
  min-width: 0;
  overflow: hidden;
  color: var(--tx1);
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.conversation-history-item-copy strong em {
  display: inline-flex;
  margin-left: 4px;
  padding: 1px 5px;
  color: #7c3aed;
  background: rgba(124,58,237,.1);
  border-radius: 6px;
  font-size: 8px;
  font-style: normal;
  vertical-align: 1px;
}
.conversation-history-item-copy strong em.normal { color: #0f766e; background: rgba(13,148,136,.1); }
.conversation-history-item-copy > span,
.conversation-history-item-copy small {
  min-width: 0;
  overflow: hidden;
  color: var(--tx3);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.conversation-history-item-copy .history-contact { color: var(--tx2); }
.conversation-history-item-copy .history-preview { color: var(--tx2); font-size: 11px; }
.conversation-history-count {
  min-width: 45px;
  display: grid;
  justify-items: end;
  color: var(--tx2);
  font-size: 10px;
}
.conversation-history-count b { color: var(--primary); font-size: 13px; }
.conversation-history-count small { color: var(--tx3); font-size: 9px; white-space: nowrap; }
.conversation-history-loading {
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--tx3);
  font-size: 12px;
}
.history-spin { animation: conversation-history-spin .8s linear infinite; }
@keyframes conversation-history-spin { to { transform: rotate(360deg); } }

.conversation-history-chat {
  min-width: 0;
  min-height: 0;
  position: relative;
  display: flex;
  background:
    radial-gradient(circle at 90% 0, rgba(236,72,153,.07), transparent 25%),
    radial-gradient(circle at 10% 100%, rgba(124,58,237,.09), transparent 28%),
    var(--bg);
}
.conversation-history-empty {
  width: 100%;
  min-height: 220px;
  margin: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: var(--tx3);
  text-align: center;
}
.conversation-history-empty > .material-symbols-rounded {
  font-size: 46px;
  color: rgba(124,58,237,.55);
}
.conversation-history-empty strong { color: var(--tx1); font-size: 16px; }
.conversation-history-empty p { max-width: 360px; font-size: 12px; }
.conversation-history-empty.compact { min-height: 130px; font-size: 11px; }
.conversation-history-empty.compact > .material-symbols-rounded { font-size: 30px; }
.conversation-history-empty.error,
.conversation-history-empty.error > .material-symbols-rounded { color: var(--danger); }
.conversation-history-chat-view {
  width: 100%;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.conversation-history-chat-view[hidden],
.conversation-history-empty[hidden] { display: none !important; }
.conversation-history-chat-head {
  min-height: 68px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: color-mix(in srgb, var(--card) 92%, transparent);
  border-bottom: 1px solid var(--card-border);
  backdrop-filter: blur(12px);
}
.conversation-history-pair { min-width: 0; display: flex; align-items: center; gap: 12px; }
.conversation-history-pair-avatars { width: 66px; height: 44px; position: relative; flex: 0 0 66px; }
.conversation-history-pair-avatars img {
  position: absolute;
  width: 42px;
  height: 42px;
  object-fit: cover;
  border: 2px solid var(--card);
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--card-border);
}
.conversation-history-pair-avatars img:first-child { left: 0; top: 0; z-index: 2; }
.conversation-history-pair-avatars img:last-child { right: 0; bottom: 0; }
.conversation-history-pair > div:last-child { min-width: 0; display: grid; }
.conversation-history-pair strong {
  overflow: hidden;
  color: var(--tx1);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.conversation-history-pair span { color: var(--tx3); font-size: 10px; }
.conversation-history-legend { display: flex; align-items: center; gap: 10px; color: var(--tx3); font-size: 10px; }
.conversation-history-legend span { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.conversation-history-legend i { width: 8px; height: 8px; display: block; border-radius: 50%; }
.conversation-history-legend .user-dot { background: #fff; border: 1px solid #c4b5fd; }
.conversation-history-legend .bot-dot { background: linear-gradient(135deg,#7c3aed,#ec4899); }
.conversation-history-older {
  min-height: 40px;
  padding: 6px 12px;
  display: flex;
  justify-content: center;
  gap: 7px;
  background: var(--bg3);
  border-bottom: 1px solid var(--card-border);
}
.conversation-history-older[hidden] { display: none !important; }
.conversation-history-older button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  color: var(--primary);
  background: rgba(124,58,237,.07);
  border: 1px solid rgba(124,58,237,.18);
  border-radius: 9px;
  font-size: 10px;
  font-weight: 800;
}
.conversation-history-older button:last-child { color: var(--tx2); background: var(--card); border-color: var(--card-border); }
.conversation-history-older button:disabled { cursor: wait; opacity: .6; }
.conversation-history-older .material-symbols-rounded { font-size: 15px; }
.conversation-history-messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 18px 20px 28px;
  scroll-behavior: smooth;
}
.conversation-history-day {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 14px 0;
}
.conversation-history-day span {
  padding: 4px 9px;
  color: var(--tx3);
  background: color-mix(in srgb, var(--card) 90%, transparent);
  border: 1px solid var(--card-border);
  border-radius: 999px;
  font-size: 9px;
  font-weight: 700;
}
.conversation-history-message { display: flex; margin: 5px 0; }
.conversation-history-message.from-user { justify-content: flex-start; }
.conversation-history-message.from-bot { justify-content: flex-end; }
.conversation-history-bubble {
  max-width: min(78%, 650px);
  padding: 9px 11px 7px;
  color: var(--tx1);
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 5px 15px 15px 15px;
  box-shadow: 0 4px 14px rgba(76,29,149,.05);
}
.from-bot .conversation-history-bubble {
  color: #fff;
  background: linear-gradient(135deg,#7c3aed,#8b5cf6 55%,#d946ef);
  border-color: transparent;
  border-radius: 15px 5px 15px 15px;
  box-shadow: 0 7px 20px rgba(124,58,237,.18);
}
.conversation-history-bubble > b { display: block; margin-bottom: 3px; color: var(--primary); font-size: 9px; }
.from-bot .conversation-history-bubble > b { color: rgba(255,255,255,.76); }
.conversation-history-bubble > p { margin: 0; font-size: 12px; line-height: 1.45; overflow-wrap: anywhere; }
.conversation-history-bubble footer {
  margin-top: 4px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  color: var(--tx3);
  font-size: 8px;
}
.from-bot .conversation-history-bubble footer { color: rgba(255,255,255,.7); }
.history-read-icon { font-size: 12px; }
.conversation-history-media {
  display: block;
  width: min(310px, 100%);
  max-height: 360px;
  margin-top: 6px;
  object-fit: contain;
  background: rgba(0,0,0,.12);
  border-radius: 10px;
}
.conversation-history-audio { display: block; width: min(320px, 100%); margin-top: 6px; }

@media (max-width: 1250px) {
  .conversation-history-shell { grid-template-columns: 245px 265px minmax(360px,1fr); }
  .conversation-history-list-item { grid-template-columns: 38px minmax(0,1fr) auto; padding: 8px; gap: 8px; }
  .conversation-history-list-item > img { width: 38px; height: 38px; }
}
@media (max-width: 900px) {
  .conversation-history-page { height: auto; min-height: calc(100vh - 100px); }
  .conversation-history-shell { min-height: 1050px; grid-template-columns: 1fr; grid-template-rows: 300px 300px minmax(450px,1fr); overflow: visible; }
  .conversation-history-users,
  .conversation-history-bots { border-right: 0; border-bottom: 1px solid var(--card-border); }
  .conversation-history-chat { min-height: 450px; }
}
