/* ==========================================================
   WHATSAPP BOT & YÖNETİM PANELİ - MODERN GLASSMORPHISM DESIGN
   ========================================================== */

:root {
  --bg-main: #0a0d14;
  --bg-card: rgba(18, 24, 38, 0.75);
  --bg-card-hover: rgba(26, 34, 52, 0.85);
  --bg-input: rgba(12, 17, 28, 0.9);
  
  --border-light: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(16, 185, 129, 0.5);
  
  --wa-primary: #10b981;
  --wa-primary-hover: #059669;
  --wa-primary-glow: rgba(16, 185, 129, 0.25);
  
  --accent-blue: #3b82f6;
  --accent-purple: #8b5cf6;
  --accent-amber: #f59e0b;
  --accent-red: #ef4444;
  
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-dim: #6b7280;
  
  --font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.45);
  --shadow-glow: 0 0 24px var(--wa-primary-glow);
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  line-height: 1.5;
}

/* Arka Plan Glow Işıkları */
.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.15;
}

.bg-glow-1 {
  width: 500px;
  height: 500px;
  top: -100px;
  right: -50px;
  background: radial-gradient(circle, var(--wa-primary), transparent 70%);
}

.bg-glow-2 {
  width: 600px;
  height: 600px;
  bottom: -150px;
  left: -100px;
  background: radial-gradient(circle, var(--accent-blue), transparent 70%);
}

.app-layout {
  position: relative;
  z-index: 1;
  max-width: 1380px;
  margin: 0 auto;
  padding: 24px;
}

/* ==========================================================
   HEADER
   ========================================================== */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}

.header-left, .header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo-box {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo-icon {
  width: 40px;
  height: 40px;
  color: var(--wa-primary);
  filter: drop-shadow(0 0 10px var(--wa-primary-glow));
}

.logo-text h1 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #fff 40%, var(--wa-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.badge-version {
  font-size: 0.7rem;
  background: rgba(16, 185, 129, 0.15);
  color: var(--wa-primary);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 600;
  text-transform: uppercase;
}

/* Durum Rozetleri */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.status-connected {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.status-connected .status-dot {
  background-color: #10b981;
  box-shadow: 0 0 10px #10b981;
  animation: pulse-dot 2s infinite;
}

.status-disconnected {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}
.status-disconnected .status-dot {
  background-color: #ef4444;
}

.status-connecting, .status-waiting {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}
.status-connecting .status-dot, .status-waiting .status-dot {
  background-color: #f59e0b;
  box-shadow: 0 0 10px #f59e0b;
  animation: pulse-dot 1.2s infinite;
}

@keyframes pulse-dot {
  0% { transform: scale(0.95); opacity: 0.7; }
  50% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.7; }
}

.quick-switch-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.04);
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-light);
}

.switch-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
}

.accounts-summary-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-light);
}

.accounts-summary-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.accounts-summary-pill .status-badge {
  padding: 2px 6px;
  font-size: 0.78rem;
  gap: 4px;
}

/* ==========================================================
   STATS GRID
   ========================================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.16);
}

.stat-icon-wrapper {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.icon-emerald { background: rgba(16, 185, 129, 0.15); color: var(--wa-primary); }
.icon-blue { background: rgba(59, 130, 246, 0.15); color: var(--accent-blue); }
.icon-purple { background: rgba(139, 92, 246, 0.15); color: var(--accent-purple); }
.icon-amber { background: rgba(245, 158, 11, 0.15); color: var(--accent-amber); }

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
}

.stat-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}

.stat-value.text-sm {
  font-size: 1.1rem;
  font-family: var(--font-mono);
  font-weight: 600;
}

/* ==========================================================
   NAVIGATION TABS
   ========================================================== */
.nav-tabs {
  display: flex;
  gap: 10px;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 8px;
  margin-bottom: 24px;
  overflow-x: auto;
}

.nav-tab {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-muted);
  font-family: var(--font-family);
  font-size: 0.92rem;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.nav-tab:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.nav-tab.active {
  color: #fff;
  background: var(--wa-primary);
  box-shadow: var(--shadow-glow);
}

.tab-badge {
  background: rgba(0, 0, 0, 0.3);
  font-size: 0.72rem;
  padding: 2px 7px;
  border-radius: 999px;
  color: #fff;
}

/* Tab İçerikleri */
.tab-content {
  display: none;
  animation: fadeIn 0.3s ease;
}

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

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================
   TOOLBARS & SEARCH
   ========================================================== */
.content-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.search-box {
  position: relative;
  flex: 1;
  max-width: 400px;
  min-width: 260px;
}

.search-box svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
}

.search-box input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  color: #fff;
  padding: 10px 14px 10px 42px;
  font-family: var(--font-family);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s ease;
}

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

.filter-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.select-control {
  background: var(--bg-input);
  color: var(--text-main);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-family: var(--font-family);
  font-size: 0.88rem;
  outline: none;
  cursor: pointer;
}

.select-control:focus {
  border-color: var(--wa-primary);
}

/* ==========================================================
   BUTTONS
   ========================================================== */
.btn {
  font-family: var(--font-family);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  outline: none;
}

.btn-primary {
  background: var(--wa-primary);
  color: #fff;
  box-shadow: 0 4px 14px var(--wa-primary-glow);
}
.btn-primary:hover {
  background: var(--wa-primary-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border: 1px solid var(--border-light);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}
.btn-danger:hover {
  background: #ef4444;
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: #fff;
  border: 1px solid var(--border-light);
}
.btn-outline:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.82rem;
}

.btn-block {
  width: 100%;
}

/* ==========================================================
   RULES LIST GRID & CARDS
   ========================================================== */
.rules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 20px;
}

.rule-card {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: all 0.25s ease;
  position: relative;
}

.rule-card:hover {
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.rule-card.disabled {
  opacity: 0.6;
  border-style: dashed;
}

.rule-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.rule-title-box h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.badge-match-type {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: uppercase;
}
.badge-contains { background: rgba(59, 130, 246, 0.15); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); }
.badge-exact { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-startsWith { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-regex { background: rgba(139, 92, 246, 0.15); color: #a78bfa; border: 1px solid rgba(139, 92, 246, 0.3); }

.rule-keywords-section {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.kw-chip {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-light);
  color: var(--text-main);
  font-size: 0.78rem;
  padding: 3px 10px;
  border-radius: 999px;
  font-family: var(--font-mono);
}

.rule-response-preview {
  background: rgba(0, 0, 0, 0.3);
  border-left: 3px solid var(--wa-primary);
  border-radius: var(--radius-sm);
  padding: 12px;
  font-size: 0.86rem;
  color: #e5e7eb;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 120px;
  overflow-y: auto;
}

.rule-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-light);
  padding-top: 14px;
  font-size: 0.8rem;
  color: var(--text-dim);
}

.rule-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-icon {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  display: inline-flex;
  transition: all 0.2s ease;
}
.btn-icon:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.btn-icon.delete:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}

/* ==========================================================
   CONNECTION & PAIRING STYLES
   ========================================================== */
.connection-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

@media (max-width: 900px) {
  .connection-layout {
    grid-template-columns: 1fr;
  }
}

.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 28px;
}

.panel-header {
  margin-bottom: 24px;
}

.panel-title-group {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.icon-tag {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.panel-title-group h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
}

.panel-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.phone-input-group {
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-top: 8px;
  margin-bottom: 6px;
}

.phone-prefix {
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  font-weight: 700;
  border-right: 1px solid var(--border-light);
}

.phone-input-group input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 1.05rem;
  padding: 12px 14px;
}

.phone-input-group .btn {
  border-radius: 0;
  padding: 12px 18px;
}

.hint-text {
  font-size: 0.78rem;
  color: var(--text-dim);
  display: block;
}

/* Eşleştirme Kodu Kutusu */
.pairing-code-box {
  margin-top: 24px;
  background: rgba(16, 185, 129, 0.05);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  animation: fadeIn 0.4s ease;
}

.code-status-pill {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--wa-primary);
  text-transform: uppercase;
}

.code-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 14px 0 20px;
}

.code-digits {
  font-family: var(--font-mono);
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: #fff;
  background: rgba(0, 0, 0, 0.4);
  padding: 10px 24px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
}

.btn-copy {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-light);
  color: #fff;
  padding: 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-copy:hover {
  background: var(--wa-primary);
  border-color: var(--wa-primary);
}

.pairing-steps {
  text-align: left;
  background: rgba(0, 0, 0, 0.25);
  padding: 18px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
}

.pairing-steps h4 {
  font-size: 0.9rem;
  color: #fff;
  margin-bottom: 10px;
}

.pairing-steps ol {
  padding-left: 20px;
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pairing-steps li b {
  color: #fff;
}

/* QR Kod ve Cihaz Kartı */
.qr-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  text-align: center;
}

.qr-placeholder {
  color: var(--text-muted);
  font-size: 0.9rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 20px 0;
}

.qr-info-banner {
  background: rgba(37, 211, 102, 0.1);
  border: 1px solid rgba(37, 211, 102, 0.25);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  font-size: 0.85rem;
  color: #34d399;
  margin-bottom: 4px;
  text-align: center;
}

.qr-expire-text {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 6px 0 0;
  text-align: center;
}

.qr-image-wrapper {
  background: #fff;
  padding: 16px;
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: fadeIn 0.3s ease;
}

.qr-image-wrapper img {
  width: 260px;
  height: 260px;
  display: block;
}

.qr-hint {
  color: #4b5563;
  font-size: 0.78rem;
  margin-top: 10px;
  max-width: 240px;
}

/* Loading spinner */
.loading-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(37, 211, 102, 0.15);
  border-top-color: #25d366;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Bağlı Cihaz Kartı */
.connected-card {
  text-align: center;
  padding: 24px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-lg);
}

.user-avatar-badge {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.2);
  color: var(--wa-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  box-shadow: 0 0 20px var(--wa-primary-glow);
}

.connected-info h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
}

.mono-text {
  font-family: var(--font-mono);
  color: var(--text-muted);
  margin-top: 4px;
}

.connected-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #34d399;
  background: rgba(16, 185, 129, 0.15);
  padding: 4px 12px;
  border-radius: 999px;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  animation: pulse-dot 1.5s infinite;
}

/* ==========================================================
   CANLI MESAJ AKIŞI (CHAT BUBBLES)
   ========================================================== */
.logs-feed-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 650px;
  overflow-y: auto;
  padding-right: 8px;
}

.log-chat-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  animation: fadeIn 0.3s ease;
}

.log-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-dim);
}

.sender-badge {
  font-weight: 600;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.sender-phone {
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.bubble-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bubble-incoming {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-light);
  padding: 10px 16px;
  border-radius: 14px 14px 14px 2px;
  max-width: 85%;
  font-size: 0.92rem;
  color: #f3f4f6;
}

.bubble-outgoing {
  align-self: flex-end;
  background: #005c4b; /* WhatsApp Web yeşil balon rengi */
  color: #e9edef;
  padding: 10px 16px;
  border-radius: 14px 14px 2px 14px;
  max-width: 85%;
  font-size: 0.92rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  white-space: pre-wrap;
}

.bubble-reply-tag {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.7);
  display: block;
  margin-bottom: 4px;
  font-weight: 600;
  text-transform: uppercase;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-dim);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

/* ==========================================================
   SIMULATOR & SETTINGS
   ========================================================== */
.simulator-body, .settings-form {
  margin-top: 16px;
}

.sim-card {
  margin-top: 12px;
  padding: 16px;
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-light);
}

.setting-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid var(--border-light);
  gap: 20px;
}

.setting-info h4 {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 4px;
}

.setting-info p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.sub-setting {
  margin-top: 18px;
  padding-left: 14px;
  border-left: 2px solid var(--border-light);
}

/* ==========================================================
   FORMS & INPUTS
   ========================================================== */
.form-group {
  margin-bottom: 18px;
}

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

.form-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.form-row .col {
  flex: 1 1 200px;
  min-width: 0;
}

input[type="text"], input[type="tel"], input[type="number"], textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  color: #fff;
  padding: 10px 14px;
  font-family: var(--font-family);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s ease;
}

input:focus, textarea:focus {
  border-color: var(--wa-primary);
  box-shadow: 0 0 0 3px var(--wa-primary-glow);
}

.label-with-tags {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  flex-wrap: wrap;
  gap: 8px;
}

.variable-tags {
  display: flex;
  gap: 6px;
}

.var-tag {
  background: rgba(16, 185, 129, 0.15);
  color: var(--wa-primary);
  border: 1px solid rgba(16, 185, 129, 0.3);
  font-size: 0.72rem;
  font-family: var(--font-mono);
  padding: 2px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}
.var-tag:hover {
  background: var(--wa-primary);
  color: #fff;
}

/* ==========================================================
   TOGGLE SWITCHES
   ========================================================== */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 26px;
  flex-shrink: 0;
}

.toggle-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.15);
  transition: 0.3s;
  border-radius: 34px;
}

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

input:checked + .slider {
  background-color: var(--wa-primary);
  box-shadow: 0 0 10px var(--wa-primary-glow);
}

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

/* Checkbox */
.checkbox-container {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 500;
  user-select: none;
}
.checkbox-container input {
  accent-color: var(--wa-primary);
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.flex-center-end {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

/* ==========================================================
   MODAL DIALOG
   ========================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow: hidden;
  overscroll-behavior: contain;
  animation: fadeIn 0.25s ease;
}

.modal-box {
  background: #111827;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 620px;
  max-height: 88vh;
  overflow-y: auto;
  overflow-x: hidden !important;
  overscroll-behavior: contain;
  box-sizing: border-box;
  padding: 28px;
  box-shadow: var(--shadow-lg);
}

.modal-box-lg {
  max-width: 680px;
}

.modal-box-sm {
  max-width: 480px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 22px;
}

.modal-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
}

.modal-subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.btn-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.6rem;
  cursor: pointer;
}
.btn-close:hover { color: #fff; }

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

/* ==========================================================
   TOAST NOTIFICATIONS
   ========================================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: rgba(18, 24, 38, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-light);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideInRight 0.3s ease;
}

.toast-success { border-left: 4px solid var(--wa-primary); }
.toast-error { border-left: 4px solid var(--accent-red); }
.toast-info { border-left: 4px solid var(--accent-blue); }

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Utilities */
.hidden { display: none !important; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }

/* ==========================================================
   SES KAYDI (VOICE & VIEW-ONCE) STİLLERİ
   ========================================================== */
.audio-response-box {
  background: rgba(139, 92, 246, 0.06);
  border: 1px solid rgba(139, 92, 246, 0.25);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  animation: fadeIn 0.3s ease;
}

.audio-box-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.audio-icon-tag {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(139, 92, 246, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.audio-upload-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 8px;
}

.audio-player-preview {
  background: rgba(0, 0, 0, 0.35);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
}

.audio-player-preview audio {
  width: 100%;
  border-radius: 6px;
}

.badge-voice {
  background: rgba(139, 92, 246, 0.18);
  color: #c4b5fd;
  border: 1px solid rgba(139, 92, 246, 0.35);
}

.badge-viewonce {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.audio-rule-card-player {
  background: rgba(0, 0, 0, 0.25);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  margin-top: 6px;
}

.audio-rule-card-player audio {
  width: 100%;
  height: 32px;
}

.qr-alert-box {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-sm);
  padding: 12px;
  font-size: 0.78rem;
  text-align: left;
  color: #fbbf24;
}

.qr-alert-box ul {
  padding-left: 16px;
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: #e5e7eb;
}

.qr-alert-box b {
  color: #fff;
}

/* ==========================================================
   ALERT BANNER (HESAP KAPANMA UYARISI)
   ========================================================== */
.alert-banner {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.18), rgba(185, 28, 28, 0.28));
  border: 1px solid rgba(239, 68, 68, 0.45);
  border-radius: var(--radius-lg);
  padding: 14px 20px;
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  box-shadow: 0 4px 20px rgba(239, 68, 68, 0.2);
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from { transform: translateY(-16px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.alert-banner-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.alert-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
  animation: pulse-alert 1.5s infinite;
}

@keyframes pulse-alert {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

.alert-text {
  font-size: 0.92rem;
  color: #fff;
}

.alert-reason-text {
  color: #fca5a5;
  font-size: 0.85rem;
  margin-left: 6px;
}

.alert-banner-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-close-sm {
  background: transparent;
  border: none;
  color: #fca5a5;
  font-size: 1.3rem;
  cursor: pointer;
  line-height: 1;
}
.btn-close-sm:hover { color: #fff; }

/* ==========================================================
   ÇOKLU HESAP YÖNETİMİ (ACCOUNTS GRID & CARDS)
   ========================================================== */
.accounts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 22px;
}

.account-card {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 24px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.account-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: var(--shadow-lg);
}

.account-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
}

.account-card-user {
  display: flex;
  gap: 14px;
  align-items: center;
}

.account-avatar-wrapper {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--wa-primary);
  flex-shrink: 0;
  position: relative;
}

.account-avatar-wrapper.status-disconnected,
.account-avatar-wrapper.status-logged_out {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  color: var(--accent-red);
}

.account-avatar-wrapper.status-connecting,
.account-avatar-wrapper.status-code_ready,
.account-avatar-wrapper.status-qr_ready {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.3);
  color: var(--accent-amber);
}

.account-user-details h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  display: flex;
  align-items: center;
  gap: 8px;
}

.account-user-details .account-phone {
  font-size: 0.85rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  margin-top: 4px;
}

.account-card-body {
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  padding: 16px 0;
  margin-bottom: 18px;
}

.account-stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.account-stat-item {
  background: rgba(0, 0, 0, 0.25);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
}

.account-stat-item .stat-caption {
  font-size: 0.72rem;
  color: var(--text-dim);
  text-transform: uppercase;
  font-weight: 600;
}

.account-stat-item .stat-num {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  font-family: var(--font-mono);
  margin-top: 2px;
}

.account-switch-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
}

.account-switch-row span {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

.account-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.account-card-footer .left-btns {
  display: flex;
  gap: 8px;
  flex: 1;
}

.account-card-footer .right-btns {
  display: flex;
  gap: 6px;
}

/* Yeni Hesap Ekle Kartı (Dashed) */
.add-account-card {
  border: 2px dashed rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-xl);
  min-height: 240px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--text-muted);
}

.add-account-card:hover {
  border-color: var(--wa-primary);
  background: rgba(16, 185, 129, 0.04);
  color: #fff;
  transform: translateY(-3px);
}

.add-account-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.12);
  color: var(--wa-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================
   GÖRSEL YANIT TÜRÜ SEÇİCİSİ (SEGMENTED CARDS)
   ========================================================== */
.response-type-selector {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 6px;
}

.response-type-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.2s ease;
  user-select: none;
}

.response-type-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
}

.response-type-card.active {
  background: rgba(16, 185, 129, 0.12);
  border-color: var(--wa-primary);
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.25);
}

.response-type-card input {
  display: none;
}

.response-card-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}

.response-card-content {
  display: flex;
  flex-direction: column;
}

.response-card-content b {
  font-size: 0.88rem;
  color: #fff;
}

.response-card-content span {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* ==========================================================
   BAĞLANTI MODAL YÖNTEM SEKMELERİ
   ========================================================== */
.connect-method-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 12px;
  flex-wrap: wrap;
}

.method-tab {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.86rem;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.method-tab:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.method-tab.active {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.35);
}

/* Özel Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* ==========================================================
   LİSANS ANAHTARI GİRİŞ EKRANI (LOGIN OVERLAY)
   ========================================================== */
.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(6, 9, 15, 0.94);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.login-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.login-card {
  max-width: 480px;
  width: 100%;
  background: rgba(18, 24, 38, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-xl);
  padding: 38px 32px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65), 0 0 40px rgba(16, 185, 129, 0.12);
  text-align: center;
  position: relative;
  overflow: hidden;
  animation: modal-pop 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.login-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #10b981, #3b82f6, #8b5cf6, #10b981);
  background-size: 300% 100%;
  animation: gradient-slide 4s linear infinite;
}

@keyframes gradient-slide {
  0% { background-position: 0% 50%; }
  100% { background-position: 300% 50%; }
}

.login-logo-box {
  margin-bottom: 24px;
}

.login-glow {
  display: inline-flex;
  padding: 16px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 20px;
  margin-bottom: 16px;
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.35);
  animation: pulse-glow 3s ease-in-out infinite alternate;
}

@keyframes pulse-glow {
  0% { box-shadow: 0 0 15px rgba(16, 185, 129, 0.25); }
  100% { box-shadow: 0 0 32px rgba(16, 185, 129, 0.5); }
}

.login-logo-box h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
  margin-bottom: 6px;
}

.login-subtitle {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.key-input-box {
  display: flex;
  align-items: center;
  background: rgba(12, 17, 28, 0.95);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 4px 14px;
  transition: all 0.25s ease;
  margin-top: 6px;
}

.key-input-box:focus-within {
  border-color: var(--wa-primary);
  box-shadow: 0 0 18px rgba(16, 185, 129, 0.3);
}

.key-icon {
  font-size: 1.25rem;
  margin-right: 10px;
}

.key-input-box input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 600;
  padding: 10px 0;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.key-input-box input::placeholder {
  color: rgba(255, 255, 255, 0.25);
  font-family: var(--font-family);
  font-size: 0.85rem;
  letter-spacing: normal;
  text-transform: none;
}

.login-footer-info {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.info-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  font-size: 0.76rem;
  color: var(--text-muted);
}

.info-pill .check-icon {
  color: var(--wa-primary);
  font-weight: 800;
}

/* ==========================================================
   HEADER LİSANS ROZETİ & DETAYLAR
   ========================================================== */
.license-header-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.28);
  padding: 6px 14px;
  border-radius: var(--radius-md);
  transition: all 0.25s ease;
}

.license-crown {
  font-size: 1.25rem;
  filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.6));
}

.license-details {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.license-user {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.license-remaining {
  font-size: 0.84rem;
  color: #34d399;
  font-weight: 700;
  font-family: var(--font-mono);
}

.license-remaining.warning {
  color: #f59e0b;
}

.license-remaining.expired {
  color: #ef4444;
}

/* Admin Rozeti Sekmede */
.admin-badge {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
  font-size: 0.68rem;
  padding: 2px 7px;
}

/* ==========================================================
   ADMIN LİSANS YÖNETİM TABLOSU
   ========================================================== */
.licenses-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 8px;
  font-size: 0.88rem;
}

.licenses-table th {
  padding: 12px 14px;
  color: var(--text-muted);
  font-weight: 600;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.licenses-table tbody tr {
  background: rgba(255, 255, 255, 0.02);
  transition: background 0.2s ease;
  border-radius: var(--radius-sm);
}

.licenses-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.05);
}

.licenses-table td {
  padding: 12px 14px;
  vertical-align: middle;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.licenses-table td:first-child {
  border-left: 1px solid rgba(255, 255, 255, 0.04);
  border-top-left-radius: var(--radius-sm);
  border-bottom-left-radius: var(--radius-sm);
}

.licenses-table td:last-child {
  border-right: 1px solid rgba(255, 255, 255, 0.04);
  border-top-right-radius: var(--radius-sm);
  border-bottom-right-radius: var(--radius-sm);
}

.key-code-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.key-code {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.84rem;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 4px 10px;
  border-radius: 6px;
  color: #60a5fa;
  letter-spacing: 0.03em;
}

.btn-copy-key {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s;
}

.btn-copy-key:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

/* Paket Rozetleri */
.plan-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
}

.plan-daily {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.plan-weekly {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.35);
}

.plan-monthly {
  background: rgba(139, 92, 246, 0.15);
  color: #a78bfa;
  border: 1px solid rgba(139, 92, 246, 0.35);
}

.plan-custom {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.plan-lifetime, .plan-admin {
  background: rgba(234, 179, 8, 0.2);
  color: #facc15;
  border: 1px solid rgba(234, 179, 8, 0.5);
}

/* Durum Rozetleri */
.license-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
}

.badge-active {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-pending {
  background: rgba(59, 130, 246, 0.12);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge-expired {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-revoked {
  background: rgba(156, 163, 175, 0.12);
  color: #9ca3af;
  border: 1px solid rgba(156, 163, 175, 0.3);
}

.table-actions-cell {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.btn-extend-sm {
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.3);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
}

.btn-extend-sm:hover {
  background: #3b82f6;
  color: #fff;
}

/* ==========================================================
   MOBİL VE TABLET UYUMLULUĞU (RESPONSIVE OPTIMIZATION)
   ========================================================== */
@media (max-width: 900px) {
  .app-header {
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    gap: 14px;
  }

  .header-left, .header-center, .header-right {
    justify-content: space-between;
    width: 100%;
  }

  .header-center {
    order: 2;
  }

  .header-right {
    order: 3;
    flex-wrap: wrap;
  }

  .license-header-pill {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .app-layout {
    padding: 12px 10px;
  }

  /* Nav Sekmeleri Yatay Kaydırma (Swipeable Tabs) */
  .nav-tabs {
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    gap: 8px;
    padding-bottom: 8px;
    margin-bottom: 16px;
    scrollbar-width: none;
  }

  .nav-tabs::-webkit-scrollbar {
    display: none;
  }

  .nav-tab {
    flex-shrink: 0;
    scroll-snap-align: start;
    padding: 10px 14px;
    font-size: 0.84rem;
    min-height: 44px; /* Kolay dokunma alanı */
  }

  /* İstatistik Kartları 2 Sütun */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 16px;
  }

  .stat-card {
    padding: 14px 12px;
  }

  .stat-value {
    font-size: 1.3rem;
  }

  /* Çoklu Hesap Grid Tek Sütun */
  .accounts-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .content-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .content-toolbar .filter-actions {
    width: 100%;
    justify-content: stretch;
  }

  .content-toolbar .filter-actions .btn {
    width: 100%;
    justify-content: center;
  }

  /* Modallar Tam Ekrana Yakın */
  .modal-overlay {
    padding: 10px;
  }

  .modal-box {
    max-width: 98vw;
    width: 100%;
    padding: 20px 16px;
    max-height: 90vh;
    border-radius: var(--radius-lg);
  }

  /* Form Alanları Mobil Dokunmatik Uyum */
  input, select, textarea {
    font-size: 16px !important; /* iOS safari yakınlaşmasını engeller */
  }

  .form-row {
    flex-direction: column;
    gap: 12px;
  }

  .form-group.col {
    width: 100%;
  }

  /* Yanıt Türü Kartları Tek Sütun */
  .response-type-grid {
    grid-template-columns: 1fr;
  }

  .btn-text-desktop {
    display: inline;
  }

  /* Kurallar Listesi Kartları */
  .rule-card {
    padding: 14px;
  }

  .rule-card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .rule-actions {
    width: 100%;
    justify-content: flex-end;
  }

  /* Bağlantı Modal QR */
  .qr-frame {
    width: 200px;
    height: 200px;
  }

  .qr-image {
    width: 180px;
    height: 180px;
  }

  .pairing-code-box {
    font-size: 1.4rem;
    letter-spacing: 2px;
    padding: 12px;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .logo-text h1 {
    font-size: 1.1rem;
  }

  .login-card {
    padding: 28px 18px;
  }

  .login-card h2 {
    font-size: 1.3rem;
  }

  .key-input-box input {
    font-size: 0.95rem;
  }
}

/* ==========================================================
   WHATSAPP WEB TARZI CANLI SOHBET MERKEZİ (CHAT HUB)
   ========================================================== */
.chat-hub-container {
  display: flex;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  overflow: hidden;
  height: 680px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  position: relative;
}

/* Sol Panel: Sohbetler Listesi */
.chat-sidebar {
  width: 360px;
  border-right: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  background: rgba(14, 19, 31, 0.7);
  flex-shrink: 0;
}

.chat-search-wrap {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-light);
  position: relative;
  display: flex;
  align-items: center;
}

.chat-search-wrap svg {
  position: absolute;
  left: 28px;
  color: var(--text-dim);
  pointer-events: none;
}

.chat-search-wrap input {
  width: 100%;
  background: rgba(8, 12, 20, 0.85);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 10px 14px 10px 38px;
  color: #fff;
  font-size: 0.88rem;
  outline: none;
  transition: all 0.2s;
}

.chat-search-wrap input:focus {
  border-color: var(--wa-primary);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.2);
}

.chat-conversations-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.empty-conversations-hint {
  text-align: center;
  padding: 40px 16px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.conversation-card,
.conversation-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.015);
}

.conversation-card:hover,
.conversation-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
}

.conversation-card.active,
.conversation-item.active {
  background: rgba(16, 185, 129, 0.14);
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.12);
}

.conv-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
  position: relative;
}

.conv-content,
.conv-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.conv-top-row,
.conv-header-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.conv-name {
  font-size: 0.92rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.conv-time {
  font-size: 0.72rem;
  color: var(--text-dim);
  flex-shrink: 0;
}

.conv-number {
  font-size: 0.74rem;
  font-family: var(--font-mono);
  color: #34d399;
}

.conv-bottom-row,
.conv-snippet-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.conv-last-msg,
.conv-snippet {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.conv-badge,
.conv-count-badge {
  background: var(--wa-primary);
  color: #052e16;
  font-weight: 800;
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 999px;
  flex-shrink: 0;
}

/* Sağ Panel: Canlı Sohbet Akışı */
.chat-main-pane {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: rgba(10, 14, 23, 0.85);
  position: relative;
  min-width: 0;
}

.chat-empty-selection {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px;
  text-align: center;
  color: var(--text-muted);
}

.chat-empty-icon {
  font-size: 3.5rem;
  margin-bottom: 12px;
  opacity: 0.5;
}

.chat-thread-container {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.chat-thread-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  background: rgba(18, 24, 38, 0.92);
  border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
}

.btn-back-conversations {
  display: none;
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
}

.btn-back-conversations:hover {
  background: rgba(255, 255, 255, 0.08);
}

.chat-header-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #059669, #10b981);
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.chat-header-info {
  flex: 1;
  min-width: 0;
}

.chat-header-info h4 {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}

.chat-header-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.chat-header-account-tag {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.7rem;
}

.chat-messages-stream {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: radial-gradient(circle at 50% 50%, rgba(16, 185, 129, 0.03) 0%, transparent 80%);
}

/* Canlı Yanıt Gönderme Çubuğu */
.chat-reply-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(18, 24, 38, 0.95);
  border-top: 1px solid var(--border-light);
  flex-shrink: 0;
}

.chat-account-select {
  max-width: 170px;
  padding: 9px 10px;
  font-size: 0.8rem;
}

.chat-reply-bar input {
  flex: 1;
  background: rgba(8, 12, 20, 0.9);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: #fff;
  font-size: 0.9rem;
}

/* Sohbet Balonları (Hem eski hem yeni sınıf isimlerini destekler) */
.chat-msg-row,
.chat-bubble-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 78%;
}

.chat-msg-row.incoming,
.chat-bubble-row.incoming-row {
  align-self: flex-start;
}

.chat-msg-row.outgoing,
.chat-bubble-row.outgoing-row {
  align-self: flex-end;
}

.chat-bubble {
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 0.9rem;
  line-height: 1.45;
  position: relative;
  word-break: break-word;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.chat-bubble.incoming-bubble,
.chat-bubble-incoming {
  background: rgba(26, 35, 54, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: #f3f4f6;
  border-bottom-left-radius: 4px;
}

.chat-bubble.outgoing-bubble,
.chat-bubble-outgoing {
  background: linear-gradient(135deg, #065f46, #047857);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #ecfdf5;
  border-bottom-right-radius: 4px;
}

.chat-bubble-alert {
  background: rgba(185, 28, 28, 0.28);
  border: 1px solid rgba(239, 68, 68, 0.45);
  color: #fecaca;
  border-radius: 12px;
}

.chat-bubble-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
  font-size: 0.74rem;
}

.chat-bubble-sender {
  font-weight: 700;
  color: #6ee7b7;
}

.chat-bubble-incoming .chat-bubble-sender {
  color: #93c5fd;
}

.chat-bubble-time {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.55);
  font-family: var(--font-mono);
}

.chat-bubble-text {
  white-space: pre-wrap;
  word-break: break-word;
}

.chat-bubble-audio {
  margin-top: 8px;
  min-width: 240px;
}

.vo-tag-highlight {
  color: #fbbf24;
  font-weight: 700;
}

/* Balon İçi Medya Gösterimi */
.chat-media-preview-box,
.chat-media-preview {
  margin-bottom: 8px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  max-width: 280px;
  position: relative;
}

.chat-media-preview-box img,
.chat-inline-img {
  width: 100%;
  max-height: 240px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: transform 0.2s;
  display: block;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.chat-media-preview-box img:hover,
.chat-inline-img:hover {
  transform: scale(1.02);
}

.chat-vo-tag,
.inline-vo-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  background: rgba(124, 58, 237, 0.85);
  color: #fff;
  border: 1px solid rgba(167, 139, 250, 0.5);
  padding: 3px 8px;
  border-radius: 999px;
  margin-top: 6px;
  font-weight: 700;
}

.chat-doc-box,
.chat-doc-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  margin-bottom: 6px;
}

.doc-icon {
  font-size: 1.6rem;
}

.doc-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.doc-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.doc-download-btn {
  color: #60a5fa;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.78rem;
}
.doc-download-btn:hover {
  text-decoration: underline;
}

/* ==========================================================
   RESİM + DOSYA MEDYA KASASI GALERİSİ
   ========================================================== */
.media-badge {
  background: #8b5cf6;
  color: #fff;
}

.badge-image {
  background: rgba(59, 130, 246, 0.18);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.35);
}

.btn-xs {
  padding: 5px 10px;
  font-size: 0.76rem;
  border-radius: 6px;
  text-decoration: none;
}

.media-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.media-stat-box {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 18px;
}

.media-stat-icon {
  font-size: 2rem;
  padding: 10px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
}

.media-stat-box h4 {
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
}

.media-stat-box span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.media-stat-box.highlight-vo {
  border-color: rgba(139, 92, 246, 0.4);
  background: rgba(139, 92, 246, 0.08);
}

.media-filters-bar {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.media-filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.media-filter-group label {
  font-size: 0.84rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.media-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 18px;
}

.media-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.25s ease;
  position: relative;
}

.media-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.media-card.vo-card,
.media-card.is-view-once {
  border-color: rgba(139, 92, 246, 0.45);
  box-shadow: 0 0 18px rgba(139, 92, 246, 0.16);
}

.media-thumb-wrap,
.media-card-preview,
.media-doc-preview-box {
  width: 100%;
  height: 185px;
  background: #090d16;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.media-thumb-wrap img,
.media-card-preview img,
.media-card-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.media-card-preview:hover img {
  transform: scale(1.06);
}

.media-preview-hover {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
}

.media-card-preview:hover .media-preview-hover {
  opacity: 1;
}

.vo-ribbon,
.media-vo-ribbon {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(124, 58, 237, 0.92);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  backdrop-filter: blur(8px);
  box-shadow: 0 0 12px rgba(124, 58, 237, 0.5);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  z-index: 2;
}

.doc-thumb-icon,
.doc-big-icon {
  font-size: 3.4rem;
  color: #3b82f6;
}

.doc-format-badge {
  margin-top: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(59, 130, 246, 0.18);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.media-card-body,
.media-card-info {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.media-doc-title {
  font-weight: 700;
  font-size: 0.88rem;
  color: #93c5fd;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.media-card-sender {
  font-weight: 600;
  font-size: 0.86rem;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.media-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  font-size: 0.74rem;
  color: var(--text-dim);
}

.media-card-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border-light);
}

/* Lightbox Modal */
.lightbox-content {
  background: rgba(14, 19, 31, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-xl);
  max-width: 900px;
  width: 95vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
}

.lightbox-close {
  position: absolute;
  top: 14px;
  right: 18px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all 0.2s;
}

.lightbox-close:hover {
  background: #ef4444;
}

.lightbox-image-wrap {
  flex: 1;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: #000;
  min-height: 300px;
}

.lightbox-image-wrap img {
  max-width: 100%;
  max-height: 65vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
}

.lightbox-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-top: 1px solid var(--border-light);
  background: rgba(18, 24, 38, 0.85);
}

.lightbox-meta h4 {
  color: #fff;
  font-size: 1rem;
}

.lightbox-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.lightbox-time {
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* Kural Resim Ayarları Kutusu */
.image-response-box {
  background: rgba(59, 130, 246, 0.06);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: var(--radius-md);
  padding: 16px;
}

.image-box-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.image-icon-tag {
  font-size: 1.5rem;
  padding: 8px;
  background: rgba(59, 130, 246, 0.15);
  border-radius: var(--radius-sm);
}

.image-upload-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 6px;
}

.image-preview-card {
  width: 140px;
  height: 140px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-light);
  background: #000;
  margin-top: 6px;
}

.image-preview-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ==========================================================
   CHAT HUB & MEDIA VAULT MOBİL OPTİMİZASYONU
   ========================================================== */
@media (max-width: 768px) {
  .chat-hub-container {
    height: 75vh;
  }

  .chat-sidebar {
    width: 100%;
  }

  .chat-sidebar.mobile-hidden {
    display: none;
  }

  .chat-main-pane {
    display: none;
  }

  .chat-main-pane.mobile-active,
  .chat-main-pane.mobile-show-thread {
    display: flex;
  }

  .btn-back-conversations {
    display: inline-flex;
  }

  .chat-msg-row,
  .chat-bubble-row {
    max-width: 90%;
  }

  .chat-reply-bar {
    flex-wrap: wrap;
  }

  .chat-account-select {
    max-width: 100%;
    width: 100%;
  }

  .media-stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .media-stat-box {
    padding: 12px;
  }

  .media-stat-box h4 {
    font-size: 1.15rem;
  }

  .media-gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
  }

  .media-thumb-wrap,
  .media-card-preview {
    height: 135px;
  }
}

/* ==========================================================
   YAPAY ZEKA HIZLI SORU-CEVAP SİHİRBAZI & NİYET KARTLARI
   ========================================================== */
.ai-quick-setup-panel {
  border: 1px solid rgba(16, 185, 129, 0.35);
  background: linear-gradient(145deg, rgba(16, 185, 129, 0.08) 0%, rgba(15, 23, 42, 0.85) 60%, rgba(139, 92, 246, 0.08) 100%);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

.ai-setup-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.ai-sparkle-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.6px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(139, 92, 246, 0.25));
  color: #6ee7b7;
  border: 1px solid rgba(52, 211, 153, 0.4);
}

.ai-intents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(225px, 1fr));
  gap: 12px;
}

.ai-intent-card {
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 13px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  transition: all 0.22s ease;
  position: relative;
  overflow: hidden;
}

.ai-intent-card:hover {
  border-color: var(--wa-primary);
  background: rgba(16, 185, 129, 0.11);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.15);
}

.ai-intent-card.is-configured {
  border-color: rgba(52, 211, 153, 0.45);
  background: rgba(16, 185, 129, 0.08);
}

.ai-intent-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ai-intent-icon {
  font-size: 1.45rem;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ai-intent-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.25;
}

.ai-intent-desc {
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ai-intent-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.74rem;
}

.ai-intent-kw-count {
  color: #93c5fd;
  font-weight: 600;
}

.ai-intent-action-pill {
  padding: 3px 9px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.72rem;
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

.ai-intent-card.is-configured .ai-intent-action-pill {
  background: rgba(59, 130, 246, 0.22);
  color: #93c5fd;
}

/* Kural Modalı 3 Adımlı Sihirbaz Stilleri */
.ai-wizard-step {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 14px;
}

.ai-step-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
}

.ai-step-badge {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 4px 9px;
  border-radius: 6px;
  white-space: nowrap;
  margin-top: 2px;
}

.ai-step-header h4 {
  font-size: 0.95rem;
  color: #fff;
  margin: 0;
}

.ai-step-header p {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 2px 0 0 0;
}

.modal-intent-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 10px;
}

.modal-intent-pill {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.18s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.modal-intent-pill:hover {
  border-color: var(--wa-primary);
  color: #fff;
  background: rgba(16, 185, 129, 0.12);
}

.modal-intent-pill.active {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.3), rgba(5, 150, 105, 0.35));
  border-color: #34d399;
  color: #fff;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.25);
}

.ai-suggested-replies {
  background: rgba(16, 185, 129, 0.06);
  border: 1px dashed rgba(52, 211, 153, 0.35);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 12px;
}

.ai-suggest-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #34d399;
  display: block;
  margin-bottom: 6px;
}

.ai-suggested-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ai-suggest-btn {
  text-align: left;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 7px 10px;
  color: #e2e8f0;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.18s ease;
  line-height: 1.35;
}

.ai-suggest-btn:hover {
  border-color: #34d399;
  background: rgba(16, 185, 129, 0.15);
  color: #fff;
}

/* Native <details> Gelişmiş Ayarlar Kutusu */
.ai-advanced-details {
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  margin-bottom: 14px;
  overflow: hidden;
}

.ai-advanced-details summary {
  padding: 11px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ai-advanced-details summary::-webkit-details-marker {
  display: none;
}

.ai-advanced-details summary::after {
  content: '▼';
  font-size: 0.72rem;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.ai-advanced-details[open] summary::after {
  transform: rotate(180deg);
}

.ai-advanced-body {
  padding: 14px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* ==========================================================
   ANLIK BANKA DEKONTU BİLDİRİM BANNERI (PDF / RESİM / DOSYA)
   ========================================================== */
.receipt-alert-banner {
  background: linear-gradient(135deg, rgba(6, 78, 59, 0.92), rgba(15, 23, 42, 0.96));
  border: 2px solid #10b981;
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-bottom: 18px;
  box-shadow: 0 12px 32px rgba(16, 185, 129, 0.28);
  animation: receiptPulseIn 0.35s ease-out;
}

@keyframes receiptPulseIn {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.receipt-alert-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.receipt-alert-icon {
  font-size: 2rem;
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(52, 211, 153, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.receipt-alert-content {
  flex: 1;
  min-width: 240px;
}

.receipt-alert-title {
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 3px;
}

.receipt-alert-meta {
  font-size: 0.84rem;
  color: #a7f3d0;
  line-height: 1.4;
}

.receipt-alert-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ==========================================================
   SİSTEM SESLERİ KÜTÜPHANESİ (ÜYELER VE KULLANICILAR İÇİN)
   ========================================================== */
.system-audio-panel {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(15, 23, 42, 0.88));
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 18px;
  container-type: inline-size;
}

.system-audio-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.system-audio-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.system-audio-badge-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(52, 211, 153, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.system-audio-title-wrap h3 {
  font-size: 1.02rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 3px 0;
}

.system-audio-title-wrap p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin: 0;
}

.system-audio-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.system-audio-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

@container (min-width: 640px) {
  .system-audio-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@container (min-width: 1020px) {
  .system-audio-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.sys-audio-card {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  transition: all 0.2s ease;
}

.sys-audio-card:hover {
  border-color: rgba(52, 211, 153, 0.5);
  transform: translateY(-2px);
}

.sys-audio-card.is-system {
  border-left: 3px solid #10b981;
}

.sys-audio-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.sys-audio-card-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
}

.sys-audio-tag {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  white-space: nowrap;
}

.sys-audio-player {
  width: 100%;
  height: 32px;
  border-radius: 6px;
}

.sys-audio-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

/* Modal içi Sistem Sesleri Hızlı Seçici */
.system-audio-quick-box {
  background: rgba(16, 185, 129, 0.06);
  border: 1px solid rgba(16, 185, 129, 0.28);
  border-radius: 10px;
  padding: 12px;
}

.system-audio-quick-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: #a7f3d0;
  margin-bottom: 10px;
}

.system-audio-quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
}

.sys-audio-quick-item {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  transition: all 0.18s ease;
}

.sys-audio-quick-item.selected {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.18);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.25);
}

.sys-audio-quick-name {
  font-size: 0.78rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.25;
  flex: 1;
}

.sys-audio-quick-btns {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Sistem Sesi Ekleme Modalı Mikrofon ve Dosya Kutusu */
.sys-audio-source-box {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 14px;
}

.sys-audio-file-hint {
  font-size: 0.78rem;
  color: #34d399;
  text-align: center;
  margin-top: 6px;
}

.sys-audio-or-divider {
  text-align: center;
  margin: 12px 0;
  position: relative;
}

.sys-audio-or-divider span {
  background: rgba(15, 23, 42, 0.9);
  padding: 2px 10px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  border-radius: 999px;
}

.sys-audio-recorder-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

/* ==========================================================
   ULTRA SADE VE KOLAY KULLANIMLI FİLTRE & CEVAP LİSTESİ
   (Size-Aware Container Query ile Karışıklık Sıfırlandı)
   ========================================================== */
.easy-rules-panel {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 18px 20px;
}

.easy-rules-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.easy-rules-header h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 4px 0;
}

.easy-rules-header p {
  font-size: 0.84rem;
  color: var(--text-secondary);
  margin: 0;
}

.easy-rules-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.easy-rules-list {
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.easy-rule-row {
  background: rgba(30, 41, 59, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.18s ease;
}

.easy-rule-row:hover {
  border-color: rgba(52, 211, 153, 0.45);
  background: rgba(30, 41, 59, 0.9);
}

.easy-rule-row.is-configured {
  border-left: 4px solid #10b981;
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.09), rgba(30, 41, 59, 0.75));
}

.easy-rule-row.is-disabled {
  opacity: 0.58;
  border-left: 4px solid #64748b;
}

@container (min-width: 720px) {
  .easy-rule-row {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.easy-rule-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 240px;
  flex: 1;
}

.easy-rule-icon {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}

.easy-rule-topic-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.easy-rule-topic-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.easy-rule-examples {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.easy-rule-examples b {
  color: #93c5fd;
  font-weight: 600;
}

.easy-rule-middle {
  flex: 1.2;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 9px;
  padding: 9px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.easy-rule-status-pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
}

.easy-rule-status-pill.ready {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

.easy-rule-status-pill.empty {
  background: rgba(245, 158, 11, 0.16);
  color: #fbbf24;
}

.easy-rule-reply-summary {
  font-size: 0.82rem;
  color: #e2e8f0;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.easy-rule-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* ==========================================================
   TÜRKİYE BANKALARI DEKONT ALGILAMA PANELİ VE ROZETLERİ
   ========================================================== */
.bank-receipt-detector-panel {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(15, 23, 42, 0.9));
  border: 1px solid rgba(16, 185, 129, 0.32);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 18px;
}

.bank-detector-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.bank-detector-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 260px;
}

.bank-detector-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(52, 211, 153, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.bank-detector-title-wrap h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 4px 0;
}

.bank-detector-title-wrap p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.4;
}

.bank-sim-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.turkish-banks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 8px;
}

.bank-ref-card {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9px;
  padding: 9px 11px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bank-ref-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.bank-ref-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
}

.bank-ref-code {
  font-size: 0.68rem;
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.15);
  padding: 1px 6px;
  border-radius: 4px;
}

.bank-ref-style {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.3;
}

.receipt-format-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.74rem;
  font-weight: 800;
  padding: 4px 9px;
  border-radius: 6px;
}

.receipt-format-pill.pdf {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.receipt-format-pill.image {
  background: rgba(16, 185, 129, 0.22);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.45);
}

.receipt-format-pill.file {
  background: rgba(59, 130, 246, 0.22);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.45);
}

/* ==========================================================
   KARŞI TARAF NE YAZARSA YAZSIN: İLK KARŞILAMA MESAJI KARTI
   ========================================================== */
.first-welcome-hero-panel {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(16, 185, 129, 0.1), rgba(15, 23, 42, 0.92));
  border: 2px solid rgba(251, 191, 36, 0.45);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 28px rgba(245, 158, 11, 0.12);
  container-type: inline-size;
}

.first-welcome-inner {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

@container (min-width: 760px) {
  .first-welcome-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.first-welcome-left {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  flex: 1.1;
}

.first-welcome-icon {
  width: 50px;
  height: 50px;
  border-radius: 13px;
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid rgba(251, 191, 36, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.65rem;
  flex-shrink: 0;
}

.first-welcome-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.22);
  color: #fde68a;
  border: 1px solid rgba(251, 191, 36, 0.4);
  margin-bottom: 4px;
}

.first-welcome-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 4px 0;
}

.first-welcome-desc {
  font-size: 0.82rem;
  color: #cbd5e1;
  margin: 0;
  line-height: 1.4;
}

.first-welcome-middle {
  flex: 1.2;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 11px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.first-welcome-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

/* ==========================================================
   SIRALAMA (1. SIRA, 2. SIRA), SIRALI CEVAP (1->2->3) & TEKRAR KORUMASI
   ========================================================== */
.seq-feature-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.16);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.seq-feature-pill.seq-pill-blue {
  background: rgba(59, 130, 246, 0.16);
  color: #93c5fd;
  border-color: rgba(59, 130, 246, 0.4);
}

/* Hızlı Canlı Test Çubuğu (#tab-rules içinde) */
.quick-inline-test-bar {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.85));
  border: 1px solid rgba(59, 130, 246, 0.35);
  border-radius: var(--radius-md);
  container-type: inline-size;
}

.quick-inline-test-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.quick-test-badge {
  font-size: 0.8rem;
  font-weight: 700;
  color: #93c5fd;
  white-space: nowrap;
}

.quick-test-input {
  flex: 1;
  min-width: 240px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 8px 12px;
  color: #fff;
  font-size: 0.86rem;
}

.quick-inline-test-output {
  margin-top: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(16, 185, 129, 0.09);
  border: 1px solid rgba(16, 185, 129, 0.35);
  font-size: 0.84rem;
  color: #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.quick-inline-test-output.blocked {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.45);
}

/* Kural Satırı Sıralama Butonları (⬆️ Öne Al / ⬇️ Alta Al) */
.easy-order-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  margin-right: 4px;
  flex-shrink: 0;
}

.order-rank-badge {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.4);
  white-space: nowrap;
}

.order-rank-badge.rank-first {
  background: rgba(16, 185, 129, 0.22);
  color: #6ee7b7;
  border-color: rgba(16, 185, 129, 0.5);
}

.order-move-btns {
  display: flex;
  gap: 3px;
}

.btn-order-move {
  background: rgba(30, 41, 59, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #cbd5e1;
  border-radius: 5px;
  padding: 2px 6px;
  font-size: 0.7rem;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1.1;
}

.btn-order-move:hover:not(:disabled) {
  background: rgba(59, 130, 246, 0.25);
  border-color: #60a5fa;
  color: #fff;
}

.btn-order-move:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* Kural Satırındaki Sıralı Cevap Önizleme Rozetleri */
.easy-seq-preview-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
}

.easy-seq-preview-item {
  font-size: 0.76rem;
  color: #94a3b8;
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.easy-seq-step-tag {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(59, 130, 246, 0.18);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.35);
  flex-shrink: 0;
}

/* Modal İçi Sıralı Cevaplar (2. Cevap & 3. Cevap) Kutusu */
.sequential-replies-box {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(59, 130, 246, 0.35);
  border-radius: 12px;
  padding: 14px 16px;
  container-type: inline-size;
}

.seq-step-pill {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.22);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.45);
}

.seq-anti-repeat-toggle {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.28);
  border-radius: 8px;
  padding: 10px 12px;
}

.seq-steps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@container (min-width: 560px) {
  .seq-steps-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.seq-step-card {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.seq-step-card-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: #e2e8f0;
}

.seq-num-badge {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 5px;
  background: rgba(59, 130, 246, 0.25);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.45);
  white-space: nowrap;
}

.seq-num-badge.seq-num-3 {
  background: rgba(168, 85, 247, 0.25);
  color: #d8b4fe;
  border-color: rgba(168, 85, 247, 0.45);
}

.seq-audio-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Modal İçi Birleşik Kelime & Kelime Sıralaması Kutucukları */
.ordered-keyword-chips-box {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 150px;
  overflow-y: auto;
  padding: 8px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
}

.kw-order-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.74rem;
  background: rgba(30, 41, 59, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
}

.kw-order-chip.is-compound {
  background: rgba(16, 185, 129, 0.14);
  border-color: rgba(16, 185, 129, 0.4);
  color: #a7f3d0;
}

.kw-rank-num {
  font-weight: 800;
  font-size: 0.68rem;
  color: #93c5fd;
}

.kw-compound-tag {
  font-size: 0.64rem;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 4px;
  background: rgba(16, 185, 129, 0.25);
  color: #6ee7b7;
}

.btn-kw-promote {
  background: rgba(59, 130, 246, 0.22);
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: #93c5fd;
  border-radius: 4px;
  padding: 0 5px;
  font-size: 0.66rem;
  cursor: pointer;
}

.btn-kw-promote:hover {
  background: #3b82f6;
  color: #fff;
}

