/* ================================================================
   vibranta — Style Sheet
   Dark glassmorphism theme with purple/cyan accent palette
   ================================================================ */

/* ── Reset & Base ─────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #05050f;
  --bg-2: #0e0e20;
  --glass: rgba(255, 255, 255, 0.045);
  --glass-b: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.09);
  --border-h: rgba(255, 255, 255, 0.18);

  --purple: #7c3aed;
  --purple-l: #a78bfa;
  --purple-g: linear-gradient(135deg, #7c3aed, #a855f7);
  --cyan: #06b6d4;
  --cyan-g: linear-gradient(135deg, #0891b2, #06b6d4);
  --pink: #ec4899;
  --pink-g: linear-gradient(135deg, #db2777, #f472b6);
  --green: #10b981;
  --green-g: linear-gradient(135deg, #059669, #10b981);
  --red: #ef4444;

  --text: #f0f0f8;
  --text-m: #9ca3af;
  --text-s: #6b7280;

  --radius: 14px;
  --radius-s: 8px;
  --shadow: 0 8px 32px rgba(0, 0, 0, .45);
  --shadow-l: 0 20px 60px rgba(0, 0, 0, .6);

  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  max-width: 100vw;
}

body.auth-pending .header,
body.auth-pending .main {
  visibility: hidden;
}

/* ── Ambient orbs ─────────────────────────────────────────────── */
.bg-orbs {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.18;
  animation: drift 18s ease-in-out infinite alternate;
}

.orb-1 {
  width: 520px;
  height: 520px;
  background: var(--purple);
  top: -120px;
  left: -120px;
  animation-delay: 0s;
}

.orb-2 {
  width: 400px;
  height: 400px;
  background: var(--cyan);
  bottom: -80px;
  right: -80px;
  animation-delay: -6s;
}

.orb-3 {
  width: 300px;
  height: 300px;
  background: var(--pink);
  top: 40%;
  left: 55%;
  animation-delay: -12s;
}

@keyframes drift {
  from {
    transform: translate(0, 0) scale(1);
  }

  to {
    transform: translate(40px, 30px) scale(1.08);
  }
}

/* ── Header ───────────────────────────────────────────────────── */
.header {
  position: sticky;
  top: 1.5rem;
  z-index: 100;
  background: var(--glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 99px; /* Pill shape for modern look */
  max-width: 1240px;
  width: calc(100% - 3rem);
  margin: 1.5rem auto;
  box-shadow: var(--shadow);
}

.header-inner {
  padding: 0.8rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.logo-img {
  height: 36px;
  width: auto;
  object-fit: contain;
  display: block;
}

.logo-text {
  font-size: 1.25rem;
  font-weight: 800;
  background: var(--purple-g);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Step nav */
.step-nav {
  display: flex;
  align-items: center;
  gap: 0;
}

.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  opacity: 0.4;
  transition: opacity var(--transition);
}

.step-item.active {
  opacity: 1;
}

.step-item.done {
  opacity: 0.85;
}

.step-circle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid var(--border-h);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  background: var(--glass);
  position: relative;
  transition: all var(--transition);
}

.step-item.active .step-circle {
  border-color: var(--purple);
  background: rgba(124, 58, 237, 0.25);
  box-shadow: 0 0 16px rgba(124, 58, 237, 0.5);
}

.step-item.done .step-circle {
  border-color: var(--green);
  background: rgba(16, 185, 129, 0.2);
}

.sn {
  transition: opacity var(--transition);
}

.sc {
  position: absolute;
  opacity: 0;
  font-size: 0.75rem;
  color: var(--green);
  transition: opacity var(--transition);
}

.step-item.done .sn {
  opacity: 0;
}

.step-item.done .sc {
  opacity: 1;
}

.step-lbl {
  font-size: 0.72rem;
  font-weight: 500;
  white-space: nowrap;
}

.step-line {
  width: 48px;
  height: 2px;
  background: var(--border);
  margin-bottom: 18px;
  transition: background var(--transition);
}

.step-line.done {
  background: var(--green);
}

/* Header user area */
.header-user {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-left: auto;
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--text-m);
  background: rgba(124, 58, 237, 0.12);
  border: 1px solid rgba(124, 58, 237, 0.25);
  padding: 0.3rem 0.8rem;
  border-radius: 99px;
}

.user-badge i {
  color: var(--purple-l);
}

/* ── Main layout ──────────────────────────────────────────────── */
.main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  position: relative;
  z-index: 1;
}

/* Step panels */
.step-panel {
  display: none;
  animation: fadeUp 0.4s ease both;
}

.step-panel.active {
  display: block;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Panel header ─────────────────────────────────────────────── */
.panel-head {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin-bottom: 1.8rem;
}

.panel-icon {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  box-shadow: var(--shadow);
}

.pi-purple {
  background: var(--purple-g);
}

.pi-cyan {
  background: var(--cyan-g);
}

.pi-pink {
  background: var(--pink-g);
}

.pi-green {
  background: var(--green-g);
}

.panel-title {
  font-size: 1.7rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.panel-sub {
  color: var(--text-m);
  font-size: 0.95rem;
}

/* ── Glass Card ───────────────────────────────────────────────── */
.card {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  margin-bottom: 1.4rem;
}

.card-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-title i {
  color: var(--purple-l);
}

/* ── Two-col grid ─────────────────────────────────────────────── */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.4rem;
}

@media (max-width: 768px) {
  .two-col {
    grid-template-columns: 1fr;
  }
}

.two-col-send {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.4rem;
}

@media (max-width: 900px) {
  .two-col-send {
    grid-template-columns: 1fr;
  }
}

/* ── Form elements ────────────────────────────────────────────── */
.form-group {
  margin-bottom: 1.1rem;
}

label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-m);
  margin-bottom: 6px;
}

.opt {
  font-weight: 400;
  color: var(--text-s);
}

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

.ii {
  position: absolute;
  left: 13px;
  color: var(--text-s);
  font-size: 0.85rem;
  pointer-events: none;
}

input[type="email"],
input[type="text"],
input[type="password"],
input[type="number"],
select.select-input,
textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-h);
  border-radius: var(--radius-s);
  color: var(--text);
  font-family: inherit;
  font-size: 0.92rem;
  padding: 0.65rem 1rem 0.65rem 2.5rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

input[type="text"]:not(.input-wrap input),
input[type="number"]:not(.input-wrap input) {
  padding-left: 0.85rem;
}

select.select-input {
  padding-left: 0.85rem;
  appearance: none;
}

textarea {
  padding: 0.8rem 1rem;
  resize: vertical;
  min-height: 160px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2);
}

/* ── Color input — fix dark theme rendering ─────────────────── */
input[type="color"].color-input {
  padding: 3px;
  height: 42px;
  width: 100%;
  cursor: pointer;
  border-radius: var(--radius-s);
  border: 1px solid var(--border-h);
  background: rgba(255, 255, 255, 0.06);
  -webkit-appearance: none;
}

input[type="color"].color-input::-webkit-color-swatch-wrapper {
  padding: 2px;
  border-radius: 6px;
}

input[type="color"].color-input::-webkit-color-swatch {
  border: none;
  border-radius: 5px;
}

/* ── Checkbox — fix dark theme ─────────────────────────────── */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.9rem;
  user-select: none;
  padding: 0.5rem 0.75rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  transition: background var(--transition), border-color var(--transition);
}

.checkbox-label:hover {
  background: rgba(124, 58, 237, 0.1);
  border-color: rgba(124, 58, 237, 0.3);
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--purple);
  padding: 0;
  border-radius: 4px;
  flex-shrink: 0;
}

/* ── Select dropdown fix ─────────────────────────────────────── */
select.select-input option {
  background: #1a1a2e;
  color: var(--text);
}

.btn-pass-toggle {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-s);
  font-size: 0.9rem;
  padding: 4px;
}

.btn-pass-toggle:hover {
  color: var(--text);
}

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

/* ── Buttons ──────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  border: none;
  border-radius: var(--radius-s);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

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

.btn-primary {
  background: var(--purple-g);
  color: #fff;
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.4);
}

.btn-primary:hover {
  box-shadow: 0 6px 28px rgba(124, 58, 237, 0.6);
  filter: brightness(1.08);
}

.btn-secondary {
  background: rgba(6, 182, 212, 0.15);
  color: var(--cyan);
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.btn-secondary:hover {
  background: rgba(6, 182, 212, 0.25);
  border-color: var(--cyan);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-h);
}

.btn-outline:hover {
  background: var(--glass-b);
  border-color: var(--purple-l);
  color: var(--purple-l);
}

.btn-ghost {
  background: none;
  color: var(--text-m);
  border: 1px solid transparent;
}

.btn-ghost:hover {
  color: var(--text);
  border-color: var(--border);
}

.btn-sm {
  padding: 0.4rem 0.85rem;
  font-size: 0.8rem;
}

.w-full {
  width: 100%;
  justify-content: center;
}

.mt-1 {
  margin-top: 0.8rem;
}

/* ── Help link ─────────────────────────────────────────────────── */
.help-link {
  font-size: 0.78rem;
  color: var(--cyan);
  text-decoration: none;
  margin-left: 0.5rem;
  font-weight: 500;
}

.help-link:hover {
  text-decoration: underline;
}

/* ── Status message ───────────────────────────────────────────── */
.status-msg {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-s);
  font-size: 0.88rem;
  font-weight: 500;
  animation: fadeUp 0.3s ease;
}

.status-msg.success {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #6ee7b7;
}

.status-msg.error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.hidden {
  display: none !important;
}

/* ── Guide card ───────────────────────────────────────────────── */
.guide-card {
  position: relative;
}

.guide-steps {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.guide-step {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.g-num {
  min-width: 30px;
  height: 30px;
  background: var(--purple-g);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 800;
  flex-shrink: 0;
}

.guide-step p {
  font-size: 0.82rem;
  color: var(--text-m);
  margin-top: 3px;
}

.guide-step strong {
  font-size: 0.9rem;
}

/* ── Drop Zone ────────────────────────────────────────────────── */
.drop-zone {
  border: 2px dashed var(--border-h);
  border-radius: var(--radius);
  padding: 3rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  background: rgba(255, 255, 255, 0.02);
}

.drop-zone:hover,
.drop-zone.over {
  border-color: var(--purple);
  background: rgba(124, 58, 237, 0.06);
}

.drop-zone.small {
  padding: 2rem 1.5rem;
}

.drop-icon-wrap {
  margin-bottom: 1rem;
}

.drop-icon {
  font-size: 3rem;
  color: var(--purple-l);
}

.drop-zone h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.drop-zone p {
  color: var(--text-m);
  font-size: 0.88rem;
  margin-bottom: 1.2rem;
}

.hidden-input {
  display: none;
}

/* CSV format box */
.csv-format-box {
  margin-top: 1.2rem;
  padding: 1rem 1.2rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  font-size: 0.85rem;
}

.csv-format-box p {
  color: var(--text-m);
  margin-bottom: 0.5rem;
}

.csv-format-box pre {
  color: var(--cyan);
  font-family: 'Courier New', monospace;
  font-size: 0.82rem;
  overflow-x: auto;
}

.csv-format-box code {
  color: var(--purple-l);
}

/* ── Data table ───────────────────────────────────────────────── */
.preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.preview-head h3 {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.badges {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.badge {
  padding: 4px 12px;
  border-radius: 99px;
  font-size: 0.78rem;
  font-weight: 600;
  display: flex;
  gap: 5px;
  align-items: center;
}

.badge-green {
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-blue {
  background: rgba(6, 182, 212, 0.12);
  color: #67e8f9;
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-s);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.data-table th {
  background: rgba(124, 58, 237, 0.15);
  color: var(--purple-l);
  border-bottom: 1px solid var(--border);
  padding: 0.65rem 1rem;
  text-align: left;
  font-weight: 600;
  white-space: nowrap;
}

.data-table td {
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-m);
}

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

.data-table tbody tr:hover td {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}

.table-note {
  font-size: 0.78rem;
  color: var(--text-s);
  margin-top: 0.7rem;
}

/* ── Designer layout ──────────────────────────────────────────── */
.designer-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1.4rem;
}

@media (max-width: 960px) {
  .designer-layout {
    grid-template-columns: 1fr;
  }
}

.designer-canvas-card {
  overflow: hidden;
}

.canvas-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.9rem;
}

.toolbar-hint {
  font-size: 0.82rem;
  color: var(--text-m);
}

.toolbar-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* ── Format Manager Panel ──────────────────────────────────────── */
.format-manager {
  background: rgba(15, 12, 41, 0.97);
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  margin-bottom: 0.9rem;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  animation: slideDown 0.18s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fm-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.9rem;
  background: rgba(124, 58, 237, 0.12);
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--violet);
}

.fm-section {
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid var(--border);
}

.fm-section:last-child {
  border-bottom: none;
}

.fm-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-m);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.45rem;
}

.fm-save-row {
  display: flex;
  gap: 0.5rem;
}

.fm-save-row .input-dark {
  flex: 1;
  min-width: 0;
}

.fmt-count {
  font-weight: 400;
  color: var(--text-s);
  font-size: 0.75rem;
  text-transform: none;
  letter-spacing: 0;
}

.fmt-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  max-height: 260px;
  overflow-y: auto;
}

.fmt-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  padding: 0.5rem 0.65rem;
  transition: background 0.15s;
}

.fmt-item:hover {
  background: rgba(124, 58, 237, 0.1);
  border-color: var(--violet);
}

.fmt-item-info {
  flex: 1;
  min-width: 0;
}

.fmt-item-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-h);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fmt-item-meta {
  font-size: 0.72rem;
  color: var(--text-s);
  margin-top: 1px;
}

.fmt-item-actions {
  display: flex;
  gap: 0.35rem;
  flex-shrink: 0;
}

.fmt-item-actions .btn-icon {
  padding: 4px 7px;
  font-size: 0.75rem;
}

.fmt-item-actions .btn-icon.del {
  color: var(--red);
}

.fmt-item-actions .btn-icon.del:hover {
  background: rgba(239, 68, 68, 0.15);
}

.tpl-container {
  position: relative;
  display: inline-block;
  width: 100%;
  cursor: crosshair;
  border-radius: var(--radius-s);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.tpl-container img {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
  user-select: none;
}

/* Text field overlay chips on image */
.field-chip {
  position: absolute;
  transform: translate(-50%, -50%);
  background: rgba(124, 58, 237, 0.85);
  border: 2px solid #a78bfa;
  border-radius: 6px;
  padding: 3px 10px;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: move;
  user-select: none;
  z-index: 10;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  transition: box-shadow 0.2s;
}

.field-chip.qr-chip {
  background: rgba(6, 182, 212, 0.85);
  border-color: var(--cyan);
}

.field-chip:hover {
  box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.5);
}

.field-chip .fc-edit {
  margin-left: 5px;
  opacity: 0.75;
  cursor: pointer;
  font-size: 0.7rem;
}

.field-chip .fc-edit:hover {
  opacity: 1;
}

/* Designer sidebar */
.sidebar-card {
  margin-bottom: 1.2rem;
}

.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.sidebar-head h3 {
  font-size: 0.95rem;
  font-weight: 700;
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.sidebar-add-btns {
  display: flex;
  gap: 0.4rem;
}

.sidebar-hint {
  font-size: 0.8rem;
  color: var(--text-s);
  margin-bottom: 0.8rem;
}

.fields-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 260px;
  overflow-y: auto;
}

.field-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  background: rgba(124, 58, 237, 0.1);
  border: 1px solid rgba(124, 58, 237, 0.25);
  font-size: 0.82rem;
}

.field-item.qr-item {
  background: rgba(6, 182, 212, 0.1);
  border-color: rgba(6, 182, 212, 0.25);
}

.field-item-label {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.field-item-label i {
  color: var(--purple-l);
}

.field-item.qr-item .field-item-label i {
  color: var(--cyan);
}

.field-item-actions {
  display: flex;
  gap: 4px;
}

.btn-icon {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 6px;
  color: var(--text-s);
  border-radius: 4px;
  font-size: 0.78rem;
  transition: color var(--transition);
}

.btn-icon:hover {
  color: var(--text);
}

.empty-small {
  text-align: center;
  padding: 1.5rem;
  color: var(--text-s);
  font-size: 0.83rem;
}

/* ── Zoom controls ────────────────────────────────────────────── */
.zoom-controls {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.8rem;
  padding: 0.4rem 0.6rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
}

.btn-zoom {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--border);
  color: var(--text-m);
  border-radius: 6px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.75rem;
  transition: all var(--transition);
}

.btn-zoom:hover {
  background: rgba(124, 58, 237, 0.2);
  color: var(--purple-l);
  border-color: var(--purple);
}

.zoom-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-m);
  min-width: 42px;
  text-align: center;
}

.preview-zoom-wrap {
  width: 100%;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--border);
  margin-top: 0.5rem;
  cursor: zoom-in;
  background: rgba(0, 0, 0, 0.3);
}

.preview-img-el {
  width: 100%;
  display: block;
  transform-origin: top center;
  transition: transform 0.2s ease;
  user-select: none;
}

/* ── Fullscreen preview modal ─────────────────────────────────── */
.fullscreen-preview-box {
  position: relative;
  max-width: 95vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fullscreen-img {
  max-width: 100%;
  max-height: 88vh;
  border-radius: 10px;
  box-shadow: var(--shadow-l);
  object-fit: contain;
}

.fullscreen-close {
  position: absolute;
  top: -14px;
  right: -14px;
  background: rgba(5, 5, 15, 0.95) !important;
  border: 1px solid var(--border-h) !important;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem !important;
  border-radius: 50%;
  z-index: 10;
}

/* ── Send panel ───────────────────────────────────────────────── */
.hint-text {
  font-size: 0.82rem;
  color: var(--text-m);
  margin-bottom: 1.1rem;
}

.hint-text code {
  color: var(--cyan);
  background: rgba(6, 182, 212, 0.1);
  padding: 1px 6px;
  border-radius: 4px;
}

.vars-box {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  padding: 0.9rem;
  margin-top: 0.5rem;
}

.vars-box p {
  font-size: 0.8rem;
  color: var(--text-m);
  margin-bottom: 0.6rem;
}

.vars-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.var-chip {
  padding: 4px 12px;
  border-radius: 99px;
  background: rgba(124, 58, 237, 0.15);
  border: 1px solid rgba(124, 58, 237, 0.35);
  color: var(--purple-l);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  font-family: monospace;
  transition: all 0.2s;
}

.var-chip:hover {
  background: rgba(124, 58, 237, 0.3);
  color: #fff;
}

/* Summary card */
.sum-list {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin-bottom: 1.4rem;
}

.sum-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
}

.sum-row span:first-child {
  color: var(--text-m);
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.sum-row i {
  color: var(--purple-l);
}

.sum-val {
  font-weight: 700;
  color: var(--text);
}

.send-btn {
  width: 100%;
  justify-content: center;
  padding: 0.85rem;
  font-size: 1rem;
  margin-top: 0.5rem;
}

/* Progress */
.prog-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
  text-align: center;
  margin-bottom: 1.2rem;
}

.ps {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
}

.ps-num {
  font-size: 2rem;
  font-weight: 800;
  color: var(--green);
}

.ps-fail {
  color: var(--red);
}

.ps span:last-child {
  font-size: 0.75rem;
  color: var(--text-m);
}

.prog-bar-wrap {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1.2rem;
}

.prog-bar-track {
  flex: 1;
  height: 10px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 99px;
  overflow: hidden;
}

.prog-bar-fill {
  height: 100%;
  background: var(--purple-g);
  border-radius: 99px;
  transition: width 0.4s ease;
}

.prog-pct {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--purple-l);
  min-width: 36px;
}

.send-log {
  max-height: 240px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}

.log-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  padding: 4px 6px;
  border-radius: 6px;
  animation: fadeUp 0.3s ease;
}

.log-row.ok {
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.08);
}

.log-row.fail {
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.08);
}

/* ── Modal ────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0
  }

  to {
    opacity: 1
  }
}

.modal-box {
  background: #131324;
  border: 1px solid var(--border-h);
  border-radius: 16px;
  width: 100%;
  max-width: 500px;
  box-shadow: var(--shadow-l);
  animation: popUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-height: 90vh;
  overflow-y: auto;
}

@keyframes popUp {
  from {
    transform: scale(0.88);
    opacity: 0
  }

  to {
    transform: scale(1);
    opacity: 1
  }
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 1.5rem;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: #131324;
  z-index: 2;
}

.modal-head h3 {
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.modal-head h3 i {
  color: var(--purple-l);
}

.btn-close {
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  color: var(--text-m);
  padding: 4px 8px;
  border-radius: 6px;
}

.btn-close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.modal-body {
  padding: 1.5rem;
}

.modal-foot {
  display: flex;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  position: sticky;
  bottom: 0;
  background: #131324;
}

/* ── Field type toggle ────────────────────────────────────────── */
.field-type-toggle {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.2rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  padding: 4px;
}

.ftt-btn {
  flex: 1;
  padding: 0.5rem;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: var(--text-m);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: all var(--transition);
}

.ftt-btn.active {
  background: var(--purple-g);
  color: #fff;
  box-shadow: 0 2px 10px rgba(124, 58, 237, 0.4);
}

.ftt-btn:not(.active):hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

/* QR preview box — legacy kept for backward compat */
.qr-preview-box {
  background: rgba(6, 182, 212, 0.06);
  border: 1px solid rgba(6, 182, 212, 0.2);
  border-radius: var(--radius-s);
  padding: 0.9rem;
  margin-top: 0.5rem;
  font-size: 0.82rem;
  color: var(--text-m);
  word-break: break-all;
}

/* ── QR Template Editor (new multi-variable) ─────────────────── */
.qr-template-hint {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-m);
  line-height: 1.55;
  background: rgba(6, 182, 212, 0.07);
  border: 1px solid rgba(6, 182, 212, 0.2);
  border-radius: var(--radius-s);
  padding: 0.65rem 0.9rem;
  margin-bottom: 1rem;
}

.qr-template-hint i {
  color: var(--cyan);
  flex-shrink: 0;
  margin-top: 2px;
}

.qr-template-hint code {
  color: var(--purple-l);
  background: rgba(124, 58, 237, 0.12);
  padding: 1px 5px;
  border-radius: 4px;
}

.qr-col-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.2rem;
}

.qr-col-chip {
  padding: 3px 11px;
  border-radius: 99px;
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 700;
  font-family: monospace;
  background: rgba(124, 58, 237, 0.18);
  border: 1px solid rgba(124, 58, 237, 0.4);
  color: var(--purple-l);
  transition: all 0.18s;
  user-select: none;
}

.qr-col-chip:hover {
  background: rgba(124, 58, 237, 0.35);
  color: #fff;
  border-color: var(--purple-l);
}

.qr-template-area {
  width: 100%;
  resize: vertical;
  min-height: 90px;
  background: #0d0d1a;
  border: 1px solid var(--border-h);
  border-radius: var(--radius-s);
  color: #a5f3fc;
  font-family: 'Courier New', monospace;
  font-size: 0.83rem;
  line-height: 1.6;
  padding: 0.75rem 0.9rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.qr-template-area:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.15);
}

.qr-template-area::placeholder {
  color: #1e3a45;
}

.qr-data-preview {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(6, 182, 212, 0.25);
  border-radius: var(--radius-s);
  padding: 0.75rem 1rem;
  margin-top: 0.5rem;
}

.qdp-label {
  font-size: 0.75rem;
  color: var(--cyan);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.4rem;
}

.qdp-value {
  font-size: 0.82rem;
  color: var(--text);
  font-family: monospace;
  word-break: break-all;
  white-space: pre-wrap;
  line-height: 1.5;
}

/* ── Step footer ──────────────────────────────────────────────── */
.step-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.8rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--border);
}

/* ── Send right col ─────────────────────────────────────────────*/
.send-right {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

/* ── Report Download Card ─────────────────────────────────────── */
.report-stats {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.rs {
  flex: 1;
  min-width: 100px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 500;
}

.rs i {
  font-size: 1.1rem;
}

.rs-green {
  background: rgba(16, 185, 129, 0.12);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.rs-red {
  background: rgba(239, 68, 68, 0.1);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.rs-blue {
  background: rgba(6, 182, 212, 0.1);
  color: #67e8f9;
  border: 1px solid rgba(6, 182, 212, 0.25);
}

/* ── HTML Email Editor ────────────────────────────────────────── */
.body-mode-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.body-mode-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-m);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.body-mode-toggle {
  display: flex;
  gap: 3px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 3px;
}

.bmt-btn {
  padding: 0.35rem 0.9rem;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: var(--text-m);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  transition: all var(--transition);
}

.bmt-btn.active {
  background: var(--purple-g);
  color: #fff;
  box-shadow: 0 2px 10px rgba(124, 58, 237, 0.4);
}

.bmt-btn:not(.active):hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.code-textarea {
  width: 100%;
  background: #0d0d1a;
  border: 1px solid var(--border-h);
  border-radius: var(--radius-s);
  color: #a5f3fc;
  /* cyan-ish for code feel */
  font-family: 'Courier New', 'Consolas', monospace;
  font-size: 0.82rem;
  line-height: 1.6;
  padding: 0.9rem 1rem;
  resize: vertical;
  outline: none;
  min-height: 220px;
  tab-size: 2;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.code-textarea:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.18);
}

.code-textarea::placeholder {
  color: #2a4a5a;
}

.html-editor-hint {
  font-size: 0.8rem;
  color: var(--text-m);
  background: rgba(6, 182, 212, 0.07);
  border: 1px solid rgba(6, 182, 212, 0.2);
  border-radius: var(--radius-s);
  padding: 0.6rem 0.9rem;
  margin-bottom: 0.6rem;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  line-height: 1.5;
}

.html-editor-hint i {
  color: var(--cyan);
  flex-shrink: 0;
  margin-top: 2px;
}

.html-editor-hint code {
  color: var(--purple-l);
  background: rgba(124, 58, 237, 0.12);
  padding: 1px 5px;
  border-radius: 4px;
}

.html-preview-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.8rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: var(--radius-s) var(--radius-s) 0 0;
  margin-top: 0.7rem;
  font-size: 0.8rem;
  color: var(--text-m);
}

.html-preview-bar span {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.html-preview-bar i {
  color: var(--green);
}

.html-preview-frame {
  width: 100%;
  height: 320px;
  border: 1px solid var(--border);
  border-radius: 0 0 var(--radius-s) var(--radius-s);
  background: #fff;
}

/* ── Scrollbar ────────────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(124, 58, 237, 0.4);
  border-radius: 99px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(124, 58, 237, 0.7);
}

/* ── Dashboard (Workspace) ────────────────────────────────────── */
.dashboard-wrap {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.dashboard-head {
  margin-bottom: 0.5rem;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.service-card {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.service-card:hover {
  transform: translateY(-5px);
  background: var(--glass-b);
  border-color: var(--purple-l);
  box-shadow: 0 12px 40px rgba(124, 58, 237, 0.25);
}

.service-card.disabled {
  opacity: 0.5;
  pointer-events: none;
  filter: grayscale(80%);
}

.sc-icon {
  font-size: 2rem;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--purple-g);
  color: #fff;
  box-shadow: 0 4px 15px rgba(124, 58, 237, 0.4);
}

.sc-icon.grey {
  background: #374151;
  box-shadow: none;
}

.sc-title {
  font-size: 1.25rem;
  font-weight: 700;
}

.sc-desc {
  font-size: 0.95rem;
  color: var(--text-m);
  line-height: 1.5;
}

/* ── Admin Panel ──────────────────────────────────────────────── */
.admin-panel {
  margin-top: 1rem;
  animation: fadeUp 0.4s ease both;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.admin-header h2 {
  font-size: 1.3rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--red);
}

.table-responsive {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-s);
  overflow: hidden;
  min-width: 600px;
}

.admin-table th, .admin-table td {
  padding: 1.2rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.admin-table th {
  background: rgba(255, 255, 255, 0.05);
  font-weight: 600;
  color: var(--text-m);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.admin-table td {
  font-size: 0.95rem;
}

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

.badge-role {
  font-size: 0.75rem;
  padding: 0.3rem 0.8rem;
  border-radius: 99px;
  font-weight: 600;
  display: inline-block;
}

.badge-role.admin {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-role.user {
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

/* ── Crazy Beautification Overhaul ────────────────────────────── */

/* Animated Gradient Text */
.animated-gradient-text {
  background: linear-gradient(-45deg, #7c3aed, #06b6d4, #ec4899, #7c3aed);
  background-size: 300% auto;
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  animation: shine 5s linear infinite;
}

@keyframes shine {
  to { background-position: 300% center; }
}

/* Mouse Spotlight */
.mouse-spotlight {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999; /* Cover everything without blocking clicks */
  background: radial-gradient(circle 600px at var(--mouse-x, 50vw) var(--mouse-y, 50vh), rgba(124, 58, 237, 0.1), transparent 40%);
  mix-blend-mode: screen;
}

/* 3D Title glow / Stagger animations */
.stagger-fade-up > * {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeSlideUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.stagger-fade-up > *:nth-child(1) { animation-delay: 0.05s; }
.stagger-fade-up > *:nth-child(2) { animation-delay: 0.1s; }
.stagger-fade-up > *:nth-child(3) { animation-delay: 0.15s; }
.stagger-fade-up > *:nth-child(4) { animation-delay: 0.2s; }
.stagger-fade-up > *:nth-child(5) { animation-delay: 0.25s; }
.stagger-fade-up > *:nth-child(6) { animation-delay: 0.3s; }

@keyframes fadeSlideUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Enhance existing Service Card for crazy glow */
.service-card {
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}
.service-card:hover {
  transform: translateY(-8px) scale(1.02) !important;
  border-color: #ec4899 !important;
  box-shadow: 0 0 40px rgba(236, 72, 153, 0.35), inset 0 0 20px rgba(124, 58, 237, 0.3) !important;
}

@media (max-width: 640px) {
  .header {
    top: 0.75rem;
    width: calc(100% - 1.5rem);
    max-width: 360px;
    margin: 0.75rem auto 1.25rem;
    border-radius: 40px;
  }

  .header-inner {
    flex-direction: column;
    justify-content: center;
    gap: 0.8rem;
    padding: 1rem 1.15rem;
  }

  .logo {
    width: 100%;
    justify-content: center;
    gap: 0.7rem;
  }

  .logo-img {
    height: 30px;
    flex: 0 0 auto;
  }

  .logo-text {
    max-width: 185px;
    font-size: 1.05rem;
    line-height: 1.2;
    text-align: left;
    overflow-wrap: anywhere;
  }

  .header-user {
    width: 100%;
    justify-content: center;
    margin-left: 0;
    gap: 0.45rem;
    flex-wrap: wrap;
  }

  .user-badge,
  .header-user .btn-sm {
    min-height: 34px;
  }

  .main {
    width: 100%;
    max-width: 100vw;
    padding: 1.35rem 1rem 2rem;
  }

  .dashboard-wrap {
    gap: 1.5rem;
    width: 100%;
  }

  .dashboard-head {
    margin-bottom: 0;
  }

  .dashboard-head .panel-title {
    font-size: 2rem !important;
    line-height: 1.25;
  }

  .dashboard-head .panel-sub {
    font-size: 1rem !important;
  }

  .dashboard-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
  }

  .service-card {
    width: 100%;
    min-width: 0;
    padding: 1.6rem;
    border-radius: 12px;
  }

  .service-card:hover {
    transform: none !important;
  }

  .sc-title {
    font-size: 1.12rem;
  }

  .sc-desc {
    font-size: 0.92rem;
  }

  .modal-box,
  .card,
  .table-responsive {
    max-width: 100%;
  }
}

/* Button Ripple Base */
.btn {
  position: relative;
  overflow: hidden;
}

.ripple-span {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  animation: ripple 0.6s linear;
  background-color: rgba(255, 255, 255, 0.4);
  pointer-events: none;
}

@keyframes ripple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* Mobile app polish: make phone screens feel like the desktop product */
@media (max-width: 700px) {
  body {
    background:
      radial-gradient(circle at 18% -8%, rgba(124, 58, 237, 0.18), transparent 18rem),
      radial-gradient(circle at 98% 6%, rgba(236, 72, 153, 0.12), transparent 17rem),
      linear-gradient(180deg, #070712 0%, #0b0c17 50%, #090a13 100%);
  }

  .mouse-spotlight,
  .bg-orbs {
    display: none;
  }

  .animated-gradient-text {
    background: none !important;
    color: var(--text) !important;
    -webkit-text-fill-color: currentColor !important;
    animation: none !important;
  }

  .header {
    top: 0 !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    border-width: 0 0 1px !important;
    border-radius: 0 !important;
    background: rgba(9, 10, 20, 0.92);
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.24);
  }

  .header-inner {
    width: min(100% - 1.25rem, 620px);
    min-height: 66px;
    margin: 0 auto;
    padding: 0.6rem 0 !important;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.65rem 0.75rem;
    align-items: center;
  }

  .header-left {
    display: flex !important;
    min-width: 0;
    gap: 0.6rem !important;
  }

  .header-left > .btn {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    justify-content: center;
    padding: 0 !important;
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
  }

  .logo {
    width: auto !important;
    min-width: 0;
    justify-content: flex-start !important;
    gap: 0.55rem !important;
  }

  .logo-img {
    height: 28px !important;
    flex: 0 0 auto;
  }

  .logo-text {
    max-width: none !important;
    font-size: 0.9rem !important;
    line-height: 1.15 !important;
    color: var(--text) !important;
    letter-spacing: 0.02em;
    overflow: hidden;
    text-align: left !important;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .header-user {
    width: auto !important;
    justify-content: flex-end !important;
    margin-left: 0 !important;
    gap: 0.35rem !important;
    flex-wrap: nowrap !important;
  }

  .user-badge {
    max-width: 110px;
    min-height: 34px;
    padding: 0.35rem 0.55rem;
    background: rgba(124, 58, 237, 0.12);
    border-color: rgba(167, 139, 250, 0.22);
    overflow: hidden;
  }

  #user-name-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .header-user .btn-sm {
    min-height: 34px;
    padding: 0.35rem 0.55rem;
  }

  .header-user .btn-sm i {
    margin: 0;
  }

  .header-user .btn-sm {
    font-size: 0;
  }

  .header-user .btn-sm i {
    font-size: 0.86rem;
  }

  .step-nav {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
    justify-content: flex-start;
    gap: 0.4rem;
    overflow-x: auto;
    padding: 0.2rem 0 0.1rem;
    scrollbar-width: none;
  }

  .step-nav::-webkit-scrollbar {
    display: none;
  }

  .step-line {
    width: 28px;
    min-width: 28px;
    margin-bottom: 16px;
    background: rgba(255, 255, 255, 0.12);
  }

  .step-circle {
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow: none !important;
  }

  .step-item.active .step-circle {
    background: rgba(124, 58, 237, 0.22);
    border-color: rgba(167, 139, 250, 0.72);
  }

  .step-lbl {
    font-size: 0.65rem;
    color: rgba(240, 240, 248, 0.72);
  }

  .main {
    width: 100% !important;
    max-width: 100vw !important;
    padding: 1.15rem 0.75rem 2.5rem !important;
  }

  .dashboard-wrap,
  .step-panel {
    gap: 1rem;
  }

  .dashboard-head,
  .panel-head {
    margin-bottom: 0.9rem;
  }

  .panel-head {
    align-items: flex-start;
    gap: 0.85rem;
  }

  .panel-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    box-shadow: none;
  }

  .panel-title,
  .dashboard-head .panel-title,
  .dashboard-head .panel-title[style] {
    font-size: clamp(1.45rem, 8vw, 1.9rem) !important;
    line-height: 1.12;
    color: var(--text) !important;
    letter-spacing: 0;
  }

  .panel-sub,
  .dashboard-head .panel-sub,
  .dashboard-head .panel-sub[style] {
    font-size: 0.92rem !important;
    line-height: 1.45;
    color: #a9adbd;
  }

  .dashboard-grid,
  .two-col,
  .two-col-send,
  .designer-layout {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 0.85rem !important;
  }

  .card,
  .service-card {
    width: 100%;
    min-width: 0;
    padding: 1.05rem !important;
    border-radius: 12px !important;
    background: rgba(18, 19, 34, 0.92);
    border-color: rgba(255, 255, 255, 0.09);
    box-shadow: 0 14px 42px rgba(0, 0, 0, 0.26);
  }

  .service-card {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    align-items: start;
    gap: 0.9rem;
  }

  .service-card:hover {
    transform: none !important;
    box-shadow: 0 14px 42px rgba(0, 0, 0, 0.26) !important;
  }

  .sc-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    font-size: 1.35rem;
    box-shadow: none;
  }

  .sc-title {
    font-size: 1rem;
  }

  .sc-desc {
    font-size: 0.86rem;
    line-height: 1.45;
  }

  input[type="email"],
  input[type="text"],
  input[type="password"],
  input[type="number"],
  select.select-input,
  textarea,
  .code-textarea {
    font-size: 0.92rem;
  }

  .step-footer {
    margin-top: 1.15rem;
    padding-top: 1rem;
  }

  .step-footer .btn {
    width: 100%;
    justify-content: center;
  }

  .modal-overlay {
    padding: 0.75rem;
  }

  .modal-box {
    max-height: calc(100svh - 1.5rem);
    border-radius: 12px;
  }
}

@media (max-width: 380px) {
  .header-inner {
    width: min(100% - 1rem, 620px);
  }

  .logo-text {
    max-width: 160px !important;
  }

  .user-badge {
    max-width: 92px;
  }

  .main {
    padding-inline: 0.55rem !important;
  }
}

/* New Vibranta gradient theme across all app pages */
:root {
  --bg: #130820;
  --bg-2: #231037;
  --surface: rgba(80, 35, 109, 0.72);
  --surface-2: rgba(92, 39, 120, 0.82);
  --glass: rgba(255, 255, 255, 0.09);
  --glass-b: rgba(255, 255, 255, 0.13);
  --border: rgba(255, 255, 255, 0.16);
  --border-h: rgba(255, 255, 255, 0.26);
  --text: #fff7ff;
  --text-m: rgba(255, 255, 255, 0.76);
  --text-s: rgba(255, 255, 255, 0.54);
  --purple: #7c3aed;
  --purple-l: #d8b4fe;
  --cyan: #67e8f9;
  --pink: #fb7185;
  --shadow: 0 18px 46px rgba(54, 12, 74, 0.28);
  --shadow-l: 0 28px 90px rgba(54, 12, 74, 0.36);
}

body {
  background:
    linear-gradient(rgba(255,255,255,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.045) 1px, transparent 1px),
    radial-gradient(circle at 12% 4%, rgba(124, 58, 237, 0.28), transparent 24rem),
    linear-gradient(135deg, #a855f7 0%, #ec4899 48%, #fb7185 100%);
  background-size: 38px 38px, 38px 38px, auto, auto;
  color: var(--text);
}

.header {
  background:
    linear-gradient(135deg, rgba(70, 28, 108, 0.82), rgba(125, 44, 112, 0.74)),
    rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 20px 70px rgba(61, 15, 84, 0.28);
}

.card,
.service-card,
.modal-box,
.format-manager,
.drop-zone,
.csv-format-box,
.vars-box,
.html-editor-hint,
.qr-template-hint,
.qr-data-preview {
  background:
    linear-gradient(135deg, rgba(71, 29, 103, 0.8), rgba(97, 42, 104, 0.66)),
    rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px) saturate(132%);
  -webkit-backdrop-filter: blur(22px) saturate(132%);
}

.panel-title,
.logo-text,
.card-title,
.sc-title,
.modal-head h3,
.admin-header h2,
.animated-gradient-text {
  background: none !important;
  color: #fff7ff !important;
  -webkit-text-fill-color: currentColor !important;
  animation: none !important;
}

.panel-sub,
.sc-desc,
.sidebar-hint,
.hint-text,
.table-note,
.guide-step p,
.modal-body p,
.sum-row span:first-child {
  color: rgba(255, 255, 255, 0.72) !important;
}

.service-card:hover {
  background:
    linear-gradient(135deg, rgba(87, 34, 125, 0.86), rgba(126, 50, 114, 0.74)),
    rgba(255, 255, 255, 0.11);
  border-color: rgba(255, 255, 255, 0.28) !important;
  box-shadow: 0 22px 60px rgba(72, 13, 91, 0.34) !important;
}

.user-badge,
.badge,
.badge-role,
.var-chip,
.qr-col-chip {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
  color: rgba(255, 255, 255, 0.86) !important;
}

input[type="email"],
input[type="text"],
input[type="password"],
input[type="number"],
select.select-input,
textarea,
.input-dark,
.code-textarea,
.qr-template-area {
  background: rgba(11, 8, 20, 0.86) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  color: #fff !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 12px 28px rgba(0,0,0,0.14);
}

input::placeholder,
textarea::placeholder {
  color: rgba(210, 214, 226, 0.58) !important;
}

input:focus,
select:focus,
textarea:focus,
.input-dark:focus {
  border-color: rgba(255, 255, 255, 0.32) !important;
  box-shadow: 0 0 0 3px rgba(251, 113, 133, 0.18), 0 14px 30px rgba(0,0,0,0.18) !important;
}

.btn-primary {
  background: linear-gradient(135deg, #ffd4ce, #fb7185) !important;
  color: #170a1f !important;
  box-shadow: 0 16px 34px rgba(251, 113, 133, 0.28) !important;
}

.btn-secondary {
  background: rgba(6, 182, 212, 0.14) !important;
  border-color: rgba(103, 232, 249, 0.3) !important;
  color: #cffafe !important;
}

.btn-outline,
.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.84);
}

.step-circle {
  background: rgba(11, 8, 20, 0.46);
  border-color: rgba(255, 255, 255, 0.2);
}

.step-item.active .step-circle {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.42);
}

.step-lbl {
  color: rgba(255, 255, 255, 0.72);
}

.data-table,
.admin-table {
  background: rgba(11, 8, 20, 0.42);
}

.data-table th,
.admin-table th,
.modal-head,
.modal-foot {
  background: rgba(11, 8, 20, 0.32);
  color: rgba(255, 255, 255, 0.78);
}

.data-table td,
.admin-table td {
  color: rgba(255, 255, 255, 0.74);
}

.modal-overlay {
  background: rgba(15, 7, 24, 0.76);
}

@media (max-width: 700px) {
  body {
    background:
      linear-gradient(rgba(255,255,255,0.045) 1px, transparent 1px),
      linear-gradient(90deg, rgba(255,255,255,0.045) 1px, transparent 1px),
      linear-gradient(135deg, #a855f7 0%, #ec4899 54%, #fb7185 100%);
    background-size: 34px 34px, 34px 34px, auto;
  }

  .header {
    background:
      linear-gradient(135deg, rgba(70, 28, 108, 0.9), rgba(125, 44, 112, 0.84)),
      rgba(255, 255, 255, 0.08);
  }
}
