:root {
  --bg-dark: #0f1218;
  --bg-sidebar: #171b26;
  --bg-panel: #202636;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --border-color: #2e384d;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --accent: #e11d48;
  --accent-hover: #be123c;
  --danger: #ef4444;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  height: 100vh;
  overflow: hidden;
}

.app-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

/* TOP NAVBAR */
.top-nav {
  height: 58px;
  background: var(--bg-sidebar);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.1rem;
  color: #fbbf24;
}

/* VIEW MODE TABS */
.view-mode-tabs {
  display: flex;
  background: #111520;
  border-radius: 8px;
  padding: 3px;
  border: 1px solid var(--border-color);
}

.tab-btn {
  background: transparent;
  color: var(--text-muted);
  border: none;
  padding: 6px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  color: #ffffff;
}

.tab-btn.active {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* BUTTONS */
.btn {
  padding: 7px 13px;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #ffffff;
  transition: all 0.15s ease;
}

.btn-primary { background: var(--primary); }
.btn-primary:hover { background: var(--primary-hover); }

.btn-secondary {
  background: #2e384d;
  border-color: #41506b;
}
.btn-secondary:hover { background: #3b4962; }

.btn-accent { background: var(--accent); }
.btn-accent:hover { background: var(--accent-hover); }

.btn-danger { background: var(--danger); }
.btn-danger:hover { background: #dc2626; }

.btn-file {
  width: 100%;
  background: #0284c7;
}
.btn-file:hover { background: #0369a1; }

.btn-small {
  padding: 5px 9px;
  font-size: 0.78rem;
}

/* WORKSPACE LAYOUT */
.workspace {
  flex: 1;
  display: flex;
  overflow: hidden;
}

.sidebar {
  width: 410px;
  min-width: 410px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.panel-section {
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px;
}

.highlight-panel {
  border-color: #38bdf8;
  background: #192742;
}

.panel-section h3 {
  font-size: 0.88rem;
  font-weight: 700;
  color: #38bdf8;
  margin-bottom: 10px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.section-header h3 {
  margin-bottom: 0;
}

/* FORM CONTROLS */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 8px;
}

.form-group label {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group select {
  background: #11151f;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 6px 9px;
  border-radius: 5px;
  font-size: 0.82rem;
  outline: none;
}

.form-group input[type="color"] {
  height: 32px;
  width: 100%;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  cursor: pointer;
  padding: 2px;
}

.form-group input[type="range"] {
  accent-color: #38bdf8;
}

.form-check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--text-muted);
  cursor: pointer;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}

/* PDF PAGE PICKER BOX */
.pdf-picker-box {
  background: #151a26;
  border: 1px solid #38bdf8;
  border-radius: 6px;
  padding: 8px;
  margin-bottom: 8px;
}

.pdf-picker-box label {
  font-size: 0.78rem;
  color: #38bdf8;
  display: block;
  margin-bottom: 4px;
  font-weight: 600;
}

.pdf-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
}

/* CANVAS & WORKBENCH */
.canvas-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, #1b2233 0%, #0a0d14 100%);
  position: relative;
  overflow: hidden;
  user-select: none;
  padding: 10px;
}

.disc-wrapper {
  position: relative;
  width: 580px;
  height: 580px;
  border-radius: 50%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.15);
  overflow: hidden;
  cursor: grab;
}

.disc-wrapper:active {
  cursor: grabbing;
}

#discCanvas {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 50%;
}

/* 3D MOCKUP CANVAS VIEWPORT */
.mockup-canvas-container {
  max-width: 94%;
  max-height: 82vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

#mockupCanvas {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.8));
  border-radius: 8px;
  cursor: default;
}

/* CENTER HOLE OVERLAYS FOR 2D DISC */
.center-hole-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  pointer-events: none;
  transition: all 0.2s ease;
}

.hub-realistic {
  width: 32%;
  height: 32%;
  background: radial-gradient(circle, #0e121a 0%, #0e121a 38%, rgba(255,255,255,0.06) 40%, rgba(255,255,255,0.2) 65%, transparent 70%);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: inset 0 0 0 12px rgba(255, 255, 255, 0.08), 0 0 15px rgba(0,0,0,0.5);
}
.hub-realistic::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 38%;
  height: 38%;
  background: #0b0e14;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
}

.hub-guide-only {
  width: 16%;
  height: 16%;
  background: transparent;
  border: 2px dashed rgba(255, 255, 255, 0.8);
  box-shadow: 0 0 8px rgba(0,0,0,0.6);
}

.hub-solid-white {
  width: 16%;
  height: 16%;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.3) inset;
}

.hub-none {
  display: none !important;
}

.canvas-hint {
  margin-top: 12px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* AUTO-SCROLL FOCUS HIGHLIGHT */
@keyframes panelPulseHighlight {
  0% {
    box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.7);
    border-color: #38bdf8;
  }
  50% {
    box-shadow: 0 0 16px 3px rgba(56, 189, 248, 0.45);
    border-color: #38bdf8;
  }
  100% {
    box-shadow: none;
    border-color: var(--border-color);
  }
}

.panel-pulse {
  animation: panelPulseHighlight 1.2s ease-out;
}

/* LOCKED IMAGE CONTROLS */
.input-locked {
  opacity: 0.35 !important;
  cursor: not-allowed !important;
}

.btn-locked {
  opacity: 0.4 !important;
  background: #1b212f !important;
  border-color: #2e384d !important;
  color: #64748b !important;
  cursor: not-allowed !important;
}

.control-lock-notice {
  display: block;
  font-size: 0.72rem;
  color: #fbbf24;
  margin-top: 6px;
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.25);
  border-radius: 4px;
  padding: 4px 8px;
  line-height: 1.3;
}

/* ============================================================ */
/* DROPDOWN MENU STYLING                                        */
/* ============================================================ */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-toggle {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  min-width: 220px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.65);
  z-index: 1000;
  overflow: hidden;
  padding: 6px 0;
}

.dropdown-menu.show {
  display: block;
  animation: fadeInDown 0.15s ease-out;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.dropdown-item {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 9px 16px;
  color: var(--text-main);
  background: transparent;
  border: none;
  font-size: 0.82rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease;
}

.dropdown-item:hover {
  background: #2e384d;
  color: #38bdf8;
}

.dropdown-item.highlight-item {
  color: #fb7185;
}

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

/* User status badge */
.user-badge {
  background: #111520;
  border: 1px solid var(--border-color);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.78rem;
  color: #38bdf8;
  max-width: 170px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============================================================ */
/* AUTH MODAL STYLING                                           */
/* ============================================================ */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.modal-card {
  width: 380px;
  background: var(--bg-sidebar);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
  animation: modalPop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.modal-header h3 {
  font-size: 1.1rem;
  color: #fbbf24;
}

.close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
}
.close-btn:hover { color: #ffffff; }

.auth-tabs {
  display: flex;
  background: #111520;
  border-radius: 6px;
  padding: 3px;
  margin-bottom: 16px;
}

.auth-tab {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 6px 0;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
}

.auth-tab.active {
  background: var(--primary);
  color: #ffffff;
}

.auth-form .form-group {
  margin-bottom: 12px;
}

.auth-error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid #ef4444;
  color: #fca5a5;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.78rem;
  margin-bottom: 12px;
}

.auth-separator {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 14px 0;
  color: var(--text-muted);
  font-size: 0.75rem;
}
.auth-separator::before,
.auth-separator::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border-color);
}
.auth-separator span {
  padding: 0 8px;
}

/* ============================================================ */
/* 1200px CENTERED ADMIN CONSOLE WITH BACKDROP OVERLAY          */
/* ============================================================ */

/* 1. Dark Backdrop Overlay: Dims and hides the interface behind the panel */
.admin-modal-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(8, 11, 18, 0.88); /* Dims the workspace completely */
  backdrop-filter: blur(8px);
  z-index: 2500;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 2. Centered Console Card */
.admin-sidebar {
  width: 1200px;
  max-width: 95vw;
  height: calc(100vh - 60px); /* 30px margin top and bottom */
  max-height: 840px;
  background: #141824;
  border: 1px solid #38bdf8;
  border-radius: 16px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.95), 0 0 25px rgba(56, 189, 248, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  /* 🟢 Flexbox-safe fade in up (stays locked dead-center with no sliding glitch!) */
  animation: adminModalFadeInUp 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Smooth Fade In Up Animation */
@keyframes adminModalFadeInUp {
  from {
    opacity: 0;
    transform: translateY(28px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.admin-header {
  padding: 18px 24px;
  background: #192033;
  border-bottom: 1px solid #2e384d;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-header h2 {
  font-size: 1.15rem;
  color: #fbbf24;
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-nav {
  display: flex;
  background: #10141e;
  border-bottom: 1px solid #2e384d;
  padding: 6px 12px;
  gap: 8px;
}

.admin-nav-btn {
  padding: 10px 22px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.86rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.admin-nav-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.admin-nav-btn.active {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.4);
}

/* 3. Scrollable Body with Sleek Dark Scrollbar (No more white scrollbar) */
.admin-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transform: translateZ(0);
  will-change: scroll-position;
  overscroll-behavior: contain;
}

.admin-body::-webkit-scrollbar {
  width: 6px;
}

.admin-body::-webkit-scrollbar-track {
  background: transparent;
  margin: 10px 0;
}

.admin-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 10px;
}

.admin-body::-webkit-scrollbar-thumb:hover {
  background: #38bdf8;
}

/* ============================================================ */
/* FULL-SCREEN BLIND AUTHENTICATION GATE SCREEN                 */
/* ============================================================ */
.blind-auth-screen {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle at center, #151a27 0%, #080b11 100%);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  user-select: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.blind-auth-screen.dismissed {
  opacity: 0;
  transform: scale(1.03);
  pointer-events: none;
}

/* Ambient Radial Glow Orbs */
.ambient-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  opacity: 0.35;
}

.glow-blue {
  width: 450px;
  height: 450px;
  background: #2563eb;
  top: -80px;
  left: 10%;
}

.glow-gold {
  width: 400px;
  height: 400px;
  background: #f59e0b;
  bottom: -60px;
  right: 15%;
}

/* Central Card */
.blind-auth-card {
  position: relative;
  width: 420px;
  max-width: 92vw;
  background: rgba(23, 27, 38, 0.88);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 32px 28px;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.85), 0 0 1px rgba(255, 255, 255, 0.2);
  z-index: 10;
}

/* Header & Logo */
.blind-brand-header {
  text-align: center;
  margin-bottom: 22px;
}

.blind-logo-wrapper {
  display: inline-block;
  padding: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  margin-bottom: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.blind-logo {
  width: 54px;
  height: 54px;
  object-fit: contain;
  display: block;
}

.blind-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #fbbf24;
  letter-spacing: -0.02em;
}

.blind-subtitle {
  font-size: 0.82rem;
  color: #94a3b8;
  margin-top: 3px;
}

/* Tabs */
.blind-tabs {
  display: flex;
  background: #0f121a;
  border-radius: 8px;
  padding: 4px;
  border: 1px solid var(--border-color);
  margin-bottom: 18px;
}

.blind-tab {
  flex: 1;
  background: transparent;
  color: #94a3b8;
  border: none;
  padding: 8px 0;
  font-size: 0.84rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.blind-tab.active {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.4);
}

/* Form Inputs */
.blind-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.blind-input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.blind-input-group label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #cbd5e1;
}

.label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.link-btn {
  background: none;
  border: none;
  color: #38bdf8;
  font-size: 0.74rem;
  cursor: pointer;
}
.link-btn:hover { text-decoration: underline; }

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-icon .icon {
  position: absolute;
  left: 12px;
  font-size: 0.9rem;
  pointer-events: none;
  opacity: 0.6;
}

.input-with-icon input {
  width: 100%;
  background: #0d1117;
  border: 1px solid var(--border-color);
  border-radius: 7px;
  padding: 10px 12px 10px 36px;
  color: #f1f5f9;
  font-size: 0.88rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input-with-icon input:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

/* Buttons */
.blind-btn-primary {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  border: none;
  border-radius: 7px;
  padding: 11px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.1s ease, filter 0.15s ease;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
}

.blind-btn-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.blind-separator {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 6px 0;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.blind-separator::before,
.blind-separator::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border-color);
}
.blind-separator span { padding: 0 10px; }

.blind-btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #111520;
  border: 1px solid var(--border-color);
  color: #ffffff;
  border-radius: 7px;
  padding: 10px;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.blind-btn-google:hover {
  background: #1c2333;
  border-color: #41506b;
}

/* Alert Notifications */
.blind-alert {
  padding: 9px 12px;
  border-radius: 6px;
  font-size: 0.78rem;
  line-height: 1.4;
  margin-bottom: 12px;
}
.blind-alert.error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid #ef4444;
  color: #fca5a5;
}
.blind-alert.success {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid #22c55e;
  color: #86efac;
}

/* Footer */
.blind-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 0.72rem;
  color: #64748b;
}

/* ============================================================ */
/* OUTER CLIPPING FRAME (Smooth curved corners with overflow: hidden) */
/* ============================================================ */
.blind-auth-card {
  position: relative;
  width: 460px;
  max-width: 94vw;
  max-height: 90vh;
  background: rgba(23, 27, 38, 0.90);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  overflow: hidden; /* 🔒 Clips the scrollbar into smooth 16px curves! */
  padding: 0;       /* Outer frame padding is 0 for flush clipping */
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.85), 0 0 1px rgba(255, 255, 255, 0.2);
  z-index: 10;
  display: flex;
  flex-direction: column;
}

/* ============================================================ */
/* INNER SCROLLABLE VIEWPORT                                    */
/* ============================================================ */
.blind-auth-scroll {
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 28px 24px;
}

/* Slim, curved scrollbar that stays away from the card corners */
.blind-auth-scroll::-webkit-scrollbar {
  width: 5px;
}

.blind-auth-scroll::-webkit-scrollbar-track {
  background: transparent;
  margin: 12px 0; /* Keeps the scrollbar thumb away from the top/bottom curves */
}

.blind-auth-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 10px;
}

.blind-auth-scroll::-webkit-scrollbar-thumb:hover {
  background: #38bdf8;
}

/* Select dropdown in blind page */
.blind-select {
  width: 100%;
  background: #0d1117;
  border: 1px solid var(--border-color);
  border-radius: 7px;
  padding: 10px 12px 10px 36px;
  color: #f1f5f9;
  font-size: 0.85rem;
  outline: none;
  cursor: pointer;
  appearance: none;
}
.blind-select:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

.company-link {
  color: #38bdf8;             /* Sleek neon cyan-blue that pops on dark mode */
  text-decoration: none;
  font-weight: 600;
  transition: color 0.15s ease, text-decoration 0.15s ease;
}

.company-link:hover {
  color: #fbbf24;             /* Turns golden on hover */
  text-decoration: underline;
}

/* ============================================================ */
/* 0ms FLICKER-FREE SESSION CACHE RULES                         */
/* ============================================================ */
html.session-cached #blindAuthScreen {
  display: none !important;
}

html.session-cached #userProfileArea {
  display: flex !important;
}

/* ============================================================ */
/* USER MANAGEMENT PANEL & DATA TABLE                           */
/* ============================================================ */
.user-filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  background: #0d111a;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
}

.filter-pill {
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  background: transparent;
  transition: all 0.15s ease;
  color: var(--text-muted);
}
.filter-pill:hover { color: #ffffff; background: rgba(255, 255, 255, 0.05); }

.filter-pill.active {
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.filter-pill.pill-all.active { border-color: #fbbf24; color: #fbbf24; background: rgba(251, 191, 36, 0.12); }
.filter-pill.pill-active.active { border-color: #22c55e; color: #22c55e; background: rgba(34, 197, 94, 0.12); }
.filter-pill.pill-warning.active { border-color: #f59e0b; color: #f59e0b; background: rgba(245, 158, 11, 0.12); }
.filter-pill.pill-banned.active { border-color: #ef4444; color: #ef4444; background: rgba(239, 68, 68, 0.12); }
.filter-pill.pill-suspended.active { border-color: #a855f7; color: #a855f7; background: rgba(168, 85, 247, 0.12); }
.filter-pill.pill-platform.active { border-color: #38bdf8; color: #38bdf8; background: rgba(56, 189, 248, 0.12); }

.user-table-wrapper {
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  background: #090c13;
}

.user-table-scroll {
  max-height: 480px;
  overflow-y: auto;
  overflow-x: auto;
}

.user-mgmt-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.78rem;
  white-space: nowrap;
}

.user-mgmt-table th {
  background: #111520;
  color: #94a3b8;
  font-weight: 700;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-color);
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  position: sticky;
  top: 0;
  z-index: 5;
}

.user-mgmt-table td {
  padding: 11px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: #e2e8f0;
  vertical-align: middle;
}

.user-mgmt-table tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}

.standing-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.72rem;
}
.standing-active { background: rgba(34, 197, 94, 0.15); color: #4ade80; border: 1px solid rgba(34, 197, 94, 0.4); }
.standing-warning { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.4); }
.standing-suspended { background: rgba(168, 85, 247, 0.15); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.4); }
.standing-banned { background: rgba(239, 68, 68, 0.15); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.4); }

.platform-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  font-size: 0.72rem;
}

/* ============================================================ */
/* SMOOTH CENTERED MODAL ANIMATION (Flexbox Safe)               */
/* ============================================================ */
@keyframes userModalFadeInUp {
  from {
    opacity: 0;
    transform: translateY(28px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* 1. Fast Overlay: Removed backdrop-filter to prevent 60fps canvas scroll stutter */
.user-modal-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(8, 11, 18, 0.88);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-modal-card {
  width: 1200px;
  max-width: 95vw;
  height: calc(100vh - 60px);
  max-height: 840px;
  background: #141824;
  border: 1px solid #2e384d;
  border-radius: 16px;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.9);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: userModalFadeInUp 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ============================================================ */
/* GPU-ACCELERATED SMOOTH SCROLLBAR (Zero Lag)                   */
/* ============================================================ */
.user-modal-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 24px 28px;
  /* 🚀 Hardware Acceleration: Promotes scrollable layer directly to GPU */
  transform: translateZ(0);
  will-change: scroll-position;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
}

.user-modal-content::-webkit-scrollbar {
  width: 6px;
}

.user-modal-content::-webkit-scrollbar-track {
  background: transparent;
  margin: 10px 0; /* Keeps thumb away from card corners */
}

.user-modal-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 10px;
}

.user-modal-content::-webkit-scrollbar-thumb:hover {
  background: #6366f1;
}

.user-modal-header {
  padding: 16px 24px;
  background: #192033;
  border-bottom: 1px solid #2e384d;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar-circle {
  width: 38px;
  height: 38px;
  background: #4f46e5;
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.user-modal-header h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #f1f5f9;
}

.user-modal-body {
  flex: 1;
  display: flex;
  overflow: hidden;
}

/* Left Sidebar Tabs */
.user-modal-sidebar {
  width: 260px;
  background: #0f131d;
  border-right: 1px solid #2e384d;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.u-tab-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 16px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: #94a3b8;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}

.u-tab-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.04);
}

.u-tab-btn.active {
  background: rgba(79, 70, 229, 0.16);
  color: #818cf8;
  border-left: 3px solid #6366f1;
}

.tab-icon {
  font-size: 1.1rem;
}

.pane-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  border-bottom: 1px solid #2e384d;
  padding-bottom: 12px;
}

.pane-header h3 {
  font-size: 1.1rem;
  color: #f8fafc;
}

.pane-header p {
  font-size: 0.82rem;
  color: #94a3b8;
  margin-top: 2px;
}

/* Profile Inputs Grid (Optimized spacing so it fits without false overflow) */
.profile-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.profile-form-grid .full-width {
  grid-column: span 2;
}

.profile-form-grid .form-group label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.profile-form-grid input {
  background: #0b0e14;
  border: 1px solid #2e384d;
  border-radius: 7px;
  padding: 8px 12px;
  color: #f1f5f9;
  font-size: 0.84rem;
  outline: none;
  transition: border-color 0.15s ease;
}

.profile-form-grid input:focus {
  border-color: #6366f1;
}

.input-hint {
  font-size: 0.72rem;
  color: #64748b;
  margin-top: 4px;
}

/* Tab 2: Purchased Plan Banner */
.active-plan-banner {
  background: #111522;
  border: 1px solid #3b82f6;
  border-left: 5px solid #6366f1;
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 28px;
}

.banner-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(99, 102, 241, 0.2);
  color: #818cf8;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.banner-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.banner-body h3 {
  font-size: 1.15rem;
  color: #ffffff;
  margin-bottom: 4px;
}

.banner-body p {
  font-size: 0.82rem;
  color: #94a3b8;
  margin-bottom: 12px;
}

.plan-meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.meta-pill {
  background: #0b0e14;
  border: 1px solid #2e384d;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.74rem;
  color: #cbd5e1;
}

.status-pill {
  background: rgba(34, 197, 94, 0.15);
  border-color: rgba(34, 197, 94, 0.4);
  color: #4ade80;
  font-weight: 700;
}

/* Toggle Switch */
.renewal-toggle-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  color: #94a3b8;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-switch .slider {
  position: absolute; cursor: pointer; inset: 0;
  background-color: #2e384d;
  transition: .3s;
  border-radius: 24px;
}
.toggle-switch .slider:before {
  position: absolute; content: "";
  height: 18px; width: 18px; left: 3px; bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}
.toggle-switch input:checked + .slider { background-color: #22c55e; }
.toggle-switch input:checked + .slider:before { transform: translateX(20px); }

/* Plans Grid */
.section-sub-title {
  font-size: 0.95rem;
  color: #e2e8f0;
  margin-bottom: 16px;
}

.plans-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.plan-card {
  position: relative;
  background: #0e121a;
  border: 1px solid #2e384d;
  border-radius: 12px;
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.plan-card:hover {
  transform: translateY(-2px);
  border-color: #4f46e5;
}

.popular-card {
  border-color: #6366f1;
  background: #111524;
}
.best-value-card {
  border-color: #f59e0b;
}

.badge-ribbon {
  position: absolute;
  top: -10px;
  right: 12px;
  background: #f97316;
  color: #ffffff;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 800;
}
.gold-ribbon { background: #eab308; }

.plan-tier-header {
  font-size: 0.68rem;
  font-weight: 800;
  color: #818cf8;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.plan-card h4 {
  font-size: 1.1rem;
  color: #ffffff;
  margin-bottom: 10px;
}

.plan-price {
  font-size: 1.45rem;
  color: #ffffff;
  font-weight: 800;
  margin-bottom: 14px;
}
.plan-price span {
  font-size: 0.72rem;
  color: #94a3b8;
  font-weight: 500;
}

.plan-perks {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.76rem;
  color: #cbd5e1;
  flex: 1;
  margin-bottom: 18px;
}

.btn-plan {
  width: 100%;
}

/* ============================================================ */
/* TAB 3: BILLING HISTORY TABLE (Full-Fit & Scroll-Safe)         */
/* ============================================================ */
.billing-table-wrapper {
  background: #0b0e14;
  border: 1px solid #2e384d;
  border-radius: 10px;
  overflow-x: auto; /* 👈 Allows horizontal scroll if needed, never clips! */
  width: 100%;
}

.billing-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.78rem;
}

.billing-table th {
  background: #111520;
  color: #94a3b8;
  font-weight: 700;
  padding: 10px 12px; /* Tightened from 16px so all 7 columns fit cleanly */
  border-bottom: 1px solid #2e384d;
  font-size: 0.70rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.billing-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: #e2e8f0;
  white-space: nowrap;
  vertical-align: middle;
}

.billing-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* Slim scrollbar if screen is narrow */
.billing-table-wrapper::-webkit-scrollbar {
  height: 5px;
}
.billing-table-wrapper::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 6px;
}

.status-badge-paid {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  white-space: nowrap; /* 👈 Prevents text wrapping onto two lines */
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.4);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.74rem;
  font-weight: 700;
}

/* ============================================================ */
/* UNIFORM TOP NAVBAR BUTTON SIZING & USER BADGE BUTTON         */
/* ============================================================ */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Enforce exact same height, font, and alignment on all top bar buttons */
.nav-actions .btn,
.nav-actions .dropdown-toggle,
.nav-actions .user-badge-btn {
  height: 36px;
  padding: 0 14px;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  box-sizing: border-box;
  white-space: nowrap;
  vertical-align: middle;
}

/* Chit Tee Profile Button Styling */
.user-badge-btn {
  background: #111520;
  border: 1px solid var(--border-color);
  color: #38bdf8;
  cursor: pointer;
  max-width: 180px;
  transition: all 0.15s ease;
}

.user-badge-btn:hover {
  background: #182030;
  border-color: #38bdf8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.3);
  transform: translateY(-1px);
}

.user-badge-btn .badge-icon {
  font-size: 0.95rem;
}

.user-badge-btn .badge-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ============================================================ */
/* SUBSCRIPTION PRICING MANAGER & GATEWAYS ADMIN STYLES         */
/* ============================================================ */
.admin-sub-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  background: #0d111a;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
}

.sub-nav-tabs {
  display: flex;
  gap: 8px;
}

.sub-tab-btn {
  padding: 7px 16px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  transition: all 0.15s ease;
}

.sub-tab-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.sub-tab-btn.active {
  background: #4f46e5;
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(79, 70, 229, 0.4);
}

/* Pricing Manager Grid (4 Columns on 1200px) */
.pricing-editor-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  width: 100%;
  overflow: visible;
}

.plan-editor-card {
  position: relative;
  background: #0d111a;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.plan-editor-card:hover {
  border-color: #6366f1;
}

.card-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.card-top-badge {
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(99, 102, 241, 0.2);
  color: #818cf8;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.btn-card-del {
  background: transparent;
  border: none;
  color: #ef4444;
  cursor: pointer;
  font-size: 0.95rem;
  padding: 2px;
}
.btn-card-del:hover {
  color: #f87171;
  transform: scale(1.15);
}

.plan-editor-card label {
  font-size: 0.68rem;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.03em;
  margin-bottom: 2px;
}

.plan-editor-card input,
.plan-editor-card select,
.plan-editor-card textarea {
  background: #06090e;
  border: 1px solid #2e384d;
  border-radius: 6px;
  padding: 8px 10px;
  color: #f1f5f9;
  font-size: 0.82rem;
  outline: none;
  font-family: inherit;
  transition: border-color 0.15s ease;
}

.plan-editor-card input:focus,
.plan-editor-card select:focus,
.plan-editor-card textarea:focus {
  border-color: #38bdf8;
}

.plan-editor-card textarea {
  min-height: 110px;
  resize: none;
  overflow-y: hidden; /* 🟢 Hides the inner scrollbars inside each card */
  font-size: 0.76rem;
  line-height: 1.5;
}

/* Payment Gateway Section Box */
.gateway-box {
  background: #0d111a;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 20px;
}

.gateway-box h4 {
  font-size: 0.96rem;
  color: #38bdf8;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.gateway-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

.gateway-form-grid .span-2 {
  grid-column: span 2;
}

.gateway-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.8rem;
}

.gateway-table th {
  background: #111520;
  color: #94a3b8;
  font-weight: 700;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.gateway-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: #e2e8f0;
  vertical-align: middle;
}

.gateway-icon-badge {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  background: #1e293b;
  margin-right: 8px;
  vertical-align: middle;
}

/* Gateway Table Logo Image */
.gateway-logo-img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 6px;
  background: transparent;
  padding: 0;             
  border: none;
  outline: none;
  vertical-align: middle;
  margin-right: 8px;
}

.gateway-badge-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.82rem;
  vertical-align: middle;
  margin-right: 8px;
}

/* ============================================================ */
/* REAL-TIME ALERT BANNER & ADMIN ALERTS DASHBOARD              */
/* ============================================================ */

/* 1. Client-Side Workspace Banner */
.app-alert-banner {
  width: 100%;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 600;
  z-index: 100;
  animation: slideDownAlert 0.25s ease-out;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

@keyframes slideDownAlert {
  from { transform: translateY(-100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.alert-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert-icon {
  font-size: 1.1rem;
}

.alert-close-btn {
  background: transparent;
  border: none;
  color: inherit;
  font-size: 1.3rem;
  cursor: pointer;
  opacity: 0.8;
  line-height: 1;
}
.alert-close-btn:hover { opacity: 1; }

/* Alert Color Themes */
.banner-info {
  background: rgba(14, 165, 233, 0.16);
  border-bottom: 1px solid #0284c7;
  color: #38bdf8;
}
.banner-warning {
  background: rgba(245, 158, 11, 0.18);
  border-bottom: 1px solid #d97706;
  color: #fde047;
}
.banner-update {
  background: rgba(99, 102, 241, 0.18);
  border-bottom: 1px solid #6366f1;
  color: #a5b4fc;
}
.banner-critical {
  background: rgba(239, 68, 68, 0.2);
  border-bottom: 1px solid #dc2626;
  color: #fca5a5;
}

/* 2. Admin Alerts Form & Card */
.alert-creator-box {
  background: #0d111a;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 20px;
}

.alert-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

.alert-form-grid .full-span {
  grid-column: span 2;
}

/* Multi-line Alert Message Text Box with Vertical Resize */
#alertMessageInput {
  width: 100%;
  height: 75px;      
  min-height: 55px;  
  max-height: 220px; 
  resize: vertical;  
  background: #06090e;
  border: 1px solid #2e384d;
  border-radius: 7px;
  padding: 8px 12px;
  color: #f1f5f9;
  font-size: 0.85rem;
  font-family: inherit;
  line-height: 1.5;
  outline: none;
  transition: border-color 0.15s ease;
}

#alertMessageInput:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

/* Ensure line breaks display properly on the user banner */
.alert-msg {
  white-space: pre-wrap;
  word-break: break-word;
}

/* ============================================================ */
/* UNIVERSAL SYSTEM MODAL (Alert / Confirm / Prompt)            */
/* ============================================================ */
.universal-modal-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(5, 7, 12, 0.85);
  backdrop-filter: blur(6px);
  z-index: 99999; /* Higher than all other panels */
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.15s ease-out;
}

.universal-modal-card {
  width: 440px;
  max-width: 90vw;
  background: #141824;
  border: 1px solid #38bdf8;
  border-radius: 14px;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.95), 0 0 20px rgba(56, 189, 248, 0.2);
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  animation: uModalPop 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes uModalPop {
  from { opacity: 0; transform: scale(0.94); }
  to { opacity: 1; transform: scale(1); }
}

.universal-modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.u-modal-icon {
  font-size: 1.5rem;
}

.universal-modal-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #f1f5f9;
  margin: 0;
}

.universal-modal-body p {
  font-size: 0.88rem;
  color: #cbd5e1;
  line-height: 1.5;
  margin: 0;
}

.universal-modal-input {
  width: 100%;
  background: #0b0e14;
  border: 1px solid #2e384d;
  border-radius: 7px;
  padding: 9px 12px;
  color: #f1f5f9;
  font-size: 0.86rem;
  outline: none;
}
.universal-modal-input:focus {
  border-color: #38bdf8;
}

.universal-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}