:root {
  --theme: #2563eb;
  --text: #172033;
  --muted: #64748b;
  --line: #dbe3ef;
  --surface: #ffffff;
  --soft: #f5f7fb;
  --danger: #b91c1c;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--soft);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
}

body:has(.profile-page) {
  background: #020403;
}

body:has(.subpage) {
  background: #020817;
}

body:has(.admin-shell) {
  background: #eef2f7;
}

a {
  color: inherit;
  text-decoration: none;
}

input,
select,
textarea,
button {
  font: inherit;
}

code {
  background: #eef2f7;
  border-radius: 4px;
  padding: 2px 5px;
}

.button {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  font-weight: 700;
  gap: 8px;
  justify-content: center;
  min-height: 42px;
  padding: 9px 14px;
}

.button.primary {
  background: var(--theme);
  border-color: var(--theme);
  color: #ffffff;
}

.button.small {
  font-size: 13px;
  min-height: 32px;
  padding: 5px 9px;
}

.button.danger {
  border-color: #fecaca;
  color: var(--danger);
}

.home-shell,
.creator-layout,
.admin-shell,
.center-page {
  margin: 0 auto;
  max-width: 1180px;
  padding: 28px;
}

.home-hero {
  align-items: center;
  background: #111827;
  color: #ffffff;
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr auto;
  min-height: 280px;
  padding: 36px;
}

.home-hero h1,
.creator-header h1,
.center-page h1 {
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1;
  margin: 0 0 14px;
}

.home-hero p {
  color: #d5dce8;
  max-width: 650px;
}

.eyebrow {
  color: var(--theme);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0 0 8px;
  text-transform: uppercase;
}

.creator-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  margin-top: 22px;
}

.creator-card,
.post-card,
.panel,
.ad,
.auth-card,
.stat,
.admin-form,
.table-wrap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.creator-card {
  display: block;
  padding: 20px;
}

.creator-card:hover {
  border-color: var(--card-theme);
}

.creator-card strong,
.creator-card small,
.creator-card p {
  display: block;
}

.creator-card small,
.post-meta,
.hint,
.section-heading span {
  color: var(--muted);
}

.creator-avatar {
  align-items: center;
  background: var(--card-theme, var(--theme));
  border-radius: 50%;
  color: #ffffff;
  display: inline-flex;
  font-weight: 800;
  height: 44px;
  justify-content: center;
  margin-bottom: 12px;
  width: 44px;
}

.creator-avatar.large {
  --card-theme: var(--theme);
  flex: 0 0 auto;
  height: 74px;
  margin: 0;
  width: 74px;
}

.creator-header {
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  padding: 24px 28px 34px;
}

.creator-header nav {
  display: flex;
  gap: 16px;
  justify-content: flex-end;
  margin-bottom: 28px;
}

.creator-title {
  align-items: center;
  display: flex;
  gap: 18px;
  margin: 0 auto;
  max-width: 1180px;
}

.creator-title p {
  margin: 0;
  max-width: 740px;
}

.creator-layout {
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(0, 1fr) 300px;
}

.creator-layout.no-sidebar {
  grid-template-columns: minmax(0, 820px);
  justify-content: center;
}

.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.category-tabs a {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-weight: 700;
  padding: 8px 14px;
}

.category-tabs a.active {
  background: var(--theme);
  border-color: var(--theme);
  color: #ffffff;
}

.section-heading,
.admin-heading {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin: 18px 0 12px;
}

.section-heading h2,
.admin-heading h2 {
  margin: 0;
}

.post-card {
  margin-bottom: 14px;
  overflow: hidden;
}

.post-media {
  aspect-ratio: 16 / 9;
  background: #0f172a;
  display: block;
  object-fit: cover;
  width: 100%;
}

.post-body {
  padding: 18px;
}

.post-body h2 {
  margin: 4px 0 8px;
}

.media-link {
  display: block;
  padding: 16px;
}

.sidebar {
  display: grid;
  gap: 14px;
  align-content: start;
}

.panel,
.ad {
  padding: 16px;
}

.panel h3,
.ad-title {
  margin: 0 0 10px;
}

.ad-title {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.ad-click,
.ad-image {
  display: block;
}

.ad-image {
  border-radius: 6px;
  height: auto;
  max-width: 100%;
  object-fit: contain;
  width: 100%;
}

.ads-top {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}

.side-link {
  border-top: 1px solid var(--line);
  display: block;
  padding: 10px 0;
}

.empty-state,
.flash {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  margin: 12px 0;
  padding: 14px;
}

.flash {
  align-items: center;
  display: flex;
  font-weight: 700;
  gap: 10px;
}

.flash .flash-icon {
  align-items: center;
  border-radius: 50%;
  display: inline-flex;
  flex-shrink: 0;
  font-size: 14px;
  height: 24px;
  justify-content: center;
  width: 24px;
}

.flash-success {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #065f46;
}

.flash-success .flash-icon {
  background: #10b981;
  color: #ffffff;
}

.flash-error {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

.flash-error .flash-icon {
  background: #ef4444;
  color: #ffffff;
}

@keyframes flash-fade-out {
  to { opacity: 0; transform: translateY(-6px); }
}

.flash.flash-dismiss {
  animation: flash-fade-out 0.4s ease forwards;
}

.center-page {
  align-items: center;
  display: grid;
  min-height: 75vh;
  place-items: center;
}

.auth-card {
  display: grid;
  gap: 14px;
  max-width: 420px;
  padding: 24px;
  width: 100%;
}

label {
  color: var(--muted);
  display: grid;
  font-size: 13px;
  font-weight: 700;
  gap: 6px;
}

input,
select,
textarea {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  min-height: 40px;
  padding: 8px 10px;
  width: 100%;
}

textarea {
  resize: vertical;
}

.admin-shell {
  align-items: start;
  display: grid;
  gap: 22px;
  grid-template-columns: 250px minmax(0, 1fr);
  max-width: 1320px;
  min-height: 100vh;
  padding: 20px;
}

.admin-menu-toggle {
  background: #0f172a;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 10px;
  cursor: pointer;
  display: none;
  flex-direction: column;
  gap: 5px;
  height: 44px;
  justify-content: center;
  padding: 0;
  position: fixed;
  right: 16px;
  top: 16px;
  width: 44px;
  z-index: 50;
}

.admin-menu-toggle span {
  background: #f8fafc;
  border-radius: 2px;
  display: block;
  height: 2px;
  margin: 0 auto;
  transition: transform 0.2s, opacity 0.2s;
  width: 22px;
}

.admin-menu-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.admin-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.admin-menu-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.admin-nav {
  background: linear-gradient(180deg, #0f172a 0%, #111c33 100%);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
  color: #dbe3ef;
  display: grid;
  gap: 18px;
  padding: 20px 16px;
  position: sticky;
  top: 20px;
}

.admin-brand {
  align-items: center;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  display: flex;
  gap: 12px;
  padding: 4px 4px 16px;
}

.admin-brand > span {
  align-items: center;
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  border-radius: 10px;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.35);
  color: #ffffff;
  display: inline-flex;
  font-weight: 900;
  height: 44px;
  justify-content: center;
  width: 44px;
}

.admin-brand strong,
.admin-brand small {
  display: block;
}

.admin-brand strong {
  color: #ffffff;
  font-size: 17px;
}

.admin-brand small {
  color: #94a3b8;
  font-size: 12px;
  margin-top: 2px;
}

.admin-nav nav {
  display: grid;
  gap: 4px;
}

.admin-nav a {
  align-items: center;
  border-left: 3px solid transparent;
  border-radius: 10px;
  color: #cbd5e1;
  display: flex;
  font-weight: 700;
  gap: 12px;
  min-height: 44px;
  padding: 10px 14px;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.admin-nav a .nav-icon {
  align-items: center;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  display: inline-flex;
  font-size: 16px;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.admin-nav a:hover {
  background: rgba(148, 163, 184, 0.12);
  color: #ffffff;
}

.admin-nav a.active {
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.25) 0%, rgba(124, 58, 237, 0.18) 100%);
  border-left-color: #60a5fa;
  color: #ffffff;
}

.admin-nav a.active .nav-icon {
  background: rgba(96, 165, 250, 0.35);
}

.admin-nav-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  display: grid;
  gap: 6px;
  padding-top: 14px;
}

.admin-nav-footer a {
  border-radius: 8px;
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 600;
  min-height: 38px;
  padding: 8px 12px;
}

.admin-nav-footer a:hover {
  background: rgba(148, 163, 184, 0.12);
  color: #ffffff;
}

.admin-content {
  min-width: 0;
}

.admin-topbar {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.06);
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 20px;
  padding: 18px 22px;
  position: sticky;
  top: 12px;
  z-index: 5;
}

.admin-topbar h1 {
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.1;
  margin: 0;
}

.admin-topbar .eyebrow {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.12em;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.admin-topbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.stat-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-bottom: 20px;
}

.stat {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
  color: inherit;
  cursor: pointer;
  display: grid;
  gap: 6px;
  padding: 20px;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}

.stat:hover {
  border-color: #93c5fd;
  box-shadow: 0 18px 38px rgba(37, 99, 235, 0.12);
  transform: translateY(-2px);
}

.stat::before {
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  border-radius: 14px 0 0 14px;
  content: "";
  height: 100%;
  left: 0;
  position: absolute;
  top: 0;
  width: 4px;
}

.stat:nth-child(2)::before {
  background: linear-gradient(135deg, #06b6d4 0%, #0ea5e9 100%);
}

.stat:nth-child(3)::before {
  background: linear-gradient(135deg, #f97316 0%, #f59e0b 100%);
}

.stat:nth-child(4)::before {
  background: linear-gradient(135deg, #10b981 0%, #14b8a6 100%);
}

.stat strong {
  color: #0f172a;
  font-size: 32px;
  line-height: 1;
}

.stat span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.income-stat {
  cursor: default;
}

.income-stat strong {
  color: #047857;
}

.income-stat-link {
  color: inherit;
  cursor: pointer;
  display: grid;
  gap: 6px;
  text-decoration: none;
}

.income-stat-link:hover strong {
  color: #065f46;
}

.income-stat-link:hover span {
  color: #047857;
}

.income-filter {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}

.income-tz {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 4px 12px;
  text-decoration: none;
  text-transform: uppercase;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.income-tz:hover {
  border-color: #93c5fd;
}

.income-tz.active {
  background: linear-gradient(135deg, #10b981 0%, #14b8a6 100%);
  border-color: transparent;
  color: #ffffff;
}

.income-error {
  color: #b91c1c;
  font-size: 11px;
  margin-top: 2px;
}

/* Analytics page */
.analytics-filterbar {
  align-items: flex-end;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
  padding: 16px 18px;
}

.analytics-filter-form {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 0;
}

.analytics-filter-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.analytics-filter-field > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.analytics-filter-field select {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
  font-size: 14px;
  min-width: 160px;
  padding: 9px 12px;
}

.analytics-reset {
  margin-left: auto;
}

.analytics-cards {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  margin-bottom: 24px;
}

.analytics-card {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
  display: flex;
  gap: 14px;
  padding: 18px;
  position: relative;
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.analytics-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: #94a3b8;
}

.analytics-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.1);
}

.analytics-card.views::before { background: #2563eb; }
.analytics-card.visitors::before { background: #0ea5e9; }
.analytics-card.buttons::before { background: #7c3aed; }
.analytics-card.ads::before { background: #f59e0b; }
.analytics-card.popunder::before { background: #2563eb; }

.analytics-card-icon {
  align-items: center;
  border-radius: 12px;
  display: flex;
  font-size: 22px;
  height: 48px;
  justify-content: center;
  width: 48px;
}

.analytics-card.views .analytics-card-icon { background: rgba(37, 99, 235, 0.12); }
.analytics-card.visitors .analytics-card-icon { background: rgba(14, 165, 233, 0.14); }
.analytics-card.buttons .analytics-card-icon { background: rgba(124, 58, 237, 0.14); }
.analytics-card.ads .analytics-card-icon { background: rgba(245, 158, 11, 0.16); }
.analytics-card.popunder .analytics-card-icon { background: rgba(37, 99, 235, 0.16); }

.analytics-card-body {
  display: grid;
  gap: 2px;
}

.analytics-card-body strong {
  color: #0f172a;
  font-size: 26px;
  line-height: 1.1;
}

.analytics-card-body span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* Two-column responsive grid for analytics data panels */
.analytics-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.analytics-grid .analytics-section.wide {
  grid-column: 1 / -1;
}

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

.analytics-section {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
  margin-bottom: 0;
  padding: 20px;
}

.analytics-section-head {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.analytics-section-head h2 {
  font-size: 16px;
  margin: 0;
}

.analytics-section-head .hint {
  flex-basis: 100%;
  margin: 0;
}

.analytics-section table {
  border-collapse: collapse;
  width: 100%;
}

.analytics-section thead th {
  background: #f8fafc;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.analytics-section tbody tr {
  transition: background 0.12s ease;
}

.analytics-section tbody tr:hover {
  background: #f8fafc;
}

.analytics-count {
  background: #eef2ff;
  border-radius: 999px;
  color: #4338ca;
  font-size: 12px;
  font-weight: 700;
  min-width: 24px;
  padding: 3px 10px;
  text-align: center;
}

.analytics-section .table-wrap {
  margin: 0 -20px -20px;
  overflow-x: auto;
}

.analytics-section .table-wrap.analytics-scroll {
  max-height: 360px;
  overflow-y: auto;
}

.analytics-section .table-wrap table {
  min-width: 100%;
}

.analytics-section .table-wrap th,
.analytics-section .table-wrap td {
  padding: 11px 14px;
  text-align: left;
  white-space: nowrap;
}

.analytics-section .table-wrap th:first-child,
.analytics-section .table-wrap td:first-child {
  padding-left: 20px;
}

.analytics-section .table-wrap th:last-child,
.analytics-section .table-wrap td:last-child {
  padding-right: 20px;
}

.analytics-section .table-wrap tbody td {
  border-top: 1px solid var(--line);
  font-size: 14px;
}

.analytics-section .empty-state {
  background: #f8fafc;
  border: 1px dashed var(--line);
  border-radius: 12px;
  color: var(--muted);
  padding: 24px;
  text-align: center;
}

.analytics-tag {
  background: #f1f5f9;
  border-radius: 6px;
  color: #475569;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 8px;
  text-transform: capitalize;
}

/* Income page */
.income-hero {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-bottom: 18px;
}

.income-hero-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
  display: grid;
  gap: 6px;
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.income-hero-card.primary {
  background: linear-gradient(135deg, #047857 0%, #10b981 100%);
  border-color: transparent;
  color: #ffffff;
}

.income-hero-card.primary .income-hero-label,
.income-hero-card.primary .income-sub {
  color: rgba(255, 255, 255, 0.85);
}

.income-hero-card.accent-green::before,
.income-hero-card.accent-purple::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
}

.income-hero-card.accent-green::before {
  background: linear-gradient(135deg, #10b981 0%, #14b8a6 100%);
}

.income-hero-card.accent-purple::before {
  background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
}

.income-hero-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.income-hero-card strong {
  color: inherit;
  font-size: 30px;
  line-height: 1.1;
}

.income-sub {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.income-delta {
  border-radius: 999px;
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  width: fit-content;
}

.income-delta.up {
  background: rgba(255, 255, 255, 0.22);
  color: #ecfdf5;
}

.income-delta.down {
  background: rgba(127, 29, 29, 0.25);
  color: #fee2e2;
}

.income-bar {
  background: #eef2f7;
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
  width: 90px;
}

.income-bar span {
  background: linear-gradient(135deg, #10b981 0%, #14b8a6 100%);
  border-radius: 999px;
  display: block;
  height: 100%;
}

.admin-form {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.06);
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 22px;
  padding: 22px;
}

.admin-form label {
  color: #334155;
  display: grid;
  font-size: 13px;
  font-weight: 700;
  gap: 6px;
}

.admin-form input,
.admin-form select,
.admin-form textarea {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  padding: 10px 12px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.admin-form input:focus,
.admin-form select:focus,
.admin-form textarea:focus {
  background: #ffffff;
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.18);
  outline: none;
}

.profile-editor {
  background: #ffffff;
  border-color: var(--line);
}

.media-admin-block {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  gap: 12px;
  padding: 16px;
}

.media-admin-block strong {
  color: #0f172a;
  font-size: 14px;
  letter-spacing: 0.02em;
}

.upload-row {
  align-items: center;
  background: #ffffff;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  display: grid;
  gap: 12px;
  grid-template-columns: 58px 1fr auto;
  padding: 12px;
}

.upload-row.compact {
  grid-template-columns: 1fr auto;
}

.admin-avatar-preview {
  border-radius: 50%;
  height: 52px;
  object-fit: cover;
  width: 52px;
}

.admin-avatar-preview.blank {
  align-items: center;
  background: #e2e8f0;
  color: #64748b;
  display: flex;
  font-size: 24px;
  justify-content: center;
}

.live-preview {
  align-items: center;
  background: #0f172a;
  border-radius: 10px;
  color: #ffffff;
  display: flex;
  justify-content: center;
  min-height: 160px;
  overflow: hidden;
}

.live-preview video {
  max-height: 200px;
  max-width: 100%;
}

.admin-gallery-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.admin-gallery-grid img {
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: cover;
  width: 100%;
}

.admin-gallery-grid video {
  aspect-ratio: 9 / 13;
  background: #09090b;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: cover;
  width: 100%;
}

.admin-gallery-grid-video {
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
}

.admin-ad-preview {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: block;
  max-height: 180px;
  object-fit: contain;
  width: 100%;
}

.profile-table td {
  height: 72px;
}

.profile-table small {
  color: var(--muted);
  display: block;
  font-size: 12px;
  margin-top: 2px;
}

.profile-actions-cell {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.profile-cards {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  margin-bottom: 22px;
}

.user-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}

.user-card:hover {
  border-color: #93c5fd;
  box-shadow: 0 18px 38px rgba(37, 99, 235, 0.12);
  transform: translateY(-2px);
}

.user-card-body {
  align-items: center;
  color: inherit;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  padding: 16px 18px;
  text-decoration: none;
}

.user-card-id {
  align-items: center;
  display: flex;
  gap: 12px;
  min-width: 0;
}

.user-card-avatar {
  border-radius: 50%;
  display: block;
  flex-shrink: 0;
  height: 52px;
  object-fit: cover;
  overflow: hidden;
  width: 52px;
}

.user-card-avatar img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.user-card-avatar.fallback {
  align-items: center;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #ffffff;
  display: flex;
  font-size: 22px;
  font-weight: 800;
  justify-content: center;
}

.user-card-id strong {
  color: #0f172a;
  display: block;
  font-size: 16px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-card-id small {
  color: var(--muted);
  display: block;
  font-size: 12px;
  margin-top: 2px;
}

.user-card-stats {
  align-items: flex-end;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  gap: 4px;
  text-align: right;
}

.user-card-stats small {
  color: var(--muted);
  font-size: 12px;
}

.user-card-stats small strong {
  color: #0f172a;
  font-weight: 700;
}

.user-card-actions {
  background: #f8fafc;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 14px;
}

.user-card-actions .button.small {
  font-size: 12px;
  min-height: 30px;
  padding: 4px 10px;
}

.user-card-actions form {
  margin: 0;
}

.profile-tabs {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 14px;
  padding: 6px;
}

.profile-tab {
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: #64748b;
  cursor: pointer;
  flex: 1 1 auto;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  min-height: 40px;
  padding: 8px 14px;
  transition: background 0.15s, color 0.15s;
}

.profile-tab:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.profile-tab.active {
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.25);
  color: #ffffff;
}

.profile-panel {
  display: none;
  grid-column: 1 / -1;
}

.profile-panel.active {
  display: contents;
}

.profile-form-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 6px;
}

/* Global Landing redesign */
.status-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-bottom: 18px;
}

.status-card {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-left: 4px solid #cbd5e1;
  border-radius: 12px;
  display: flex;
  gap: 12px;
  padding: 12px 14px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.status-card.on {
  border-left-color: #10b981;
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.12);
}

.status-card .status-icon {
  align-items: center;
  background: #f1f5f9;
  border-radius: 10px;
  display: flex;
  font-size: 18px;
  height: 36px;
  justify-content: center;
  width: 36px;
}

.status-card.on .status-icon {
  background: #d1fae5;
}

.status-card strong {
  color: #0f172a;
  display: block;
  font-size: 13px;
  font-weight: 700;
}

.status-card small {
  color: #64748b;
  display: block;
  font-size: 11px;
  letter-spacing: 0.06em;
  margin-top: 2px;
  text-transform: uppercase;
}

.status-card.on small {
  color: #047857;
  font-weight: 700;
}

.global-form {
  background: transparent;
  border: 0;
  box-shadow: none;
  display: block;
  padding: 0;
}

.global-form .profile-panel {
  display: none;
}

.global-form .profile-panel.active {
  display: grid;
  gap: 16px;
}

.settings-section {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.04);
  padding: 20px 22px;
}

.settings-section + .settings-section {
  margin-top: 14px;
}

.settings-section header {
  margin-bottom: 14px;
}

.settings-section header h3 {
  font-size: 16px;
  margin: 0 0 4px;
}

.settings-section header p {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}

.settings-section header code {
  background: #f1f5f9;
  border-radius: 4px;
  font-size: 12px;
  padding: 1px 5px;
}

.settings-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.settings-grid .wide {
  grid-column: 1 / -1;
}

.settings-grid label {
  color: #334155;
  display: grid;
  font-size: 13px;
  font-weight: 700;
  gap: 6px;
}

.settings-grid input,
.settings-grid select,
.settings-grid textarea {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  padding: 10px 12px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.settings-grid input:focus,
.settings-grid select:focus,
.settings-grid textarea:focus {
  background: #ffffff;
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.18);
  outline: none;
}

.contact-label.whatsapp::before {
  background: #25d366;
  border-radius: 4px;
  content: "WA";
  color: #ffffff;
  display: inline-block;
  font-size: 9px;
  font-weight: 800;
  margin-right: 6px;
  padding: 2px 5px;
  vertical-align: middle;
}

.contact-label.telegram::before {
  background: #0088cc;
  border-radius: 4px;
  color: #ffffff;
  content: "TG";
  display: inline-block;
  font-size: 9px;
  font-weight: 800;
  margin-right: 6px;
  padding: 2px 5px;
  vertical-align: middle;
}

.contact-label.decline::before {
  background: #ef4444;
  border-radius: 4px;
  color: #ffffff;
  content: "✕";
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  margin-right: 6px;
  padding: 2px 6px;
  vertical-align: middle;
}

.contact-label.answer::before {
  background: #10b981;
  border-radius: 4px;
  color: #ffffff;
  content: "✓";
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  margin-right: 6px;
  padding: 2px 6px;
  vertical-align: middle;
}

.toggle {
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  display: flex !important;
  flex-direction: row !important;
  font-weight: 700;
  gap: 12px;
  padding: 12px 14px;
  transition: background 0.15s, border-color 0.15s;
}

.toggle:hover {
  background: #f1f5f9;
}

.toggle input[type="checkbox"] {
  appearance: none;
  background: #cbd5e1;
  border-radius: 999px;
  cursor: pointer;
  flex-shrink: 0;
  height: 22px;
  position: relative;
  transition: background 0.2s;
  width: 38px;
}

.toggle input[type="checkbox"]::after {
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.2);
  content: "";
  height: 18px;
  left: 2px;
  position: absolute;
  top: 2px;
  transition: left 0.2s;
  width: 18px;
}

.toggle input[type="checkbox"]:checked {
  background: linear-gradient(135deg, #10b981, #059669);
}

.toggle input[type="checkbox"]:checked::after {
  left: 18px;
}

.toggle span {
  font-size: 13px;
}

.ad-preview-wrap {
  background: #f8fafc;
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 8px;
}

.settings-savebar {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 14px;
  bottom: 14px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-top: 18px;
  padding: 12px 18px;
  position: sticky;
  z-index: 6;
}

.saved-state {
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
}

.saved-state.dirty {
  color: #b45309;
}

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

.segmented-control {
  background: #f1f5f9;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  gap: 4px;
  grid-template-columns: repeat(3, 1fr);
  padding: 4px;
}

.segmented-option {
  align-items: center;
  border-radius: 8px;
  color: #64748b;
  cursor: pointer;
  display: flex;
  font-size: 13px;
  font-weight: 700;
  gap: 6px;
  justify-content: center;
  min-height: 42px;
  padding: 8px 12px;
  text-align: center;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}

.segmented-option input[type="radio"] {
  display: none;
}

.segmented-option strong {
  font-size: 14px;
}

.segmented-option:hover {
  background: rgba(255, 255, 255, 0.6);
  color: #0f172a;
}

.segmented-option.active {
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  color: #0f172a;
}

.segmented-option.mode-on.active {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
}

.segmented-option.mode-off.active {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #ffffff;
}

.segmented-option.mode-inherit.active {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #ffffff;
}

/* Template picker */
.template-picker {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.template-card {
  background: #ffffff;
  border: 2px solid var(--line);
  border-radius: 14px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.template-card input[type="radio"] {
  height: 0;
  opacity: 0;
  position: absolute;
  width: 0;
}

.template-card:hover {
  border-color: #93c5fd;
  box-shadow: 0 14px 32px rgba(37, 99, 235, 0.12);
  transform: translateY(-2px);
}

.template-card.active {
  border-color: #2563eb;
  box-shadow: 0 14px 32px rgba(37, 99, 235, 0.22);
}

.template-card.active::after {
  align-items: center;
  background: #2563eb;
  border-radius: 999px;
  color: #ffffff;
  content: "✓";
  display: flex;
  font-size: 13px;
  font-weight: 800;
  height: 26px;
  justify-content: center;
  position: absolute;
  right: 10px;
  top: 10px;
  width: 26px;
  z-index: 2;
}

.template-thumb {
  align-items: center;
  aspect-ratio: 4 / 5;
  display: flex;
  flex-direction: column;
  gap: 6px;
  justify-content: center;
  padding: 16px 12px;
  position: relative;
}

.template-thumb-circle {
  background: rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  display: block;
  height: 36px;
  margin-bottom: 4px;
  width: 36px;
}

.template-thumb-line {
  background: rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  display: block;
  height: 6px;
  width: 50%;
}

.template-thumb-line.wide {
  height: 8px;
  width: 70%;
}

.template-thumb-pill {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  display: block;
  height: 14px;
  width: 80%;
}

/* Per-template thumb skins */
.template-thumb-dark {
  background: linear-gradient(180deg, #111827 0%, #030712 100%);
}
.template-thumb-dark .template-thumb-circle {
  background: linear-gradient(135deg, #38bdf8, #0ea5e9);
}

.template-thumb-light {
  background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
}
.template-thumb-light .template-thumb-circle {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
}
.template-thumb-light .template-thumb-line,
.template-thumb-light .template-thumb-pill {
  background: rgba(15, 23, 42, 0.18);
}
.template-thumb-light .template-thumb-line.wide {
  background: rgba(15, 23, 42, 0.4);
}

.template-thumb-neon {
  background:
    radial-gradient(circle at 20% 0%, rgba(34, 211, 238, 0.6), transparent 40%),
    radial-gradient(circle at 80% 100%, rgba(236, 72, 153, 0.6), transparent 40%),
    linear-gradient(180deg, #0a0620, #030712);
}
.template-thumb-neon .template-thumb-circle {
  background: linear-gradient(135deg, #22d3ee, #ec4899);
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.6);
}
.template-thumb-neon .template-thumb-pill {
  background: linear-gradient(90deg, rgba(34, 211, 238, 0.3), rgba(236, 72, 153, 0.3));
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.template-thumb-glass {
  background:
    radial-gradient(circle at 25% 20%, rgba(167, 139, 250, 0.7), transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(52, 211, 153, 0.7), transparent 50%),
    radial-gradient(circle at 75% 15%, rgba(251, 113, 133, 0.6), transparent 40%),
    linear-gradient(180deg, #1e1b4b, #0f172a);
  position: relative;
}
.template-thumb-glass::before {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  content: "";
  inset: 12px;
  position: absolute;
}
.template-thumb-glass > * {
  position: relative;
  z-index: 1;
}
.template-thumb-glass .template-thumb-circle {
  background: rgba(255, 255, 255, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.3);
}
.template-thumb-glass .template-thumb-pill {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.template-thumb-magazine {
  background: #fefefe;
  background-image: repeating-linear-gradient(0deg, transparent 0, transparent 6px, rgba(0, 0, 0, 0.04) 6px, rgba(0, 0, 0, 0.04) 7px);
  position: relative;
}
.template-thumb-magazine::before,
.template-thumb-magazine::after {
  background: #d4af37;
  content: "";
  height: 4px;
  left: 0;
  position: absolute;
  right: 0;
}
.template-thumb-magazine::before {
  top: 12px;
}
.template-thumb-magazine::after {
  bottom: 12px;
}
.template-thumb-magazine .template-thumb-circle {
  background: #0a0a0a;
  border-radius: 4px;
}
.template-thumb-magazine .template-thumb-line {
  background: #0a0a0a;
}
.template-thumb-magazine .template-thumb-line.wide {
  background: #d4af37;
}
.template-thumb-magazine .template-thumb-pill {
  background: #0a0a0a;
  border-radius: 0;
}

.template-thumb-aurora {
  background:
    radial-gradient(circle at 20% 0%, rgba(59, 130, 246, 0.55), transparent 45%),
    radial-gradient(circle at 80% 100%, rgba(139, 92, 246, 0.45), transparent 50%),
    radial-gradient(1px 1px at 18% 22%, rgba(255,255,255,0.7), transparent),
    radial-gradient(1px 1px at 38% 70%, rgba(255,255,255,0.6), transparent),
    radial-gradient(1px 1px at 72% 35%, rgba(255,255,255,0.65), transparent),
    radial-gradient(1px 1px at 88% 80%, rgba(255,255,255,0.6), transparent),
    radial-gradient(1px 1px at 12% 60%, rgba(255,255,255,0.55), transparent),
    radial-gradient(1px 1px at 60% 12%, rgba(255,255,255,0.65), transparent),
    linear-gradient(180deg, #0a1735, #050818);
}
.template-thumb-aurora .template-thumb-circle {
  background: linear-gradient(135deg, #2563eb, #60a5fa);
  border: 2px solid #ffffff;
  box-shadow: 0 0 12px rgba(96, 165, 250, 0.6);
}
.template-thumb-aurora .template-thumb-line.wide {
  background: rgba(255, 255, 255, 0.85);
}
.template-thumb-aurora .template-thumb-line {
  background: rgba(148, 163, 196, 0.55);
}
.template-thumb-aurora .template-thumb-pill {
  background: rgba(96, 165, 250, 0.18);
  border: 1px solid rgba(96, 165, 250, 0.35);
  border-radius: 8px;
}

.template-thumb-royal {
  background:
    radial-gradient(circle at 20% 10%, rgba(212, 175, 55, 0.18), transparent 50%),
    radial-gradient(circle at 80% 90%, rgba(212, 175, 55, 0.12), transparent 50%),
    linear-gradient(180deg, #0a0e2a, #02030c);
  position: relative;
}
.template-thumb-royal::before {
  background:
    repeating-linear-gradient(0deg, transparent 0, transparent 8px, rgba(212, 175, 55, 0.06) 8px, rgba(212, 175, 55, 0.06) 9px),
    repeating-linear-gradient(90deg, transparent 0, transparent 8px, rgba(212, 175, 55, 0.06) 8px, rgba(212, 175, 55, 0.06) 9px);
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
}
.template-thumb-royal > * {
  position: relative;
  z-index: 1;
}
.template-thumb-royal .template-thumb-circle {
  background: linear-gradient(135deg, #1a1d40, #0a0e2a);
  border: 2px solid #d4af37;
  box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.2);
}
.template-thumb-royal .template-thumb-line.wide {
  background: #d4af37;
  font-style: italic;
}
.template-thumb-royal .template-thumb-line {
  background: rgba(245, 232, 200, 0.4);
}
.template-thumb-royal .template-thumb-pill {
  background: rgba(20, 24, 50, 0.8);
  border: 1px solid rgba(212, 175, 55, 0.45);
  border-radius: 4px;
}

.template-card-body {
  background: #ffffff;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 4px;
  padding: 10px 12px;
}

.template-card-body strong {
  color: #0f172a;
  font-size: 13px;
}

.template-card-body small {
  color: var(--muted);
  font-size: 11px;
}

.template-preview-link {
  color: #2563eb;
  font-size: 12px;
  font-weight: 700;
  margin-top: 4px;
  text-decoration: none;
}

.template-preview-link:hover {
  text-decoration: underline;
}

/* Upload progress overlay */
.upload-overlay {
  align-items: center;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: none;
  inset: 0;
  justify-content: center;
  padding: 20px;
  position: fixed;
  z-index: 100;
}

.upload-overlay.open {
  display: flex;
}

.upload-card {
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 30px 90px rgba(15, 23, 42, 0.4);
  display: grid;
  gap: 14px;
  max-width: 460px;
  padding: 22px 24px;
  width: 100%;
}

.upload-card-head {
  align-items: center;
  display: flex;
  gap: 12px;
}

.upload-spinner {
  border: 3px solid #e2e8f0;
  border-radius: 50%;
  border-top-color: #2563eb;
  display: inline-block;
  flex-shrink: 0;
  height: 28px;
  width: 28px;
  animation: upload-spin 0.9s linear infinite;
}

@keyframes upload-spin {
  to { transform: rotate(360deg); }
}

.upload-card-head strong {
  color: #0f172a;
  display: block;
  font-size: 16px;
}

.upload-card-head small {
  color: var(--muted);
  display: block;
  font-size: 12px;
  margin-top: 2px;
}

.upload-progress {
  background: #f1f5f9;
  border-radius: 999px;
  height: 12px;
  overflow: hidden;
}

.upload-progress-fill {
  background: linear-gradient(90deg, #2563eb, #7c3aed);
  border-radius: 999px;
  height: 100%;
  transition: width 0.15s;
  width: 0%;
}

.upload-progress-meta {
  color: #475569;
  display: flex;
  font-size: 12px;
  font-weight: 600;
  gap: 12px;
  justify-content: space-between;
}

.upload-progress-meta span:first-child {
  color: #2563eb;
  font-weight: 800;
}

.upload-log {
  background: #0f172a;
  border-radius: 10px;
  color: #cbd5e1;
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 12px;
  height: 140px;
  line-height: 1.5;
  overflow-y: auto;
  padding: 12px 14px;
}

.upload-log-line {
  margin-bottom: 4px;
}

.upload-log-line span {
  color: #64748b;
  margin-right: 8px;
}

.upload-log-line.ok {
  color: #4ade80;
}

.upload-log-line.err {
  color: #f87171;
}

.upload-log-line.info {
  color: #cbd5e1;
}

.upload-cancel {
  align-self: flex-end;
}

.analytics-scroll {
  max-height: 420px;
  overflow-y: auto;
}

.analytics-scroll thead th {
  position: sticky;
  top: 0;
  z-index: 1;
}

/* Avatar positioner */
.avatar-positioner {
  align-items: stretch;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(240px, 1fr) minmax(220px, 1fr);
}

@media (max-width: 600px) {
  .avatar-positioner {
    grid-template-columns: 1fr;
  }
}

.avatar-stage {
  align-items: center;
  aspect-ratio: 1;
  background: #0f172a;
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: grab;
  display: flex;
  justify-content: center;
  margin: 0 auto;
  max-width: 320px;
  overflow: hidden;
  position: relative;
  touch-action: none;
  user-select: none;
  width: 100%;
}

.avatar-stage.dragging {
  cursor: grabbing;
}

.avatar-stage img {
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  user-select: none;
  width: 100%;
  -webkit-user-drag: none;
}

.avatar-stage-empty {
  color: #94a3b8;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  pointer-events: none;
  text-align: center;
}

.avatar-stage-mask,
.avatar-stage-crop,
.avatar-stage-crop-handle {
  display: none !important;
}

.avatar-stage::after {
  border: 2px dashed rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  content: "";
  inset: 8px;
  pointer-events: none;
  position: absolute;
}

.avatar-stage::before {
  align-items: center;
  background: rgba(15, 23, 42, 0.7);
  border-radius: 999px;
  color: #ffffff;
  content: "↕↔ Drag";
  display: flex;
  font-size: 11px;
  font-weight: 700;
  height: 26px;
  justify-content: center;
  left: 50%;
  letter-spacing: 0.06em;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  transition: opacity 0.15s;
  width: 76px;
  z-index: 2;
}

.avatar-stage:hover::before {
  opacity: 1;
}

.avatar-stage.dragging::before {
  opacity: 0;
}

.avatar-controls {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
}

.avatar-preview-pair {
  display: flex;
  gap: 16px;
  justify-content: center;
}

.avatar-preview-block {
  align-items: center;
  display: grid;
  gap: 8px;
  justify-items: center;
}

.avatar-preview-circle {
  background: #e2e8f0;
  border: 3px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.2);
  height: 120px;
  overflow: hidden;
  position: relative;
  width: 120px;
}

.avatar-preview-circle img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.avatar-preview-circle.blank {
  align-items: center;
  background: #e2e8f0;
  color: #94a3b8;
  display: flex;
  font-size: 32px;
  justify-content: center;
}

.avatar-preview-block small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.avatar-axis {
  align-items: center;
  color: #334155;
  display: grid;
  font-size: 12px;
  font-weight: 700;
  gap: 6px;
  grid-template-columns: 80px 1fr 50px;
}

.avatar-axis input[type="range"] {
  -webkit-appearance: none;
  background: transparent;
  height: 22px;
  padding: 0;
  width: 100%;
}

.avatar-axis input[type="range"]::-webkit-slider-runnable-track {
  background: linear-gradient(90deg, #e2e8f0, #cbd5e1);
  border-radius: 999px;
  height: 6px;
}

.avatar-axis input[type="range"]::-moz-range-track {
  background: linear-gradient(90deg, #e2e8f0, #cbd5e1);
  border-radius: 999px;
  height: 6px;
}

.avatar-axis input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  border: 0;
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.45);
  cursor: pointer;
  height: 18px;
  margin-top: -6px;
  width: 18px;
}

.avatar-axis input[type="range"]::-moz-range-thumb {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  border: 0;
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.45);
  cursor: pointer;
  height: 18px;
  width: 18px;
}

.avatar-axis span {
  color: #2563eb;
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 12px;
  font-weight: 700;
  text-align: right;
}

/* Media library */
.media-filterbar {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 14px;
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
  padding: 16px 18px;
}

.media-filter-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.media-filter-row label {
  align-items: center;
  display: flex;
  font-size: 13px;
  font-weight: 700;
  gap: 8px;
}

.media-filter-row select {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 500;
  min-height: 38px;
  padding: 6px 10px;
}

.media-type-tabs {
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 12px;
}

.media-type-tab {
  align-items: center;
  background: #f1f5f9;
  border-radius: 999px;
  color: #475569;
  display: inline-flex;
  font-size: 13px;
  font-weight: 700;
  gap: 6px;
  padding: 6px 14px;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.media-type-tab span {
  font-size: 14px;
}

.media-type-tab small {
  background: rgba(15, 23, 42, 0.08);
  border-radius: 999px;
  color: #475569;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
}

.media-type-tab:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.media-type-tab.active {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #ffffff;
}

.media-type-tab.active small {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.media-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  margin-bottom: 22px;
}

.pagination {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin: 8px 0 24px;
}

.pagination-btn {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #334155;
  display: inline-flex;
  font-size: 14px;
  font-weight: 700;
  justify-content: center;
  min-height: 38px;
  min-width: 38px;
  padding: 6px 12px;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.pagination-btn:hover {
  background: #f1f5f9;
  border-color: #93c5fd;
  color: #0f172a;
}

.pagination-btn.active {
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  border-color: transparent;
  color: #ffffff;
  cursor: default;
}

.pagination-btn.disabled {
  color: #cbd5e1;
  cursor: not-allowed;
  pointer-events: none;
}

.pagination-gap {
  color: #94a3b8;
  font-weight: 700;
  padding: 0 4px;
}

.media-tile {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}

.media-tile:hover {
  border-color: #93c5fd;
  box-shadow: 0 18px 38px rgba(37, 99, 235, 0.12);
  transform: translateY(-2px);
}

.media-tile.draft {
  opacity: 0.85;
}

.media-tile-thumb {
  align-items: center;
  aspect-ratio: 16 / 10;
  background: #0f172a;
  color: #ffffff;
  display: flex;
  justify-content: center;
  overflow: hidden;
  position: relative;
  text-decoration: none;
}

.media-tile-thumb img,
.media-tile-thumb video {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.media-tile-empty {
  background: linear-gradient(135deg, #1e293b, #334155);
  font-size: 56px;
  height: 100%;
  width: 100%;
  align-items: center;
  display: flex;
  justify-content: center;
}

.media-tile-play {
  background: rgba(0, 0, 0, 0.6);
  border-radius: 50%;
  color: #ffffff;
  font-size: 22px;
  height: 50px;
  left: 50%;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 50px;
  align-items: center;
  display: flex;
  justify-content: center;
}

.media-tile-type {
  background: rgba(15, 23, 42, 0.7);
  border-radius: 999px;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  left: 10px;
  letter-spacing: 0.04em;
  padding: 3px 9px;
  position: absolute;
  text-transform: uppercase;
  top: 10px;
}

.media-tile-badge {
  background: #fbbf24;
  border-radius: 999px;
  color: #78350f;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 3px 9px;
  position: absolute;
  right: 10px;
  text-transform: uppercase;
  top: 10px;
}

.media-tile-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px;
}

.media-tile-title {
  color: #0f172a;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
}

.media-tile-title:hover {
  color: #2563eb;
}

.media-tile-meta {
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 12px;
  gap: 10px;
}

.media-tile-excerpt {
  color: #475569;
  font-size: 12px;
  line-height: 1.4;
  margin: 0;
}

.media-tile-actions {
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 10px;
}

.media-tile-actions .button.small {
  font-size: 12px;
  min-height: 30px;
  padding: 4px 10px;
}

.media-tile-actions form {
  margin: 0;
}

.media-form-preview {
  align-items: center;
  background: #0f172a;
  border-radius: 10px;
  display: flex;
  justify-content: center;
  max-height: 320px;
  overflow: hidden;
  padding: 8px;
}

.media-form-preview img,
.media-form-preview video {
  max-height: 300px;
  max-width: 100%;
  object-fit: contain;
}

.media-link-preview {
  color: #ffffff;
  display: inline-block;
  font-size: 14px;
  font-weight: 700;
  padding: 30px;
  text-decoration: none;
}

/* Buttons grid */
.button-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  margin-bottom: 22px;
}

.button-tile {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}

.button-tile:hover {
  border-color: #93c5fd;
  box-shadow: 0 18px 38px rgba(37, 99, 235, 0.12);
  transform: translateY(-2px);
}

.button-tile.inactive {
  opacity: 0.7;
}

.button-tile-body {
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 18px;
  text-decoration: none;
}

.button-tile-head {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.button-tile-placement {
  background: #f1f5f9;
  border-radius: 999px;
  color: #475569;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 3px 9px;
  text-transform: uppercase;
}

.button-tile-off {
  background: #fee2e2;
  border-radius: 999px;
  color: #991b1b;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 3px 9px;
  text-transform: uppercase;
}

.button-tile-preview {
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: #0f172a;
  display: flex;
  font-size: 14px;
  font-weight: 700;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  text-align: center;
}

.button-tile-preview.whatsapp {
  background: #25d366;
  border-color: #25d366;
  color: #ffffff;
}

.button-tile-preview.telegram {
  background: #0088cc;
  border-color: #0088cc;
  color: #ffffff;
}

.button-tile-preview.primary {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  border-color: transparent;
  color: #ffffff;
}

.button-tile-meta {
  color: var(--muted);
  display: flex;
  flex-direction: column;
  font-size: 12px;
  gap: 3px;
}

.button-tile-url {
  color: #64748b;
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 11px;
  word-break: break-all;
}

.button-tile-actions {
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 14px;
}

.button-tile-actions .button.small {
  font-size: 12px;
  min-height: 30px;
  padding: 4px 10px;
}

.button-tile-actions form {
  margin: 0;
}

/* Login */
.login-shell {
  align-items: center;
  background:
    radial-gradient(circle at 20% 0%, rgba(37, 99, 235, 0.18), transparent 40%),
    radial-gradient(circle at 80% 100%, rgba(124, 58, 237, 0.18), transparent 40%),
    linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
  display: flex;
  justify-content: center;
  margin: 0;
  max-width: none;
  min-height: 100vh;
  padding: 32px 16px;
  width: 100%;
}

.login-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.18);
  display: grid;
  gap: 22px;
  max-width: 420px;
  padding: 32px 30px;
  width: 100%;
}

.login-brand {
  align-items: center;
  display: flex;
  gap: 14px;
}

.login-logo {
  align-items: center;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.35);
  color: #ffffff;
  display: inline-flex;
  font-weight: 900;
  height: 50px;
  justify-content: center;
  width: 50px;
}

.login-brand strong {
  color: #0f172a;
  display: block;
  font-size: 18px;
}

.login-brand small {
  color: var(--muted);
  display: block;
  font-size: 12px;
  margin-top: 2px;
}

.login-card h1 {
  color: #0f172a;
  font-size: 24px;
  margin: 0;
}

.login-sub {
  color: var(--muted);
  font-size: 14px;
  margin: -8px 0 4px;
}

.login-card .auth-card {
  background: transparent;
  border: 0;
  box-shadow: none;
  display: grid;
  gap: 14px;
  padding: 0;
}

.login-card label {
  color: #334155;
  display: grid;
  font-size: 13px;
  font-weight: 700;
  gap: 6px;
}

.login-card input {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 14px;
  padding: 12px 14px;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.login-card input:focus {
  background: #ffffff;
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.18);
  outline: none;
}

.login-card .button.primary {
  font-size: 14px;
  font-weight: 700;
  margin-top: 4px;
  min-height: 46px;
}

.login-card .hint {
  color: var(--muted);
  font-size: 12px;
  margin: 4px 0 0;
  text-align: center;
}

.login-card .hint code {
  background: #f1f5f9;
  border-radius: 4px;
  font-size: 11px;
  padding: 2px 6px;
}

.login-card .flash {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

.online-pill {
  background: #dcfce7;
  border-radius: 999px;
  color: #166534;
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
}

.admin-form .wide,
.admin-form .checkbox {
  grid-column: 1 / -1;
}

.checkbox {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  flex-direction: row;
  font-weight: 600;
  gap: 10px;
  padding: 10px 12px;
}

.checkbox input {
  margin: 0;
  min-height: auto;
  width: auto;
}

.table-wrap {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.06);
  margin-bottom: 22px;
  overflow-x: auto;
}

table {
  border-collapse: collapse;
  width: 100%;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 14px 16px;
  text-align: left;
  vertical-align: top;
}

th {
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

tr:hover td {
  background: #f8fafc;
}

tr:last-child td {
  border-bottom: 0;
}

.admin-info-panel {
  background: linear-gradient(135deg, #eff6ff 0%, #faf5ff 100%);
  border: 1px solid #dbeafe;
  border-radius: 14px;
  padding: 22px;
}

.admin-info-panel h3 {
  color: #1e3a8a;
  margin-top: 0;
}

.admin-info-panel code {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid #dbeafe;
  border-radius: 4px;
  font-size: 13px;
  padding: 2px 6px;
}

.admin-heading {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 18px;
  padding: 18px 20px;
}

.admin-heading-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-heading h2 {
  font-size: 20px;
  margin: 0 0 4px;
}

.admin-heading h2 .online-pill {
  margin-left: 8px;
  vertical-align: middle;
}

.admin-heading .hint {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}

.dashboard-users {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-bottom: 22px;
}

.upload-limit-bar {
  align-items: center;
  border-radius: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
  padding: 14px 18px;
}

.upload-limit-bar.ok {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
}

.upload-limit-bar.warn {
  background: #fffbeb;
  border: 1px solid #fde68a;
}

.upload-limit-icon {
  align-items: center;
  border-radius: 50%;
  display: flex;
  font-size: 16px;
  font-weight: 800;
  height: 32px;
  justify-content: center;
  width: 32px;
}

.upload-limit-bar.ok .upload-limit-icon {
  background: #10b981;
  color: #ffffff;
}

.upload-limit-bar.warn .upload-limit-icon {
  background: #f59e0b;
  color: #ffffff;
}

.upload-limit-bar strong {
  color: #0f172a;
  display: block;
  font-size: 14px;
}

.upload-limit-bar small {
  color: #64748b;
  display: block;
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 11px;
  margin-top: 2px;
}

.upload-limit-hint {
  color: #92400e;
  font-size: 12px;
  font-weight: 600;
  margin-left: auto;
}

.dashboard-user-card {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
  color: inherit;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  padding: 14px 16px;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}

.dashboard-user-card:hover {
  border-color: #93c5fd;
  box-shadow: 0 14px 32px rgba(37, 99, 235, 0.12);
  transform: translateY(-1px);
}

.dashboard-user-id {
  align-items: center;
  display: flex;
  gap: 12px;
  min-width: 0;
}

.dashboard-user-avatar {
  border-radius: 50%;
  display: block;
  flex-shrink: 0;
  height: 44px;
  object-fit: cover;
  overflow: hidden;
  width: 44px;
}

.dashboard-user-avatar img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.dashboard-user-avatar.fallback {
  align-items: center;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #ffffff;
  display: flex;
  font-weight: 800;
  justify-content: center;
}

.dashboard-user-id strong {
  color: #0f172a;
  display: block;
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-user-id small {
  color: var(--muted);
  display: block;
  font-size: 12px;
  margin-top: 2px;
}

.dashboard-user-stats {
  align-items: flex-end;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  gap: 4px;
  text-align: right;
}

.dashboard-user-stats small {
  color: var(--muted);
  font-size: 12px;
}

.dashboard-user-stats small strong {
  color: #0f172a;
  font-weight: 700;
}

.stat-line {
  display: block;
  line-height: 1.4;
}

.stat-tag {
  background: #dbeafe;
  border-radius: 999px;
  color: #1e40af;
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-right: 4px;
  padding: 2px 7px;
  text-transform: uppercase;
}

.stat-tag.click {
  background: #fef3c7;
  color: #92400e;
}

body:has(.admin-shell) .site-footer {
  display: none;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 150px;
}

.actions form {
  margin: 0;
}

.actions .button.small {
  font-size: 12px;
  min-height: 30px;
  padding: 4px 10px;
}

@media (max-width: 900px) {
  .admin-shell {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .admin-menu-toggle {
    display: flex;
  }

  .admin-nav {
    left: 0;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    position: fixed;
    right: 0;
    top: 70px;
    transform: translateY(-110%);
    transition: transform 0.25s ease;
    z-index: 40;
  }

  .admin-nav.open {
    transform: translateY(0);
  }

  .admin-topbar {
    padding-right: 70px;
    position: static;
  }

  .admin-form {
    grid-template-columns: 1fr;
  }
}

.site-footer {
  align-items: center;
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  margin-top: 30px;
  padding: 18px 28px;
}

.profile-page {
  background:
    radial-gradient(circle at top, rgba(52, 211, 153, 0.14), transparent 32%),
    linear-gradient(180deg, #111827 0%, #030504 100%);
  color: #f8fafc;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  padding: 8px 12px 28px;
}

html:has(.profile-page),
body:has(.profile-page) {
  overflow-x: hidden;
}

.profile-page * {
  max-width: 100%;
}

.profile-page img,
.profile-page video {
  max-width: 100%;
}

.profile-page.template-light {
  background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
  color: #172033;
}

.profile-page.template-light .profile-phone {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(15, 23, 42, 0.12);
  box-shadow: 0 22px 70px rgba(15, 23, 42, 0.16);
}

.profile-page.template-light .profile-card,
.profile-page.template-light .profile-link,
.profile-page.template-light .appointment-card {
  background: #ffffff;
  border-color: #dbe3ef;
  color: #172033;
}

.profile-page.template-light .profile-card p,
.profile-page.template-light .appointment-card p,
.profile-page.template-light .profile-location {
  color: #475569;
}

.profile-page.template-light .profile-location {
  background: #eef2ff;
}

.profile-page.template-light .profile-link strong {
  color: #334155;
}

.profile-page.template-neon {
  background:
    radial-gradient(circle at 20% 0%, rgba(34, 211, 238, 0.22), transparent 28%),
    radial-gradient(circle at 80% 10%, rgba(236, 72, 153, 0.2), transparent 30%),
    linear-gradient(180deg, #0a0620 0%, #030712 100%);
  color: #f8fafc;
}

.profile-page.template-neon .profile-phone {
  background: rgba(17, 24, 39, 0.72);
  border-color: rgba(103, 232, 249, 0.3);
  box-shadow: 0 22px 80px rgba(34, 211, 238, 0.16);
}

.profile-page.template-neon .profile-card,
.profile-page.template-neon .profile-link,
.profile-page.template-neon .appointment-card {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.12), rgba(236, 72, 153, 0.12));
  border-color: rgba(255, 255, 255, 0.18);
}

.profile-page.template-neon .profile-link:hover {
  border-color: rgba(103, 232, 249, 0.7);
}

/* ===== GLASS / FROSTED template ===== */
.profile-page.template-glass {
  background:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='600' height='600'><defs><radialGradient id='a' cx='30%25' cy='20%25' r='60%25'><stop offset='0%25' stop-color='%23a78bfa' stop-opacity='1'/><stop offset='100%25' stop-color='%23a78bfa' stop-opacity='0'/></radialGradient><radialGradient id='b' cx='80%25' cy='90%25' r='60%25'><stop offset='0%25' stop-color='%2334d399' stop-opacity='1'/><stop offset='100%25' stop-color='%2334d399' stop-opacity='0'/></radialGradient><radialGradient id='c' cx='75%25' cy='15%25' r='40%25'><stop offset='0%25' stop-color='%23fb7185' stop-opacity='0.9'/><stop offset='100%25' stop-color='%23fb7185' stop-opacity='0'/></radialGradient></defs><rect width='100%25' height='100%25' fill='%231e1b4b'/><rect width='100%25' height='100%25' fill='url(%23a)'/><rect width='100%25' height='100%25' fill='url(%23b)'/><rect width='100%25' height='100%25' fill='url(%23c)'/></svg>") center/cover fixed;
  color: #f8fafc;
  position: relative;
}

.profile-page.template-glass::before {
  background: rgba(15, 23, 42, 0.25);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  content: "";
  inset: 0;
  pointer-events: none;
  position: fixed;
  z-index: 0;
}

.profile-page.template-glass .profile-phone {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 32px;
  box-shadow:
    0 30px 90px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  position: relative;
  z-index: 1;
}

.profile-page.template-glass .profile-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 24px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.profile-page.template-glass .profile-photo {
  border: 3px solid rgba(255, 255, 255, 0.4);
  box-shadow:
    0 0 0 6px rgba(255, 255, 255, 0.08),
    0 16px 40px rgba(0, 0, 0, 0.35);
}

.profile-page.template-glass h1 {
  background: linear-gradient(135deg, #ffffff, #c7d2fe);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.profile-page.template-glass .profile-card p {
  color: rgba(255, 255, 255, 0.85);
}

.profile-page.template-glass .profile-location {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

.profile-page.template-glass .profile-link,
.profile-page.template-glass .appointment-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.profile-page.template-glass .profile-link:hover,
.profile-page.template-glass .appointment-card:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.32);
  transform: translateY(-1px);
}

.profile-page.template-glass .contact-btn {
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Hide expanded link parts on legacy templates so they keep their original look */
.profile-page.template-dark .profile-link-icon,
.profile-page.template-dark .profile-link-thumb,
.profile-page.template-dark .profile-link-sub,
.profile-page.template-light .profile-link-icon,
.profile-page.template-light .profile-link-thumb,
.profile-page.template-light .profile-link-sub,
.profile-page.template-neon .profile-link-icon,
.profile-page.template-neon .profile-link-thumb,
.profile-page.template-neon .profile-link-sub,
.profile-page.template-glass .profile-link-icon,
.profile-page.template-glass .profile-link-thumb,
.profile-page.template-glass .profile-link-sub,
.profile-page.template-magazine .profile-link-icon,
.profile-page.template-magazine .profile-link-thumb,
.profile-page.template-magazine .profile-link-sub {
  display: none;
}

.profile-page.template-magazine .profile-link-text,
.profile-page.template-dark .profile-link-text,
.profile-page.template-light .profile-link-text,
.profile-page.template-neon .profile-link-text,
.profile-page.template-glass .profile-link-text {
  display: contents;
}

/* ===== AURORA template — deep blue, neon icon links, verified badge ===== */
.profile-page.template-aurora {
  --aur-bg-1: #0a1735;
  --aur-bg-2: #050818;
  --aur-card: rgba(15, 27, 60, 0.65);
  --aur-card-border: rgba(96, 165, 250, 0.18);
  --aur-text: #e6edff;
  --aur-mute: #94a3c4;
  --aur-blue: #3b82f6;
  --aur-blue-bright: #60a5fa;
  background:
    radial-gradient(circle at 20% 0%, rgba(59, 130, 246, 0.25), transparent 45%),
    radial-gradient(circle at 80% 100%, rgba(139, 92, 246, 0.18), transparent 50%),
    radial-gradient(1px 1px at 18% 22%, rgba(255,255,255,0.6), transparent),
    radial-gradient(1px 1px at 38% 70%, rgba(255,255,255,0.45), transparent),
    radial-gradient(1px 1px at 72% 35%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 88% 80%, rgba(255,255,255,0.55), transparent),
    radial-gradient(1px 1px at 12% 60%, rgba(255,255,255,0.4), transparent),
    radial-gradient(1px 1px at 60% 12%, rgba(255,255,255,0.5), transparent),
    linear-gradient(180deg, var(--aur-bg-1), var(--aur-bg-2));
  color: var(--aur-text);
  padding: 0 !important;
}

.profile-page.template-aurora .profile-phone {
  background: transparent;
  border: 1px solid rgba(96, 165, 250, 0.16);
  border-radius: 28px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  display: grid;
  gap: 18px;
  margin: 18px auto 28px;
  max-width: 460px;
  padding: 26px 22px 24px;
}

.profile-page.template-aurora .profile-card {
  align-items: center;
  background: transparent;
  border: 0;
  display: grid;
  gap: 8px;
  justify-items: center;
  padding: 6px 0 4px;
  position: relative;
  text-align: center;
}

.profile-page.template-aurora .profile-photo {
  border: 4px solid #ffffff;
  box-shadow: 0 18px 36px rgba(59, 130, 246, 0.3);
  height: 120px;
  margin: 0;
  width: 120px;
}

.profile-page.template-aurora .profile-card::after {
  background: linear-gradient(135deg, var(--aur-blue), var(--aur-blue-bright));
  border: 3px solid var(--aur-bg-1);
  border-radius: 50%;
  color: #ffffff;
  content: "✓";
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 900;
  height: 26px;
  position: absolute;
  right: calc(50% - 70px);
  top: 96px;
  width: 26px;
  box-shadow: 0 4px 10px rgba(59, 130, 246, 0.5);
}

.profile-page.template-aurora h1 {
  color: #ffffff;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 12px 0 0;
}

.profile-page.template-aurora .profile-card p {
  color: var(--aur-mute);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  margin: 0;
  max-width: 32ch;
}

.profile-page.template-aurora .profile-location {
  background: rgba(96, 165, 250, 0.12);
  border: 1px solid rgba(96, 165, 250, 0.2);
  border-radius: 999px;
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 600;
  margin-top: 4px;
  padding: 5px 14px;
}

.profile-page.template-aurora .profile-location::before {
  color: var(--aur-blue-bright);
  content: "@";
  font-weight: 900;
  margin-right: 4px;
}

.profile-page.template-aurora .profile-actions {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
  margin: 0;
}

.profile-page.template-aurora .contact-btn {
  align-items: center;
  border: 0;
  border-radius: 14px;
  color: #ffffff;
  display: flex;
  font-size: 14px;
  font-weight: 700;
  gap: 8px;
  justify-content: center;
  letter-spacing: -0.01em;
  min-height: 52px;
  padding: 10px 14px;
}

.profile-page.template-aurora .contact-btn::before {
  align-items: center;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  display: inline-flex;
  font-size: 14px;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.profile-page.template-aurora .contact-btn.whatsapp {
  background: linear-gradient(135deg, #16a34a, #15803d);
  box-shadow: 0 12px 24px rgba(22, 163, 74, 0.32);
}

.profile-page.template-aurora .contact-btn.whatsapp::before { content: "📱"; }

.profile-page.template-aurora .contact-btn.telegram,
.profile-page.template-aurora .contact-btn:not(.whatsapp) {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.32);
}

.profile-page.template-aurora .contact-btn.telegram::before,
.profile-page.template-aurora .contact-btn:not(.whatsapp)::before { content: "💬"; }

.profile-page.template-aurora .profile-links {
  display: grid;
  gap: 10px;
  margin: 0;
}

.profile-page.template-aurora .profile-link {
  align-items: center;
  background: var(--aur-card);
  border: 1px solid var(--aur-card-border);
  border-radius: 14px;
  color: var(--aur-text);
  display: grid;
  gap: 14px;
  grid-template-columns: 48px 1fr auto;
  min-height: 64px;
  padding: 10px 14px 10px 10px;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s, border-color 0.2s;
}

.profile-page.template-aurora .profile-link:hover {
  background: rgba(37, 99, 235, 0.18);
  border-color: rgba(96, 165, 250, 0.4);
  transform: translateY(-2px);
}

.profile-page.template-aurora .profile-link-icon {
  align-items: center;
  border-radius: 12px;
  display: inline-flex !important;
  font-size: 20px;
  height: 44px;
  justify-content: center;
  width: 44px;
}

.profile-page.template-aurora .profile-link[data-link="photos"] .profile-link-icon,
.profile-page.template-aurora .profile-link[data-link="photo"] .profile-link-icon {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.25), rgba(139, 92, 246, 0.25));
  border: 1px solid rgba(168, 85, 247, 0.4);
  color: #c084fc;
}
.profile-page.template-aurora .profile-link[data-link="photos"] .profile-link-icon::before,
.profile-page.template-aurora .profile-link[data-link="photo"] .profile-link-icon::before { content: "🖼"; }

.profile-page.template-aurora .profile-link[data-link="videos"] .profile-link-icon,
.profile-page.template-aurora .profile-link[data-link="video"] .profile-link-icon {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.25), rgba(37, 99, 235, 0.25));
  border: 1px solid rgba(96, 165, 250, 0.4);
  color: #60a5fa;
}
.profile-page.template-aurora .profile-link[data-link="videos"] .profile-link-icon::before,
.profile-page.template-aurora .profile-link[data-link="video"] .profile-link-icon::before { content: "▶"; }

.profile-page.template-aurora .profile-link[data-link="live"] .profile-link-icon {
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.25), rgba(225, 29, 72, 0.25));
  border: 1px solid rgba(244, 63, 94, 0.4);
  color: #fb7185;
}
.profile-page.template-aurora .profile-link[data-link="live"] .profile-link-icon::before { content: "🔴"; }

.profile-page.template-aurora .profile-link-icon::before {
  font-size: 20px;
}

.profile-page.template-aurora .profile-link-text {
  display: flex !important;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.profile-page.template-aurora .profile-link-label {
  color: #ffffff;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.15;
}

.profile-page.template-aurora .profile-link-sub {
  color: var(--aur-mute);
  display: block !important;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
}

.profile-page.template-aurora .profile-link strong {
  align-items: center;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 50%;
  color: var(--aur-mute);
  display: inline-flex;
  font-size: 12px;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.profile-page.template-aurora .appointment-card {
  background: var(--aur-card);
  border: 1px solid var(--aur-card-border);
  border-radius: 16px;
  margin: 0;
  padding: 18px 18px 18px 84px;
  position: relative;
}

.profile-page.template-aurora .appointment-card::before {
  align-items: center;
  background: rgba(96, 165, 250, 0.1);
  border: 1px solid rgba(96, 165, 250, 0.25);
  border-radius: 12px;
  content: "📅";
  display: flex;
  font-size: 20px;
  height: 48px;
  justify-content: center;
  left: 18px;
  position: absolute;
  top: 18px;
  width: 48px;
}

.profile-page.template-aurora .appointment-card > div {
  padding: 0;
}

.profile-page.template-aurora .appointment-card h2 {
  color: #ffffff;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 6px;
}

.profile-page.template-aurora .appointment-card h2 span {
  background: rgba(34, 197, 94, 0.18);
  border: 1px solid rgba(34, 197, 94, 0.4);
  border-radius: 999px;
  color: #4ade80;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-left: 6px;
  padding: 2px 8px;
  text-transform: uppercase;
  vertical-align: middle;
}

.profile-page.template-aurora .appointment-card h2 span::before {
  background: #4ade80;
  border-radius: 50%;
  content: "";
  display: inline-block;
  height: 6px;
  margin-right: 4px;
  width: 6px;
}

.profile-page.template-aurora .appointment-card p {
  color: var(--aur-mute);
  font-size: 12.5px;
  line-height: 1.45;
  margin: 0 0 12px;
}

.profile-page.template-aurora .appointment-btn {
  background: linear-gradient(135deg, var(--aur-blue), var(--aur-blue-bright));
  border: 0;
  border-radius: 999px;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.4);
  color: #ffffff;
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin: 0;
  padding: 11px 18px;
  text-align: center;
  text-decoration: none;
}

.profile-page.template-aurora .appointment-btn::before { content: "📅 "; }

/* ===== ROYAL template — navy + gold luxury ===== */
.profile-page.template-royal {
  --roy-bg-1: #0a0e2a;
  --roy-bg-2: #02030c;
  --roy-card: rgba(20, 24, 50, 0.7);
  --roy-border: rgba(212, 175, 55, 0.35);
  --roy-gold: #d4af37;
  --roy-gold-bright: #f0c95a;
  --roy-text: #f5e8c8;
  --roy-mute: #94a0b8;
  background:
    radial-gradient(circle at 20% 10%, rgba(212, 175, 55, 0.08), transparent 40%),
    radial-gradient(circle at 80% 90%, rgba(212, 175, 55, 0.05), transparent 40%),
    linear-gradient(180deg, var(--roy-bg-1), var(--roy-bg-2));
  color: var(--roy-text);
  padding: 0 !important;
  position: relative;
}

.profile-page.template-royal::before {
  background:
    repeating-linear-gradient(0deg, transparent 0, transparent 14px, rgba(212, 175, 55, 0.025) 14px, rgba(212, 175, 55, 0.025) 15px),
    repeating-linear-gradient(90deg, transparent 0, transparent 14px, rgba(212, 175, 55, 0.025) 14px, rgba(212, 175, 55, 0.025) 15px);
  content: "";
  inset: 0;
  pointer-events: none;
  position: fixed;
}

.profile-page.template-royal .profile-phone {
  background: transparent;
  border: 0;
  border-radius: 0;
  display: grid;
  gap: 16px;
  margin: 60px auto 28px;
  max-width: 460px;
  padding: 0 18px 24px;
  position: relative;
}

.profile-page.template-royal .profile-card {
  align-items: center;
  background: var(--roy-card);
  border: 1px solid var(--roy-border);
  border-radius: 20px;
  display: grid;
  gap: 8px;
  justify-items: center;
  padding: 0 22px 22px;
  position: relative;
  text-align: center;
}

.profile-page.template-royal .profile-photo {
  border: 4px solid var(--roy-gold);
  box-shadow:
    0 0 0 6px rgba(212, 175, 55, 0.18),
    0 16px 36px rgba(0, 0, 0, 0.5);
  height: 120px;
  margin: -50px 0 0;
  width: 120px;
}

.profile-page.template-royal .profile-photo.fallback {
  align-items: center;
  background: linear-gradient(135deg, #1a1d40, #0a0e2a);
  color: var(--roy-gold);
  display: flex;
  font-family: Georgia, serif;
  font-style: italic;
  font-weight: 900;
  height: 120px;
  margin: -50px 0 0;
  width: 120px;
}

.profile-page.template-royal h1 {
  color: var(--roy-gold);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.15;
  margin: 16px 0 0;
}

.profile-page.template-royal .profile-card p {
  color: var(--roy-mute);
  font-family: Georgia, serif;
  font-size: 14px;
  font-style: italic;
  line-height: 1.45;
  margin: 0;
  max-width: 32ch;
}

.profile-page.template-royal .profile-location {
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid var(--roy-border);
  border-radius: 999px;
  color: var(--roy-gold);
  font-family: 'Courier New', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-top: 4px;
  padding: 5px 12px;
}

.profile-page.template-royal .profile-actions {
  display: none;
}

/* Royal uses two-column grid: left = media, right = contact + appointment */
.profile-page.template-royal .profile-links {
  column-gap: 14px;
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
  margin: 0;
  row-gap: 12px;
}

@media (min-width: 480px) {
  .profile-page.template-royal .profile-links {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
  }
  .profile-page.template-royal .profile-links::before {
    color: var(--roy-gold);
    content: "EXCLUSIVE MEDIA PORTFOLIO";
    font-family: 'Courier New', monospace;
    font-size: 10px;
    font-weight: 800;
    grid-column: 1;
    grid-row: 1;
    letter-spacing: 0.18em;
    margin-bottom: -4px;
    text-align: center;
  }
  .profile-page.template-royal .profile-links::after {
    color: var(--roy-gold);
    content: "CONNECT & SERVICE";
    font-family: 'Courier New', monospace;
    font-size: 10px;
    font-weight: 800;
    grid-column: 2;
    grid-row: 1;
    letter-spacing: 0.18em;
    margin-bottom: -4px;
    text-align: center;
  }
}

.profile-page.template-royal .profile-link {
  background: rgba(20, 24, 50, 0.7);
  border: 1px solid var(--roy-border);
  border-radius: 14px;
  color: var(--roy-text);
  display: grid;
  gap: 0;
  grid-template-rows: 88px auto;
  overflow: hidden;
  padding: 0;
  text-decoration: none;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.profile-page.template-royal .profile-link:hover {
  border-color: var(--roy-gold-bright);
  box-shadow: 0 14px 30px rgba(212, 175, 55, 0.18);
  transform: translateY(-2px);
}

.profile-page.template-royal .profile-link-thumb {
  background-color: rgba(212, 175, 55, 0.05);
  background-position: center;
  background-size: cover;
  display: block !important;
  height: 100%;
  position: relative;
  width: 100%;
}

.profile-page.template-royal .profile-link-thumb::after {
  align-items: center;
  background: rgba(0, 0, 0, 0.55);
  border-radius: 8px;
  color: var(--roy-gold);
  content: "📷";
  display: flex;
  font-size: 16px;
  height: 32px;
  justify-content: center;
  position: absolute;
  right: 8px;
  top: 8px;
  width: 32px;
}

.profile-page.template-royal .profile-link[data-link="videos"] .profile-link-thumb::after,
.profile-page.template-royal .profile-link[data-link="video"] .profile-link-thumb::after { content: "🎬"; }

.profile-page.template-royal .profile-link[data-link="live"] .profile-link-thumb::after { content: "🔴"; }

.profile-page.template-royal .profile-link-icon {
  display: none !important;
}

.profile-page.template-royal .profile-link-text {
  align-items: center;
  display: flex !important;
  flex-direction: row;
  justify-content: space-between;
  padding: 8px 12px 10px;
}

.profile-page.template-royal .profile-link-label {
  color: var(--roy-text);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.profile-page.template-royal .profile-link-sub {
  display: none !important;
}

.profile-page.template-royal .profile-link strong {
  color: var(--roy-gold);
  font-size: 14px;
  font-weight: 700;
}

/* Royal: contact buttons placed in right column via the appointment-card section */
.profile-page.template-royal .appointment-card {
  background: rgba(20, 24, 50, 0.7);
  border: 1px solid var(--roy-border);
  border-radius: 14px;
  margin: 0;
  padding: 16px;
}

.profile-page.template-royal .appointment-card h2 {
  color: var(--roy-gold);
  display: grid;
  font-family: 'Courier New', monospace;
  font-size: 11px;
  font-weight: 800;
  gap: 6px;
  justify-items: center;
  letter-spacing: 0.15em;
  line-height: 1.3;
  margin: 0 0 8px;
  text-align: center;
  text-transform: uppercase;
}

.profile-page.template-royal .appointment-card h2 span {
  background: rgba(34, 197, 94, 0.18);
  border: 1px solid rgba(34, 197, 94, 0.4);
  border-radius: 999px;
  color: #4ade80;
  display: inline-block;
  font-family: inherit;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin: 0;
  padding: 2px 10px;
}

.profile-page.template-royal .appointment-card p {
  color: var(--roy-mute);
  font-family: Georgia, serif;
  font-size: 12px;
  font-style: italic;
  line-height: 1.5;
  margin: 0 0 12px;
  text-align: center;
}

.profile-page.template-royal .appointment-btn {
  background: transparent;
  border: 1px solid var(--roy-gold);
  border-radius: 999px;
  color: var(--roy-gold);
  display: block;
  font-family: 'Courier New', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 9px 18px;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  transition: background 0.15s, color 0.15s;
}

.profile-page.template-royal .appointment-btn:hover {
  background: var(--roy-gold);
  color: var(--roy-bg-1);
}
.profile-page.template-magazine {
  --mag-ink: #0a0a0a;
  --mag-paper: #fefefe;
  --mag-cream: #f8f5f0;
  --mag-gold: #c9a44a;
  --mag-gold-deep: #a78431;
  --mag-mute: #6b6b6b;
  background: var(--mag-paper);
  color: var(--mag-ink);
  padding: 0 !important;
  position: relative;
}

.profile-page.template-magazine::before {
  background:
    repeating-linear-gradient(0deg, transparent 0, transparent 28px, rgba(10, 10, 10, 0.035) 28px, rgba(10, 10, 10, 0.035) 29px),
    linear-gradient(180deg, var(--mag-cream) 0%, var(--mag-paper) 60%);
  content: "";
  inset: 0;
  position: fixed;
  z-index: 0;
}

.profile-page.template-magazine .profile-phone {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  display: grid;
  gap: 0;
  margin: 0 auto;
  max-width: 640px;
  padding: 0;
  position: relative;
  width: 100%;
  z-index: 1;
}

.profile-page.template-magazine .profile-card,
.profile-page.template-magazine .profile-actions,
.profile-page.template-magazine .profile-links,
.profile-page.template-magazine .appointment-card,
.profile-page.template-magazine .ads {
  width: 100%;
}

/* Cover masthead */
.profile-page.template-magazine .profile-card {
  background: var(--mag-ink);
  border: 0;
  border-radius: 0;
  box-shadow: 0 24px 60px -28px rgba(10, 10, 10, 0.45);
  color: #ffffff;
  display: block;
  min-height: 0;
  padding: 0;
  position: relative;
  text-align: left;
}

.profile-page.template-magazine .profile-card::before,
.profile-page.template-magazine .profile-card::after {
  background: linear-gradient(90deg, var(--mag-gold) 0%, var(--mag-gold-deep) 100%);
  content: "";
  height: 5px;
  left: 0;
  position: absolute;
  right: 0;
}

.profile-page.template-magazine .profile-card::before { top: 0; }
.profile-page.template-magazine .profile-card::after { bottom: 0; }

.profile-page.template-magazine .profile-photo {
  aspect-ratio: 16 / 11;
  border: 0;
  border-radius: 0;
  display: block;
  height: auto;
  margin: 0;
  max-height: 42vh;
  object-fit: cover;
  overflow: hidden;
  width: 100%;
}

.profile-page.template-magazine .profile-photo .profile-photo-img {
  height: 100%;
  width: 100%;
}

.profile-page.template-magazine .profile-photo.fallback {
  align-items: center;
  aspect-ratio: 16 / 11;
  background: linear-gradient(135deg, #1a1a1a, #3a3a3a);
  color: var(--mag-gold);
  display: flex;
  font-family: Georgia, serif;
  font-size: clamp(60px, 16vw, 110px);
  font-style: italic;
  font-weight: 900;
  justify-content: center;
  max-height: 42vh;
}

.profile-page.template-magazine .profile-card > h1,
.profile-page.template-magazine .profile-card > p,
.profile-page.template-magazine .profile-card > .profile-location {
  padding-left: clamp(20px, 5vw, 32px);
  padding-right: clamp(20px, 5vw, 32px);
}

.profile-page.template-magazine h1 {
  color: #ffffff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(34px, 8vw, 56px);
  font-style: italic;
  font-weight: 900;
  letter-spacing: -0.025em;
  line-height: 0.94;
  margin: clamp(22px, 5vw, 32px) 0 14px;
  text-transform: uppercase;
  word-break: break-word;
}

.profile-page.template-magazine h1::before {
  color: var(--mag-gold);
  content: "Vol. 01";
  display: block;
  font-family: "Courier New", monospace;
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.32em;
  margin-bottom: 14px;
  text-transform: uppercase;
}

.profile-page.template-magazine h1::after {
  background: var(--mag-gold);
  content: "";
  display: block;
  height: 2px;
  margin-top: 16px;
  width: 56px;
}

.profile-page.template-magazine .profile-card p {
  border-left: 2px solid var(--mag-gold);
  color: #d8d8d8;
  font-family: Georgia, serif;
  font-size: clamp(14px, 3.6vw, 16px);
  font-style: italic;
  line-height: 1.55;
  margin: 0 clamp(20px, 5vw, 32px) 22px;
  padding-left: 14px !important;
  padding-right: 0 !important;
}

.profile-page.template-magazine .profile-location {
  background: transparent;
  border-top: 1px solid rgba(201, 164, 74, 0.28);
  color: var(--mag-gold);
  display: block;
  font-family: "Courier New", monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.28em;
  margin: 0;
  padding: 16px clamp(20px, 5vw, 32px) 24px !important;
  text-transform: uppercase;
}

/* Contact bar */
.profile-page.template-magazine .profile-actions {
  background: var(--mag-paper);
  border-bottom: 1px solid var(--mag-ink);
  display: grid;
  gap: 0;
  grid-template-columns: 1fr 1fr;
  margin: 0;
  padding: 0;
}

.profile-page.template-magazine .contact-btn {
  align-items: center;
  background: transparent;
  border: 0;
  border-right: 1px solid #d6d3cf;
  border-radius: 0;
  color: var(--mag-ink);
  display: flex;
  font-family: "Courier New", monospace;
  font-size: 11px;
  font-weight: 700;
  gap: 8px;
  justify-content: center;
  letter-spacing: 0.22em;
  min-height: 52px;
  padding: 14px 16px;
  text-decoration: none;
  text-transform: uppercase;
  transition: background 0.18s, color 0.18s;
}

.profile-page.template-magazine .contact-btn::before {
  background: var(--mag-gold);
  border-radius: 50%;
  content: "";
  display: inline-block;
  height: 6px;
  width: 6px;
}

.profile-page.template-magazine .contact-btn:hover {
  background: var(--mag-ink);
  color: var(--mag-gold);
}

.profile-page.template-magazine .contact-btn:hover::before {
  background: var(--mag-gold);
}

.profile-page.template-magazine .contact-btn:last-child {
  border-right: 0;
}

/* Article list */
.profile-page.template-magazine .profile-links {
  background: var(--mag-paper);
  border: 0;
  border-bottom: 1px solid var(--mag-ink);
  counter-reset: magazine-counter;
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
}

.profile-page.template-magazine .profile-link {
  align-items: center;
  background: var(--mag-paper);
  border: 0;
  border-bottom: 1px solid #ebe8e3;
  border-radius: 0;
  color: var(--mag-ink);
  display: grid;
  font-family: Georgia, serif;
  font-size: clamp(18px, 4.6vw, 24px);
  font-weight: 700;
  gap: 14px;
  grid-template-columns: auto 1fr auto;
  letter-spacing: -0.01em;
  line-height: 1.2;
  min-height: 64px;
  padding: 16px clamp(20px, 5vw, 32px);
  position: relative;
  text-decoration: none;
  transition: background 0.18s, color 0.18s, padding 0.18s;
}

.profile-page.template-magazine .profile-link::before {
  color: var(--mag-gold);
  content: counter(magazine-counter, decimal-leading-zero);
  counter-increment: magazine-counter;
  font-family: "Courier New", monospace;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.22em;
}

.profile-page.template-magazine .profile-link span {
  display: block;
  font-style: italic;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.profile-page.template-magazine .profile-link strong {
  color: var(--mag-gold);
  font-family: "Courier New", monospace;
  font-size: 16px;
  font-weight: 700;
  transition: transform 0.18s;
}

.profile-page.template-magazine .profile-link:last-child {
  border-bottom: 0;
}

.profile-page.template-magazine .profile-link:hover {
  background: var(--mag-ink);
  color: #ffffff;
}

.profile-page.template-magazine .profile-link:hover strong {
  color: var(--mag-gold);
  transform: translateX(4px);
}

/* Appointment / sponsor block */
.profile-page.template-magazine .appointment-card {
  background: var(--mag-gold);
  border: 0;
  border-radius: 0;
  color: var(--mag-ink);
  display: block;
  margin: 0;
  padding: clamp(24px, 6vw, 36px) clamp(20px, 5vw, 32px);
  position: relative;
  text-align: center;
}

.profile-page.template-magazine .appointment-card::before {
  background:
    repeating-linear-gradient(45deg, transparent 0, transparent 8px, rgba(10, 10, 10, 0.06) 8px, rgba(10, 10, 10, 0.06) 9px);
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
}

.profile-page.template-magazine .appointment-card > div {
  position: relative;
}

.profile-page.template-magazine .appointment-card h2 {
  color: var(--mag-ink);
  display: flex;
  flex-wrap: wrap;
  font-family: Georgia, serif;
  font-size: clamp(22px, 6vw, 32px);
  font-style: italic;
  font-weight: 900;
  gap: 8px;
  justify-content: center;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0 0 10px;
  text-transform: uppercase;
}

.profile-page.template-magazine .appointment-card h2 span {
  align-items: center;
  background: var(--mag-ink);
  color: var(--mag-gold);
  display: inline-flex;
  font-family: "Courier New", monospace;
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
  height: 22px;
  letter-spacing: 0.22em;
  padding: 0 8px;
}

.profile-page.template-magazine .appointment-card p {
  color: #1a1a1a;
  font-family: Georgia, serif;
  font-size: clamp(13px, 3.6vw, 15px);
  font-style: italic;
  line-height: 1.5;
  margin: 0 auto 18px;
  max-width: 36ch;
}

.profile-page.template-magazine .appointment-btn {
  background: var(--mag-ink);
  border: 0;
  border-radius: 0;
  color: #ffffff;
  display: inline-block;
  font-family: "Courier New", monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
  min-height: 48px;
  padding: 15px 28px;
  position: relative;
  text-decoration: none;
  text-transform: uppercase;
  transition: background 0.18s, color 0.18s;
}

.profile-page.template-magazine .appointment-btn:hover {
  background: var(--mag-paper);
  color: var(--mag-ink);
}

/* Ads on magazine */
.profile-page.template-magazine .ads {
  display: grid;
  gap: 0;
  margin: 0;
}

.profile-page.template-magazine .ad {
  background: var(--mag-paper);
  border: 0;
  border-bottom: 1px solid var(--mag-ink);
  border-radius: 0;
  color: var(--mag-ink);
  padding: 16px clamp(20px, 5vw, 32px);
  position: relative;
}

.profile-page.template-magazine .ad::before {
  color: var(--mag-mute);
  content: "Advertisement";
  display: block;
  font-family: "Courier New", monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.3em;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.profile-page.template-magazine .ad-image {
  border-radius: 0;
  display: block;
  margin: 0 auto;
  max-height: 220px;
  width: auto;
}

.profile-page.template-magazine .ad-title {
  color: var(--mag-ink);
  font-family: Georgia, serif;
  font-size: 14px;
  font-style: italic;
  margin: 0 0 4px;
}

.profile-page.template-magazine .ad-code {
  color: var(--mag-mute);
  font-size: 13px;
}

/* Magazine — desktop adds breathing room around the cover */
@media (min-width: 720px) {
  .profile-page.template-magazine .profile-phone {
    padding: 32px 0 60px;
  }
}

/* Short / landscape phones — compact the cover so it fits the height */
@media (max-height: 700px) and (max-width: 900px) {
  .profile-page.template-magazine .profile-photo,
  .profile-page.template-magazine .profile-photo.fallback {
    max-height: 32vh;
  }
  .profile-page.template-magazine h1 {
    font-size: clamp(26px, 7vw, 40px);
    margin: 18px 0 10px;
  }
  .profile-page.template-magazine h1::before {
    margin-bottom: 8px;
  }
  .profile-page.template-magazine h1::after {
    margin-top: 10px;
  }
  .profile-page.template-magazine .profile-card p {
    font-size: 14px;
    margin-bottom: 14px;
  }
  .profile-page.template-magazine .profile-location {
    padding-bottom: 14px !important;
    padding-top: 12px !important;
  }
  .profile-page.template-magazine .profile-link {
    font-size: clamp(16px, 4vw, 20px);
    min-height: 52px;
    padding-bottom: 12px;
    padding-top: 12px;
  }
  .profile-page.template-magazine .contact-btn {
    min-height: 44px;
    padding: 10px 14px;
  }
  .profile-page.template-magazine .appointment-card {
    padding: 18px clamp(20px, 5vw, 32px);
  }
  .profile-page.template-magazine .appointment-card h2 {
    font-size: clamp(20px, 5vw, 26px);
  }
  .profile-page.template-magazine .appointment-btn {
    min-height: 42px;
    padding: 12px 22px;
  }
}

@media (max-width: 480px) {
  .profile-page.template-magazine .profile-link {
    grid-template-columns: auto 1fr auto;
    min-height: 56px;
  }
  .profile-page.template-magazine .profile-actions {
    grid-template-columns: 1fr;
  }
  .profile-page.template-magazine .contact-btn {
    border-bottom: 1px solid #d6d3cf;
    border-right: 0;
  }
  .profile-page.template-magazine .contact-btn:last-child {
    border-bottom: 0;
  }
  .profile-page.template-magazine {
    padding: 0 !important;
  }
  .profile-page.template-magazine h1 {
    font-size: clamp(28px, 9vw, 44px);
  }
}

.profile-phone {
  background: rgba(15, 23, 42, 0.84);
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 28px;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.48);
  display: grid;
  gap: 14px;
  margin: 0 auto;
  max-width: 450px;
  padding: 14px;
}

.profile-card {
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 24px;
  display: grid;
  justify-items: center;
  min-height: 230px;
  overflow: hidden;
  padding: 24px 18px;
  position: relative;
  text-align: center;
}

.profile-card-bg {
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  filter: blur(26px) saturate(140%);
  inset: -40px;
  opacity: 0.55;
  position: absolute;
  transform: scale(1.2);
  z-index: 0;
}

.profile-card.has-bg::after {
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.55) 0%, rgba(2, 6, 23, 0.82) 100%);
  content: "";
  inset: 0;
  position: absolute;
  z-index: 0;
}

.profile-card.has-bg > *:not(.profile-card-bg) {
  position: relative;
  z-index: 1;
}

.profile-photo {
  border: 3px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5);
  display: block;
  height: 84px;
  object-fit: cover;
  overflow: hidden;
  width: 84px;
}

.profile-photo-img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.profile-photo.fallback {
  align-items: center;
  background: linear-gradient(145deg, var(--theme), #111827);
  display: inline-flex;
  font-size: 38px;
  font-weight: 800;
  justify-content: center;
}

.profile-card h1 {
  font-size: 28px;
  line-height: 1;
  margin: 10px 0 4px;
}

.profile-card p {
  color: #d1d5db;
  font-weight: 700;
  margin: 0;
}

.profile-location {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: #d1d5db;
  display: inline-flex;
  font-size: 13px;
  font-weight: 800;
  margin-top: 8px;
  padding: 4px 12px;
}

.profile-actions {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr 1fr;
}

.contact-btn {
  border-radius: 10px;
  color: #ffffff;
  display: grid;
  font-weight: 800;
  min-height: 44px;
  place-items: center;
}

.contact-btn.whatsapp {
  background: #25d366;
}

.contact-btn.telegram {
  background: #2a9fd6;
}

.profile-links {
  display: grid;
  gap: 11px;
}

.profile-link {
  align-items: center;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  color: #f8fafc;
  display: flex;
  font-weight: 800;
  gap: 12px;
  justify-content: space-between;
  min-height: 46px;
  padding: 10px 16px;
}

.profile-link span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.profile-link strong {
  color: #cbd5e1;
  flex: 0 0 auto;
}

.profile-page .ads {
  display: grid;
  gap: 10px;
  margin: 0;
}

.profile-page .ad {
  background: linear-gradient(135deg, #ffffff, #fefce8);
  border: 0;
  border-radius: 10px;
  color: #111827;
  min-height: 52px;
  overflow: hidden;
  padding: 12px;
  text-align: center;
}

.profile-page .ad-title {
  color: #111827;
  margin: 0 0 2px;
}

.appointment-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.14), rgba(14, 165, 233, 0.22));
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  display: grid;
  gap: 12px;
  padding: 16px;
}

.appointment-card h2 {
  font-size: 16px;
  margin: 0 0 4px;
}

.appointment-card h2 span {
  background: rgba(16, 185, 129, 0.2);
  border-radius: 999px;
  color: #34d399;
  font-size: 10px;
  margin-left: 6px;
  padding: 4px 8px;
  text-transform: uppercase;
}

.appointment-card p {
  color: #d1d5db;
  margin: 0;
}

.appointment-card a {
  align-self: start;
  border: 1px solid rgba(125, 211, 252, 0.46);
  border-radius: 999px;
  color: #bae6fd;
  font-size: 13px;
  font-weight: 800;
  padding: 6px 10px;
}

.fake-call-overlay {
  align-items: center;
  background:
    radial-gradient(circle at 50% 20%, rgba(20, 184, 166, 0.28), transparent 32%),
    rgba(2, 6, 23, 0.92);
  bottom: 0;
  color: #ffffff;
  display: flex;
  justify-content: center;
  left: 0;
  padding: 18px;
  position: fixed;
  right: 0;
  top: 0;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 1000;
}

.fake-call-overlay.is-hiding {
  opacity: 0;
  transform: scale(1.02);
}

.fake-call-overlay.is-waiting {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.98);
}

.fake-call-panel {
  align-items: center;
  display: grid;
  gap: 14px;
  justify-items: center;
  max-width: 360px;
  min-height: min(640px, calc(100vh - 36px));
  padding: 34px 18px 26px;
  position: relative;
  text-align: center;
  width: 100%;
}

.fake-call-close {
  align-items: center;
  background: rgba(15, 23, 42, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  font-size: 18px;
  font-weight: 800;
  height: 34px;
  justify-content: center;
  line-height: 1;
  padding: 0 0 2px;
  position: absolute;
  right: 8px;
  top: 8px;
  width: 34px;
}

.fake-call-close:hover {
  background: rgba(239, 68, 68, 0.88);
}

.fake-call-status {
  align-items: center;
  color: #cbd5e1;
  display: inline-flex;
  font-size: 13px;
  font-weight: 800;
  gap: 8px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.fake-call-status span {
  animation: fake-call-pulse 1.1s ease-in-out infinite;
  background: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 0 7px rgba(34, 197, 94, 0.12);
  height: 9px;
  width: 9px;
}

.fake-call-avatar {
  border: 4px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
  height: 142px;
  object-fit: cover;
  overflow: hidden;
  width: 142px;
}

.fake-call-avatar-img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.fake-call-avatar.fallback {
  align-items: center;
  background: linear-gradient(145deg, var(--theme), #111827);
  display: flex;
  font-size: 58px;
  font-weight: 900;
  justify-content: center;
}

.fake-call-panel h2 {
  font-size: 32px;
  line-height: 1;
  margin: 10px 0 0;
  overflow-wrap: anywhere;
}

.fake-call-panel p {
  color: #d1d5db;
  font-size: 16px;
  font-weight: 700;
  margin: 0;
}

.fake-call-wave {
  display: flex;
  gap: 7px;
  height: 42px;
  margin: 10px 0 18px;
}

.fake-call-wave span {
  animation: fake-call-bars 0.9s ease-in-out infinite;
  align-self: center;
  background: rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  height: 16px;
  width: 7px;
}

.fake-call-wave span:nth-child(2) {
  animation-delay: 0.12s;
}

.fake-call-wave span:nth-child(3) {
  animation-delay: 0.24s;
}

.fake-call-actions {
  display: flex;
  gap: 46px;
  justify-content: center;
  width: 100%;
}

.fake-call-action {
  align-items: center;
  background: transparent;
  border: 0;
  color: #e5e7eb;
  cursor: pointer;
  display: grid;
  font-size: 12px;
  font-weight: 800;
  gap: 8px;
  justify-items: center;
  min-width: 78px;
  padding: 0;
}

.fake-call-action strong {
  max-width: 96px;
  overflow-wrap: anywhere;
}

.fake-call-btn {
  border-radius: 50%;
  display: block;
  height: 68px;
  position: relative;
  width: 68px;
}

.fake-call-btn i {
  border: 4px solid #ffffff;
  border-bottom: 0;
  border-radius: 42px 42px 0 0;
  display: block;
  height: 25px;
  left: 17px;
  position: absolute;
  top: 22px;
  width: 34px;
}

.fake-call-action.decline .fake-call-btn {
  background: #ef4444;
}

.fake-call-action.decline .fake-call-btn i {
  transform: rotate(135deg);
}

.fake-call-action.accept .fake-call-btn {
  background: #22c55e;
}

.fake-call-action.accept .fake-call-btn i {
  transform: rotate(-45deg);
}

.fake-call-ad {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  color: #ffffff;
  max-width: 100%;
  overflow: hidden;
  padding: 8px;
  width: 100%;
}

.fake-call-ad a,
.fake-call-ad img {
  display: block;
}

.fake-call-ad img {
  border-radius: 8px;
  max-height: 92px;
  object-fit: contain;
  width: 100%;
}

.fake-call-ad-code {
  color: #ffffff;
  font-size: 13px;
}

.fake-call-overlay.is-answering .fake-call-status {
  color: #86efac;
}

.fake-call-overlay.is-answering .fake-call-status::after {
  content: " connected";
}

@keyframes fake-call-pulse {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.35);
  }
}

@keyframes fake-call-bars {
  0%,
  100% {
    height: 14px;
  }

  50% {
    height: 40px;
  }
}

.profile-page + .site-footer {
  background: #020403;
  border-top-color: rgba(148, 163, 184, 0.16);
  color: #94a3b8;
  margin-top: 0;
}

.subpage {
  color: #f8fafc;
  margin: 0 auto;
  max-width: 1024px;
  min-height: 100vh;
  padding: 16px;
  width: 100%;
}

.subpage-header {
  align-items: center;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 18px;
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 14px 16px;
}

.subpage-header p {
  color: #93c5fd;
  font-weight: 800;
  margin: 0 0 2px;
}

.subpage-header h1 {
  font-size: 22px;
  margin: 0;
}

.subpage-header a {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  font-weight: 800;
  padding: 7px 13px;
}

.live-stage,
.connect-card,
.video-tile,
.photo-gallery figure,
.subpage-list {
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 18px;
}

.live-stage {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.live-top {
  display: flex;
  justify-content: space-between;
}

.live-badge,
.watching {
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  padding: 6px 10px;
  text-transform: uppercase;
}

.live-badge {
  background: #ef233c;
}

.watching {
  background: rgba(255, 255, 255, 0.14);
  text-transform: none;
}

.subpage .ads {
  display: grid;
  gap: 10px;
}

.subpage .ad {
  background: #ffffff;
  border: 0;
  border-radius: 6px;
  color: #111827;
  padding: 14px;
  text-align: center;
}

.live-player {
  border-radius: 14px;
  min-height: 360px;
  overflow: hidden;
  position: relative;
}

.live-player img,
.live-player video,
.video-tile img,
.video-tile video,
.photo-gallery img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.live-player img,
.live-player video {
  display: block;
  min-height: 360px;
}

.buffering {
  background: rgba(0, 0, 0, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 12px;
  font-weight: 900;
  left: 50%;
  padding: 16px 22px;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
}

.live-caption {
  background: rgba(0, 0, 0, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  bottom: 12px;
  left: 12px;
  padding: 12px;
  position: absolute;
  right: 12px;
}

.live-caption strong,
.live-caption span {
  display: inline-block;
  margin-right: 8px;
}

.live-caption span,
.live-caption small,
.connect-card p,
.video-tile p,
.photo-gallery figcaption span {
  color: #cbd5e1;
}

.live-caption p,
.live-caption small,
.connect-card h2,
.connect-card p {
  margin: 0;
}

.connect-card {
  margin-top: 12px;
  padding: 14px;
}

.connect-card .profile-actions {
  margin-top: 12px;
}

.video-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-top: 12px;
}

.video-tile {
  overflow: hidden;
  position: relative;
}

.video-tile img,
.video-tile video {
  aspect-ratio: 16 / 10;
  display: block;
}

.video-tile div {
  padding: 14px;
}

.video-tile h2 {
  font-size: 17px;
  margin: 0 0 4px;
}

.video-tile p {
  margin: 0;
}

/* ===== Video gallery (subpage) ===== */
.video-gallery {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.video-gallery-head {
  align-items: baseline;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.video-gallery-head h2 {
  color: #f8fafc;
  font-size: 18px;
  margin: 0;
}

.video-gallery-count {
  background: rgba(148, 163, 184, 0.16);
  border-radius: 999px;
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 12px;
}

.video-gallery-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

.video-card {
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 16px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.video-card:hover,
.video-card:focus-visible {
  border-color: rgba(14, 165, 183, 0.7);
  box-shadow: 0 12px 30px rgba(2, 8, 23, 0.5);
  outline: none;
  transform: translateY(-3px);
}

.video-card-thumb {
  aspect-ratio: 9 / 13;
  background: #09090b;
  overflow: hidden;
  position: relative;
}

.video-card-thumb img,
.video-card-thumb video {
  height: 100%;
  object-fit: cover;
  width: 100%;
  display: block;
}

.video-card-play {
  align-items: center;
  background: rgba(2, 8, 23, 0.55);
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.85);
  display: flex;
  height: 54px;
  justify-content: center;
  left: 50%;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  transition: background 0.15s, transform 0.15s;
  width: 54px;
  z-index: 2;
}

.video-card:hover .video-card-play,
.video-card:focus-visible .video-card-play {
  background: rgba(14, 165, 183, 0.92);
  transform: translate(-50%, -50%) scale(1.08);
}

.video-card-play::after {
  border-left: 16px solid #ffffff;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  content: "";
  display: block;
  margin-left: 4px;
}

.video-card-overlay {
  background: linear-gradient(to top, rgba(2, 8, 23, 0.88) 0%, rgba(2, 8, 23, 0) 70%);
  bottom: 0;
  display: flex;
  align-items: flex-end;
  left: 0;
  padding: 10px;
  position: absolute;
  right: 0;
  top: 40%;
  z-index: 1;
}

.video-card-overlay-title {
  color: #f8fafc;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
  overflow: hidden;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

.video-card-body {
  padding: 10px 12px 14px;
}

.video-card-body p {
  color: #94a3b8;
  font-size: 12px;
  margin: 0;
}

.video-empty {
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 18px;
  color: #cbd5e1;
  padding: 48px 24px;
  text-align: center;
}

.video-empty-icon {
  display: block;
  font-size: 42px;
  margin-bottom: 10px;
}

.video-empty h2 {
  color: #f8fafc;
  margin: 0 0 6px;
}

.video-empty p {
  margin: 0;
}

/* Lightbox player */
.video-lightbox {
  align-items: center;
  background: rgba(2, 8, 23, 0.92);
  display: none;
  inset: 0;
  justify-content: center;
  padding: 20px;
  position: fixed;
  z-index: 1000;
}

.video-lightbox.open {
  display: flex;
}

body.video-lightbox-lock {
  overflow: hidden;
}

.video-lightbox-inner {
  max-width: 460px;
  position: relative;
  width: 100%;
}

.video-lightbox-player {
  background: #000000;
  border-radius: 14px;
  display: block;
  max-height: 80vh;
  width: 100%;
}

.video-lightbox-title {
  color: #e2e8f0;
  font-size: 14px;
  font-weight: 700;
  margin: 10px 2px 0;
  text-align: center;
}

.video-lightbox-meta {
  align-items: center;
  color: #cbd5e1;
  display: flex;
  font-size: 13px;
  font-weight: 700;
  gap: 12px;
  justify-content: center;
  margin-top: 6px;
}

.video-lightbox-close {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  color: #ffffff;
  cursor: pointer;
  font-size: 18px;
  height: 42px;
  position: absolute;
  right: 16px;
  top: 16px;
  width: 42px;
  z-index: 2;
}

.video-lightbox-nav {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  color: #ffffff;
  cursor: pointer;
  font-size: 30px;
  height: 52px;
  line-height: 1;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  z-index: 2;
}

.video-lightbox-nav.prev {
  left: 12px;
}

.video-lightbox-nav.next {
  right: 12px;
}

.video-lightbox-nav:hover {
  background: rgba(14, 165, 183, 0.9);
}

@media (max-width: 520px) {
  .video-gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .video-lightbox-nav {
    height: 42px;
    width: 42px;
    font-size: 24px;
  }
}

.play-chip {
  background: rgba(239, 35, 60, 0.92);
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  left: 12px;
  padding: 5px 10px;
  position: absolute;
  top: 12px;
}

/* ===== Photo gallery (subpage) ===== */
.photo-gallery {
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 18px;
  display: grid;
  gap: 12px;
  padding: 12px;
}

.photo-gallery-head {
  align-items: baseline;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.photo-gallery-head h2 {
  color: #f8fafc;
  font-size: 18px;
  margin: 0;
}

.photo-gallery-count {
  background: rgba(148, 163, 184, 0.16);
  border-radius: 999px;
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 12px;
}

.photo-gallery-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
}

.photo-card {
  background: #09090b;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  cursor: pointer;
  overflow: hidden;
  padding: 0;
  position: relative;
  aspect-ratio: 1 / 1;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.photo-card:hover,
.photo-card:focus-visible {
  border-color: rgba(14, 165, 183, 0.7);
  box-shadow: 0 10px 24px rgba(2, 8, 23, 0.5);
  outline: none;
  transform: translateY(-2px);
}

.photo-card img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.photo-card-zoom {
  background: rgba(2, 8, 23, 0);
  inset: 0;
  position: absolute;
  transition: background 0.15s;
}

.photo-card:hover .photo-card-zoom,
.photo-card:focus-visible .photo-card-zoom {
  background: rgba(2, 8, 23, 0.25);
}

.photo-card-zoom::after {
  content: "🔍";
  font-size: 20px;
  left: 50%;
  opacity: 0;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  transition: opacity 0.15s, transform 0.15s;
}

.photo-card:hover .photo-card-zoom::after,
.photo-card:focus-visible .photo-card-zoom::after {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.photo-empty {
  background: rgba(9, 9, 11, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  color: #cbd5e1;
  padding: 48px 24px;
  text-align: center;
}

.photo-empty-icon {
  display: block;
  font-size: 42px;
  margin-bottom: 10px;
}

.photo-empty h2 {
  color: #f8fafc;
  margin: 0 0 6px;
}

.photo-empty p {
  margin: 0;
}

/* Photo lightbox */
.photo-lightbox {
  align-items: center;
  background: rgba(2, 8, 23, 0.94);
  display: none;
  inset: 0;
  justify-content: center;
  padding: 20px;
  position: fixed;
  z-index: 1000;
}

.photo-lightbox.open {
  display: flex;
}

body.photo-lightbox-lock {
  overflow: hidden;
}

.photo-lightbox-stage {
  align-items: center;
  display: flex;
  justify-content: center;
  max-height: 82vh;
  max-width: 900px;
  width: 100%;
}

.photo-lightbox-img {
  border-radius: 12px;
  display: block;
  max-height: 82vh;
  max-width: 100%;
  object-fit: contain;
}

.photo-lightbox-close {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  color: #ffffff;
  cursor: pointer;
  font-size: 18px;
  height: 42px;
  position: absolute;
  right: 16px;
  top: 16px;
  width: 42px;
  z-index: 2;
}

.photo-lightbox-nav {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  color: #ffffff;
  cursor: pointer;
  font-size: 30px;
  height: 52px;
  line-height: 1;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  z-index: 2;
}

.photo-lightbox-nav.prev {
  left: 12px;
}

.photo-lightbox-nav.next {
  right: 12px;
}

.photo-lightbox-nav:hover {
  background: rgba(14, 165, 183, 0.9);
}

.photo-lightbox-meta {
  align-items: center;
  bottom: 18px;
  color: #e2e8f0;
  display: flex;
  font-size: 13px;
  font-weight: 700;
  gap: 14px;
  left: 50%;
  position: absolute;
  transform: translateX(-50%);
}

.subpage-list {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.subpage + .site-footer,
.creator-layout:has(.subpage) + .site-footer {
  background: #020817;
  border-top-color: rgba(148, 163, 184, 0.16);
  color: #94a3b8;
  margin-top: 0;
}

.profile-page + .site-footer,
.creator-layout:has(.subpage) + .site-footer {
  display: none;
}

@media (max-width: 800px) {
  .home-hero,
  .creator-layout,
  .admin-shell,
  .admin-form {
    grid-template-columns: 1fr;
  }

  .home-shell,
  .creator-layout,
  .admin-shell,
  .center-page {
    padding: 16px;
  }

  .admin-shell {
    gap: 14px;
  }

  .home-hero {
    padding: 24px;
  }

  .creator-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-nav {
    gap: 12px;
    position: static;
  }

  .admin-brand {
    padding-bottom: 12px;
  }

  .admin-nav nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .admin-nav nav a {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .admin-nav-footer {
    display: flex;
  }

  .admin-topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .subpage {
    padding: 10px;
  }

  .subpage-header {
    border-radius: 14px;
  }

  .live-player,
  .live-player img,
  .live-player video {
    min-height: 300px;
  }

  .profile-actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  html,
  body {
    background: #020817;
    overflow-x: hidden;
    width: 100%;
  }

  body:has(.admin-shell) {
    background: #eef2f7;
  }

  .fake-call-overlay {
    padding: 12px;
  }

  .fake-call-panel {
    min-height: calc(100vh - 24px);
    padding: 28px 12px 22px;
  }

  .fake-call-avatar {
    height: 124px;
    width: 124px;
  }

  .fake-call-panel h2 {
    font-size: 28px;
  }

  .fake-call-actions {
    gap: 36px;
  }

  .admin-shell {
    padding: 10px;
  }

  .admin-nav,
  .admin-topbar,
  .admin-form,
  .table-wrap {
    border-radius: 8px;
  }

  .admin-nav {
    padding: 12px;
  }

  .admin-brand > span {
    height: 36px;
    width: 36px;
  }

  .admin-nav a {
    min-height: 40px;
    padding: 8px 10px;
  }

  .admin-topbar {
    padding: 14px;
  }

  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stat {
    padding: 14px;
  }

  .stat strong {
    font-size: 28px;
  }

  .admin-form {
    padding: 12px;
  }

  .upload-row {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .upload-row .button,
  .upload-row input[type="file"] {
    grid-column: 1 / -1;
  }

  th,
  td {
    padding: 10px;
  }

  .profile-page {
    padding: 0;
  }

  .profile-page.template-light {
    background: #f8fafc;
  }

  .profile-phone {
    border-left: 0;
    border-right: 0;
    border-radius: 0;
    box-shadow: none;
    gap: 10px;
    max-width: none;
    min-height: 100vh;
    padding: 8px;
    width: 100%;
  }

  .profile-card {
    border-radius: 18px;
    min-height: 178px;
    padding: 16px 14px;
  }

  .profile-photo {
    height: 68px;
    width: 68px;
  }

  .profile-card h1 {
    font-size: 25px;
    margin: 9px 0 3px;
  }

  .profile-card p,
  .appointment-card p {
    font-size: 15px;
    line-height: 1.34;
  }

  .profile-location {
    font-size: 12px;
    margin-top: 7px;
    padding: 3px 10px;
  }

  .contact-btn,
  .profile-link {
    border-radius: 9px;
    min-height: 42px;
  }

  .contact-btn {
    font-size: 15px;
  }

  .profile-links {
    gap: 8px;
  }

  .profile-link {
    font-size: 16px;
    padding: 9px 14px;
  }

  .profile-page .ads {
    margin: 2px 0;
  }

  .profile-page .ad {
    border-radius: 10px;
    min-height: auto;
    padding: 6px;
  }

  .profile-page .ad-image {
    border-radius: 8px;
    max-height: 72px;
    object-fit: contain;
  }

  .appointment-card {
    border-radius: 14px;
    gap: 8px;
    padding: 12px;
  }

  .appointment-card h2 {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    font-size: 16px;
    gap: 7px;
    line-height: 1.25;
    margin-bottom: 0;
  }

  .appointment-card h2 span {
    font-size: 9px;
    padding: 3px 7px;
  }

  .appointment-card h2 span {
    margin-left: 0;
  }

  .appointment-card a {
    align-items: center;
    display: flex;
    justify-content: center;
    min-height: 32px;
    padding: 5px 10px;
    width: 100%;
  }

  .subpage {
    padding: 8px;
  }

  .subpage-header,
  .live-stage,
  .connect-card,
  .photo-gallery {
    border-radius: 12px;
  }

  .subpage .ad {
    padding: 0;
  }

  .subpage .ad-image {
    border-radius: 6px;
    max-height: 100px;
    object-fit: contain;
  }

  .video-grid {
    grid-template-columns: 1fr;
  }

  .photo-gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .photo-lightbox-nav {
    height: 42px;
    width: 42px;
    font-size: 24px;
  }
}

@media (max-width: 380px) {
  .profile-phone {
    padding: 6px;
  }

  .profile-card {
    min-height: 160px;
    padding: 13px 12px;
  }

  .profile-photo {
    height: 60px;
    width: 60px;
  }

  .profile-card h1 {
    font-size: 23px;
  }

  .profile-card p,
  .appointment-card p {
    font-size: 14px;
  }

  .contact-btn,
  .profile-link {
    min-height: 39px;
  }

  .profile-link {
    font-size: 15px;
  }

  .profile-page .ad-image {
    max-height: 64px;
  }
}
