/* ============================================================
   WaBot — Main Stylesheet
   ============================================================ */

:root {
  --wa: #25D366;
  --wa-dark: #128C7E;
  --wa-light: #e8f8f0;
  --sidebar-width: 260px;
  --topbar-height: 60px;
  --border: #e5e7eb;
  --bg: #f4f6fb;
  --card-shadow: 0 1px 4px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.04);
  --radius: 12px;
}

* { box-sizing: border-box; }
body { font-family: 'Inter', sans-serif; background: var(--bg); color: #1a1a2e; margin: 0; }
a { text-decoration: none; color: inherit; }

/* ============================================================
   AUTH PAGES
   ============================================================ */
.auth-body { background: linear-gradient(135deg, #0d1b2a 0%, #1b2838 50%, #0d2137 100%); min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.auth-container { display: flex; width: 100%; max-width: 1100px; min-height: 600px; border-radius: 20px; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.4); }
.auth-container.centered { justify-content: center; max-width: 460px; min-height: auto; }
.auth-card { background: #fff; padding: 48px 44px; flex: 0 0 420px; display: flex; flex-direction: column; justify-content: center; }
.auth-brand { text-align: center; margin-bottom: 32px; }
.auth-logo { width: 64px; height: 64px; background: linear-gradient(135deg, #25D366, #128C7E); border-radius: 16px; display: inline-flex; align-items: center; justify-content: center; font-size: 28px; color: #fff; margin-bottom: 12px; }
.auth-brand h1 { font-size: 26px; font-weight: 700; color: #1a1a2e; margin: 0 0 6px; }
.auth-brand p { color: #6b7280; margin: 0; }
.auth-footer { text-align: center; margin-top: 24px; color: #6b7280; font-size: 14px; }
.auth-footer a { color: var(--wa-dark); font-weight: 600; }
.auth-visual { flex: 1; background: linear-gradient(135deg, #128C7E 0%, #075E54 100%); padding: 48px 44px; display: flex; align-items: center; color: #fff; }
.auth-visual-content h2 { font-size: 28px; font-weight: 700; margin-bottom: 12px; }
.auth-visual-content p { opacity: .85; margin-bottom: 28px; }
.auth-features { list-style: none; padding: 0; margin: 0 0 28px; }
.auth-features li { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 15px; }
.auth-features li i { color: rgba(255,255,255,.9); font-size: 16px; }
.auth-stats { display: flex; gap: 24px; }
.auth-stats div { text-align: center; }
.auth-stats strong { display: block; font-size: 24px; font-weight: 700; }
.auth-stats span { font-size: 12px; opacity: .75; }
.plan-cards-mini { display: flex; gap: 8px; flex-wrap: wrap; }
.plan-card-mini { background: rgba(255,255,255,.15); border-radius: 10px; padding: 10px 14px; display: flex; flex-direction: column; }
.plan-card-mini.featured { background: rgba(255,255,255,.3); }
.plan-card-mini strong { font-size: 13px; }
.plan-card-mini span { font-size: 12px; opacity: .8; }

/* ============================================================
   APP LAYOUT
   ============================================================ */
.app-body { background: var(--bg); }
.app-wrapper { display: flex; min-height: 100vh; }
.main-content { flex: 1; display: flex; flex-direction: column; margin-left: var(--sidebar-width); transition: margin .25s; overflow: hidden; }
.content-area { flex: 1; padding: 24px; overflow-y: auto; }

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar { position: fixed; top: 0; left: 0; width: var(--sidebar-width); height: 100vh; background: #0f172a; display: flex; flex-direction: column; z-index: 1000; transition: transform .25s; overflow: hidden; }
.sidebar-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 20px 16px; border-bottom: 1px solid rgba(255,255,255,.06); flex-shrink: 0; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-icon { width: 36px; height: 36px; background: linear-gradient(135deg, var(--wa), var(--wa-dark)); border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; color: #fff; flex-shrink: 0; }
.brand-name { font-size: 20px; font-weight: 700; color: #fff; letter-spacing: -.3px; }
.sidebar-toggle { color: rgba(255,255,255,.6); }
.sidebar-body { flex: 1; overflow-y: auto; padding: 16px 12px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.1) transparent; }
.nav-section-label { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; color: rgba(255,255,255,.35); padding: 0 8px; margin-bottom: 4px; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; color: rgba(255,255,255,.65); font-size: 14px; font-weight: 500; transition: all .15s; margin-bottom: 1px; }
.nav-item:hover { background: rgba(255,255,255,.07); color: rgba(255,255,255,.9); }
.nav-item.active { background: linear-gradient(135deg, rgba(37,211,102,.2), rgba(18,140,126,.15)); color: var(--wa); border: 1px solid rgba(37,211,102,.15); }
.nav-item i { font-size: 16px; width: 20px; text-align: center; }
.sidebar-footer { padding: 14px 14px 16px; border-top: 1px solid rgba(255,255,255,.06); flex-shrink: 0; }
.plan-badge { display: flex; justify-content: space-between; align-items: center; background: rgba(255,255,255,.06); border-radius: 8px; padding: 7px 12px; margin-bottom: 10px; }
.plan-name { font-size: 12px; font-weight: 600; color: rgba(255,255,255,.7); }
.upgrade-link { font-size: 11px; color: var(--wa); font-weight: 600; }
.user-info { display: flex; align-items: center; gap: 10px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0; }
.user-name { font-size: 13px; font-weight: 600; color: rgba(255,255,255,.85); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-email { font-size: 11px; color: rgba(255,255,255,.4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ============================================================
   ADMIN NAV ITEMS (platform super admin only)
   ============================================================ */
.nav-item-admin { color: rgba(252,165,165,.75) !important; }
.nav-item-admin:hover { background: rgba(239,68,68,.12) !important; color: #fca5a5 !important; }
.nav-item-admin.active { background: rgba(239,68,68,.18) !important; color: #f87171 !important; border-color: rgba(239,68,68,.25) !important; }
.plan-badge-admin { background: rgba(239,68,68,.1) !important; border: 1px solid rgba(239,68,68,.2); }

/* ============================================================
   TOPBAR
   ============================================================ */
.topbar { height: var(--topbar-height); background: #fff; border-bottom: 1px solid var(--border); display: flex; align-items: center; padding: 0 20px; gap: 12px; position: sticky; top: 0; z-index: 100; flex-shrink: 0; }
.topbar-toggle { color: #6b7280; padding: 0; border: none; background: none; }
.topbar-title { font-size: 15px; font-weight: 600; color: #374151; }
/* Admin topbar stripe */
.topbar-admin { background: #fff9f9; border-bottom-color: #fecaca; }
.topbar-admin .topbar-title::before { content: ''; display: inline-block; width: 8px; height: 8px; background: #ef4444; border-radius: 50%; margin-right: 8px; vertical-align: middle; animation: pulse-dot 2s infinite; }
@keyframes pulse-dot { 0%,100%{opacity:1} 50%{opacity:.4} }

/* ============================================================
   PLAN USAGE BAR (dashboard)
   ============================================================ */
.plan-usage-bar { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 20px; box-shadow: var(--card-shadow); }
.plan-usage-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.plan-usage-title { font-size: 13px; font-weight: 700; color: #374151; }
.plan-usage-expiry { font-size: 12px; }
.plan-usage-meters { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
@media (max-width:767px) { .plan-usage-meters { grid-template-columns: 1fr; gap: 12px; } }
.usage-meter { display: flex; flex-direction: column; gap: 6px; }
.usage-meter-labels { display: flex; justify-content: space-between; font-size: 12px; font-weight: 600; color: #6b7280; }
.usage-bar-track { height: 7px; background: #f3f4f6; border-radius: 99px; overflow: hidden; }
.usage-bar-fill { height: 100%; border-radius: 99px; transition: width .4s ease; }
.usage-warning { font-size: 11px; color: #ef4444; margin-top: 2px; }
.usage-warning a { color: #ef4444; font-weight: 700; text-decoration: underline; }

/* ============================================================
   PAGE HEADER
   ============================================================ */
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.page-title { font-size: 22px; font-weight: 700; margin: 0; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ============================================================
   CARDS
   ============================================================ */
.card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--card-shadow); }
.card-dash { border-radius: 14px; }
.card-header { background: transparent; border-bottom: 1px solid var(--border); padding: 14px 18px; font-weight: 600; }
.card-body { padding: 18px; }
.card-footer { background: transparent; border-top: 1px solid var(--border); padding: 12px 18px; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-wa { background: linear-gradient(135deg, #25D366, #20b85a); color: #fff; border: none; font-weight: 600; }
.btn-wa:hover { background: linear-gradient(135deg, #20b85a, #128C7E); color: #fff; }
.btn-xs { padding: 2px 8px; font-size: 12px; }
.btn-outline-secondary { border-color: var(--border); }

/* ============================================================
   STATS
   ============================================================ */
.stat-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; display: flex; align-items: flex-start; gap: 14px; box-shadow: var(--card-shadow); }
.stat-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.stat-body { flex: 1; min-width: 0; }
.stat-value { font-size: 26px; font-weight: 700; line-height: 1.1; }
.stat-label { font-size: 12px; color: #6b7280; font-weight: 500; margin-top: 2px; }
.stat-trend { font-size: 12px; margin-top: 6px; color: #6b7280; }
.stat-trend.up { color: var(--wa-dark); }
.stat-trend a { color: var(--wa-dark); }
.mini-stat { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; display: flex; align-items: center; gap: 12px; box-shadow: var(--card-shadow); }
.mini-stat i { font-size: 22px; }
.mini-stat strong { display: block; font-size: 20px; font-weight: 700; line-height: 1; }
.mini-stat span { font-size: 12px; color: #6b7280; }
.text-wa { color: var(--wa-dark) !important; }
.text-purple { color: #8b5cf6; }
.bg-wa-light { background: var(--wa-light) !important; }
.bg-primary-light { background: #eff6ff; }
.bg-warning-light { background: #fffbeb; }
.bg-danger-light { background: #fef2f2; }
.bg-success-light { background: #f0fdf4; }
.bg-info-light { background: #eff6ff; }

/* ============================================================
   LISTS IN CARDS
   ============================================================ */
.account-list, .message-list, .campaign-list { list-style: none; margin: 0; padding: 0; }
.account-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.account-item:last-child { border-bottom: none; }
.account-icon { width: 38px; height: 38px; background: var(--wa-light); border-radius: 10px; display: flex; align-items: center; justify-content: center; color: var(--wa-dark); font-size: 18px; flex-shrink: 0; }
.account-info { flex: 1; min-width: 0; }
.account-info strong { display: block; font-size: 14px; font-weight: 600; }
.account-info small { color: #6b7280; font-size: 12px; }
.message-item { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.message-item:last-child { border-bottom: none; }
.msg-avatar { width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; }
.msg-body { flex: 1; min-width: 0; }
.msg-meta { display: flex; justify-content: space-between; align-items: center; }
.msg-preview { font-size: 13px; color: #6b7280; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.campaign-item { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; border-bottom: 1px solid var(--border); }
.campaign-item:last-child { border-bottom: none; }
.campaign-info strong { display: block; font-size: 13px; font-weight: 600; }
.campaign-info small { color: #6b7280; font-size: 12px; }

/* ============================================================
   ACCOUNT CARDS
   ============================================================ */
.account-card { border-radius: 14px; transition: box-shadow .2s; }
.account-card:hover { box-shadow: 0 8px 30px rgba(0,0,0,.1); }
.account-big-icon { width: 52px; height: 52px; background: var(--wa-light); border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 26px; color: #9ca3af; flex-shrink: 0; }
.account-big-icon.connected { background: var(--wa-light); color: var(--wa-dark); }
.account-stats { display: flex; gap: 16px; text-align: center; }
.account-stats > div { flex: 1; }
.account-stats strong { display: block; font-size: 18px; font-weight: 700; }
.account-stats span { font-size: 11px; color: #6b7280; }

/* ============================================================
   QR PAGE
   ============================================================ */
.qr-frame { display: inline-block; border: 4px solid #128C7E; border-radius: 12px; padding: 12px; }
.qr-container { min-height: 220px; display: flex; align-items: center; justify-content: center; }
.qr-placeholder { text-align: center; }
.pulse-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #f59e0b; margin-right: 6px; animation: pulse 1.5s infinite; }
@keyframes pulse { 0%,100%{opacity:1}50%{opacity:.3} }
.step-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0; }
.step { display: flex; align-items: flex-start; gap: 10px; text-align: left; }
.step span { width: 24px; height: 24px; border-radius: 50%; background: var(--wa); color: #fff; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.step p { font-size: 13px; margin: 3px 0 0; color: #374151; }

/* ============================================================
   INBOX
   ============================================================ */
.content-area:has(.inbox-layout) { padding: 0; }
.inbox-layout { display: flex; height: calc(100vh - var(--topbar-height)); overflow: hidden; }
.inbox-sidebar { width: 300px; flex-shrink: 0; border-right: 1px solid var(--border); display: flex; flex-direction: column; background: #fff; }
.inbox-sidebar-header { padding: 14px 14px 10px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.inbox-sidebar-header h5 { font-size: 16px; font-weight: 700; }
.inbox-filter-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 8px; }
.filter-tab { padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 500; color: #6b7280; background: var(--bg); border: 1px solid var(--border); transition: all .15s; }
.filter-tab.active, .filter-tab:hover { background: var(--wa-light); color: var(--wa-dark); border-color: var(--wa-dark); }
.inbox-search { position: relative; }
.conv-list { flex: 1; overflow-y: auto; }
.conv-item { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--border); cursor: pointer; transition: background .12s; }
.conv-item:hover { background: var(--bg); }
.conv-item.active { background: var(--wa-light); }
.conv-item.unread .conv-name { font-weight: 700; }
.conv-avatar { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, var(--wa), var(--wa-dark)); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px; flex-shrink: 0; }
.conv-avatar.lg { width: 44px; height: 44px; font-size: 18px; }
.conv-avatar.xl { width: 64px; height: 64px; font-size: 24px; }
.conv-body { flex: 1; min-width: 0; }
.conv-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2px; }
.conv-name { font-size: 14px; font-weight: 600; }
.conv-time { font-size: 11px; color: #9ca3af; white-space: nowrap; }
.conv-preview { font-size: 12px; color: #6b7280; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-meta { margin-top: 4px; }
.badge-xs { font-size: 10px; padding: 2px 6px; }
.inbox-main { flex: 1; display: flex; flex-direction: column; min-width: 0; background: #f9fafb; }
.inbox-empty-state { align-items: center; justify-content: center; }
.chat-header { background: #fff; border-bottom: 1px solid var(--border); padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; }
.chat-header-actions { display: flex; gap: 8px; }
.chat-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.chat-date-divider { text-align: center; margin: 12px 0; }
.chat-date-divider span { background: rgba(0,0,0,.06); padding: 3px 10px; border-radius: 20px; font-size: 11px; color: #6b7280; }
.chat-bubble-wrap { display: flex; }
.chat-bubble-wrap.outbound { justify-content: flex-end; }
.chat-bubble { max-width: 65%; }
.chat-bubble-wrap.inbound .chat-bubble { background: #fff; border: 1px solid var(--border); border-radius: 4px 16px 16px 16px; }
.chat-bubble-wrap.outbound .chat-bubble { background: #dcf8c6; border-radius: 16px 4px 16px 16px; }
.bubble-content { padding: 8px 12px 4px; font-size: 14px; line-height: 1.5; }
.bubble-meta { display: flex; align-items: center; justify-content: flex-end; gap: 4px; padding: 0 10px 6px; }
.bubble-meta small { font-size: 10px; color: #9ca3af; }
.chat-footer { background: #fff; border-top: 1px solid var(--border); padding: 10px 14px; flex-shrink: 0; }
.chat-input-row { display: flex; align-items: flex-end; gap: 8px; }
.chat-input { resize: none; border-radius: 20px; padding: 8px 14px; min-height: 40px; max-height: 120px; overflow-y: auto; border: 1px solid var(--border); font-size: 14px; }
.chat-tool-btn { border-radius: 50%; width: 36px; height: 36px; padding: 0; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.send-btn { border-radius: 50%; width: 40px; height: 40px; padding: 0; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.template-bar { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; flex-wrap: nowrap; }
.template-chip { border: 1px solid var(--wa); color: var(--wa-dark); background: var(--wa-light); border-radius: 16px; padding: 4px 12px; font-size: 12px; font-weight: 500; white-space: nowrap; cursor: pointer; }
.inbox-info-panel { width: 250px; flex-shrink: 0; border-left: 1px solid var(--border); background: #fff; overflow-y: auto; }
.info-section { padding: 16px; border-bottom: 1px solid var(--border); }
.info-section-title { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: #9ca3af; margin-bottom: 10px; }
.info-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 13px; color: #374151; }
.info-row i { color: #9ca3af; width: 16px; }

/* ============================================================
   CONTACTS
   ============================================================ */
.contact-avatar { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, var(--wa), var(--wa-dark)); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex-shrink: 0; }
.contact-avatar-xl { width: 72px; height: 72px; border-radius: 50%; background: linear-gradient(135deg, var(--wa), var(--wa-dark)); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 28px; }
.message-history-list { list-style: none; padding: 0; margin: 0; }
.mh-item { padding: 10px 16px; border-bottom: 1px solid var(--border); }
.mh-item.outbound .mh-bubble { background: #dcf8c6; }
.mh-item.inbound .mh-bubble { background: var(--bg); }
.mh-bubble { padding: 8px 12px; border-radius: 10px; font-size: 13px; margin-bottom: 4px; display: inline-block; max-width: 85%; }

/* ============================================================
   CAMPAIGNS
   ============================================================ */
.message-preview { background: var(--wa-light); border-left: 3px solid var(--wa); border-radius: 8px; padding: 12px; font-size: 14px; white-space: pre-wrap; }

/* ============================================================
   AGENTS
   ============================================================ */
.agent-card { border-radius: 14px; }
.agent-stats { display: flex; gap: 16px; text-align: center; }
.agent-stats > div { flex: 1; }
.agent-stats strong { display: block; font-size: 18px; font-weight: 700; }
.agent-stats span { font-size: 11px; color: #6b7280; }

/* ============================================================
   TEMPLATES
   ============================================================ */
.template-card { border-radius: 14px; }
.template-content { font-size: 13px; color: #374151; white-space: pre-wrap; }
.wa-preview { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Crect width='200' height='200' fill='%23e5ddd5'/%3E%3C/svg%3E"); border-radius: 10px; padding: 16px; min-height: 120px; }
.wa-bubble { background: #dcf8c6; border-radius: 4px 14px 14px 14px; padding: 8px 12px; font-size: 14px; display: inline-block; max-width: 85%; white-space: pre-wrap; }

/* ============================================================
   AUTOMATION
   ============================================================ */
.automation-card { border-radius: 14px; }
.auto-icon { width: 38px; height: 38px; background: #fef3c7; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; color: #92400e; flex-shrink: 0; }
.auto-icon.active { background: var(--wa-light); color: var(--wa-dark); }

/* ============================================================
   SETTINGS
   ============================================================ */
.settings-layout { display: flex; gap: 24px; align-items: flex-start; }
.settings-nav { width: 220px; flex-shrink: 0; border-radius: 14px; overflow: hidden; }
.settings-nav .list-group-item { border-left: 3px solid transparent; font-size: 14px; padding: 11px 14px; }
.settings-nav .list-group-item.active { background: var(--wa-light); color: var(--wa-dark); border-left-color: var(--wa); }
.settings-content { flex: 1; min-width: 0; }

/* ============================================================
   BILLING
   ============================================================ */
.plan-card { border: 2px solid var(--border); border-radius: 16px; padding: 24px; position: relative; text-align: center; }
.plan-card.featured { border-color: var(--wa); box-shadow: 0 0 0 4px rgba(37,211,102,.1); }
.plan-card.current { background: var(--wa-light); border-color: var(--wa-dark); }
.plan-badge-tag { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--wa); color: #fff; font-size: 11px; font-weight: 700; padding: 3px 12px; border-radius: 20px; white-space: nowrap; }
.plan-name { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.plan-price { font-size: 32px; font-weight: 800; margin-bottom: 16px; color: #1a1a2e; }
.plan-price span { font-size: 14px; color: #6b7280; font-weight: 400; }
.plan-features { list-style: none; padding: 0; margin: 0 0 20px; text-align: left; }
.plan-features li { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 13px; }
.plan-limits { display: flex; flex-direction: column; gap: 4px; }
.plan-limits span { font-size: 13px; }
.plan-badge-lg { width: 64px; height: 64px; background: linear-gradient(135deg, var(--wa), var(--wa-dark)); border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff; font-size: 20px; }
.plan-badge-lg div { font-size: 10px; font-weight: 700; margin-top: 2px; }
.gateway-cards { display: flex; gap: 12px; }
.gateway-card { flex: 1; border: 2px solid var(--border); border-radius: 10px; padding: 14px; cursor: pointer; display: flex; align-items: center; gap: 8px; font-weight: 500; font-size: 14px; }
.gateway-card.selected { border-color: var(--wa); background: var(--wa-light); }

/* ============================================================
   UPLOAD ZONE
   ============================================================ */
.upload-zone { border: 2px dashed var(--border); border-radius: 14px; padding: 40px 20px; text-align: center; cursor: pointer; position: relative; transition: border-color .2s, background .2s; }
.upload-zone:hover, .upload-zone.dragging { border-color: var(--wa); background: var(--wa-light); }
.upload-input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* ============================================================
   GROUP CARD
   ============================================================ */
.group-card { border-radius: 12px; }
.group-icon { width: 44px; height: 44px; background: var(--wa-light); border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px; color: var(--wa-dark); flex-shrink: 0; }

/* ============================================================
   METHOD CARDS
   ============================================================ */
.method-cards { display: flex; gap: 12px; flex-wrap: wrap; }
.method-card { flex: 1; min-width: 130px; border: 2px solid var(--border); border-radius: 12px; padding: 14px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; transition: all .15s; }
.method-card:hover { border-color: var(--wa); }
.method-card.selected { border-color: var(--wa); background: var(--wa-light); }
.method-card i { font-size: 24px; color: var(--wa-dark); }
.method-card strong { font-size: 13px; display: block; }
.method-card span { font-size: 11px; color: #6b7280; }

/* ============================================================
   EMBED CODE
   ============================================================ */
.embed-code { background: #1e293b; color: #e2e8f0; border-radius: 10px; padding: 16px; font-size: 13px; white-space: pre-wrap; word-break: break-all; }
.widget-preview-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 24px; flex-shrink: 0; }

/* ============================================================
   EMPTY STATES
   ============================================================ */
.empty-state { text-align: center; }
.empty-page-state { text-align: center; padding: 80px 20px; }
.empty-icon { font-size: 56px; color: #d1d5db; margin-bottom: 16px; }

/* ============================================================
   OVERLAY + MOBILE
   ============================================================ */
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 999; }
.sidebar-overlay.show { display: block; }

@media (max-width: 991px) {
  .main-content { margin-left: 0; }
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .inbox-info-panel { display: none; }
  .inbox-sidebar { width: 260px; }
  .auth-card { flex: none; width: 100%; max-width: 400px; padding: 32px 24px; }
  .auth-visual { display: none; }
  .auth-container { min-height: auto; }
  .settings-layout { flex-direction: column; }
  .settings-nav { width: 100%; }
}
@media (max-width: 575px) {
  .content-area { padding: 12px; }
  .page-header { flex-direction: column; align-items: flex-start; }
  .inbox-sidebar { width: 100%; }
  .inbox-main { display: none; }
  .inbox-layout.chat-open .inbox-sidebar { display: none; }
  .inbox-layout.chat-open .inbox-main { display: flex; width: 100%; }
  .auth-card { padding: 28px 20px; }
  .plan-card { padding: 16px; }
}
