/* ============================================================
   SMMVersus — Cyber-Executive Theme
   custom.css  |  v1.0
   ============================================================ */

/* --- Google Fonts Import --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

/* ============================================================
   1. CSS CUSTOM PROPERTIES (Design Tokens)
   ============================================================ */
:root {
  /* Colors */
  --bg:              #0f1117;
  --bg-secondary:    #13161f;
  --surface:         #1a1d27;
  --surface-2:       #22263a;
  --surface-3:       #2a2f47;
  --border:          rgba(255,255,255,0.07);
  --border-hover:    rgba(99,102,241,0.4);

  /* Brand / Accent */
  --primary:         #6366f1;
  --primary-hover:   #4f46e5;
  --primary-soft:    rgba(99,102,241,0.12);
  --primary-glow:    rgba(99,102,241,0.25);
  --secondary:       #a78bfa;

  /* Text */
  --text:            #e8eaf6;
  --text-muted:      #8892a4;
  --text-dim:        #555e7a;

  /* Status Colors */
  --success:         #10b981;
  --success-soft:    rgba(16,185,129,0.12);
  --warning:         #f59e0b;
  --warning-soft:    rgba(245,158,11,0.12);
  --error:           #ef4444;
  --error-soft:      rgba(239,68,68,0.12);
  --info:            #3b82f6;
  --info-soft:       rgba(59,130,246,0.12);
  --purple:          #a855f7;
  --purple-soft:     rgba(168,85,247,0.12);

  /* Layout */
  --sidebar-w:       256px;
  --topbar-h:        64px;
  --radius-sm:       8px;
  --radius-md:       12px;
  --radius-lg:       20px;
  --radius-xl:       28px;

  /* Shadows */
  --shadow-card:     0 4px 24px rgba(0,0,0,0.35);
  --shadow-glow:     0 0 30px rgba(99,102,241,0.20);
  --shadow-glow-sm:  0 0 15px rgba(99,102,241,0.15);

  /* Transitions */
  --trans:           0.2s ease;
  --trans-slow:      0.35s ease;
}

/* ============================================================
   2. BASE RESET & GLOBALS
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

html {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 15px;
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

a { color: var(--primary); text-decoration: none; transition: color var(--trans); }
a:hover { color: var(--secondary); }

/* ============================================================
   3. LAYOUT SYSTEM
   ============================================================ */

/* Topbar */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--topbar-h);
  z-index: 50;
  background: rgba(15,17,23,0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  gap: 1rem;
}

/* Sidebar */
.sidebar {
  position: fixed;
  top: var(--topbar-h);
  left: 0;
  bottom: 0;
  width: var(--sidebar-w);
  z-index: 40;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  overflow-x: hidden;
  transition: transform var(--trans-slow);
  display: flex;
  flex-direction: column;
}

/* Main content */
.main-content {
  margin-left: var(--sidebar-w);
  margin-top: var(--topbar-h);
  min-height: calc(100vh - var(--topbar-h));
  padding: 1.75rem;
  max-width: calc(100% - var(--sidebar-w));
}

/* Mobile sidebar overlay */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 39;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
}

@media (max-width: 1023px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); box-shadow: var(--shadow-glow); }
  .sidebar-overlay.open { display: block; }
  .main-content { margin-left: 0; max-width: 100%; }
}

/* Guest / Auth layout */
.auth-layout {
  min-height: 100vh;
  background: var(--bg);
  background-image: 
    radial-gradient(ellipse at 20% 50%, rgba(99,102,241,0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(167,139,250,0.06) 0%, transparent 50%);
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  box-shadow: var(--shadow-card), 0 0 80px rgba(99,102,241,0.08);
}

/* ============================================================
   4. NAVIGATION
   ============================================================ */

/* Sidebar nav item */
.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 1.25rem;
  margin: 0.125rem 0.75rem;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--trans);
  border-left: 3px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-item:hover {
  color: var(--text);
  background: var(--primary-soft);
  border-left-color: rgba(99,102,241,0.4);
}

.nav-item.active {
  color: var(--primary);
  background: var(--primary-soft);
  border-left-color: var(--primary);
  font-weight: 600;
}

.nav-item .nav-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.7;
  transition: opacity var(--trans);
}

.nav-item:hover .nav-icon,
.nav-item.active .nav-icon { opacity: 1; }

.nav-section-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 1.25rem 1.5rem 0.5rem;
}

/* Topbar actions */
.topbar-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.875rem;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--trans);
}

.topbar-btn:hover {
  background: var(--surface-2);
  border-color: var(--border-hover);
  color: var(--text);
}

/* Dropdown menus */
.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card), var(--shadow-glow-sm);
  z-index: 100;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-8px) scale(0.97);
  pointer-events: none;
  transition: opacity var(--trans), transform var(--trans);
}

.dropdown-menu.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  transition: all var(--trans);
  cursor: pointer;
}

.dropdown-item:hover {
  background: var(--surface-2);
  color: var(--text);
}

.dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 0.25rem 0;
}

/* ============================================================
   5. CARDS
   ============================================================ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: border-color var(--trans);
}

.card:hover { border-color: var(--border-hover); }

.card-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.card-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.card-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.125rem;
}

.card-body { padding: 1.5rem; }
.card-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--bg-secondary);
}

/* Stat cards */
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all var(--trans);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  opacity: 0;
  transition: opacity var(--trans);
}

.stat-card:hover { 
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow-sm);
}

.stat-card:hover::before { opacity: 1; }

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.stat-icon.indigo   { background: var(--primary-soft); color: var(--primary); }
.stat-icon.emerald  { background: var(--success-soft); color: var(--success); }
.stat-icon.amber    { background: var(--warning-soft); color: var(--warning); }
.stat-icon.blue     { background: var(--info-soft);    color: var(--info); }
.stat-icon.purple   { background: var(--purple-soft);  color: var(--purple); }
.stat-icon.red      { background: var(--error-soft);   color: var(--error); }

.stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.125rem;
}

/* ============================================================
   6. FORM ELEMENTS
   ============================================================ */

.form-group { margin-bottom: 1.25rem; }

.form-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  letter-spacing: 0.02em;
}

.form-control {
  width: 100%;
  height: 44px;
  padding: 0 1rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-size: 0.875rem;
  font-family: 'Inter', sans-serif;
  transition: all var(--trans);
  outline: none;
  appearance: none;
}

.form-control:focus {
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-control::placeholder { color: var(--text-dim); }

textarea.form-control {
  height: auto;
  min-height: 120px;
  padding: 0.75rem 1rem;
  resize: vertical;
}

select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%238892a4' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 20px;
  padding-right: 2.5rem;
  cursor: pointer;
}

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

/* Floating label variant */
.form-float {
  position: relative;
}

.form-float input,
.form-float textarea {
  padding-top: 1.25rem;
  padding-bottom: 0.5rem;
  height: 52px;
}

.form-float label {
  position: absolute;
  top: 50%;
  left: 1rem;
  transform: translateY(-50%);
  font-size: 0.875rem;
  color: var(--text-dim);
  transition: all var(--trans);
  pointer-events: none;
}

.form-float input:focus + label,
.form-float input:not(:placeholder-shown) + label,
.form-float textarea:focus + label,
.form-float textarea:not(:placeholder-shown) + label {
  top: 0.6rem;
  transform: translateY(0);
  font-size: 0.6875rem;
  color: var(--primary);
  font-weight: 600;
}

/* Input with icon */
.input-icon-wrap { position: relative; }
.input-icon-wrap .input-icon {
  position: absolute;
  top: 50%;
  left: 1rem;
  transform: translateY(-50%);
  color: var(--text-dim);
  pointer-events: none;
  font-size: 0.875rem;
}
.input-icon-wrap .form-control { padding-left: 2.75rem; }

/* Checkbox / Toggle */
.form-check {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  cursor: pointer;
}

.form-check input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
  border-radius: 4px;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}

.toggle-switch input { opacity: 0; width: 0; height: 0; }

.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--surface-3);
  border-radius: 22px;
  transition: background var(--trans);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  height: 16px; width: 16px;
  left: 3px; top: 3px;
  background: white;
  border-radius: 50%;
  transition: transform var(--trans);
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--primary);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(18px);
}

/* ============================================================
   7. BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0 1.25rem;
  height: 40px;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--trans);
  white-space: nowrap;
  text-decoration: none;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}
.btn-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  box-shadow: var(--shadow-glow-sm);
  color: white;
}

.btn-secondary {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover {
  background: var(--surface-3);
  border-color: var(--border-hover);
  color: var(--text);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border);
}
.btn-ghost:hover {
  background: var(--surface-2);
  color: var(--text);
}

.btn-success { background: var(--success); color: white; border-color: var(--success); }
.btn-success:hover { opacity: 0.85; box-shadow: 0 0 15px rgba(16,185,129,0.3); color: white; }

.btn-danger { background: var(--error); color: white; border-color: var(--error); }
.btn-danger:hover { opacity: 0.85; box-shadow: 0 0 15px rgba(239,68,68,0.3); color: white; }

.btn-warning { background: var(--warning); color: #1a1d27; border-color: var(--warning); }
.btn-warning:hover { opacity: 0.85; color: #1a1d27; }

.btn-sm { height: 32px; padding: 0 0.875rem; font-size: 0.8125rem; border-radius: var(--radius-sm); }
.btn-lg { height: 52px; padding: 0 2rem; font-size: 1rem; border-radius: var(--radius-lg); }
.btn-xl { height: 58px; padding: 0 2.5rem; font-size: 1.0625rem; border-radius: var(--radius-xl); }
.btn-block { width: 100%; }

.btn-gradient {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  border: none;
  box-shadow: 0 4px 20px rgba(99,102,241,0.35);
}
.btn-gradient:hover {
  box-shadow: 0 6px 30px rgba(99,102,241,0.5);
  transform: translateY(-1px);
  color: white;
}

/* ============================================================
   8. BADGES & STATUS PILLS
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.65rem;
  border-radius: 99px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.badge-success  { background: var(--success-soft);  color: var(--success); }
.badge-warning  { background: var(--warning-soft);  color: var(--warning); }
.badge-error    { background: var(--error-soft);    color: var(--error); }
.badge-info     { background: var(--info-soft);     color: var(--info); }
.badge-purple   { background: var(--purple-soft);   color: var(--purple); }
.badge-muted    { background: var(--surface-2);     color: var(--text-muted); }
.badge-primary  { background: var(--primary-soft);  color: var(--primary); }

/* ============================================================
   9. TABLES
   ============================================================ */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.table {
  width: 100%;
  border-collapse: collapse;
  min-width: 700px;
}

.table thead th {
  background: var(--bg-secondary);
  color: var(--text-dim);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.875rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background var(--trans);
}

.table tbody tr:last-child { border-bottom: none; }

.table tbody tr:hover { background: var(--primary-soft); }

.table tbody td {
  padding: 0.875rem 1rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  vertical-align: middle;
}

.table tbody td.text-primary-val {
  color: var(--text);
  font-weight: 600;
}

.table-id {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--primary);
  font-weight: 500;
}

/* ============================================================
   10. TABS
   ============================================================ */
.tab-list {
  display: flex;
  gap: 0.25rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  padding: 0.25rem;
  border: 1px solid var(--border);
}

.tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border: none;
  background: transparent;
  transition: all var(--trans);
}

.tab-btn:hover { color: var(--text); background: var(--surface-2); }

.tab-btn.active {
  background: var(--primary);
  color: white;
  box-shadow: var(--shadow-glow-sm);
}

.tab-content { display: none; }
.tab-content.active { display: block; }

/* Filter tabs (for tables) */
.filter-tabs {
  display: flex;
  gap: 0.375rem;
  flex-wrap: wrap;
}

.filter-tab {
  padding: 0.375rem 0.875rem;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--trans);
}

.filter-tab:hover { color: var(--text); border-color: var(--border-hover); }
.filter-tab.active {
  background: var(--primary-soft);
  color: var(--primary);
  border-color: rgba(99,102,241,0.3);
}

/* ============================================================
   11. MODALS
   ============================================================ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--trans);
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: all;
}

.modal-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 520px;
  box-shadow: var(--shadow-card), var(--shadow-glow);
  transform: translateY(16px) scale(0.97);
  transition: transform var(--trans);
  overflow: hidden;
}

.modal-backdrop.open .modal-panel {
  transform: translateY(0) scale(1);
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.modal-close {
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  transition: all var(--trans);
}

.modal-close:hover {
  background: var(--error-soft);
  color: var(--error);
  border-color: transparent;
}

.modal-body { padding: 1.5rem; }
.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

/* ============================================================
   12. ALERTS & TOASTS
   ============================================================ */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  font-size: 0.875rem;
}

.alert-success { background: var(--success-soft); border-color: rgba(16,185,129,0.2); color: var(--success); }
.alert-warning  { background: var(--warning-soft); border-color: rgba(245,158,11,0.2); color: var(--warning); }
.alert-error    { background: var(--error-soft);   border-color: rgba(239,68,68,0.2);  color: var(--error); }
.alert-info     { background: var(--info-soft);    border-color: rgba(59,130,246,0.2); color: var(--info); }
.alert-primary  { background: var(--primary-soft); border-color: rgba(99,102,241,0.2); color: var(--primary); }

/* Toast container */
#toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.toast {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.125rem;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text);
  min-width: 280px;
  max-width: 380px;
  animation: toast-in 0.3s var(--trans-slow) forwards;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateX(40px) scale(0.95); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}

/* ============================================================
   13. CHAT BUBBLES (viewticket.twig)
   ============================================================ */
.chat-wrap {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 1.5rem;
  max-height: 520px;
  overflow-y: auto;
}

.chat-bubble {
  max-width: 75%;
  padding: 0.875rem 1.125rem;
  border-radius: var(--radius-lg);
  font-size: 0.875rem;
  line-height: 1.6;
}

.chat-bubble.user {
  background: var(--primary-soft);
  border: 1px solid rgba(99,102,241,0.2);
  color: var(--text);
  align-self: flex-end;
  border-bottom-right-radius: var(--radius-sm);
}

.chat-bubble.support {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  align-self: flex-start;
  border-bottom-left-radius: var(--radius-sm);
}

.chat-meta {
  font-size: 0.6875rem;
  color: var(--text-dim);
  margin-top: 0.25rem;
}

/* ============================================================
   14. CODE BLOCKS
   ============================================================ */
.code-block {
  background: #0a0c13;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8125rem;
  color: #a5b4fc;
  overflow-x: auto;
  line-height: 1.7;
  white-space: pre;
}

/* ============================================================
   15. PROGRESS BAR
   ============================================================ */
.progress {
  height: 6px;
  background: var(--surface-3);
  border-radius: 99px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 99px;
  transition: width 0.6s ease;
}

/* ============================================================
   16. COPY INPUT (API Key etc.)
   ============================================================ */
.copy-input-wrap {
  display: flex;
  gap: 0;
}

.copy-input-wrap .form-control {
  border-radius: var(--radius-md) 0 0 var(--radius-md);
  border-right: none;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
}

.copy-input-wrap .btn {
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  border-left: none;
}

/* ============================================================
   17. PAGE HEADER
   ============================================================ */
.page-header {
  margin-bottom: 1.75rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.page-title {
  font-size: 1.375rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.3;
  margin: 0;
}

.page-subtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* ============================================================
   18. PLATFORM PILLS (neworder.twig)
   ============================================================ */
.platform-pills {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.platform-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--trans);
}

.platform-pill:hover,
.platform-pill.active {
  background: var(--primary-soft);
  color: var(--primary);
  border-color: rgba(99,102,241,0.3);
}

/* ============================================================
   19. RECEIPT / ORDER CONFIRM CARD
   ============================================================ */
.receipt-card {
  background: linear-gradient(135deg, var(--surface) 0%, rgba(99,102,241,0.05) 100%);
  border: 1px solid rgba(99,102,241,0.2);
  border-radius: var(--radius-xl);
  padding: 2rem;
  text-align: center;
  box-shadow: var(--shadow-glow-sm);
}

.receipt-icon {
  width: 64px; height: 64px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: var(--success-soft);
  color: var(--success);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  border: 2px solid rgba(16,185,129,0.3);
}

.receipt-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 1.5rem;
  text-align: left;
}

.receipt-item {
  background: var(--surface-2);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
}

.receipt-item-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
}

.receipt-item-value {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text);
  margin-top: 0.25rem;
}

/* ============================================================
   20. GLASSMORPHISM HERO (Guest pages)
   ============================================================ */
.glass-panel {
  background: rgba(26,29,39,0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: var(--shadow-card), inset 0 1px 0 rgba(255,255,255,0.05);
}

/* ============================================================
   21. NEON GLOW ACCENTS
   ============================================================ */
.glow-text {
  background: linear-gradient(135deg, #6366f1, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.glow-border {
  border-color: var(--primary) !important;
  box-shadow: 0 0 20px var(--primary-glow);
}

/* Animated gradient border */
.gradient-border {
  position: relative;
  z-index: 0;
}
.gradient-border::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--primary), var(--secondary), var(--primary));
  background-size: 200% 200%;
  z-index: -1;
  animation: gradient-shift 3s ease infinite;
}
@keyframes gradient-shift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ============================================================
   22. PROSE TYPOGRAPHY (faq, terms, blog, newpage)
   ============================================================ */
.prose {
  color: var(--text-muted);
  line-height: 1.8;
  font-size: 0.9375rem;
}
.prose h1,.prose h2,.prose h3,.prose h4 { color: var(--text); font-weight: 700; }
.prose h2 { font-size: 1.375rem; margin: 2rem 0 0.75rem; }
.prose h3 { font-size: 1.125rem; margin: 1.5rem 0 0.5rem; }
.prose p { margin: 0.75rem 0; }
.prose ul,.prose ol { padding-left: 1.5rem; margin: 0.75rem 0; }
.prose li { margin: 0.375rem 0; }
.prose a { color: var(--primary); }
.prose strong { color: var(--text); font-weight: 700; }
.prose hr { border: none; border-top: 1px solid var(--border); margin: 2rem 0; }
.prose blockquote {
  border-left: 3px solid var(--primary);
  padding-left: 1rem;
  color: var(--text-muted);
  margin: 1rem 0;
  font-style: italic;
}

/* ============================================================
   23. ANIMATIONS & MICRO-INTERACTIONS
   ============================================================ */
@keyframes fade-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pulse-ring {
  0%   { transform: scale(1); opacity: 0.5; }
  100% { transform: scale(1.8); opacity: 0; }
}

.animate-fade-in { animation: fade-in 0.4s ease forwards; }
.animate-spin { animation: spin 1s linear infinite; }

/* Stagger children */
.stagger > * {
  opacity: 0;
  animation: fade-in 0.4s ease forwards;
}
.stagger > *:nth-child(1) { animation-delay: 0.05s; }
.stagger > *:nth-child(2) { animation-delay: 0.10s; }
.stagger > *:nth-child(3) { animation-delay: 0.15s; }
.stagger > *:nth-child(4) { animation-delay: 0.20s; }
.stagger > *:nth-child(5) { animation-delay: 0.25s; }
.stagger > *:nth-child(6) { animation-delay: 0.30s; }

/* OTP input */
.otp-input {
  width: 52px; height: 60px;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 800;
  font-family: 'JetBrains Mono', monospace;
  background: var(--surface-2);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  transition: all var(--trans);
}
.otp-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
  outline: none;
}

/* ============================================================
   24. RESPONSIVE UTILS
   ============================================================ */
@media (max-width: 768px) {
  .main-content { padding: 1rem; }
  .card-body { padding: 1rem; }
  .card-header { padding: 1rem; }
  .stat-card { padding: 1rem; }
  .page-title { font-size: 1.125rem; }
  .receipt-grid { grid-template-columns: 1fr; }
  .modal-panel { max-width: 100%; }
}

/* ============================================================
   25. LOADING SKELETON
   ============================================================ */
.skeleton {
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes skeleton-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
