/* 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;
  white-space: nowrap;
}

.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;
  white-space: nowrap;
}

.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);
}

.btn-nav-shield {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 15px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  border: 1.5px solid rgba(59, 130, 246, 0.5);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.2), rgba(30, 58, 138, 0.4));
  color: #60a5fa;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-nav-shield:hover {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.35), rgba(30, 58, 138, 0.6));
  transform: translateY(-2px);
  color: #93c5fd;
  border-color: rgba(96, 165, 250, 0.8);
}

.btn-nav-share {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 15px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  border: 1.5px solid rgba(168, 85, 247, 0.5);
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(126, 34, 206, 0.4));
  color: #c084fc;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-nav-share:hover {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.35), rgba(126, 34, 206, 0.6));
  transform: translateY(-2px);
  color: #e9d5ff;
  border-color: rgba(192, 132, 252, 0.8);
}

/* Responsive Desktop/Mobile text toggles */
.btn-text-mobile,
.tab-label-mobile {
  display: none !important;
}

.btn-text-desktop,
.tab-label-desktop {
  display: inline !important;
}

/* 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 Tab Container */
#sectionStudio {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 124px);
  width: 100%;
  box-sizing: border-box;
}

/* Main Studio Layout */
.studio-layout {
  display: flex;
  flex: 1;
  min-height: calc(100vh - 124px);
  box-sizing: border-box;
}

/* Sidebar / Editor Column */
.editor-sidebar {
  width: clamp(340px, 26vw, 420px);
  flex-shrink: 0;
  background: rgba(11, 17, 32, 0.98);
  border-left: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  position: sticky;
  top: 124px;
  height: calc(100vh - 124px);
  align-self: flex-start;
  z-index: 20;
}

.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;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Accordion Section Cards */
.accordion-card {
  flex-shrink: 0;
  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%;
  min-height: 50px;
  flex-shrink: 0;
  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%;
  max-width: 100%;
  box-sizing: border-box;
  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: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
}

.form-row-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
}

/* Presets Grid */
.presets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
  gap: 8px;
  margin-top: 8px;
  margin-bottom: 14px;
  width: 100%;
  box-sizing: border-box;
}

.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;
  min-width: 0;
  box-sizing: border-box;
}

.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;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

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

/* Color Pickers Matrix */
.color-picker-matrix {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
  gap: 8px;
  margin-top: 8px;
  width: 100%;
  box-sizing: border-box;
}

.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;
  min-width: 0;
  box-sizing: border-box;
  gap: 6px;
}

.color-card span {
  font-size: 11px;
  font-weight: 700;
  color: #cbd5e1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.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;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: #020617;
}

.stage-toolbar {
  height: 54px;
  background: rgba(11, 17, 32, 0.92);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  position: sticky;
  top: 124px;
  z-index: 15;
  backdrop-filter: blur(12px);
}

.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;
}

.btn-share-design {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(126, 34, 206, 0.35));
  border: 1px solid rgba(168, 85, 247, 0.5);
  color: #c084fc;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s;
}

.btn-share-design:hover {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.35), rgba(126, 34, 206, 0.5));
  color: #fff;
  border-color: rgba(168, 85, 247, 0.7);
}

/* Stage Frame Viewport */
.stage-viewport {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 18px;
  padding: 24px 16px 60px;
  background: radial-gradient(circle at center, #0f172a 0%, #020617 100%);
  position: relative;
  box-sizing: border-box;
}

.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;
  max-width: 100%;
  box-sizing: border-box;
}

/* Mobile Frame */
.phone-mockup.mode-mobile {
  width: 360px;
  height: 720px;
  border: 10px solid #1e293b;
  border-radius: 40px;
}

/* Desktop Frame */
.phone-mockup.mode-desktop {
  flex: 1;
  width: 100%;
  min-height: 640px;
  height: calc(100vh - 200px);
  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); }
}

.spinner-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 3.5px solid rgba(168, 85, 247, 0.2);
  border-top-color: #c084fc;
  animation: spinnerCircleSpin 0.75s linear infinite;
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.25);
}

@keyframes spinnerCircleSpin {
  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: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  transition: all 0.2s ease;
}

.modal-close-icon:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #ef4444;
  transform: rotate(90deg);
}

/* ========================================================
   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) {
  .btn-text-desktop,
  .tab-label-desktop {
    display: none !important;
  }

  .btn-text-mobile,
  .tab-label-mobile {
    display: inline !important;
  }

  /* Compact Navbar */
  .navbar {
    height: 56px !important;
    padding: 0 10px !important;
    gap: 6px !important;
  }

  .nav-brand {
    gap: 8px !important;
    min-width: 0 !important;
    flex-shrink: 1 !important;
  }

  .brand-icon-box {
    width: 32px !important;
    height: 32px !important;
    border-radius: 8px !important;
  }

  .brand-icon-box svg {
    width: 18px !important;
    height: 18px !important;
  }

  .brand-info {
    min-width: 0 !important;
  }

  .brand-info h1 {
    font-size: 13.5px !important;
    gap: 4px !important;
    white-space: nowrap !important;
  }

  .badge-pro {
    font-size: 8.5px !important;
    padding: 1px 4px !important;
    border-radius: 4px !important;
  }

  .brand-info p {
    display: none !important;
  }

  .stat-pill {
    display: none !important;
  }

  .nav-actions {
    gap: 6px !important;
    flex-shrink: 0 !important;
  }

  .btn-nav-admin {
    height: 34px !important;
    padding: 5px 9px !important;
    font-size: 11px !important;
    border-radius: 8px !important;
    gap: 4px !important;
    white-space: nowrap !important;
  }

  .btn-nav-admin svg {
    width: 13px !important;
    height: 13px !important;
  }

  .btn-nav-download {
    height: 34px !important;
    padding: 5px 11px !important;
    font-size: 11.5px !important;
    font-weight: 800 !important;
    border-radius: 8px !important;
    gap: 5px !important;
    white-space: nowrap !important;
    box-shadow: 0 2px 10px rgba(37, 99, 235, 0.4) !important;
  }

  .btn-nav-download svg {
    width: 14px !important;
    height: 14px !important;
  }

  /* Main Navigation Tabs Bar (Dropdowns - Mobile Friendly) */
  .main-tabs-bar {
    top: 56px !important;
    padding: 6px 8px !important;
    overflow: visible !important;
  }

  .tabs-container {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    width: 100% !important;
    position: relative !important;
  }

  .nav-group-divider {
    display: none !important;
  }

  .nav-dropdown {
    width: 100% !important;
    position: static !important;
  }

  .nav-dropdown-trigger {
    width: 100% !important;
    padding: 8px 10px !important;
    gap: 6px !important;
    justify-content: space-between !important;
    border-radius: 12px !important;
    box-sizing: border-box !important;
  }

  .trigger-icon {
    font-size: 16px !important;
  }

  .trigger-title {
    font-size: 11.5px !important;
  }

  .trigger-active-label {
    font-size: 10px !important;
  }

  .trigger-arrow {
    margin-right: 2px !important;
  }

  .nav-dropdown-menu {
    top: calc(100% + 6px) !important;
    right: 4px !important;
    left: 4px !important;
    width: auto !important;
    max-width: none !important;
    border-radius: 14px !important;
    padding: 8px !important;
    gap: 4px !important;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.95), 0 0 20px rgba(56, 189, 248, 0.25) !important;
  }

  .dropdown-item {
    padding: 8px 10px !important;
    gap: 10px !important;
    border-radius: 10px !important;
  }

  .item-icon-box {
    width: 32px !important;
    height: 32px !important;
    font-size: 15px !important;
    border-radius: 8px !important;
  }

  .item-title {
    font-size: 12px !important;
  }

  .item-desc {
    font-size: 10px !important;
    line-height: 1.3 !important;
  }

  .tab-badge-pro,
  .tab-badge-new,
  .tab-badge-free,
  .tab-badge-shield {
    font-size: 8px !important;
    padding: 1.5px 5px !important;
  }

  /* Top Rotating Ad Banner */
  .studio-top-ad-banner {
    padding: 6px 10px !important;
  }

  .top-ad-container {
    gap: 8px !important;
  }

  .top-ad-desc,
  .top-ad-sep,
  .top-ad-cta {
    display: none !important;
  }

  .top-ad-title {
    font-size: 11.5px !important;
  }

  /* Mobile Screen View Switcher (Edit vs Preview) */
  .mobile-view-tabs {
    display: flex !important;
    padding: 6px 8px !important;
    gap: 6px !important;
  }

  .mobile-tab-btn {
    padding: 7px 10px !important;
    font-size: 11.5px !important;
    border-radius: 8px !important;
  }

  /* Main Studio Layout & Sidebar */
  .studio-layout {
    height: calc(100dvh - 150px) !important;
    position: relative !important;
  }

  .editor-sidebar {
    width: 100% !important;
    height: 100% !important;
    position: relative !important;
    top: auto !important;
    border-left: none !important;
    display: flex !important;
    flex-direction: column !important;
    min-height: 0 !important;
  }

  .editor-header-bar {
    padding: 10px 14px !important;
    flex-shrink: 0 !important;
  }

  .editor-header-bar h2 {
    font-size: 13px !important;
  }

  .editor-scroll-body {
    flex: 1 !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 12px 12px 140px !important;
    gap: 10px !important;
    display: flex !important;
    flex-direction: column !important;
  }

  .accordion-card {
    flex-shrink: 0 !important;
    width: 100% !important;
  }

  .accordion-trigger {
    min-height: 48px !important;
    padding: 12px 14px !important;
    flex-shrink: 0 !important;
  }

  .accordion-title {
    font-size: 12.5px !important;
  }

  .stage-column {
    width: 100% !important;
    height: 100% !important;
    display: none;
  }

  .studio-layout.show-preview .editor-sidebar {
    display: none !important;
  }

  .studio-layout.show-preview .stage-column {
    display: flex !important;
  }

  .stage-toolbar {
    position: relative !important;
    top: auto !important;
  }

  .stage-viewport {
    padding: 0 !important;
  }
  
  .phone-mockup.mode-mobile {
    width: 100% !important;
    height: 100% !important;
    border: none !important;
    border-radius: 0 !important;
  }

  .phone-mockup.mode-mobile .phone-notch {
    display: none !important;
  }

  /* PCC Layout Mobile */
  .pcc-layout {
    padding: 14px 10px 80px !important;
    gap: 14px !important;
  }

  .pcc-header-banner {
    padding: 16px !important;
    gap: 12px !important;
  }

  .pcc-header-info h2 {
    font-size: 16px !important;
  }

  .pcc-header-info p {
    font-size: 11.5px !important;
  }

  .pcc-os-chips {
    width: 100% !important;
    justify-content: stretch !important;
  }

  .pcc-os-chip {
    flex: 1 !important;
    text-align: center !important;
    padding: 8px 10px !important;
    font-size: 12px !important;
  }

  .pcc-panel-card {
    padding: 16px !important;
  }

  /* Store Layout Mobile */
  .store-layout {
    padding: 14px 10px 80px !important;
    gap: 14px !important;
  }

  .store-header-banner {
    padding: 18px 12px !important;
  }

  .store-header-banner h2 {
    font-size: 18px !important;
  }

  .store-header-banner p {
    font-size: 12px !important;
  }

  /* Admin Screen Mobile */
  .admin-screen-wrap {
    padding: 16px 12px 60px !important;
  }

  .admin-screen-title-group h2 {
    font-size: 18px !important;
  }

  .admin-screen-actions {
    width: 100% !important;
    justify-content: space-between !important;
  }

  .admin-standalone-auth-card {
    padding: 24px 16px !important;
    margin: 20px auto !important;
  }
}

/* ========================================================
   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(6, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

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

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

.pulse-dot-green {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  animation: pulseGreenBeacon 1.8s infinite;
}

@keyframes pulseGreenBeacon {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  }
  70% {
    transform: scale(1.1);
    box-shadow: 0 0 0 6px rgba(34, 197, 94, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
  }
}

.badge-live-pulse {
  font-size: 10px;
  font-weight: 800;
  color: #22c55e;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.35);
  padding: 1px 6px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.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: clamp(190px, 15vw, 260px);
  min-width: 170px;
  max-width: 280px;
  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 15px 35px rgba(0, 0, 0, 0.7), 0 0 25px rgba(56, 189, 248, 0.1);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10;
  box-sizing: border-box;
}

.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 Flank Ads & Screen Adaptation for Laptops & Desktops */
@media (max-width: 1536px) {
  .editor-sidebar {
    width: 350px;
  }
  .stage-flank-ad {
    width: clamp(170px, 12vw, 210px);
    min-width: 160px;
  }
  .flank-ad-img {
    height: 120px;
  }
  .flank-ad-content {
    padding: 12px;
    gap: 8px;
  }
  .flank-ad-title {
    font-size: 13px;
    line-height: 1.35;
  }
  .flank-ad-desc {
    font-size: 11px;
    line-height: 1.4;
  }
  .flank-ad-btn {
    padding: 8px 12px;
    font-size: 11px;
    margin-top: 6px;
  }
  .phone-mockup.mode-mobile {
    width: 330px;
    height: 650px;
  }
  .stage-viewport {
    gap: 12px;
    padding: 16px 12px 40px;
  }
}

@media (max-width: 1366px) {
  .editor-sidebar {
    width: 320px;
  }
  /* On 1366px and 14" laptops, keep BOTH flank ads visible!
     Shift left flank ad inward/rightward so it fits gracefully within the screen */
  .stage-viewport .stage-flank-ad {
    display: flex !important;
    width: clamp(140px, 11vw, 175px);
    min-width: 140px;
  }
  .stage-viewport .stage-flank-left {
    display: flex !important;
    margin-right: -2px;
    margin-left: 4px;
  }
  .stage-viewport .stage-flank-right {
    display: flex !important;
    margin-left: -2px;
    margin-right: 0;
  }
  .flank-ad-img {
    height: 105px;
  }
  .flank-ad-content {
    padding: 10px;
    gap: 6px;
  }
  .flank-ad-title {
    font-size: 12px;
    line-height: 1.35;
  }
  .flank-ad-desc {
    font-size: 10.5px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .flank-ad-btn {
    padding: 6px 10px;
    font-size: 11px;
    margin-top: 4px;
  }
  .phone-mockup.mode-mobile {
    width: 310px;
    height: 620px;
    border-width: 8px;
    border-radius: 34px;
  }
  .stage-viewport {
    gap: 10px;
    padding: 16px 10px 40px;
    justify-content: center;
  }

  /* PCC balancing: keep both flank ads with compact width */
  .pcc-stage-container .stage-flank-ad {
    display: flex !important;
    width: clamp(140px, 11vw, 175px);
    min-width: 140px;
  }

  /* Store: keep both flank ads with compact width */
  .store-stage-container .stage-flank-ad {
    display: flex !important;
    width: clamp(140px, 11vw, 175px);
    min-width: 140px;
  }
  .store-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
  }
}

@media (max-width: 1180px) {
  .editor-sidebar {
    width: 295px;
  }
  .stage-viewport .stage-flank-ad {
    display: flex !important;
    width: clamp(130px, 10vw, 155px);
    min-width: 130px;
  }
  .stage-viewport .stage-flank-left {
    margin-right: -2px;
    margin-left: 4px;
  }
  .flank-ad-img {
    height: 95px;
  }
  .flank-ad-content {
    padding: 8px;
    gap: 4px;
  }
  .flank-ad-title {
    font-size: 11px;
    line-height: 1.3;
  }
  .flank-ad-desc {
    font-size: 9.5px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .flank-ad-btn {
    padding: 5px 8px;
    font-size: 10px;
    margin-top: 2px;
  }
  .phone-mockup.mode-mobile {
    width: 295px;
    height: 590px;
    border-width: 7px;
    border-radius: 28px;
  }
  .stage-viewport {
    gap: 8px;
    padding: 12px 8px 30px;
  }
  .pcc-grid {
    grid-template-columns: 1fr !important;
  }
  .pcc-header-banner {
    padding: 16px 18px;
  }
}

@media (max-width: 1040px) {
  /* On compact tablets under 1040px, stack or tuck ads so preview mockup has 100% room */
  .stage-flank-ad {
    display: none !important;
  }
  .pcc-grid {
    grid-template-columns: 1fr !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 DROPDOWNS (أقسام الشريط العلوي المنسدلة)
   ======================================================== */
.main-tabs-bar {
  background: rgba(15, 23, 42, 0.96);
  border-bottom: 1px solid var(--border-subtle);
  padding: 8px 20px;
  position: sticky;
  top: 68px;
  z-index: 95;
  backdrop-filter: blur(16px);
}

.tabs-container {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  position: relative;
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 8px 20px;
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.7);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  font-family: inherit;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.nav-dropdown-trigger:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(56, 189, 248, 0.5);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

.nav-dropdown-trigger.active {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.18) 0%, rgba(37, 99, 235, 0.28) 100%) !important;
  border-color: rgba(56, 189, 248, 0.7) !important;
  box-shadow: 0 4px 18px rgba(2, 132, 199, 0.35);
}

.nav-dropdown.open .nav-dropdown-trigger {
  border-color: #38bdf8 !important;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.4);
  background: rgba(15, 23, 42, 0.95);
}

.trigger-icon {
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
}

.trigger-text-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: right;
  line-height: 1.25;
}

.trigger-title {
  font-size: 13px;
  font-weight: 800;
  color: #ffffff;
}

.trigger-active-label {
  font-size: 11px;
  font-weight: 700;
  color: #38bdf8;
  transition: color 0.2s;
}

.trigger-arrow {
  color: #94a3b8;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), color 0.2s;
  margin-right: 6px;
  flex-shrink: 0;
}

.nav-dropdown.open .trigger-arrow {
  transform: rotate(180deg);
  color: #38bdf8;
}

.nav-group-divider {
  width: 1.5px;
  height: 34px;
  background: rgba(255, 255, 255, 0.12);
  margin: 0 4px;
}

/* Dropdown Menu Popup */
.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 380px;
  max-width: 92vw;
  background: rgba(15, 23, 42, 0.98);
  border: 1.5px solid rgba(56, 189, 248, 0.35);
  border-radius: 18px;
  padding: 10px;
  box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.9), 0 0 30px rgba(56, 189, 248, 0.2);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 6px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  pointer-events: none;
  transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.22s;
}

.nav-dropdown.open .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.dropdown-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 800;
  color: #94a3b8;
  letter-spacing: 0.3px;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1.5px solid transparent;
  color: #cbd5e1;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  width: 100%;
  text-align: right;
  box-sizing: border-box;
  font-family: inherit;
}

.dropdown-item:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(56, 189, 248, 0.35);
  transform: translateX(-3px);
}

.dropdown-item:hover .item-title {
  color: #ffffff;
}

.dropdown-item:hover .item-desc {
  color: #e2e8f0;
}

.dropdown-item.active {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.16) 0%, rgba(37, 99, 235, 0.24) 100%) !important;
  border-color: rgba(56, 189, 248, 0.6) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.dropdown-item.active .item-title {
  color: #38bdf8 !important;
  font-weight: 900;
}

.dropdown-item.active .item-check {
  opacity: 1;
}

.item-icon-box {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.item-icon-studio { background: rgba(13, 148, 136, 0.18); border-color: rgba(20, 184, 166, 0.4); }
.item-icon-editor { background: rgba(245, 158, 11, 0.18); border-color: rgba(245, 158, 11, 0.4); }
.item-icon-store  { background: rgba(16, 185, 129, 0.18); border-color: rgba(16, 185, 129, 0.4); }
.item-icon-fw     { background: rgba(2, 132, 199, 0.18); border-color: rgba(56, 189, 248, 0.4); }
.item-icon-cards  { background: rgba(16, 185, 129, 0.18); border-color: rgba(5, 150, 105, 0.4); }
.item-icon-pcc    { background: rgba(99, 102, 241, 0.18); border-color: rgba(129, 140, 248, 0.4); }
.item-icon-shield { background: rgba(59, 130, 246, 0.18); border-color: rgba(96, 165, 250, 0.4); }

.item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

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

.item-title {
  font-size: 13px;
  font-weight: 800;
  color: #f1f5f9;
  transition: color 0.18s;
}

.item-desc {
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.35;
  white-space: normal;
  transition: color 0.18s;
}

.item-check {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 900;
  color: #38bdf8;
  opacity: 0;
  transition: opacity 0.2s;
  flex-shrink: 0;
}

.tab-badge-pro {
  background: linear-gradient(135deg, #0284c7, #2563eb);
  color: #fff;
  font-size: 9px;
  font-weight: 900;
  padding: 2px 6px;
  border-radius: 6px;
}

.tab-badge-new {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #fff;
  font-size: 9px;
  font-weight: 900;
  padding: 2px 6px;
  border-radius: 6px;
}

.tab-badge-free {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  font-size: 9px;
  font-weight: 900;
  padding: 2px 6px;
  border-radius: 6px;
}

.tab-badge-shield {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: #fff;
  font-size: 9px;
  font-weight: 900;
  padding: 2px 6px;
  border-radius: 6px;
}

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

.pcc-stage-container {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 20px;
  width: 100%;
  min-width: 0;
}

.pcc-stage-container .pcc-grid {
  flex: 1;
  min-width: 0;
}

.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;
  }
}

@media (min-width: 1061px) {
  .pcc-grid > .pcc-panel-card:last-child {
    position: sticky;
    top: 70px;
    align-self: flex-start;
  }
}

.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-card .form-row .form-group {
  margin-top: 0 !important;
}

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

.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 {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  box-sizing: border-box;
  max-height: none;
  overflow: visible;
}

/* PCC Banking & Payment Bypass Card */
.pcc-banking-card {
  background: rgba(15, 23, 42, 0.85);
  border: 1.5px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-sizing: border-box;
  width: 100%;
  margin-top: 4px;
  margin-bottom: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  transition: all 0.25s ease;
}

.pcc-banking-card:hover {
  border-color: rgba(245, 158, 11, 0.6);
}

.pcc-banking-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

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

.pcc-banking-icon {
  font-size: 24px;
  background: rgba(245, 158, 11, 0.15);
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid rgba(245, 158, 11, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pcc-banking-title {
  font-size: 13.5px;
  font-weight: 800;
  color: #fbbf24;
  margin: 0 0 3px 0;
}

.pcc-banking-desc {
  font-size: 11px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.4;
}

.pcc-banking-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(2, 6, 23, 0.65);
  padding: 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.pcc-banking-services-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.pcc-service-tag {
  font-size: 10.5px;
  font-weight: 700;
  background: rgba(245, 158, 11, 0.12);
  color: #fef08a;
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 4px 9px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
}

.pcc-wan-card {
  background: rgba(15, 23, 42, 0.75);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  transition: all 0.25s ease;
  box-sizing: border-box;
  width: 100%;
  overflow: visible;
}

.pcc-wan-card:hover {
  border-color: rgba(45, 212, 191, 0.45);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

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

.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;
}

.pcc-wan-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  margin-top: 4px;
}

.pcc-wan-body .pcc-fg {
  margin-top: 0 !important;
}

.pcc-wan-top-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(115px, 1fr));
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
}

.pcc-wan-ip-section {
  background: rgba(2, 6, 23, 0.65);
  border: 1.5px solid rgba(45, 212, 191, 0.25);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-sizing: border-box;
  width: 100%;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3);
}

.pcc-wan-ip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
}

.pcc-label-highlight {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
  color: #38bdf8 !important;
  margin-bottom: 6px;
}

.pcc-label-icon {
  font-size: 14px;
}

.pcc-ip-input {
  background: rgba(15, 23, 42, 0.95) !important;
  border: 1.5px solid rgba(56, 189, 248, 0.4) !important;
  font-family: 'JetBrains Mono', Consolas, Monaco, monospace !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  color: #a5f3fc !important;
  letter-spacing: 0.5px;
  padding: 10px 14px !important;
  box-sizing: border-box;
  width: 100% !important;
}

.pcc-ip-input:focus {
  border-color: #2dd4bf !important;
  box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.3) !important;
  background: #020617 !important;
}

.pcc-fg-full {
  grid-column: 1 / -1;
}

@media (max-width: 560px) {
  .pcc-wan-top-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .pcc-wan-ip-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

.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;
  margin-top: 4px;
}

.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: 1600px;
  margin: 0 auto;
  padding: 24px 20px 60px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.store-stage-container {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 20px;
  width: 100%;
  min-width: 0;
}

.store-stage-container .store-grid {
  flex: 1;
  min-width: 0;
}

.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);
}

/* ========================================================
   STORE TOOLBAR (SEARCH & SORT)
   ======================================================== */
.store-toolbar-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-xl);
  padding: 14px 20px;
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  flex-wrap: wrap;
}

.store-search-box {
  flex: 1;
  min-width: 260px;
  position: relative;
  display: flex;
  align-items: center;
}

.store-search-icon {
  position: absolute;
  right: 14px;
  color: var(--text-muted);
  pointer-events: none;
}

.store-search-input {
  width: 100%;
  background: rgba(2, 6, 23, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  color: #fff;
  padding: 10px 42px 10px 38px;
  font-family: inherit;
  font-size: 13px;
  transition: all 0.25s ease;
  outline: none;
}

.store-search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
  background: rgba(2, 6, 23, 0.85);
}

.store-search-clear-btn {
  position: absolute;
  left: 12px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  padding: 4px;
  line-height: 1;
}

.store-search-clear-btn:hover {
  color: #fff;
}

.store-sort-container {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.store-sort-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
}

.store-sort-pills {
  display: inline-flex;
  background: rgba(2, 6, 23, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 4px;
  gap: 4px;
}

.store-sort-pill {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 7px 15px;
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  user-select: none;
}

.store-sort-pill:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.store-sort-pill.active {
  background: var(--accent-gradient);
  color: #fff !important;
  font-weight: 800;
  box-shadow: 0 2px 10px var(--accent-glow);
}

/* ========================================================
   DEDICATED TEMPLATE DETAIL SCREEN
   ======================================================== */
.template-detail-view {
  display: flex;
  flex-direction: column;
  gap: 20px;
  animation: fadeInTplDetail 0.3s ease-out;
}

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

.tpl-detail-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-xl);
  padding: 12px 18px;
}

.btn-detail-back {
  background: rgba(45, 212, 191, 0.12);
  border: 1px solid rgba(45, 212, 191, 0.3);
  color: var(--accent);
  padding: 9px 18px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.btn-detail-back:hover {
  background: var(--accent);
  color: #020617;
  transform: translateX(4px);
  box-shadow: 0 4px 15px var(--accent-glow);
}

.tpl-detail-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

.tpl-detail-breadcrumb .breadcrumb-link {
  color: var(--accent);
  cursor: pointer;
  transition: opacity 0.2s;
}

.tpl-detail-breadcrumb .breadcrumb-link:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.tpl-detail-breadcrumb .breadcrumb-current {
  color: #fff;
  font-weight: 700;
  max-width: 380px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tpl-nav-arrows {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

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

.btn-tpl-nav:hover {
  background: rgba(45, 212, 191, 0.15);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

.btn-tpl-random {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.15), rgba(59, 130, 246, 0.15));
  border-color: rgba(168, 85, 247, 0.35);
  color: #c084fc;
}

.btn-tpl-random:hover {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.3), rgba(59, 130, 246, 0.3));
  color: #fff;
  border-color: #a855f7;
}

/* 2-Column Detail Layout Grid */
.tpl-detail-layout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  gap: 24px;
  align-items: start;
}

.tpl-detail-main-col {
  min-width: 0;
}

.tpl-detail-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.tpl-detail-hero {
  display: grid;
  grid-template-columns: 440px 1fr;
  gap: 28px;
  align-items: start;
}

.tpl-detail-thumb-wrap {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 2px solid rgba(45, 212, 191, 0.3);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  background: #020617;
  cursor: pointer;
}

.tpl-detail-img-box {
  width: 100%;
  min-height: 280px;
  max-height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0f172a, #020617);
  overflow: hidden;
}

.tpl-detail-img {
  width: 100%;
  height: 100%;
  max-height: 380px;
  object-fit: contain;
  display: block;
  transition: transform 0.3s ease;
}

.tpl-detail-thumb-wrap:hover .tpl-detail-img {
  transform: scale(1.03);
}

.tpl-zoom-overlay-hint {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
  z-index: 5;
}

.tpl-detail-thumb-wrap:hover .tpl-zoom-overlay-hint {
  opacity: 1;
}

.tpl-detail-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 20px;
  z-index: 6;
}

.tpl-detail-counter {
  position: absolute;
  bottom: 14px;
  left: 14px;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  color: #38bdf8;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 8px;
  font-family: monospace;
  z-index: 6;
}

.tpl-detail-header-info {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tpl-detail-title {
  font-size: 24px;
  font-weight: 900;
  color: #fff;
  line-height: 1.45;
  margin: 0;
}

.tpl-detail-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.tpl-meta-item {
  font-size: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  padding: 4px 12px;
  border-radius: 6px;
}

.tpl-quick-highlights {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 4px;
}

.tpl-highlight-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 700;
  color: #e2e8f0;
}

.tpl-highlight-icon {
  font-size: 18px;
}

/* Description Section */
.tpl-detail-desc-wrap {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-xl);
  padding: 24px;
}

.tpl-detail-section-title {
  font-size: 17px;
  font-weight: 900;
  color: #fff;
  margin: 0 0 16px 0;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 10px;
}

.tpl-detail-desc-content {
  font-size: 14px;
  line-height: 1.85;
  color: #cbd5e1;
}

.tpl-detail-desc-content p {
  margin-bottom: 12px;
}

.tpl-detail-desc-content ul {
  list-style: none;
  padding: 0;
  margin: 0 0 14px 0;
}

.tpl-detail-desc-content li {
  position: relative;
  padding-right: 22px;
  margin-bottom: 8px;
}

.tpl-detail-desc-content li::before {
  content: '✓';
  position: absolute;
  right: 0;
  color: var(--accent);
  font-weight: 900;
}

/* Prominent Bottom CTA Section */
.tpl-detail-download-cta {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(13, 148, 136, 0.25) 100%);
  border: 2px solid rgba(45, 212, 191, 0.4);
  border-radius: var(--radius-xl);
  padding: 24px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.tpl-cta-info {
  flex: 1;
  min-width: 260px;
}

.tpl-cta-badge {
  display: inline-block;
  background: rgba(45, 212, 191, 0.15);
  color: var(--accent);
  border: 1px solid rgba(45, 212, 191, 0.3);
  font-size: 11px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 4px;
  margin-bottom: 8px;
}

.tpl-cta-title {
  font-size: 19px;
  font-weight: 900;
  color: #fff;
  margin: 0 0 6px 0;
}

.tpl-cta-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.6;
}

.btn-cta-download-action {
  background: var(--accent-gradient);
  border: none;
  color: #fff !important;
  padding: 16px 30px;
  border-radius: var(--radius-lg);
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 6px 25px var(--accent-glow);
  transition: all 0.25s ease;
  white-space: nowrap;
}

.btn-cta-download-action:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 10px 35px var(--accent-glow);
}

/* Related Templates Section at bottom */
.tpl-detail-more-section {
  margin-top: 10px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.tpl-more-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.tpl-more-title {
  font-size: 17px;
  font-weight: 900;
  color: #fff;
  margin: 0;
}

.btn-more-browse {
  background: transparent;
  border: none;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  padding: 4px 8px;
  transition: opacity 0.2s;
}

.btn-more-browse:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.tpl-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.tpl-related-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
}

.tpl-related-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), 0 0 15px var(--accent-glow);
}

.tpl-related-thumb-wrap {
  position: relative;
  height: 130px;
  background: #020617;
  overflow: hidden;
}

.tpl-related-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.tpl-related-content {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.tpl-related-title {
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tpl-related-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
}

/* ========================================================
   TEMPLATE DETAIL SIDEBAR (RECENT & PROMOTIONAL CARDS)
   ======================================================== */
.tpl-detail-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: 90px;
}

.tpl-sidebar-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tpl-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

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

.tpl-sidebar-icon {
  font-size: 18px;
}

.tpl-sidebar-title {
  font-size: 15px;
  font-weight: 900;
  color: #fff;
  margin: 0;
}

.tpl-sidebar-badge {
  background: rgba(244, 63, 94, 0.15);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.3);
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
}

.tpl-sidebar-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tpl-sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: all 0.2s ease;
}

.tpl-sidebar-item:hover {
  background: rgba(45, 212, 191, 0.1);
  border-color: rgba(45, 212, 191, 0.4);
  transform: translateX(-3px);
}

.tpl-sidebar-thumb {
  width: 58px;
  height: 52px;
  border-radius: 6px;
  object-fit: cover;
  background: #020617;
  border: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.tpl-sidebar-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}

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

.tpl-sidebar-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  color: #94a3b8;
}

/* Sidebar Action Card */
.tpl-sidebar-action-card {
  text-align: center;
  align-items: center;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.12) 0%, rgba(59, 130, 246, 0.08) 100%);
  border-color: rgba(168, 85, 247, 0.3);
}

.tpl-action-card-icon {
  font-size: 32px;
}

.tpl-action-card-title {
  font-size: 15px;
  font-weight: 900;
  color: #fff;
  margin: 0;
}

.tpl-action-card-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

.btn-sidebar-random {
  background: linear-gradient(135deg, #a855f7 0%, #6366f1 100%);
  border: none;
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
}

.btn-sidebar-random:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(168, 85, 247, 0.4);
}

.tpl-sidebar-studio-cta {
  text-align: center;
  align-items: center;
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.15) 0%, rgba(15, 23, 42, 0.8) 100%);
  border-color: rgba(45, 212, 191, 0.3);
}

.btn-sidebar-studio {
  background: var(--accent-gradient);
  border: none;
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
}

.btn-sidebar-studio:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px var(--accent-glow);
}

/* ========================================================
   IMAGE LIGHTBOX MODAL (FULLSCREEN ZOOM)
   ======================================================== */
.image-lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(2, 6, 23, 0.94);
  backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeInModal 0.25s ease-out;
}

.lightbox-content-wrap {
  max-width: 1200px;
  max-height: 94vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.lightbox-close-btn {
  position: absolute;
  top: -18px;
  left: -18px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ef4444;
  color: #fff;
  font-size: 20px;
  font-weight: 900;
  border: 3px solid #0f172a;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  box-shadow: 0 4px 20px rgba(239, 68, 68, 0.5);
  transition: all 0.2s;
}

.lightbox-close-btn:hover {
  transform: scale(1.12);
  background: #dc2626;
}

.lightbox-image-container {
  width: 100%;
  max-height: 80vh;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.85);
  border: 2px solid rgba(45, 212, 191, 0.35);
  border-radius: var(--radius-xl);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
  padding: 14px;
}

.lightbox-image {
  max-width: 100%;
  max-height: 76vh;
  object-fit: contain;
  border-radius: var(--radius-md);
}

.lightbox-caption {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  margin-top: 14px;
  gap: 16px;
  flex-wrap: wrap;
}

.lightbox-title {
  color: #fff;
  font-size: 15px;
  font-weight: 800;
}

.btn-lightbox-download {
  background: var(--accent-gradient);
  border: none;
  color: #fff !important;
  padding: 10px 22px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 15px var(--accent-glow);
}

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

@media (max-width: 1100px) {
  .tpl-detail-layout-grid {
    grid-template-columns: 1fr;
  }
  .tpl-detail-sidebar {
    position: static;
  }
  .tpl-detail-hero {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* ========================================================
   COMPREHENSIVE MOBILE RESPONSIVE ENGINE & ADSENSE PROTECTION
   (Screens <= 768px and Smartphones <= 480px)
   ======================================================== */
@media (max-width: 768px) {
  /* 1. Viewport & Document Protection */
  html, body {
    max-width: 100vw !important;
    overflow-x: hidden !important;
    position: relative !important;
    width: 100% !important;
  }

  /* 2. Global AdSense Containment - Prevent horizontal stretch and layout break */
  .google-auto-placed,
  ins.adsbygoogle,
  div[id^="aswift_"] {
    display: block !important;
    max-width: 100% !important;
    width: 100% !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    margin: 12px auto !important;
    border-radius: 12px !important;
    text-align: center !important;
  }

  .google-auto-placed iframe,
  ins.adsbygoogle iframe {
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .store-grid > .google-auto-placed,
  .store-grid > ins.adsbygoogle,
  .pcc-grid > .google-auto-placed,
  .pcc-grid > ins.adsbygoogle,
  .tpl-related-grid > .google-auto-placed,
  .tpl-related-grid > ins.adsbygoogle,
  .tpl-quick-highlights > .google-auto-placed,
  .tpl-quick-highlights > ins.adsbygoogle,
  .tpl-detail-hero > .google-auto-placed,
  .tpl-detail-hero > ins.adsbygoogle,
  .cards-grid > .google-auto-placed,
  .cards-grid > ins.adsbygoogle {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 8px 0 !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  /* 3. Top Header & Tabs Bar on Mobile */
  .navbar {
    height: 54px !important;
    padding: 0 8px !important;
    gap: 6px !important;
  }
  .nav-brand {
    gap: 6px !important;
    flex-shrink: 1 !important;
    min-width: 0 !important;
  }
  .brand-icon-box {
    width: 28px !important;
    height: 28px !important;
    flex-shrink: 0 !important;
  }
  .brand-icon-box svg {
    width: 16px !important;
    height: 16px !important;
  }
  .brand-info h1 {
    font-size: 12px !important;
    gap: 4px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  .badge-pro {
    font-size: 8px !important;
    padding: 1px 4px !important;
  }
  .nav-actions {
    gap: 4px !important;
    flex-shrink: 0 !important;
  }
  .btn-nav-admin,
  .btn-nav-shield,
  .btn-nav-share {
    height: 32px !important;
    padding: 0 7px !important;
    font-size: 11px !important;
    border-radius: 8px !important;
    gap: 3px !important;
    white-space: nowrap !important;
    display: inline-flex !important;
    align-items: center !important;
  }
  .btn-nav-admin svg,
  .btn-nav-shield svg,
  .btn-nav-share svg {
    width: 13px !important;
    height: 13px !important;
  }
  .btn-nav-download {
    height: 32px !important;
    padding: 0 8px !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    border-radius: 8px !important;
    gap: 4px !important;
    white-space: nowrap !important;
  }
  .btn-nav-download svg {
    width: 13px !important;
    height: 13px !important;
  }
  .main-tabs-bar {
    top: 54px !important;
    padding: 6px 8px !important;
  }
  .tabs-container {
    gap: 6px !important;
  }
  .nav-dropdown-trigger {
    padding: 7px 8px !important;
    border-radius: 10px !important;
    gap: 4px !important;
  }
  .trigger-icon {
    font-size: 15px !important;
  }
  .trigger-title {
    font-size: 11px !important;
    white-space: nowrap !important;
  }
  .trigger-active-label {
    display: none !important;
  }

  /* 4. TEMPLATES STORE MOBILE STYLES */
  .store-layout {
    padding: 10px 10px 70px !important;
    gap: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Store Header Banner */
  .store-header-banner {
    padding: 16px 14px !important;
    border-radius: 16px !important;
  }
  .store-header-banner > div {
    flex-direction: column !important;
    align-items: stretch !important;
    text-align: center !important;
    gap: 12px !important;
  }
  .store-header-banner div[style*="text-align: right"] {
    text-align: center !important;
  }
  .store-header-banner h2 {
    font-size: 17px !important;
    margin-bottom: 4px !important;
  }
  .store-header-banner p {
    font-size: 12px !important;
    line-height: 1.5 !important;
  }
  .store-header-banner .btn-nav-download {
    width: 100% !important;
    justify-content: center !important;
    padding: 11px !important;
    font-size: 12px !important;
    border-radius: 10px !important;
  }

  /* Store Toolbar (Search & Sort) */
  .store-toolbar-card {
    flex-direction: column !important;
    align-items: stretch !important;
    padding: 12px !important;
    gap: 10px !important;
    border-radius: 14px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .store-search-box {
    min-width: 100% !important;
    width: 100% !important;
  }
  .store-search-input {
    height: 40px !important;
    font-size: 12.5px !important;
    padding: 8px 36px 8px 34px !important;
    border-radius: 10px !important;
  }
  .store-sort-container {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
  }
  .store-sort-label {
    display: none !important;
  }
  .store-sort-pills {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 4px !important;
    padding: 3px !important;
    border-radius: 10px !important;
    box-sizing: border-box !important;
  }
  .store-sort-pill {
    justify-content: center !important;
    padding: 7px 4px !important;
    font-size: 11px !important;
    white-space: nowrap !important;
    border-radius: 8px !important;
  }

  /* Store Category Filter Pills (Horizontal swipeable on touch) */
  .store-filters-bar {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 2px 2px 8px !important;
    gap: 6px !important;
    justify-content: flex-start !important;
    scrollbar-width: none !important;
  }
  .store-filters-bar::-webkit-scrollbar {
    display: none !important;
  }
  .store-filter-btn {
    flex-shrink: 0 !important;
    padding: 6px 12px !important;
    font-size: 11px !important;
    border-radius: 14px !important;
  }

  /* Flank Ads must stay hidden on mobile */
  .stage-flank-ad {
    display: none !important;
  }

  /* Store Grid (Single-column card layout on mobile) */
  .store-stage-container {
    display: block !important;
    width: 100% !important;
  }
  .store-stage-container .store-grid,
  .store-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 14px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .store-card {
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 16px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
  }
  .store-card-thumb-wrap,
  .store-card-thumb {
    height: 180px !important;
    width: 100% !important;
  }
  .store-card-img {
    height: 180px !important;
    width: 100% !important;
    object-fit: cover !important;
  }
  .store-card-content {
    padding: 14px !important;
    gap: 10px !important;
  }
  .store-card-title {
    font-size: 15px !important;
    line-height: 1.4 !important;
  }
  .store-card-desc {
    font-size: 12px !important;
    line-height: 1.5 !important;
  }
  .store-card-actions {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    padding-top: 10px !important;
  }
  .btn-store-preview,
  .btn-store-download {
    flex: 1 1 120px !important;
    padding: 9px 8px !important;
    font-size: 12px !important;
    justify-content: center !important;
    border-radius: 8px !important;
    width: auto !important;
  }

  /* 5. TEMPLATE DETAIL PAGE MOBILE STYLES */
  .template-detail-view {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 0 90px !important;
    gap: 14px !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }
  .tpl-detail-top-bar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    padding: 12px !important;
    border-radius: 14px !important;
  }
  .tpl-detail-top-bar > div:first-child {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
  }
  .btn-detail-back {
    width: 100% !important;
    justify-content: center !important;
    padding: 10px !important;
    font-size: 12.5px !important;
    border-radius: 8px !important;
  }
  .tpl-detail-breadcrumb {
    justify-content: center !important;
    font-size: 11px !important;
  }
  .tpl-detail-breadcrumb .breadcrumb-current {
    max-width: 180px !important;
  }
  .tpl-nav-arrows {
    display: grid !important;
    grid-template-columns: 1fr 1.2fr 1fr !important;
    gap: 5px !important;
    width: 100% !important;
  }
  .btn-tpl-nav {
    justify-content: center !important;
    padding: 6px 3px !important;
    font-size: 10px !important;
    white-space: nowrap !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  .tpl-detail-layout-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
    width: 100% !important;
  }
  .tpl-detail-card {
    padding: 14px !important;
    border-radius: 16px !important;
    gap: 16px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .tpl-detail-hero {
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
    width: 100% !important;
  }
  .tpl-detail-thumb-wrap {
    width: 100% !important;
    border-radius: 12px !important;
  }
  .tpl-detail-img-box {
    min-height: 180px !important;
    max-height: 240px !important;
    width: 100% !important;
  }
  .tpl-detail-img {
    max-height: 240px !important;
    object-fit: contain !important;
  }
  .tpl-detail-title {
    font-size: 16px !important;
    line-height: 1.4 !important;
    text-align: right !important;
  }
  .tpl-detail-meta-row {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 6px !important;
  }
  .tpl-meta-item {
    font-size: 11px !important;
    padding: 4px 8px !important;
  }
  .tpl-quick-highlights {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }
  .tpl-highlight-item {
    padding: 8px 6px !important;
    font-size: 11px !important;
    border-radius: 8px !important;
  }
  .tpl-detail-desc-wrap {
    padding: 14px !important;
    border-radius: 14px !important;
  }
  .tpl-detail-section-title {
    font-size: 14px !important;
    margin-bottom: 10px !important;
  }
  .tpl-detail-desc-content {
    font-size: 12.5px !important;
    line-height: 1.7 !important;
  }
  .tpl-detail-download-cta {
    flex-direction: column !important;
    text-align: center !important;
    padding: 16px 12px !important;
    border-radius: 14px !important;
    gap: 12px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .tpl-cta-info {
    width: 100% !important;
    min-width: 0 !important;
    text-align: center !important;
  }
  .tpl-cta-title {
    font-size: 15px !important;
  }
  .tpl-cta-desc {
    font-size: 11.5px !important;
  }
  .btn-cta-download-action {
    width: 100% !important;
    padding: 12px !important;
    font-size: 13px !important;
    justify-content: center !important;
    border-radius: 10px !important;
  }
  .tpl-detail-sidebar {
    width: 100% !important;
  }
  .tpl-sidebar-card {
    padding: 14px !important;
    border-radius: 14px !important;
  }
  .tpl-sidebar-list {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }
  .tpl-related-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
  .tpl-related-card {
    padding: 10px !important;
    border-radius: 12px !important;
  }
  .lightbox-close-btn {
    top: -12px;
    left: -12px;
    width: 38px;
    height: 38px;
    font-size: 18px;
  }

  /* 6. Footer & AdSense Anchor safe area */
  .app-site-footer {
    padding-bottom: 80px !important;
  }
}

/* 7. Extra-compact Mobile Smartphones (<= 480px) */
@media (max-width: 480px) {
  .btn-nav-admin .btn-text-mobile,
  .btn-nav-shield .btn-text-mobile,
  .btn-nav-share .btn-text-mobile {
    display: none !important;
  }
  .btn-nav-admin,
  .btn-nav-shield,
  .btn-nav-share {
    width: 32px !important;
    height: 32px !important;
    padding: 0 !important;
    justify-content: center !important;
  }
  .brand-info h1 span:first-child {
    font-size: 11.5px !important;
  }
}

/* ========================================================
   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;
}

/* ========================================================
   SITE FOOTER & ADSENSE LEGAL POLICIES (PRIVACY / TERMS)
   ======================================================== */
.app-site-footer {
  background: rgba(4, 7, 17, 0.95);
  border-top: 1px solid var(--border-subtle);
  padding: 30px 20px 40px;
  margin-top: 40px;
  width: 100%;
  box-sizing: border-box;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}

.footer-brand {
  font-size: 14px;
  font-weight: 800;
  color: #f1f5f9;
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12.5px;
}

.footer-links a {
  color: #94a3b8;
  text-decoration: none;
  font-weight: 700;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: #38bdf8;
  text-decoration: underline;
}

.footer-sep {
  color: rgba(255, 255, 255, 0.2);
}

.footer-copy {
  font-size: 11.5px;
  color: #64748b;
  line-height: 1.6;
  max-width: 680px;
}

/* Legal Policy Modal */
.legal-modal-card {
  background: #0b1329;
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 760px;
  max-height: 85vh;
  box-shadow: 0 30px 70px -15px rgba(0, 0, 0, 0.95);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

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

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

.legal-modal-body {
  padding: 24px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  color: #cbd5e1;
  font-size: 13px;
  line-height: 1.8;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.legal-modal-body h4 {
  font-size: 14px;
  font-weight: 800;
  color: #38bdf8;
  margin-top: 8px;
}

.legal-modal-body ul {
  padding-right: 20px;
  margin: 6px 0;
}

.legal-modal-body li {
  margin-bottom: 6px;
}

/* ========================================================
   VISUAL HOTSPOT EDITOR (FRONTPAGE MODERN REPLACEMENT)
   ======================================================== */
.editor-screen-wrap {
  animation: fadeIn 0.3s ease;
}

.editor-upload-card:hover {
  border-color: #a855f7 !important;
  box-shadow: 0 10px 40px rgba(168, 85, 247, 0.15);
}

.btn-quick-add-item {
  background: transparent;
  border: none;
  color: #e2e8f0;
  text-align: right;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
  width: 100%;
}

.btn-quick-add-item:hover {
  background: rgba(168, 85, 247, 0.18);
  color: #fff;
  transform: translateX(-2px);
}

.format-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  border-radius: 6px;
  width: 28px;
  height: 28px;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
}

.format-btn:hover {
  background: #38bdf8;
  border-color: #38bdf8;
  color: #020617;
}

/* ========================================================
   VOUCHER CARD GENERATOR, PRINTER & CLEANER SUITE STYLES
   ======================================================== */
.cards-layout {
  max-width: 1560px;
  margin: 0 auto;
  padding: 20px 16px 60px 16px;
}

.cards-header-banner {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(6, 182, 212, 0.08) 50%, rgba(15, 23, 42, 0.9) 100%);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.cards-header-info h2 {
  font-size: 22px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
  color: #f8fafc;
}

.cards-header-info p {
  color: var(--text-muted);
  font-size: 13.5px;
  line-height: 1.6;
  max-width: 780px;
}

.cards-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-header-setup {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 13.5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.35);
  transition: all 0.2s;
}

.btn-header-setup:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
}

.btn-header-cleaner {
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.4);
  color: #fda4af;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 13.5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.btn-header-cleaner:hover {
  background: rgba(244, 63, 94, 0.25);
  color: #fff;
  transform: translateY(-2px);
}

/* Feature Quick Highlights */
.cards-features-ribbon {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.card-feature-pill {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.feature-pill-icon {
  font-size: 22px;
  background: rgba(255, 255, 255, 0.05);
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.feature-pill-text h4 {
  font-size: 13.5px;
  font-weight: 700;
  color: #f1f5f9;
  margin-bottom: 3px;
}

.feature-pill-text p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Main Grid Layout */
.cards-work-grid {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 1100px) {
  .cards-work-grid {
    grid-template-columns: 1fr;
  }
}

/* Configuration Left Panel */
.cards-config-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.config-section-title {
  font-size: 14px;
  font-weight: 700;
  color: #38bdf8;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 8px;
  margin-top: 6px;
}

.btn-generate-main {
  background: linear-gradient(135deg, #10b981 0%, #0284c7 100%);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.25s;
  width: 100%;
}

.btn-generate-main:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.5);
}

/* Preview Right Panel */
.cards-preview-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Preview Actions Bar */
.cards-preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 16px;
}

.cards-view-tabs {
  display: flex;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 4px;
  gap: 4px;
}

.cards-view-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.cards-view-tab-btn:hover {
  color: #fff;
}

.cards-view-tab-btn.active {
  background: #3b82f6;
  color: #fff;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
}

.cards-action-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-print-a4 {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff;
  border: none;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
  transition: all 0.2s;
}

.btn-print-a4:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.45);
}

.btn-print-thermal {
  background: #334155;
  color: #f8fafc;
  border: 1px solid #475569;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-print-thermal:hover {
  background: #475569;
  color: #fff;
  transform: translateY(-2px);
}

.btn-export-csv, .btn-export-rsc {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-export-csv:hover, .btn-export-rsc:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

/* Quick Batch Stats */
.cards-quick-stats {
  display: flex;
  gap: 16px;
  background: rgba(15, 23, 42, 0.5);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  font-size: 13px;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.cards-quick-stats strong {
  color: #38bdf8;
  margin-right: 4px;
}

/* A4 Sheet Container on Screen */
.cards-a4-viewport {
  background: #1e293b;
  border-radius: var(--radius-md);
  padding: 24px;
  overflow-x: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

.a4-sheet-page {
  background: #ffffff;
  color: #0f172a;
  width: 210mm;
  min-height: 297mm;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  padding: 8mm 6mm;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  position: relative;
}

.a4-page-header {
  font-size: 10px;
  color: #94a3b8;
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  border-bottom: 1px dashed #cbd5e1;
  padding-bottom: 4px;
}

/* Grid arrangements */
.a4-cards-grid {
  display: grid;
  gap: 3mm;
  width: 100%;
}

.a4-cards-grid.grid-3x7 {
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(7, 1fr);
}

.a4-cards-grid.grid-4x6 {
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(6, 1fr);
}

.a4-cards-grid.grid-4x8 {
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(8, 1fr);
}

/* Individual Voucher Card */
.voucher-card {
  border: 1px dashed #94a3b8;
  border-radius: 6px;
  padding: 5px 7px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
  page-break-inside: avoid;
  break-inside: avoid;
  position: relative;
  overflow: hidden;
  font-family: var(--font-family);
}

/* Card Themes */
.voucher-card.theme-blue { border-top: 3px solid #2563eb; }
.voucher-card.theme-emerald { border-top: 3px solid #059669; }
.voucher-card.theme-purple { border-top: 3px solid #7c3aed; }
.voucher-card.theme-gold { border-top: 3px solid #d97706; }
.voucher-card.theme-monochrome { border-top: 3px solid #0f172a; }

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

.vc-brand {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 800;
  font-size: 11px;
  color: #0f172a;
  max-width: 70%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vc-wifi-icon {
  width: 13px;
  height: 13px;
  stroke: #2563eb;
  flex-shrink: 0;
}

.voucher-card.theme-emerald .vc-wifi-icon { stroke: #059669; }
.voucher-card.theme-purple .vc-wifi-icon { stroke: #7c3aed; }
.voucher-card.theme-gold .vc-wifi-icon { stroke: #d97706; }
.voucher-card.theme-monochrome .vc-wifi-icon { stroke: #0f172a; }

.vc-price-badge {
  background: #0f172a;
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 4px;
  white-space: nowrap;
}

.vc-body {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 3px 0;
}

.vc-qr-wrap {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vc-qr-img {
  width: 100%;
  height: 100%;
  display: block;
}

.vc-qr-placeholder {
  font-size: 9px;
  color: #94a3b8;
  font-weight: 700;
}

.vc-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.vc-pin-box {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 2px 5px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.vc-pin-label {
  font-size: 8.5px;
  font-weight: 700;
  color: #64748b;
}

.vc-pin-code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: 1px;
}

.vc-pass-box {
  padding: 1px 4px;
}

.vc-pass-code {
  font-size: 12px;
  color: #334155;
}

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

.vc-meta-tag {
  font-size: 8px;
  font-weight: 700;
  color: #334155;
  background: #e2e8f0;
  padding: 1px 4px;
  border-radius: 3px;
  white-space: nowrap;
}

.vc-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 7.5px;
  color: #64748b;
  margin-top: 2px;
  border-top: 1px solid #f1f5f9;
  padding-top: 2px;
}

/* Thermal POS View */
.cards-thermal-viewport {
  background: #1e293b;
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.thermal-slip {
  width: 290px;
  background: #ffffff;
  color: #000000;
  border: 1px solid #cbd5e1;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  padding: 16px 14px;
  text-align: center;
  font-family: var(--font-family);
  box-sizing: border-box;
}

.th-header {
  margin-bottom: 8px;
}

.th-brand {
  font-size: 16px;
  font-weight: 900;
  color: #000;
  margin-bottom: 2px;
}

.th-subtitle {
  font-size: 11px;
  color: #333;
  margin-bottom: 6px;
}

.th-divider {
  font-size: 10px;
  letter-spacing: -1px;
  color: #666;
  overflow: hidden;
  margin: 4px 0;
}

.th-qr-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin: 10px 0;
}

.th-qr-img {
  width: 100px;
  height: 100px;
  display: block;
}

.th-qr-hint {
  font-size: 9px;
  color: #444;
}

.th-pin-box {
  border: 2px solid #000;
  border-radius: 6px;
  padding: 8px 6px;
  margin: 10px 0;
  background: #fff;
}

.th-pin-title {
  font-size: 10px;
  font-weight: 700;
  color: #333;
}

.th-pin-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 2px;
  color: #000;
  margin-top: 2px;
}

.th-info-table {
  font-size: 11px;
  margin: 8px 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: right;
}

.th-info-row {
  display: flex;
  justify-content: space-between;
}

.th-cut-line {
  font-size: 11px;
  font-weight: 700;
  margin-top: 6px;
  color: #444;
}

/* Script Code View */
.cards-script-viewport {
  background: #040711;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  position: relative;
}

.cards-script-viewport pre {
  margin: 0;
  max-height: 480px;
  overflow-y: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  line-height: 1.5;
  color: #38bdf8;
  white-space: pre-wrap;
  word-break: break-all;
}

/* Table View */
.cards-table-viewport {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow-x: auto;
}

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

.cards-table th {
  background: rgba(15, 23, 42, 0.9);
  padding: 12px 14px;
  color: #94a3b8;
  font-weight: 700;
  border-bottom: 1px solid var(--border-subtle);
}

.cards-table td {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: #f1f5f9;
}

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

.table-id-badge {
  font-size: 11px;
  color: var(--text-muted);
}

.table-pin-code {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
}

.badge-tag-val {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11.5px;
  font-weight: 700;
}

.badge-profile-tag {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11.5px;
}

.btn-table-copy {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 11.5px;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-table-copy:hover {
  background: #3b82f6;
}

/* Modals */
.cards-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(2, 6, 23, 0.85);
  backdrop-filter: blur(6px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.cards-modal-backdrop.show {
  display: flex;
}

.cards-modal-card {
  background: #0b1120;
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-lg);
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  animation: modalFadeIn 0.25s ease-out;
}

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

.cards-modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cards-modal-header h3 {
  font-size: 18px;
  font-weight: 800;
  color: #f8fafc;
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
}

.btn-modal-close:hover {
  color: #fff;
}

.cards-modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-steps-guide {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  font-size: 13px;
  line-height: 1.7;
  color: #e2e8f0;
}

.modal-steps-guide ol {
  padding-right: 20px;
  margin-top: 6px;
}

.modal-code-box {
  background: #020617;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 14px;
  position: relative;
}

.modal-code-box pre {
  margin: 0;
  max-height: 300px;
  overflow-y: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  line-height: 1.5;
  color: #34d399;
  white-space: pre-wrap;
  word-break: break-all;
}

.cards-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.btn-modal-copy {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 13.5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-modal-copy:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
}

.cards-empty-placeholder {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.cards-empty-placeholder h4 {
  font-size: 18px;
  color: #f1f5f9;
}

.cards-empty-placeholder p {
  font-size: 13.5px;
  max-width: 400px;
}

/* ========================================================
   PRINT MEDIA RULES (A4 & THERMAL PRINTERS)
   ======================================================== */
#cardsPrintArea {
  display: none;
}

@media print {
  /* Hide all app components during printing */
  html, body {
    background: #ffffff !important;
    color: #000000 !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
  }

  body * {
    visibility: hidden !important;
  }

  /* Make only the print container visible */
  #cardsPrintArea, #cardsPrintArea * {
    visibility: visible !important;
  }

  #cardsPrintArea {
    display: block !important;
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
    color: #000000 !important;
  }

  /* A4 Print layout rules */
  #cardsPrintArea.print-mode-a4 {
    width: 100% !important;
  }

  #cardsPrintArea.print-mode-a4 .a4-sheet-page {
    box-shadow: none !important;
    margin: 0 !important;
    padding: 4mm 4mm !important;
    page-break-after: always !important;
    break-after: page !important;
    width: 100% !important;
    height: 100% !important;
  }

  #cardsPrintArea.print-mode-a4 .a4-page-header {
    display: none !important;
  }

  #cardsPrintArea.print-mode-a4 .voucher-card {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
    border: 1px dashed #64748b !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* Thermal Print layout rules (80mm & 58mm) */
  #cardsPrintArea.print-mode-thermal {
    width: 80mm !important;
    margin: 0 auto !important;
  }

  #cardsPrintArea.print-mode-thermal .thermal-slip {
    box-shadow: none !important;
    margin: 0 auto !important;
    border: none !important;
    page-break-after: always !important;
    break-after: page !important;
    width: 100% !important;
    padding: 10px 6px !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  @page {
    size: auto;
    margin: 5mm;
  }
}

/* Manual Input & Unit Selector & Quick Chips */
.input-with-unit-group {
  display: flex;
  gap: 8px;
  align-items: center;
}

.input-with-unit-group .manual-val-input,
.input-with-unit-group .manual-quota-input {
  flex: 1;
  font-size: 15px;
  font-weight: 700;
  color: #38bdf8;
  font-family: 'JetBrains Mono', monospace;
}

.input-with-unit-group .manual-unit-select {
  width: 150px;
  flex-shrink: 0;
  font-weight: 600;
  cursor: pointer;
}

.quick-chips-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.quick-chip-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.quick-chip-btn:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.35);
  color: #fff;
  transform: translateY(-1px);
}

.quick-chip-btn.active {
  background: #0284c7;
  border-color: #38bdf8;
  color: #fff;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.35);
}

/* SEO Educational Knowledge Base Section */
.site-seo-guide-section {
  background: linear-gradient(180deg, rgba(11, 17, 32, 0.95) 0%, rgba(6, 9, 19, 1) 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 48px 16px 36px 16px;
  color: var(--text-main);
  direction: rtl;
}

.seo-guide-container {
  max-width: 1300px;
  margin: 0 auto;
}

.seo-guide-header {
  text-align: center;
  max-width: 820px;
  margin: 0 auto 36px auto;
}

.seo-guide-tag {
  display: inline-block;
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.25);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 12px;
}

.seo-guide-header h2 {
  font-size: 24px;
  font-weight: 800;
  color: #f8fafc;
  margin-bottom: 10px;
  line-height: 1.4;
}

.seo-guide-header p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.7;
}

.seo-guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.seo-guide-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 24px 20px;
  transition: all 0.25s ease;
}

.seo-guide-card:hover {
  background: rgba(15, 23, 42, 0.9);
  border-color: rgba(56, 189, 248, 0.3);
  transform: translateY(-2px);
}

.guide-card-icon {
  font-size: 28px;
  margin-bottom: 14px;
}

.seo-guide-card h3 {
  font-size: 16px;
  font-weight: 800;
  color: #38bdf8;
  margin-bottom: 10px;
}

.seo-guide-card p {
  color: #cbd5e1;
  font-size: 13.5px;
  line-height: 1.8;
}

.seo-guide-card strong {
  color: #fff;
}

.seo-quick-links-bar {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.quick-links-title {
  font-size: 13px;
  font-weight: 700;
  color: #94a3b8;
}

.quick-links-tags {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.quick-links-tags a {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 6px;
  transition: all 0.2s;
}

.quick-links-tags a:hover {
  background: #0284c7;
  color: #fff;
  border-color: #38bdf8;
}





/* Shield Modal Tab Buttons */
.shield-tab-btn {
  background: transparent;
  color: #94a3b8;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.shield-tab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}
.shield-tab-btn.active {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

/* ========================================================
   ACCESS POINT & ROUTER FIRMWARES CENTER STYLES
   ======================================================== */
.fw-filter-toolbar {
  margin: 20px 0 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.fw-search-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(2, 6, 23, 0.7);
  border: 1.5px solid rgba(56, 189, 248, 0.3);
  border-radius: 14px;
  padding: 12px 18px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

.fw-search-wrap svg {
  color: #38bdf8;
  flex-shrink: 0;
}

.fw-search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-family: inherit;
  font-size: 14px;
}

.fw-search-input::placeholder {
  color: #64748b;
}

.fw-brand-pills-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: none;
}

.fw-brand-pills-row::-webkit-scrollbar {
  display: none;
}

.fw-brand-pill {
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #cbd5e1;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.fw-brand-pill:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(56, 189, 248, 0.4);
  transform: translateY(-1px);
}

.fw-brand-pill.active {
  background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%) !important;
  color: #ffffff !important;
  border-color: #38bdf8 !important;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
}

.fw-grid-container {
  min-height: 280px;
}

.fw-state-box {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  background: rgba(15, 23, 42, 0.5);
  border: 1.5px dashed rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  gap: 12px;
}

.fw-state-box h3 {
  margin: 0;
  font-size: 17px;
  color: #e2e8f0;
}

.fw-state-box p {
  margin: 0;
  font-size: 13px;
  color: #94a3b8;
}

.fw-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 20px;
}

.fw-card {
  background: #0b1329;
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.fw-card:hover {
  border-color: rgba(56, 189, 248, 0.6);
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5), 0 0 25px rgba(56, 189, 248, 0.15);
}

.fw-card-media {
  position: relative;
  width: 100%;
  height: 180px;
  background: #020617;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fw-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.fw-card:hover .fw-card-img {
  transform: scale(1.04);
}

.fw-card-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: #38bdf8;
}

.fw-placeholder-icon {
  font-size: 42px;
}

.fw-placeholder-brand {
  font-size: 12px;
  font-weight: 800;
  color: #94a3b8;
  text-transform: uppercase;
}

.fw-card-badges {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.fw-brand-tag {
  font-size: 11px;
  font-weight: 900;
  padding: 3px 9px;
  border-radius: 12px;
  color: #fff;
  letter-spacing: 0.3px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.badge-tplink { background: linear-gradient(135deg, #0d9488, #059669); }
.badge-tenda { background: linear-gradient(135deg, #ea580c, #c2410c); }
.badge-totolink { background: linear-gradient(135deg, #0284c7, #1d4ed8); }
.badge-ubnt { background: linear-gradient(135deg, #475569, #1e293b); }
.badge-openwrt { background: linear-gradient(135deg, #06b6d4, #0891b2); }
.badge-mikrotik { background: linear-gradient(135deg, #dc2626, #b91c1c); }
.badge-netgear { background: linear-gradient(135deg, #7c3aed, #6d28d9); }
.badge-generic { background: linear-gradient(135deg, #475569, #334155); }

.fw-model-tag {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e2e8f0;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 12px;
}

.fw-card-content {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.fw-card-title {
  margin: 0 0 10px 0;
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.fw-card-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.fw-meta-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 3px 8px;
  font-size: 11px;
  color: #cbd5e1;
  font-weight: 600;
}

.fw-card-desc {
  margin: 0 0 16px 0;
  font-size: 12.5px;
  line-height: 1.6;
  color: #94a3b8;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.fw-card-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

.btn-fw-download {
  flex: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
}

.btn-fw-download:hover {
  background: linear-gradient(135deg, #0369a1 0%, #1d4ed8 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(2, 132, 199, 0.5);
}

.btn-fw-details {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  border-radius: 12px;
  padding: 10px 10px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-fw-details:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(56, 189, 248, 0.4);
}

.fw-admin-bar {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-fw-edit {
  flex: 1;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fbbf24;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
}

.btn-fw-edit:hover {
  background: rgba(245, 158, 11, 0.25);
  color: #fff;
}

.btn-fw-del {
  flex: 1;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #f87171;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
}

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



/* ============================================================
   DESIGN LAYOUT PICKER (classic vs PRO split-screen)
   ============================================================ */
.design-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 8px 0 16px;
  width: 100%;
  box-sizing: border-box;
}

.design-opt {
  background: rgba(4, 7, 17, 0.7);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 9px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 7px;
  text-align: right;
  font-family: inherit;
  transition: all 0.2s;
}

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

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

.design-thumb {
  position: relative;
  display: block;
  width: 100%;
  height: 58px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.design-thumb-classic {
  background: radial-gradient(circle at 50% 0%, #0f766e 0%, #020617 72%);
}

.design-thumb-classic::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 52%;
  transform: translate(-50%, -50%);
  width: 54%;
  height: 62%;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(45, 212, 191, 0.55);
}

.design-thumb-pro {
  background: #eef2f8;
}

.design-thumb-pro::before {
  content: '';
  position: absolute;
  inset: 0 50% 0 0;
  background: linear-gradient(160deg, #1e3a8a 0%, #0b1220 100%);
}

.design-thumb-pro::after {
  content: '';
  position: absolute;
  left: 8%;
  top: 24%;
  width: 38%;
  height: 52%;
  border-radius: 4px;
  background: #ffffff;
  border: 1px solid #dbe3ee;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.2);
}

.design-name {
  font-size: 11.5px;
  font-weight: 800;
  color: #e2e8f0;
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.3;
}

.design-name em {
  font-style: normal;
  font-size: 9px;
  font-weight: 900;
  color: #020617;
  background: linear-gradient(135deg, #34d399, #10b981);
  padding: 1px 6px;
  border-radius: 6px;
  white-space: nowrap;
}

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

.design-opt.is-wide {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  text-align: right;
}

.design-opt.is-wide .design-thumb {
  width: 92px;
  height: 60px;
  flex: 0 0 auto;
}

.design-opt-txt {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

/* NOVA - printed voucher thumbnail */
.design-thumb-nova {
  background: #fbfcfe;
  border-color: rgba(19, 28, 46, 0.14);
  box-shadow: 0 2px 6px rgba(19, 28, 46, 0.12);
}

.design-thumb-nova::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 40%;
  border-top: 2px dashed #c9d2e0;
}

.design-thumb-nova::after {
  content: '';
  position: absolute;
  inset: 56% 14% 16% 14%;
  border-radius: 2px;
  background: repeating-linear-gradient(90deg, #1f2937 0 2px, transparent 2px 4px);
  opacity: 0.85;
}

/* AURORA - light glass with colorful blobs */
.design-thumb-aurora {
  background: linear-gradient(160deg, #eef1fb, #eef4ff);
  border-color: rgba(255, 255, 255, 0.9);
}
.design-thumb-aurora::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 18%, rgba(99, 102, 241, 0.55), transparent 55%),
    radial-gradient(circle at 82% 78%, rgba(139, 92, 246, 0.5), transparent 55%),
    radial-gradient(circle at 60% 30%, rgba(56, 189, 248, 0.4), transparent 50%);
}
.design-thumb-aurora::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 44%;
  height: 60%;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 6px 18px rgba(60, 70, 140, 0.25);
}

/* MINIMAL - pure white with a big type line */
.design-thumb-minimal {
  background: #ffffff;
  border-color: #e7eaee;
}
.design-thumb-minimal::before {
  content: '';
  position: absolute;
  top: 16px;
  right: 16px;
  width: 46px;
  height: 5px;
  border-radius: 2px;
  background: #0b0f16;
}
.design-thumb-minimal::after {
  content: '';
  position: absolute;
  inset: 34px 16px 14px 16px;
  background:
    linear-gradient(#0b0f16, #0b0f16) 0 0 / 70% 4px no-repeat,
    linear-gradient(#e7eaee, #e7eaee) 0 12px / 100% 2px no-repeat,
    linear-gradient(#e7eaee, #e7eaee) 0 22px / 100% 2px no-repeat,
    linear-gradient(#0b0f16, #0b0f16) 0 36px / 100% 6px no-repeat;
}

/* ============================================================
   FEEDBACK (suggestions & problems)
   ============================================================ */
.feedback-fab {
  position: fixed;
  bottom: 22px;
  inset-inline-end: 22px;
  z-index: 2000;
  width: 56px; height: 56px;
  border-radius: 50%;
  border: 1px solid rgba(59, 130, 246, 0.5);
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 12px 28px -8px rgba(37, 99, 235, 0.7);
  transition: transform 0.15s, box-shadow 0.15s;
}
.feedback-fab:hover { transform: translateY(-3px) scale(1.05); box-shadow: 0 18px 34px -8px rgba(37, 99, 235, 0.85); }
.feedback-fab-ic { display: grid; place-items: center; }

.feedback-type-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.feedback-type-btn {
  border: 1.5px solid var(--border-subtle);
  background: rgba(15, 23, 42, 0.5);
  color: #cbd5e1;
  border-radius: 11px;
  padding: 10px;
  font-size: 13px; font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
}
.feedback-type-btn.active {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.16);
  color: #93c5fd;
  box-shadow: 0 0 14px rgba(59, 130, 246, 0.25);
}

.admin-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px; height: 20px;
  margin-inline-start: 6px;
  padding: 0 6px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 11px; font-weight: 900;
  vertical-align: middle;
}

/* Language toggle button */
.btn-nav-lang {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1.5px solid var(--border-subtle);
  background: rgba(15, 23, 42, 0.5);
  color: #cbd5e1;
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
  white-space: nowrap;
}
.btn-nav-lang:hover { border-color: var(--primary, #3b82f6); color: #93c5fd; }

/* New design thumbnails: LUXE (gold/black) + BRUTAL (bold paper) */
.design-thumb-luxe{
  background:
    radial-gradient(120% 90% at 50% -10%, rgba(212,175,55,.55) 0%, transparent 55%),
    linear-gradient(160deg,#07070a,#12100a 60%,#07070a);
  border:1px solid rgba(212,175,55,.45);
  position:relative;
}
.design-thumb-luxe::after{
  content:"";position:absolute;left:22%;right:22%;top:34%;bottom:26%;
  border:1px solid rgba(212,175,55,.75);border-radius:5px;
  background:linear-gradient(180deg,rgba(212,175,55,.18),rgba(0,0,0,.15));
  box-shadow:0 0 18px rgba(212,175,55,.35);
}
.design-thumb-luxe::before{
  content:"";position:absolute;left:34%;right:34%;top:44%;height:2px;border-radius:2px;
  background:linear-gradient(90deg,transparent,#f0dda6,transparent);z-index:2;
}

.design-thumb-brutal{
  background:#f2efe6;
  border:2px solid #0d0d0d;
  position:relative;
}
.design-thumb-brutal::after{
  content:"";position:absolute;left:16%;right:16%;top:26%;bottom:24%;
  border:3px solid #0d0d0d;background:#fffdf6;box-shadow:5px 5px 0 #0d0d0d;
}
.design-thumb-brutal::before{
  content:"";position:absolute;left:24%;right:24%;top:38%;height:10px;background:#ffe94a;
  border:2px solid #0d0d0d;z-index:2;
}
