/* Hotspot Studio PRO - World-Class Design System */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@500;700&display=swap');

:root {
  --primary: #3b82f6;
  --primary-dark: #1d4ed8;
  --primary-glow: rgba(59, 130, 246, 0.4);
  --cyan: #06b6d4;
  --emerald: #10b981;
  --amber: #f59e0b;
  --rose: #f43f5e;
  --bg-main: #060913;
  --bg-surface: #0b1120;
  --bg-card: rgba(15, 23, 42, 0.85);
  --bg-input: #040711;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --radius-xl: 20px;
  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 6px;
  --accent: #2dd4bf;
  --accent-dark: #0d9488;
  --accent-gradient: linear-gradient(135deg, #0d9488 0%, #14b8a6 50%, #06b6d4 100%);
  --accent-glow: rgba(45, 212, 191, 0.4);
  --font-family: 'Cairo', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-family);
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-main);
  background-image: 
    radial-gradient(ellipse 90% 50% at 50% -15%, rgba(37, 99, 235, 0.18), transparent 70%),
    radial-gradient(circle at 100% 100%, rgba(6, 182, 212, 0.08), transparent 50%),
    radial-gradient(circle at 0% 100%, rgba(16, 185, 129, 0.06), transparent 50%);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  direction: rtl;
  overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: rgba(11, 17, 32, 0.7); }
::-webkit-scrollbar-thumb { background: #334155; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #475569; }

/* Top Navigation Bar */
.navbar {
  height: 68px;
  background: rgba(11, 17, 32, 0.85);
  border-bottom: 1px solid var(--border-subtle);
  backdrop-filter: blur(20px);
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-icon-box {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #2563eb 0%, #06b6d4 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 0 20px rgba(37, 99, 235, 0.45);
  flex-shrink: 0;
}

.brand-info h1 {
  font-size: 17px;
  font-weight: 900;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.3px;
}

.badge-pro {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #000;
  font-size: 10px;
  font-weight: 900;
  padding: 2px 7px;
  border-radius: 6px;
  text-transform: uppercase;
}

.brand-info p {
  font-size: 11px;
  color: var(--text-muted);
}

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

.stat-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  color: #38bdf8;
}

.pulse-circle {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 10px #38bdf8;
  animation: pulse-dot 1.5s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.3; transform: scale(0.85); }
}

.btn-nav-admin {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: #f1f5f9;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-nav-admin:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-strong);
  color: #fff;
}

.btn-nav-download {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 4px 18px var(--primary-glow);
  transition: all 0.2s ease;
}

.btn-nav-download:hover {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(59, 130, 246, 0.5);
}

/* Mobile Screen View Switcher (Edit vs Preview) */
.mobile-view-tabs {
  display: none;
  background: rgba(11, 17, 32, 0.95);
  border-bottom: 1px solid var(--border-subtle);
  padding: 6px 12px;
  gap: 8px;
}

.mobile-tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.mobile-tab-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* Main Studio Layout */
.studio-layout {
  display: flex;
  flex: 1;
  height: calc(100vh - 68px);
  overflow: hidden;
}

/* Sidebar / Editor Column */
.editor-sidebar {
  width: 480px;
  flex-shrink: 0;
  background: rgba(11, 17, 32, 0.98);
  border-left: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.editor-header-bar {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(4, 7, 17, 0.5);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.editor-header-bar h2 {
  font-size: 14px;
  font-weight: 900;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-reset-ghost {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-reset-ghost:hover {
  color: #f87171;
}

.editor-scroll-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Accordion Section Cards */
.accordion-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.accordion-card.open {
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.accordion-trigger {
  width: 100%;
  background: transparent;
  border: none;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  color: #fff;
  text-align: right;
  transition: background 0.2s;
}

.accordion-trigger:hover {
  background: rgba(255, 255, 255, 0.03);
}

.accordion-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.accordion-icon {
  font-size: 18px;
  line-height: 1;
}

.accordion-title {
  font-size: 13px;
  font-weight: 900;
  color: #f8fafc;
}

.accordion-arrow {
  color: var(--text-muted);
  transition: transform 0.3s ease;
  font-size: 12px;
}

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

.accordion-content {
  display: none;
  padding: 4px 18px 18px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.accordion-card.open .accordion-content {
  display: block;
  animation: fadeIn 0.25s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Form Groups & Controls */
.form-group {
  margin-top: 14px;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 800;
  color: #cbd5e1;
  margin-bottom: 6px;
}

.form-hint {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.4;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1.5px solid #1e293b;
  color: #ffffff;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 12px;
  outline: none;
  transition: all 0.2s;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* Presets Grid */
.presets-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 8px;
  margin-bottom: 14px;
}

.preset-chip {
  background: rgba(4, 7, 17, 0.7);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.2s;
}

.preset-chip:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
}

.preset-chip.active {
  border-color: var(--primary);
  background: rgba(37, 99, 235, 0.15);
  box-shadow: 0 0 14px var(--primary-glow);
}

.preset-name {
  font-size: 11px;
  font-weight: 800;
  color: #fff;
}

.preset-dots {
  display: flex;
  gap: 4px;
}

.preset-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

/* Color Pickers Matrix */
.color-picker-matrix {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 8px;
}

.color-card {
  background: rgba(4, 7, 17, 0.5);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.color-card span {
  font-size: 11px;
  font-weight: 700;
  color: #cbd5e1;
}

.color-input-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.color-input-wrap input[type="color"] {
  -webkit-appearance: none;
  border: none;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  cursor: pointer;
  background: transparent;
}

.color-input-wrap input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.color-input-wrap input[type="color"]::-webkit-color-swatch {
  border: 1.5px solid rgba(255,255,255,0.3);
  border-radius: 6px;
}

.color-hex {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--text-muted);
}

/* Toggle Switch Card */
.switch-card {
  background: rgba(4, 7, 17, 0.5);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}

.switch-label-group h4 {
  font-size: 12px;
  font-weight: 800;
  color: #f1f5f9;
}

.switch-label-group p {
  font-size: 10px;
  color: var(--text-muted);
}

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

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

.switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #334155;
  transition: .25s;
  border-radius: 22px;
}

.switch-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .25s;
  border-radius: 50%;
}

input:checked + .switch-slider { background-color: var(--primary); }
input:checked + .switch-slider:before { transform: translateX(18px); }

/* Package / Item Card inside editor */
.list-item-card {
  background: rgba(4, 7, 17, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.list-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.list-item-header h5 {
  font-size: 11px;
  font-weight: 800;
  color: #38bdf8;
}

.btn-item-delete {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

.btn-item-delete:hover {
  background: #ef4444;
  color: #fff;
}

/* Stage / Live Preview Column */
.stage-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #020617;
  overflow: hidden;
}

.stage-toolbar {
  height: 54px;
  background: rgba(11, 17, 32, 0.85);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}

.stage-pills-wrap {
  display: flex;
  align-items: center;
  background: rgba(4, 7, 17, 0.7);
  border: 1px solid var(--border-subtle);
  padding: 3px;
  border-radius: var(--radius-md);
  gap: 2px;
}

.stage-pill-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 800;
  padding: 6px 12px;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.stage-pill-btn.active {
  background: var(--primary);
  color: #fff;
}

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

.device-toggle-group {
  display: flex;
  align-items: center;
  background: rgba(4, 7, 17, 0.7);
  border: 1px solid var(--border-subtle);
  padding: 3px;
  border-radius: var(--radius-md);
  gap: 2px;
}

.device-toggle-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 5px 9px;
  border-radius: 7px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  transition: all 0.2s;
}

.device-toggle-btn.active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.btn-fullscreen {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: #cbd5e1;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
}

.btn-fullscreen:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* Stage Frame Viewport */
.stage-viewport {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 22px;
  padding: 16px 20px 24px 20px;
  overflow: auto;
  background: radial-gradient(circle at center, #0f172a 0%, #020617 100%);
  position: relative;
}

.phone-mockup {
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.1);
  overflow: hidden;
  background: #000;
  position: relative;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

/* Mobile Frame */
.phone-mockup.mode-mobile {
  width: 390px;
  height: 760px;
  max-height: 96%;
  border: 11px solid #1e293b;
  border-radius: 42px;
}

/* Desktop Frame */
.phone-mockup.mode-desktop {
  flex: 1;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  min-width: 0;
}

.phone-notch {
  width: 110px;
  height: 20px;
  background: #1e293b;
  border-bottom-left-radius: 14px;
  border-bottom-right-radius: 14px;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: none;
}

.phone-mockup.mode-mobile .phone-notch {
  display: block;
}

.preview-iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: transparent;
}

/* ========================================================
   COUNTDOWN & ADVERTISING INTERSTITIAL MODAL
   ======================================================== */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(3, 7, 18, 0.88);
  backdrop-filter: blur(16px);
  z-index: 9999 !important;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.active {
  display: flex !important;
  animation: modalFadeIn 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.ad-gateway-card {
  background: #0b1329;
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 520px;
  padding: 26px;
  box-shadow: 0 30px 70px -15px rgba(0, 0, 0, 0.95), 0 0 35px rgba(59, 130, 246, 0.15);
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
}

.gateway-header {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.gateway-header h3 {
  font-size: 18px;
  font-weight: 900;
  color: #fff;
}

.gateway-header p {
  font-size: 12px;
  color: var(--text-muted);
}

/* Circular Countdown Timer */
.timer-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 6px 0;
}

.timer-circle-box {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  border: 3px solid rgba(59, 130, 246, 0.2);
  border-top-color: var(--cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: timerSpin 2s linear infinite;
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.25);
}

@keyframes timerSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.timer-number {
  font-size: 24px;
  font-weight: 900;
  color: var(--cyan);
  font-family: 'JetBrains Mono', monospace;
  position: absolute;
}

/* Sponsor Ad Box */
.ad-showcase-box {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
}

.ad-badge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.ad-tag-badge {
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 6px;
}

.ad-media-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.ad-image-banner {
  width: 100%;
  max-height: 160px;
  object-fit: cover;
  display: block;
}

.ad-text-content {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ad-title {
  font-size: 14px;
  font-weight: 900;
  color: #ffffff;
  line-height: 1.4;
}

.ad-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

.ad-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 8px;
  background: rgba(6, 182, 212, 0.15);
  border: 1px solid rgba(6, 182, 212, 0.4);
  color: #22d3ee;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  transition: all 0.2s;
  align-self: flex-start;
}

.ad-action-btn:hover {
  background: #06b6d4;
  color: #000;
}

/* Download Gateway Action Button */
.btn-gateway-download {
  width: 100%;
  padding: 14px;
  border-radius: var(--radius-lg);
  font-size: 14px;
  font-weight: 900;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.25s;
}

.btn-gateway-download.locked {
  background: #1e293b;
  color: #64748b;
  cursor: not-allowed;
}

.btn-gateway-download.unlocked {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
  animation: pulseButton 1.5s infinite;
}

@keyframes pulseButton {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

.modal-close-icon {
  position: absolute;
  top: 14px;
  left: 14px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
}

/* ========================================================
   ADMIN MANAGEMENT PANEL MODAL
   ======================================================== */
.admin-card-modal {
  background: #0c1222;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 35px 80px rgba(0, 0, 0, 0.95);
  position: relative;
}

.admin-modal-header {
  padding: 16px 22px;
  background: rgba(4, 7, 17, 0.6);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-modal-header h3 {
  font-size: 16px;
  font-weight: 900;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-modal-body {
  padding: 20px 22px;
  overflow-y: auto;
  flex: 1;
}

/* Admin PIN Login Form */
.admin-auth-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 30px 20px;
  gap: 16px;
}

.admin-auth-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.15);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
}

.pin-input {
  max-width: 240px;
  text-align: center;
  letter-spacing: 6px;
  font-size: 22px;
  font-weight: 900;
  font-family: 'JetBrains Mono', monospace;
}

/* Admin Navigation Inside Modal */
.admin-tabs-nav {
  display: flex;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 16px;
  gap: 8px;
}

.admin-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 800;
  padding: 8px 16px;
  border-bottom: 2px solid transparent;
  cursor: pointer;
}

.admin-tab-btn.active {
  color: #fff;
  border-bottom-color: var(--primary);
}

/* Toast */
.toast-bar {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #10b981;
  color: #ffffff;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 10px 30px rgba(16, 185, 129, 0.4);
  z-index: 600;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.toast-bar.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Responsive adjustments */
@media (max-width: 960px) {
  .mobile-view-tabs { display: flex; }
  .studio-layout {
    height: calc(100vh - 116px);
    position: relative;
  }
  .editor-sidebar {
    width: 100%;
    height: 100%;
    border-left: none;
    display: flex;
  }
  .stage-column {
    width: 100%;
    height: 100%;
    display: none;
  }
  .studio-layout.show-preview .editor-sidebar { display: none !important; }
  .studio-layout.show-preview .stage-column { display: flex !important; }
  
  .phone-mockup.mode-mobile {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 0;
  }
  .phone-mockup.mode-mobile .phone-notch { display: none; }
  .stat-pill { display: none; }
  .brand-info p { display: none; }
}

/* ========================================================
   STUDIO IN-PAGE ADVERTISING & AUTO-ROTATION STYLES
   ======================================================== */

/* Studio Top Rotating Ad Banner */
.studio-top-ad-banner {
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.18) 0%, rgba(6, 182, 212, 0.18) 100%);
  border-bottom: 1px solid rgba(6, 182, 212, 0.35);
  padding: 8px 24px;
  position: relative;
  z-index: 90;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.top-ad-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.top-ad-badge-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.pulse-dot-cyan {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22d3ee;
  box-shadow: 0 0 10px #22d3ee;
  animation: pulse-dot 1.5s infinite;
}

.top-ad-badge {
  background: rgba(6, 182, 212, 0.22);
  border: 1px solid rgba(6, 182, 212, 0.45);
  color: #22d3ee;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 6px;
  white-space: nowrap;
}

.top-ad-link {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  flex: 1;
  min-width: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.top-ad-link:hover .top-ad-title {
  color: #38bdf8;
}

.top-ad-title {
  font-weight: 900;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.top-ad-sep {
  color: rgba(255, 255, 255, 0.35);
  font-weight: 900;
}

.top-ad-desc {
  color: #cbd5e1;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.top-ad-cta {
  background: rgba(56, 189, 248, 0.15);
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
  color: #38bdf8;
  white-space: nowrap;
  margin-right: auto;
  border: 1px solid rgba(56, 189, 248, 0.35);
  transition: all 0.2s;
}

.top-ad-cta:hover {
  background: #0284c7;
  color: #fff;
}

.top-ad-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.top-ad-counter {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  background: rgba(0, 0, 0, 0.35);
  padding: 2px 7px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.top-ad-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 2px 4px;
  border-radius: 4px;
}

.top-ad-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

/* Sidebar In-Studio Rotating Ad Card */
.sidebar-ad-card {
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.95), rgba(4, 7, 17, 0.9));
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  margin-bottom: 12px;
  transition: all 0.3s ease;
}

.sidebar-ad-card:hover {
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: 0 6px 25px rgba(56, 189, 248, 0.15);
}

.sidebar-ad-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-ad-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 800;
  color: #38bdf8;
}

.sidebar-ad-counter {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
}

.sidebar-ad-link {
  text-decoration: none;
  color: inherit;
  display: block;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.sidebar-ad-img {
  width: 100%;
  max-height: 120px;
  object-fit: cover;
  display: block;
}

.sidebar-ad-content {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-ad-title {
  font-size: 13px;
  font-weight: 900;
  color: #fff;
  line-height: 1.4;
}

.sidebar-ad-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
}

.sidebar-ad-cta {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #38bdf8;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  font-size: 11px;
  font-weight: 800;
  transition: all 0.2s;
  align-self: flex-start;
}

.sidebar-ad-cta:hover {
  background: #0284c7;
  color: #fff;
}

/* Analytics Metrics Grid in Admin Dashboard */
.analytics-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

@media (max-width: 650px) {
  .analytics-metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.analytics-stat-card {
  background: rgba(4, 7, 17, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.stat-card-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
}

.stat-card-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.stat-card-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 17px;
  font-weight: 900;
  color: #fff;
  line-height: 1.2;
}

.stat-card-lbl {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 700;
  white-space: nowrap;
}

/* Smooth Rotation Transition */
.ad-fade-out {
  opacity: 0 !important;
  transform: translateY(-4px);
}

.ad-fade-in {
  opacity: 1 !important;
  transform: translateY(0);
}

/* ========================================================
   STAGE FLANK ADS (RIGHT & LEFT OF PREVIEW MOCKUP)
   ======================================================== */
.stage-flank-ad {
  width: 280px;
  max-width: 310px;
  min-width: 250px;
  align-self: flex-start;
  background: linear-gradient(165deg, rgba(15, 23, 42, 0.98) 0%, rgba(4, 7, 17, 0.96) 100%);
  border: 1.5px solid rgba(56, 189, 248, 0.35);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.75), 0 0 30px rgba(56, 189, 248, 0.12);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10;
}

.stage-flank-ad:hover {
  border-color: rgba(56, 189, 248, 0.65);
  box-shadow: 0 24px 55px rgba(0, 0, 0, 0.85), 0 0 35px rgba(56, 189, 248, 0.25);
  transform: translateY(-3px);
}

.flank-ad-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 16px;
  background: rgba(0, 0, 0, 0.45);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.flank-ad-badge-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.flank-ad-badge {
  font-size: 11px;
  font-weight: 800;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.16);
  border: 1px solid rgba(56, 189, 248, 0.35);
  padding: 3px 8px;
  border-radius: 6px;
}

.flank-ad-counter {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
}

.flank-ad-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  flex: 1;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.flank-ad-img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  display: block;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.flank-ad-content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.flank-ad-title {
  font-size: 15px;
  font-weight: 900;
  color: #ffffff;
  line-height: 1.45;
}

.flank-ad-desc {
  font-size: 12px;
  color: #cbd5e1;
  line-height: 1.55;
}

.flank-ad-btn {
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.2) 0%, rgba(37, 99, 235, 0.2) 100%);
  border: 1px solid rgba(56, 189, 248, 0.45);
  color: #38bdf8;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 800;
  transition: all 0.2s;
  width: 100%;
  box-sizing: border-box;
}

.flank-ad-btn:hover {
  background: #0284c7;
  color: #fff;
  border-color: #0284c7;
  box-shadow: 0 4px 15px rgba(2, 132, 199, 0.4);
}

/* Responsive: On screens smaller than 1200px shrink flank ads; hide gracefully under 1060px */
@media (max-width: 1240px) {
  .stage-flank-ad {
    width: 220px;
    min-width: 200px;
  }
}

@media (max-width: 1060px) {
  .stage-flank-ad {
    display: none !important;
  }
}

/* Ad Image Uploader */
.ad-upload-box {
  border: 2px dashed rgba(45, 212, 191, 0.4);
  background: rgba(15, 23, 42, 0.7);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.ad-upload-box:hover {
  border-color: var(--accent);
  background: rgba(45, 212, 191, 0.08);
  transform: translateY(-1px);
}

.ad-upload-content {
  display: flex;
  align-items: center;
  gap: 14px;
}

.ad-upload-icon-circle {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(45, 212, 191, 0.12);
  border: 1px solid rgba(45, 212, 191, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.ad-upload-details {
  flex: 1;
  min-width: 0;
}

.ad-upload-title {
  font-size: 13px;
  font-weight: 800;
  color: #f1f5f9;
}

.ad-upload-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 3px;
}

.ad-preview-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(2, 6, 23, 0.85);
  border: 1px solid rgba(45, 212, 191, 0.45);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin-top: 10px;
}

.ad-preview-thumb {
  width: 72px;
  height: 46px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
}

.ad-preview-meta {
  flex: 1;
  min-width: 0;
}

.ad-preview-name {
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ad-preview-size {
  font-size: 11px;
  color: var(--accent);
  margin-top: 2px;
  font-weight: 700;
}

/* Dimension & Spec Guidance Box */
.dimension-spec-box {
  background: rgba(45, 212, 191, 0.06);
  border: 1px solid rgba(45, 212, 191, 0.28);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 8px;
}

.dimension-spec-icon {
  font-size: 16px;
  line-height: 1.2;
  flex-shrink: 0;
  margin-top: 1px;
}

.dimension-spec-body {
  font-size: 11px;
  color: #cbd5e1;
  line-height: 1.5;
}

.dimension-spec-body strong {
  color: var(--accent);
  font-weight: 800;
}

.dimension-spec-body span.dim-sub {
  display: block;
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 3px;
}

/* ========================================================
   TOP NAVIGATION TABS (STUDIO / PCC BALANCER / STORE)
   ======================================================== */
.main-tabs-bar {
  background: rgba(15, 23, 42, 0.95);
  border-bottom: 1px solid var(--border-subtle);
  padding: 8px 24px;
  position: sticky;
  top: 57px;
  z-index: 95;
  backdrop-filter: blur(16px);
}

.tabs-container {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  overflow-x: auto;
}

.main-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.main-tab-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border-color: rgba(45, 212, 191, 0.5);
  transform: translateY(-1px);
}

.main-tab-btn.active {
  background: linear-gradient(135deg, #0d9488 0%, #14b8a6 50%, #06b6d4 100%) !important;
  color: #ffffff !important;
  border-color: #2dd4bf !important;
  box-shadow: 0 4px 20px rgba(20, 184, 166, 0.45);
  font-weight: 900;
}

.tab-badge-new {
  background: #ef4444;
  color: #fff;
  font-size: 9px;
  font-weight: 900;
  padding: 2px 6px;
  border-radius: 10px;
  text-transform: uppercase;
}

.tab-badge-free {
  background: #10b981;
  color: #fff;
  font-size: 9px;
  font-weight: 900;
  padding: 2px 6px;
  border-radius: 10px;
}

/* ========================================================
   PCC LOAD BALANCING GENERATOR STYLES
   ======================================================== */
.pcc-layout {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 20px 16px 60px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-sizing: border-box;
  overflow-x: hidden;
}

.pcc-header-banner {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 27, 75, 0.85) 100%);
  border: 1.5px solid rgba(99, 102, 241, 0.45);
  border-radius: var(--radius-xl);
  padding: 22px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  box-sizing: border-box;
  flex-wrap: wrap;
}

.pcc-header-info h2 {
  font-size: 20px;
  font-weight: 900;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
}

.pcc-header-info p {
  font-size: 13px;
  color: #cbd5e1;
  margin-top: 6px;
  line-height: 1.6;
}

.pcc-os-chips {
  display: flex;
  background: rgba(2, 6, 23, 0.95);
  padding: 6px;
  border-radius: 14px;
  gap: 8px;
  border: 1.5px solid rgba(45, 212, 191, 0.4);
}

.pcc-os-chip {
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: all 0.25s ease;
  white-space: nowrap;
}

.pcc-os-chip:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff !important;
}

.pcc-os-chip.active {
  background: linear-gradient(135deg, #2dd4bf 0%, #0d9488 100%) !important;
  color: #020617 !important;
  border-color: #2dd4bf !important;
  box-shadow: 0 4px 18px rgba(45, 212, 191, 0.45);
  font-weight: 900;
}

.pcc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

@media (max-width: 1060px) {
  .pcc-grid {
    grid-template-columns: 1fr;
  }
}

.pcc-panel-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

.pcc-panel-title {
  font-size: 15px;
  font-weight: 900;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

#pccWanList {
  max-height: 480px;
  overflow-y: auto;
  padding-left: 6px;
  padding-right: 2px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(45, 212, 191, 0.4) rgba(0, 0, 0, 0.2);
}

#pccWanList::-webkit-scrollbar {
  width: 6px;
}
#pccWanList::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}
#pccWanList::-webkit-scrollbar-thumb {
  background: rgba(45, 212, 191, 0.4);
  border-radius: 4px;
}

.pcc-wan-card {
  background: rgba(4, 7, 17, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 16px;
  transition: all 0.2s;
  box-sizing: border-box;
}

.pcc-wan-card:hover {
  border-color: rgba(45, 212, 191, 0.45);
}

.pcc-wan-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.pcc-wan-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pcc-wan-badge {
  background: rgba(45, 212, 191, 0.15);
  color: var(--accent);
  border: 1px solid rgba(45, 212, 191, 0.4);
  font-size: 11px;
  font-weight: 900;
  padding: 2px 8px;
  border-radius: 6px;
}

.pcc-wan-title {
  font-size: 13px;
  font-weight: 800;
  color: #fff;
}

.pcc-wan-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pcc-weight-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #cbd5e1;
}

.pcc-select-sm {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
}

.btn-add-wan {
  background: rgba(45, 212, 191, 0.12);
  border: 1.5px dashed var(--accent);
  color: var(--accent);
  padding: 12px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.25s ease;
  box-sizing: border-box;
}

.btn-add-wan:hover {
  background: rgba(45, 212, 191, 0.25);
  transform: translateY(-2px);
}

.pcc-code-box {
  background: #020617;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 520px;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

.pcc-code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: rgba(0, 0, 0, 0.4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.pcc-code-actions {
  display: flex;
  gap: 8px;
}

.pcc-code-pre {
  margin: 0;
  padding: 16px;
  overflow: auto;
  font-family: 'JetBrains Mono', Consolas, Monaco, monospace;
  font-size: 12px;
  color: #7dd3fc;
  line-height: 1.6;
  white-space: pre;
  flex: 1;
  min-width: 0;
  box-sizing: border-box;
}

.btn-copy-script-big {
  width: 100%;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border: none;
  color: #fff;
  padding: 14px 20px;
  border-radius: var(--radius-lg);
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35);
  transition: all 0.25s ease;
  box-sizing: border-box;
}

.btn-copy-script-big:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.5);
}

/* ========================================================
   TEMPLATES STORE STYLES
   ======================================================== */
.store-layout {
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px 20px 60px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.store-header-banner {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(13, 148, 136, 0.35) 100%);
  border: 1px solid rgba(45, 212, 191, 0.35);
  border-radius: var(--radius-xl);
  padding: 28px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.store-header-banner h2 {
  font-size: 26px;
  font-weight: 900;
  color: #fff;
  margin-bottom: 8px;
}

.store-header-banner p {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 650px;
  margin: 0 auto;
  line-height: 1.6;
}

.store-filters-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.store-filter-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s;
}

.store-filter-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.store-filter-btn.active {
  background: linear-gradient(135deg, #0d9488 0%, #14b8a6 100%) !important;
  color: #ffffff !important;
  border-color: #2dd4bf !important;
  font-weight: 900;
  box-shadow: 0 2px 12px var(--accent-glow);
}

.store-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}

.store-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
}

.store-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), 0 0 25px var(--accent-glow);
}

.store-card-thumb {
  height: 180px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow: hidden;
}

.store-thumb-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 10px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 20px;
  backdrop-filter: blur(8px);
}

.store-thumb-size {
  position: absolute;
  bottom: 10px;
  left: 12px;
  font-size: 10px;
  color: #94a3b8;
  background: rgba(0, 0, 0, 0.65);
  padding: 2px 8px;
  border-radius: 6px;
  font-family: 'JetBrains Mono', monospace;
}

.store-thumb-mockup {
  width: 160px;
}

.mini-hotspot-box {
  background: rgba(15, 23, 42, 0.9);
  border: 1.5px solid;
  border-radius: 12px;
  padding: 10px;
  text-align: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
}

.mini-wifi-icon { font-size: 16px; margin-bottom: 2px; }
.mini-title { font-size: 10px; font-weight: 800; color: #fff; margin-bottom: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-input { background: rgba(0, 0, 0, 0.4); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 4px; font-size: 8px; color: #64748b; padding: 3px 6px; margin-bottom: 6px; }
.mini-btn { color: #020617; font-size: 8px; font-weight: 900; padding: 4px; border-radius: 4px; }

.store-card-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.store-card-title {
  font-size: 16px;
  font-weight: 900;
  color: #fff;
}

.store-card-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.55;
  flex: 1;
}

.store-card-features {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.store-feature-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
}

.store-card-actions {
  display: flex;
  gap: 10px;
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.btn-store-preview {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  padding: 10px;
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-store-preview:hover {
  background: rgba(255, 255, 255, 0.14);
}

.btn-store-download {
  flex: 1.2;
  background: var(--accent-gradient);
  border: none;
  color: #ffffff !important;
  padding: 10px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 4px 15px var(--accent-glow);
}

.btn-store-download:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px var(--accent-glow);
}

/* ========================================================
   STANDALONE ADMIN & SETTINGS SCREEN STYLES
   ======================================================== */
.admin-screen-wrap {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 30px 20px 80px;
  box-sizing: border-box;
}

.admin-screen-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.admin-screen-title-group h2 {
  font-size: 24px;
  font-weight: 900;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-screen-title-group p {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

.admin-screen-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-back-to-studio {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-strong);
  color: #f1f5f9;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-back-to-studio:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: var(--accent);
}

.btn-admin-logout {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-admin-logout:hover {
  background: rgba(239, 68, 68, 0.25);
  color: #fff;
}

/* Standalone Auth Screen Card */
.admin-standalone-auth-card {
  max-width: 460px;
  margin: 60px auto;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  padding: 40px 32px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(16px);
}

/* Template Management Table in Admin */
.admin-tpl-table-wrap {
  overflow-x: auto;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  margin-top: 16px;
}

.admin-tpl-table {
  width: 100%;
  border-collapse: collapse;
  text-align: right;
  font-size: 13px;
}

.admin-tpl-table th {
  background: rgba(15, 23, 42, 0.85);
  padding: 14px 18px;
  color: var(--text-muted);
  font-weight: 800;
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}

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

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

.admin-tpl-thumb {
  width: 56px;
  height: 40px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid var(--border-subtle);
}

.admin-tpl-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.btn-item-edit {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: #60a5fa;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-item-edit:hover {
  background: rgba(59, 130, 246, 0.3);
  color: #fff;
  border-color: #3b82f6;
}


