/* ==========================================================================
   RING-CRM v2 - The Cockpit & Omnichannel Design System (Chatmo.io 4-Pane Architecture)
   ========================================================================== */

:root {
  --color-primary: #2563EB;
  --color-primary-hover: #1D4ED8;
  --color-primary-soft: #EFF6FF;
  --color-primary-light: #DBEAFE;
  
  --color-accent: #F59E0B;
  --color-accent-hover: #D97706;
  --color-accent-soft: #FEF3C7;
  
  --color-success: #10B981;
  --color-success-soft: #D1FAE5;
  --color-warning: #F59E0B;
  --color-warning-soft: #FEF3C7;
  --color-danger: #EF4444;
  --color-danger-soft: #FEE2E2;
  --color-info: #3B82F6;
  --color-info-soft: #DBEAFE;

  --color-bg: #F8FAFC;
  --color-surface: #FFFFFF;
  --color-surface-card: #FFFFFF;
  --color-border: #E2E8F0;
  --color-border-light: #F1F5F9;
  --color-text: #0F172A;
  --color-text-muted: #64748B;
  --color-text-subtle: #94A3B8;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  
  --topbar-height: 54px;
  --sidebar-width: 64px;

  /* Dynamic Custom Theme Variables */
  --chat-bg: #F8FAFC;
  --chat-bg-pattern: none;
  --chat-bg-size: auto;
  --bubble-out-bg: #2563EB;
  --bubble-out-text: #FFFFFF;
  --bubble-out-border: transparent;
  --bubble-in-bg: #FFFFFF;
  --bubble-in-text: #0F172A;
  --bubble-in-border: #E2E8F0;
}

[data-theme="dark"] {
  --color-bg: #0F172A;
  --color-surface: #1E293B;
  --color-surface-card: #1E293B;
  --color-border: #334155;
  --color-border-light: #0F172A;
  --color-text: #F8FAFC;
  --color-text-muted: #94A3B8;
  --color-text-subtle: #64748B;
  --color-primary: #3B82F6;
  --color-primary-soft: rgba(59, 130, 246, 0.15);
  --color-primary-light: rgba(59, 130, 246, 0.25);
  --color-success-soft: rgba(16, 185, 129, 0.15);
  --color-warning-soft: rgba(245, 158, 11, 0.15);
  --color-danger-soft: rgba(239, 68, 68, 0.15);
  --color-info-soft: rgba(59, 130, 246, 0.15);

  --chat-bg: #0F172A;
  --chat-bg-pattern: none;
  --chat-bg-size: auto;
  --bubble-out-bg: #3B82F6;
  --bubble-out-text: #FFFFFF;
  --bubble-out-border: transparent;
  --bubble-in-bg: #1E293B;
  --bubble-in-text: #F8FAFC;
  --bubble-in-border: #334155;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  font-family: var(--font-sans);
  background-color: var(--color-bg);
  color: var(--color-text);
  font-size: 13px;
  line-height: 1.5;
  height: 100%;
  height: 100dvh;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.layout-wrapper {
  display: flex;
  height: 100%;
  height: 100dvh;
  width: 100vw;
  overflow: hidden;
}

/* ==========================================================================
   Pane 1: Slim Left Sidebar (Chatmo.io Icon-Only)
   ========================================================================== */
.slim-sidebar {
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--color-surface);
  border-right: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  z-index: 100;
  flex-shrink: 0;
}

.sidebar-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
}

.sidebar-brand-icon {
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2px;
}

.brand-circle-logo {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--color-primary), #1D4ED8);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.35);
  transition: transform 0.2s ease;
}

.brand-circle-logo:hover { transform: scale(1.05); }

.sidebar-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
}

.nav-icon-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 50px;
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
}

.nav-icon-item svg {
  width: 19px;
  height: 19px;
  stroke-width: 2;
  margin-bottom: 2px;
}

.nav-icon-item .nav-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: -0.2px;
  line-height: 1.1;
}

.nav-icon-item:hover {
  background: var(--color-primary-soft);
  color: var(--color-primary);
}

.nav-icon-item.active {
  background: var(--color-primary);
  color: white;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
}

.icon-wrap-rel {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.badge-dot-live {
  position: absolute;
  top: -2px;
  right: -4px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-success);
  border: 1.5px solid var(--color-surface);
}

.sidebar-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.sidebar-icon-btn {
  background: transparent;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 15px;
  transition: background 0.15s ease;
}

.sidebar-icon-btn:hover { background: var(--color-border-light); }

.sidebar-avatar-wrap {
  position: relative;
  cursor: pointer;
}

.user-status-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-success);
  border: 2px solid var(--color-surface);
}

/* ==========================================================================
   Main Content Area
   ========================================================================== */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

.topbar {
  height: var(--topbar-height);
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  flex-shrink: 0;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-heading {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-title {
  font-weight: 800;
  font-size: 14.5px;
  color: var(--color-text);
}

.brand-badge {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--color-primary);
  background: var(--color-primary-soft);
  padding: 2px 7px;
  border-radius: var(--radius-full);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-profile-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--color-bg);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
}

.user-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--color-primary);
  color: white;
  font-weight: 700;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-info-text {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-weight: 700;
  font-size: 11px;
  line-height: 1.2;
}

.user-role {
  font-size: 11px;
  color: var(--color-text-muted);
  text-transform: uppercase;
}

.btn-logout {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 12px;
  padding: 2px;
  opacity: 0.7;
}

.btn-logout:hover { opacity: 1; }

.main-content {
  flex: 1 1 0%;
  min-height: 0;
  height: calc(100vh - var(--topbar-height));
  overflow: hidden;
  background-color: var(--color-bg);
  position: relative;
  display: flex;
  flex-direction: column;
}

#view-container {
  flex: 1 1 0%;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  box-sizing: border-box;
}

/* ==========================================================================
   Chatmo.io 4-Pane Omnichannel Architecture (Flexbox Resizable)
   ========================================================================== */
.chatmo-workspace-4pane {
  display: flex;
  flex-direction: row;
  height: calc(100vh - var(--topbar-height));
  width: 100%;
  overflow: hidden;
  background: var(--color-bg);
  position: relative;
}

/* Draggable Resizer Splitter Bar */
.pane-resizer {
  width: 5px;
  background: transparent;
  cursor: col-resize;
  flex-shrink: 0;
  position: relative;
  z-index: 25;
  transition: background 0.15s ease, box-shadow 0.15s ease;
  user-select: none;
  touch-action: none;
  border-right: 1px solid var(--color-border);
}

.pane-resizer:hover,
.pane-resizer.is-resizing {
  background: var(--color-primary);
  border-right-color: var(--color-primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.pane-resizer::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: -3px;
  right: -3px;
}

/* Pane 2: Chat Status & Connected Accounts */
.pane-accounts {
  background: var(--color-surface);
  border-right: none;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 12px 10px;
  flex-shrink: 0;
  width: 220px;
  min-width: 160px;
  max-width: 450px;
}

.pane-section-title {
  font-size: 11px;
  font-weight: 800;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.channel-account-card {
  padding: 8px 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  cursor: pointer;
  transition: all 0.15s ease;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.channel-account-card:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-soft);
}

.channel-account-card.active {
  border-color: var(--color-primary);
  background: var(--color-primary);
  color: white;
}

.channel-account-card.active .channel-sub {
  color: rgba(255, 255, 255, 0.8);
}

.channel-account-card.active .status-dot-mini {
  border-color: white;
}

.channel-icon-badge {
  font-size: 14px;
}

.channel-name {
  font-weight: 700;
  font-size: 11.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.channel-sub {
  font-size: 10px;
  color: var(--color-text-muted);
}

.status-dot-mini {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-success);
}

/* Category Filter Menu in Pane 2 */
.status-filter-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 10px;
  border-radius: var(--radius-md);
  color: var(--color-text);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-bottom: 2px;
}

.status-filter-item:hover {
  background: var(--color-border-light);
}

.status-filter-item.active {
  background: var(--color-primary-soft);
  color: var(--color-primary);
}

.status-filter-badge {
  font-size: 10px;
  background: var(--color-border-light);
  padding: 1px 6px;
  border-radius: var(--radius-full);
  font-weight: 700;
}

/* Pane 3: Inbox Conversations List */
.pane-inbox-list {
  background: var(--color-surface);
  border-right: none;
  display: flex;
  flex-direction: column;
  padding: 12px 10px;
  overflow-y: hidden;
  flex-shrink: 0;
  width: 300px;
  min-width: 220px;
  max-width: 650px;
}

.inbox-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.inbox-title {
  font-weight: 800;
  font-size: 13.5px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.search-input-wrap {
  position: relative;
  margin-bottom: 8px;
}

.search-input-wrap svg {
  position: absolute;
  left: 9px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted);
}

.search-input {
  width: 100%;
  padding: 6px 8px 6px 30px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text);
  font-size: 12px;
  outline: none;
}

.search-input:focus { border-color: var(--color-primary); }

.filter-scroll-row {
  display: flex;
  gap: 4px;
  margin-bottom: 8px;
}

.filter-pill {
  padding: 3px 8px;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-muted);
  font-size: 10.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-pill.active, .filter-pill:hover {
  background: var(--color-primary-soft);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.chat-items-scroll {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-right: 2px;
}

.chat-card-item {
  padding: 8px 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  gap: 8px;
}

.chat-card-item:hover, .chat-card-item.active {
  border-color: var(--color-primary);
  background: var(--color-primary-soft);
}

.chat-avatar-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-weight: 800;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.chat-meta-content {
  flex: 1;
  overflow: hidden;
}

.chat-row-1 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2px;
}

.chat-contact-title {
  font-weight: 700;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-time {
  font-size: 10px;
  color: var(--color-text-subtle);
  flex-shrink: 0;
}

.chat-snippet {
  font-size: 11px;
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-badge-status {
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  background: var(--color-warning-soft);
  color: var(--color-warning);
  text-transform: uppercase;
}

.chat-badge-status.open {
  background: #ECFDF5;
  color: #059669;
}

.chat-badge-status.resolved {
  background: #F3E8FF;
  color: #7E22CE;
}

.chat-badge-status.snoozed {
  background: #F3F4F6;
  color: #6B7280;
}

.chat-badge-assignee {
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  background: #EFF6FF;
  color: #1D4ED8;
  border: 1px solid #BFDBFE;
  max-width: 90px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-block;
}

.chat-badge-unassigned {
  font-size: 9px;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 3px;
  background: #F3F4F6;
  color: #6B7280;
  border: 1px solid #E5E7EB;
  display: inline-block;
}

/* Pane 4: Chat Thread Active */
.pane-chat-thread {
  background: var(--color-surface);
  border-right: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex: 1 1 0%;
  min-width: 280px;
  position: relative;
}

/* --- 2-Row Thread Header (Zero-Overlap & Clean Inline Separation) --- */
.thread-header-container {
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  position: relative;
  z-index: 15;
}

/* Baris 1: Header Utama (Kontak & Kontrol WhatsApp / AI) - SEBARIS RAPI */
.thread-header-main {
  padding: 6px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  background: var(--color-surface);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}
.thread-header-main::-webkit-scrollbar {
  display: none;
}

.thread-contact-info-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 140px;
  max-width: 280px;
  flex-shrink: 0;
  overflow: hidden;
}

.thread-contact-text-box {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
  overflow: hidden;
}

.thread-contact-name-row {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

#thread-contact-name {
  font-weight: 700;
  font-size: 13px;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 170px;
}

.thread-contact-sub-row {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
}

#thread-contact-jid {
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
}

/* Actions wrap: SEBARIS HORIZONTAL, nowrap, compact */
.thread-header-actions-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  flex-wrap: nowrap;
}

.btn-bell-alert {
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 3px 7px;
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  transition: all 0.15s ease;
  line-height: 1;
  flex-shrink: 0;
}

.btn-bell-alert:hover {
  background: var(--color-border-light);
  border-color: var(--color-primary);
}

.btn-chat-mute {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 11.5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  transition: all 0.15s ease;
  color: var(--color-text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-chat-mute:hover {
  background: var(--color-border-light);
  color: var(--color-text);
  border-color: var(--color-primary);
}

.btn-chat-mute.muted {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.4);
  color: #EF4444;
  font-weight: 700;
}

.btn-mute-label {
  font-size: 10.5px;
  font-weight: 600;
}

.chat-mute-icon {
  font-size: 11.5px;
  opacity: 0.8;
  display: inline-flex;
  align-items: center;
}

.btn-copilot-toggle {
  background: rgba(14, 165, 233, 0.12);
  color: #0284C7;
  border: 1px solid rgba(14, 165, 233, 0.4);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  white-space: nowrap;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.btn-copilot-toggle:hover {
  background: #0284C7;
  color: #FFFFFF;
}

.thread-badge-btn {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  white-space: nowrap;
  flex-shrink: 0;
}

.thread-auto-reply-box {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--color-bg-subtle, #F1F5F9);
  padding: 2px 7px;
  border-radius: 6px;
  border: 1px solid var(--color-border);
  height: 28px;
  white-space: nowrap;
  flex-shrink: 0;
}

.thread-select-pill {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--color-text);
  cursor: pointer;
  height: 28px;
  outline: none;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Baris 2: Sub-Header Audit & Context Meta Bar (Status Case & Assignee) */
.thread-header-subbar {
  padding: 4px 14px;
  background: rgba(0, 0, 0, 0.08);
  border-top: 1px dashed var(--color-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  transition: all 0.2s ease;
}

.thread-subbar-left {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.thread-subbar-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* Chat Messages Container Area */
.thread-messages-area {
  flex: 1;
  padding: 14px 18px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background-color: var(--chat-bg);
  background-image: var(--chat-bg-pattern);
  background-size: var(--chat-bg-size, auto);
  background-repeat: repeat;
  position: relative;
}

/* Chat Date Divider (WhatsApp Style) */
.chat-date-divider {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 14px 0 8px 0;
  position: relative;
  width: 100%;
  pointer-events: none;
}

.chat-date-divider span {
  background: var(--color-surface, #1e293b);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted, #94a3b8);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  letter-spacing: 0.4px;
}

/* Row Pembungkus Pesan: WAJIB Flex agar Saling Silang (In = Kiri, Out = Kanan) */
.chat-msg-row {
  position: relative;
  display: flex;
  width: 100%;
  margin-bottom: 4px;
  align-items: flex-end;
}

/* Pesan Keluar (Kita / Agen / Bot) -> Di KANAN */
.chat-msg-row.out {
  justify-content: flex-end;
}

/* Pesan Masuk (Pelanggan / Anggota Grup) -> Di KIRI */
.chat-msg-row.in {
  justify-content: flex-start;
}

.chat-msg-row.center {
  justify-content: center;
}

/* Wrapper Bubble: Maksimum 75% lebar kontainer agar dinamis */
.msg-bubble-wrap {
  position: relative;
  max-width: 75%;
  min-width: 80px;
  display: flex;
  flex-direction: column;
}

.chat-msg-row.out .msg-bubble-wrap {
  align-items: flex-end;
}

.chat-msg-row.in .msg-bubble-wrap {
  align-items: flex-start;
}

/* Hover Action Toolbar pada Pesan (Reply, Forward, Edit, Copy, Delete) */
.msg-hover-actions {
  position: absolute;
  top: -14px;
  display: none;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
  padding: 2px 4px;
  gap: 2px;
  z-index: 10;
  transition: opacity 0.15s ease;
}

.chat-msg-row.out .msg-hover-actions {
  right: 6px;
}

.chat-msg-row.in .msg-hover-actions {
  left: 6px;
}

.chat-msg-row:hover .msg-hover-actions {
  display: flex;
}

.msg-act-btn {
  background: transparent;
  border: none;
  font-size: 11px;
  padding: 3px 6px;
  border-radius: var(--radius-full);
  cursor: pointer;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: 3px;
  line-height: 1;
}

.msg-act-btn:hover {
  background: var(--color-border-light);
  color: var(--color-primary);
}

.msg-act-btn.msg-act-delete:hover {
  color: #EF4444;
}

/* Quoted Reply Box inside Chat Bubble */
.quoted-reply-box {
  background: rgba(0, 0, 0, 0.07);
  border-left: 3.5px solid var(--color-primary);
  border-radius: 6px;
  padding: 5px 8px;
  margin-bottom: 6px;
  font-size: 11px;
  line-height: 1.35;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.quoted-reply-box:hover {
  background: rgba(0, 0, 0, 0.12);
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.chat-msg-row.out .quoted-reply-box {
  background: rgba(255, 255, 255, 0.16);
  border-left-color: #FFFFFF;
}

.chat-msg-row.out .quoted-reply-box:hover {
  background: rgba(255, 255, 255, 0.24);
}

.quoted-box-body {
  flex: 1;
  min-width: 0;
}

.quoted-sender-label {
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.chat-msg-row.out .quoted-sender-label {
  color: #FFFFFF;
}

.quoted-snippet-text {
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
}

.chat-msg-row.out .quoted-snippet-text {
  color: rgba(255, 255, 255, 0.88);
}

.quoted-media-thumb-wrap {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  border-radius: 4px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.quoted-media-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.quoted-media-icon-thumb {
  font-size: 19px;
  line-height: 1;
  opacity: 0.92;
}

/* Composer Textarea */
.composer-textarea {
  flex: 1;
  min-height: 38px;
  max-height: 140px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-text);
  font-family: inherit;
  font-size: 13px;
  line-height: 1.45;
  resize: none;
  outline: none;
  overflow-y: auto;
  box-sizing: border-box;
  transition: border-color 0.15s ease;
}

.composer-textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px var(--color-primary-soft);
}

/* Chat Bubble Elements */
.chat-bubble {
  width: fit-content;
  max-width: 100%;
  min-width: 80px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.5;
  word-break: break-word;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}

.chat-bubble.in {
  background: var(--bubble-in-bg);
  color: var(--bubble-in-text);
  border: 1px solid var(--bubble-in-border);
  border-top-left-radius: 2px;
}

.chat-bubble.in .chat-bubble-text {
  color: var(--bubble-in-text);
}

.chat-bubble.out {
  background: var(--bubble-out-bg);
  color: var(--bubble-out-text);
  border: 1px solid var(--bubble-out-border, transparent);
  border-top-right-radius: 2px;
}

.chat-bubble.out .chat-bubble-text {
  color: var(--bubble-out-text);
}

.chat-bubble.out-ai {
  background: linear-gradient(135deg, #1E3A8A, #2563EB);
  color: #FFFFFF;
  border: 1px solid var(--color-accent);
  border-top-right-radius: 2px;
}

.chat-bubble.private-note {
  align-self: center;
  width: 92%;
  max-width: 92%;
  background: #FEF3C7;
  color: #78350F;
  border: 1px solid #FCD34D;
  border-radius: var(--radius-md);
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* WhatsApp Rich Text & Linebreak Formatting (V1 & WhatsApp Web Parity) */
.chat-bubble-text {
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: break-word;
  font-size: 13px;
  line-height: 1.55;
  font-family: inherit;
  color: inherit;
}

.chat-bubble-text strong, 
.chat-bubble-text b {
  font-weight: 700;
  color: inherit;
}

.chat-bubble-text em, 
.chat-bubble-text i {
  font-style: italic;
  color: inherit;
}

.chat-bubble-text del {
  text-decoration: line-through;
  opacity: 0.8;
}

.chat-bubble-text code {
  font-family: var(--font-mono, monospace);
  background: rgba(0, 0, 0, 0.12);
  padding: 2px 5px;
  border-radius: 4px;
  font-size: 12px;
}

.chat-bubble-text pre {
  margin: 4px 0;
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.18);
  border-radius: 6px;
  overflow-x: auto;
  font-family: var(--font-mono, monospace);
  font-size: 12px;
}

.chat-bubble-text a {
  color: #38BDF8;
  text-decoration: underline;
  word-break: break-all;
}

.chat-bubble.out .chat-bubble-text a {
  color: #BAE6FD;
}

.chat-bubble-text .wa-ticket-tag {
  color: #10B981;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.12);
  padding: 1px 4px;
  border-radius: 4px;
}

.chat-bubble.out .chat-bubble-text .wa-ticket-tag {
  color: #A7F3D0;
  background: rgba(255, 255, 255, 0.15);
}

/* AI Presence Badge (Chatwoot & V1 Exact Replica) */
.ai-presence-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  border: 1px solid var(--color-border);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.ai-presence-pill.active {
  background: #ECFDF5;
  color: #065F46;
  border-color: #A7F3D0;
}

.ai-presence-pill.inactive {
  background: #F3F4F6;
  color: #4B5563;
  border-color: #E5E7EB;
}

.ai-presence-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.ai-presence-pill.active .ai-presence-dot {
  background: #10B981;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.6);
}

/* 2026-08-29: Status Changed Pill (purple — Resolved/Open/Pending audit trail) */
.status-changed-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  border: 1px solid #DDD6FE;
  background: #F5F3FF;
  color: #5B21B6;
  white-space: nowrap;
}

.status-changed-pill .status-changed-icon {
  font-size: 11px;
  filter: saturate(1.2);
}

/* 2026-08-29: Assigned Changed Pill (blue — Assignee audit trail) */
.assigned-changed-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  border: 1px solid #BFDBFE;
  background: #EFF6FF;
  color: #1E40AF;
  white-space: nowrap;
}

.assigned-changed-pill .assigned-changed-icon {
  font-size: 11px;
}

/* 2026-08-29 Sesi 3: Merged Chat Pill (neutral grey — LID↔phone dedup indicator) */
.merged-with-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  border: 1px solid #D1D5DB;
  background: #F3F4F6;
  color: #374151;
  white-space: nowrap;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.merged-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.merged-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  border: 1px solid #D1D5DB;
  background: #FFFFFF;
  color: #4B5563;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}

.merged-action-btn:hover {
  background: #F3F4F6;
  border-color: #9CA3AF;
}

.merged-action-btn.merge {
  border-color: #93C5FD;
  color: #1E40AF;
  background: #EFF6FF;
}

.merged-action-btn.merge:hover {
  background: #DBEAFE;
}

.merged-action-btn.unmerge {
  border-color: #FCA5A5;
  color: #991B1B;
  background: #FEF2F2;
}

.merged-action-btn.unmerge:hover {
  background: #FEE2E2;
}

/* ============================================================ */
/* Location Share Bubble (Sesi 3, 2026-08-29) — WhatsApp location */
/* ============================================================ */
.msg-loc-link {
  display: block;
  margin-bottom: 6px;
  text-decoration: none;
  color: inherit;
  max-width: 320px;
}

.msg-loc-card {
  background: linear-gradient(135deg, #ECFDF5 0%, #D1FAE5 100%);
  border: 1px solid #6EE7B7;
  border-radius: 10px;
  padding: 10px 12px;
  transition: all 0.15s;
  cursor: pointer;
}

.msg-loc-link:hover .msg-loc-card {
  background: linear-gradient(135deg, #D1FAE5 0%, #A7F3D0 100%);
  border-color: #34D399;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.2);
}

.msg-loc-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  font-weight: 700;
  font-size: 13px;
  color: #065F46;
}

.msg-loc-icon {
  font-size: 16px;
  line-height: 1;
}

.msg-loc-live {
  background: #DC2626;
  color: white;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 5px;
  border-radius: 3px;
  letter-spacing: 0.5px;
}

.msg-loc-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.msg-loc-addr {
  font-size: 12px;
  color: #047857;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.msg-loc-coords {
  font-size: 11px;
  color: #047857;
  opacity: 0.85;
  font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
  margin-bottom: 6px;
}

.msg-loc-cta {
  font-size: 11px;
  color: #047857;
  font-weight: 600;
  border-top: 1px solid rgba(16, 185, 129, 0.3);
  padding-top: 6px;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ============================================================ */
/* Modal Merge Candidate */
.merge-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9000;
}

.merge-modal {
  background: #fff;
  border-radius: 12px;
  width: min(92vw, 480px);
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.merge-modal-header {
  padding: 14px 18px;
  border-bottom: 1px solid #E5E7EB;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #F9FAFB;
}

.merge-modal-header h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #111827;
}

.merge-modal-close {
  background: none;
  border: none;
  font-size: 22px;
  color: #6B7280;
  cursor: pointer;
  padding: 0 6px;
  line-height: 1;
}

.merge-modal-body {
  padding: 14px 18px;
  overflow-y: auto;
  flex: 1;
}

.merge-modal-subtitle {
  font-size: 12px;
  color: #6B7280;
  margin-bottom: 10px;
}

.merge-candidate-item {
  transition: background 0.12s;
}

.merge-candidate-item:hover {
  background: #F9FAFB !important;
  border-color: #93C5FD !important;
}

.btn-copilot-toggle {
  background: #1E3A8A;
  color: white;
  border: 1px solid #3B82F6;
  padding: 4px 9px;
  border-radius: var(--radius-md);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-copilot-toggle:hover {
  background: #2563EB;
}

.btn-copilot-toggle.closed {
  background: var(--color-border-light);
  color: var(--color-text-muted);
  border-color: var(--color-border);
}

.btn-bell-alert {
  background: #FEF3C7;
  color: #D97706;
  border: 1px solid #FCD34D;
  padding: 4px 7px;
  border-radius: var(--radius-md);
  font-size: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.btn-bell-alert:hover {
  background: #FDE68A;
}

.thread-badge-btn {
  background: var(--color-border-light);
  border: 1px solid var(--color-border);
  padding: 3px 8px;
  border-radius: var(--radius-md);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  color: var(--color-text);
  transition: background 0.15s ease;
  white-space: nowrap;
}
.thread-badge-btn:hover { background: var(--color-primary-soft); color: var(--color-primary); }

.thread-select-pill {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: 3px 6px;
  border-radius: var(--radius-md);
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text);
  cursor: pointer;
  outline: none;
}

/* Action Strip bar ala Chatmo */
.thread-action-strip {
  padding: 5px 12px;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  display: flex;
  gap: 8px;
  align-items: center;
}

.strip-btn {
  background: transparent;
  border: none;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 3px 6px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 4px;
}

.strip-btn:hover {
  background: var(--color-border-light);
  color: var(--color-primary);
}

.strip-btn-primary {
  background: var(--color-primary);
  color: white;
  border: none;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.thread-input-bar {
  padding: 8px 12px;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Pane 5: AIRing Copilot AI Column */
.pane-copilot {
  background: var(--color-surface-card);
  display: flex;
  flex-direction: column;
  padding: 12px 10px;
  overflow: hidden;
  flex-shrink: 0;
  width: 320px;
  min-width: 260px;
  max-width: 600px;
}

.chatmo-workspace-4pane.copilot-closed .pane-copilot {
  display: none !important;
}

.chatmo-workspace-4pane.copilot-closed #resizer-copilot {
  display: none !important;
}

/* Pane 6: Group Info Drawer (WhatsApp Web Parity) */
.pane-group-info {
  background: var(--color-surface);
  display: none;
  flex-direction: column;
  flex-shrink: 0;
  width: 360px;
  min-width: 280px;
  max-width: 650px;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 30;
  border-left: 1px solid var(--color-border);
}

.pane-group-info.open {
  display: flex;
}

/* Pane Cari Pesan dalam Percakapan (WhatsApp Web Parity) */
.pane-chat-search {
  background: var(--color-surface);
  display: none;
  flex-direction: column;
  flex-shrink: 0;
  width: 360px;
  min-width: 280px;
  max-width: 650px;
  height: 100%;
  overflow: hidden;
  z-index: 30;
  border-left: 1px solid var(--color-border);
}

.pane-chat-search.open {
  display: flex;
}

.chat-search-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--color-surface);
}

.wa-search-result-item {
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.15s ease;
  margin-bottom: 4px;
}

.wa-search-result-item:hover {
  background: var(--color-bg-subtle, rgba(255, 255, 255, 0.06));
}

.wa-search-match {
  background: rgba(16, 185, 129, 0.35);
  color: #fff;
  font-weight: 700;
  border-radius: 2px;
  padding: 0 2px;
}

/* Highlight Flash Animation saat Loncat ke Pesan */
.msg-row-highlight .chat-bubble {
  animation: waMsgHighlightFlash 2.2s cubic-bezier(0.25, 1, 0.5, 1) forwards !important;
}

.msg-row-highlight .chat-media-image-wrap,
.msg-row-highlight .chat-video-card,
.msg-row-highlight .chat-doc-card,
.msg-row-highlight .chat-vn-player,
.msg-row-highlight .chat-contact-card {
  animation: waMediaHighlightPulse 2.2s cubic-bezier(0.25, 1, 0.5, 1) forwards !important;
}

@keyframes waMsgHighlightFlash {
  0% {
    box-shadow: 0 0 0 4px #0284C7, 0 0 20px rgba(2, 132, 199, 0.6);
    background-color: rgba(2, 132, 199, 0.3) !important;
  }
  50% {
    box-shadow: 0 0 0 3px #0284C7, 0 0 14px rgba(2, 132, 199, 0.4);
    background-color: rgba(2, 132, 199, 0.2) !important;
  }
  100% {
    box-shadow: none;
    background-color: inherit;
  }
}

@keyframes waMediaHighlightPulse {
  0% {
    transform: scale(1.03);
    box-shadow: 0 0 0 4px #0284C7, 0 0 25px rgba(2, 132, 199, 0.85);
    filter: brightness(1.2);
  }
  50% {
    transform: scale(1.01);
    box-shadow: 0 0 0 3px #0284C7, 0 0 16px rgba(2, 132, 199, 0.5);
    filter: brightness(1.1);
  }
  100% {
    transform: scale(1);
    box-shadow: none;
    filter: none;
  }
}

.copilot-chip {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.copilot-chip:hover {
  background: var(--color-primary-soft);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* Common UI Components */
.card {
  background: var(--color-surface-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.card-title {
  font-weight: 700;
  font-size: 13.5px;
}

.btn-primary {
  background: var(--color-primary);
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.btn-primary:hover { opacity: 0.9; }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-full);
}

.badge-success { background: var(--color-success-soft); color: var(--color-success); }
.badge-warning { background: var(--color-warning-soft); color: var(--color-warning); }
.badge-danger { background: var(--color-danger-soft); color: var(--color-danger); }
.badge-info { background: var(--color-info-soft); color: var(--color-info); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }

.quick-action-btn {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.quick-action-btn:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-soft);
}

.pairing-code-box {
  font-family: var(--font-mono);
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: 5px;
  color: #10B981;
  background: #0F172A;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  margin: 10px 0;
  display: inline-block;
}

/* ==========================================================================
   TICKETS VIEW & KANBAN 5-KOLOM (LIVE OPS NOC)
   ========================================================================== */

.tickets-view-page {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  width: 100%;
  max-width: 100%;
  padding: 14px 18px 12px 18px;
  box-sizing: border-box;
  overflow: hidden;
  background-color: var(--color-bg);
}

.tickets-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 10px;
  flex-shrink: 0;
}

/* Radar Banner Ringkasan Status */
.airing-whiteboard-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 8px 14px;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 12px;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.airing-wb-stats {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.airing-wb-stat-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
}

.airing-wb-divider {
  color: var(--color-border);
  user-select: none;
}

/* Kanban Board 5 Kolom Grid */
.kanban-board-5col {
  flex: 1 1 0%;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(260px, 1fr));
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 6px;
  box-sizing: border-box;
}

.kanban-board-5col::-webkit-scrollbar {
  height: 6px;
}
.kanban-board-5col::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 4px;
}

/* Tiap Kolom Kanban */
.kanban-col-wrapper {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  position: relative;
}

.kanban-col-wrapper.kanban-col-new {
  border-top: 3px solid #EF4444;
}
.kanban-col-wrapper.kanban-col-mitra {
  border-top: 3px solid #F97316;
}
.kanban-col-wrapper.kanban-col-internal {
  border-top: 3px solid #3B82F6;
}
.kanban-col-wrapper.kanban-col-pending {
  border-top: 3px solid #EAB308;
}
.kanban-col-wrapper.kanban-col-resolved {
  border-top: 3px solid #10B981;
}

.kanban-col-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
}

.kanban-col-title {
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--color-text);
  display: flex;
  align-items: center;
  gap: 6px;
}

.kanban-col-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  background: var(--color-bg);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
}

/* Scroll Area untuk Kartu-kartu Tiket di Kolom */
.kanban-cards-scroll-area {
  flex: 1 1 0%;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.kanban-cards-scroll-area::-webkit-scrollbar {
  width: 5px;
}
.kanban-cards-scroll-area::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}
.kanban-cards-scroll-area::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

.kanban-empty-state {
  font-size: 11.5px;
  color: var(--color-text-muted);
  text-align: center;
  padding: 24px 10px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 6px;
  border: 1px dashed var(--color-border);
}

/* Kartu Tiket Kanban */
.kanban-ticket-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  display: flex;
  flex-direction: column;
  user-select: none;
}

.kanban-ticket-card:hover {
  border-color: var(--color-primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.kanban-card-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.kanban-card-id {
  font-size: 11px;
  font-weight: 800;
  color: var(--color-primary);
  font-family: monospace;
}

.badge-indigo {
  font-size: 9px;
  background: rgba(79, 70, 229, 0.15);
  color: #818CF8;
  border: 1px solid rgba(129, 140, 248, 0.3);
}

.kanban-card-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 6px;
  line-height: 1.35;
  word-break: break-word;
}

.kanban-card-desc {
  font-size: 11px;
  color: var(--color-text-muted);
  margin-bottom: 6px;
  line-height: 1.3;
  word-break: break-word;
}

.kanban-sub-updates-list {
  background: rgba(0, 0, 0, 0.25);
  border-radius: 4px;
  padding: 6px 8px;
  margin-bottom: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 120px;
  overflow-y: auto;
}

.kanban-sub-update-item {
  font-size: 10.5px;
  color: var(--color-text-muted);
  line-height: 1.3;
  display: flex;
  gap: 4px;
  word-break: break-word;
}

.kanban-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10.5px;
  color: var(--color-text-muted);
  padding-top: 6px;
  border-top: 1px solid var(--color-border-light);
  margin-top: 4px;
  gap: 6px;
}

.kanban-card-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 55%;
}

.kanban-card-actions-strip {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.kanban-card-actions-strip .strip-btn {
  padding: 2px 6px;
  font-size: 10px;
  background: var(--color-bg-subtle);
  border-radius: 4px;
  border: 1px solid var(--color-border);
  cursor: pointer;
  color: var(--color-text);
  transition: all 0.15s ease;
}
.kanban-card-actions-strip .strip-btn:hover {
  background: var(--color-surface-hover);
  border-color: var(--color-primary);
}

.kanban-move-select {
  font-size: 10px;
  padding: 2px 4px;
  border-radius: 4px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  cursor: pointer;
}

/* Tabel List View Mode */
.tickets-view-page .card {
  flex: 1 1 0%;
  min-height: 0;
  overflow-y: auto;
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
}

/* Fallback legacy 3-kolom kanban */
.kanban-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 14px;
}

.kanban-column {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 10px;
}

.kanban-col-header {
  font-weight: 800;
  font-size: 11.5px;
  margin-bottom: 8px;
}

/* Modal */
.modal-overlay, .login-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-card, .login-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 480px;
  max-height: 90vh;
  padding: 18px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
}

.modal-card .modal-body {
  overflow-y: auto;
  min-height: 0;
  flex: 1;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.modal-close-btn {
  background: transparent;
  border: none;
  font-size: 15px;
  cursor: pointer;
  color: var(--color-text-muted);
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 32px;
  height: 18px;
}

.toggle-switch input { opacity: 0; width: 0; height: 0; }

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: var(--color-border);
  transition: .2s;
  border-radius: 18px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 12px;
  width: 12px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .2s;
  border-radius: 50%;
}

input:checked + .slider { background-color: var(--color-primary); }
input:checked + .slider:before { transform: translateX(14px); }

/* Toast */
#toast-container {
  position: fixed;
  bottom: 18px;
  right: 18px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.toast {
  background: #0F172A;
  color: #F8FAFC;
  padding: 7px 12px;
  border-radius: var(--radius-md);
  font-size: 11.5px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 6px;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   Mobile-First & Tablet Responsive Breakpoints (< 768px & < 1024px)
   ========================================================================== */

/* Tombol Back di Header Thread (Hanya Tampil di Mobile) */
.mobile-back-btn {
  display: none;
  background: transparent;
  border: none;
  color: var(--color-text);
  padding: 4px 6px;
  border-radius: var(--radius-md);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  margin-right: 4px;
}
.mobile-back-btn:hover {
  background: var(--color-border-light);
}

/* Mobile Account Horizontal Scrollable Bar */
.mobile-accounts-bar {
  display: none;
  overflow-x: auto;
  white-space: nowrap;
  padding: 8px 10px;
  gap: 6px;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
  -webkit-overflow-scrolling: touch;
}
.mobile-accounts-bar::-webkit-scrollbar { display: none; }

.mobile-account-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--color-text);
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s ease;
}
.mobile-account-chip.active {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

@media (max-width: 768px) {
  /* 1. Layout Container: Mengalokasikan ruang untuk Bottom Nav */
  .layout-wrapper {
    flex-direction: column-reverse !important;
    height: 100% !important;
    height: 100dvh !important;
    width: 100vw !important;
    overflow: hidden !important;
  }

  /* 2. Slim Sidebar -> Bottom Navigation Bar di Layar HP */
  .slim-sidebar {
    width: 100vw !important;
    height: 56px !important;
    flex-shrink: 0 !important;
    flex-direction: row !important;
    justify-content: space-around !important;
    padding: 0 4px !important;
    border-right: none !important;
    border-top: 1px solid var(--color-border) !important;
    position: relative !important;
    background: var(--color-surface) !important;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08) !important;
    z-index: 1000 !important;
  }

  .sidebar-top {
    flex-direction: row !important;
    justify-content: space-around !important;
    align-items: center !important;
    width: 100% !important;
    gap: 0 !important;
  }

  .sidebar-brand-icon {
    display: none !important;
  }

  .sidebar-nav {
    flex-direction: row !important;
    justify-content: space-around !important;
    align-items: center !important;
    width: 100% !important;
    gap: 0 !important;
  }

  .nav-icon-item {
    padding: 6px 14px !important;
    border-radius: var(--radius-md) !important;
    gap: 2px !important;
  }

  .nav-icon-item svg {
    width: 18px !important;
    height: 18px !important;
  }

  .nav-label {
    font-size: 11px !important;
    margin-top: 2px !important;
  }

  .sidebar-bottom {
    display: none !important;
  }

  /* 3. Main Wrapper & Topbar */
  .main-wrapper {
    flex: 1 1 0% !important;
    min-height: 0 !important;
    height: 100% !important;
    width: 100vw !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
  }

  .main-content {
    flex: 1 1 0% !important;
    min-height: 0 !important;
    height: 100% !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
  }

  #view-container {
    flex: 1 1 0% !important;
    min-height: 0 !important;
    height: 100% !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
  }

  .topbar {
    height: 48px !important;
    padding: 0 10px !important;
    flex-shrink: 0 !important;
  }

  .brand-badge {
    display: none !important;
  }

  .topbar-right {
    gap: 6px !important;
  }

  .topbar-right .btn-primary,
  .topbar-right .btn-secondary,
  .user-info-text {
    display: none !important;
  }

  .user-profile-bar {
    padding: 2px !important;
    border: none !important;
    background: transparent !important;
  }

  /* 4. Chat Omnichannel 4-Pane Responsive Transition */
  .chatmo-workspace-4pane {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    width: 100% !important;
    flex: 1 1 0% !important;
    min-height: 0 !important;
    position: relative !important;
    overflow: hidden !important;
  }

  /* Pane 2: Accounts & Filter - Di mobile disembunyikan kolom vertikalnya, diganti horizontal bar */
  .pane-accounts {
    display: none !important;
  }

  .mobile-accounts-bar {
    display: flex !important;
    flex-shrink: 0 !important;
  }

  /* Pane 3: Inbox List - Mengisi 100% layar saat di list view */
  .pane-inbox-list {
    width: 100% !important;
    height: 100% !important;
    flex: 1 1 0% !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    border-right: none !important;
  }

  /* Pane 4: Chat Thread - Fullscreen ketika chat dibuka */
  .pane-chat-thread {
    display: none !important;
    width: 100% !important;
    height: 100% !important;
    flex: 1 1 0% !important;
    min-height: 0 !important;
    background: var(--color-bg) !important;
    overflow: hidden !important;
    position: relative !important;
  }

  .chatmo-workspace-4pane.mobile-chat-open .pane-inbox-list {
    display: none !important;
  }

  .chatmo-workspace-4pane.mobile-chat-open .pane-chat-thread {
    display: flex !important;
    flex-direction: column !important;
  }

  .chatmo-workspace-4pane.mobile-chat-open #thread-active-state {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    flex: 1 1 0% !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  .chatmo-workspace-4pane.mobile-chat-open #thread-empty-state {
    display: none !important;
  }

  .mobile-back-btn {
    display: inline-flex !important;
  }

  /* Pane 5: AI Copilot - Overlay Bottom Sheet di HP (Default Disembunyikan) */
  .pane-copilot {
    position: fixed !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    height: 100dvh !important;
    z-index: 500 !important;
    background: var(--color-surface) !important;
    box-shadow: var(--shadow-lg) !important;
    display: none !important;
    flex-direction: column !important;
  }

  .chatmo-workspace-4pane.mobile-copilot-open .pane-copilot {
    display: flex !important;
  }

  /* Thread Header Control Wrapping di HP */
  .thread-header {
    padding: 8px 10px !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    background: var(--color-surface) !important;
    border-bottom: 1px solid var(--color-border) !important;
    flex-shrink: 0 !important;
  }

  .thread-header #ai-presence-badge,
  .thread-header #status-changed-pill,
  .thread-header #assigned-changed-pill,
  .thread-header #merged-with-pill,
  .thread-header .btn-bell-alert {
    display: none !important; /* Sembunyikan badge audit berlebih di HP agar header rapi */
  }

  /* Chat Messages & Input Composer di Mobile */
  .thread-messages-area {
    flex: 1 1 0% !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    padding: 10px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    background: var(--color-bg) !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .thread-action-strip {
    flex-shrink: 0 !important;
    padding: 4px 8px !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
    background: var(--color-surface) !important;
    border-top: 1px solid var(--color-border) !important;
  }

  /* Saat chat aktif terbuka di mobile, sembunyikan Bottom Nav agar kolom input composer menempel di bawah */
  body.mobile-chat-active .slim-sidebar {
    display: none !important;
  }

  body.mobile-chat-active .layout-wrapper {
    flex-direction: column !important;
    height: 100% !important;
    height: 100dvh !important;
  }

  body.mobile-chat-active .main-wrapper {
    height: 100% !important;
    height: 100dvh !important;
    flex: 1 1 0% !important;
    min-height: 0 !important;
  }

  body.mobile-chat-active .chatmo-workspace-4pane {
    height: 100% !important;
    flex: 1 1 0% !important;
    min-height: 0 !important;
  }

  body.mobile-chat-active .pane-chat-thread {
    height: 100% !important;
    flex: 1 1 0% !important;
    min-height: 0 !important;
  }

  body.mobile-chat-active #thread-active-state {
    height: 100% !important;
    flex: 1 1 0% !important;
    min-height: 0 !important;
  }

  .thread-input-bar {
    flex-shrink: 0 !important;
    padding: 6px 10px !important;
    background: var(--color-surface) !important;
    border-top: 1px solid var(--color-border) !important;
    z-index: 100 !important;
  }

  .chat-bubble {
    max-width: 88% !important;
  }

  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr !important;
  }

  .modal-card, .login-card {
    width: 95% !important;
    padding: 14px !important;
    max-height: 85vh !important;
  }
}

/* ==========================================================================
   2026-09-24: Optimized Media Experience (Video & WhatsApp-Style Voice Note)
   ========================================================================== */

/* Modern Video Card */
.chat-video-card {
  width: 100%;
  min-width: 240px;
  max-width: 320px;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.chat-video-wrap {
  position: relative;
  width: 100%;
  background: #000;
  display: flex;
  justify-content: center;
  align-items: center;
}

.chat-video-player {
  width: 100%;
  max-height: 260px;
  display: block;
  outline: none;
  background: #000;
}

.chat-video-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  background: rgba(15, 23, 42, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 11px;
}

.chat-video-act-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #38bdf8;
  text-decoration: none;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.15s ease;
}

.chat-video-act-btn:hover {
  background: rgba(56, 189, 248, 0.25);
  color: #fff;
}

/* WhatsApp-Style Modern Voice Note Player */
.chat-vn-player {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  min-width: 250px;
  max-width: 320px;
  margin-bottom: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-sizing: border-box;
}

.chat-bubble.out .chat-vn-player {
  background: rgba(0, 0, 0, 0.15);
  border-color: rgba(255, 255, 255, 0.15);
}

.vn-avatar-badge {
  position: relative;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-primary, #2563eb);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.vn-avatar-badge:hover {
  transform: scale(1.06);
  background: #1d4ed8;
}

.vn-play-icon {
  font-size: 14px;
  margin-left: 2px;
}

.vn-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.vn-waveform-wrap {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
}

.vn-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
  transition: background 0.15s ease;
}

.chat-bubble.out .vn-slider {
  background: rgba(255, 255, 255, 0.35);
}

.vn-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #38bdf8;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  transition: transform 0.1s ease;
}

.chat-bubble.out .vn-slider::-webkit-slider-thumb {
  background: #fff;
}

.vn-slider::-webkit-slider-thumb:hover {
  transform: scale(1.25);
}

.vn-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10.5px;
  opacity: 0.85;
  line-height: 1;
}

.vn-time-text {
  font-family: var(--font-mono, monospace);
  font-weight: 600;
}

.vn-speed-btn {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: inherit;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 9.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease;
}

.vn-speed-btn:hover {
  background: rgba(255, 255, 255, 0.28);
}

.vn-dl-btn {
  color: inherit;
  text-decoration: none;
  font-size: 11px;
  opacity: 0.7;
  padding: 2px 4px;
  border-radius: 4px;
  transition: opacity 0.15s ease;
}

.vn-dl-btn:hover {
  opacity: 1;
}

/* ==========================================================================
   HANDOVER SHIFT & PROJECT GENERATOR STYLES
   ========================================================================== */

.handover-layout-grid {
  display: grid;
  grid-template-columns: minmax(500px, 1.25fr) minmax(380px, 0.95fr);
  gap: 20px;
  align-items: start;
}

@media (max-width: 1100px) {
  .handover-layout-grid {
    grid-template-columns: 1fr;
  }
}

.handover-form-section {
  background: var(--color-surface, #1E293B);
  border: 1px solid var(--color-border, #334155);
  border-radius: var(--radius-md, 10px);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  min-width: 0;
}

.handover-category-group {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--color-border, #334155);
  border-radius: 8px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
}

.handover-category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
  gap: 8px;
}

.handover-category-title {
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 6px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.handover-item-block {
  margin-bottom: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  box-sizing: border-box;
}

.handover-item-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
}

.handover-item-num {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--color-text-muted, #94A3B8);
  width: 22px;
  flex-shrink: 0;
  text-align: right;
}

.handover-item-input {
  flex: 1;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  background: var(--color-bg, #0F172A);
  border: 1px solid var(--color-border, #334155);
  border-radius: var(--radius-sm, 6px);
  padding: 7px 11px;
  font-size: 12.5px;
  color: var(--color-text, #F8FAFC);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.handover-item-input:focus {
  border-color: var(--color-primary, #3B82F6);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.handover-subpoint-btn {
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.35);
  color: #38BDF8;
  padding: 6px 10px;
  border-radius: var(--radius-sm, 6px);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.handover-subpoint-btn:hover {
  background: rgba(59, 130, 246, 0.25);
  border-color: #38BDF8;
  color: #FFFFFF;
}

.handover-done-btn {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #10B981;
  padding: 6px 10px;
  border-radius: var(--radius-sm, 6px);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.handover-done-btn:hover {
  background: #10B981;
  border-color: #10B981;
  color: #FFFFFF;
}

.handover-move-btn {
  background: rgba(129, 140, 248, 0.12);
  border: 1px solid rgba(129, 140, 248, 0.35);
  color: #818CF8;
  padding: 6px 10px;
  border-radius: var(--radius-sm, 6px);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.handover-move-btn:hover {
  background: #6366F1;
  border-color: #6366F1;
  color: #FFFFFF;
}

.handover-del-btn {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #EF4444;
  padding: 6px 10px;
  border-radius: var(--radius-sm, 6px);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.handover-del-btn:hover {
  background: #EF4444;
  color: #FFFFFF;
  border-color: #EF4444;
}

.handover-del-btn.mini {
  padding: 4px 7px;
  font-size: 10px;
}

.handover-subpoints-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-left: 28px;
  border-left: 2px dashed rgba(59, 130, 246, 0.28);
  margin-left: 11px;
  margin-top: 2px;
  width: calc(100% - 11px);
  box-sizing: border-box;
}

.handover-subpoint-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
}

.handover-subpoint-bullet {
  font-size: 11px;
  color: #38BDF8;
  font-weight: 700;
  flex-shrink: 0;
}

.handover-subpoint-input {
  flex: 1;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  background: var(--color-bg, #0F172A);
  border: 1px solid var(--color-border, #334155);
  border-radius: var(--radius-sm, 6px);
  padding: 6px 10px;
  font-size: 12px;
  color: var(--color-text, #F8FAFC);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.handover-subpoint-input:focus {
  border-color: #38BDF8;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

.handover-subpoint-date-input {
  width: 95px;
  flex-shrink: 0;
  background: var(--color-bg, #0F172A);
  border: 1px solid var(--color-border, #334155);
  border-radius: var(--radius-sm, 6px);
  padding: 6px 8px;
  font-size: 11px;
  color: #38BDF8;
  text-align: center;
  font-weight: 600;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.handover-subpoint-date-input:focus {
  border-color: #38BDF8;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

.handover-live-preview-card {
  position: sticky;
  top: 16px;
  background: #0B141A;
  border: 1px solid #202C33;
  border-radius: var(--radius-md, 10px);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  max-height: calc(100vh - 40px);
}

.handover-preview-body {
  flex: 1;
  min-height: 250px;
  max-height: calc(100vh - 280px);
  overflow-y: auto;
  background: #111B21;
  border: 1px solid #202C33;
  border-radius: var(--radius-sm, 6px);
  padding: 14px 16px;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 11.5px;
  line-height: 1.55;
  color: #E9EDEF;
  white-space: pre-wrap;
  word-break: break-word;
  user-select: text;
}

/* Handover View Fullpage Wrapper */
.handover-view-wrapper {
  padding: 16px 20px 80px 20px;
  max-width: 1320px;
  margin: 0 auto;
  box-sizing: border-box;
  width: 100%;
}

/* ==========================================================================
   AIRing Network Observability Lab (Kentik + Archify + NextChat Hybrid)
   ========================================================================== */
.airing-lab {
  padding: 16px 20px 80px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  box-sizing: border-box;
}

.airing-lab-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 4px;
}

.airing-lab-title {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.airing-lab-title h2 {
  font-size: 1.25rem;
  font-weight: 800;
  margin: 0;
  color: var(--color-text, #f8fafc);
}

.airing-lab-badge {
  font-size: 10px;
  font-weight: 800;
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 2px 8px;
  border-radius: 9999px;
  letter-spacing: 0.5px;
}

.airing-lab-sub {
  font-size: 12px;
  color: var(--color-text-muted, #94a3b8);
}

.airing-lab-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.airing-meta-chip {
  font-size: 11px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--color-border, #334155);
  padding: 3px 8px;
  border-radius: 6px;
  color: var(--color-text, #f1f5f9);
}

.airing-meta-chip.dim {
  color: var(--color-text-muted, #94a3b8);
}

/* Zone A: Global Intel Radar Strip */
.airing-radar-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
}

.airing-radar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--color-surface, #1E293B);
  border: 1px solid var(--color-border, #334155);
  border-radius: 8px;
  transition: all 0.15s ease;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

.airing-radar-item:hover {
  border-color: #38bdf8;
  background: rgba(30, 41, 59, 0.95);
  transform: translateY(-1px);
}

.airing-radar-item.ok { border-left: 3.5px solid #10b981; }
.airing-radar-item.warn { border-left: 3.5px solid #f59e0b; }
.airing-radar-item.crit { border-left: 3.5px solid #ef4444; }
.airing-radar-item.info { border-left: 3.5px solid #38bdf8; }

.radar-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
  background: #10b981;
}

.airing-radar-item.warn .radar-dot { background: #f59e0b; }
.airing-radar-item.crit .radar-dot { background: #ef4444; }
.airing-radar-item.info .radar-dot { background: #38bdf8; }

.radar-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--color-text, #f1f5f9);
  margin-bottom: 2px;
}

.radar-link-badge {
  font-size: 9.5px;
  font-weight: 600;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 1px 6px;
  border-radius: 4px;
}

.radar-val {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text, #e2e8f0);
}

.radar-sub {
  font-size: 10.5px;
  color: var(--color-text-muted, #94a3b8);
}

/* Zone B: Main Resizable Split Grid */
.airing-kentik-grid {
  display: flex;
  flex-direction: row;
  gap: 14px;
  width: 100%;
  box-sizing: border-box;
  align-items: flex-start;
}

.airing-zone-main {
  flex: 1.25;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.airing-resizer-h {
  width: 6px;
  cursor: col-resize;
  background: transparent;
  border-radius: 3px;
  align-self: stretch;
  min-height: 200px;
  transition: background 0.15s;
  flex-shrink: 0;
}

.airing-resizer-h:hover,
.airing-resizer-h.resizing {
  background: #38bdf8;
}

.airing-zone-copilot {
  flex: 0.95;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

@media (max-width: 1100px) {
  .airing-kentik-grid {
    flex-direction: column;
  }
  .airing-resizer-h {
    display: none;
  }
}

/* AIRing Cards & Header */
.airing-card {
  background: var(--color-surface, #1E293B);
  border: 1px solid var(--color-border, #334155);
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: box-shadow 0.15s;
  min-width: 0;
}

.airing-card.copilot-card {
  border-color: rgba(56, 189, 248, 0.35);
}

.airing-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: rgba(15, 23, 42, 0.7);
  border-bottom: 1px solid var(--color-border, #334155);
  font-size: 12px;
  font-weight: 700;
  user-select: none;
}

.airing-card-head-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.airing-drag-handle {
  cursor: grab;
  color: #64748b;
  font-size: 14px;
  padding: 0 4px;
}

.airing-drag-handle:active {
  cursor: grabbing;
}

.airing-card-tag {
  font-size: 9.5px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  color: #94a3b8;
}

.airing-card-tag.emerald {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.airing-win-controls {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.airing-win-btn {
  background: transparent;
  border: 1px solid var(--color-border, #334155);
  color: #94a3b8;
  border-radius: 4px;
  width: 24px;
  height: 24px;
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
}

.airing-win-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: #94a3b8;
}

.airing-card-resizer-v {
  height: 6px;
  cursor: ns-resize;
  width: 100%;
  background: transparent;
  transition: background 0.15s;
}

.airing-card-resizer-v:hover,
.airing-card-resizer-v.resizing {
  background: #38bdf8;
}

/* Card 1: Topology */
.airing-topology-canvas {
  width: 100%;
  height: 420px;
  background: #0a0f1d;
  overflow: hidden;
  position: relative;
}

.airing-topology-canvas svg {
  width: 100%;
  height: 100%;
}

/* Card 2: Device selector & telemetry table */
.airing-device-tabs {
  display: flex;
  gap: 6px;
  padding: 8px 12px;
  background: rgba(15, 23, 42, 0.5);
  border-bottom: 1px solid var(--color-border, #334155);
  overflow-x: auto;
  scrollbar-width: thin;
}

.airing-dev-tab {
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid var(--color-border, #334155);
  background: rgba(255, 255, 255, 0.03);
  color: #94a3b8;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}

.airing-dev-tab:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #f1f5f9;
}

.airing-dev-tab.active {
  background: #2563eb;
  color: #fff;
  border-color: #3b82f6;
}

.airing-table-wrap {
  overflow-x: auto;
  max-height: 380px;
  overflow-y: auto;
}

.airing-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11.5px;
  text-align: left;
}

.airing-table th {
  padding: 8px 12px;
  background: rgba(15, 23, 42, 0.6);
  color: #94a3b8;
  font-weight: 700;
  border-bottom: 1px solid var(--color-border, #334155);
  position: sticky;
  top: 0;
  z-index: 2;
}

.airing-table td {
  padding: 8px 12px;
  border-bottom: 1px solid rgba(51, 65, 85, 0.4);
  vertical-align: middle;
}

.airing-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.airing-util-box {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 90px;
}

.airing-util-val {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  font-size: 11px;
}

.airing-util-bar-bg {
  height: 5px;
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
}

.airing-util-bar-fill {
  height: 100%;
  border-radius: 3px;
}

.airing-util-bar-fill.green { background: #10b981; }
.airing-util-bar-fill.amber { background: #f59e0b; }
.airing-util-bar-fill.red { background: #ef4444; }

.airing-ddm-tag {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
}

.airing-ddm-tag.NORMAL { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.airing-ddm-tag.WARN { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.airing-ddm-tag.CRIT { background: rgba(239, 68, 68, 0.15); color: #ef4444; }

/* Card 3: Latency Heatmap Matrix */
.airing-latency-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  padding: 12px;
}

.airing-lat-item {
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid var(--color-border, #334155);
  border-radius: 6px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.airing-lat-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.airing-lat-link {
  font-weight: 700;
  font-size: 11.5px;
  color: #f8fafc;
}

.airing-lat-metrics {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 2px;
}

.airing-lat-rtt {
  font-size: 14px;
  font-weight: 800;
}

.airing-lat-rtt.ok { color: #10b981; }
.airing-lat-rtt.warn { color: #f59e0b; }
.airing-lat-rtt.crit { color: #ef4444; }

.airing-lat-loss {
  font-size: 10.5px;
  color: #94a3b8;
}

.airing-lat-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 2px;
}

.airing-lat-fill {
  height: 100%;
  border-radius: 2px;
}

/* Card 4: Copilot Lab */
.airing-copilot-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: rgba(15, 23, 42, 0.6);
  border-bottom: 1px solid var(--color-border, #334155);
}

.persona-select-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.airing-persona-dropdown {
  background: #0f172a;
  color: #e2e8f0;
  border: 1px solid var(--color-border, #334155);
  border-radius: 6px;
  font-size: 11px;
  padding: 3px 8px;
  font-weight: 600;
  outline: none;
}

.model-pill-badge {
  font-size: 10.5px;
  font-weight: 700;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 2px 8px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.airing-context-injector-bar {
  display: flex;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(15, 23, 42, 0.3);
  border-bottom: 1px solid rgba(51, 65, 85, 0.3);
  flex-wrap: wrap;
}

.context-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  padding: 3px 8px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--color-border, #334155);
  color: #94a3b8;
  cursor: pointer;
  user-select: none;
}

.context-pill.active {
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.4);
  background: rgba(56, 189, 248, 0.08);
}

.airing-copilot-messages {
  flex: 1;
  min-height: 220px;
  max-height: 380px;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(15, 23, 42, 0.2);
}

.airing-chat-bubble {
  display: flex;
  gap: 8px;
  max-width: 90%;
}

.airing-chat-bubble.ai {
  align-self: flex-start;
}

.airing-chat-bubble.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.bubble-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #0f172a;
  border: 1px solid var(--color-border, #334155);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}

.bubble-content-wrap {
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-width: 100%;
}

.bubble-body {
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 11.5px;
  line-height: 1.5;
  color: #f1f5f9;
}

.airing-chat-bubble.ai .bubble-body {
  background: #1e293b;
  border: 1px solid var(--color-border, #334155);
}

.airing-chat-bubble.user .bubble-body {
  background: #2563eb;
  color: #fff;
}

.airing-quick-chips-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 8px 12px;
  border-top: 1px solid rgba(51, 65, 85, 0.3);
  background: rgba(15, 23, 42, 0.3);
}

.copilot-chip {
  padding: 5px 8px;
  font-size: 10.5px;
  font-weight: 600;
  text-align: left;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--color-border, #334155);
  border-radius: 6px;
  color: #cbd5e1;
  cursor: pointer;
  transition: all 0.15s;
}

.copilot-chip:hover {
  background: rgba(56, 189, 248, 0.1);
  border-color: #38bdf8;
  color: #38bdf8;
}

.airing-copilot-input-row {
  display: flex;
  gap: 6px;
  padding: 10px 12px;
  border-top: 1px solid var(--color-border, #334155);
  background: rgba(15, 23, 42, 0.6);
  align-items: center;
}

.btn-airing-send {
  width: 32px;
  height: 32px;
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
  flex-shrink: 0;
}

.btn-airing-send:hover {
  background: #1d4ed8;
}

/* Card 5: Weathermap */
.coremap-dash {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
}

.coremap-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(51, 65, 85, 0.4);
}

.coremap-legend-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.coremap-idx-pill {
  font-size: 9.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
}

.coremap-idx-pill.green { background: rgba(16, 185, 129, 0.15); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.3); }
.coremap-idx-pill.yellow { background: rgba(234, 179, 8, 0.15); color: #eab308; border: 1px solid rgba(234, 179, 8, 0.3); }
.coremap-idx-pill.orange { background: rgba(249, 115, 22, 0.15); color: #f97316; border: 1px solid rgba(249, 115, 22, 0.3); }
.coremap-idx-pill.red { background: rgba(239, 68, 68, 0.15); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.3); }

.coremap-stats-summary {
  display: flex;
  gap: 10px;
  font-size: 11px;
  color: #94a3b8;
}

.coremap-view-toggle {
  display: flex;
  gap: 4px;
}

.coremap-toggle-btn {
  padding: 3px 8px;
  font-size: 10.5px;
  font-weight: 600;
  border-radius: 4px;
  border: 1px solid var(--color-border, #334155);
  background: rgba(255, 255, 255, 0.03);
  color: #94a3b8;
  cursor: pointer;
}

.coremap-toggle-btn.active {
  background: #2563eb;
  color: #fff;
  border-color: #3b82f6;
}

.coremap-svg-container {
  width: 100%;
  height: 380px;
  background: #0B132B;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--color-border, #334155);
}

.coremap-svg {
  width: 100%;
  height: 100%;
}

.coremap-table-wrap {
  overflow-x: auto;
  max-height: 380px;
}

.coremap-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  text-align: left;
}

.coremap-table th {
  padding: 7px 10px;
  background: rgba(15, 23, 42, 0.6);
  color: #94a3b8;
  border-bottom: 1px solid var(--color-border, #334155);
  font-weight: 700;
  position: sticky;
  top: 0;
}

.coremap-table td {
  padding: 7px 10px;
  border-bottom: 1px solid rgba(51, 65, 85, 0.4);
}

/* Dock Tray & Drag states */
.airing-dock-tray {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(12px);
  border: 1px solid var(--color-border, #334155);
  border-radius: 9999px;
  padding: 6px 16px;
  display: flex;
  gap: 8px;
  z-index: 100;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.airing-dock-item {
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--color-border, #334155);
  color: #e2e8f0;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

.airing-dock-item:hover {
  background: #2563eb;
  color: #fff;
}

.airing-drop-placeholder {
  border: 2px dashed #38bdf8;
  border-radius: 8px;
  background: rgba(56, 189, 248, 0.05);
  margin-bottom: 14px;
}

.airing-card.dragging {
  opacity: 0.4;
}

/* ==========================================================================
   Theme & Wallpaper Customization Modal (Presets, Swatches & Live Preview)
   ========================================================================== */
.theme-customizer-box {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 76vh;
  overflow-y: auto;
  padding: 4px;
}

.theme-presets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
}

.theme-preset-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md, 10px);
  padding: 10px 8px;
  background: var(--color-surface);
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  user-select: none;
}

.theme-preset-card:hover {
  transform: translateY(-2px);
  border-color: var(--color-primary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.theme-preset-card.active {
  border-color: var(--color-primary);
  background: var(--color-primary-soft, rgba(37, 99, 235, 0.1));
  box-shadow: 0 0 0 2px var(--color-primary);
}

.theme-swatch-trio {
  display: flex;
  align-items: center;
  gap: 4px;
}

.theme-swatch-dot {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.theme-preset-name {
  font-size: 11px;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.2;
}

/* Live Simulation Stage */
.theme-preview-stage {
  border-radius: var(--radius-md, 10px);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 150px;
  border: 1px solid var(--color-border);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.25);
  position: relative;
  overflow: hidden;
  transition: background-color 0.2s, background-image 0.2s;
}

.theme-preview-bubble {
  max-width: 80%;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.45;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  gap: 3px;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}

.theme-preview-bubble.in {
  align-self: flex-start;
  border-top-left-radius: 2px;
}

.theme-preview-bubble.out {
  align-self: flex-end;
  border-top-right-radius: 2px;
}

.theme-color-section {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md, 10px);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.theme-color-section-title {
  font-size: 11.5px;
  font-weight: 800;
  color: var(--color-text);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.theme-color-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.theme-color-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-muted);
}

.theme-color-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.theme-color-picker {
  -webkit-appearance: none;
  appearance: none;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  cursor: pointer;
  background: transparent;
  padding: 0;
  flex-shrink: 0;
}

.theme-color-picker::-webkit-color-swatch-wrapper {
  padding: 0;
}

.theme-color-picker::-webkit-color-swatch {
  border: 1px solid var(--color-border);
  border-radius: 6px;
}

.theme-hex-input {
  font-family: monospace;
  font-size: 11.5px;
  width: 82px;
  padding: 5px 8px;
  border-radius: 6px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  text-transform: uppercase;
  outline: none;
}

.theme-hex-input:focus {
  border-color: var(--color-primary);
}

/* ==========================================================================
   2026-09-25: Image & Media Attachment Editor Modal (Proportional & Responsive)
   ========================================================================== */

.modal-card.modal-media-editor {
  max-width: 860px !important;
  width: 94vw !important;
  max-height: 90vh !important;
  display: flex !important;
  flex-direction: column !important;
  padding: 14px 18px !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

.modal-card.modal-media-editor .modal-header {
  flex-shrink: 0;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--color-border);
}

.modal-card.modal-media-editor .modal-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding-right: 4px;
}

.image-editor-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-height: 0;
}

.image-editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: var(--color-bg);
  border-radius: 8px;
  border: 1px solid var(--color-border);
  flex-shrink: 0;
}

.editor-tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  font-size: 11.5px;
  font-weight: 600;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.editor-tool-btn:hover {
  background: var(--color-border);
}

.editor-tool-btn.active {
  background: var(--color-primary);
  color: #ffffff;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px var(--color-primary-soft);
}

.editor-color-picker-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 4px;
  padding: 3px 8px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 20px;
}

.editor-color-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.15s ease;
}

.editor-color-dot:hover {
  transform: scale(1.2);
}

.editor-color-dot.active {
  border-color: #ffffff;
  outline: 2px solid var(--color-primary);
  transform: scale(1.1);
}

.editor-canvas-container {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #090d16;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  overflow: hidden;
  position: relative;
  height: 380px;
  max-height: 48vh;
  min-height: 220px;
  padding: 6px;
  box-sizing: border-box;
  flex-shrink: 1;
  flex-grow: 1;
}

.editor-canvas-container canvas {
  max-width: 100% !important;
  max-height: 100% !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
  border-radius: 4px;
  display: block;
}

.media-editor-thumbnails {
  display: flex;
  gap: 8px;
  align-items: center;
  overflow-x: auto;
  padding: 4px 2px;
  flex-shrink: 0;
}

/* Media Attachment Caption Textarea (WhatsApp Web Parity: Multiline & Shift+Enter) */
.media-caption-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 2px;
}

.media-caption-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--color-text-muted);
}

.media-caption-hint {
  font-size: 11px;
  font-weight: 400;
  color: var(--color-text-muted);
  opacity: 0.85;
  display: flex;
  align-items: center;
  gap: 4px;
}

.caption-kbd {
  display: inline-block;
  padding: 1px 5px;
  font-family: inherit;
  font-size: 10px;
  font-weight: 600;
  color: var(--color-text);
  background: var(--color-surface, rgba(255, 255, 255, 0.08));
  border: 1px solid var(--color-border);
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}

.media-caption-textarea {
  width: 100%;
  box-sizing: border-box;
  min-height: 42px;
  max-height: 140px;
  padding: 8px 12px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md, 8px);
  color: var(--color-text);
  font-family: inherit;
  font-size: 13.5px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
  resize: none;
  overflow-y: auto;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.media-caption-textarea:focus {
  border-color: #25D366;
  box-shadow: 0 0 0 2px rgba(37, 211, 102, 0.22);
}

.media-caption-textarea::placeholder {
  color: var(--color-text-muted);
  opacity: 0.7;
}

@media (max-width: 768px) {
  .modal-card.modal-media-editor {
    width: 98vw !important;
    padding: 10px 12px !important;
    max-height: 94vh !important;
  }

  .editor-canvas-container {
    height: 260px;
    max-height: 38vh;
    min-height: 180px;
  }

  .image-editor-toolbar {
    gap: 4px;
    padding: 4px 6px;
  }

  .editor-tool-btn {
    padding: 4px 7px;
    font-size: 10.5px;
  }
}

/* ==========================================================================
   2026-09-27: Modal Pengaturan Signature & Brand serta Sound Notifikasi (Kompak, Responsif & Fit di Layar)
   ========================================================================== */
.modal-card.modal-signature-config,
.modal-card.modal-sound-config {
  max-width: 660px !important;
  width: 94vw !important;
  max-height: 86vh !important;
  height: auto !important;
  display: flex !important;
  flex-direction: column !important;
  padding: 14px 18px !important;
  overflow: hidden !important;
  border-radius: 12px !important;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5) !important;
}

.modal-card.modal-signature-config .modal-header,
.modal-card.modal-sound-config .modal-header {
  flex-shrink: 0 !important;
  margin-bottom: 8px !important;
  padding-bottom: 6px !important;
  border-bottom: 1px solid var(--color-border) !important;
}

.modal-card.modal-signature-config .modal-body,
.modal-card.modal-signature-config #modal-body,
.modal-card.modal-sound-config .modal-body,
.modal-card.modal-sound-config #modal-body {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding-right: 4px !important;
  display: flex !important;
  flex-direction: column !important;
}

@media (max-width: 768px) {
  .modal-card.modal-signature-config,
  .modal-card.modal-sound-config {
    width: 98vw !important;
    padding: 10px 12px !important;
    max-height: 94vh !important;
  }
}

/* ==========================================================================
   2026-09-25: Image & Video Lightbox Modal Viewer (HD Pop-up Viewer)
   ========================================================================== */
.image-lightbox-overlay {
  position: fixed !important;
  inset: 0 !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(8, 12, 16, 0.88) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  z-index: 99999 !important;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
  animation: lightboxFadeIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes lightboxFadeIn {
  from {
    opacity: 0;
    transform: scale(0.985);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.image-lightbox-container {
  display: flex;
  flex-direction: column;
  max-width: 94vw;
  max-height: 94vh;
  width: auto;
  background: var(--color-surface, #1e2428);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.85), 0 4px 16px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  position: relative;
}

.image-lightbox-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: rgba(0, 0, 0, 0.4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  gap: 14px;
  user-select: none;
  flex-shrink: 0;
}

.image-lightbox-title {
  font-size: 13.5px;
  font-weight: 600;
  color: #e9edef;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.2px;
  max-width: 55vw;
}

.image-lightbox-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.lightbox-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: #e9edef;
  box-sizing: border-box;
}

.lightbox-action-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff;
  transform: translateY(-1px);
}

.lightbox-action-btn.close {
  background: rgba(239, 68, 68, 0.16);
  border-color: rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  font-size: 15px;
  font-weight: bold;
  width: 32px;
  padding: 0;
}

.lightbox-action-btn.close:hover {
  background: rgba(239, 68, 68, 0.35);
  border-color: rgba(239, 68, 68, 0.7);
  color: #fff;
}

.image-lightbox-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  background: #080c10;
  padding: 14px;
  box-sizing: border-box;
  min-width: 280px;
  min-height: 200px;
  max-height: calc(94vh - 54px);
}

.lightbox-image-fit {
  max-width: 100%;
  max-height: calc(88vh - 70px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  cursor: zoom-in;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
  display: block;
}

.lightbox-image-zoomed {
  max-width: none !important;
  max-height: none !important;
  width: auto !important;
  height: auto !important;
  cursor: zoom-out;
  border-radius: 6px;
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.75);
  display: block;
}

/* Chat Bubble Media Image Preview */
.chat-media-image-wrap {
  position: relative;
  margin-bottom: 6px;
  border-radius: 8px;
  overflow: hidden;
  max-width: 320px;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.chat-media-image-wrap:hover {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
  border-color: var(--color-primary, #00a884);
}

.chat-bubble-image-thumb {
  width: 100%;
  max-height: 240px;
  object-fit: cover;
  display: block;
  border-radius: 7px;
  transition: transform 0.2s ease, filter 0.15s ease;
}

.chat-media-image-wrap:hover .chat-bubble-image-thumb {
  transform: scale(1.015);
  filter: brightness(1.04);
}

.chat-image-hover-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
  opacity: 0;
  transform: translateY(4px);
  transition: all 0.18s ease;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.chat-media-image-wrap:hover .chat-image-hover-badge {
  opacity: 1;
  transform: translateY(0);
}

/* ==============================================================================
   Modern WhatsApp Location Card (.chat-location-card)
   ============================================================================== */
.chat-location-card {
  width: 100%;
  min-width: 250px;
  max-width: 330px;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 6px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
  font-family: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.chat-location-card:hover {
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
}

.chat-location-map-wrap {
  position: relative;
  width: 100%;
  height: 155px;
  background: #0f172a;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-location-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease;
}

.chat-location-map-wrap:hover .chat-location-thumb {
  transform: scale(1.04);
}

/* Fallback Map Styling jika tidak ada thumbnail byte */
.chat-location-map-fallback {
  position: relative;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.map-grid-bg {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.7;
}

/* Pin Merah Berdenyut (Pulse Wave) */
.chat-location-pin-pulse {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  margin-bottom: 6px;
}

.chat-location-pin-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  filter: drop-shadow(0 2px 5px rgba(0,0,0,0.7));
}

.chat-location-pin-icon {
  font-size: 32px;
  line-height: 1;
  animation: floatPin 1.5s ease-in-out infinite alternate;
}

@keyframes floatPin {
  0% { transform: translateY(0); }
  100% { transform: translateY(-6px); }
}

.pin-symbol {
  font-size: 34px;
  line-height: 1;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.6));
  animation: floatPin 1.5s ease-in-out infinite alternate;
}

.pin-pulse-wave {
  position: absolute;
  width: 24px;
  height: 10px;
  background: rgba(239, 68, 68, 0.4);
  border-radius: 50%;
  bottom: -4px;
  animation: pulseShadow 1.5s infinite;
}

@keyframes pulseShadow {
  0% { transform: scale(0.8); opacity: 0.8; }
  100% { transform: scale(2.2); opacity: 0; }
}

.map-coords-badge {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  color: #94a3b8;
  font-size: 10px;
  font-family: ui-monospace, monospace;
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  z-index: 3;
}

.map-hover-hint {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 11.5px;
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 4;
}

.chat-location-map-wrap:hover .map-hover-hint {
  opacity: 1;
}

/* Info Box */
.chat-location-info {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: rgba(15, 23, 42, 0.75);
}

.chat-location-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.chat-location-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--color-text, #f1f5f9);
  line-height: 1.3;
  display: flex;
  align-items: center;
  gap: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.loc-marker-icon {
  font-size: 14px;
  flex-shrink: 0;
}

.chat-location-live-badge {
  font-size: 9.5px;
  font-weight: 800;
  color: #ef4444;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 1px 6px;
  border-radius: 10px;
  letter-spacing: 0.5px;
  flex-shrink: 0;
  animation: pulseBadge 1.2s infinite;
}

@keyframes pulseBadge {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.chat-location-address {
  font-size: 11.5px;
  color: var(--color-text-muted, #94a3b8);
  line-height: 1.4;
  word-break: break-word;
}

.chat-location-web-link a {
  font-size: 11px;
  color: #38bdf8;
  text-decoration: none;
  word-break: break-all;
}

.chat-location-web-link a:hover {
  text-decoration: underline;
}

.chat-location-coords-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  font-size: 10.5px;
}

.chat-location-coords-row .coord-label {
  color: #64748b;
  font-weight: 600;
}

.chat-location-coords-row .coord-val {
  color: #cbd5e1;
  background: rgba(0, 0, 0, 0.25);
  padding: 1px 5px;
  border-radius: 3px;
  font-family: ui-monospace, monospace;
}

.coord-copy-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 1px 4px;
  font-size: 11px;
  color: #94a3b8;
  border-radius: 3px;
  transition: all 0.15s ease;
}

.coord-copy-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

/* Action Buttons */
.chat-location-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.loc-act-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
  padding: 5px 8px;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.loc-btn-maps {
  background: rgba(14, 165, 233, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(14, 165, 233, 0.3);
}

.loc-btn-maps:hover {
  background: rgba(14, 165, 233, 0.28);
  color: #fff;
}

.loc-btn-dir {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.loc-btn-dir:hover {
  background: rgba(16, 185, 129, 0.28);
  color: #fff;
}

/* ==============================================================================
   Modern WhatsApp Contact Card (.chat-contact-card)
   ============================================================================== */
.chat-contact-card {
  width: 100%;
  min-width: 240px;
  max-width: 320px;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 6px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  font-family: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

[data-theme="light"] .chat-contact-card {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.chat-contact-main {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
}

.chat-contact-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
  flex-shrink: 0;
  user-select: none;
}

.chat-contact-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.chat-contact-name {
  font-size: 13.5px;
  font-weight: 700;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
}

[data-theme="light"] .chat-contact-name {
  color: #0f172a;
}

.chat-contact-org {
  font-size: 11px;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

[data-theme="light"] .chat-contact-org {
  color: #64748b;
}

.chat-contact-phone {
  font-size: 11.5px;
  color: #38bdf8;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

[data-theme="light"] .chat-contact-phone {
  color: #0284c7;
}

.chat-contact-email {
  font-size: 11px;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

[data-theme="light"] .chat-contact-email {
  color: #64748b;
}

.chat-contact-actions {
  display: flex;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.18);
}

[data-theme="light"] .chat-contact-actions {
  border-top-color: #f1f5f9;
  background: #f8fafc;
}

.contact-act-btn {
  flex: 1;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px 10px;
  font-size: 11.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: #cbd5e1;
  transition: all 0.15s ease;
}

[data-theme="light"] .contact-act-btn {
  color: #334155;
}

.contact-act-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

[data-theme="light"] .contact-act-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.contact-act-btn.btn-chat {
  color: #34d399;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

[data-theme="light"] .contact-act-btn.btn-chat {
  color: #059669;
  border-right-color: #f1f5f9;
}

.contact-act-btn.btn-chat:hover {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.contact-act-btn.btn-copy {
  color: #38bdf8;
}

[data-theme="light"] .contact-act-btn.btn-copy {
  color: #0284c7;
}

.contact-act-btn.btn-copy:hover {
  background: rgba(14, 165, 233, 0.15);
  color: #0ea5e9;
}





/* =========================================================================
   2026-10-04: WhatsApp Web Parity - Unread Message Bubble & Inbox Card Highlight
   ========================================================================= */

/* Bubble Badge Unread ala WhatsApp Web (Bulat sempurna / pill) */
.unread-badge {
  background: #25D366;
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 1;
  letter-spacing: 0.02em;
  box-shadow: 0 1px 3px rgba(37, 211, 102, 0.4);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  animation: wa-badge-pop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes wa-badge-pop {
  0% { transform: scale(0.7); opacity: 0.5; }
  100% { transform: scale(1); opacity: 1; }
}

.unread-badge.is-muted {
  background: #8696A0;
  color: #FFFFFF;
  box-shadow: none;
}

/* Mini Badge untuk Tab Filter 'Belum Dibaca' */
.badge-unread-mini {
  background: #25D366;
  color: #FFFFFF;
  font-size: 10px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9999px;
  margin-left: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Highlight Kolom Chat Inbox yang Memiliki Pesan Belum Dibaca (Ala WhatsApp Web) */
.chat-card-item.has-unread {
  background: rgba(37, 211, 102, 0.06);
  border-left: 3.5px solid #25D366;
  border-color: rgba(37, 211, 102, 0.25);
}

.chat-card-item.has-unread:hover {
  background: rgba(37, 211, 102, 0.12);
  border-left-color: #25D366;
  border-color: rgba(37, 211, 102, 0.45);
}

.chat-card-item.has-unread.active {
  background: rgba(37, 211, 102, 0.16);
  border-left-color: #25D366;
  border-color: #25D366;
}

/* Waktu Pesan Terakhir Hijau saat Unread (Identik WhatsApp Web) */
.chat-card-item.has-unread .chat-time {
  color: var(--color-primary) !important;
  font-weight: 700;
}

/* Judul Kontak Lebih Tebal & Menonjol saat Unread */
.chat-card-item.has-unread .chat-contact-title {
  font-weight: 800;
  color: var(--color-text);
}

/* Preview Pesan Terakhir Lebih Terang saat Unread */
.chat-card-item.has-unread .chat-snippet {
  font-weight: 600;
  color: var(--color-text);
}

/* Ring Halus pada Avatar untuk Chat Unread */
.chat-card-item.has-unread .chat-avatar-circle {
  box-shadow: 0 0 0 1.5px #25D366;
}


/* Cockpit Empty State (Impeccable Operate Mode Polish) */
.cockpit-empty-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background: var(--color-bg);
  text-align: center;
}
.cockpit-empty-card {
  max-width: 440px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  box-shadow: var(--shadow-md);
}
.cockpit-empty-icon-wrap {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--color-primary-soft);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2px;
}
.cockpit-empty-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text);
  margin: 0;
}
.cockpit-empty-desc {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--color-text-muted);
  margin: 0;
}
.cockpit-empty-features {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 6px;
}
.cockpit-empty-badge {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--color-text-muted);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  padding: 4px 10px;
  border-radius: var(--radius-full);
}


/* === AIRing Lab Enterprise Suite Optimizations (Impeccable Operate Mode) === */

/* Compact KPI Radar Ticker Strip */
.airing-radar-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 8px !important;
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 4px !important;
}

.airing-radar-item {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 6px 12px !important;
  background: var(--color-surface, #1E293B) !important;
  border: 1px solid var(--color-border, #334155) !important;
  border-radius: var(--radius-sm) !important;
  min-height: 42px !important;
  box-sizing: border-box;
}

.airing-radar-item .radar-dot {
  width: 8px !important;
  height: 8px !important;
  border-radius: 50% !important;
  flex-shrink: 0 !important;
}

.airing-radar-item .radar-label {
  font-size: 11px !important;
  font-weight: 700 !important;
  color: #f1f5f9 !important;
  line-height: 1.2 !important;
}

.airing-radar-item .radar-val {
  font-size: 11px !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
}

.airing-radar-item.ok .radar-val { color: #10b981 !important; }
.airing-radar-item.warn .radar-val { color: #f59e0b !important; }
.airing-radar-item.crit .radar-val { color: #ef4444 !important; }
.airing-radar-item.info .radar-val { color: #38bdf8 !important; }

/* Weathermap Zoom & Triage Controls */
.coremap-zoom-overlay {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  z-index: 15;
}

.coremap-zoom-btn {
  width: 28px;
  height: 28px;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(51, 65, 85, 0.8);
  color: #f1f5f9;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  backdrop-filter: blur(4px);
  user-select: none;
}

.coremap-zoom-btn:hover {
  background: var(--color-primary, #2563eb);
  border-color: var(--color-primary, #2563eb);
  color: #ffffff;
}

.coremap-filter-crit-btn {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.coremap-filter-crit-btn:hover,
.coremap-filter-crit-btn.active {
  background: #ef4444 !important;
  color: #ffffff !important;
  border-color: #ef4444 !important;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
}

/* Weathermap Filter High Utilization Mode */
.coremap-svg.filter-high-active .coremap-link-group.is-normal {
  opacity: 0.12;
  transition: opacity 0.25s ease;
}

.coremap-svg.filter-high-active .coremap-link-group.is-high line {
  stroke-width: 5.5 !important;
  filter: drop-shadow(0 0 6px currentColor);
}

.coremap-svg.filter-high-active .coremap-node-group.is-dimmed {
  opacity: 0.25;
  transition: opacity 0.25s ease;
}

/* Copilot Quick Ticket Button */
.btn-airing-ticket-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(37, 99, 235, 0.15);
  border: 1px solid rgba(37, 99, 235, 0.4);
  color: #93c5fd;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  margin-top: 6px;
  transition: all 0.15s ease;
}

.btn-airing-ticket-action:hover {
  background: var(--color-primary, #2563eb);
  color: #ffffff;
  border-color: var(--color-primary, #2563eb);
}

/* Sub-label Floor 11px Standard */
.airing-chat-bubble .bubble-content-wrap > div:last-child {
  font-size: 11px !important;
  color: #94a3b8 !important;
  font-weight: 500 !important;
}

/* === Interactive Topology & Signal Flow Engine in Weathermap (Opsi 2) === */
@keyframes topoFlowMarchingAnts {
  from {
    stroke-dashoffset: 28;
  }
  to {
    stroke-dashoffset: 0;
  }
}

.coremap-svg.flow-active .coremap-link-group.is-flow-path line {
  stroke-dasharray: 7 4 !important;
  animation: topoFlowMarchingAnts 0.85s linear infinite !important;
  stroke-width: 4.8px !important;
  filter: drop-shadow(0 0 6px currentColor) !important;
}

.coremap-svg.flow-active .coremap-link-group:not(.is-flow-connected) {
  opacity: 0.12 !important;
  transition: opacity 0.25s ease;
}

.coremap-svg.flow-active .coremap-node-group:not(.is-flow-connected) {
  opacity: 0.22 !important;
  transition: opacity 0.25s ease;
}

.coremap-node-group {
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.25s ease;
}

.coremap-node-group:hover circle {
  stroke-width: 3.5px !important;
  filter: drop-shadow(0 0 8px #38bdf8);
}

.coremap-node-group.is-flow-origin circle {
  stroke: #f59e0b !important;
  stroke-width: 4px !important;
  filter: drop-shadow(0 0 10px #f59e0b) !important;
}

.coremap-node-group.is-flow-neighbor circle {
  stroke: #38bdf8 !important;
  stroke-width: 3px !important;
  filter: drop-shadow(0 0 8px #38bdf8) !important;
}

.coremap-flow-active-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.45);
  color: #fbbf24;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  animation: fadeIn 0.2s ease-out;
}

.coremap-flow-reset-btn {
  background: transparent;
  border: none;
  color: #fca5a5;
  cursor: pointer;
  font-weight: bold;
  padding: 0 4px;
  margin-left: 2px;
  border-radius: 4px;
  transition: all 0.15s;
}

.coremap-flow-reset-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

/* ==========================================================================
   AiRing Superagent Studio (1-Layar Penuh · Gemini Web & Superagent Parity)
   ========================================================================== */
.airing-subview-switcher {
  display: inline-flex;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(51, 65, 85, 0.8);
  border-radius: 8px;
  padding: 2px;
  gap: 3px;
}

.airing-subview-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.airing-subview-btn:hover {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.05);
}

.airing-subview-btn.active {
  background: #10b981;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.35);
}

/* Studio Workspace Container */
.airing-studio-workspace {
  display: flex;
  flex: 1 1 0%;
  min-height: 0;
  height: 100%;
  background: #090e1a;
  border: 1px solid var(--color-border, #334155);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  margin-top: 10px;
}

/* Studio Left Sidebar (260px) */
.studio-sidebar {
  width: 260px;
  background: #0d1527;
  border-right: 1px solid rgba(51, 65, 85, 0.6);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.studio-sidebar-top {
  padding: 14px;
  border-bottom: 1px solid rgba(51, 65, 85, 0.4);
}

.btn-studio-new-chat {
  width: 100%;
  background: #10b981;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 9px 14px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.15s ease;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.btn-studio-new-chat:hover {
  background: #059669;
  transform: translateY(-1px);
}

.studio-session-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.studio-session-item {
  padding: 9px 12px;
  border-radius: 7px;
  color: #94a3b8;
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s ease;
  border: 1px solid transparent;
}

.studio-session-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #f1f5f9;
}

.studio-session-item.active {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.4);
  color: #34d399;
  font-weight: 700;
}

.studio-sidebar-crm-pin {
  padding: 12px;
  background: rgba(15, 23, 42, 0.85);
  border-top: 1px solid rgba(51, 65, 85, 0.5);
}

.studio-crm-pin-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #64748b;
  font-weight: 700;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.studio-crm-select {
  width: 100%;
  background: #1e293b;
  border: 1px solid #334155;
  color: #f8fafc;
  font-size: 11px;
  padding: 6px 8px;
  border-radius: 6px;
  outline: none;
  cursor: pointer;
}

/* Studio Center Canvas (Flexible Hero) */
.studio-canvas {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #090e1a;
  position: relative;
}

.studio-canvas-head {
  padding: 12px 18px;
  background: rgba(13, 21, 39, 0.85);
  border-bottom: 1px solid rgba(51, 65, 85, 0.5);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.studio-canvas-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.studio-canvas-title h3 {
  margin: 0;
  font-size: 13.5px;
  font-weight: 700;
  color: #f8fafc;
}

.studio-messages-stream {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.studio-bubble {
  display: flex;
  gap: 12px;
  max-width: 900px;
  animation: fadeIn 0.2s ease-out;
}

.studio-bubble.user {
  margin-left: auto;
  flex-direction: row-reverse;
}

.studio-avatar {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}

.studio-bubble.ai .studio-avatar {
  background: linear-gradient(135deg, #10b981, #0284c7);
  color: #fff;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
}

.studio-bubble.user .studio-avatar {
  background: #3b82f6;
  color: #fff;
}

.studio-bubble-content {
  background: #111a2e;
  border: 1px solid rgba(51, 65, 85, 0.6);
  border-radius: 10px;
  padding: 14px 16px;
  color: #e2e8f0;
  font-size: 12.5px;
  line-height: 1.6;
  max-width: 820px;
}

.studio-bubble.user .studio-bubble-content {
  background: #1e3a8a;
  border-color: #3b82f6;
  color: #ffffff;
}

/* Studio Mini Diagnostic Card */
.studio-diagnostic-card {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 8px;
  padding: 12px 14px;
  margin-top: 10px;
}

/* Studio Bottom Input Bar (Gemini Capsule) */
.studio-input-capsule-wrap {
  padding: 12px 20px 16px 20px;
  background: rgba(13, 21, 39, 0.95);
  border-top: 1px solid rgba(51, 65, 85, 0.5);
}

.studio-quick-chips {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
  overflow-x: auto;
}

.studio-chip-btn {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(51, 65, 85, 0.7);
  color: #94a3b8;
  font-size: 10.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 9999px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.studio-chip-btn:hover {
  background: rgba(16, 185, 129, 0.15);
  border-color: #10b981;
  color: #34d399;
}

.studio-input-capsule {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #0d1527;
  border: 1px solid #334155;
  border-radius: 10px;
  padding: 6px 12px;
  transition: border-color 0.15s;
}

.studio-input-capsule:focus-within {
  border-color: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.studio-mention-crm-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
  cursor: pointer;
}

.studio-textarea {
  flex: 1;
  background: transparent;
  border: none;
  color: #f8fafc;
  font-size: 12.5px;
  outline: none;
  padding: 6px;
  font-family: inherit;
}

.btn-studio-send {
  background: #10b981;
  border: none;
  color: #ffffff;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.15s;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.35);
}

.btn-studio-send:hover {
  background: #059669;
}

/* Studio Right CRM Context Drawer (320px) */
.studio-crm-drawer {
  width: 320px;
  background: #0d1527;
  border-left: 1px solid rgba(51, 65, 85, 0.6);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: width 0.2s ease, opacity 0.2s ease;
}

.studio-crm-drawer.collapsed {
  width: 0;
  opacity: 0;
  overflow: hidden;
  border-left: none;
}

.studio-drawer-head {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(51, 65, 85, 0.5);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.studio-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.studio-customer-card {
  background: #111a2e;
  border: 1px solid rgba(51, 65, 85, 0.7);
  border-radius: 8px;
  padding: 12px;
}

.studio-chat-feed {
  background: #090e1a;
  border: 1px solid rgba(51, 65, 85, 0.5);
  border-radius: 8px;
  padding: 10px;
  max-height: 220px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.studio-wa-msg {
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 11px;
  line-height: 1.4;
  max-width: 90%;
}

.studio-wa-msg.inbound {
  background: #1e293b;
  color: #f1f5f9;
  align-self: flex-start;
  border-left: 2px solid #38bdf8;
}

.studio-wa-msg.outbound {
  background: #064e3b;
  color: #a7f3d0;
  align-self: flex-end;
  border-right: 2px solid #10b981;
}

.studio-drawer-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: auto;
}

.btn-studio-action-wa {
  background: #10b981;
  color: #ffffff;
  border: none;
  border-radius: 7px;
  padding: 9px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
}

.btn-studio-action-wa:hover {
  background: #059669;
}

.btn-studio-action-ticket {
  background: #1e293b;
  color: #cbd5e1;
  border: 1px solid #334155;
  border-radius: 7px;
  padding: 8px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s;
}

.btn-studio-action-ticket:hover {
  background: #334155;
  color: #ffffff;
}

/* WhatsApp Web Parity: In-Chat Draft Indicator */
.chat-draft-prefix {
  color: #25D366;
  font-weight: 700;
  margin-right: 4px;
  display: inline-block;
  letter-spacing: 0.2px;
}

.chat-draft-text {
  color: var(--color-text-main, #E2E8F0);
  font-weight: 500;
}

.chat-card-item.has-draft .chat-snippet {
  color: var(--color-text-main, #E2E8F0);
}




/* ============================================================ */
/* AiRing Incident Ticket Generator Modal (F1)                  */
/* ============================================================ */
.airing-ticket-modal-backdrop, #airing-ticket-modal {
  position: fixed !important;
  inset: 0 !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(0, 0, 0, 0.75) !important;
  backdrop-filter: blur(5px) !important;
  -webkit-backdrop-filter: blur(5px) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 999999 !important;
  margin: 0 !important;
  padding: 0 !important;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ============================================================ */
/* WhatsApp Web Style Image Cropper (2026-10-23)                 */
/* ============================================================ */
.editor-canvas-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  max-height: 100%;
  border-radius: 4px;
}

.editor-crop-overlay {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 4px;
  pointer-events: none;
  z-index: 20;
}

.editor-crop-box {
  position: absolute;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.65);
  border: 1.5px solid rgba(255, 255, 255, 0.95);
  pointer-events: auto;
  cursor: move;
  touch-action: none;
  box-sizing: border-box;
}

/* Grid Rule-of-Thirds */
.crop-grid-h1, .crop-grid-h2, .crop-grid-v1, .crop-grid-v2 {
  position: absolute;
  pointer-events: none;
}
.crop-grid-h1 {
  top: 33.333%;
  left: 0;
  right: 0;
  height: 1px;
  border-top: 1px dashed rgba(255, 255, 255, 0.35);
}
.crop-grid-h2 {
  top: 66.666%;
  left: 0;
  right: 0;
  height: 1px;
  border-top: 1px dashed rgba(255, 255, 255, 0.35);
}
.crop-grid-v1 {
  left: 33.333%;
  top: 0;
  bottom: 0;
  width: 1px;
  border-left: 1px dashed rgba(255, 255, 255, 0.35);
}
.crop-grid-v2 {
  left: 66.666%;
  top: 0;
  bottom: 0;
  width: 1px;
  border-left: 1px dashed rgba(255, 255, 255, 0.35);
}

/* 8 Interactive Crop Handles */
.crop-handle {
  position: absolute;
  box-sizing: border-box;
  z-index: 25;
}

.crop-handle::before {
  content: '';
  position: absolute;
  top: -8px;
  left: -8px;
  right: -8px;
  bottom: -8px;
}

/* Corners (L-shaped thick white handles) */
.crop-handle.handle-nw {
  top: -3px;
  left: -3px;
  width: 16px;
  height: 16px;
  border-top: 3.5px solid #ffffff;
  border-left: 3.5px solid #ffffff;
  cursor: nwse-resize;
}

.crop-handle.handle-ne {
  top: -3px;
  right: -3px;
  width: 16px;
  height: 16px;
  border-top: 3.5px solid #ffffff;
  border-right: 3.5px solid #ffffff;
  cursor: nesw-resize;
}

.crop-handle.handle-sw {
  bottom: -3px;
  left: -3px;
  width: 16px;
  height: 16px;
  border-bottom: 3.5px solid #ffffff;
  border-left: 3.5px solid #ffffff;
  cursor: nesw-resize;
}

.crop-handle.handle-se {
  bottom: -3px;
  right: -3px;
  width: 16px;
  height: 16px;
  border-bottom: 3.5px solid #ffffff;
  border-right: 3.5px solid #ffffff;
  cursor: nwse-resize;
}

/* Edge Bars */
.crop-handle.handle-n {
  top: -3px;
  left: 50%;
  transform: translateX(-50%);
  width: 22px;
  height: 3.5px;
  background: #ffffff;
  border-radius: 2px;
  cursor: ns-resize;
}

.crop-handle.handle-s {
  bottom: -3px;
  left: 50%;
  transform: translateX(-50%);
  width: 22px;
  height: 3.5px;
  background: #ffffff;
  border-radius: 2px;
  cursor: ns-resize;
}

.crop-handle.handle-w {
  left: -3px;
  top: 50%;
  transform: translateY(-50%);
  width: 3.5px;
  height: 22px;
  background: #ffffff;
  border-radius: 2px;
  cursor: ew-resize;
}

.crop-handle.handle-e {
  right: -3px;
  top: 50%;
  transform: translateY(-50%);
  width: 3.5px;
  height: 22px;
  background: #ffffff;
  border-radius: 2px;
  cursor: ew-resize;
}

/* ============================================================ */
/* Emoji & Sticker Picker Popup (WhatsApp Web Parity 2026-10-26) */
/* ============================================================ */
.emoji-sticker-picker-container {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 8px;
  width: 390px;
  max-width: calc(100vw - 24px);
  height: 380px;
  max-height: 55vh;
  background: var(--color-surface, #1e293b);
  border: 1px solid var(--color-border, #334155);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 1000;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: pickerFadeIn 0.15s ease-out;
}

@keyframes pickerFadeIn {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Category Sub-tabs Header */
.picker-top-bar {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 6px 8px;
  background: rgba(0, 0, 0, 0.15);
  border-bottom: 1px solid var(--color-border);
  overflow-x: auto;
  scrollbar-width: none;
  flex-shrink: 0;
}
.picker-top-bar::-webkit-scrollbar {
  display: none;
}
.picker-cat-btn {
  background: transparent;
  border: none;
  color: var(--color-text-muted);
  font-size: 16px;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  flex-shrink: 0;
}
.picker-cat-btn:hover {
  background: var(--color-bg);
  color: var(--color-text);
}
.picker-cat-btn.active {
  background: var(--color-primary-soft, rgba(59, 130, 246, 0.2));
  color: var(--color-primary, #3B82F6);
  border-bottom: 2px solid var(--color-primary, #3B82F6);
}

/* Search bar */
.picker-search-wrap {
  padding: 8px 10px;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
  position: relative;
}
.picker-search-input {
  width: 100%;
  padding: 6px 10px 6px 30px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  color: var(--color-text);
  font-size: 12.5px;
  outline: none;
  box-sizing: border-box;
}
.picker-search-input:focus {
  border-color: var(--color-primary);
}
.picker-search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted);
  font-size: 13px;
  pointer-events: none;
}

/* Scrollable Content Body */
.picker-content-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.picker-section-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Emoji Grid */
.picker-emoji-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 4px;
}
.picker-emoji-item {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  height: 36px;
  border-radius: 6px;
  cursor: pointer;
  user-select: none;
  transition: transform 0.1s ease, background 0.1s ease;
}
.picker-emoji-item:hover {
  background: var(--color-bg);
  transform: scale(1.22);
}

/* Sticker Grid */
.picker-sticker-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.picker-sticker-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
  position: relative;
}
.picker-sticker-item:hover {
  transform: scale(1.06);
  border-color: var(--color-primary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}
.picker-sticker-thumb {
  width: 68px;
  height: 68px;
  object-fit: contain;
}
.picker-sticker-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--color-text-muted);
  margin-top: 4px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* Bottom Switcher Pill Bar (WhatsApp Web Style) */
.picker-bottom-switcher {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(0, 0, 0, 0.25);
  border-top: 1px solid var(--color-border);
  flex-shrink: 0;
}
.picker-switch-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 14px;
  border-radius: 20px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--color-text-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.picker-switch-pill:hover {
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.05);
}
.picker-switch-pill.active {
  background: var(--color-bg);
  color: var(--color-primary, #3B82F6);
  border-color: var(--color-border);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* Chat Bubble Sticker Style */
.chat-bubble.bubble-sticker {
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
  padding: 2px !important;
}
.chat-sticker-wrap {
  display: inline-block;
  max-width: 140px;
  max-height: 140px;
}
.chat-sticker-img {
  max-width: 140px;
  max-height: 140px;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.3));
  cursor: pointer;
  transition: transform 0.15s ease;
}
.chat-sticker-img:hover {
  transform: scale(1.04);
}

/* --- Scheduled Message Feature (Anti-Spam Pacing) --- */
.wa-sched-modal-card {
  background: var(--color-bg-card, #1F2937);
  color: var(--color-text, #F9FAFB);
  border: 1px solid var(--color-border, #374151);
  border-radius: 12px;
  width: 95%;
  max-width: 520px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: fadeInModal 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.wa-sched-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--color-border, #374151);
  background: rgba(255, 255, 255, 0.02);
}

.wa-sched-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text, #F9FAFB);
}

.wa-sched-close-btn {
  background: transparent;
  border: none;
  color: var(--color-text-muted, #9CA3AF);
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.15s;
}
.wa-sched-close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.wa-sched-modal-body {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.wa-sched-target-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.03);
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--color-border, #374151);
}

.wa-sched-target-label {
  color: var(--color-text-muted, #9CA3AF);
}

.wa-sched-target-val {
  font-weight: 600;
  color: var(--color-text, #F9FAFB);
}

.wa-sched-target-badge {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(16, 185, 129, 0.2);
  color: #10B981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.wa-sched-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wa-sched-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-muted, #9CA3AF);
}

.wa-sched-textarea {
  background: var(--color-bg, #111827);
  color: var(--color-text, #F9FAFB);
  border: 1px solid var(--color-border, #374151);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.5;
  resize: vertical;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
}
.wa-sched-textarea:focus {
  border-color: var(--color-primary, #3B82F6);
}

.wa-sched-datetime-input {
  background: var(--color-bg, #111827);
  color: var(--color-text, #F9FAFB);
  border: 1px solid var(--color-border, #374151);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 13px;
  outline: none;
  font-family: inherit;
  color-scheme: dark;
}
.wa-sched-datetime-input:focus {
  border-color: var(--color-primary, #3B82F6);
}

.wa-sched-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.sched-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--color-border, #374151);
  color: var(--color-text-muted, #D1D5DB);
  padding: 4px 9px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}
.sched-chip:hover {
  background: var(--color-primary, #3B82F6);
  color: #fff;
  border-color: var(--color-primary, #3B82F6);
}

.wa-sched-checkbox-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: rgba(255, 255, 255, 0.02);
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px dashed var(--color-border, #374151);
}

.wa-sched-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.wa-sched-hint {
  font-size: 11px;
  color: var(--color-text-muted, #9CA3AF);
  margin-left: 22px;
}

.wa-sched-security-banner {
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.2);
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 11px;
}

.wa-sched-sec-title {
  font-weight: 700;
  color: #60A5FA;
  margin-bottom: 4px;
}

.wa-sched-sec-list {
  margin: 0;
  padding-left: 18px;
  color: #93C5FD;
  line-height: 1.45;
}

.wa-sched-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 18px;
  border-top: 1px solid var(--color-border, #374151);
  background: rgba(255, 255, 255, 0.02);
}

.wa-sched-btn {
  padding: 8px 16px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.wa-sched-btn.btn-cancel {
  background: transparent;
  border: 1px solid var(--color-border, #374151);
  color: var(--color-text-muted, #9CA3AF);
}
.wa-sched-btn.btn-cancel:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.wa-sched-btn.btn-submit {
  background: #3B82F6;
  border: none;
  color: #fff;
}
.wa-sched-btn.btn-submit:hover {
  background: #2563EB;
}

/* Scheduled Banner in Active Thread */
.sched-banner-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(59, 130, 246, 0.12);
  border-top: 1px solid rgba(59, 130, 246, 0.25);
  border-bottom: 1px solid rgba(59, 130, 246, 0.25);
}

.sched-banner-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}

.sched-banner-icon {
  font-size: 15px;
  color: #60A5FA;
}

.sched-banner-text {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #E0E7FF;
}

.sched-banner-text strong {
  color: #fff;
}

.sched-banner-actions {
  display: flex;
  gap: 6px;
}

.sched-btn-mini {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.sched-btn-mini:hover {
  background: rgba(255, 255, 255, 0.18);
}

.sched-btn-mini.danger {
  color: #F87171;
  border-color: rgba(239, 68, 68, 0.3);
}
.sched-btn-mini.danger:hover {
  background: rgba(239, 68, 68, 0.2);
}



/* ============================================================
   2026-11-04 AIRing Telemetry Copilot
   TASK 1: badge alert berkedip di tombol header AIRing AI
   TASK 2: action bar "Buka Tiket Gangguan" pada kartu /optic & /triage
   TASK 3: halaman tab Superagent Studio (tab navigasi terpisah)
   ============================================================ */

/* USER MANDATE: AiRing AI top menu button stays clean without glowing red or badge numbers */
.btn-copilot-toggle.has-telemetry-alert {
  position: relative;
  border-color: rgba(255, 255, 255, 0.1) !important;
  box-shadow: none !important;
}

.telemetry-alert-badge {
  display: none !important;
}

@keyframes telemetryBadgePulse {
  0%, 100% { transform: scale(1);    opacity: 1;   box-shadow: 0 0 0 2px var(--color-surface, #0f172a), 0 0 6px rgba(239,68,68,0.5); }
  50%      { transform: scale(1.28); opacity: 0.72; box-shadow: 0 0 0 2px var(--color-surface, #0f172a), 0 0 16px rgba(239,68,68,0.95); }
}

.telemetry-action-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed rgba(239, 68, 68, 0.35);
}

.btn-telemetry-ticket {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 11.5px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  border: 1px solid rgba(239, 68, 68, 0.7);
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}
.btn-telemetry-ticket:hover {
  transform: translateY(-1px);
  filter: brightness(1.12);
  box-shadow: 0 6px 18px rgba(220, 38, 38, 0.4);
}
.btn-telemetry-ticket:active { transform: translateY(0); }

.telemetry-action-hint {
  font-size: 10px;
  color: var(--color-text-muted, #94a3b8);
  font-style: italic;
}

/* --- TASK 3: halaman tab Superagent Studio (Harness Mode) --- */
.airing-studio-page {
  display: flex;
  flex-direction: column;
  gap: 0;
  height: 100%;
  max-height: 100%;
  min-height: 0;
  overflow: hidden;
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

.airing-studio-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 14px;
  border: 1px solid var(--color-border, #334155);
  border-radius: 8px;
  background: var(--color-surface, #1E293B);
  flex-shrink: 0;
}
.airing-studio-page-title h2 {
  margin: 2px 0 2px;
  font-size: 15px;
  font-weight: 800;
  color: var(--color-text-main, #F8FAFC);
}
.airing-studio-page-title p {
  margin: 0;
  font-size: 11px;
  color: var(--color-text-muted, #94a3b8);
  max-width: 760px;
  line-height: 1.3;
}
.airing-studio-page-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ==========================================================================
   🛡️ AI-NDR & Syslog Analyzer Network Intelligence (ClickHouse Warehouse)
   ========================================================================== */
.ndr-analyzer-view {
  padding: 16px 20px 80px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  box-sizing: border-box;
}

.ndr-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 4px;
}

.ndr-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ndr-badge {
  background: linear-gradient(135deg, #0ea5e9, #6366f1);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.ndr-header h2 {
  font-size: 18px;
  font-weight: 800;
  color: var(--color-text, #f8fafc);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ndr-meta-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ndr-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--color-surface, #1e293b);
  border: 1px solid var(--color-border, #334155);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11.5px;
  color: var(--color-text-muted, #94a3b8);
}

.ndr-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  display: inline-block;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}

.ndr-status-dot.pulse {
  animation: ndrPulse 1.8s infinite;
}

@keyframes ndrPulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* KPI Top Grid */
.ndr-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}

.ndr-kpi-card {
  background: var(--color-surface, #1e293b);
  border: 1px solid var(--color-border, #334155);
  border-radius: 10px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.ndr-kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
}

.ndr-kpi-card.blue::before { background: #38bdf8; }
.ndr-kpi-card.red::before { background: #ef4444; }
.ndr-kpi-card.purple::before { background: #a855f7; }
.ndr-kpi-card.amber::before { background: #f59e0b; }
.ndr-kpi-card.green::before { background: #10b981; }

.ndr-kpi-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-text-muted, #94a3b8);
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ndr-kpi-val {
  font-size: 24px;
  font-weight: 800;
  color: var(--color-text, #f8fafc);
  line-height: 1.2;
}

.ndr-kpi-sub {
  font-size: 11px;
  color: var(--color-text-muted, #94a3b8);
  opacity: 0.85;
}

/* Card Sections */
.ndr-section-card {
  background: var(--color-surface, #1e293b);
  border: 1px solid var(--color-border, #334155);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
}

.ndr-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  background: rgba(15, 23, 42, 0.6);
  border-bottom: 1px solid var(--color-border, #334155);
}

.ndr-section-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--color-text, #f8fafc);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Filter Controls Toolbar */
.ndr-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 10px 18px;
  background: rgba(15, 23, 42, 0.3);
  border-bottom: 1px solid var(--color-border, #334155);
}

.ndr-search-wrap {
  position: relative;
  flex: 1;
  min-width: 220px;
}

.ndr-search-input {
  width: 100%;
  padding: 6px 10px 6px 30px;
  background: var(--color-bg, #0f172a);
  border: 1px solid var(--color-border, #334155);
  border-radius: 6px;
  color: var(--color-text, #f8fafc);
  font-size: 12px;
  outline: none;
  box-sizing: border-box;
}

.ndr-search-icon {
  position: absolute;
  left: 9px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted, #94a3b8);
  font-size: 12px;
}

.ndr-select {
  padding: 6px 10px;
  background: var(--color-bg, #0f172a);
  border: 1px solid var(--color-border, #334155);
  border-radius: 6px;
  color: var(--color-text, #f8fafc);
  font-size: 12px;
  outline: none;
  cursor: pointer;
}

/* Tables */
.ndr-table-wrap {
  overflow-x: auto;
  width: 100%;
}

.ndr-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  text-align: left;
}

.ndr-table th {
  background: rgba(15, 23, 42, 0.7);
  padding: 9px 12px;
  font-weight: 700;
  color: var(--color-text-muted, #94a3b8);
  border-bottom: 1px solid var(--color-border, #334155);
  white-space: nowrap;
}

.ndr-table td {
  padding: 9px 12px;
  border-bottom: 1px solid rgba(51, 65, 85, 0.4);
  color: var(--color-text, #f8fafc);
  vertical-align: middle;
}

.ndr-table tr:hover td {
  background: rgba(56, 189, 248, 0.04);
}

/* Badges & Tags */
.ndr-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.ndr-tag.mikrotik { background: rgba(59, 130, 246, 0.15); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); }
.ndr-tag.juniper { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.ndr-tag.huawei { background: rgba(239, 68, 68, 0.15); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }
.ndr-tag.unknown { background: rgba(148, 163, 184, 0.15); color: #94a3b8; border: 1px solid rgba(148, 163, 184, 0.3); }

.ndr-cat-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
}

.ndr-cat-tag.link_flap { background: rgba(239, 68, 68, 0.2); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.4); }
.ndr-cat-tag.bgp_state { background: rgba(168, 85, 247, 0.2); color: #d8b4fe; border: 1px solid rgba(168, 85, 247, 0.4); }
.ndr-cat-tag.auth_fail, .ndr-cat-tag.auth_event { background: rgba(245, 158, 11, 0.2); color: #fcd34d; border: 1px solid rgba(245, 158, 11, 0.4); }
.ndr-cat-tag.optic_alarm { background: rgba(6, 182, 212, 0.2); color: #67e8f9; border: 1px solid rgba(6, 182, 212, 0.4); }
.ndr-cat-tag.general { background: rgba(100, 116, 139, 0.15); color: #cbd5e1; border: 1px solid rgba(100, 116, 139, 0.3); }

.ndr-iface-badge {
  font-family: var(--font-mono, monospace);
  background: rgba(0, 0, 0, 0.3);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.2);
}

.ndr-log-msg {
  font-family: var(--font-mono, monospace);
  font-size: 11.5px;
  line-height: 1.45;
  color: #e2e8f0;
  word-break: break-all;
  max-width: 650px;
}

.ndr-btn-mini {
  padding: 3px 8px;
  font-size: 11px;
  border-radius: 4px;
  background: var(--color-surface, #1e293b);
  border: 1px solid var(--color-border, #334155);
  color: var(--color-text, #f8fafc);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.ndr-btn-mini:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: #38bdf8;
}

.ndr-empty-state {
  padding: 36px 20px;
  text-align: center;
  color: var(--color-text-muted, #94a3b8);
  font-size: 12.5px;
}


/* =========================================================================
   TELEMETRY FULL-WIDTH STYLES
   ========================================================================= */
.airing-zone-main.telemetry-fullwidth {
  flex: 1 1 100% !important;
  width: 100% !important;
  max-width: 100% !important;
}

/* =========================================================================
   AI-NDR SUB-NAVIGATION TABS & CYBER SECURITY STYLES
   ========================================================================= */
.ndr-subtabs-bar {
  display: flex;
  gap: 8px;
  margin: 14px 0 16px 0;
  border-bottom: 1px solid rgba(51, 65, 85, 0.4);
  padding-bottom: 10px;
}

.ndr-subtab-btn {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(51, 65, 85, 0.6);
  color: #94a3b8;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ndr-subtab-btn:hover {
  background: rgba(51, 65, 85, 0.8);
  color: #f8fafc;
}

.ndr-subtab-btn.active {
  background: rgba(14, 165, 233, 0.15);
  border-color: #38bdf8;
  color: #38bdf8;
}

/* NDR Statistics Layout */
.ndr-stats-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ndr-stats-grid-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 900px) {
  .ndr-stats-grid-row {
    grid-template-columns: 1fr;
  }
}

.ndr-stats-card {
  background: var(--color-surface, #1e293b);
  border: 1px solid var(--color-border, #334155);
  border-radius: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ndr-stats-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ndr-chart-bars-wrap {
  display: flex;
  align-items: flex-end;
  height: 120px;
  gap: 6px;
  padding-top: 10px;
  border-bottom: 1px solid rgba(51, 65, 85, 0.5);
}

.ndr-chart-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
  gap: 4px;
}

.ndr-chart-bar-fill {
  width: 100%;
  background: #0284c7;
  border-radius: 3px 3px 0 0;
  transition: height 0.3s ease;
}

.ndr-chart-bar-fill.current {
  background: #38bdf8;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.5);
}

.ndr-chart-bar-col:hover .ndr-chart-bar-fill {
  background: #34d399;
}

.ndr-chart-bar-lbl {
  font-size: 9px;
  color: #64748b;
}

.ndr-sev-bar-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 8px;
}

.ndr-sev-head {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
}

.ndr-sev-track {
  width: 100%;
  height: 6px;
  background: rgba(15, 23, 42, 0.6);
  border-radius: 3px;
  overflow: hidden;
}

.ndr-sev-fill {
  height: 100%;
  border-radius: 3px;
}

/* NDR Cyber Security Layout */
.ndr-cyber-hero-banner {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.9));
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 10px;
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.ndr-cyber-hero-title {
  display: flex;
  align-items: center;
  gap: 14px;
}

.ndr-cyber-hero-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.ndr-cyber-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.ndr-cyber-card {
  background: var(--color-surface, #1e293b);
  border: 1px solid var(--color-border, #334155);
  border-radius: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.ndr-cyber-card:hover {
  transform: translateY(-2px);
  border-color: #38bdf8;
}

.ndr-cyber-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.ndr-cyber-card-icon {
  width: 36px;
  height: 36px;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.ndr-cyber-card-body {
  font-size: 11.5px;
  color: #cbd5e1;
  line-height: 1.5;
  margin-bottom: 14px;
}

.ndr-cyber-spec-box {
  background: rgba(15, 23, 42, 0.6);
  border-left: 3px solid #38bdf8;
  padding: 8px 10px;
  border-radius: 0 6px 6px 0;
  font-size: 10.5px;
  color: #94a3b8;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ndr-cyber-card-foot {
  border-top: 1px solid rgba(51, 65, 85, 0.5);
  padding-top: 10px;
}

.ndr-cyber-badge {
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
}

.ndr-cyber-badge.ready {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}

.ndr-cyber-badge.urgent {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}

.ndr-cyber-action-box {
  background: var(--color-surface, #1e293b);
  border: 1px solid var(--color-border, #334155);
  border-radius: 10px;
  padding: 16px;
}

/* =========================================================================
   STUDIO AGENT HARNESS (MiniMax / Antigravity / Claude Code Style)
   ========================================================================= */
.studio-harness-layout {
  display: flex;
  height: 100%;
  width: 100%;
  background: #070b14;
  overflow: hidden;
  position: relative;
}

/* Pane 1: Minimalist Left Controller (Gemini / Antigravity Style) */
.harness-pane-left {
  width: 250px;
  min-width: 250px;
  background: #0b1120;
  border-right: 1px solid rgba(51, 65, 85, 0.4);
  display: flex;
  flex-direction: column;
  padding: 0;
  gap: 0;
  overflow: hidden;
}

.harness-ctrl-brand {
  border-bottom: 1px solid rgba(51, 65, 85, 0.4);
  padding-bottom: 10px;
}

.harness-brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(14, 165, 233, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #38bdf8;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: 4px;
}

.harness-dot-live {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 6px #34d399;
}

.harness-section-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748b;
  letter-spacing: 0.5px;
  margin-top: 4px;
}

.harness-select {
  width: 100%;
  background: #1e293b;
  border: 1px solid #334155;
  color: #f8fafc;
  font-size: 11px;
  padding: 6px 8px;
  border-radius: 6px;
  outline: none;
  cursor: pointer;
}

.harness-model-spec-row {
  display: flex;
  gap: 6px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.harness-engine-pill {
  font-size: 9.5px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(51, 65, 85, 0.6);
  color: #94a3b8;
  padding: 2px 6px;
  border-radius: 4px;
}

.harness-engine-pill.sec {
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.3);
}

.harness-caps-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: rgba(15, 23, 42, 0.5);
  padding: 8px;
  border-radius: 6px;
  border: 1px solid rgba(51, 65, 85, 0.3);
}

.harness-cap-item {
  font-size: 10.5px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 6px;
}

.harness-cap-item.active span {
  color: #34d399;
  font-weight: 700;
}

.harness-playbooks-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.harness-playbook-btn {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(51, 65, 85, 0.5);
  color: #cbd5e1;
  font-size: 11px;
  padding: 6px 8px;
  border-radius: 6px;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
}

.harness-playbook-btn:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: #38bdf8;
  color: #f8fafc;
}

.harness-session-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 120px;
  border-top: 1px solid rgba(51, 65, 85, 0.4);
  padding-top: 10px;
}

.harness-btn-new-sess {
  background: transparent;
  border: none;
  color: #38bdf8;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

.harness-session-list-scroll {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.harness-session-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.6);
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
}

.harness-session-item:hover {
  background: rgba(30, 41, 59, 0.8);
}

.harness-session-item.active {
  background: rgba(14, 165, 233, 0.15);
  border-color: rgba(56, 189, 248, 0.4);
  color: #38bdf8;
  font-weight: 700;
}

.harness-sess-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #64748b;
}

.harness-sess-dot.active {
  background: #38bdf8;
  box-shadow: 0 0 6px #38bdf8;
}

.harness-sess-title {
  flex: 1;
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.harness-sess-del {
  font-size: 9px;
  color: #64748b;
}

.harness-sess-del:hover {
  color: #f87171;
}

/* Pane 2: Center Execution Stream */
.harness-pane-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #090e1a;
  position: relative;
}

.harness-mission-head {
  padding: 10px 16px;
  background: rgba(11, 17, 32, 0.9);
  border-bottom: 1px solid rgba(51, 65, 85, 0.5);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.harness-mission-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.harness-state-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34d399;
}

.harness-state-indicator.pulse {
  box-shadow: 0 0 8px #34d399;
  animation: pulse 2s infinite;
}

.harness-mission-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #f8fafc;
}

.harness-mission-meta {
  font-size: 10.5px;
  color: #94a3b8;
  display: flex;
  gap: 6px;
  align-items: center;
  margin-top: 2px;
}

.harness-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.harness-select-compact {
  background: #1e293b;
  border: 1px solid #334155;
  color: #f8fafc;
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 6px;
  outline: none;
  cursor: pointer;
}

.harness-sidecar-pills {
  display: flex;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(51, 65, 85, 0.5);
  border-radius: 6px;
  padding: 2px;
}

.sidecar-pill-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.sidecar-pill-btn.active {
  background: #0284c7;
  color: #fff;
  font-weight: 600;
}

/* Message Stream */
.harness-messages-stream {
  flex: 1;
  overflow-y: auto;
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.harness-welcome-hero {
  text-align: center;
  padding: 40px 20px;
}

.harness-msg-item {
  display: flex;
  gap: 12px;
  max-width: 950px;
  animation: fadeIn 0.2s ease-out;
}

.harness-msg-item.user {
  margin-left: auto;
  flex-direction: row-reverse;
}

.harness-msg-avatar {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(51, 65, 85, 0.6);
  flex-shrink: 0;
}

.harness-msg-body {
  flex: 1;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(51, 65, 85, 0.4);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 12.5px;
  line-height: 1.55;
  color: #e2e8f0;
}

.harness-msg-item.user .harness-msg-body {
  background: rgba(14, 165, 233, 0.12);
  border-color: rgba(56, 189, 248, 0.3);
}

.harness-msg-meta {
  font-size: 10px;
  color: #64748b;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Collapsible Thinking Block */
.harness-thinking-block {
  background: rgba(6, 11, 24, 0.7);
  border: 1px solid rgba(234, 179, 8, 0.25);
  border-radius: 6px;
  margin-bottom: 10px;
  overflow: hidden;
}

.harness-thinking-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 600;
  color: #fde047;
  cursor: pointer;
  background: rgba(234, 179, 8, 0.08);
}

.harness-thinking-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #eab308;
  animation: pulse 1.5s infinite;
}

.harness-thinking-badge {
  margin-left: auto;
  font-size: 9.5px;
  color: #ca8a04;
  border: 1px solid rgba(234, 179, 8, 0.3);
  padding: 1px 5px;
  border-radius: 3px;
}

.harness-thinking-body {
  padding: 8px 10px;
  font-size: 11px;
  color: #cbd5e1;
  line-height: 1.5;
  border-top: 1px solid rgba(234, 179, 8, 0.15);
  background: rgba(6, 11, 24, 0.5);
}

/* Tool Invocations Card */
.harness-tool-card {
  background: rgba(2, 6, 23, 0.8);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 6px;
  padding: 8px 10px;
  margin-bottom: 10px;
}

.harness-tool-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: #38bdf8;
  margin-bottom: 4px;
}

.harness-tool-badge {
  font-size: 9.5px;
  color: #34d399;
}

.harness-tool-body {
  font-family: monospace;
  font-size: 10.5px;
  color: #a7f3d0;
}

/* CLI Code Box */
.harness-cli-box {
  background: #060913;
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 6px;
  padding: 10px;
  margin: 10px 0;
}

.harness-cli-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10.5px;
  font-weight: 700;
  color: #38bdf8;
  margin-bottom: 6px;
}

.harness-code-inline {
  background: rgba(255, 255, 255, 0.08);
  padding: 1px 4px;
  border-radius: 4px;
  font-size: 11px;
  color: #38bdf8;
}

.harness-msg-actions {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.cli-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.3;
  cursor: pointer;
  background: rgba(30, 41, 59, 0.9);
  color: #e2e8f0;
  border: 1px solid rgba(148, 163, 184, 0.35);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.cli-action-btn:hover {
  background: rgba(51, 65, 85, 0.96);
  border-color: rgba(56, 189, 248, 0.55);
  color: #f8fafc;
}

[data-theme="light"] .cli-action-btn {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #cbd5e1;
}

[data-theme="light"] .cli-action-btn:hover {
  background: #e2e8f0;
  border-color: #0284c7;
  color: #020617;
}

/* Input Dock */
.harness-input-dock {
  background: rgba(11, 17, 32, 0.95);
  border-top: 1px solid rgba(51, 65, 85, 0.5);
  padding: 10px 16px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.harness-context-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
}

.harness-chip-static {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(51, 65, 85, 0.5);
  padding: 2px 8px;
  border-radius: 4px;
  color: #cbd5e1;
  font-size: 10.5px;
}

.harness-chip-static.dim {
  background: transparent;
  border: none;
  color: #64748b;
  font-size: 10px;
}

.harness-context-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10.5px;
  cursor: pointer;
}

.harness-input-capsule {
  display: flex;
  flex-direction: column;
  background: #131d31;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 8px 10px;
  transition: border-color 0.2s ease;
}

.harness-input-capsule:focus-within {
  border-color: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.15);
}

.harness-textarea {
  background: transparent;
  border: none;
  color: #f8fafc;
  font-size: 12.5px;
  resize: none;
  outline: none;
  width: 100%;
  font-family: inherit;
  line-height: 1.5;
}

.harness-input-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
}

.harness-btn-tool {
  background: transparent;
  border: none;
  font-size: 15px;
  cursor: pointer;
  color: #94a3b8;
}

.harness-btn-tool:hover {
  color: #f8fafc;
}

.harness-btn-execute {
  background: #0284c7;
  border: none;
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s ease;
}

.harness-btn-execute:hover {
  background: #0369a1;
}

/* Pane 3: Right Sidecar Inspector */
.harness-pane-right {
  width: 330px;
  min-width: 330px;
  background: #0b1120;
  border-left: 1px solid rgba(51, 65, 85, 0.5);
  display: flex;
  flex-direction: column;
}

.harness-sidecar-head {
  padding: 10px 14px;
  background: rgba(15, 23, 42, 0.85);
  border-bottom: 1px solid rgba(51, 65, 85, 0.5);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.harness-sidecar-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
}

.harness-telemetry-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(51, 65, 85, 0.5);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 12px;
}

.harness-iface-mini-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.harness-iface-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(15, 23, 42, 0.5);
  padding: 6px 8px;
  border-radius: 4px;
  font-size: 11px;
}

.iface-name {
  color: #cbd5e1;
  font-family: monospace;
}

.iface-stat.in {
  color: #34d399;
  font-size: 10px;
}

.iface-stat.out {
  color: #38bdf8;
  font-size: 10px;
}

.harness-artifact-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(51, 65, 85, 0.5);
  border-radius: 8px;
  padding: 12px;
}

.harness-artifact-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
  font-weight: 700;
  color: #f8fafc;
  margin-bottom: 8px;
}

.harness-artifact-body {
  background: #060913;
  border: 1px solid rgba(51, 65, 85, 0.3);
  border-radius: 6px;
  padding: 10px;
  font-size: 11px;
  color: #e2e8f0;
  line-height: 1.5;
  max-height: 200px;
  overflow-y: auto;
  white-space: pre-wrap;
}

/* ==========================================================================
   SUPER-HARNESS MOTION & COMPONENTS (Hairline + itshover + Thinking Accordion)
   ========================================================================== */
#hairline-canvas, .hairline-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
}

.itshover, .nav-icon-item, .copilot-chip, .btn-action, .badge-dot-live {
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.18s ease, filter 0.18s ease;
}
.itshover:hover, .nav-icon-item:hover, .copilot-chip:hover {
  transform: translateY(-1.5px) scale(1.02);
  filter: brightness(1.1);
}
.itshover:active, .nav-icon-item:active {
  transform: scale(0.97);
}

details.thinking-accordion {
  margin: 6px 0;
  padding: 6px 8px;
  background: rgba(59, 130, 246, 0.06);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 6px;
  font-size: 11px;
}
details.thinking-accordion summary {
  cursor: pointer;
  font-weight: 600;
  color: #2563eb;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 4px;
}
details.thinking-accordion summary::-webkit-details-marker {
  display: none;
}
details.thinking-accordion[open] summary {
  border-bottom: 1px dashed rgba(59, 130, 246, 0.25);
  padding-bottom: 4px;
  margin-bottom: 6px;
}
details.thinking-accordion .thinking-content {
  padding: 4px 6px;
  color: var(--color-text-muted, #64748b);
  line-height: 1.45;
  font-family: inherit;
  white-space: pre-wrap;
}

.approval-card {
  margin-top: 8px;
  padding: 8px 10px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: 6px;
}


/* Phase 12: Telemetry Incident & Remediation Banner (MUTED to prevent UI collisions) */
.remediation-toast-container {
  display: none !important;
}

.remediation-card {
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(239, 68, 68, 0.45);
  box-shadow: 0 10px 25px -5px rgba(239, 68, 68, 0.25), 0 8px 10px -6px rgba(0, 0, 0, 0.4);
  border-radius: 10px;
  padding: 14px 16px;
  color: #f8fafc;
  animation: slideInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.remediation-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.remediation-card-title {
  font-weight: 700;
  font-size: 13px;
  color: #f87171;
  display: flex;
  align-items: center;
  gap: 6px;
}

.remediation-card-body {
  font-size: 12px;
  color: #cbd5e1;
  line-height: 1.45;
  margin-bottom: 12px;
}

.remediation-card-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.btn-remediate-approve {
  background: #dc2626;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-remediate-approve:hover {
  background: #b91c1c;
  transform: translateY(-1px);
}

.btn-remediate-dismiss {
  background: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 11px;
  cursor: pointer;
}


/* =========================================================================
   🌐 AiRing Noosphere v3 — Minimalist AI Studio (Gemini / Antigravity Style)
   ========================================================================= */

.noosphere-btn-new-chat {
  width: 100%;
  padding: 8px 12px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.25), rgba(3, 105, 161, 0.15));
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 8px;
  color: #f8fafc;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.noosphere-btn-new-chat:hover {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.45), rgba(3, 105, 161, 0.3));
  border-color: #38bdf8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.25);
  transform: translateY(-1px);
}

.noosphere-search-input {
  width: 100%;
  background: #070d19;
  border: 1px solid rgba(51, 65, 85, 0.5);
  border-radius: 6px;
  padding: 6px 10px;
  color: #e2e8f0;
  font-size: 11px;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s;
}

.noosphere-search-input:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.15);
}

.noosphere-sidebar-footer {
  padding: 10px 14px;
  border-top: 1px solid rgba(51, 65, 85, 0.4);
  background: rgba(11, 17, 32, 0.85);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.noosphere-avatar-bot {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: rgba(14, 165, 233, 0.2);
  border: 1px solid rgba(56, 189, 248, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.noosphere-meta-pill {
  font-size: 10px;
  color: #34d399;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 2px 7px;
  border-radius: 12px;
  font-weight: 600;
}

.noosphere-drawer-toggle-btn {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(51, 65, 85, 0.6);
  color: #94a3b8;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.noosphere-drawer-toggle-btn:hover {
  background: rgba(30, 41, 59, 0.9);
  color: #f8fafc;
  border-color: rgba(56, 189, 248, 0.4);
}

.noosphere-drawer-toggle-btn.active {
  background: rgba(14, 165, 233, 0.2);
  color: #38bdf8;
  border-color: #38bdf8;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.25);
}

.noosphere-chat-inner {
  max-width: 880px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.gemini-hero-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 46px 20px 24px 20px;
  text-align: center;
  animation: fadeIn 0.3s ease-out;
}

.gemini-neural-ring {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.25) 0%, rgba(14, 165, 233, 0.05) 70%);
  border: 1px solid rgba(56, 189, 248, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 24px rgba(56, 189, 248, 0.3);
  position: relative;
  margin-bottom: 16px;
}

.gemini-neural-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, #38bdf8, #818cf8);
  box-shadow: 0 0 12px #38bdf8;
  animation: pulse 2s infinite ease-in-out;
}

.gemini-hero-title {
  font-size: 24px;
  font-weight: 700;
  color: #f8fafc;
  letter-spacing: -0.4px;
  margin: 0 0 8px 0;
}

.gemini-hero-subtitle {
  font-size: 13px;
  color: #94a3b8;
  max-width: 600px;
  line-height: 1.55;
  margin: 0 0 26px 0;
}

.gemini-suggestion-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  width: 100%;
  max-width: 760px;
}

@media (max-width: 900px) {
  .gemini-suggestion-grid {
    grid-template-columns: 1fr;
  }
}

.gemini-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(51, 65, 85, 0.5);
  border-radius: 10px;
  padding: 12px 14px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  gap: 12px;
  align-items: flex-start;
  text-align: left;
}

.gemini-card:hover {
  background: rgba(30, 41, 59, 0.9);
  border-color: rgba(56, 189, 248, 0.45);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.gemini-card-icon {
  font-size: 20px;
  flex-shrink: 0;
  margin-top: 2px;
}

.gemini-card-content {
  flex: 1;
  min-width: 0;
}

.gemini-card-title {
  font-size: 12px;
  font-weight: 700;
  color: #f8fafc;
  margin-bottom: 3px;
}

.gemini-card-desc {
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.4;
  margin-bottom: 6px;
}

.gemini-card-pill {
  display: inline-block;
  font-size: 9.5px;
  font-family: monospace;
  font-weight: 700;
  color: #38bdf8;
  background: rgba(14, 165, 233, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 1px 6px;
  border-radius: 4px;
}

.noosphere-omnibox-dock {
  padding: 8px 20px 18px 20px;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  flex-shrink: 0;
}

.noosphere-omnibox-capsule {
  width: 100%;
  max-width: 880px;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.2s ease;
}

.noosphere-omnibox-capsule:focus-within {
  border-color: #38bdf8;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.2);
}

.noosphere-omnibox-top-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.noosphere-chip-node {
  font-size: 10px;
  font-weight: 700;
  color: #38bdf8;
  background: rgba(14, 165, 233, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.35);
  padding: 2px 7px;
  border-radius: 5px;
  cursor: pointer;
}

.noosphere-chip-divider {
  width: 1px;
  height: 14px;
  background: rgba(51, 65, 85, 0.6);
  margin: 0 4px;
}

.noosphere-quick-pill {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(51, 65, 85, 0.5);
  color: #cbd5e1;
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s;
}

.noosphere-quick-pill:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: #38bdf8;
  color: #f8fafc;
}

.noosphere-textarea {
  background: transparent;
  border: none;
  color: #f8fafc;
  font-size: 13px;
  resize: none;
  outline: none;
  width: 100%;
  font-family: inherit;
  line-height: 1.5;
  box-sizing: border-box;
}

.noosphere-omnibox-bottom-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(51, 65, 85, 0.3);
  padding-top: 6px;
}

.noosphere-model-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: #94a3b8;
}

.noosphere-model-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 6px #34d399;
}

.noosphere-send-btn {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  border: none;
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.noosphere-send-btn:hover {
  background: linear-gradient(135deg, #0369a1, #075985);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.3);
  transform: translateY(-1px);
}

.noosphere-slideover-drawer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 380px;
  background: #0b1120;
  border-left: 1px solid rgba(56, 189, 248, 0.3);
  box-shadow: -10px 0 35px rgba(0, 0, 0, 0.5);
  z-index: 100;
  transform: translateX(100%);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.noosphere-slideover-drawer.open {
  transform: translateX(0);
}

.noosphere-drawer-header {
  padding: 10px 14px;
  background: rgba(15, 23, 42, 0.95);
  border-bottom: 1px solid rgba(51, 65, 85, 0.5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.noosphere-drawer-close {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 14px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
}

.noosphere-drawer-close:hover {
  color: #f87171;
  background: rgba(248, 113, 113, 0.15);
}

.noosphere-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 0;
}

/* ============================================================
   Broadband Network Incident Sub-Box in Telemetry View
   ============================================================ */
.airing-broadband-alert-subbox {
  margin: 10px 12px 8px 12px;
  background: linear-gradient(180deg, rgba(239, 68, 68, 0.09) 0%, rgba(15, 23, 42, 0.75) 100%);
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: 8px;
  padding: 10px 14px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3), inset 0 0 16px rgba(239, 68, 68, 0.05);
}

.airing-broadband-alert-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(239, 68, 68, 0.15);
}

.airing-broadband-alert-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.airing-subbox-badge.crit {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  font-family: var(--font-mono, monospace);
}

.airing-subbox-badge.level {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
  font-size: 9px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
}

.airing-subbox-title {
  color: #f1f5f9;
  font-size: 12px;
  font-weight: 600;
}

.airing-broadband-alert-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.airing-subbox-btn {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 5px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  font-weight: 500;
}

.airing-subbox-btn.primary {
  background: #dc2626;
  color: #ffffff;
  border-color: #ef4444;
}

.airing-subbox-btn.primary:hover {
  background: #b91c1c;
}

.airing-subbox-btn.secondary {
  background: rgba(30, 41, 59, 0.8);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.3);
}

.airing-subbox-btn.secondary:hover {
  background: rgba(56, 189, 248, 0.15);
}

.airing-subbox-btn.ghost {
  background: transparent;
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.airing-subbox-btn.ghost:hover {
  color: #f1f5f9;
  background: rgba(255, 255, 255, 0.05);
}

.airing-broadband-alert-body {
  padding-top: 8px;
}

.airing-broadband-alert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 8px 16px;
}

.airing-subbox-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 11.5px;
}

.airing-subbox-label {
  color: #94a3b8;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.airing-subbox-val {
  color: #cbd5e1;
}

.airing-subbox-val.mono {
  font-family: var(--font-mono, monospace);
}

/* Notice Bar when viewing non-broadband devices in Telemetry */
.airing-broadband-notice-bar {
  margin: 8px 12px 4px 12px;
  padding: 6px 12px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.airing-broadband-notice-bar:hover {
  background: rgba(239, 68, 68, 0.14);
}

.airing-broadband-notice-bar .notice-icon {
  font-size: 13px;
}

.airing-broadband-notice-bar .notice-text {
  color: #fca5a5;
  flex: 1;
}

.airing-broadband-notice-bar .notice-link {
  font-size: 11px;
  font-weight: 600;
  color: #38bdf8;
  text-decoration: underline;
}

/* Tab indicator dot */
.airing-dev-tab-dot.warn {
  color: #f87171;
  font-size: 9px;
  margin-left: 4px;
  animation: telemetryBadgePulse 1.2s ease-in-out infinite;
}

/* ==========================================================================
   RING-CRM v4.0 — Precision NOC Design System & Anti-Slop Overhaul
   2D Theme Dimensions: data-theme="dark|light" x data-accent="cobalt|emerald|violet|amber"
   ========================================================================== */

:root,
html[data-theme="dark"] {
  /* Surface "Navy" (default sejak v4.3): app chrome + chat satu keluarga biru-slate */
  --color-bg: #0B1324;
  --color-surface: #111C33;
  --color-surface-card: #111C33;
  --bg-surface-2: #1A2742;
  --color-bg-subtle: #14203A;
  --color-border: rgba(148, 163, 184, 0.18);
  --color-border-light: rgba(148, 163, 184, 0.10);
  --color-text: #F2F4F8;
  --color-text-main: #F2F4F8;
  --color-text-muted: #9BA3B4;
  --color-text-subtle: #8C95A6;

  --color-success: #3D8B5E;
  --color-success-soft: rgba(61, 139, 94, 0.16);
  --color-warning: #B8863B;
  --color-warning-soft: rgba(184, 134, 59, 0.16);
  --color-danger: #B94A48;
  --color-danger-soft: rgba(185, 74, 72, 0.16);

  --chat-bg: #0F172A;
  --bubble-in-bg: #1E293B;
  --bubble-in-text: #F2F4F8;
  --bubble-in-border: rgba(255, 255, 255, 0.08);

  --font-sans: 'Figtree', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: 'JetBrains Mono', 'Cascadia Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* Surface "Black" (opsional): palet hitam pekat v4.0 */
html[data-theme="dark"][data-surface="black"] {
  --color-bg: #090A0F;
  --color-surface: #11131A;
  --color-surface-card: #11131A;
  --bg-surface-2: #181B24;
  --color-bg-subtle: #141720;
  --color-border: rgba(255, 255, 255, 0.08);
  --color-border-light: rgba(255, 255, 255, 0.05);
  --chat-bg: #090A0F;
  --bubble-in-bg: #181B24;
}

/* Surface "Graphite" */
html[data-theme="dark"][data-surface="graphite"] {
  --color-bg: #101214;
  --color-surface: #171A1D;
  --color-surface-card: #171A1D;
  --bg-surface-2: #21252A;
  --color-bg-subtle: #1B1F23;
  --color-border: rgba(203,213,225,0.16);
  --color-border-light: rgba(203,213,225,0.09);
  --chat-bg: #121416;
  --bubble-in-bg: #21252A;
}

/* Surface "Forest" */
html[data-theme="dark"][data-surface="forest"] {
  --color-bg: #08140F;
  --color-surface: #0E1E17;
  --color-surface-card: #0E1E17;
  --bg-surface-2: #173126;
  --color-bg-subtle: #112519;
  --color-border: rgba(134,239,172,0.16);
  --color-border-light: rgba(134,239,172,0.09);
  --chat-bg: #0A1812;
  --bubble-in-bg: #173126;
}

/* Surface "Plum" */
html[data-theme="dark"][data-surface="plum"] {
  --color-bg: #120D20;
  --color-surface: #1A1330;
  --color-surface-card: #1A1330;
  --bg-surface-2: #251C42;
  --color-bg-subtle: #1E1638;
  --color-border: rgba(196,181,253,0.18);
  --color-border-light: rgba(196,181,253,0.10);
  --chat-bg: #150F26;
  --bubble-in-bg: #251C42;
}

/* Surface "Teal" */
html[data-theme="dark"][data-surface="teal"] {
  --color-bg: #08161A;
  --color-surface: #0E2227;
  --color-surface-card: #0E2227;
  --bg-surface-2: #16333A;
  --color-bg-subtle: #112A30;
  --color-border: rgba(103,232,249,0.16);
  --color-border-light: rgba(103,232,249,0.09);
  --chat-bg: #0A191D;
  --bubble-in-bg: #16333A;
}

/* Surface "Mocha" */
html[data-theme="dark"][data-surface="mocha"] {
  --color-bg: #17120D;
  --color-surface: #211A12;
  --color-surface-card: #211A12;
  --bg-surface-2: #2E2418;
  --color-bg-subtle: #271F15;
  --color-border: rgba(253,230,138,0.16);
  --color-border-light: rgba(253,230,138,0.09);
  --chat-bg: #19140E;
  --bubble-in-bg: #2E2418;
}

html[data-theme="light"] {
  --color-bg: #F6F7F9;
  --color-surface: #FFFFFF;
  --color-surface-card: #FFFFFF;
  --bg-surface-2: #F0F2F5;
  --color-bg-subtle: #F3F5F8;
  --color-border: #E2E6ED;
  --color-border-light: #EEF1F6;
  --color-text: #111318;
  --color-text-main: #111318;
  --color-text-muted: #525B6E;
  --color-text-subtle: #5C6578;

  --color-success: #2E7D4F;
  --color-success-soft: rgba(46, 125, 79, 0.12);
  --color-warning: #A16D1F;
  --color-warning-soft: rgba(161, 109, 31, 0.12);
  --color-danger: #A93836;
  --color-danger-soft: rgba(169, 56, 54, 0.12);

  --chat-bg: #F6F7F9;
  --bubble-in-bg: #FFFFFF;
  --bubble-in-text: #111318;
  --bubble-in-border: #E2E6ED;
}

/* 4-Accent Switcher (WCAG AA CTA contrast verified via contrast-check.py) */
:root,
html[data-accent="cobalt"] {
  --color-primary: #3B82F6;
  --color-cta-bg: #2563EB;
  --color-cta-fg: #FFFFFF;
  --color-primary-hover: #1D4ED8;
  --color-primary-soft: rgba(59, 130, 246, 0.14);
  --color-primary-light: rgba(59, 130, 246, 0.24);
  --bubble-out-bg: #2563EB;
  --bubble-out-text: #FFFFFF;
}
html[data-theme="light"][data-accent="cobalt"] {
  --color-primary: #2563EB;
}

html[data-accent="emerald"] {
  --color-primary: #3D8B5E;
  --color-cta-bg: #2E7D4F;
  --color-cta-fg: #FFFFFF;
  --color-primary-hover: #256741;
  --color-primary-soft: rgba(61, 139, 94, 0.15);
  --color-primary-light: rgba(61, 139, 94, 0.25);
  --bubble-out-bg: #2E7D4F;
  --bubble-out-text: #FFFFFF;
}
html[data-theme="light"][data-accent="emerald"] {
  --color-primary: #2E7D4F;
}

html[data-accent="violet"] {
  --color-primary: #8B5CF6;
  --color-cta-bg: #7C3AED;
  --color-cta-fg: #FFFFFF;
  --color-primary-hover: #6D28D9;
  --color-primary-soft: rgba(139, 92, 246, 0.15);
  --color-primary-light: rgba(139, 92, 246, 0.25);
  --bubble-out-bg: #7C3AED;
  --bubble-out-text: #FFFFFF;
}
html[data-theme="light"][data-accent="violet"] {
  --color-primary: #7C3AED;
}

html[data-accent="amber"] {
  --color-primary: #D6A14E;
  --color-cta-bg: #B8863B;
  --color-cta-fg: #090A0F;
  --color-primary-hover: #A67630;
  --color-primary-soft: rgba(214, 161, 78, 0.15);
  --color-primary-light: rgba(214, 161, 78, 0.25);
  --bubble-out-bg: #B8863B;
  --bubble-out-text: #090A0F;
}
html[data-theme="light"][data-accent="amber"] {
  --color-primary: #9A6B25;
}

/* Global Typography, Tabular-Nums & Unified SVG Icons */
body {
  letter-spacing: -0.011em;
}
svg.ico,
.nav-icon-item svg,
.sidebar-icon-btn svg,
.topbar svg,
.ndr-btn-mini svg {
  flex-shrink: 0;
  vertical-align: middle;
}

.chat-time,
.channel-sub,
.msg-time,
.ndr-table td:first-child,
.mono-num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* Accessibility: Unified Pointer & Keyboard Focus Indicator (R-32 / R-39) */
:where(button, a[href], select, input, textarea, [role="button"], [tabindex]) {
  transition: background-color 180ms ease-out, border-color 180ms ease-out, color 180ms ease-out, transform 180ms ease-out;
}
:where(button, a[href], select, summary, [role="button"], label[for]) {
  cursor: pointer;
}
:where(button, a, input, select, textarea, [role="button"], [tabindex]):focus-visible {
  outline: 2px solid var(--color-primary) !important;
  outline-offset: 2px;
}

/* Primary Buttons & Topbar Clean Controls (WCAG AA) */
.btn-primary {
  background: var(--color-cta-bg) !important;
  color: var(--color-cta-fg) !important;
  border: 1px solid transparent;
}
.btn-primary:hover {
  background: var(--color-primary-hover) !important;
}
.topbar-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  font-size: 11.5px;
  font-weight: 500;
  background: var(--bg-surface-2);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: 6px;
}
.topbar-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.btn-copilot-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.sidebar-avatar-wrap {
  background: transparent;
  border: none;
  padding: 0;
}

/* Flat Hairline List: Accounts & Conversations (No Boxed Cards) */
.channel-account-card,
.channel-account-card.all-inbox-card {
  border-radius: 0 !important;
  margin: 0 !important;
  border: none !important;
  border-bottom: 1px solid var(--color-border-light) !important;
  border-left: 2px solid transparent !important;
  padding: 7px 12px !important;
  background: transparent !important;
  box-shadow: none !important;
}
.channel-account-card:hover {
  background: var(--bg-surface-2) !important;
}
.channel-account-card.active,
.channel-account-card.all-inbox-card.active {
  background: var(--bg-surface-2) !important;
  border-left: 2px solid var(--color-primary) !important;
}
.channel-icon-badge {
  width: 24px !important;
  height: 24px !important;
  border-radius: 5px !important;
  background: var(--bg-surface-2) !important;
  color: var(--color-text-muted) !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.channel-account-card.active .channel-icon-badge {
  color: var(--color-primary) !important;
  background: var(--color-primary-soft) !important;
}

.chat-card-item {
  border-radius: 0 !important;
  margin: 0 !important;
  border: none !important;
  border-bottom: 1px solid var(--color-border-light) !important;
  border-left: 2px solid transparent !important;
  padding: 9px 12px !important;
  background: transparent !important;
  box-shadow: none !important;
}
.chat-card-item:hover {
  background: var(--bg-surface-2) !important;
}
.chat-card-item.active,
.chat-card-item.has-unread.active {
  background: var(--bg-surface-2) !important;
  border-left: 2px solid var(--color-primary) !important;
}
.chat-avatar-wrap-rel {
  position: relative;
  flex-shrink: 0;
}
.chat-status-corner-dot {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: 1.5px solid var(--color-surface);
  background: var(--color-text-muted);
}
.chat-status-corner-dot.open { background: var(--color-success); }
.chat-status-corner-dot.pending { background: var(--color-warning); }
.chat-status-corner-dot.resolved { background: var(--color-primary); }
.chat-status-corner-dot.snoozed { background: var(--color-text-subtle); }

/* Calm Monochrome Badges & Pills */
.chat-badge-assignee,
.chat-badge-unassigned,
.chat-account-pill {
  background: var(--bg-surface-2) !important;
  color: var(--color-text-muted) !important;
  border: 1px solid var(--color-border) !important;
  font-weight: 500 !important;
  font-size: 10px !important;
  padding: 1px 6px !important;
  border-radius: 4px !important;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.unread-badge {
  background: var(--color-cta-bg) !important;
  color: var(--color-cta-fg) !important;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* Thread Body Split + Collapsible Right Context Drawer */
.thread-body-split {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  position: relative;
}
.thread-chat-column {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  min-height: 0;
  background: var(--chat-bg);
}
.thread-header-actions-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
}
.thread-header-ctrl {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 9px;
  border-radius: 6px;
  border: 1px solid var(--color-border);
  background: var(--bg-surface-2);
  color: var(--color-text);
  font-size: 11.5px;
  font-weight: 500;
}
.thread-header-ctrl:hover,
.thread-header-ctrl.active {
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.chat-context-drawer {
  width: 280px;
  flex-shrink: 0;
  border-left: 1px solid var(--color-border);
  background: var(--color-surface);
  display: none;
  flex-direction: column;
  overflow-y: auto;
  padding: 12px;
  gap: 12px;
}
.chat-context-drawer.open {
  display: flex;
}
.ctx-drawer-section {
  border-bottom: 1px solid var(--color-border-light);
  padding-bottom: 10px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.ctx-drawer-section:last-child {
  border-bottom: none;
}
.ctx-drawer-title {
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
}
.ctx-drawer-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 6px;
  border: 1px solid var(--color-border);
  background: var(--bg-surface-2);
  color: var(--color-text);
  font-size: 11.5px;
  font-weight: 500;
  text-align: left;
}
.ctx-drawer-btn:hover {
  border-color: var(--color-primary);
}
.ctx-drawer-btn-left {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
@media (max-width: 1280px) {
  .chat-context-drawer.open {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: 40;
    background: rgba(17, 19, 26, 0.90);
    backdrop-filter: blur(12px);
    box-shadow: -8px 0 24px rgba(0, 0, 0, 0.35);
  }
  html[data-theme="light"] .chat-context-drawer.open {
    background: rgba(255, 255, 255, 0.92);
  }
}

/* Smart Triage & Alert Storm Cards: Neutral Surface + Left Stripe Only (No Neon Box) */
.triage-card-v4 {
  background: var(--bg-surface-2);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-primary);
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 12px;
  color: var(--color-text);
}
.triage-card-v4.crit { border-left-color: var(--color-danger); }
.triage-card-v4.warn { border-left-color: var(--color-warning); }
.triage-draft-box-v4 {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: 5px;
  padding: 8px 10px;
  margin: 7px 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--color-text);
  max-height: 92px;
  overflow-y: auto;
}
.alert-storm-v4 {
  position: fixed;
  top: 56px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 99999;
  width: 90%;
  max-width: 880px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-danger);
  border-radius: 7px;
  padding: 11px 15px;
  color: var(--color-text);
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.42);
}

/* AI-NDR Monochrome Hover-Only Action Buttons */
.ndr-btn-mini {
  background: transparent !important;
  border: 1px solid var(--color-border) !important;
  color: var(--color-text-muted) !important;
  border-radius: 5px !important;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 !important;
}
.ndr-btn-mini:hover {
  color: var(--color-primary) !important;
  border-color: var(--color-primary) !important;
  background: var(--color-primary-soft) !important;
}

/* Accent Swatch Grid inside Theme Customizer Modal */
.v4-accent-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.v4-accent-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid var(--color-border);
  background: var(--bg-surface-2);
  color: var(--color-text);
  font-size: 11.5px;
  font-weight: 500;
}
.v4-accent-btn.active {
  border-color: var(--color-primary);
  box-shadow: inset 0 0 0 1px var(--color-primary);
  background: var(--color-primary-soft);
  font-weight: 600;
}
.v4-accent-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  flex-shrink: 0;
}

/* Reduced Motion Respect (R-39) */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   RING-CRM v4.0.1 Hotfix — Icon Visibility, Scrollbars, Nav & Flush Inbox Tabs
   ========================================================================== */

button {
  color: inherit;
}

.sidebar-icon-btn {
  color: var(--color-text-muted) !important;
  border: 1px solid transparent;
}
.sidebar-icon-btn:hover {
  color: var(--color-text) !important;
  background: var(--bg-surface-2) !important;
  border-color: var(--color-border);
}

.btn-logout {
  color: var(--color-text-muted) !important;
  opacity: 0.9 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 5px;
}
.btn-logout:hover {
  color: var(--color-danger) !important;
  background: var(--color-danger-soft) !important;
  opacity: 1 !important;
}

.nav-icon-item {
  color: var(--color-text-muted);
}
.nav-icon-item.active {
  color: var(--color-primary) !important;
  background: var(--color-primary-soft) !important;
}

/* Slim Custom Scrollbars (Dark & Light) */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
}
html[data-theme="light"] * {
  scrollbar-color: rgba(15, 23, 42, 0.18) transparent;
}
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.28);
}
html[data-theme="light"] ::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.16);
}
html[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
  background: rgba(15, 23, 42, 0.30);
}

/* Flush Hairline Accounts & Inbox Panes + Clean Filter Tabs */
.pane-accounts,
.pane-inbox-list {
  padding: 0 !important;
  background: var(--color-surface) !important;
}
.pane-section-title {
  padding: 10px 12px 6px !important;
  margin: 0 !important;
}
.inbox-header-v4 {
  padding: 10px 12px;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
}
.inbox-search-wrap-v4 {
  padding: 8px 12px 6px;
}
.filter-scroll-row {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 4px;
  padding: 0 12px 8px !important;
  margin: 0 !important;
  border-bottom: 1px solid var(--color-border);
  scrollbar-width: none;
}
.filter-scroll-row::-webkit-scrollbar {
  display: none;
}
.filter-pill {
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  border-radius: 5px !important;
  padding: 4px 9px !important;
  height: 26px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px !important;
  font-weight: 500 !important;
  background: transparent !important;
  border: 1px solid transparent !important;
  color: var(--color-text-muted) !important;
}
.filter-pill:hover {
  background: var(--bg-surface-2) !important;
  color: var(--color-text) !important;
}
.filter-pill.active {
  background: var(--bg-surface-2) !important;
  border-color: var(--color-border) !important;
  color: var(--color-text) !important;
  font-weight: 600 !important;
}
.chat-items-scroll {
  gap: 0 !important;
  padding: 0 !important;
}
.status-filter-item {
  border-radius: 0 !important;
  padding: 7px 12px !important;
  border-left: 2px solid transparent;
}
.status-filter-item.active {
  background: var(--bg-surface-2) !important;
  border-left: 2px solid var(--color-primary);
  color: var(--color-text) !important;
}
.status-filter-badge {
  background: var(--bg-surface-2) !important;
  color: var(--color-text-muted) !important;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}
.status-filter-item.active .status-filter-badge {
  background: var(--color-primary-soft) !important;
  color: var(--color-primary) !important;
}

/* ==========================================================================
   RING-CRM v4.0.2 POLISH HOTFIX (Browser Visual Verification Fixes)
   ========================================================================== */

/* 1. Dark/Light-aware secondary & composer icon buttons (no glaring white box) */
.btn-secondary,
.thread-input-bar .btn-secondary {
  background: var(--bg-surface-2) !important;
  color: var(--color-text) !important;
  border: 1px solid var(--color-border) !important;
  border-radius: 6px;
}
.btn-secondary:hover,
.thread-input-bar .btn-secondary:hover {
  background: var(--bg-surface-3) !important;
  border-color: var(--color-border-strong) !important;
  color: var(--color-text) !important;
}

/* 2. Active account card contrast in Light Mode (override legacy color: white) */
.channel-account-card.active,
.channel-account-card.all-inbox-card.active {
  color: var(--color-text) !important;
}
.channel-account-card.active .channel-name,
.channel-account-card.all-inbox-card.active .channel-name {
  color: var(--color-text) !important;
}
.channel-account-card.active .channel-sub,
.channel-account-card.all-inbox-card.active .channel-sub {
  color: var(--color-text-muted) !important;
}

/* 3. Calm audit pills in thread sub-header (replace glaring white v3 pills) */
.status-changed-pill,
.assigned-changed-pill,
.merged-with-pill {
  background: var(--bg-surface-2) !important;
  border: 1px solid var(--color-border) !important;
  color: var(--color-text-muted) !important;
  border-radius: 5px !important;
  font-weight: 600 !important;
  padding: 2px 8px !important;
}
.status-changed-pill {
  border-left: 2px solid var(--color-primary) !important;
  color: var(--color-text) !important;
}
.assigned-changed-pill {
  border-left: 2px solid var(--color-info) !important;
  color: var(--color-text) !important;
}

/* 4. Unread mini badge in filter tabs follows active accent token */
.badge-unread-mini {
  background: var(--color-cta-bg) !important;
  color: var(--color-cta-fg) !important;
  font-family: var(--font-mono) !important;
  font-variant-numeric: tabular-nums;
  font-size: 10px !important;
  font-weight: 700 !important;
  min-width: 17px;
  height: 17px;
  padding: 0 5px !important;
  border-radius: 999px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   RING-CRM v4.1 PAKET 2 (wacrm): Presence 75s, Collision Guard & SLA Strip
   ========================================================================== */
.presence-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--color-success);
  display: inline-block;
  flex-shrink: 0;
}
.sla-metrics-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 5px 12px;
  border-bottom: 1px solid var(--color-border);
  background: var(--bg-surface-1);
  font-size: 10.5px;
  color: var(--color-text-muted);
  cursor: pointer;
}
.sla-metrics-strip:hover {
  background: var(--bg-surface-2);
}
.sla-metric-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.sla-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 10px;
  font-weight: 600;
  background: var(--bg-surface-2);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}
.sla-chip-breach {
  background: var(--color-danger-soft);
  color: var(--color-danger);
  border-color: var(--color-danger);
}
.sla-chip-warn {
  background: var(--color-warning-soft);
  color: var(--color-warning);
  border-color: var(--color-warning);
}
.chat-collision-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 600;
  background: var(--color-warning-soft);
  color: var(--color-warning);
  border: 1px solid var(--color-warning);
  white-space: nowrap;
}

/* ==========================================================================
   RING-CRM v4.2 PAKET 3 (e-surat): Topbar nowrap polish & E-Surat Workspace
   ========================================================================== */
.topbar-btn,
.brand-title,
.brand-badge {
  white-space: nowrap !important;
}
.esurat-wrap {
  padding: 18px 22px;
  max-width: 1180px;
  margin: 0 auto;
  height: 100%;
  overflow-y: auto;
}
.esurat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 14px;
}
.esurat-filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}
.esurat-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 12px;
}
.esurat-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}
.esurat-docnum {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--color-primary);
}
.esurat-cls-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  border: 1px solid var(--color-border);
}
.esurat-cls-SR { background: var(--color-danger-soft); color: var(--color-danger); border-color: var(--color-danger); }
.esurat-cls-R  { background: var(--color-warning-soft); color: var(--color-warning); border-color: var(--color-warning); }
.esurat-cls-T  { background: var(--color-primary-soft); color: var(--color-primary); border-color: var(--color-primary); }
.esurat-cls-B  { background: var(--bg-surface-2); color: var(--color-text-muted); }
.esurat-disp-list {
  margin-top: 10px;
  border-top: 1px solid var(--color-border);
  padding-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.esurat-disp-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 6px;
  background: var(--bg-surface-2);
  border: 1px solid var(--color-border);
  font-size: 11.5px;
}

/* ==========================================================================
   RING-CRM v4.2.1 FIX: WhatsApp Delete Message Modal Overlay
   ========================================================================== */
.wa-delete-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10050;
  background: rgba(8, 10, 16, 0.65);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.wa-delete-modal-box {
  width: 100%;
  max-width: 360px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-strong, var(--color-border));
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.45);
}
.wa-delete-title {
  margin: 0 0 14px;
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text);
}
.wa-delete-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.wa-delete-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 9px 14px;
  border-radius: 7px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--color-border);
  background: var(--bg-surface-2);
  color: var(--color-text);
  transition: background 0.15s ease, border-color 0.15s ease;
}
.wa-delete-btn:hover {
  background: var(--bg-surface-3, var(--color-primary-soft));
}
.wa-delete-btn.btn-delete-everyone {
  background: var(--color-danger-soft);
  color: var(--color-danger);
  border-color: var(--color-danger);
}
.wa-delete-btn.btn-delete-everyone:hover {
  background: var(--color-danger);
  color: #ffffff;
}
.wa-delete-btn.btn-delete-cancel {
  background: transparent;
  color: var(--color-text-muted);
}

/* ==========================================================================
   v4.3 — Penanda belum dibaca dipulihkan (bentrok !important v4.0) + baris sudah dibaca lebih tenang
   ========================================================================== */
.chat-card-item:not(.has-unread) .chat-contact-title { font-weight: 500 !important; }
.chat-card-item:not(.has-unread) .chat-snippet { font-weight: 400 !important; color: var(--color-text-muted) !important; }
.chat-card-item.has-unread {
  background: var(--color-primary-soft) !important;
  border-left: 3px solid var(--color-primary) !important;
}
.chat-card-item.has-unread:hover { background: var(--color-primary-light) !important; }
.chat-card-item.has-unread .chat-contact-title { font-weight: 700 !important; color: var(--color-text) !important; }
.chat-card-item.has-unread .chat-snippet { font-weight: 600 !important; color: var(--color-text) !important; }
.chat-card-item.has-unread .chat-avatar-circle { box-shadow: 0 0 0 1.5px var(--color-primary); }
.chat-card-item.has-unread.active {
  background: var(--bg-surface-2) !important;
  border-left: 3px solid var(--color-primary) !important;
}

/* ==========================================================================
   v4.4 — Project Tracking Kanban Board, Hairline Cards & Detail Drawer
   ========================================================================== */
.proj-page {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  padding: 12px 16px;
  gap: 12px;
}
.proj-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  border-bottom: 1px solid var(--border-hairline, var(--color-border));
  padding-bottom: 10px;
}
.proj-topbar-left { display: flex; flex-direction: column; gap: 6px; }
.proj-title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.proj-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.proj-total-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--color-primary-soft);
  color: var(--color-primary);
  border: 1px solid var(--border-hairline, var(--color-border));
}
.proj-subtabs { display: flex; gap: 4px; }
.proj-subtab {
  background: transparent;
  border: 1px solid var(--border-hairline, var(--color-border));
  color: var(--color-text-muted);
  padding: 4px 10px;
  border-radius: 5px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
}
.proj-subtab.active {
  background: var(--color-primary);
  color: #ffffff;
  border-color: var(--color-primary);
}
.proj-topbar-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.proj-input {
  background: var(--bg-surface-2, var(--color-bg));
  color: var(--color-text);
  border: 1px solid var(--border-hairline, var(--color-border));
  border-radius: 5px;
  padding: 5px 8px;
  font-size: 12px;
  width: 100%;
}
.proj-search { width: 210px; }
.proj-btn { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; font-size: 11.5px; text-decoration: none; }
.proj-btn-xs { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; font-size: 11px; }
.proj-btn-warn { border-color: var(--color-warning); color: var(--color-warning); }
.proj-workspace { display: flex; flex: 1; min-height: 0; gap: 12px; overflow: hidden; }
.proj-board-scroll {
  display: flex;
  flex: 1;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 6px;
}
.proj-col {
  min-width: 245px;
  flex: 1 0 245px;
  background: var(--color-surface);
  border: 1px solid var(--border-hairline, var(--color-border));
  border-radius: 7px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: border-color 0.15s ease-out;
}
.proj-col.drag-over { border-color: var(--color-primary); }
.proj-col-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-hairline, var(--color-border));
  background: var(--bg-surface-2, var(--color-bg));
}
.proj-col-title { font-size: 11.5px; font-weight: 700; color: var(--color-text); }
.proj-col-meta { font-size: 10.5px; color: var(--color-text-muted); }
.proj-col-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.proj-col-empty { font-size: 11px; color: var(--color-text-subtle); padding: 14px 6px; text-align: center; }
.proj-card {
  background: var(--bg-surface-2, var(--color-bg));
  border: 1px solid var(--border-hairline, var(--color-border));
  border-left: 3px solid var(--color-primary);
  border-radius: 5px;
  padding: 8px 9px;
  cursor: pointer;
  transition: background 0.15s ease-out;
}
.proj-card:hover { background: var(--color-primary-soft); }
.proj-card.selected { box-shadow: inset 0 0 0 1px var(--color-primary); }
.proj-card.status-hold { border-left-color: var(--color-warning); }
.proj-card.status-cancelled { border-left-color: var(--color-text-subtle); opacity: 0.72; }
.proj-card-row1 { display: flex; justify-content: space-between; align-items: flex-start; gap: 6px; }
.proj-card-customer { font-size: 12px; font-weight: 600; color: var(--color-text); line-height: 1.3; }
.proj-card-dots { display: inline-flex; gap: 4px; align-items: center; flex-shrink: 0; padding-top: 3px; }
.proj-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.proj-dot.dot-conflict { background: var(--color-danger); }
.proj-dot.dot-locked { background: var(--color-primary); }
.proj-dot.dot-missing { background: var(--color-warning); }
.proj-card-row2 { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.proj-cap { font-size: 11px; font-weight: 700; color: var(--color-text); }
.proj-vendor-chip, .proj-state-chip {
  font-size: 10px;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 3px;
  border: 1px solid var(--border-hairline, var(--color-border));
  color: var(--color-text-muted);
}
.proj-ref-chip {
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 3px;
  background: var(--color-surface);
  border: 1px solid var(--border-hairline, var(--color-border));
  color: var(--color-text-muted);
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.proj-ref-gone { border-color: var(--color-warning); color: var(--color-warning); }
.proj-drawer {
  width: 390px;
  flex-shrink: 0;
  background: var(--color-surface);
  border: 1px solid var(--border-hairline, var(--color-border));
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.proj-drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-hairline, var(--color-border));
}
.proj-drawer-title { font-size: 13.5px; font-weight: 700; color: var(--color-text); }
.proj-drawer-sub { font-size: 11.5px; color: var(--color-text-muted); margin-top: 2px; }
.proj-drawer-body { flex: 1; overflow-y: auto; padding: 10px 12px; display: flex; flex-direction: column; gap: 12px; }
.proj-section { border-top: 1px solid var(--border-hairline, var(--color-border)); padding-top: 9px; }
.proj-section:first-child { border-top: none; padding-top: 0; }
.proj-section-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.proj-section-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; color: var(--color-text-muted); margin-bottom: 6px; }
.proj-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; font-size: 11px; color: var(--color-text-muted); }
.proj-form-grid label { display: flex; flex-direction: column; gap: 3px; }
.proj-lock-tag { font-size: 9.5px; color: var(--color-primary); font-family: var(--font-mono); }
.proj-quick-actions { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.proj-soft-warn {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  padding: 7px 9px;
  border-radius: 5px;
  background: var(--color-warning-soft);
  color: var(--color-warning);
  border: 1px solid var(--color-warning);
}
.proj-conflict-box {
  background: var(--color-danger-soft);
  border: 1px solid var(--color-danger);
  border-radius: 5px;
  padding: 7px 9px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 11px;
}
.proj-conflict-row { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.proj-subcard {
  background: var(--bg-surface-2, var(--color-bg));
  border: 1px solid var(--border-hairline, var(--color-border));
  border-radius: 5px;
  padding: 7px 9px;
  margin-bottom: 6px;
  font-size: 11.5px;
}
.proj-subcard-top { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.proj-subcard-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 3px; font-size: 11px; color: var(--color-text-muted); }
.proj-map-link { color: var(--color-primary); text-decoration: none; display: inline-flex; align-items: center; gap: 3px; }
.proj-audit-row { display: flex; flex-wrap: wrap; gap: 5px; font-size: 11px; color: var(--color-text-muted); padding: 3px 0; border-bottom: 1px solid var(--border-hairline, var(--color-border)); }
.proj-circuits-wrap { flex: 1; overflow: auto; border: 1px solid var(--border-hairline, var(--color-border)); border-radius: 7px; background: var(--color-surface); }
.proj-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.proj-table th, .proj-table td { padding: 8px 10px; border-bottom: 1px solid var(--border-hairline, var(--color-border)); text-align: left; }
.proj-table th { background: var(--bg-surface-2, var(--color-bg)); font-size: 11px; color: var(--color-text-muted); text-transform: uppercase; position: sticky; top: 0; }
.proj-preview-box { background: var(--bg-surface-2, var(--color-bg)); border: 1px solid var(--border-hairline, var(--color-border)); border-radius: 5px; padding: 8px 10px; max-height: 220px; overflow-y: auto; font-size: 11.5px; }
.proj-review-list { display: flex; flex-direction: column; gap: 8px; max-height: 60vh; overflow-y: auto; }
.proj-review-item { border: 1px solid var(--border-hairline, var(--color-border)); border-radius: 6px; padding: 9px 11px; background: var(--bg-surface-2, var(--color-bg)); }
.proj-empty { padding: 24px; text-align: center; color: var(--color-text-muted); font-size: 12px; }
.proj-muted { color: var(--color-text-muted); font-size: 11px; }
@media (max-width: 768px) {
  .proj-workspace { flex-direction: column; overflow-y: auto; }
  .proj-drawer { width: 100%; max-height: 60vh; }
  .proj-search { width: 100%; }
}

/* ==========================================================================
   v4.4 — Fiber Optic Attenuation & Ratio Splitter Calculator (RatioCalc)
   ========================================================================== */
.rc-wrap { flex: 1; overflow-y: auto; padding-bottom: 16px; }
.rc-grid { display: grid; grid-template-columns: minmax(310px, 1fr) minmax(380px, 1.35fr); gap: 12px; }
.rc-panel {
  background: var(--color-surface);
  border: 1px solid var(--border-hairline, var(--color-border));
  border-radius: 8px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rc-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 1px solid var(--border-hairline, var(--color-border));
  padding-bottom: 8px;
}
.rc-panel-title { font-size: 13px; font-weight: 700; color: var(--color-text); }
.rc-form { display: flex; flex-direction: column; gap: 10px; }
.rc-field label { display: block; font-size: 11.5px; font-weight: 600; color: var(--color-text-muted); margin-bottom: 4px; }
.rc-adv-box {
  border-top: 1px solid var(--border-hairline, var(--color-border));
  padding-top: 10px;
  margin-top: 2px;
}
.rc-cards-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rc-out-card {
  background: var(--bg-surface-2, var(--color-bg));
  border: 1px solid var(--border-hairline, var(--color-border));
  border-left: 3px solid var(--color-primary);
  border-radius: 6px;
  padding: 10px 12px;
}
.rc-out-card.rc-status-good { border-left-color: var(--color-success); }
.rc-out-card.rc-status-opt  { border-left-color: var(--color-primary); }
.rc-out-card.rc-status-warn { border-left-color: var(--color-warning); }
.rc-out-card.rc-status-crit { border-left-color: var(--color-danger); }
.rc-out-label { font-size: 11px; color: var(--color-text-muted); }
.rc-out-val { font-size: 20px; font-weight: 800; color: var(--color-text); margin: 4px 0; }
.rc-status-badge {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--color-surface);
  border: 1px solid var(--border-hairline, var(--color-border));
}
.rc-svg-box {
  background: var(--bg-surface-2, var(--color-bg));
  border: 1px solid var(--border-hairline, var(--color-border));
  border-radius: 6px;
  padding: 6px 8px;
  color: var(--color-text);
}
.rc-breakdown {
  background: var(--bg-surface-2, var(--color-bg));
  border: 1px solid var(--border-hairline, var(--color-border));
  border-radius: 6px;
  padding: 9px 11px;
}
.rc-formula-lines { font-size: 11px; color: var(--color-text-muted); display: flex; flex-direction: column; gap: 3px; }
@media (max-width: 900px) {
  .rc-grid, .rc-cards-row { grid-template-columns: 1fr; }
}

/* ==========================================================================
   v4.4.1 — Dedicated Fiber Doctor Module (Triage, GIS ODP, OLT Fleet)
   ========================================================================== */
.fd-wrap { flex: 1; overflow-y: auto; padding-bottom: 16px; }
.fd-pill-offline { border-color: var(--color-danger); color: var(--color-danger); background: var(--color-danger-soft); }
.fd-kpi-strip { display: grid; grid-template-columns: repeat(4, minmax(170px, 1fr)); gap: 10px; }
.fd-kpi-card {
  background: var(--color-surface);
  border: 1px solid var(--border-hairline, var(--color-border));
  border-left: 3px solid var(--color-primary);
  border-radius: 7px;
  padding: 10px 12px;
}
.fd-kpi-card.fd-kpi-warn { border-left-color: var(--color-warning); }
.fd-kpi-label { font-size: 11px; color: var(--color-text-muted); font-weight: 600; }
.fd-kpi-val { font-size: 20px; font-weight: 800; color: var(--color-text); margin: 4px 0 2px; }
.fd-sop-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 7px 11px;
  border-radius: 6px;
  background: var(--color-surface);
  border: 1px solid var(--border-hairline, var(--color-border));
}
.fd-sop-title { font-size: 11px; font-weight: 700; color: var(--color-text-muted); margin-right: 4px; }
.fd-sev-pill {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid var(--border-hairline, var(--color-border));
  white-space: nowrap;
}
.fd-sev-kuat { color: #fbbf24; border-color: rgba(245, 158, 11, 0.45); background: rgba(245, 158, 11, 0.1); }
.fd-sev-normal { color: var(--color-success); border-color: rgba(16, 185, 129, 0.45); background: rgba(16, 185, 129, 0.1); }
.fd-sev-warn { color: var(--color-warning); border-color: rgba(245, 158, 11, 0.5); background: var(--color-warning-soft); }
.fd-sev-crit { color: var(--color-danger); border-color: rgba(239, 68, 68, 0.5); background: var(--color-danger-soft); }
.fd-sev-muted { color: var(--color-text-muted); }
.fd-sim-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding: 8px 12px;
  border-radius: 6px;
  background: var(--color-surface);
  border: 1px solid var(--color-primary);
  font-size: 12px;
}
.fd-cov-form {
  display: grid;
  grid-template-columns: minmax(190px, 1.3fr) repeat(3, minmax(120px, 1fr)) auto;
  gap: 8px;
}
.fd-cov-form label { display: flex; flex-direction: column; gap: 4px; font-size: 11px; color: var(--color-text-muted); font-weight: 600; }
.fd-cov-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 6px;
  border: 1px solid var(--border-hairline, var(--color-border));
  background: var(--bg-surface-2, var(--color-bg));
  font-size: 12px;
}
.fd-cov-ok { border-left: 3px solid var(--color-success); }
.fd-cov-miss { border-left: 3px solid var(--color-warning); }
.fd-olt-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 10px; }
.fd-olt-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.fd-olt-stat {
  background: var(--bg-surface-2, var(--color-bg));
  border: 1px solid var(--border-hairline, var(--color-border));
  border-radius: 5px;
  padding: 6px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.fd-olt-stat span { font-size: 10px; color: var(--color-text-muted); }
.fd-olt-stat strong { font-size: 14px; color: var(--color-text); }
.fd-olt-stat.fd-stat-ok strong, .fd-olt-stat.fd-stat-ok span { color: var(--color-success); }
.fd-olt-stat.fd-stat-crit strong, .fd-olt-stat.fd-stat-crit span { color: var(--color-danger); }
.fd-olt-stat.fd-stat-warn strong, .fd-olt-stat.fd-stat-warn span { color: var(--color-warning); }
@media (max-width: 900px) {
  .fd-kpi-strip, .fd-cov-form { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .fd-kpi-strip, .fd-cov-form { grid-template-columns: 1fr; }
}

/* ==========================================================================
   v4.4.2 — Fiber Doctor FD-1..FD-3 (Banner Blast-Radius, Peta GIS, CLI Preview)
   ========================================================================== */
.fd-blast-banner { margin-top: 10px; padding: 10px 12px; background: var(--color-surface); border: 1px solid var(--border-hairline, var(--color-border)); border-radius: 7px; }
.fd-blast-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.fd-blast-title { font-size: 12px; font-weight: 700; color: var(--color-text); display: inline-flex; align-items: center; gap: 6px; }
.fd-blast-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.fd-blast-card { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; padding: 8px 9px; border-radius: 6px; background: var(--bg-surface-2, var(--color-bg)); border: 1px solid var(--border-hairline, var(--color-border)); border-left: 3px solid var(--color-primary); }
.fd-blast-card.fd-sev-crit { border-left-color: var(--color-danger); }
.fd-blast-card.fd-sev-warn { border-left-color: var(--color-warning); }
.fd-blast-card.fd-sev-normal { border-left-color: var(--color-primary); }
.fd-blast-card.active { outline: 2px solid var(--color-primary); }
.fd-blast-main { display: flex; flex-direction: column; gap: 3px; align-items: flex-start; background: none; border: 0; padding: 0; cursor: pointer; text-align: left; width: 100%; }
.fd-blast-type { font-size: 10.5px; font-weight: 700; color: var(--color-text); }
.fd-blast-pon { font-size: 11px; color: var(--color-text-muted); }
.fd-blast-count { font-size: 10.5px; color: var(--color-text-muted); }
.fd-blast-ticket { font-size: 10.5px; color: var(--color-text-muted); }
.fd-blast-filterbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; font-size: 11px; color: var(--color-text-muted); }

.fd-gis-map { width: 100%; height: 320px; border-radius: 6px; overflow: hidden; border: 1px solid var(--border-hairline, var(--color-border)); background: var(--bg-surface-2, var(--color-bg)); }
.fd-gis-radar { margin-top: 8px; }
.fd-radar { width: 100%; height: auto; max-height: 340px; display: block; }
.fd-radar-cap { font-size: 11px; fill: var(--color-text-muted); }

.fd-modal-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, .45); display: flex; align-items: center; justify-content: center; z-index: 1200; padding: 16px; }
.fd-modal { background: var(--color-surface); border: 1px solid var(--border-hairline, var(--color-border)); border-radius: 8px; width: min(760px, 96vw); max-height: 88vh; overflow: auto; box-shadow: 0 12px 34px rgba(0, 0, 0, .28); }
.fd-modal-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--border-hairline, var(--color-border)); }
.fd-modal-title { font-size: 12.5px; font-weight: 700; color: var(--color-text); }
.fd-modal-body { padding: 12px; }
.fd-cli-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; }
.fd-cli-grid label { display: flex; flex-direction: column; gap: 3px; font-size: 11px; color: var(--color-text-muted); }
.fd-cli-badge { margin-top: 10px; padding: 6px 9px; border-radius: 5px; font-size: 11px; font-weight: 800; letter-spacing: .02em; color: var(--color-danger); background: var(--color-danger-soft); border: 1px solid rgba(239, 68, 68, .5); }
.fd-cli-notes { margin-top: 6px; font-size: 11px; }
.fd-cli-pre { margin: 8px 0; padding: 10px; border-radius: 6px; background: var(--bg-surface-2, var(--color-bg)); border: 1px solid var(--border-hairline, var(--color-border)); font-size: 11.5px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; color: var(--color-text); }
@media (max-width: 900px) {
  .fd-blast-grid, .fd-cli-grid { grid-template-columns: 1fr; }
}




/* ==========================================================================
   v4.5.0 — Project Tracker (Checklist, Progress, SLA, Dependencies, Portal)
   ========================================================================== */
.proj-v45-progress { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 10.5px; color: var(--color-text-muted); }
.proj-v45-bar { flex: 1; height: 4px; border-radius: 2px; background: var(--bg-surface-2, var(--color-bg)); overflow: hidden; }
.proj-v45-bar > span { display: block; height: 100%; background: var(--color-primary, #3B82F6); }
.proj-v45-sla { display: inline-block; font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 4px; border: 1px solid var(--border-hairline, var(--color-border)); color: var(--color-text-muted); margin-top: 3px; }
.proj-v45-sla-overdue { color: var(--color-danger, #B94A48); border-color: rgba(185, 74, 72, .5); }
.proj-v45-sla-contract { color: var(--color-warning, #B8863B); border-color: rgba(184, 134, 59, .5); }
.proj-v45-sla-warn { color: var(--color-warning, #D6A14E); border-color: rgba(214, 161, 78, .5); }
.proj-v45-blocked { display: inline-block; font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 4px; margin-top: 3px; color: var(--color-warning, #B8863B); border: 1px solid rgba(184, 134, 59, .5); }
.proj-v45-pinned { display: inline-block; font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 4px; margin-top: 3px; color: var(--color-primary, #3B82F6); border: 1px solid rgba(59, 130, 246, .5); }
.proj-v45-pin-btn { color: var(--color-text-muted); }
.proj-v45-pin-btn.is-pinned { color: var(--color-primary, #3B82F6); }
.proj-v45-tasks { display: flex; flex-direction: column; gap: 3px; }
.proj-v45-task { display: flex; gap: 7px; align-items: flex-start; font-size: 12.5px; color: var(--color-text); }
.proj-v45-task .is-done { text-decoration: line-through; color: var(--color-text-muted); }
.proj-v45-deps { display: flex; flex-wrap: wrap; gap: 6px; }
.proj-v45-check { display: inline-flex; gap: 5px; align-items: center; font-size: 11.5px; color: var(--color-text-muted); }
.proj-v45-links { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.proj-v45-comments { display: flex; flex-direction: column; }
.proj-v45-section { border-top: 1px solid var(--border-hairline, var(--color-border)); }
.proj-v45-timeline { width: 100%; height: auto; display: block; }
.proj-v45-tl-label { font-size: 11px; fill: var(--color-text); }
.proj-v45-tl-date { font-size: 10px; fill: var(--color-text-muted); }
.proj-v45-tl-today { font-size: 10px; fill: var(--color-danger, #B94A48); }
.proj-v45-analytics { display: flex; flex-direction: column; gap: 12px; }
.proj-v45-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 10px; }
.proj-v45-bars { display: flex; align-items: flex-end; gap: 6px; height: 160px; padding-top: 8px; }
.proj-v45-bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; }
.proj-v45-bar-fill { width: 100%; max-width: 34px; background: var(--color-primary, #3B82F6); border-radius: 3px 3px 0 0; min-height: 2px; }
.proj-v45-heat { display: grid; grid-template-columns: repeat(28, minmax(8px, 1fr)); gap: 3px; }
.proj-v45-heat > span { width: 100%; aspect-ratio: 1 / 1; border-radius: 2px; background: var(--bg-surface-2, var(--color-bg)); }
.proj-v45-heat > span.lvl1 { background: rgba(59, 130, 246, .28); }
.proj-v45-heat > span.lvl2 { background: rgba(59, 130, 246, .5); }
.proj-v45-heat > span.lvl3 { background: rgba(59, 130, 246, .72); }
.proj-v45-heat > span.lvl4 { background: var(--color-primary, #3B82F6); }
.fd-modal { max-width: 760px; }
.fd-cli-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; }
.fd-cli-grid label { display: flex; flex-direction: column; gap: 3px; font-size: 11px; color: var(--color-text-muted); }
.fd-cli-badge { margin-top: 10px; padding: 6px 9px; border-radius: 5px; font-size: 11px; font-weight: 800; color: var(--color-danger, #B94A48); background: rgba(185, 74, 72, .12); border: 1px solid rgba(185, 74, 72, .5); }
.fd-cli-notes { margin-top: 6px; font-size: 11px; }
.fd-cli-pre { margin: 8px 0; padding: 10px; border-radius: 6px; background: var(--bg-surface-2, var(--color-bg)); border: 1px solid var(--border-hairline, var(--color-border)); font-size: 11.5px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }

/* ==========================================================================
   v4.7.7 — Catatan Rilis & Changelog (Cockpit Home)
   ========================================================================== */
.cl-version-trigger {
  cursor: pointer;
  border: 1px solid transparent;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  transition: border-color 150ms ease, filter 150ms ease;
}
.cl-version-trigger:hover {
  border-color: var(--color-primary);
  filter: brightness(1.08);
}

.cl-card {
  padding: 0;
  overflow: hidden;
  background: var(--color-surface-card);
  border: 1px solid var(--color-border);
}

.cl-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.cl-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cl-header-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--color-primary-soft);
  color: var(--color-primary);
  border: 1px solid var(--color-primary-light, var(--color-border));
}

.cl-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.25;
}

.cl-subtitle {
  margin: 2px 0 0 0;
  font-size: 12px;
  color: var(--color-text-muted);
}

.cl-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.cl-latest-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 8px;
  background: var(--bg-surface-2, var(--color-bg));
  border: 1px solid var(--color-border);
  font-size: 12px;
}

.cl-latest-icon {
  display: inline-flex;
  color: var(--color-warning);
}

.cl-latest-label {
  color: var(--color-text-muted);
}

.cl-latest-ver {
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 700;
  background: var(--color-primary);
  color: #FFFFFF;
}

.cl-export-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
}

.cl-toolbar {
  padding: 10px 18px;
  border-bottom: 1px solid var(--color-border);
  background: var(--bg-surface-2, var(--color-bg));
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.cl-search-wrap {
  position: relative;
  flex: 1 1 240px;
  max-width: 420px;
}

.cl-search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  color: var(--color-text-subtle);
  pointer-events: none;
}

.cl-search-input {
  width: 100%;
  padding: 7px 12px 7px 32px;
  border-radius: 7px;
  border: 1px solid var(--color-border);
  background: var(--color-surface-card);
  color: var(--color-text);
  font-size: 12.5px;
  outline: none;
  transition: border-color 150ms ease;
}

.cl-search-input::placeholder {
  color: var(--color-text-subtle);
}

.cl-search-input:focus {
  border-color: var(--color-primary);
}

.cl-filter-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.cl-filter-pill {
  padding: 6px 12px;
  border-radius: 7px;
  border: 1px solid var(--color-border);
  background: var(--color-surface-card);
  color: var(--color-text-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease;
  white-space: nowrap;
}

.cl-filter-pill:hover {
  border-color: var(--color-primary);
  color: var(--color-text);
}

.cl-filter-pill.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #FFFFFF;
}

.cl-body {
  padding: 18px 20px;
}

.cl-timeline {
  position: relative;
  padding-left: 26px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.cl-timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 1.5px;
  background: var(--color-border);
}

.cl-node {
  position: relative;
}

.cl-dot {
  position: absolute;
  left: -26px;
  top: 3px;
  width: 15px;
  height: 15px;
  border-radius: 9999px;
  background: var(--color-surface-card);
  border: 2px solid var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cl-dot.is-latest {
  border-color: var(--color-success);
  box-shadow: 0 0 0 3px var(--color-success-soft);
}

.cl-dot-inner {
  width: 5px;
  height: 5px;
  border-radius: 9999px;
  background: var(--color-primary);
}

.cl-dot.is-latest .cl-dot-inner {
  background: var(--color-success);
}

.cl-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.cl-ver {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--color-text);
}

.cl-date {
  font-size: 11.5px;
  color: var(--color-text-muted);
}

.cl-badge-latest {
  padding: 2px 8px;
  border-radius: 5px;
  font-size: 10.5px;
  font-weight: 700;
  background: var(--color-success);
  color: #FFFFFF;
}

.cl-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 10.5px;
  font-weight: 600;
}

.cl-tag-commit {
  background: rgba(139, 92, 246, 0.14);
  color: #A78BFA;
}

[data-theme="light"] .cl-tag-commit {
  background: #F3E8FF;
  color: #7E22CE;
}

.cl-tag-module {
  background: var(--color-primary-soft);
  color: var(--color-primary);
}

.cl-item-title {
  margin: 6px 0 2px 0;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--color-text);
}

.cl-item-summary {
  margin: 0 0 10px 0;
  font-size: 12px;
  color: var(--color-text-muted);
}

.cl-cats {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cl-cat-box {
  border-radius: 8px;
  padding: 10px 14px;
  border: 1px solid var(--color-border);
  border-left-width: 3px;
}

.cl-cat-features {
  background: var(--color-success-soft);
  border-color: rgba(16, 185, 129, 0.28);
  border-left-color: var(--color-success);
}

.cl-cat-fixes {
  background: var(--color-danger-soft);
  border-color: rgba(239, 68, 68, 0.28);
  border-left-color: var(--color-danger);
}

.cl-cat-improvements {
  background: var(--color-info-soft, var(--color-primary-soft));
  border-color: rgba(59, 130, 246, 0.28);
  border-left-color: var(--color-info, var(--color-primary));
}

.cl-cat-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
}

.cl-cat-features .cl-cat-title { color: var(--color-success); }
.cl-cat-fixes .cl-cat-title { color: var(--color-danger); }
.cl-cat-improvements .cl-cat-title { color: var(--color-info, var(--color-primary)); }

.cl-cat-list {
  margin: 6px 0 0 0;
  padding-left: 18px;
  list-style: disc;
}

.cl-cat-list li {
  font-size: 12.5px;
  color: var(--color-text);
  margin-bottom: 3px;
  line-height: 1.45;
}

.cl-cat-list li:last-child {
  margin-bottom: 0;
}

.cl-empty {
  padding: 24px 12px;
  text-align: center;
  font-size: 12.5px;
  color: var(--color-text-muted);
}

.cl-footer {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--color-border-light, var(--color-border));
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.cl-count-info {
  font-size: 12px;
  color: var(--color-text-muted);
}

.cl-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
}

.cl-chevron {
  display: inline-flex;
  transition: transform 150ms ease;
}

.cl-toggle-btn.is-expanded .cl-chevron {
  transform: rotate(180deg);
}

@media (max-width: 720px) {
  .cl-header, .cl-toolbar, .cl-body {
    padding-left: 14px;
    padding-right: 14px;
  }
  .cl-search-wrap {
    max-width: 100%;
  }
}
