/* ═══════════════════════════════════════════════════════
   WaBusinessPanel - Ana CSS
   WhatsApp teması ile modern panel tasarımı
═══════════════════════════════════════════════════════ */

:root {
  --wa-green:      #25D366;
  --wa-green-dark: #128C7E;
  --wa-green-mid:  #1ead56;
  --wa-teal:       #00a884;
  --wa-light:      #dcf8c6;
  --sidebar-bg:    #111b21;
  --sidebar-text:  #aebac1;
  --sidebar-hover: #202c33;
  --sidebar-active:#2a3942;
  --topbar-bg:     #ffffff;
  --topbar-border: #e9ecef;
  --body-bg:       #f0f2f5;
  --card-bg:       #ffffff;
  --border-color:  #dee2e6;
  --text-primary:  #1d2129;
  --text-muted:    #8696a0;
  --sidebar-width: 260px;
  --topbar-h:      60px;
  --radius:        12px;
  --radius-sm:     8px;
  --shadow:        0 2px 12px rgba(0,0,0,.08);
  --shadow-md:     0 4px 24px rgba(0,0,0,.12);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body.wabp-body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  background: var(--body-bg);
  color: var(--text-primary);
  overflow-x: hidden;
}

/* ─── SIDEBAR ─────────────────────────────────────────── */
.wabp-sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  z-index: 1040;
  overflow-y: auto;
  overflow-x: hidden;
  transition: transform .3s ease;
  scrollbar-width: thin;
  scrollbar-color: #2a3942 transparent;
}
.wabp-sidebar::-webkit-scrollbar { width: 4px; }
.wabp-sidebar::-webkit-scrollbar-thumb { background: #2a3942; border-radius: 4px; }

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 16px;
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff;
}
.brand-text { font-size: 15px; font-weight: 400; color: #e9edef; }
.brand-text strong { color: var(--wa-green); font-weight: 700; }

.sidebar-account { padding: 12px 12px 4px; }
.account-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--sidebar-hover);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: #e9edef;
  font-size: 13px;
  transition: background .2s;
}
.account-pill:hover { background: var(--sidebar-active); color: #fff; }
.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.status-success .status-dot { background: var(--wa-green); box-shadow: 0 0 6px var(--wa-green); }
.status-warning .status-dot { background: #ffc107; box-shadow: 0 0 6px #ffc107; }
.status-danger .status-dot { background: #dc3545; }
.account-phone { font-size: 13px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

.sidebar-nav { flex: 1; padding: 8px 12px 12px; }
.nav-section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text-muted);
  padding: 16px 4px 6px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--sidebar-text);
  font-size: 14px;
  font-weight: 400;
  transition: background .15s, color .15s;
  position: relative;
  cursor: pointer;
  margin-bottom: 2px;
}
.nav-item:hover { background: var(--sidebar-hover); color: #e9edef; }
.nav-item.active { background: var(--wa-green-dark); color: #fff !important; font-weight: 500; }
.nav-item i { font-size: 16px; flex-shrink: 0; width: 20px; text-align: center; }
.nav-item .badge-count {
  margin-left: auto;
  background: #dc3545;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}
.nav-item.text-danger { color: #f85149 !important; }
.nav-item.text-danger:hover { background: rgba(248,81,73,.1); }

.sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid rgba(255,255,255,.05);
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
}
.sidebar-toggle { background: none; border: none; color: #8696a0; font-size: 20px; cursor: pointer; padding: 4px; }
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 1039; }

/* ─── MAIN ────────────────────────────────────────────── */
.wabp-main {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin-left .3s;
}

/* ─── TOPBAR ──────────────────────────────────────────── */
.wabp-topbar {
  height: var(--topbar-h);
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--topbar-border);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 999;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.topbar-menu-btn {
  background: none;
  border: none;
  font-size: 22px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  display: none;
  border-radius: 6px;
}
.topbar-menu-btn:hover { background: var(--body-bg); }
.topbar-title { font-size: 16px; font-weight: 600; color: var(--text-primary); flex: 1; }
.topbar-right { display: flex; align-items: center; gap: 8px; }
.topbar-btn {
  position: relative;
  background: none;
  border: none;
  width: 36px; height: 36px;
  border-radius: 8px;
  font-size: 18px;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}
.topbar-btn:hover { background: var(--body-bg); }
.notif-badge {
  position: absolute;
  top: 4px; right: 4px;
  background: #dc3545;
  color: #fff;
  font-size: 9px;
  width: 14px; height: 14px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
}
.topbar-user-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--text-primary);
  transition: background .15s;
}
.topbar-user-btn:hover { background: var(--body-bg); }
.user-avatar-sm {
  width: 32px; height: 32px;
  background: var(--wa-green);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

/* ─── CONTENT ─────────────────────────────────────────── */
.wabp-content { flex: 1; padding: 24px 24px 40px; }

/* ─── KARTLAR ─────────────────────────────────────────── */
.wabp-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.wabp-card.no-pad { padding: 0; }
.wabp-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  font-weight: 600;
  font-size: 15px;
}
.wabp-card-body { padding: 20px; }

/* ─── STAT KARTLAR ────────────────────────────────────── */
.stat-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  padding: 20px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: transform .2s, box-shadow .2s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat-icon {
  width: 52px; height: 52px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.stat-icon.green { background: rgba(37,211,102,.15); color: var(--wa-green); }
.stat-icon.blue  { background: rgba(0,120,255,.12); color: #0078ff; }
.stat-icon.purple{ background: rgba(120,0,255,.1); color: #7800ff; }
.stat-icon.orange{ background: rgba(255,140,0,.12); color: #ff8c00; }
.stat-icon.red   { background: rgba(220,53,69,.12); color: #dc3545; }
.stat-info .stat-value { font-size: 26px; font-weight: 700; line-height: 1.1; }
.stat-info .stat-label { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.stat-info .stat-change { font-size: 12px; margin-top: 4px; }
.stat-change.up   { color: var(--wa-green); }
.stat-change.down { color: #dc3545; }

/* ─── CHAT EKRANI ─────────────────────────────────────── */
.chat-layout {
  display: flex;
  height: calc(100vh - var(--topbar-h) - 48px);
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.chat-sidebar {
  width: 340px;
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  background: #fff;
  flex-shrink: 0;
}
.chat-sidebar-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  background: #f0f2f5;
}
.chat-search { position: relative; }
.chat-search input {
  width: 100%;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 8px 12px 8px 36px;
  font-size: 14px;
  outline: none;
}
.chat-search input:focus { border-color: var(--wa-green); }
.chat-search i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); }
.chat-list { flex: 1; overflow-y: auto; }
.chat-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid #f5f5f5;
  transition: background .15s;
  text-decoration: none;
  color: inherit;
}
.chat-item:hover, .chat-item.active { background: #f0f2f5; }
.chat-item.active { background: #f0f2f5; border-left: 3px solid var(--wa-green); }
.chat-avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--wa-green);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
}
.chat-avatar img { width: 100%; height: 100%; object-fit: cover; }
.chat-info { flex: 1; min-width: 0; }
.chat-name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-preview { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.chat-time { font-size: 11px; color: var(--text-muted); }
.chat-unread { background: var(--wa-green); color: #fff; font-size: 11px; font-weight: 700; min-width: 20px; height: 20px; border-radius: 10px; display: flex; align-items: center; justify-content: center; padding: 0 5px; }

/* Chat Sağ Panel */
.chat-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #efeae2;
  position: relative;
}
.chat-main-header {
  background: #f0f2f5;
  border-bottom: 1px solid var(--border-color);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.chat-main-info { flex: 1; }
.chat-main-info h6 { margin: 0; font-size: 15px; font-weight: 600; }
.chat-main-info small { color: var(--text-muted); font-size: 12px; }
.chat-main-actions { display: flex; gap: 12px; }
.chat-main-actions button { background: none; border: none; font-size: 22px; color: var(--text-muted); cursor: pointer; padding: 6px 8px; border-radius: 8px; transition: background .15s; }
.chat-main-actions button:hover { background: rgba(0,0,0,.06); }

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23d0d0d0' fill-opacity='0.2'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.msg-wrap { display: flex; margin-bottom: 2px; }
.msg-wrap.outgoing { justify-content: flex-end; }
.msg-wrap.incoming { justify-content: flex-start; }
.msg-bubble {
  max-width: 65%;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
  position: relative;
  word-wrap: break-word;
}
.msg-wrap.incoming .msg-bubble { background: #fff; border-radius: 0 12px 12px 12px; box-shadow: 0 1px 2px rgba(0,0,0,.1); }
.msg-wrap.outgoing .msg-bubble { background: #efefef; border-radius: 12px 0 12px 12px; box-shadow: 0 1px 2px rgba(0,0,0,.1); }

/* ─── SOHBET DUVAR KAĞIDI ───────────────────────────────────────────────── */
/* wp-1: Klasik WA (default) */
.chat-messages.wp-1 { background-color: #efeae2; background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23d0d0d0' fill-opacity='0.2'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"); }
/* wp-2: Minimal Beyaz */
.chat-messages.wp-2 { background: #ffffff; background-image: none; }
/* wp-3: Karanlık Gece */
.chat-messages.wp-3 { background: #0d1418; background-image: none; }
.chat-messages.wp-3 .msg-date-sep span { background: rgba(32,44,51,.92); color: #aebac1; }
.chat-messages.wp-3 .msg-wrap.incoming .msg-bubble { background: #1f2c34; color: #e9edef; }
.msg-time { font-size: 11px; color: var(--text-muted); text-align: right; margin-top: 2px; display: flex; align-items: center; justify-content: flex-end; gap: 3px; }
.msg-bubble audio { min-width: 260px; max-width: 100%; display: block; border-radius: 8px; }
.msg-status i { font-size: 14px; color: #34b7f1; }
.msg-date-sep { text-align: center; margin: 12px 0; }
.msg-date-sep span { background: rgba(225,221,214,.92); padding: 4px 12px; border-radius: 8px; font-size: 12px; color: #54656f; }

.chat-footer {
  background: #f0f2f5;
  border-top: 1px solid var(--border-color);
  padding: 10px 16px;
  display: flex;
  align-items: flex-end;
  gap: 10px;
}
.chat-footer-actions { display: flex; gap: 6px; }
.chat-footer-actions button { background: none; border: none; font-size: 20px; color: var(--text-muted); cursor: pointer; padding: 6px; border-radius: 50%; transition: background .15s; }
.chat-footer-actions button:hover { background: rgba(0,0,0,.06); }
.chat-input-wrap { flex: 1; position: relative; }
.chat-input {
  width: 100%;
  border: none;
  border-radius: 24px;
  background: #fff;
  padding: 10px 16px;
  font-size: 14px;
  resize: none;
  max-height: 120px;
  outline: none;
  font-family: inherit;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.chat-send-btn {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--wa-green);
  border: none;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
  flex-shrink: 0;
}
.chat-send-btn:hover { background: var(--wa-green-dark); }
.chat-empty {
  flex: 1; display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 16px; color: var(--text-muted); background: #f0f2f5;
}
.chat-empty i { font-size: 64px; opacity: .4; }
.chat-empty p { font-size: 16px; }
/* ─── MÜŞTERİ KATEGORİ & NOT KOMPONENTLERİ ──────────── */
.cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  border: 1.5px solid var(--pill-color, #6c757d);
  background: transparent;
  color: var(--pill-color, #6c757d);
  transition: all .15s;
  white-space: nowrap;
}
.cat-pill:hover {
  background: var(--pill-color, #6c757d);
  color: #fff;
}
.cat-pill.active {
  background: var(--pill-color, #6c757d);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.cat-pill-add {
  border-style: dashed;
  --pill-color: #adb5bd;
  padding: 4px 8px;
}
.cat-pill-add:hover {
  --pill-color: var(--wa-green);
  border-style: solid;
}
.cat-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 11px;
  background: color-mix(in srgb, var(--badge-color, #6c757d) 12%, transparent);
  color: var(--badge-color, #6c757d);
  white-space: nowrap;
}
.cat-badge strong { font-weight: 600; }

.note-card {
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 8px;
  transition: box-shadow .15s;
}
.note-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.note-card.note-pinned {
  border-left: 3px solid #ffc107;
  background: #fffdf0;
}
.note-content {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-primary);
  word-break: break-word;
}
.note-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
}
.note-date { font-size: 11px; color: var(--text-muted); }
.note-actions { display: flex; gap: 2px; }
.note-actions button {
  background: none; border: none; padding: 2px 6px;
  font-size: 14px; color: var(--text-muted); cursor: pointer;
  border-radius: 4px; transition: .15s;
}
.note-actions button:hover { background: #f0f0f0; color: var(--text-primary); }

.contact-note-card {
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  transition: box-shadow .15s, border-color .15s;
}
.contact-note-card:hover {
  border-color: var(--wa-green);
  box-shadow: 0 4px 12px rgba(37,211,102,.08);
}
.last-note-preview {
  font-size: 12px;
  color: #555;
  background: #f8f9fa;
  padding: 6px 10px;
  border-radius: 6px;
  border-left: 3px solid var(--wa-green);
}
.note-card-mini {
  font-size: 12px;
  padding: 6px 8px;
  margin-bottom: 4px;
  background: #f8f9fa;
  border-radius: 6px;
  position: relative;
}
.note-card-mini .note-text { line-height: 1.4; }
.note-card-mini .note-date {
  display: block;
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
}
/* ─── QR MODAL ────────────────────────────────────────── */
.qr-container {
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  padding: 32px;
}
.qr-box {
  width: 240px; height: 240px;
  border: 3px solid var(--wa-green);
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  background: #fff;
}
.qr-box img { width: 100%; height: 100%; }
.qr-steps { font-size: 13px; color: var(--text-muted); text-align: center; max-width: 280px; line-height: 1.8; }

/* ─── FORM ELEMENLERİ ─────────────────────────────────── */
.form-control:focus, .form-select:focus {
  border-color: var(--wa-green);
  box-shadow: 0 0 0 3px rgba(37,211,102,.15);
}
.btn-primary { background: var(--wa-green); border-color: var(--wa-green); }
.btn-primary:hover { background: var(--wa-green-dark); border-color: var(--wa-green-dark); }
.btn-wa {
  background: var(--wa-green);
  color: #fff;
  border: none;
  padding: 10px 15px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-wa:hover { background: var(--wa-green-dark); color: #fff; }
.btn-wa-outline {
  background: transparent;
  color: var(--wa-green);
  border: 1px solid var(--wa-green);
  padding: 8px 18px;
  border-radius: 50px;
  font-size: 14px;
  cursor: pointer;
  transition: .15s;
  display: inline-flex; align-items: center; gap: 6px;
}
.btn-wa-outline:hover { background: var(--wa-green); color: #fff; }

/* Modal ve sayfa içi input+buton aralarında boşluk */
.input-group { gap: 6px; }
.input-group .form-control,
.input-group .form-select,
.input-group .btn { border-radius: 8px !important; }

/* ─── TABLO ───────────────────────────────────────────── */
.wabp-table { width: 100%; border-collapse: collapse; }
.wabp-table th { background: #f8f9fa; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); padding: 10px 16px; border-bottom: 1px solid var(--border-color); white-space: nowrap; }
.wabp-table td { padding: 12px 16px; border-bottom: 1px solid #f5f5f5; font-size: 14px; vertical-align: middle; }
.wabp-table tbody tr:hover { background: #fafafa; }
.wabp-table tbody tr:last-child td { border-bottom: none; }

/* ─── BADGE ───────────────────────────────────────────── */
.badge-status { padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.badge-connected  { background: rgba(37,211,102,.15); color: #128C7E; }
.badge-disconnected { background: rgba(220,53,69,.1); color: #dc3545; }
.badge-pending    { background: rgba(255,193,7,.15); color: #856404; }
.badge-running    { background: rgba(0,120,255,.1); color: #0078ff; }
.badge-completed  { background: rgba(37,211,102,.15); color: #128C7E; }
.badge-failed     { background: rgba(220,53,69,.1); color: #dc3545; }
.badge-potential  { background: rgba(255,193,7,.12); color: #f57f17; }
.badge-customer   { background: rgba(76,175,80,.1); color: #388e3c; }
.badge-vip        { background: rgba(156,39,176,.1); color: #7b1fa2; }
.badge-inactive   { background: rgba(158,158,158,.12); color: #616161; }
.badge-blocked    { background: rgba(244,67,54,.1); color: #d32f2f; }

/* ─── GİRİŞ SAYFASI ──────────────────────────────────── */
.login-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #0f1a20 0%, #1a2c38 50%, #0f3526 100%);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.login-card {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 25px 60px rgba(0,0,0,.3);
  overflow: hidden;
  width: 100%;
  max-width: 420px;
}
.login-header {
  background: linear-gradient(135deg, var(--wa-green-dark), var(--wa-teal));
  padding: 36px 32px 28px;
  text-align: center;
  color: #fff;
}
.login-header img { width: 56px; margin-bottom: 12px; }
.login-header h1 { font-size: 22px; font-weight: 700; margin: 0; }
.login-header p { font-size: 13px; opacity: .85; margin-top: 4px; }
.login-body { padding: 32px; }
.login-body .form-label { font-weight: 500; font-size: 13px; }

/* ─── KURULUM SAYFASI ─────────────────────────────────── */
.install-page {
  min-height: 100vh;
  background: var(--body-bg);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.install-card {
  background: #fff;
  border-radius: 20px;
  box-shadow: var(--shadow-md);
  width: 100%;
  max-width: 600px;
  overflow: hidden;
}
.install-header {
  background: linear-gradient(135deg, var(--wa-green-dark), var(--wa-teal));
  padding: 32px;
  text-align: center;
  color: #fff;
}

/* ─── BOŞ DURUM ───────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state i { font-size: 56px; opacity: .3; margin-bottom: 16px; display: block; }
.empty-state h5 { font-size: 16px; font-weight: 600; color: var(--text-primary); margin-bottom: 8px; }
.empty-state p { font-size: 14px; max-width: 300px; margin: 0 auto 20px; }

/* ─── PROGRESS BAR ────────────────────────────────────── */
.progress-sm { height: 6px; border-radius: 3px; }
.progress-bar { background: var(--wa-green); }

/* ─── TOASTLARo ───────────────────────────────────────── */
#toastContainer { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; }
.wabp-toast {
  background: #1d2129;
  color: #fff;
  padding: 12px 18px;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,.25);
  font-size: 14px;
  max-width: 300px;
  animation: slideInUp .3s ease;
  display: flex; align-items: center; gap: 10px;
  border-left: 4px solid var(--wa-green);
}
.wabp-toast.error { border-left-color: #dc3545; }
.wabp-toast.warning { border-left-color: #ffc107; }
@keyframes slideInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* ─── BİLDİRİM DROPDOWN ──────────────────────────────── */
.notif-dropdown { width: 340px; padding: 0; border-radius: var(--radius); box-shadow: var(--shadow-md); }
.notif-dropdown .dropdown-header { background: #f8f9fa; padding: 12px 16px; font-weight: 600; font-size: 14px; border-bottom: 1px solid var(--border-color); }
.notif-item { display: block; padding: 10px 16px; border-bottom: 1px solid #f5f5f5; color: #1d2129; text-decoration: none; cursor: pointer; }
.notif-item.unread { background: rgba(37,211,102,.05); }
.notif-item:hover { background: #f8fffe; color: #1d2129; }
.notif-item:active, .notif-item:focus { background: #f0fdf8; color: #1d2129; outline: none; }
.notif-link { display: block; padding: 10px 16px; color: #1d2129; text-decoration: none; }
.notif-link:hover, .notif-link:active, .notif-link:focus { color: #1d2129; background: transparent; outline: none; }
.notif-title { font-size: 13px; font-weight: 500; }
.notif-time { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.notif-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--wa-green); flex-shrink: 0; }
.notif-item:not(.unread) .notif-dot { background: transparent; }
.notif-account { font-size: 10px; color: var(--wa-green); font-weight: 500; margin-top: 1px; }
.notif-dropdown .dropdown-footer { text-align: center; padding: 10px; }
.notif-dropdown .dropdown-footer a { font-size: 13px; color: var(--wa-green); text-decoration: none; }

/* ─── RESPONSİF ───────────────────────────────────────── */
@media (max-width: 991px) {
  .wabp-sidebar {
    transform: translateX(-100%);
    box-shadow: var(--shadow-md);
  }
  .wabp-sidebar.open { transform: translateX(0); }
  .sidebar-overlay.show { display: block; }
  .wabp-main { margin-left: 0; }
  .topbar-menu-btn { display: flex; }
  .wabp-content { padding: 16px; }
  .chat-sidebar { width: 280px; }
}
@media (max-width: 767px) {
  .chat-layout { flex-direction: column; height: calc(100vh - var(--topbar-h, 60px)); }
  .chat-sidebar { width: 100%; height: 260px; min-height: 200px; border-right: none; border-bottom: 1px solid var(--border-color); }
  .chat-main { flex: 1; min-height: 0; }
  .stat-card { padding: 14px; }
  /* Mobil: mesaj balonu genişlik + görsel taşma düzeltmesi */
  .msg-bubble { max-width: 85%; }
  .msg-bubble img, .msg-bubble video { max-width: 100% !important; height: auto; }
  /* Bildirim dropdown mobil taşma */
  .notif-dropdown { width: auto; max-width: calc(100vw - 24px); min-width: 280px; }
}

/* ─── GLOBAL BUTON OVAL KÖŞELER ─────────────────────────── */
.btn { border-radius: 50px !important; }
.btn-primary, .btn-secondary, .btn-success, .btn-danger, .btn-warning, .btn-info, .btn-light, .btn-dark, .btn-outline-primary, .btn-outline-secondary, .btn-outline-success, .btn-outline-danger, .btn-outline-warning { border-radius: 50px !important; }
