/* ========================================================
   COMPONENTS.CSS - Clean & Modern QR Code Generator UI
   ======================================================== */

/* Panels */
.glass-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  position: relative;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

/* Tab Selector for QR Types */
.qr-type-nav {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.75rem;
  margin-bottom: 1.5rem;
  scrollbar-width: thin;
}

.type-tab-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-md);
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.type-tab-btn svg {
  width: 17px;
  height: 17px;
  transition: transform var(--transition-fast);
}

.type-tab-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--border-medium);
}

.type-tab-btn.active {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

.type-tab-btn.active svg {
  color: var(--primary);
}

/* Input Fields & Forms */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.form-control {
  width: 100%;
  padding: 0.8rem 1rem;
  border-radius: var(--radius-md);
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.92rem;
  outline: none;
  transition: all var(--transition-fast);
}

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

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

textarea.form-control {
  min-height: 95px;
  resize: vertical;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 640px) {
  .form-grid-2 {
    grid-template-columns: 1fr;
  }
}

/* Media Upload Box (Foto / Video) */
.media-upload-box {
  border: 2px dashed var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  text-align: center;
  background: var(--bg-input);
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
}

.media-upload-box:hover,
.media-upload-box.dragover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.upload-icon-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.75rem auto;
}

.upload-icon-circle svg {
  width: 24px;
  height: 24px;
}

.upload-title {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.2rem;
}

.upload-subtitle {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.media-preview-container {
  display: none;
  margin-top: 1rem;
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  max-height: 220px;
  border: 1px solid var(--border-medium);
}

.media-preview-container img,
.media-preview-container video {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.media-remove-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ff6b6b;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-fast);
}

.media-remove-btn:hover {
  transform: scale(1.1);
  background: #ff4757;
  color: white;
}

.info-note {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  background: var(--primary-light);
  border: 1px solid rgba(79, 70, 229, 0.2);
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 1rem;
}

.info-note svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--primary);
  margin-top: 2px;
}

/* Accordion Section for Customization */
.customizer-accordion {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.accordion-item {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  overflow: hidden;
  transition: border-color var(--transition-fast);
}

.accordion-item:hover {
  border-color: var(--border-medium);
}

.accordion-header {
  width: 100%;
  padding: 1.1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-left-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-left-icon svg {
  width: 17px;
  height: 17px;
}

.accordion-chevron {
  transition: transform var(--transition-normal);
  color: var(--text-muted);
}

.accordion-item.open .accordion-chevron {
  transform: rotate(180deg);
  color: var(--primary);
}

.accordion-content {
  display: none;
  padding: 0 1.25rem 1.25rem 1.25rem;
  border-top: 1px solid var(--border-subtle);
}

.accordion-item.open .accordion-content {
  display: block;
}

/* Preset Templates Grid */
.templates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.template-card {
  padding: 0.75rem 0.5rem;
  border-radius: var(--radius-md);
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  text-align: center;
  transition: all var(--transition-fast);
}

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

.template-card.active {
  border-color: var(--primary);
  background: var(--primary-light);
}

.template-preview-dot {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  margin: 0 auto 0.4rem auto;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.template-name {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
}

/* Style Selectors (Dots & Corners) */
.style-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(82px, 1fr));
  gap: 0.6rem;
  margin-top: 0.5rem;
}

.style-option-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 0.5rem;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.style-option-btn svg {
  width: 22px;
  height: 22px;
  margin-bottom: 0.35rem;
}

.style-option-btn:hover {
  border-color: var(--border-medium);
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.style-option-btn.active {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
}

/* Color Pickers & Palette Swatches */
.color-picker-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--bg-input);
  padding: 0.65rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  margin-bottom: 0.85rem;
  transition: all var(--transition-fast);
}

.color-input-wrapper {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--border-medium);
  flex-shrink: 0;
  cursor: pointer;
}

.color-input-wrapper input[type="color"] {
  position: absolute;
  top: -10px;
  left: -10px;
  width: 60px;
  height: 60px;
  cursor: pointer;
  border: none;
  background: none;
}

.color-info {
  flex-grow: 1;
}

.color-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.color-value {
  font-family: monospace;
  font-size: 0.85rem;
  color: var(--text-primary);
  text-transform: uppercase;
}

.swatch-palette {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

.swatch-item {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid var(--border-medium);
  cursor: pointer;
  transition: transform var(--transition-fast);
}

.swatch-item:hover {
  transform: scale(1.15);
  border-color: var(--primary);
}

/* Logo Presets & Upload */
.logo-presets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(52px, 1fr));
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}

.logo-preset-btn {
  width: 100%;
  aspect-ratio: 1/1;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 10px;
  transition: all var(--transition-fast);
}

.logo-preset-btn img,
.logo-preset-btn svg {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.logo-preset-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-medium);
  transform: translateY(-2px);
}

.logo-preset-btn.active {
  border-color: var(--primary);
  background: var(--primary-light);
}

.btn-upload-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  background: var(--bg-input);
  border: 1px dashed var(--border-medium);
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-upload-logo:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

/* ========================================================
   CRISP & VISIBLE RANGE SLIDERS (TRACK & THUMB)
   ======================================================== */
.range-slider-group {
  margin-top: 1.15rem;
}

.range-slider-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.range-slider {
  width: 100%;
  height: 8px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--slider-track-bg);
  border: 1px solid var(--slider-track-border);
  border-radius: var(--radius-full);
  outline: none;
  cursor: pointer;
  margin: 8px 0;
  display: block;
}

/* Webkit Track & Thumb */
.range-slider::-webkit-slider-runnable-track {
  width: 100%;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--slider-track-bg);
  border: 1px solid var(--slider-track-border);
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  margin-top: -7px;
  transition: transform var(--transition-fast), background-color var(--transition-fast);
}

/* Firefox Track & Thumb */
.range-slider::-moz-range-track {
  width: 100%;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--slider-track-bg);
  border: 1px solid var(--slider-track-border);
}

.range-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  transition: transform var(--transition-fast), background-color var(--transition-fast);
}

.range-slider:hover::-webkit-slider-thumb,
.range-slider:hover::-moz-range-thumb {
  transform: scale(1.15);
  background: var(--primary-hover);
}

/* Switch & Checkbox */
.custom-checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
  cursor: pointer;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.custom-checkbox-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
}

/* ========================================================
   RIGHT PREVIEW PANEL (STICKY LIVE PREVIEW)
   ======================================================== */
.preview-sticky-wrapper {
  position: sticky;
  top: 1.5rem;
}

.preview-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 1.75rem 1.5rem;
  box-shadow: var(--shadow-md);
  text-align: center;
  position: relative;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

.preview-badge-status {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: var(--accent-emerald);
  font-weight: 600;
  background: rgba(16, 185, 129, 0.1);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--accent-emerald);
  border-radius: 50%;
  animation: pulseAnimation 2s infinite;
}

@keyframes pulseAnimation {
  0% {
    transform: scale(0.9);
    opacity: 0.7;
  }

  50% {
    transform: scale(1.2);
    opacity: 1;
  }

  100% {
    transform: scale(0.9);
    opacity: 0.7;
  }
}

/* Frame Outer Container for QR */
.qr-frame-outer {
  margin: 1.25rem auto 1.5rem auto;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  border-radius: var(--radius-xl);
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  max-width: 100%;
  position: relative;
}

.qr-frame-banner-top,
.qr-frame-banner-bottom {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.05em;
  color: #0f172a;
  padding: 0.45rem 1.25rem;
  border-radius: var(--radius-sm);
  display: none;
  align-items: center;
  gap: 0.4rem;
}

.qr-frame-banner-top {
  margin-bottom: 0.75rem;
}

.qr-frame-banner-bottom {
  margin-top: 0.75rem;
}

/* Frame Styles */
.qr-frame-outer.frame-bottom .qr-frame-banner-bottom {
  display: flex;
}

.qr-frame-outer.frame-top .qr-frame-banner-top {
  display: flex;
}

.qr-frame-outer.frame-box {
  border: 4px solid var(--primary);
}

.qr-frame-outer.frame-badge {
  background: #0f172a;
  padding: 1.5rem;
}

.qr-frame-outer.frame-badge .qr-frame-banner-bottom {
  display: flex;
  background: var(--primary);
  color: white;
  margin-top: 1rem;
  width: 100%;
  justify-content: center;
  border-radius: var(--radius-md);
  padding: 0.6rem 1rem;
}

/* Canvas Container */
#qr-canvas-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 320px;
  min-height: 220px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: transparent;
  margin: 0 auto;
}

#qr-canvas-container canvas,
#qr-canvas-container svg {
  display: block;
  max-width: 100%;
  width: 100%;
  height: auto;
  aspect-ratio: 1/1;
  object-fit: contain;
}

/* Project Save Button (Clean Hero Action) */
.btn-save-project {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-md);
  background: var(--primary);
  border: none;
  color: white;
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 700;
  cursor: pointer;
  margin-bottom: 1rem;
  transition: all var(--transition-fast);
}

.btn-save-project:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-save-project svg {
  width: 19px;
  height: 19px;
}

/* Download Action Buttons */
.download-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-bottom: 0.65rem;
}

.btn-download-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-md);
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-download-action:hover {
  background: var(--bg-card-hover);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}

.btn-download-action svg {
  width: 16px;
  height: 16px;
  color: var(--primary);
}

.btn-copy-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.7rem 1rem;
  border-radius: var(--radius-md);
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-copy-action:hover {
  border-color: var(--border-medium);
  color: var(--text-primary);
  background: var(--bg-input);
}

/* Resolution Selector */
.resolution-select-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.resolution-select {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  outline: none;
}

/* ========================================================
   MODALS & DRAWERS
   ======================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.modal-overlay.active {
  display: flex;
  opacity: 1;
}

.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 620px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

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

.modal-header-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  flex: 1;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text-primary);
}

.btn-close-modal {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.35rem;
  border-radius: var(--radius-sm);
  font-size: 1.1rem;
  transition: color var(--transition-fast);
}

.btn-close-modal:hover {
  color: var(--text-primary);
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
}

/* Projects List in Modal */
.projects-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.project-item-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.15rem;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  transition: all var(--transition-fast);
}

.project-item-card:hover {
  border-color: var(--border-medium);
  background: var(--bg-card-hover);
  transform: translateY(-1px);
}

.project-info-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.project-thumb {
  width: 48px;
  height: 48px;
  background: white;
  border-radius: var(--radius-sm);
  padding: 3px;
  object-fit: contain;
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.project-thumb:hover {
  transform: scale(1.08);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.project-details h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.15rem;
  color: var(--text-primary);
}

.project-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.project-type-badge {
  text-transform: uppercase;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  background: var(--primary-light);
  color: var(--primary);
}

.project-actions-right {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.btn-action-sm {
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all var(--transition-fast);
}

.btn-icon-only {
  width: 36px;
  height: 36px;
  padding: 0 !important;
  justify-content: center !important;
  align-items: center !important;
  display: inline-flex !important;
  border-radius: var(--radius-md);
  flex-shrink: 0;
  line-height: 1;
}

.btn-icon-only svg {
  width: 17px;
  height: 17px;
  display: block;
}

.btn-preview-qr {
  color: var(--primary);
  border-color: rgba(99, 102, 241, 0.3);
  background: rgba(99, 102, 241, 0.08);
}

.btn-preview-qr:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}

.btn-download-qr {
  color: var(--accent-emerald);
  border-color: rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.08);
}

.btn-download-qr:hover {
  background: rgba(16, 185, 129, 0.2);
  border-color: var(--accent-emerald);
  color: var(--accent-emerald);
  transform: translateY(-1px);
}

.project-actions-right .btn-analytics {
  color: #ffffff !important;
  background: var(--primary) !important;
  border: 1px solid var(--primary) !important;
}

.project-actions-right .btn-analytics:hover {
  background: var(--primary-hover) !important;
  border-color: var(--primary-hover) !important;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
  transform: translateY(-1px);
}

.project-actions-right .btn-edit {
  color: var(--text-primary);
  border-color: var(--border-medium);
  background: var(--bg-card);
}

.project-actions-right .btn-edit:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}

.project-actions-right .btn-delete-sm {
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.25);
  background: rgba(239, 68, 68, 0.08);
}

.project-actions-right .btn-delete-sm:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  transform: translateY(-1px);
}

/* Lightbox QR Preview Modal */
.qr-lightbox-card {
  max-width: 380px !important;
  width: 100%;
  border-radius: var(--radius-xl);
}

.qr-lightbox-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem 1.25rem;
}

.qr-lightbox-frame {
  background: #ffffff;
  padding: 1.25rem;
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 250px;
  height: 250px;
  margin-bottom: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.qr-lightbox-frame img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.qr-lightbox-actions-group {
  display: flex;
  gap: 0.6rem;
  width: 100%;
}

.qr-lightbox-actions-group .btn-nav {
  padding: 0.65rem 0.85rem;
  font-size: 0.85rem;
}

/* ========================================================
   MODAL: UNDUH QR CODE (SIMPEL: FORMAT, RESOLUSI, UKURAN)
   ======================================================== */
.download-simple-card {
  max-width: 380px !important;
  width: 100%;
  border-radius: var(--radius-xl);
}

.segmented-control {
  display: flex;
  background: var(--bg-input);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 3px;
  gap: 3px;
}

.segmented-control .seg-btn {
  flex: 1;
  padding: 0.5rem 0.5rem;
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: center;
}

.segmented-control .seg-btn:hover {
  color: var(--text-primary);
}

.segmented-control .seg-btn.active {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35);
}

.segmented-control .seg-btn:disabled,
.segmented-control .seg-btn.disabled {
  opacity: 0.4;
  cursor: not-allowed !important;
  pointer-events: none;
  background: transparent !important;
  color: var(--text-muted) !important;
  box-shadow: none !important;
}

.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--text-muted);
}

.empty-state svg {
  width: 44px;
  height: 44px;
  margin-bottom: 0.75rem;
  color: var(--text-secondary);
  opacity: 0.5;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
}

.toast-message {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  box-shadow: var(--shadow-lg);
  color: var(--text-primary);
  padding: 0.8rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 500;
  max-width: 400px;
}

.toast-message.toast-success {
  border-color: rgba(16, 185, 129, 0.4);
}

.toast-message.toast-error {
  border-color: rgba(239, 68, 68, 0.4);
}

/* ========================================================
   GOOGLE AUTH & USER PROFILE
   ======================================================== */
.btn-google {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.95rem;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-google:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-medium);
  transform: translateY(-1px);
}

.btn-google svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

.user-profile-box {
  display: none;
  align-items: center;
  gap: 0.6rem;
  padding: 0.3rem 0.65rem 0.3rem 0.35rem;
  border-radius: var(--radius-full);
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
}

.user-avatar-img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border-medium);
}

.user-name-text {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-logout {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px 4px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  transition: color var(--transition-fast);
}

.btn-logout:hover {
  color: #ef4444;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  white-space: nowrap;
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-guest {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.status-cloud {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: var(--accent-emerald);
}

.cloud-dot {
  width: 6px;
  height: 6px;
  background: var(--accent-emerald);
  border-radius: 50%;
}

/* ========================================================
   SCAN ANALYTICS SUMMARY
   ======================================================== */
.analytics-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.stat-metric-card {
  padding: 0.85rem 1rem;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  text-align: center;
}

.stat-metric-val {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.2;
}

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

.project-scan-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
}

.btn-sync-cloud {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-md);
  background: var(--bg-input);
  border: 1px dashed var(--border-medium);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 1rem;
  transition: all var(--transition-fast);
}

.btn-sync-cloud:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.setup-instruction-box {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.5;
}

.setup-instruction-box ol {
  padding-left: 1.25rem;
  margin-top: 0.5rem;
}

.setup-instruction-box li {
  margin-bottom: 0.4rem;
}

/* ========================================================
   DYNAMIC QR & FEATURE CARDS
   ======================================================== */
.dynamic-feature-card {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  transition: all var(--transition-fast);
}

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

.dynamic-feature-header {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}

.dynamic-feature-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.badge-feature-recom {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid var(--border-focus);
}

.dynamic-feature-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ========================================================
   AUTH PROMPT POPUP MODAL
   ======================================================== */
.auth-prompt-card {
  max-width: 480px;
}

.auth-prompt-icon-wrapper {
  width: 64px;
  height: 64px;
  margin: 0 auto;
  border-radius: 50%;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-focus);
}

.btn-google-modal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

.btn-google-modal:hover {
  background: var(--bg-card-hover);
  border-color: var(--primary);
  transform: translateY(-1px);
}

.btn-demo-modal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  background: var(--primary-light);
  border: 1px solid var(--border-focus);
  color: var(--primary);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-demo-modal:hover {
  background: var(--primary);
  color: white;
}

.btn-cancel-modal {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 0.5rem;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.btn-cancel-modal:hover {
  color: var(--text-primary);
}

/* ========================================================
   PROJECTS FILTER & SEARCH
   ======================================================== */
.projects-filter-bar {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  align-items: center;
}

.search-input-wrapper {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}

.search-input-wrapper svg {
  position: absolute;
  left: 0.75rem;
  color: var(--text-muted);
  pointer-events: none;
}

.search-input-wrapper input {
  width: 100%;
  padding: 0.65rem 0.75rem 0.65rem 2.25rem;
  border-radius: var(--radius-md);
  background: var(--bg-input);
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  font-size: 0.85rem;
  outline: none;
  transition: all var(--transition-fast);
}

.search-input-wrapper input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-light);
}

.sort-select {
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-md);
  background: var(--bg-input);
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 500;
  outline: none;
  cursor: pointer;
}

/* ========================================================
   DETAILED SCAN ANALYTICS MODAL
   ======================================================== */
.analytics-modal-card {
  max-width: 720px;
}

.analytics-url-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  background: var(--bg-input);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
}

.analytics-url-text {
  font-family: monospace;
  font-size: 0.85rem;
  color: var(--primary);
  word-break: break-all;
  margin-top: 0.15rem;
}

.analytics-section-card {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.15rem;
}

.analytics-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.analytics-section-header h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

.device-breakdown-bars {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.device-bar-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.device-label-col {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.device-bar-track {
  width: 100%;
  height: 9px;
  background: var(--bg-card);
  border-radius: var(--radius-full);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.device-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.fill-mobile {
  background: linear-gradient(90deg, #6366f1, #818cf8);
}

.fill-desktop {
  background: linear-gradient(90deg, #10b981, #34d399);
}

.fill-tablet {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

/* Recent Scans Table/List */
.scan-logs-container {
  max-height: 240px;
  overflow-y: auto;
  border-radius: var(--radius-md);
}

.scan-log-row {
  display: grid;
  grid-template-columns: 1.8fr 1.2fr 1.2fr auto;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.85rem;
  font-size: 0.82rem;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-card);
  transition: background var(--transition-fast);
}

.scan-log-row:last-child {
  border-bottom: none;
}

.scan-log-row:hover {
  background: var(--bg-card-hover);
}

.badge-scan-device {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
}

.badge-scan-success {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.1);
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
}

.btn-simulate-scan {
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid var(--border-focus);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-simulate-scan:hover {
  background: var(--primary);
  color: white;
}

.btn-danger-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.9rem;
  border-radius: var(--radius-md);
  background: transparent;
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #ef4444;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-danger-outline:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: #ef4444;
}

.btn-action-primary {
  background: var(--primary) !important;
  color: white !important;
  border: none !important;
}

/* ========================================================
   MOBILE RESPONSIVE RULES FOR MODALS & PROJECT LIST
   Eliminates horizontal overflow and scales down UI cleanly
   ======================================================== */
@media (max-width: 860px) {
  .modal-overlay {
    padding: 0.65rem 0.5rem;
    align-items: center;
  }

  .modal-card {
    max-height: 90vh;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 100%;
  }

  .modal-header {
    padding: 0.85rem 1rem;
    gap: 0.5rem;
  }

  .modal-header-info {
    flex-wrap: wrap;
    gap: 0.35rem;
  }

  .modal-title {
    font-size: 0.98rem;
    gap: 0.45rem;
  }

  .modal-title svg {
    width: 18px;
    height: 18px;
  }

  .status-badge {
    max-width: 120px;
    font-size: 0.65rem;
    padding: 0.15rem 0.45rem;
  }

  .modal-body {
    padding: 0.85rem;
    overflow-x: hidden;
  }

  /* 2x2 Balanced KPI Grid */
  .analytics-stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.5rem;
    margin-bottom: 0.85rem;
  }

  .stat-metric-card {
    padding: 0.6rem 0.5rem;
    border-radius: var(--radius-md);
  }

  .stat-metric-val {
    font-size: 1.15rem;
  }

  .stat-metric-label {
    font-size: 0.68rem;
  }

  /* Filter bar: Stack search & sort */
  .projects-filter-bar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.45rem !important;
    margin-bottom: 0.85rem !important;
  }

  .search-input-wrapper {
    width: 100% !important;
  }

  .search-input-wrapper input {
    width: 100% !important;
    padding: 0.55rem 0.65rem 0.55rem 2rem;
    font-size: 0.82rem;
    height: 38px;
  }

  .sort-select {
    width: 100% !important;
    padding: 0.55rem 0.65rem;
    font-size: 0.82rem;
    height: 38px;
  }

  /* Project Item Card: 2-Row Stacked Layout (100% Mobile Responsive) */
  .project-item-card {
    flex-direction: column !important;
    align-items: stretch !important;
    padding: 0.75rem 0.85rem !important;
    gap: 0.65rem !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

  .project-info-left {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.65rem !important;
    min-width: 0 !important;
    flex: 1 !important;
  }

  .project-thumb {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
  }

  .project-details {
    min-width: 0 !important;
    flex: 1 !important;
    overflow: hidden;
  }

  .project-details h4 {
    font-size: 0.88rem;
    word-break: break-word;
    margin-bottom: 0.2rem;
  }

  .project-scan-pill {
    font-size: 0.68rem;
    padding: 0.12rem 0.4rem;
  }

  .project-meta {
    font-size: 0.7rem;
    flex-wrap: wrap;
    gap: 0.35rem;
  }

  .project-type-badge {
    font-size: 0.65rem;
    padding: 0.1rem 0.4rem;
  }

  .project-actions-right {
    width: 100% !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 0.35rem !important;
    border-top: 1px solid var(--border-subtle) !important;
    padding-top: 0.6rem !important;
    box-sizing: border-box !important;
  }

  .project-actions-right .btn-action-sm {
    flex: 1 !important;
    height: 38px !important;
    width: auto !important;
    min-width: 0 !important;
    padding: 0 !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 0.9rem !important;
    white-space: nowrap !important;
    text-align: center !important;
  }

  .project-actions-right .btn-delete-sm {
    flex: 1 !important;
    height: 38px !important;
    width: auto !important;
    min-width: 0 !important;
    padding: 0 !important;
    justify-content: center !important;
    align-items: center !important;
  }

  /* Detailed Analytics modal adjustments */
  .analytics-url-box {
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
    padding: 0.65rem 0.75rem;
  }

  .analytics-url-box>div:last-child {
    display: flex;
    width: 100%;
    gap: 0.4rem;
  }

  .analytics-url-box>div:last-child .btn-action-sm {
    flex: 1;
    justify-content: center;
    padding: 0.5rem;
  }

  .analytics-section-card {
    padding: 0.85rem;
  }

  .analytics-section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .analytics-section-header .btn-simulate-scan {
    width: 100%;
    justify-content: center;
    padding: 0.5rem;
  }

  .scan-log-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.35rem;
    padding: 0.55rem 0.65rem;
    font-size: 0.75rem;
  }
}


@media (max-width: 380px) {
  .status-badge {
    max-width: 85px;
  }

  .project-actions-right {
    gap: 0.25rem !important;
  }

  .project-actions-right .btn-action-sm {
    height: 36px !important;
    padding: 0 !important;
  }
}

/* ========================================================
   GLOBAL SCREEN LOADING OVERLAY (CENTERED LOGO + DOTS)
   ======================================================== */
.global-loading-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.28s ease;
}

.global-loading-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Simple Cancel Button in Top Right Corner */
.btn-cancel-loading {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all var(--transition-fast);
  outline: none;
}

.btn-cancel-loading:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.35);
  transform: scale(1.08);
}

.btn-cancel-loading:active {
  transform: scale(0.94);
}

@media (max-width: 640px) {
  .btn-cancel-loading {
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
  }
}

.global-loading-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  transform: scale(0.9);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.global-loading-overlay.active .global-loading-box {
  transform: scale(1);
}

.global-loading-logo {
  width: 68px;
  height: 68px;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 12px 30px -4px rgba(99, 102, 241, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.35);
  animation: logoPulseGlow 2.2s ease-in-out infinite alternate;
}

.global-loading-logo svg {
  width: 36px;
  height: 36px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
}

@keyframes logoPulseGlow {
  0% {
    transform: translateY(0) scale(1);
    box-shadow: 0 10px 25px -4px rgba(99, 102, 241, 0.45), inset 0 1px 1px rgba(255, 255, 255, 0.35);
  }

  100% {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 20px 38px -4px rgba(99, 102, 241, 0.7), inset 0 1px 1px rgba(255, 255, 255, 0.5);
  }
}

.global-loading-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 1.25rem;
}

.global-loading-dots span {
  width: 9px;
  height: 9px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.5);
  animation: dotBounce 1.4s infinite ease-in-out both;
}

.global-loading-dots span:nth-child(1) {
  animation-delay: -0.32s;
}

.global-loading-dots span:nth-child(2) {
  animation-delay: -0.16s;
}

.global-loading-dots span:nth-child(3) {
  animation-delay: 0s;
}

@keyframes dotBounce {

  0%,
  80%,
  100% {
    transform: scale(0.35);
    opacity: 0.35;
  }

  40% {
    transform: scale(1.15) translateY(-4px);
    opacity: 1;
    background: #a5b4fc;
  }
}

.global-loading-text {
  margin-top: 0.85rem;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.88);
  letter-spacing: 0.02em;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

@media (prefers-reduced-motion: reduce) {

  .global-loading-logo,
  .global-loading-dots span {
    animation: none;
  }

  .global-loading-dots span {
    opacity: 0.7;
    transform: scale(1);
  }
}