/* ─────────────────────────────────────────────────────────
   VCard-TMS Studio · styles.css — Premium Dark Theme v4
───────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

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

:root {
  --bg:        #050507;
  --bg2:       #0a0a0f;
  --surface:   #111118;
  --surface2:  #1a1a24;
  --surface3:  #22222e;
  --border:    rgba(255,255,255,0.07);
  --border2:   rgba(255,255,255,0.12);
  --text:      #f0f0f5;
  --text-2:    #8a8a9a;
  --text-3:    #5a5a6a;
  --blue:      #aa7444;
  --blue-dk:   #8b5d36;
  --blue-lt:   #cc9966;
  --green:     #30d158;
  --amber:     #f59e0b;
  --font:      'Inter', system-ui, sans-serif;
  --nav-h:     56px;
  --bnav-h:    72px;
  --r-xl:      22px;
  --r-lg:      16px;
  --r-md:      12px;
  --r-sm:      8px;
  --glow:      0 0 40px rgba(170,116,68,0.15);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.6);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.4);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
}

html, body { height: 100%; overflow: hidden; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--surface3); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--border2); }

/* ─── App Shell ─── */
.app-shell { display: flex; flex-direction: column; height: 100vh; }

/* ═══════════════════════════════════════════════
   AUTH VIEW
═══════════════════════════════════════════════ */
.auth-wrapper {
  display: flex; width: 100vw; height: 100vh;
  background: var(--bg); position: absolute; top: 0; left: 0; z-index: 1000;
}

.auth-form-side.dark-theme {
  flex: 1.1; display: flex; align-items: center; justify-content: center;
  padding: 40px; background: radial-gradient(circle at top left, #121218, var(--bg)); color: var(--text);
}

.auth-form-container { width: 100%; max-width: 440px; }

.auth-logo {
  font-size: 24px; font-weight: 900; letter-spacing: -0.5px;
  margin-bottom: 48px; color: var(--text);
}
.auth-logo .dot { color: var(--blue); }

.auth-title { font-size: 28px; font-weight: 800; color: var(--text); margin-bottom: 8px; letter-spacing: -0.5px; }

.auth-social-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 13px 16px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface2);
  color: var(--text); font-size: 14px; font-weight: 600; cursor: pointer;
  transition: all 0.2s; font-family: var(--font); margin-bottom: 24px;
}
.auth-social-btn img { width: 20px; }
.auth-social-btn:hover { background: var(--surface3); border-color: var(--border2); transform: translateY(-1px); }

.auth-divider {
  display: flex; align-items: center; text-align: center;
  color: var(--text-3); font-size: 11px; font-weight: 600;
  margin-bottom: 24px; text-transform: uppercase; letter-spacing: 1px;
}
.auth-divider::before,.auth-divider::after { content:''; flex:1; border-bottom: 1px solid var(--border); }
.auth-divider span { padding: 0 14px; }

.field-group { margin-bottom: 16px; }
.field-group label {
  display: block; font-size: 11px; font-weight: 600; color: var(--text-2);
  text-transform: uppercase; letter-spacing: 0.6px; margin-bottom: 6px;
}
.field-group label i { margin-right: 5px; font-size: 10px; }

.field-group.dark-group label {
  color: var(--text-2); text-transform: none; letter-spacing: 0; font-size: 12px; margin-bottom: 6px; font-weight: 500;
}
.field-group.dark-group .req { color: #ef4444; }

.field-group.dark-group input {
  width: 100%; padding: 12px 14px; border-radius: 10px;
  border: 1px solid var(--border2); background: var(--surface2);
  color: var(--text); font-size: 14px; font-family: var(--font);
  outline: none; transition: border-color 0.2s;
}
.field-group.dark-group input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(170,116,68,0.15); }

.pass-wrapper { position: relative; }
.pass-wrapper input { padding-right: 40px; }
.pass-icon { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--text-3); cursor: pointer; }

.auth-forgot { text-align: right; margin-bottom: 20px; }
.auth-forgot a { font-size: 12px; color: var(--blue); text-decoration: none; transition: color 0.2s; }
.auth-forgot a:hover { color: var(--blue-lt); }

.auth-submit-btn.primary-btn {
  width: 100%; padding: 14px; border-radius: 12px;
  background: linear-gradient(135deg, var(--blue-lt), var(--blue));
  border: none; color: #fff; font-size: 15px; font-weight: 700;
  cursor: pointer; font-family: var(--font); transition: all 0.2s;
  box-shadow: 0 4px 20px rgba(170,116,68,0.35);
}
.auth-submit-btn.primary-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(170,116,68,0.45); }

.auth-switch { margin-top: 20px; text-align: center; font-size: 13px; color: var(--text-2); }
.auth-switch a { color: var(--blue); text-decoration: none; font-weight: 600; }

.auth-banner-side {
  flex: 1.2; position: relative; overflow: hidden; display: none;
}
@media(min-width:900px){ .auth-banner-side { display:block; } }
.auth-banner-bg { position:absolute; inset:0; background-size:cover; background-position:center; filter: saturate(0.85); }
.auth-banner-overlay { position:absolute; inset:0; background: linear-gradient(135deg, rgba(5,5,7,0.85), rgba(170,116,68,0.25)); z-index:1; }

/* ═══════════════════════════════════════════════
   TOP NAV
═══════════════════════════════════════════════ */
.top-nav {
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px;
  background: rgba(5,5,7,0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  position: relative; z-index: 100;
  flex-shrink: 0;
}

.nav-logo {
  font-size: 18px; font-weight: 900; letter-spacing: -0.5px; color: var(--text);
}
.nav-logo .dot { color: var(--blue); }

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

.icon-btn {
  width: 36px; height: 36px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text-2); cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 14px; transition: all 0.2s; font-family: var(--font);
}
.icon-btn:hover { background: var(--surface2); color: var(--text); border-color: var(--border2); }
.icon-btn.admin-btn { color: var(--amber); border-color: rgba(245,158,11,0.3); }
.icon-btn.admin-btn:hover { background: rgba(245,158,11,0.1); }

/* Premium Badge in Nav */
.nav-premium-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 12px; border-radius: 20px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #000; font-size: 11px; font-weight: 800;
  letter-spacing: 0.5px; text-transform: uppercase;
  animation: shimmer 3s infinite;
  background-size: 200% 100%;
}
@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

/* ═══════════════════════════════════════════════
   WORKSPACE
═══════════════════════════════════════════════ */
.workspace {
  flex: 1; display: flex; overflow: hidden;
  background: var(--bg);
}

/* ─── Editor Column ─── */
.editor-col {
  width: 440px; min-width: 320px; max-width: 480px;
  display: flex; flex-direction: column;
  border-right: 1px solid var(--border);
  background: var(--bg);
  flex-shrink: 0;
}

.editor-layout { display: flex; flex: 1; overflow: hidden; }

/* ─── Sidebar ─── */
.editor-sidebar {
  width: 64px; background: var(--bg2); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; align-items: center;
  padding: 12px 0; gap: 4px; flex-shrink: 0; overflow-y: auto;
}

.sidebar-avatar {
  width: 38px; height: 38px; border-radius: 10px;
  background: linear-gradient(135deg, var(--blue-lt), var(--blue));
  color: #fff; font-size: 14px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 4px; overflow: hidden; flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(170,116,68,0.3);
}
.sidebar-avatar img { width: 100%; height: 100%; object-fit: cover; }

.sidebar-sep { width: 32px; height: 1px; background: var(--border); margin: 6px 0; flex-shrink: 0; }

.sidebar-item {
  width: 48px; height: 48px; border-radius: 12px;
  border: none; background: transparent;
  color: var(--text-3); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; transition: all 0.2s; font-family: var(--font); flex-shrink: 0;
  position: relative;
}
.sidebar-item i { font-size: 16px; transition: transform 0.2s; }
.sidebar-item span { font-size: 9px; font-weight: 600; letter-spacing: 0.3px; }
.sidebar-item:hover { background: var(--surface); color: var(--text-2); }
.sidebar-item.active { background: var(--surface2); color: var(--blue); }
.sidebar-item.active i { transform: scale(1.1); }
.sidebar-item.premium-item { color: var(--amber); }
.sidebar-item.premium-item.active { background: rgba(245,158,11,0.12); }

/* ─── Editor Panel ─── */
.editor-panel {
  flex: 1; display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface);
}

.panel-header {
  padding: 16px 20px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0; background: var(--surface);
  backdrop-filter: blur(10px);
}
.panel-title { font-size: 15px; font-weight: 700; color: var(--text); letter-spacing: -0.2px; }
.panel-badge {
  font-size: 11px; font-weight: 600; color: var(--text-3);
  background: var(--surface2); padding: 3px 10px; border-radius: 20px;
  max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ─── Form Sections ─── */
.form-section { display: none; flex: 1; overflow: hidden; }
.form-section.active { display: flex; flex-direction: column; }

.form-section-inner {
  flex: 1; overflow-y: auto; padding: 20px;
  display: flex; flex-direction: column; gap: 4px;
}

/* ─── Fields ─── */
.field-group input,
.field-group select,
.field-group textarea {
  width: 100%; padding: 11px 14px; border-radius: var(--r-md);
  border: 1px solid var(--border2); background: var(--surface2);
  color: var(--text); font-size: 13px; font-family: var(--font);
  outline: none; transition: all 0.2s; resize: none;
}
.field-group input:focus,
.field-group select:focus,
.field-group textarea:focus {
  border-color: var(--blue);
  background: var(--surface3);
  box-shadow: 0 0 0 3px rgba(170,116,68,0.12);
}
.field-group input::placeholder { color: var(--text-3); }
.field-group select { cursor: pointer; }
.field-group select option { background: var(--surface2); }

.field-row { display: flex; gap: 10px; }
.field-row .field-group { flex: 1; }

.form-tip {
  background: var(--surface2); border-radius: var(--r-md);
  padding: 10px 14px; font-size: 12px; color: var(--text-2);
  line-height: 1.5; display: flex; align-items: flex-start; gap: 8px;
  border: 1px solid var(--border); margin-bottom: 4px;
}
.form-tip i { color: var(--blue); margin-top: 1px; flex-shrink: 0; }

/* ─── Toggle Switch ─── */
.toggle-switch { display: inline-block; position: relative; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-track {
  display: block; width: 40px; height: 22px; border-radius: 11px;
  background: var(--surface3); transition: background 0.25s; cursor: pointer; position: relative;
}
.toggle-track::after {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 16px; height: 16px; border-radius: 50%; background: #fff;
  transition: transform 0.25s; box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.toggle-switch input:checked + .toggle-track { background: var(--blue); }
.toggle-switch input:checked + .toggle-track::after { transform: translateX(18px); }

/* ─── Social Rows ─── */
.social-row {
  background: var(--surface2); border-radius: var(--r-lg);
  border: 1px solid var(--border); margin-bottom: 10px;
  transition: all 0.2s; overflow: hidden;
}
.social-row.disabled { opacity: 0.45; }
.social-toggle-wrap {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
}
.sort-controls { display: flex; flex-direction: column; margin-right: 4px; }
.sort-btn {
  background: none; border: none; color: var(--text-3);
  cursor: pointer; padding: 1px 4px; font-size: 11px; line-height: 1;
  transition: color 0.15s;
}
.sort-btn:hover { color: var(--text); }
.social-icon-wrap {
  width: 38px; height: 38px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 18px; flex-shrink: 0;
}
.social-fields { padding: 0 14px 14px; display: flex; flex-direction: column; gap: 8px; }
.social-fields label { font-size: 11px; color: var(--text-3); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.social-fields input { margin-top: 4px; }

/* ─── Design Section ─── */
.design-color-row label {
  display: block; font-size: 11px; font-weight: 600; color: var(--text-2);
  text-transform: uppercase; letter-spacing: 0.6px; margin-bottom: 10px;
}
.design-color-row label i { margin-right: 5px; }
.color-picker-wrap {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface2); border-radius: var(--r-md);
  padding: 10px 14px; border: 1px solid var(--border2);
}
input[type="color"] { width: 36px; height: 36px; border: none; background: none; cursor: pointer; padding: 0; border-radius: 6px; }
.color-hex { font-size: 13px; font-weight: 600; color: var(--text); font-family: monospace; }

.color-swatches-grid {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px;
  margin-top: 14px;
}
.swatch {
  width: 100%; aspect-ratio: 1; border-radius: 8px; cursor: pointer;
  transition: all 0.2s; border: 2px solid transparent;
}
.swatch:hover { transform: scale(1.15); }
.swatch.sel { border-color: #fff; box-shadow: 0 0 0 2px rgba(255,255,255,0.3), 0 4px 12px rgba(0,0,0,0.4); transform: scale(1.1); }

/* ─── Photos Section ─── */
.photo-upload-card {
  background: var(--surface2); border-radius: var(--r-lg);
  border: 1px solid var(--border); padding: 16px;
  display: flex; gap: 16px; align-items: center; margin-bottom: 12px;
  transition: border-color 0.2s;
}
.photo-upload-card:hover { border-color: var(--border2); }
.photo-upload-preview {
  width: 64px; height: 64px; border-radius: 14px;
  background: var(--surface3); border: 2px dashed var(--border2);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; flex-shrink: 0; font-size: 18px; font-weight: 700; color: var(--text-2);
}
.photo-upload-preview img { width: 100%; height: 100%; object-fit: cover; }
.photo-upload-banner-preview {
  width: 80px; height: 48px; border-radius: 10px;
  background: var(--surface3); border: 2px dashed var(--border2);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; flex-shrink: 0;
}
.banner-preview-inner { display:flex; flex-direction:column; align-items:center; gap:2px; color: var(--text-3); font-size:9px; }
.banner-preview-inner i { font-size: 14px; }
.photo-upload-info { flex: 1; }
.photo-upload-title { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 3px; }
.photo-upload-sub { font-size: 11px; color: var(--text-3); margin-bottom: 10px; }
.photo-upload-btn {
  padding: 7px 14px; border-radius: 8px;
  background: var(--surface3); border: 1px solid var(--border2);
  color: var(--text); font-size: 12px; font-weight: 600; cursor: pointer;
  font-family: var(--font); transition: all 0.2s; display: inline-flex; align-items: center; gap: 6px;
}
.photo-upload-btn:hover { background: var(--blue); border-color: var(--blue); color: #fff; }
.photo-remove-btn {
  padding: 7px 14px; border-radius: 8px;
  background: transparent; border: 1px solid rgba(220,38,38,0.4);
  color: #f87171; font-size: 12px; font-weight: 600; cursor: pointer;
  font-family: var(--font); transition: all 0.2s; display: inline-flex; align-items: center; gap: 6px; margin-left: 8px;
}
.photo-remove-btn:hover { background: rgba(220,38,38,0.1); }
.banner-card .photo-upload-preview { width: 100px; border-radius: 10px; }

/* ═══════════════════════════════════════════════
   PREMIUM SECTION
═══════════════════════════════════════════════ */
.premium-locked-wrap {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; padding: 40px 24px;
  animation: fadeInUp 0.4s ease;
}
.premium-lock-icon {
  width: 80px; height: 80px; border-radius: 24px;
  background: linear-gradient(135deg, rgba(245,158,11,0.15), rgba(245,158,11,0.05));
  border: 1px solid rgba(245,158,11,0.3);
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; color: var(--amber); margin-bottom: 20px;
  box-shadow: 0 8px 32px rgba(245,158,11,0.1);
}
.premium-locked-wrap h3 { font-size: 18px; font-weight: 800; color: var(--text); margin-bottom: 8px; }
.premium-locked-wrap p { font-size: 13px; color: var(--text-2); line-height: 1.6; margin-bottom: 24px; max-width: 280px; }

/* Premium Feature Cards */
.prem-feature-card {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 14px 16px;
  display: flex; align-items: center; justify-content: space-between;
  cursor: pointer; transition: all 0.2s; margin-bottom: 10px;
}
.prem-feature-card:hover {
  border-color: var(--border2); background: var(--surface3);
  transform: translateY(-1px); box-shadow: var(--shadow-sm);
}
.prem-feat-left { display: flex; align-items: center; gap: 12px; }
.prem-feat-icon {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 16px; flex-shrink: 0;
}
.prem-feat-name { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.prem-feat-desc { font-size: 11px; color: var(--text-2); }
.prem-feat-arrow { color: var(--text-3); font-size: 12px; transition: transform 0.2s; }
.prem-feature-card:hover .prem-feat-arrow { transform: translateX(3px); color: var(--text-2); }

/* Premium Payment Row */
.premium-payment-row {
  background: linear-gradient(135deg, rgba(245,158,11,0.08), rgba(245,158,11,0.03));
  border: 1px solid rgba(245,158,11,0.2); border-radius: var(--r-lg);
  margin-bottom: 16px;
}

/* ═══════════════════════════════════════════════
   SHARE SECTION
═══════════════════════════════════════════════ */
.share-action-card {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 14px 16px;
  display: flex; align-items: center; gap: 14px;
  cursor: pointer; transition: all 0.2s; margin-bottom: 10px;
}
.share-action-card:hover {
  border-color: var(--border2); background: var(--surface3);
  transform: translateY(-1px); box-shadow: var(--shadow-sm);
}
.share-action-icon {
  width: 42px; height: 42px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 18px; flex-shrink: 0;
}
.share-action-info { flex: 1; }
.share-action-title { font-size: 13px; font-weight: 700; color: var(--text); }
.share-action-sub { font-size: 11px; color: var(--text-2); margin-top: 2px; }
.share-action-card > i:last-child { color: var(--text-3); font-size: 12px; }

/* Share Link Box */
.share-link-box {
  background: var(--surface2); border: 1px solid rgba(170,116,68,0.3);
  border-radius: var(--r-lg); padding: 14px 16px;
  margin-bottom: 12px; display: flex; align-items: center; gap: 10px;
}
.share-link-box .link-icon { color: var(--blue); font-size: 16px; flex-shrink: 0; }
.share-link-box .link-url {
  flex: 1; font-size: 11px; color: var(--text-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-family: monospace;
}
.share-link-box .copy-mini-btn {
  padding: 5px 10px; border-radius: 7px; background: var(--surface3);
  border: 1px solid var(--border2); color: var(--text-2);
  font-size: 11px; cursor: pointer; font-family: var(--font);
  transition: all 0.2s; white-space: nowrap; flex-shrink: 0;
}
.share-link-box .copy-mini-btn:hover { background: var(--blue); border-color: var(--blue); color: #fff; }

/* Download Limit Banner */
.dl-limit-banner {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 14px 16px;
  display: flex; align-items: center; gap: 12px; margin-bottom: 12px;
}
.dl-limit-icon {
  width: 38px; height: 38px; border-radius: 10px;
  background: linear-gradient(135deg, var(--blue), var(--blue-dk));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 15px; flex-shrink: 0;
}
.dl-limit-text h4 { font-size: 12px; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.dl-limit-text p { font-size: 11px; color: var(--text-2); }
.dl-progress-wrap { height: 3px; background: var(--surface3); border-radius: 2px; margin-top: 5px; }
.dl-progress-fill { height: 100%; border-radius: 2px; background: linear-gradient(90deg, var(--blue), var(--blue-lt)); transition: width 0.4s; }
.dl-limit-count { font-size: 22px; font-weight: 900; color: var(--text); flex-shrink: 0; }

/* ═══════════════════════════════════════════════
   PHONE PREVIEW
═══════════════════════════════════════════════ */
.preview-col {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  background: radial-gradient(ellipse at center, #0f0f1a 0%, #050507 70%);
  padding: 20px; overflow: hidden; position: relative;
}
.preview-col::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 50%, rgba(170,116,68,0.05) 0%, transparent 70%);
  pointer-events: none;
}

.preview-label {
  font-size: 10px; font-weight: 700; letter-spacing: 2px;
  color: var(--text-3); text-transform: uppercase;
  margin-bottom: 16px; display: flex; align-items: center; gap: 6px;
}
.preview-label::before, .preview-label::after {
  content: ''; flex: 1; max-width: 40px; height: 1px; background: var(--border);
}

.phone-frame {
  width: 300px; height: 580px; background: #0a0a0f;
  border-radius: 44px; position: relative;
  box-shadow: 0 0 0 8px #1a1a24, 0 0 0 10px rgba(255,255,255,0.05), 0 30px 80px rgba(0,0,0,0.7);
  display: flex; flex-direction: column; overflow: hidden;
  flex-shrink: 0;
}
.phone-notch {
  width: 90px; height: 24px; background: #0a0a0f;
  border-radius: 0 0 18px 18px; position: absolute;
  top: 0; left: 50%; transform: translateX(-50%); z-index: 10;
}
.phone-screen {
  flex: 1; overflow-y: auto; background: #000;
  border-radius: 36px;
  margin: 10px 6px;
  -webkit-overflow-scrolling: touch;
}
.phone-screen::-webkit-scrollbar { display: none; }
.phone-home-bar {
  height: 4px; width: 100px; background: rgba(255,255,255,0.25);
  border-radius: 2px; margin: 8px auto 10px; flex-shrink: 0;
}

/* ─── Card Preview ─── */
.card-page {
  min-height: 100%; background: #000;
  animation: fadeInUp 0.3s ease;
}

.cp-top-wrap { position: relative; }
.cp-banner {
  height: 110px;
  background: linear-gradient(135deg, #cc9966 0%, #aa7444 100%);
  position: relative; overflow: hidden;
}
.cp-avatar {
  position: absolute; bottom: -36px; left: 50%; transform: translateX(-50%);
  width: 76px; height: 76px; border-radius: 50%;
  border: 3px solid #000;
  background: linear-gradient(135deg, #cc9966, #aa7444);
  color: #fff; font-size: 28px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; z-index: 2;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}
.cp-avatar img { width: 100%; height: 100%; object-fit: cover; }
.cp-identity { text-align: center; padding: 46px 18px 14px; }
.cp-name { font-size: 21px; font-weight: 800; color: #fff; margin-bottom: 4px; letter-spacing: -0.3px; }
.cp-job { font-size: 12px; color: #8a8a9a; }
.cp-location { font-size: 11px; color: #6a6a7a; margin-top: 5px; display: flex; align-items: center; justify-content: center; gap: 4px; }
.cp-bio { font-size: 12px; color: #7a7a8a; margin-top: 8px; line-height: 1.5; padding: 0 4px; }

.cp-save-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: calc(100% - 28px); margin: 4px 14px 14px;
  padding: 13px; border-radius: 13px;
  background: linear-gradient(135deg, #cc9966, #aa7444);
  border: none; color: #fff; font-size: 14px; font-weight: 700;
  cursor: pointer; font-family: var(--font);
  box-shadow: 0 4px 16px rgba(170,116,68,0.3);
  transition: all 0.2s;
}
.cp-save-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(170,116,68,0.4); }

.cp-links { display: flex; flex-direction: column; gap: 10px; padding: 4px 14px 14px; }
.cp-link-item {
  display: flex; align-items: center; gap: 14px;
  text-decoration: none; color: #fff;
  background: #1c1c1e; border-radius: 12px; padding: 10px 13px;
  font-size: 13px; font-weight: 600; transition: all 0.15s;
}
.cp-link-item:hover { background: #2c2c2e; transform: translateX(2px); }
.cp-link-icon {
  width: 38px; height: 38px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 18px; flex-shrink: 0;
}
.cp-link-item::before { content:'⋮⋮'; color:#444; font-size:14px; letter-spacing:-2px; margin-right:-4px; }

.cp-qr-wrap {
  display: flex; justify-content: center;
  padding: 14px; background: #fff; border-radius: 14px;
  margin: 0 14px 14px; box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}

.cp-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px 14px;
}
.cp-powered { font-size: 10px; color: #4a4a5a; }
.cp-powered strong { color: #6a6a7a; }
.cp-scan-btn {
  padding: 6px 12px; border-radius: 20px;
  background: var(--surface); border: 1px solid var(--border2);
  color: var(--text-2); font-size: 11px; font-weight: 600;
  cursor: pointer; font-family: var(--font); display: flex; align-items: center; gap: 5px;
  transition: all 0.2s;
}
.cp-scan-btn:hover { background: var(--surface2); color: var(--text); }

/* Horizontal Layout */
.card-page.horizontal-layout .cp-avatar {
  position: absolute; top: 24px; left: 16px;
  transform: none; width: 56px; height: 56px; bottom: auto;
}
.card-page.horizontal-layout .cp-banner { height: 76px; }
.card-page.horizontal-layout .cp-identity {
  padding: 10px 14px 10px 84px; text-align: left;
}
.card-page.horizontal-layout .cp-name { font-size: 17px; }
.card-page.horizontal-layout .cp-job { font-size: 11px; }

/* ═══════════════════════════════════════════════
   BOTTOM NAV (mobile)
═══════════════════════════════════════════════ */
.bottom-nav {
  display: none; height: var(--bnav-h);
  background: rgba(5,5,7,0.95); border-top: 1px solid var(--border);
  backdrop-filter: blur(20px);
  padding: 0 8px; justify-content: space-around; align-items: center;
  flex-shrink: 0;
}
.bnav-item {
  flex: 1; height: 54px; border-radius: 12px;
  border: none; background: transparent;
  color: var(--text-3); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; transition: all 0.2s; font-family: var(--font);
}
.bnav-item i { font-size: 18px; }
.bnav-item span { font-size: 9px; font-weight: 600; }
.bnav-item.active { color: var(--blue); }
.bnav-item:hover { background: var(--surface); }

/* ═══════════════════════════════════════════════
   MODALS
═══════════════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.75); backdrop-filter: blur(8px);
  display: none; align-items: center; justify-content: center; padding: 20px;
  animation: fadeIn 0.2s ease;
}
.modal-overlay.open { display: flex; }

.modal-box {
  background: var(--surface); border: 1px solid var(--border2);
  border-radius: var(--r-xl); width: 100%; max-width: 380px;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.modal-box.wide { max-width: 580px; }

.modal-hdr {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px; border-bottom: 1px solid var(--border);
}
.modal-title { font-size: 15px; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 8px; }
.modal-close {
  width: 28px; height: 28px; border-radius: 8px;
  border: none; background: var(--surface2);
  color: var(--text-2); cursor: pointer; font-size: 16px;
  display: flex; align-items: center; justify-content: center; transition: all 0.2s;
}
.modal-close:hover { background: var(--surface3); color: var(--text); }

.modal-body-code { padding: 16px 20px; }
.modal-body-code p { font-size: 12px; color: var(--text-2); margin-bottom: 10px; }
.modal-body-code code { background: var(--surface2); padding: 2px 6px; border-radius: 5px; font-family: monospace; }
.modal-body-code textarea {
  width: 100%; height: 320px; border-radius: var(--r-md);
  border: 1px solid var(--border2); background: var(--bg2);
  color: #7dd3fc; font-size: 11px; font-family: monospace;
  padding: 12px; outline: none; resize: none;
}

.modal-footer-btns {
  display: flex; gap: 10px; padding: 14px 20px;
  border-top: 1px solid var(--border);
}

.btn-action {
  flex: 1; padding: 10px 16px; border-radius: 10px;
  border: 1px solid var(--border2); background: var(--surface2);
  color: var(--text); font-size: 13px; font-weight: 600;
  cursor: pointer; font-family: var(--font); transition: all 0.2s;
  display: flex; align-items: center; justify-content: center; gap: 7px;
}
.btn-action:hover { background: var(--surface3); }
.btn-action.blue {
  background: linear-gradient(135deg, var(--blue-lt), var(--blue));
  border-color: var(--blue); color: #fff;
}
.btn-action.blue:hover { opacity: 0.9; transform: translateY(-1px); }

/* Primary button */
.primary-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 20px; border-radius: var(--r-md);
  background: linear-gradient(135deg, var(--blue-lt), var(--blue));
  border: none; color: #fff; font-size: 14px; font-weight: 700;
  cursor: pointer; font-family: var(--font); transition: all 0.2s;
  box-shadow: 0 4px 20px rgba(170,116,68,0.3);
}
.primary-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(170,116,68,0.4); }

/* Premium Modal Specifics */
.premium-features-list {
  list-style: none; padding: 0; margin: 0 0 20px; display: flex; flex-direction: column; gap: 10px;
}
.premium-features-list li {
  display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--text);
}
.premium-features-list li i { color: var(--green); margin-top: 1px; flex-shrink: 0; }

.payment-info-box {
  background: var(--surface2); border: 1px solid var(--border2);
  border-radius: var(--r-md); padding: 16px; margin-bottom: 16px;
}
.payment-info-row { margin-bottom: 12px; }
.payment-info-row:last-child { margin-bottom: 0; }
.payment-info-label { font-size: 10px; color: var(--text-3); text-transform: uppercase; font-weight: 700; letter-spacing: 0.8px; margin-bottom: 3px; }
.payment-info-value { font-size: 14px; font-weight: 700; color: var(--text); }
.payment-info-value.price { font-size: 22px; color: var(--amber); }

.payment-copy-row { display: flex; align-items: center; gap: 10px; }
.copy-email-btn {
  display: flex; align-items: center; gap: 6px; justify-content: center;
  padding: 10px 16px; border-radius: 9px;
  background: #046c4e; border: none; color: #fff;
  font-size: 12px; font-weight: 700; cursor: pointer; font-family: var(--font);
  transition: all 0.2s;
}
.copy-email-btn:hover { background: #047857; transform: translateY(-1px); }
.payment-note { font-size: 12px; color: var(--text-2); }
.payment-note b { color: var(--text); }

/* QR Modal */
.qr-modal-body {
  display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 20px;
}
.mini-card-preview {
  width: 100%; border-radius: 16px; overflow: hidden;
  background: var(--surface2); border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}
.mini-card-body { padding: 14px; text-align: center; position: relative; margin-top: -22px; }
.mini-card-banner { height: 55px; }
.mini-avatar-wrap {
  width: 44px; height: 44px; border-radius: 50%;
  border: 2px solid var(--surface2); background: var(--blue);
  color: #fff; font-size: 14px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
  overflow: hidden; margin-bottom: 6px;
}
.mini-name { margin: 0; font-size: 14px; font-weight: 700; color: #fff; }
.mini-job { margin: 2px 0 0; font-size: 11px; color: var(--text-2); }

.qr-share-link-row {
  display: flex; width: 100%; gap: 8px;
}
.qr-share-link-row input {
  flex: 1; background: var(--surface2); border: 1px solid var(--border2);
  color: var(--text); padding: 10px 12px; border-radius: 9px;
  font-size: 11px; outline: none; font-family: monospace;
}

/* ═══════════════════════════════════════════════
   ANIMATIONS
═══════════════════════════════════════════════ */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245,158,11,0.3); }
  50% { box-shadow: 0 0 0 8px rgba(245,158,11,0); }
}

/* ═══════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════ */
@media (max-width: 900px) {
  .editor-col { width: 100%; max-width: 100%; border-right: none; }
  .preview-col { display: none; }
  .bottom-nav { display: flex; }
  .workspace { overflow: hidden; }
  html, body { overflow: hidden; }
  .editor-sidebar { display: none; }
  .editor-panel { border-radius: 0; }
  
  /* Modals responsive */
  .modal-box {
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    margin: 10px;
    padding: 12px;
  }
}
@media (max-width: 480px) {
  .phone-frame { width: 260px; height: 500px; }
  .panel-header { padding: 12px 16px; }
  .form-section-inner { padding: 14px; }
  .auth-form-side.dark-theme { padding: 24px 20px; }
  
  /* Grid de redes sociales y botones en móvil */
  .social-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .social-toggle-wrap {
    width: 100%;
  }
  .social-fields {
    width: 100%;
    margin-left: 0 !important;
  }
}

/* ═══════════════════════════════════════════════
   UTILITY
═══════════════════════════════════════════════ */
.hidden { display: none !important; }
.text-amber { color: var(--amber); }
.text-green { color: var(--green); }
.text-muted { color: var(--text-2); }
.fw-bold { font-weight: 700; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mb-4 { margin-bottom: 4px; }

/* ─── FAB Preview (Mobile) ─── */
.fab-preview {
  display: none;
  position: fixed;
  bottom: 80px;
  right: 20px;
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: 30px;
  padding: 12px 20px;
  font-family: var(--font);
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(10, 132, 255, 0.4);
  cursor: pointer;
  z-index: 1000;
  align-items: center;
  gap: 8px;
}
.fab-preview i { font-size: 16px; }

@media (max-width: 900px) {
  .fab-preview { display: flex; }
  .preview-col.mobile-active {
    display: flex !important;
    position: fixed;
    inset: 0;
    z-index: 999;
    background: var(--bg);
    width: 100%;
    max-width: 100%;
  }
}