/* OmiZaloMG Demo — Custom CSS */

[x-cloak] { display: none !important; }

body { font-family: 'Inter', system-ui, -apple-system, sans-serif; }

/* ── Sidebar ── */
.sidebar { background: #1e2a3a; }
.nav-item { transition: background .15s, color .15s; }
.nav-item:hover { background: rgba(255,255,255,.08); }
.nav-item.active { background: #1a56db; }

/* ── Cards ── */
.kpi-card { transition: transform .15s, box-shadow .15s; cursor: pointer; }
.kpi-card:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(0,0,0,.12); }

/* ── Conversation rows ── */
.conv-row { transition: background .1s; cursor: pointer; }
.conv-row:hover { background: #f0f9ff; }
.conv-row.selected { background: #dbeafe; }
.breach-bg { background: #fff5f5; }
.breach-bg:hover { background: #fed7d7; }
.warning-bg { background: #fffbeb; }
.warning-bg:hover { background: #fef9c3; }

/* ── Chat bubbles ── */
.chat-bubble { max-width: 72%; word-break: break-word; }
.bubble-in { background: #f3f4f6; color: #111827; border-radius: 0 12px 12px 12px; }
.bubble-out-phone { background: #dbeafe; color: #1e40af; border-radius: 12px 0 12px 12px; }
.bubble-out-admin { background: #ede9fe; color: #5b21b6; border-radius: 12px 0 12px 12px; }
.bubble-system { background: #f9fafb; color: #6b7280; font-style: italic; font-size: .75rem; }
.msg-highlight { background: #fffbeb; border-left: 3px solid #f59e0b; padding-left: 8px; border-radius: 4px; }
.msg-checkbox-row { cursor: pointer; }
.msg-checkbox-row:hover { background: #f0fdf4; }
.msg-checkbox-row.msg-selected { background: #dcfce7; }

/* ── Tags ── */
.tag { display: inline-block; padding: 1px 8px; border-radius: 9999px; font-size: .7rem; font-weight: 600; letter-spacing: .03em; }
.tag-vip { background: #fef3c7; color: #92400e; }
.tag-breach { background: #fee2e2; color: #991b1b; }
.tag-order { background: #dcfce7; color: #166534; }
.tag-walkin { background: #f3e8ff; color: #6b21a8; }
.tag-stale { background: #f3f4f6; color: #6b7280; }
.tag-draft { background: #e0f2fe; color: #0369a1; }

/* ── Status dots ── */
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.dot-green { background: #0e9f6e; }
.dot-red { background: #e02424; }
.dot-yellow { background: #e3a008; }

/* ── Order lines ── */
.order-line-valid { border-left: 3px solid #0e9f6e; }
.order-line-invalid { border-left: 3px solid #e02424; }

/* ── Wizard steps ── */
.step-active { background: #1a56db; color: #fff; }
.step-done { background: #0e9f6e; color: #fff; }
.step-pending { background: #e5e7eb; color: #6b7280; }

/* ── Modals ── */
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 50; display: flex; align-items: center; justify-content: center; }
.modal-box { background: #fff; border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,.2); width: 100%; max-height: 90vh; overflow-y: auto; }

/* ── QR Panel ── */
.qr-box { background: linear-gradient(135deg, #e8f0fe, #c7d7f8); border: 2px dashed #93c5fd; border-radius: 12px; }

/* ── Notifications ── */
.notif-sla { border-left: 3px solid #e02424; }
.notif-session { border-left: 3px solid #f59e0b; }
.notif-order { border-left: 3px solid #3b82f6; }
.notif-walkin { border-left: 3px solid #8b5cf6; }

/* ── Kicked badge ── */
.kicked-badge { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }

/* ── Scrollbar ── */
.scrollbar-thin::-webkit-scrollbar { width: 4px; }
.scrollbar-thin::-webkit-scrollbar-track { background: transparent; }
.scrollbar-thin::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 2px; }

/* ── Animations ── */
.slide-in { animation: slideIn .2s ease; }
@keyframes slideIn { from { transform: translateX(20px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.fade-in { animation: fadeIn .15s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.pulse-red { animation: pulseRed 2s infinite; }
@keyframes pulseRed { 0%,100% { opacity: 1; } 50% { opacity: .5; } }
.slide-up { animation: slideUp .2s ease; }
@keyframes slideUp { from { transform: translateY(10px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ── Toast ── */
.toast { position: fixed; bottom: 24px; right: 24px; z-index: 100; background: #1e2a3a; color: #fff; padding: 12px 20px; border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.2); font-size: .875rem; }

/* ── Progress bar ── */
.prog-bar { height: 6px; border-radius: 3px; background: #e5e7eb; overflow: hidden; }
.prog-fill { height: 100%; border-radius: 3px; transition: width .5s ease; }

/* ── AI order hint on messages ── */
.ai-order-hint { border-left: 2px solid #34d399; background: linear-gradient(to right, rgba(209,250,229,0.28), transparent 50%); border-radius: 0 12px 12px 12px; }
.bubble-in.ai-order-hint { border-radius: 0 12px 12px 12px; }

/* ── Customer list table ── */
.cust-row { transition: background .1s; cursor: pointer; border-bottom: 1px solid #f1f5f9; }
.cust-row:hover { background: #eff6ff; }
.tier-badge-dist  { background:#dbeafe; color:#1e40af; }
.tier-badge-deal  { background:#dcfce7; color:#166534; }
.tier-badge-ret   { background:#f3e8ff; color:#6b21a8; }

/* ── Tooltip ── */
.tipwrap { position: relative; }
.tipwrap:hover .tip { display: block; }
.tip { display: none; position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); background: #1e2a3a; color: #fff; padding: 4px 10px; border-radius: 6px; font-size: .72rem; white-space: nowrap; z-index: 60; pointer-events: none; }
