/* ==========================================================================
   VagonTicket — Enterprise B2B iGaming Operations Hub Design System
   Mobile-First PWA • Telegram-Speed Dual-Room Chat • Jira Kanban • Studio
   ========================================================================== */

:root,
[data-theme="dark"] {
  --brand-primary: #3b82f6;
  --brand-accent: #06b6d4;

  --bg-canvas: #090d16;
  --bg-surface: #0f1623;
  --bg-elevated: #151f32;
  --bg-hover: #1c2942;
  --bg-active: #223252;
  --bg-input: #0b111d;
  --bg-glass: rgba(15, 22, 35, 0.86);

  --border-subtle: rgba(148, 163, 184, 0.12);
  --border-strong: rgba(148, 163, 184, 0.22);
  --border-focus: var(--brand-primary);

  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-inverse: #ffffff;

  /* External Client Room (Crisp Corporate Blue/Slate) */
  --ext-bg: #0b111d;
  --ext-bubble-in: #162136;
  --ext-bubble-out: #1d4ed8;
  --ext-bubble-out-text: #ffffff;
  --ext-accent: #3b82f6;

  /* Internal Secret Room (Unmistakable Classified Amber/Gold Theme) */
  --int-bg: #161109;
  --int-header-bg: rgba(245, 158, 11, 0.14);
  --int-border: rgba(245, 158, 11, 0.38);
  --int-bubble-in: #261c0d;
  --int-bubble-out: #422c09;
  --int-accent: #f59e0b;
  --int-text: #fef3c7;

  /* Semantic Status & Priority Colors */
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-danger: #ef4444;
  --color-info: #3b82f6;
  --color-purple: #8b5cf6;
  --color-vip: #fbbf24;

  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.28);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.42);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.62);

  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);

  --nav-rail-w: 68px;
  --mobile-nav-h: 62px;
  --banners-h: 0px;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}

/* Preset 2: Midnight Indigo */
[data-theme="midnight"] {
  --bg-canvas: #090817;
  --bg-surface: #111026;
  --bg-elevated: #181736;
  --bg-hover: #22204a;
  --bg-active: #2b285c;
  --bg-input: #0c0b1e;
  --bg-glass: rgba(17, 16, 38, 0.88);
  --border-subtle: rgba(165, 180, 252, 0.13);
  --border-strong: rgba(165, 180, 252, 0.24);
  --ext-bg: #0b0a1c;
  --ext-bubble-in: #1a183b;
  --ext-bubble-out: #4f46e5;
}

/* Preset 3: Cyber Emerald Dark */
[data-theme="emerald"] {
  --bg-canvas: #06110f;
  --bg-surface: #0b1c19;
  --bg-elevated: #112824;
  --bg-hover: #173630;
  --bg-active: #1e453e;
  --bg-input: #081513;
  --bg-glass: rgba(11, 28, 25, 0.88);
  --border-subtle: rgba(110, 231, 183, 0.13);
  --border-strong: rgba(110, 231, 183, 0.24);
  --ext-bg: #071412;
  --ext-bubble-in: #122b26;
  --ext-bubble-out: #059669;
}

/* Preset 4: Clean Corporate Light */
[data-theme="light"] {
  --bg-canvas: #f1f5f9;
  --bg-surface: #ffffff;
  --bg-elevated: #f8fafc;
  --bg-hover: #eef2f6;
  --bg-active: #e2e8f0;
  --bg-input: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.90);

  --border-subtle: rgba(15, 23, 42, 0.10);
  --border-strong: rgba(15, 23, 42, 0.18);

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-inverse: #ffffff;

  --ext-bg: #f1f5f9;
  --ext-bubble-in: #ffffff;
  --ext-bubble-out: #2563eb;
  --ext-bubble-out-text: #ffffff;

  --int-bg: #fffbeb;
  --int-header-bg: rgba(245, 158, 11, 0.16);
  --int-border: rgba(217, 119, 6, 0.35);
  --int-bubble-in: #fef3c7;
  --int-bubble-out: #fde68a;
  --int-accent: #d97706;
  --int-text: #78350f;

  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.10);
  --shadow-lg: 0 20px 45px rgba(15, 23, 42, 0.16);
}

/* ==========================================================================
   Reset & Base Mobile-First Rules
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  overflow-x: hidden;
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  text-size-adjust: 100%;
}

body.vt-app-body {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--brand-primary);
  text-decoration: none;
}

button, input, select, textarea {
  font-family: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

/* Custom Sleek Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

.hidden, [hidden] {
  display: none !important;
}

/* ==========================================================================
   Anti-Leak Dynamic Watermark Overlay
   ========================================================================== */
#vtWatermarkOverlay {
  position: fixed;
  inset: 0;
  z-index: 9990;
  pointer-events: none;
  user-select: none;
  background-repeat: repeat;
  opacity: 1;
}

/* ==========================================================================
   Top System Alert Banners (View-As, Panic Lockdown, Global Outage Shield)
   ========================================================================== */
.vt-banner-stack {
  flex-shrink: 0;
  width: 100%;
  z-index: 80;
  padding-top: var(--safe-top);
}

.vt-sys-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  padding: 7px 14px;
  font-size: 12.5px;
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  flex-wrap: wrap;
  max-width: 100%;
  box-sizing: border-box;
}

.vt-banner-main {
  flex: 1 1 220px;
  min-width: 0;
  line-height: 1.42;
  word-break: break-word;
}

.vt-sys-banner.is-collapsed {
  flex-wrap: nowrap;
  padding: 4px 12px;
  min-height: 30px;
  gap: 8px;
}

.vt-sys-banner.is-collapsed .vt-banner-main {
  flex: 1 1 auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12px;
  cursor: pointer;
}

.vt-viewas-banner {
  background: linear-gradient(90deg, #6d28d9, #4f46e5);
  color: #ffffff;
}

.vt-lockdown-banner {
  background: linear-gradient(90deg, #b91c1c, #dc2626);
  color: #ffffff;
  animation: vtPulseBg 2.4s infinite ease-in-out;
}

.vt-outage-banner {
  background: linear-gradient(90deg, #92400e, #b45309);
  color: #fffbeb;
}
.vt-outage-banner.severity-critical {
  background: linear-gradient(90deg, #991b1b, #c2410c);
  color: #ffffff;
}

.vt-ann-banner {
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.94), rgba(8, 145, 178, 0.94));
  color: #ffffff;
}

.vt-banner-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.vt-sys-banner.is-collapsed .vt-banner-actions {
  flex-wrap: nowrap;
  gap: 4px;
}

.vt-banner-ctrl-btn {
  background: rgba(0, 0, 0, 0.28) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.28) !important;
  min-height: 25px !important;
  padding: 2px 8px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
}
.vt-banner-ctrl-btn:hover {
  background: rgba(0, 0, 0, 0.44) !important;
  border-color: rgba(255, 255, 255, 0.55) !important;
}

@keyframes vtPulseBg {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.15); }
}

/* ==========================================================================
   Buttons, Inputs, Badges & Common UI Primitives
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 6px 13px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
  white-space: nowrap;
  user-select: none;
}

.btn:hover:not(:disabled) {
  background: var(--bg-hover);
  border-color: var(--border-strong);
}

.btn:active:not(:disabled) {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--brand-primary);
  border-color: transparent;
  color: #ffffff;
}
.btn-primary:hover:not(:disabled) {
  filter: brightness(1.1);
  background: var(--brand-primary);
}

.btn-amber {
  background: var(--color-warning);
  border-color: transparent;
  color: #111827;
}
.btn-amber:hover:not(:disabled) {
  filter: brightness(1.08);
  background: var(--color-warning);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.35);
  color: #f87171;
}
.btn-danger:hover:not(:disabled) {
  background: #ef4444;
  color: #ffffff;
}

.btn-success {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.35);
  color: #34d399;
}
.btn-success:hover:not(:disabled) {
  background: #10b981;
  color: #ffffff;
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-secondary);
}
.btn-ghost:hover:not(:disabled) {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.btn-xs {
  min-height: 28px;
  padding: 3px 9px;
  font-size: 11.5px;
  border-radius: var(--radius-xs);
}

.btn-icon {
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

/* Touch Target Guarantee on Mobile (<1024px) */
@media (max-width: 1023px) {
  .btn:not(.btn-xs) {
    min-height: 44px;
  }
  .btn-icon {
    width: 44px;
    height: 44px;
  }
  input, select, textarea {
    font-size: 16px !important; /* Prevents iOS / Telegram WebView auto-zoom */
  }
}

.input, .select, .textarea {
  width: 100%;
  min-height: 38px;
  padding: 8px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input:focus, .select:focus, .textarea:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

.textarea {
  resize: vertical;
  min-height: 80px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 12px;
}

.form-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Badges & Priority Chips */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 700;
  border-radius: var(--radius-full);
  line-height: 1.35;
  white-space: nowrap;
}

.badge-vip {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.24), rgba(217, 119, 6, 0.24));
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.45);
}
[data-theme="light"] .badge-vip {
  color: #b45309;
}

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

.badge-gold {
  background: rgba(245, 158, 11, 0.16);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-standard {
  background: rgba(148, 163, 184, 0.14);
  color: var(--text-secondary);
}

.prio-low {
  background: rgba(148, 163, 184, 0.15);
  color: var(--text-secondary);
}
.prio-normal {
  background: rgba(59, 130, 246, 0.16);
  color: #60a5fa;
}
.prio-high {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
}
.prio-critical {
  background: rgba(239, 68, 68, 0.22);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.45);
  animation: vtCriticalPulse 1.8s infinite;
}

@keyframes vtCriticalPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.42); }
  50% { box-shadow: 0 0 0 5px rgba(239, 68, 68, 0); }
}

/* Status Pills */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: var(--radius-xs);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.status-open { background: rgba(59, 130, 246, 0.18); color: #60a5fa; }
.status-am_review { background: rgba(139, 92, 246, 0.18); color: #a78bfa; }
.status-in_department { background: rgba(245, 158, 11, 0.20); color: #fbbf24; }
.status-waiting_provider { background: rgba(236, 72, 153, 0.18); color: #f472b6; }
.status-waiting_site { background: rgba(6, 182, 212, 0.18); color: #22d3ee; }
.status-resolved { background: rgba(16, 185, 129, 0.18); color: #34d399; }
.status-closed { background: rgba(100, 116, 139, 0.20); color: var(--text-secondary); }

[data-theme="light"] .prio-normal, [data-theme="light"] .status-open { color: #1d4ed8; }
[data-theme="light"] .prio-high, [data-theme="light"] .status-in_department { color: #b45309; }
[data-theme="light"] .prio-critical { color: #b91c1c; }
[data-theme="light"] .status-resolved { color: #047857; }
[data-theme="light"] .status-am_review { color: #6d28d9; }
[data-theme="light"] .status-waiting_provider { color: #be185d; }
[data-theme="light"] .status-waiting_site { color: #0e7490; }

/* ==========================================================================
   Main App Shell (Left Rail + Main View Container + Mobile Bottom Nav)
   ========================================================================== */
.vt-shell {
  flex: 1;
  min-height: 0;
  display: flex;
  width: 100%;
  position: relative;
  overflow: hidden;
}

/* Desktop Left Navigation Rail */
.vt-nav-rail {
  width: var(--nav-rail-w);
  flex-shrink: 0;
  background: var(--bg-surface);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 8px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  z-index: 40;
}
.vt-nav-rail::-webkit-scrollbar {
  display: none;
}

.vt-brand-mark {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-accent));
  color: #ffffff;
  font-weight: 800;
  font-size: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 8px;
  cursor: pointer;
}
.vt-brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vt-rail-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
  flex-shrink: 0;
}

.vt-rail-btn {
  position: relative;
  width: 44px;
  height: 42px;
  flex-shrink: 0;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all 0.15s ease;
}
@media (max-height: 820px) {
  .vt-nav-rail {
    padding: 8px 6px;
    gap: 8px;
  }
  .vt-brand-mark {
    width: 38px;
    height: 38px;
    margin-bottom: 4px;
    font-size: 15px;
  }
  .vt-rail-group {
    gap: 4px;
  }
  .vt-rail-btn {
    width: 40px;
    height: 36px;
    font-size: 16.5px;
  }
}
.vt-rail-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}
.vt-rail-btn.active {
  background: rgba(59, 130, 246, 0.14);
  border-color: rgba(59, 130, 246, 0.35);
  color: var(--brand-primary);
}

.vt-rail-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: var(--radius-full);
  background: var(--color-danger);
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vt-avatar-btn {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-full);
  background: var(--bg-elevated);
  border: 2px solid var(--border-strong);
  color: var(--text-primary);
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.vt-shift-dot {
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 12px;
  height: 12px;
  border-radius: var(--radius-full);
  border: 2px solid var(--bg-surface);
  background: var(--color-success);
}
.vt-shift-dot.busy { background: var(--color-warning); }
.vt-shift-dot.off_shift { background: var(--text-muted); }

/* Main Viewport Container */
.vt-main-stage {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.vt-view-panel {
  flex: 1;
  min-height: 0;
  width: 100%;
  display: flex;
  overflow: hidden;
}

/* ==========================================================================
   3-Column Workspace (Ticket List | Dual-Room Chat | Jira Inspector)
   ========================================================================== */
.vt-workspace {
  display: flex;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* Column 1: Ticket / Chat List */
.vt-col-list {
  width: 360px;
  flex-shrink: 0;
  background: var(--bg-surface);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.vt-list-header {
  padding: 12px 14px 10px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.vt-list-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.vt-app-title {
  font-size: 15.5px;
  font-weight: 800;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 7px;
}

.vt-search-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.vt-search-box {
  position: relative;
  flex: 1;
}
.vt-search-box input {
  padding-left: 32px;
  height: 36px;
}
.vt-search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  font-size: 13px;
}

/* Triage Next Urgent Button */
.vt-triage-bar {
  display: flex;
  gap: 6px;
}
.btn-triage {
  flex: 1;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.16), rgba(239, 68, 68, 0.16));
  border: 1px solid rgba(245, 158, 11, 0.38);
  color: var(--text-primary);
  font-size: 12px;
  min-height: 34px;
}
.btn-triage:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.28), rgba(239, 68, 68, 0.28));
}

/* Filter Pills Strip */
.vt-filter-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}
.vt-filter-pills::-webkit-scrollbar {
  display: none;
}

.vt-pill {
  padding: 5px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.vt-pill:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
}
.vt-pill.active {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: #ffffff;
}

/* Bulk Action Bar */
.vt-bulk-bar {
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--brand-primary);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 12px;
}

/* Ticket Cards Stream */
.vt-ticket-list {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.vt-ticket-card {
  position: relative;
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: background 0.12s ease;
}
.vt-ticket-card:hover {
  background: var(--bg-hover);
}
.vt-ticket-card.active {
  background: var(--bg-active);
  border-left: 3px solid var(--brand-primary);
  padding-left: 11px;
}
.vt-ticket-card.prio-border-critical {
  border-left: 3px solid var(--color-danger);
  padding-left: 11px;
}

.vt-card-check {
  margin-top: 3px;
  accent-color: var(--brand-primary);
  width: 16px;
  height: 16px;
  cursor: pointer;
  flex-shrink: 0;
}

.vt-card-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

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

.vt-card-code {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-secondary);
}

.vt-card-time {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}

.vt-card-subject {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vt-card-preview {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vt-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 2px;
}

.vt-card-tags {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.vt-unread-badges {
  display: flex;
  align-items: center;
  gap: 4px;
}

.vt-unread-ext {
  min-width: 19px;
  height: 19px;
  padding: 0 6px;
  border-radius: var(--radius-full);
  background: var(--brand-primary);
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.vt-unread-int {
  min-width: 19px;
  height: 19px;
  padding: 0 6px;
  border-radius: var(--radius-full);
  background: var(--int-accent);
  color: #111827;
  font-size: 11px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   Column 2: Dual-Room Live Chat Area
   ========================================================================== */
.vt-col-chat {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--ext-bg);
  position: relative;
}

.vt-col-chat.room-internal {
  background: var(--int-bg);
}

.vt-empty-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px;
  text-align: center;
  color: var(--text-muted);
  gap: 12px;
}
.vt-empty-icon {
  width: 68px;
  height: 68px;
  border-radius: var(--radius-xl);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
}

/* Sticky Chat Header + Pinned Issue Summary */
.vt-chat-header {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 20;
}

.vt-chat-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.vt-chat-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.vt-mobile-back {
  display: none;
}

.vt-chat-subject-block {
  min-width: 0;
  flex: 1;
}
.vt-chat-subject {
  font-size: 14.5px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vt-chat-subtitle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--text-secondary);
  flex-wrap: wrap;
}

/* Alert Strips inside Pinned Header (Duplicate Fraud / Owner PIN Gate) */
.vt-alert-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
}
.vt-alert-fraud {
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.38);
  color: #fca5a5;
}
[data-theme="light"] .vt-alert-fraud { color: #b91c1c; }

.vt-alert-pin {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fde68a;
}
[data-theme="light"] .vt-alert-pin { color: #92400e; }

/* Live Collision Presence Bar */
.vt-presence-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--brand-accent);
  padding: 2px 0;
}

/* Dual-Room Tabs */
.vt-room-tabs {
  display: flex;
  gap: 6px;
  background: var(--bg-canvas);
  padding: 4px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.vt-room-tab {
  flex: 1;
  min-height: 34px;
  border: none;
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.vt-room-tab.active-ext {
  background: var(--brand-primary);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

.vt-room-tab.active-int {
  background: var(--int-accent);
  color: #111827;
  box-shadow: var(--shadow-sm);
}

/* Internal Room Classified Warning Ribbon */
.vt-internal-ribbon {
  background: var(--int-header-bg);
  border-bottom: 1px solid var(--int-border);
  color: var(--int-text);
  padding: 6px 14px;
  font-size: 11.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* Messages Stream */
.vt-chat-stream {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.vt-msg-system {
  align-self: center;
  max-width: 88%;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 11.5px;
  text-align: center;
}

.vt-msg-row {
  display: flex;
  flex-direction: column;
  max-width: 78%;
  min-width: 180px;
}
@media (max-width: 640px) {
  .vt-msg-row {
    max-width: 89%;
  }
}

.vt-msg-row.incoming {
  align-self: flex-start;
}
.vt-msg-row.outgoing {
  align-self: flex-end;
}

.vt-msg-bubble {
  padding: 9px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
  position: relative;
  word-break: break-word;
}

/* External Room Bubble Colors */
.vt-msg-row.room-external.incoming .vt-msg-bubble {
  background: var(--ext-bubble-in);
  border-top-left-radius: 4px;
}
.vt-msg-row.room-external.outgoing .vt-msg-bubble {
  background: var(--ext-bubble-out);
  color: var(--ext-bubble-out-text);
  border-color: transparent;
  border-top-right-radius: 4px;
}

/* Internal Secret Room Bubble Colors */
.vt-msg-row.room-internal .vt-msg-bubble {
  background: var(--int-bubble-in);
  border-color: var(--int-border);
  color: var(--int-text);
}
.vt-msg-row.room-internal.outgoing .vt-msg-bubble {
  background: var(--int-bubble-out);
}

.vt-msg-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
  font-size: 11.5px;
  user-select: none;
  -webkit-user-select: none;
}

.vt-msg-sender {
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.vt-msg-row.room-external.outgoing .vt-msg-sender {
  color: rgba(255, 255, 255, 0.92);
}

.vt-msg-quote {
  padding: 8px 10px;
  margin-bottom: 8px;
  border-left: 3px solid var(--brand-accent);
  background: rgba(15, 23, 42, 0.24);
  border-radius: 6px;
  font-size: 12.5px;
  line-height: 1.48;
  cursor: pointer;
  white-space: normal;
  word-break: break-word;
  overflow: visible;
  transition: background 0.15s ease;
}
.vt-msg-quote:hover {
  background: rgba(15, 23, 42, 0.34);
}
[data-theme="light"] .vt-msg-row.incoming .vt-msg-quote {
  background: rgba(15, 23, 42, 0.06);
  border-left-color: var(--brand-primary);
}
[data-theme="light"] .vt-msg-row.incoming .vt-msg-quote:hover {
  background: rgba(15, 23, 42, 0.1);
}
.vt-msg-row.room-external.outgoing .vt-msg-quote {
  background: rgba(0, 0, 0, 0.22);
  border-left-color: rgba(255, 255, 255, 0.85);
  color: #ffffff;
}
.vt-msg-quote-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 800;
  margin-bottom: 4px;
  opacity: 0.95;
  user-select: none;
  -webkit-user-select: none;
}
.vt-msg-quote-body {
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  font-size: 12.5px;
  line-height: 1.48;
  opacity: 0.96;
}

.vt-msg-text {
  font-size: 13.5px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  user-select: text;
  -webkit-user-select: text;
}

.vt-inline-quote {
  margin: 4px 0 6px;
  padding: 6px 10px;
  border-left: 3px solid var(--brand-accent);
  background: rgba(15, 23, 42, 0.2);
  border-radius: 5px;
  font-size: 12.5px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}
[data-theme="light"] .vt-msg-row.incoming .vt-inline-quote {
  background: rgba(15, 23, 42, 0.06);
  border-left-color: var(--brand-primary);
}
.vt-msg-row.room-external.outgoing .vt-inline-quote {
  background: rgba(0, 0, 0, 0.22);
  border-left-color: rgba(255, 255, 255, 0.85);
}

@keyframes vtJumpPulse {
  0% { box-shadow: 0 0 0 0 rgba(6, 182, 212, 0.75); }
  50% { box-shadow: 0 0 0 5px rgba(6, 182, 212, 0.35); }
  100% { box-shadow: var(--shadow-sm); }
}
.vt-msg-bubble.vt-jump-flash {
  animation: vtJumpPulse 1.2s ease;
}

/* Attachments inside Message */
.vt-msg-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.vt-att-thumb {
  max-width: 220px;
  max-height: 180px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  cursor: zoom-in;
  object-fit: cover;
  display: block;
}

.vt-att-file {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--border-subtle);
  color: inherit;
  font-size: 12px;
  font-weight: 600;
}

.vt-msg-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 6px;
  font-size: 11px;
  opacity: 0.88;
  user-select: none;
  -webkit-user-select: none;
}

.vt-msg-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.vt-msg-act-btn {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: inherit;
  border-radius: 5px;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}
.vt-msg-act-btn:hover {
  background: rgba(0, 0, 0, 0.36);
}
.vt-msg-act-btn.has-sel {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: #ffffff;
  opacity: 1;
}
.vt-msg-act-bridge {
  background: rgba(245, 158, 11, 0.24);
  border-color: rgba(245, 158, 11, 0.55);
  color: var(--int-text);
}

.vt-receipt {
  font-weight: 700;
  letter-spacing: -1px;
}
.vt-receipt.read {
  color: #38bdf8;
}
.vt-msg-row.room-external.outgoing .vt-receipt.read {
  color: #bae6fd;
}

/* Self-Destructing AES-256 Secret Note Card */
.vt-secret-card {
  border: 1px dashed var(--color-purple);
  background: rgba(139, 92, 246, 0.10);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 420px;
}
.vt-secret-card.burned {
  border-color: var(--border-subtle);
  background: var(--bg-surface);
  opacity: 0.68;
}
.vt-secret-revealed-box {
  font-family: var(--font-mono);
  font-size: 12.5px;
  background: var(--bg-canvas);
  border: 1px solid var(--border-strong);
  padding: 8px 10px;
  border-radius: var(--radius-xs);
  user-select: all;
  word-break: break-all;
}

/* CSAT 5-Star Widget */
.vt-csat-card {
  margin: 8px auto;
  width: 100%;
  max-width: 460px;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 14px;
  text-align: center;
}
.vt-csat-stars {
  display: inline-flex;
  gap: 6px;
  margin: 8px 0;
}
.vt-star-btn {
  background: transparent;
  border: none;
  font-size: 26px;
  color: var(--text-muted);
  padding: 2px 4px;
  transition: transform 0.12s ease, color 0.12s ease;
}
.vt-star-btn.active, .vt-star-btn:hover {
  color: #fbbf24;
  transform: scale(1.15);
}

/* Sticky Chat Composer + Slash Menu */
.vt-composer-wrap {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding: 8px 12px calc(8px + var(--safe-bottom));
  position: relative;
  z-index: 25;
}
.vt-col-chat.room-internal .vt-composer-wrap {
  border-top: 2px solid var(--int-accent);
  background: var(--bg-surface);
}

/* Slash /sablon Floating Popup */
.vt-slash-popup {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 100%;
  margin-bottom: 6px;
  max-height: 230px;
  overflow-y: auto;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 45;
}
.vt-slash-item {
  padding: 9px 12px;
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.vt-slash-item:hover, .vt-slash-item.active {
  background: var(--bg-hover);
}
.vt-slash-cmd {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--brand-primary);
}

.vt-composer-context {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 5px;
  padding: 8px 12px;
  margin-bottom: 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--brand-primary);
  border-radius: var(--radius-sm);
  font-size: 12.5px;
}
.vt-composer-context.is-bridge {
  border-left-color: var(--int-accent);
  background: var(--int-header-bg);
}
.vt-composer-ctx-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.vt-composer-quote-body {
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  line-height: 1.46;
  color: var(--text-primary);
  max-height: 170px;
  overflow-y: auto;
  padding: 4px 6px;
  border-radius: 4px;
  background: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  font-size: 12.5px;
}

/* Floating Text-Selection Quote Toolbar */
.vt-sel-quote-pop {
  position: fixed;
  z-index: 9500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-lg);
  animation: vtPopFade 0.12s ease-out;
}
@keyframes vtPopFade {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
.vt-sel-quote-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border: none;
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}
.vt-sel-quote-btn:hover {
  background: var(--bg-hover);
}
.vt-sel-quote-btn.primary {
  background: var(--brand-primary);
  color: #ffffff;
}
.vt-sel-quote-btn.primary:hover {
  filter: brightness(1.08);
}

.vt-pending-files {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  max-width: 100%;
  padding-bottom: 6px;
  scrollbar-width: thin;
}
.vt-pending-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  max-width: min(260px, 72vw);
  flex-shrink: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 11.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vt-composer-row {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.vt-composer-input {
  flex: 1 1 0%;
  min-width: 0;
  min-height: 40px;
  max-height: 140px;
  padding: 9px 12px;
  border-radius: var(--radius-md);
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  resize: none;
  font-size: 13.5px;
  line-height: 1.4;
  outline: none;
  box-sizing: border-box;
}
.vt-composer-input:focus {
  border-color: var(--brand-primary);
}
.vt-col-chat.room-internal .vt-composer-input:focus {
  border-color: var(--int-accent);
}

/* ==========================================================================
   Column 3: Jira Issue Inspector & Parallel Sub-Tasks Drawer
   ========================================================================== */
.vt-col-inspector {
  width: 375px;
  flex-shrink: 0;
  background: var(--bg-surface);
  border-left: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.vt-inspector-header {
  position: sticky;
  top: 0;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10;
}

.vt-inspector-section {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.vt-sec-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* SLA Live Progress Bars */
.vt-sla-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.vt-sla-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  font-weight: 600;
}
.vt-sla-track {
  width: 100%;
  height: 7px;
  background: var(--bg-canvas);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.vt-sla-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--color-success);
  transition: width 0.3s ease;
}
.vt-sla-fill.warn { background: var(--color-warning); }
.vt-sla-fill.breach { background: var(--color-danger); }

/* Key-Value Grid & Copyable Custom Fields */
.vt-kv-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}
.vt-kv-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  font-size: 12px;
}
.vt-kv-key {
  color: var(--text-secondary);
  font-weight: 600;
}
.vt-kv-val {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Subtask Cards */
.vt-subtask-card {
  padding: 9px 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.vt-subtask-card.done {
  border-color: rgba(16, 185, 129, 0.35);
  opacity: 0.85;
}

/* ==========================================================================
   Jira Kanban Board View
   ========================================================================== */
.vt-kanban-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: var(--bg-canvas);
}

.vt-kanban-toolbar {
  padding: 12px 16px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.vt-kanban-board {
  flex: 1;
  display: flex;
  gap: 12px;
  padding: 14px;
  overflow-x: auto;
  overflow-y: hidden;
  min-height: 0;
}

.vt-kanban-col {
  width: 295px;
  flex-shrink: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  min-height: 0;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.vt-kanban-col.is-drag-over {
  border-color: var(--brand-primary);
  background: var(--bg-elevated);
}

.vt-kanban-col-head {
  padding: 11px 12px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 800;
  font-size: 12.5px;
}

.vt-kanban-cards {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.vt-kcard {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 11px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  cursor: grab;
  box-shadow: var(--shadow-sm);
  transition: transform 0.12s ease, border-color 0.12s ease;
}
.vt-kcard:hover {
  border-color: var(--border-strong);
  transform: translateY(-1px);
}
.vt-kcard:active {
  cursor: grabbing;
}

.vt-kcard-moves {
  display: none;
  gap: 4px;
  padding-top: 4px;
  border-top: 1px dashed var(--border-subtle);
}

/* ==========================================================================
   No-Code Enterprise Admin Studio & Shift Hub
   ========================================================================== */
.vt-studio-wrap {
  flex: 1;
  display: flex;
  min-width: 0;
  min-height: 0;
  background: var(--bg-canvas);
}

.vt-studio-nav {
  width: 250px;
  flex-shrink: 0;
  background: var(--bg-surface);
  border-right: 1px solid var(--border-subtle);
  padding: 14px 10px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.vt-studio-tab {
  width: 100%;
  text-align: left;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 9px;
}
.vt-studio-tab:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}
.vt-studio-tab.active {
  background: rgba(59, 130, 246, 0.14);
  border-color: rgba(59, 130, 246, 0.35);
  color: var(--brand-primary);
}

.vt-studio-content {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  padding: 20px 24px 80px;
}

.vt-card-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin-bottom: 16px;
}

.vt-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.vt-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.vt-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.vt-stat-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.vt-stat-val {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.vt-stat-lbl {
  font-size: 12px;
  color: var(--text-secondary);
}

/* Responsive Data Tables -> Clean Mobile Action Cards on Small Screens */
.vt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.vt-table th {
  text-align: left;
  padding: 10px 12px;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-strong);
}
.vt-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}
.vt-table tr:hover td {
  background: var(--bg-hover);
}

@media (max-width: 767px) {
  .vt-grid-2, .vt-grid-3, .vt-grid-4 {
    grid-template-columns: 1fr;
  }
  .vt-table-responsive thead {
    display: none;
  }
  .vt-table-responsive,
  .vt-table-responsive tbody,
  .vt-table-responsive tr,
  .vt-table-responsive td {
    display: block;
    width: 100%;
  }
  .vt-table-responsive tr {
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 10px 12px;
    margin-bottom: 10px;
  }
  .vt-table-responsive td {
    border-bottom: 1px solid var(--border-subtle);
    padding: 7px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    text-align: right;
  }
  .vt-table-responsive td:last-child {
    border-bottom: none;
    padding-bottom: 2px;
  }
  .vt-table-responsive td::before {
    content: attr(data-label);
    font-weight: 700;
    font-size: 11.5px;
    color: var(--text-secondary);
    text-align: left;
  }
}

/* Toggle Switch */
.vt-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}
.vt-switch input {
  width: 38px;
  height: 21px;
  appearance: none;
  background: var(--bg-active);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-full);
  position: relative;
  cursor: pointer;
  transition: background 0.18s ease;
  flex-shrink: 0;
}
.vt-switch input::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #ffffff;
  transition: transform 0.18s ease;
}
.vt-switch input:checked {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
}
.vt-switch input:checked::after {
  transform: translateX(17px);
}

/* ==========================================================================
   Desktop Medium Breakpoint (1024px - 1320px): Inspector Slide-Over
   ========================================================================== */
.vt-inspector-backdrop {
  display: none;
}

@media (min-width: 1024px) and (max-width: 1320px) {
  .vt-col-list {
    width: 320px;
  }
  .vt-col-inspector {
    position: fixed;
    top: var(--banners-h);
    right: 0;
    bottom: 0;
    z-index: 65;
    transform: translateX(100%);
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-lg);
  }
  body.vt-inspector-open .vt-col-inspector {
    transform: translateX(0);
  }
  body.vt-inspector-open .vt-inspector-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 60;
  }
}

/* ==========================================================================
   100% Mobile-First Transformation (< 1024px)
   WhatsApp / Telegram Native 1-Screen-at-a-Time + Sticky Safe-Area Bars
   ========================================================================== */
.vt-mobile-nav {
  display: none;
}
.vt-mobile-fab {
  display: none;
}

@media (max-width: 1023px) {
  .vt-nav-rail {
    display: none;
  }

  .vt-mobile-back {
    display: inline-flex;
  }

  /* Sticky Bottom Navigation Bar */
  .vt-mobile-nav {
    display: flex;
    align-items: stretch;
    justify-content: space-around;
    background: var(--bg-surface);
    border-top: 1px solid var(--border-subtle);
    padding-bottom: var(--safe-bottom);
    height: calc(var(--mobile-nav-h) + var(--safe-bottom));
    flex-shrink: 0;
    z-index: 50;
  }

  /* Hide bottom nav when inside full-screen mobile chat so keyboard & composer feel 100% native */
  body[data-mobile-screen="chat"] .vt-mobile-nav {
    display: none;
  }

  .vt-mnav-btn {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    font-size: 11px;
    font-weight: 700;
    position: relative;
    min-height: 48px;
  }
  .vt-mnav-btn .mnav-ico {
    font-size: 19px;
    line-height: 1;
  }
  .vt-mnav-btn.active {
    color: var(--brand-primary);
  }

  /* Screen 1 vs Screen 2 Mobile Workspace Switching */
  .vt-col-list {
    width: 100%;
    border-right: none;
  }

  body[data-mobile-screen="list"] .vt-col-chat {
    display: none;
  }
  body[data-mobile-screen="chat"] .vt-col-list {
    display: none;
  }
  body[data-mobile-screen="chat"] .vt-col-chat {
    display: flex;
    width: 100%;
  }

  /* Floating [+ Yeni Talep] FAB on Mobile List Screen */
  body[data-mobile-screen="list"] .vt-mobile-fab {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    position: fixed;
    right: 16px;
    bottom: calc(var(--mobile-nav-h) + var(--safe-bottom) + 16px);
    height: 48px;
    padding: 0 18px;
    border-radius: var(--radius-full);
    background: var(--brand-primary);
    color: #ffffff;
    border: none;
    font-weight: 800;
    font-size: 13.5px;
    box-shadow: var(--shadow-md);
    z-index: 45;
  }

  /* Mobile Jira Inspector -> Smooth Native Bottom Sheet! */
  .vt-col-inspector {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-height: 86dvh;
    border-left: none;
    border-top: 1px solid var(--border-strong);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    padding-bottom: var(--safe-bottom);
    z-index: 75;
    transform: translateY(105%);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-lg);
  }
  body.vt-inspector-open .vt-col-inspector {
    transform: translateY(0);
  }
  body.vt-inspector-open .vt-inspector-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.58);
    backdrop-filter: blur(2px);
    z-index: 70;
  }

  /* Mobile Kanban Snap Scroll + Touch Move Buttons */
  .vt-kanban-board {
    scroll-snap-type: x mandatory;
    padding: 10px;
  }
  .vt-kanban-col {
    width: 85vw;
    max-width: 340px;
    scroll-snap-align: center;
  }
  .vt-kcard-moves {
    display: flex;
    flex-wrap: wrap;
  }

  /* Mobile Admin Studio Top Pill Tabs */
  .vt-studio-wrap {
    flex-direction: column;
  }
  .vt-studio-nav {
    width: 100%;
    flex-direction: row;
    overflow-x: auto;
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
    padding: 8px 10px;
    flex-shrink: 0;
  }
  .vt-studio-tab {
    width: auto;
    white-space: nowrap;
    padding: 8px 12px;
  }
  .vt-studio-content {
    padding: 14px 12px 90px;
  }
}

/* ==========================================================================
   Modals, Bottom-Sheet Adaptive Dialogs, Command Palette (Ctrl+K), Lightbox
   ========================================================================== */
.vt-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 7, 18, 0.68);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.vt-modal {
  width: 100%;
  max-width: 600px;
  max-height: 90dvh;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.vt-modal.modal-lg {
  max-width: 780px;
}

.vt-modal-head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 15px;
  font-weight: 800;
}

.vt-modal-body {
  padding: 16px 18px;
  overflow-y: auto;
  flex: 1;
}

.vt-modal-foot {
  padding: 12px 18px calc(12px + var(--safe-bottom));
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

@media (max-width: 640px) {
  .vt-modal-overlay {
    align-items: flex-end;
    padding: 0;
  }
  .vt-modal {
    max-width: 100%;
    max-height: 92dvh;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  }
}

/* Command Palette (Ctrl+K) */
.vt-cmd-box {
  width: 100%;
  max-width: 560px;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  align-self: flex-start;
  margin-top: 8vh;
}
.vt-cmd-input {
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
  padding: 14px 16px;
  font-size: 15px;
  outline: none;
}
.vt-cmd-results {
  max-height: 340px;
  overflow-y: auto;
}
.vt-cmd-item {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}
.vt-cmd-item:hover, .vt-cmd-item.active {
  background: var(--bg-hover);
}

/* Lightbox Image Viewer */
.vt-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(3, 7, 18, 0.92);
  z-index: 130;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.vt-lightbox img {
  max-width: 94vw;
  max-height: 82dvh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
}
.vt-lightbox-bar {
  margin-top: 14px;
  display: flex;
  gap: 10px;
}

/* Toast Stack */
.vt-toast-stack {
  position: fixed;
  top: calc(14px + var(--safe-top));
  right: 14px;
  z-index: 150;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: min(380px, calc(100vw - 28px));
  pointer-events: none;
}
.vt-toast {
  pointer-events: auto;
  padding: 11px 14px;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-left: 4px solid var(--brand-primary);
  box-shadow: var(--shadow-md);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.vt-toast.toast-error { border-left-color: var(--color-danger); }
.vt-toast.toast-success { border-left-color: var(--color-success); }
.vt-toast.toast-warn { border-left-color: var(--color-warning); }

/* ==========================================================================
   Standalone Auth & First-Time DB Setup Pages (login.php & setup.php)
   ========================================================================== */
.vt-auth-page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 16px calc(24px + var(--safe-bottom));
  background:
    radial-gradient(circle at 15% 15%, rgba(59, 130, 246, 0.14), transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(6, 182, 212, 0.12), transparent 40%),
    var(--bg-canvas);
}

.vt-auth-topbar {
  width: 100%;
  max-width: 440px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 12px;
}

.vt-auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  padding: 28px 26px;
  box-shadow: var(--shadow-lg);
}
.vt-auth-card.setup-card {
  max-width: 560px;
}

.vt-auth-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  margin-bottom: 22px;
}
.vt-auth-logo {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-accent));
  color: #ffffff;
  font-size: 22px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.vt-auth-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vt-totp-input {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 22px !important;
  font-weight: 800;
  letter-spacing: 8px;
  height: 50px;
}

/* ==========================================================================
   RTL (Right-to-Left) Direction Support (html[dir="rtl"])
   ========================================================================== */
html[dir="rtl"] .vt-nav-rail,
html[dir="rtl"] .vt-col-list,
html[dir="rtl"] .vt-studio-nav {
  border-right: none;
  border-left: 1px solid var(--border-subtle);
}

html[dir="rtl"] .vt-col-inspector {
  border-left: none;
  border-right: 1px solid var(--border-subtle);
}

html[dir="rtl"] .vt-ticket-card.active {
  border-left: none;
  border-right: 3px solid var(--brand-primary);
  padding-left: 14px;
  padding-right: 11px;
}

html[dir="rtl"] .vt-ticket-card.prio-border-critical {
  border-left: none;
  border-right: 3px solid var(--color-danger);
  padding-left: 14px;
  padding-right: 11px;
}

html[dir="rtl"] .vt-search-box input {
  padding-left: 12px;
  padding-right: 32px;
}

html[dir="rtl"] .vt-search-icon {
  left: auto;
  right: 10px;
}

html[dir="rtl"] .vt-msg-quote,
html[dir="rtl"] .vt-composer-context {
  border-left: none;
  border-right: 3px solid var(--brand-accent);
}

html[dir="rtl"] .vt-studio-tab {
  text-align: right;
}

@media (min-width: 1024px) and (max-width: 1320px) {
  html[dir="rtl"] .vt-col-inspector {
    right: auto;
    left: 0;
    transform: translateX(-100%);
  }
  html[dir="rtl"] body.vt-inspector-open .vt-col-inspector {
    transform: translateX(0);
  }
}

/* ==========================================================================
   Right-Click Context Menu, Rich Info Tooltips (ⓘ), Multi-Lang Inputs,
   Media Range Players, Chunked Upload, Security Fortress & Animated Cinema Tour
   ========================================================================== */

/* Right-Click Context Menu */
.vt-ctx-menu {
  position: fixed;
  z-index: 2600;
  min-width: 228px;
  max-width: 310px;
  padding: 6px;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(14px);
  animation: vtCtxFadeIn 0.11s ease-out;
  user-select: none;
}
@keyframes vtCtxFadeIn {
  from { opacity: 0; transform: scale(0.96) translateY(-3px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.vt-ctx-header {
  padding: 5px 10px 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vt-ctx-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 10px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-primary);
  font-size: 12.5px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}
.vt-ctx-item:hover:not(:disabled) {
  background: var(--bg-hover);
  color: var(--brand-primary);
}
.vt-ctx-item.is-danger {
  color: var(--color-danger);
}
.vt-ctx-item.is-danger:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.12);
  color: var(--color-danger);
}
.vt-ctx-item:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.vt-ctx-item-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.vt-ctx-hint {
  font-size: 10.5px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  flex-shrink: 0;
}
.vt-ctx-sep {
  height: 1px;
  background: var(--border-subtle);
  margin: 4px 6px;
}

/* Universal Explanatory Info Badge (ⓘ) & Rich Popover */
.vt-info-tip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  margin-left: 5px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  color: var(--brand-accent);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  cursor: help;
  vertical-align: middle;
  transition: all 0.15s ease;
  flex-shrink: 0;
}
.vt-info-tip:hover,
.vt-info-tip:focus {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: #ffffff;
  transform: scale(1.08);
  outline: none;
}
.vt-rich-popover {
  position: fixed;
  z-index: 2700;
  max-width: 330px;
  padding: 10px 13px;
  border-radius: 10px;
  background: #0f172a;
  color: #f8fafc;
  border: 1px solid rgba(56, 189, 248, 0.42);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.52);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
  pointer-events: none;
}

/* System-Wide Multi-Language Input Widget */
.vt-mlang-wrap {
  border: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 12px;
}
.vt-mlang-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.vt-mlang-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 4px;
}
.vt-mlang-note {
  font-size: 11px;
  color: var(--text-muted);
}
.vt-mlang-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
}
.vt-mlang-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.vt-mlang-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
}
.vt-mlang-default-pill {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.16);
  color: var(--brand-primary);
  font-weight: 700;
}

/* Inline Video / Audio Range Players & File Upload Dropzone */
.vt-att-video {
  display: block;
  max-width: min(360px, 100%);
  max-height: 240px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: #000;
  margin-top: 4px;
}
.vt-att-audio {
  display: block;
  width: min(320px, 100%);
  height: 38px;
  margin-top: 4px;
}
.vt-att-file-meta {
  font-size: 10.5px;
  opacity: 0.75;
  margin-left: 4px;
}
.vt-dropzone {
  border: 1.5px dashed var(--border-strong);
  background: var(--bg-elevated);
  border-radius: 10px;
  padding: 12px 14px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.vt-dropzone:hover,
.vt-dropzone.is-dragover {
  border-color: var(--brand-primary);
  background: var(--bg-hover);
}
.vt-upload-progress {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: var(--bg-surface);
  overflow: hidden;
  margin-top: 6px;
}
.vt-upload-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brand-primary), var(--brand-accent));
  transition: width 0.18s ease;
}
.vt-older-btn-wrap {
  display: flex;
  justify-content: center;
  padding: 6px 0 12px;
}

/* 12-Layer Security Fortress & Educational Cards */
.vt-fortress-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(235px, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.vt-fortress-card {
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--bg-elevated);
  border: 1px solid rgba(16, 185, 129, 0.28);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.vt-hub-edu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.vt-hub-edu-card {
  padding: 13px 14px;
  border-radius: 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  font-size: 12.5px;
  line-height: 1.5;
}

/* Animated 6-Chapter System Workflow Video Cinema Player (100% Multi-Theme Adaptive) */
.vt-cinema-backdrop,
.vt-cinema-overlay {
  position: fixed;
  inset: 0;
  z-index: 2450;
  background: rgba(5, 9, 18, 0.76);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
[data-theme="light"] .vt-cinema-backdrop,
[data-theme="light"] .vt-cinema-overlay {
  background: rgba(15, 23, 42, 0.52);
}
.vt-cinema-modal {
  width: min(920px, 96vw);
  max-height: 90dvh;
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.vt-cinema-modal .vt-modal-head,
.vt-cinema-modal .vt-modal-foot {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border-color: var(--border-subtle);
}
.vt-cinema-modal .vt-modal-body {
  background: var(--bg-surface);
  color: var(--text-primary);
  overflow-y: auto;
}
.vt-cinema-visual {
  border-radius: 14px;
  border: 1px solid var(--border-strong);
  background: var(--bg-canvas);
  color: var(--text-primary);
  padding: 16px;
  margin-bottom: 16px;
  min-height: 170px;
  position: relative;
  overflow: hidden;
}
.vt-cinema-card {
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 13px 14px;
  box-shadow: var(--shadow-sm);
  animation: vtFloatIn 0.35s ease both;
}
.vt-cinema-subbox {
  margin-top: 8px;
  padding: 9px 11px;
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.48;
}
.vt-cinema-kicker {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--brand-primary);
}
.vt-cinema-kicker.is-blue { color: #60a5fa; }
.vt-cinema-kicker.is-amber { color: #fbbf24; }
.vt-cinema-kicker.is-emerald { color: #34d399; }
.vt-cinema-kicker.is-red { color: #f87171; }
[data-theme="light"] .vt-cinema-kicker.is-blue { color: #1d4ed8; }
[data-theme="light"] .vt-cinema-kicker.is-amber { color: #b45309; }
[data-theme="light"] .vt-cinema-kicker.is-emerald { color: #047857; }
[data-theme="light"] .vt-cinema-kicker.is-red { color: #dc2626; }
.vt-cinema-points {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-primary);
}
.vt-cinema-points li {
  margin-bottom: 6px;
  color: var(--text-primary);
}
@keyframes vtFloatIn {
  from { opacity: 0; transform: translateY(8px) scale(0.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ==========================================================================
   Panda-Style Live Partner Channels (Canlı Kanallar) Workspace — v15 Responsive
   ========================================================================== */
#view-channels {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.vt-ch-layout {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr) 310px;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  flex: 1 1 auto;
  background: var(--bg-canvas);
  position: relative;
  overflow: hidden;
}

.vt-ch-layout.drawer-collapsed {
  grid-template-columns: 340px minmax(0, 1fr);
}
.vt-ch-layout.drawer-collapsed .vt-ch-drawer {
  display: none;
}

/* Column 1: Site-Grouped Channels Sidebar */
.vt-ch-sidebar {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  background: var(--bg-surface);
  border-right: 1px solid var(--border-subtle);
  position: relative;
}

.vt-ch-side-head {
  padding: 14px 14px 10px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.05) 0%, transparent 100%);
}

.vt-ch-side-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.vt-ch-side-title {
  font-size: 15.5px;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.01em;
}

.vt-ch-live-pulse {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.22);
  display: inline-block;
  flex-shrink: 0;
}

.vt-ch-create-cta {
  width: 100%;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  font-size: 13px;
  font-weight: 800;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-accent) 100%);
  border: none;
  color: #fff;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.28);
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.14s ease, filter 0.14s ease;
}
.vt-ch-create-cta:hover {
  filter: brightness(1.07);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(59, 130, 246, 0.36);
}

.vt-ch-filter-pills {
  display: flex;
  align-items: center;
  gap: 5px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.vt-ch-filter-pills::-webkit-scrollbar {
  display: none;
}

.vt-ch-fpill {
  border: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 999px;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.14s ease;
}
.vt-ch-fpill:hover {
  border-color: var(--brand-primary);
  color: var(--text-primary);
}
.vt-ch-fpill.active {
  background: rgba(59, 130, 246, 0.16);
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}
[data-theme="light"] .vt-ch-fpill.active {
  background: #dbeafe;
  color: #1d4ed8;
}

.vt-ch-list-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 10px 9px 76px;
}

.vt-ch-site-group {
  margin-bottom: 14px;
  background: rgba(148, 163, 184, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 6px;
}

.vt-ch-site-hdr {
  padding: 5px 8px 6px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 5px;
}

.vt-ch-site-add-btn {
  border: 1px solid rgba(59, 130, 246, 0.35);
  background: rgba(59, 130, 246, 0.12);
  color: var(--brand-primary);
  font-size: 10.5px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.14s ease, color 0.14s ease;
}
.vt-ch-site-add-btn:hover {
  background: var(--brand-primary);
  color: #fff;
}

.vt-ch-item {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 9px 10px;
  margin-bottom: 3px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--text-primary);
  position: relative;
  transition: background 0.14s ease, border-color 0.14s ease, transform 0.12s ease;
}
.vt-ch-item:last-child {
  margin-bottom: 0;
}
.vt-ch-item:hover {
  background: var(--bg-hover);
}
.vt-ch-item.has-unread {
  background: rgba(59, 130, 246, 0.07);
  border-color: rgba(59, 130, 246, 0.22);
}
.vt-ch-item.active {
  background: var(--bg-active);
  border-color: var(--brand-primary);
  box-shadow: inset 3px 0 0 var(--brand-primary);
}

.vt-ch-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-width: 0;
}

.vt-ch-item-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 1;
}

.vt-ch-item-right {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.vt-ch-item-kebab {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0.65;
  transition: opacity 0.14s ease, background 0.14s ease;
}
.vt-ch-item:hover .vt-ch-item-kebab,
.vt-ch-item-kebab:focus {
  opacity: 1;
  background: var(--bg-elevated);
  border-color: var(--border-subtle);
  color: var(--text-primary);
}

.vt-ch-item-preview {
  font-size: 11.5px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 4px;
}

.vt-ch-unread-pill {
  background: linear-gradient(135deg, #ef4444, #f97316);
  color: #fff;
  font-size: 10.5px;
  font-weight: 800;
  padding: 1.5px 6.5px;
  border-radius: 999px;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.35);
}

.vt-ch-mobile-fab {
  display: none;
}

/* Column 2: Persistent Chat Stream */
.vt-ch-main {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  background: var(--ext-bg);
  position: relative;
}

.vt-ch-header {
  padding: 11px 16px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-shrink: 0;
  min-height: 58px;
}

.vt-ch-pinned-bar {
  padding: 8px 14px;
  background: rgba(59, 130, 246, 0.11);
  border-bottom: 1px solid rgba(59, 130, 246, 0.28);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: var(--text-primary);
  cursor: pointer;
  flex-shrink: 0;
}

.vt-ch-stream {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.vt-ch-date-divider {
  align-self: center;
  margin: 6px 0 2px;
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
}

.vt-ch-drop-overlay {
  position: absolute;
  inset: 0;
  z-index: 40;
  background: rgba(15, 23, 42, 0.86);
  border: 2px dashed var(--brand-primary);
  border-radius: 14px;
  margin: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  pointer-events: none;
}

.vt-ch-sys-msg {
  align-self: center;
  max-width: 88%;
  padding: 5px 14px;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 11.5px;
  text-align: center;
}

.vt-ch-msg {
  display: flex;
  gap: 10px;
  max-width: min(80%, 740px);
  align-self: flex-start;
  position: relative;
}

.vt-ch-msg.is-mine {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.vt-ch-avatar-wrap {
  position: relative;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  margin-top: 2px;
}

.vt-ch-avatar {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
}

.vt-ch-avatar-dot {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--bg-canvas);
  background: #64748b;
}
.vt-ch-avatar-dot.online {
  background: #10b981;
}

.vt-ch-bubble {
  background: var(--ext-bubble-in);
  border: 1px solid var(--border-subtle);
  border-radius: 4px 16px 16px 16px;
  padding: 10px 14px;
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
  min-width: 165px;
  max-width: 100%;
  position: relative;
}

.vt-ch-msg.is-mine .vt-ch-bubble {
  background: var(--ext-bubble-out, linear-gradient(135deg, rgba(37, 99, 235, 0.22), rgba(14, 165, 233, 0.14)));
  border-color: rgba(59, 130, 246, 0.42);
  border-radius: 16px 4px 16px 16px;
}
[data-theme="light"] .vt-ch-msg.is-mine .vt-ch-bubble {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #0f172a;
}

/* Whisper Mode (Internal Team Only — Hidden from Client) */
.vt-ch-msg.is-whisper .vt-ch-bubble {
  background: rgba(109, 40, 217, 0.18);
  border: 1px dashed rgba(167, 139, 250, 0.68);
}
[data-theme="light"] .vt-ch-msg.is-whisper .vt-ch-bubble {
  background: #f5f3ff;
  border-color: #8b5cf6;
  color: #1e1b4b;
}

.vt-ch-whisper-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.26);
  color: #ddd6fe;
  margin-bottom: 6px;
}
[data-theme="light"] .vt-ch-whisper-tag {
  background: #ede9fe;
  color: #6d28d9;
}

.vt-ch-meta-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 5px;
  flex-wrap: wrap;
}

.vt-ch-author {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.vt-ch-role-chip {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.vt-ch-meta-right {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--text-muted);
}

.vt-ch-more-btn {
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  width: 22px;
  height: 20px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  line-height: 1;
  transition: background 0.14s ease, color 0.14s ease;
}
.vt-ch-more-btn:hover {
  background: var(--bg-hover);
  border-color: var(--border-subtle);
  color: var(--text-primary);
}

.vt-ch-body {
  font-size: 13.5px;
  line-height: 1.56;
  white-space: pre-wrap;
  word-break: break-word;
}

.vt-ch-quote {
  margin-bottom: 7px;
  padding: 6px 10px;
  border-left: 3px solid var(--brand-accent);
  background: rgba(15, 23, 42, 0.32);
  border-radius: 6px;
  font-size: 12px;
  color: var(--text-secondary);
  white-space: pre-wrap;
  word-break: break-word;
  cursor: pointer;
}
[data-theme="light"] .vt-ch-quote {
  background: rgba(15, 23, 42, 0.05);
}

.vt-ch-msg-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  flex-wrap: wrap;
}

.vt-ch-act-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  padding: 2.5px 7px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.12s ease;
}
.vt-ch-act-btn:hover {
  background: var(--bg-hover);
  border-color: var(--border-subtle);
  color: var(--text-primary);
}

/* Interactive Cards: PIN Approval, One-Time Secret, Ticket Card */
.vt-ch-special-card {
  margin-top: 7px;
  padding: 11px 13px;
  border-radius: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
}
.vt-ch-special-card.pin-pending {
  border-left: 4px solid var(--color-warning);
}
.vt-ch-special-card.pin-approved {
  border-left: 4px solid var(--color-success);
}
.vt-ch-special-card.ticket-linked {
  border-left: 4px solid var(--brand-primary);
}
.vt-ch-special-card.secret-card {
  border-left: 4px solid var(--color-purple);
}

/* Attachments inside Channel Bubbles */
.vt-ch-att-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.vt-ch-att-img {
  display: block;
  max-width: min(360px, 100%);
  max-height: 240px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  cursor: zoom-in;
  object-fit: cover;
  background: #0b1220;
}

.vt-ch-att-video {
  max-width: min(400px, 100%);
  max-height: 260px;
  border-radius: 10px;
  background: #000;
  border: 1px solid var(--border-subtle);
}

.vt-ch-att-audio {
  width: min(320px, 100%);
  height: 38px;
}

.vt-ch-doc-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  text-decoration: none;
  color: var(--text-primary);
  transition: border-color 0.14s ease, transform 0.12s ease;
}
.vt-ch-doc-card:hover {
  border-color: var(--brand-primary);
}

/* Typing & 2-Tier Ergonomic Composer */
.vt-ch-typing-bar {
  min-height: 20px;
  padding: 2px 18px;
  font-size: 11.5px;
  color: var(--brand-accent);
  font-weight: 600;
  flex-shrink: 0;
}

.vt-ch-composer {
  padding: 9px 14px calc(10px + var(--safe-bottom));
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  position: relative;
  flex-shrink: 0;
}

.vt-ch-composer.is-whisper {
  background: rgba(88, 28, 135, 0.18);
  border-top: 2px solid #8b5cf6;
}
[data-theme="light"] .vt-ch-composer.is-whisper {
  background: #f5f3ff;
}

.vt-ch-tools-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}
.vt-ch-tools-strip::-webkit-scrollbar {
  display: none;
}

.vt-ch-tools-left {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
}

.vt-ch-tool-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  border: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.14s ease;
}
.vt-ch-tool-pill:hover {
  border-color: var(--brand-primary);
  color: var(--text-primary);
}
.vt-ch-tool-pill.whisper-active {
  background: #7c3aed;
  border-color: #a78bfa;
  color: #fff;
}

.vt-ch-input-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  width: 100%;
}

.vt-ch-input-row .vt-composer-input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 42px;
  max-height: 140px;
  border-radius: 12px;
  padding: 10px 13px;
  font-size: 14px;
}

.vt-ch-send-btn {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 12px;
  font-weight: 800;
  flex-shrink: 0;
}

/* Column 3: Right Info Drawer & Slide-Over Backdrop */
.vt-ch-drawer-backdrop {
  display: none;
}

.vt-ch-drawer {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  background: var(--bg-surface);
  border-left: 1px solid var(--border-subtle);
}

.vt-ch-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px 6px;
  border-bottom: 1px solid var(--border-subtle);
}

.vt-ch-drawer-close {
  display: none;
}

.vt-ch-drawer-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--border-subtle);
  padding: 6px;
  gap: 4px;
}

.vt-ch-dtab {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 11.5px;
  font-weight: 700;
  padding: 7px 4px;
  border-radius: 8px;
  cursor: pointer;
}
.vt-ch-dtab.active {
  background: var(--bg-elevated);
  color: var(--brand-primary);
}

.vt-ch-drawer-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 12px;
}

.vt-ch-member-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
  margin-bottom: 7px;
  transition: border-color 0.14s ease;
}
.vt-ch-member-row:hover {
  border-color: rgba(59, 130, 246, 0.35);
}

.vt-ch-online-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #64748b;
  display: inline-block;
  flex-shrink: 0;
}
.vt-ch-online-dot.online { background: #10b981; box-shadow: 0 0 6px rgba(16, 185, 129, 0.7); }
.vt-ch-online-dot.busy { background: #f59e0b; }

.vt-ch-mobile-back {
  display: none;
}

/* Medium Desktop / Laptop (< 1360px): Slide-Over Right Drawer */
@media (max-width: 1360px) {
  .vt-ch-layout,
  .vt-ch-layout.drawer-collapsed {
    grid-template-columns: 320px minmax(0, 1fr);
  }
  .vt-ch-layout.drawer-collapsed .vt-ch-drawer {
    display: flex;
  }
  .vt-ch-drawer-close {
    display: inline-flex;
  }
  .vt-ch-drawer-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, 0.55);
    z-index: 34;
    backdrop-filter: blur(2px);
  }
  .vt-ch-layout.drawer-open .vt-ch-drawer-backdrop {
    display: block;
  }
  .vt-ch-drawer {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(340px, 92vw);
    z-index: 35;
    box-shadow: var(--shadow-lg);
    transform: translateX(104%);
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .vt-ch-layout.drawer-open .vt-ch-drawer {
    transform: translateX(0);
  }
}

/* Mobile & Tablet (< 1024px): Native Full-Screen Single-Pane Ergonomics */
@media (max-width: 1023px) {
  body.vt-ch-mobile-chat .vt-mobile-nav {
    display: none !important;
  }

  .vt-ch-layout,
  .vt-ch-layout.drawer-collapsed {
    grid-template-columns: 1fr;
  }

  .vt-ch-mobile-back {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 800;
    padding: 5px 9px;
  }

  .vt-ch-layout[data-ch-pane="chat"] .vt-ch-sidebar {
    display: none;
  }
  .vt-ch-layout[data-ch-pane="list"] .vt-ch-main {
    display: none;
  }

  .vt-ch-header {
    padding: 9px 11px;
    min-height: 54px;
  }

  .vt-ch-stream {
    padding: 12px 11px;
    gap: 10px;
  }

  .vt-ch-msg {
    max-width: 92%;
    gap: 7px;
  }

  .vt-ch-avatar-wrap,
  .vt-ch-avatar {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    font-size: 11px;
  }

  .vt-ch-bubble {
    padding: 9px 11px;
    min-width: 130px;
  }

  .vt-ch-att-img {
    max-width: min(260px, 100%);
    max-height: 195px;
  }

  .vt-ch-composer {
    padding: 8px 10px calc(10px + env(safe-area-inset-bottom, 0px));
  }

  .vt-ch-send-btn {
    padding: 0 13px;
  }

  .vt-ch-item-kebab {
    opacity: 1;
  }

  .vt-ch-mobile-fab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    position: absolute;
    right: 16px;
    bottom: 18px;
    z-index: 25;
    padding: 11px 16px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-accent));
    color: #fff;
    border: none;
    font-size: 13px;
    font-weight: 800;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.45);
    cursor: pointer;
  }
  .vt-ch-mobile-fab.hidden {
    display: none !important;
  }
}

@media (max-width: 680px) {
  .vt-ch-hide-xs {
    display: none !important;
  }
  .vt-ch-mobile-back {
    padding: 5px 8px;
    flex-shrink: 0;
  }
}

/* ==========================================================================
   Universal Mobile Ergonomics & Zero-Overflow Guarantees (320px - 768px)
   Covers Both Message Composers, Voice Bar, Bubbles, Headers, Kanban & Modals
   ========================================================================== */
html,
.vt-app-body,
.vt-banner-stack,
.vt-shell,
.vt-main-stage {
  max-width: 100vw;
  overflow-x: clip;
}

.vt-col-chat,
#vtChatActive,
.vt-composer-wrap,
.vt-ch-main,
#vtChActiveWrap,
.vt-ch-composer {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.vt-ch-attach-btn {
  min-height: 42px;
  width: 42px;
  border-radius: 12px;
  flex-shrink: 0;
}

.vt-ch-voice-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 10px;
  padding: 8px 12px;
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.45);
  border-radius: 10px;
  margin-bottom: 7px;
  max-width: 100%;
  box-sizing: border-box;
}

.vt-ch-voice-status {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 800;
  color: #f87171;
  min-width: 0;
}

.vt-ch-voice-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  flex-shrink: 0;
}

/* Prevent long URLs, hashes, filenames, or avatar+bubble flex sums from overflowing */
.vt-ch-bubble {
  min-width: 0;
  max-width: calc(100% - 46px);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.vt-msg-bubble {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.vt-att-file,
.vt-ch-doc-card {
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow: hidden;
}

.vt-att-file span,
.vt-ch-doc-card strong,
.vt-ch-doc-card span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 1023px) {
  .vt-ch-bubble {
    max-width: calc(100% - 37px);
  }
}

@media (max-width: 680px) {
  /* Top Outage / Announcement Banners on Mobile */
  .vt-sys-banner {
    padding: 6px 10px;
    gap: 6px 8px;
    font-size: 12px;
  }
  .vt-sys-banner:not(.is-collapsed) .vt-banner-actions {
    width: 100%;
    justify-content: flex-end;
  }
  .vt-sys-banner.is-collapsed {
    padding: 4px 9px;
    gap: 6px;
  }

  /* Message Composer #1: Ticket Dual-Room Composer — Spacious Input & Zero Overflow */
  .vt-composer-wrap {
    padding: 7px 8px calc(8px + env(safe-area-inset-bottom, 0px));
  }
  .vt-composer-row {
    gap: 5px;
  }
  .vt-composer-row .btn-icon {
    width: 37px;
    height: 40px;
    min-height: 40px;
    border-radius: 10px;
    font-size: 15px;
  }
  #btnSendMessage {
    min-height: 40px;
    height: 40px;
    padding: 0 11px;
    font-size: 12.5px;
    font-weight: 800;
    border-radius: 10px;
    flex-shrink: 0;
  }
  .vt-composer-row .vt-composer-input {
    min-height: 40px;
    padding: 8px 10px;
    border-radius: 10px;
  }

  /* Message Composer #2: Live Partner Channels 2-Tier Composer */
  .vt-ch-composer {
    padding: 7px 8px calc(9px + env(safe-area-inset-bottom, 0px));
  }
  .vt-ch-tools-strip {
    gap: 6px;
    margin-bottom: 6px;
    max-width: 100%;
    min-width: 0;
  }
  .vt-ch-tool-pill {
    padding: 4px 9px;
    font-size: 11px;
    min-height: 29px;
  }
  .vt-ch-input-row {
    gap: 6px;
    min-width: 0;
  }
  .vt-ch-attach-btn {
    width: 38px;
    height: 40px;
    min-height: 40px;
    border-radius: 10px;
  }
  .vt-ch-input-row .vt-composer-input {
    min-height: 40px;
    padding: 8px 11px;
    border-radius: 10px;
  }
  .vt-ch-send-btn {
    min-height: 40px;
    height: 40px;
    padding: 0 12px;
    font-size: 12.5px;
    border-radius: 10px;
  }

  /* Ticket Chat Header, Room Tabs, Alert Strips & Ribbons */
  .vt-chat-header {
    padding: 8px 10px;
    gap: 6px;
  }
  .vt-chat-top-bar {
    flex-wrap: wrap;
    gap: 6px;
  }
  .vt-alert-strip,
  .vt-internal-ribbon {
    flex-wrap: wrap;
    padding: 6px 10px;
    gap: 6px;
  }
  .vt-room-tab {
    font-size: 11.5px;
    padding: 4px 6px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .vt-chat-stream {
    padding: 12px 10px 10px;
  }
  .vt-msg-row {
    min-width: 0;
    max-width: 91%;
  }

  /* Kanban Toolbar: Override fixed inline widths cleanly on phones */
  .vt-kanban-toolbar {
    flex-direction: column;
    align-items: stretch !important;
    gap: 8px;
    padding: 10px !important;
  }
  .vt-kanban-toolbar > div:first-child {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px !important;
    width: 100%;
  }
  .vt-kanban-toolbar > div:first-child > strong {
    grid-column: 1 / -1;
  }
  #kbSearch,
  #kbFilterPrio,
  #kbFilterDept,
  #kbFilterSite {
    width: 100% !important;
    min-width: 0 !important;
  }
  .vt-kanban-toolbar > div:last-child {
    width: 100%;
    justify-content: flex-end;
  }

  /* Modal Dialogs & Multi-Button Footers on Phones */
  .vt-modal-head {
    padding: 12px 14px;
    font-size: 14px;
  }
  .vt-modal-body {
    padding: 14px;
  }
  .vt-modal-foot {
    padding: 10px 14px calc(12px + env(safe-area-inset-bottom, 0px));
    gap: 6px;
  }
  .vt-modal-foot .btn {
    min-height: 38px;
    padding: 6px 10px;
    font-size: 12px;
  }

  /* 6-Tab Mobile Bottom Navigation Bar — Zero Label Clipping on 360px Screens */
  .vt-mnav-btn {
    min-width: 0;
    padding: 0 2px;
    font-size: 10px;
    gap: 2px;
  }
  .vt-mnav-btn span:not(.mnav-ico):not(.vt-rail-badge) {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .vt-mnav-btn .mnav-ico {
    font-size: 17.5px;
  }

  /* Admin Studio Tables Horizontal Scroll Safety */
  .vt-card-panel {
    padding: 13px 12px;
    overflow-x: auto;
  }
}




