@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Instrument+Sans:wght@400;500;600;700&display=swap');

:root {
  --bg: #0b1020;
  --card: #151c34;
  --text: #e9ecf8;
  --muted: #95a0c2;
  --line: #2c3558;
  --accent: #0f57d5;
  --icon-size-feather: 28px;
  --icon-size-font: 35px;
  --default-page-background: radial-gradient(circle at top, #1c2850, var(--bg));
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  min-height: 100dvh;
  background-color: var(--bg);
  background: var(--page-background, var(--default-page-background));
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: scroll;
}

body {
  margin: 0;
  min-height: 100%;
  min-height: 100dvh;
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  position: relative;
  isolation: isolate;
  background-color: var(--bg);
  background: var(--page-background, var(--default-page-background));
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: scroll;
  color: var(--text);
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: var(--page-background, var(--default-page-background));
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: scroll;
  filter: blur(var(--page-background-blur, 0px));
  transform: scale(1.02);
}

body.admin-page {
  padding-top: 86px;
}

.container {
  width: min(980px, 92vw);
  margin: 24px auto;
}

.admin-user-summary {
  display: grid;
  justify-items: center;
  gap: 12px;
  margin-bottom: 1cm;
  text-align: center;
}

.admin-user-summary-photo-wrap {
  width: 160px;
  height: 160px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #111936;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.admin-user-summary-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.admin-user-summary-photo-placeholder {
  color: var(--muted);
  font-size: 2rem;
  line-height: 1;
}

.admin-user-summary-greeting {
  margin: 0;
  font-size: 2rem;
  color: var(--text);
  font-weight: 600;
}

.admin-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  height: 72px;
  padding: 12px 18px;
  background: color-mix(in srgb, var(--card), #000 16%);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-topbar-logo {
  display: inline-flex;
  align-items: center;
}

.admin-topbar-logo img {
  height: 34px;
  width: auto;
  display: block;
}

.admin-topbar-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.topbar-share-btn {
  width: 42px;
  min-width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent !important;
  border: 0;
  color: #f0f4ff;
  transition: transform 0.16s ease;
}

.topbar-share-btn svg {
  width: 18px;
  height: 18px;
}

.topbar-profile-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #f0f4ff;
  transition: transform 0.16s ease;
}

.topbar-profile-link.disabled-link {
  opacity: 0.55;
  pointer-events: none;
}

.topbar-settings-menu {
  position: relative;
}

.topbar-settings-trigger {
  list-style: none;
  width: 42px;
  min-width: 42px;
  height: 42px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  transition: transform 0.16s ease;
}

.topbar-settings-trigger::-webkit-details-marker {
  display: none;
}

.topbar-settings-trigger svg {
  width: 18px;
  height: 18px;
}

.topbar-settings-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 130px;
  background: #151f3f;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.topbar-settings-popover .topbar-logout-form {
  margin: 0;
}

.topbar-settings-popover .topbar-logout-form button {
  width: 100%;
  min-width: 0;
  height: 38px;
}

.panel-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
  align-items: start;
}

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

.panel-actions {
  margin-top: 38px;
  padding-top: 14px;
  display: grid;
  gap: 8px;
}

.panel-actions #saveBtn {
  width: auto;
  min-width: 132px;
  padding: 10px 22px;
  justify-self: end;
}

.card {
  background: color-mix(in srgb, var(--card), #fff 2%);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
}

h1, h2, h3 {
  margin-top: 0;
}

label {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 6px;
}

input,
textarea,
select,
button {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #0d1430;
  color: var(--text);
  padding: 10px 12px;
  font-size: 0.95rem;
}

input.field-invalid,
textarea.field-invalid,
select.field-invalid {
  border-color: #ff6b6b;
  box-shadow: 0 0 0 1px rgba(255, 107, 107, 0.35);
}

.field-error-message {
  margin: 6px 0 0;
  font-size: 0.78rem;
  color: #ff9b9b;
}

textarea {
  min-height: 80px;
  resize: vertical;
}

button {
  cursor: pointer;
  border: none;
  background: var(--accent);
  color: white;
  font-weight: 600;
}

button.secondary {
  background: #2b355f;
}

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

.phone-with-country {
  display: grid;
  grid-template-columns: 90px 1fr;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0d1430;
  overflow: hidden;
}

.phone-with-country input {
  width: 100%;
}

.country-prefix {
  position: relative;
  height: 100%;
  border-right: 1px solid var(--line);
  background: #111936;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 26px 0 10px;
}

.country-flag {
  font-size: 1.18rem;
  line-height: 1;
}

.country-dial-code {
  font-size: 0.95rem;
  line-height: 1;
  color: var(--text);
}

.country-arrow {
  position: absolute;
  right: 9px;
  top: 50%;
  width: 0;
  height: 0;
  transform: translateY(-40%);
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--muted);
  pointer-events: none;
}

.country-native-select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  color: transparent;
  cursor: pointer;
  opacity: 0;
  -webkit-appearance: none;
  appearance: none;
}

.country-native-select option {
  color: #0f172a;
  background: #ffffff;
}

.country-native-select option:disabled {
  color: #64748b;
}

.phone-with-country input {
  border: 0;
  border-radius: 0;
  background: transparent;
}

.phone-with-country input:focus,
.country-native-select:focus {
  outline: none;
}

.phone-with-country:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(15, 87, 213, 0.35);
}

.at-handle-input {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0d1430;
  overflow: hidden;
}

.at-handle-input span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--muted);
  background: #111936;
  pointer-events: none;
  -webkit-user-select: none;
  user-select: none;
}

.at-handle-input input {
  border: 0;
  border-radius: 0;
  background: transparent;
}

.at-handle-input input:focus {
  outline: none;
}

.at-handle-input:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(15, 87, 213, 0.35);
}

.row-3 {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr auto;
  align-items: end;
}

.upload-profile-row {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) 180px;
  align-items: end;
}

.upload-profile-row button {
  margin-bottom: 0;
}

.profile-photo-editor {
  display: grid;
  gap: 10px;
}

.profile-photo-title {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.profile-photo-preview {
  width: 140px;
  height: 140px;
  border-radius: 999px;
  border: 2px solid var(--line);
  background: #111936;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.86rem;
}

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

.profile-photo-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  width: fit-content;
}

.profile-photo-actions #uploadBtn {
  width: auto;
  min-width: 130px;
  height: 40px;
  padding: 0 14px;
  justify-self: start;
}

.profile-customization-block {
  display: grid;
  gap: 6px;
  margin-top: 6px;
}

.profile-custom-link-block {
  display: grid;
  gap: 6px;
  margin-top: 4px;
}

.profile-link-input {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0d1430;
  overflow: hidden;
}

.profile-link-input span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 0 10px;
  color: var(--muted);
  background: #111936;
  pointer-events: none;
  -webkit-user-select: none;
  user-select: none;
}

.profile-link-input input {
  border: 0;
  border-radius: 0;
  background: transparent;
}

.profile-link-input input:focus {
  outline: none;
}

.profile-link-input:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(15, 87, 213, 0.35);
}

.profile-link-status {
  min-height: 16px;
  color: var(--muted);
  font-size: 0.8rem;
}

.profile-link-status[data-state='ok'] {
  color: #8ad7a6;
}

.profile-link-status[data-state='checking'] {
  color: #b7c7ff;
}

.profile-link-status[data-state='error'] {
  color: #ff9b9b;
}

#profileCustomizationBtn {
  width: auto;
  min-width: 190px;
  height: 38px;
  padding: 0 14px;
  justify-self: start;
}

.icon-circle-btn {
  width: 44px;
  min-width: 44px;
  height: 44px;
  border-radius: 999px;
  background: #2b355f;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: transform 0.16s ease;
}

.icon-circle-btn svg {
  width: 18px;
  height: 18px;
}

@media (max-width: 640px) {
  .row,
  .row-3 {
    grid-template-columns: 1fr;
  }

  .phone-with-country {
    grid-template-columns: 132px 1fr;
  }

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

  .profile-photo-actions {
    width: fit-content;
  }
}

.space {
  display: grid;
  gap: 12px;
}

.small {
  font-size: 0.8rem;
  color: var(--muted);
}

.public-card {
  width: min(460px, 92vw);
  margin: 22px auto;
  border-radius: 22px;
  overflow: hidden;
}

.personalization-page {
  padding-top: 14px;
}

.personalization-top-controls {
  width: min(460px, 92vw);
  margin: 0 auto 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.personalization-circle-btn {
  width: 42px;
  min-width: 42px;
  height: 42px;
  border-radius: 999px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: white;
  transition: transform 0.16s ease;
}

.personalization-circle-btn span {
  font-size: 1rem;
  line-height: 1;
}

.personalization-circle-btn svg {
  width: 18px;
  height: 18px;
}

.personalization-pill-btn {
  width: auto;
  min-width: 124px;
  height: 42px;
  padding: 0 12px;
  border-radius: 999px;
  transition: transform 0.16s ease;
}

.personalization-more-menu {
  position: relative;
}

.personalization-more-menu summary {
  list-style: none;
  transition: transform 0.16s ease;
}

.personalization-more-menu summary::-webkit-details-marker {
  display: none;
}

.personalization-more-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 238px;
  background: #151f3f;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
  z-index: 20;
}

.personalization-more-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.personalization-more-list-item {
  width: 100%;
  min-width: 0;
  text-align: left;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.92rem;
  color: var(--text);
  background: #2b355f;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.16s ease, border-color 0.16s ease;
}

.personalization-more-list-item:focus-visible {
  outline: 2px solid #9fc1ff;
  outline-offset: 2px;
}

@media (hover: hover) {
  .topbar-share-btn:hover,
  .topbar-profile-link:hover,
  .topbar-settings-trigger:hover,
  .personalization-more-menu summary:hover,
  .personalization-circle-btn:hover,
  .personalization-pill-btn:hover,
  .style-edit-close-btn:hover,
  .icon-circle-btn:hover {
    transform: scale(1.06);
  }
}

.style-edit-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
}

.style-edit-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: rgba(5, 8, 20, 0.78);
}

.style-edit-panel {
  position: relative;
  width: min(520px, calc(100vw - 24px));
  margin: 24px auto;
  background: #131c39;
  border: 1px solid #34406d;
  border-radius: 18px;
  padding: 14px;
  display: grid;
  gap: 14px;
}

.style-edit-panel button {
  transition: transform 0.16s ease;
}

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

.style-edit-header h3 {
  margin: 0;
}

.style-edit-close-btn {
  width: 38px;
  min-width: 38px;
  height: 38px;
  border-radius: 999px;
  padding: 0;
  background: #2b355f;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.16s ease;
}

.style-edit-close-btn svg {
  width: 16px;
  height: 16px;
}

.style-edit-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.style-edit-actions-grid-bg {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.style-edit-column {
  display: grid;
  gap: 10px;
}

.style-edit-action-btn {
  width: 100%;
  height: 40px;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.style-control-section {
  display: none;
  gap: 8px;
  margin-top: 2px;
}

.style-control-section.is-open {
  display: grid;
}

.style-control-title {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text);
  text-align: left;
}

.style-color-line-wrap {
  position: relative;
  width: 100%;
  height: 18px;
  border-radius: 999px;
}

.style-color-line {
  width: 100%;
  height: 6px;
  margin-top: 6px;
  border-radius: 999px;
  background: #202a4b;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.style-color-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.style-range-input {
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  height: 20px;
  --range-progress: 0%;
  --range-color: var(--accent);
  --range-track-color: #2b355f;
  --range-track-border: transparent;
}

.style-range-input:focus {
  outline: none;
}

.style-range-input::-webkit-slider-runnable-track {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  border: 1px solid var(--range-track-border);
  background: linear-gradient(
    to right,
    var(--range-color) 0 var(--range-progress),
    var(--range-track-color) var(--range-progress) 100%
  );
}

.style-range-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid #9fc1ff;
  background: #f0f4ff;
  margin-top: -6px;
}

.style-range-input::-moz-range-track {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  border: 1px solid var(--range-track-border);
  background: var(--range-track-color);
}

.style-range-input::-moz-range-progress {
  height: 6px;
  border-radius: 999px;
  border: 0;
  background: var(--range-color);
}

.style-range-input::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid #9fc1ff;
  background: #f0f4ff;
}

.style-edit-action-btn.is-active {
  box-shadow: 0 0 0 1px rgba(159, 193, 255, 0.35);
}

.bg-upload-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

.bg-image-preview-wrap {
  width: 100%;
  height: 92px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  overflow: hidden;
  background: #0d1430;
}

.bg-image-preview {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: filter 0.16s ease;
}

.bg-upload-actions .style-edit-action-btn {
  height: 40px;
}

.bg-suggest-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.bg-suggest-btn {
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(135deg, var(--bg-s1), var(--bg-s2));
  padding: 0;
}

.bg-suggest-1 { --bg-s1: #1c2850; --bg-s2: #0b1020; }
.bg-suggest-2 { --bg-s1: #16213e; --bg-s2: #1b1b2f; }
.bg-suggest-3 { --bg-s1: #355c7d; --bg-s2: #6c5b7b; }
.bg-suggest-4 { --bg-s1: #2c3e50; --bg-s2: #4ca1af; }
.bg-suggest-5 { --bg-s1: #1f4037; --bg-s2: #99f2c8; }
.bg-suggest-6 { --bg-s1: #42275a; --bg-s2: #734b6d; }
.bg-suggest-7 { --bg-s1: #3a1c71; --bg-s2: #d76d77; }
.bg-suggest-8 { --bg-s1: #0f2027; --bg-s2: #2c5364; }

.style-divider-line {
  width: 100%;
  height: 1px;
  background: #2d3a67;
  margin: 2px 0;
}

.bg-gradient-custom-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.bg-gradient-color-col {
  display: grid;
  gap: 6px;
}

@media (hover: hover) {
  .style-edit-panel button:hover {
    transform: scale(1.06);
  }

  .style-edit-action-btn:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.28);
  }
}

.style-edit-modal[hidden] {
  display: none !important;
}

@media (max-width: 640px) {
  .style-edit-actions-grid {
    grid-template-columns: 1fr;
  }

  .style-edit-actions-grid-bg {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .bg-gradient-custom-grid {
    grid-template-columns: 1fr;
  }
}

.public-header {
  text-align: center;
  padding: 28px 18px 18px;
}

.profile-block {
  margin: 14px;
  border: 1px solid #2b355f;
  border-radius: 16px;
  background: var(--personalize-item-bg, #192446);
  color: var(--personalize-text-color, var(--text));
  position: relative;
}

.advanced-item-wrap {
  position: relative;
}

.advanced-item-edit-btn {
  position: absolute;
  top: 50%;
  left: 14px;
  transform: translateY(-50%);
  width: 34px;
  min-width: 34px;
  height: 34px;
  border-radius: 999px;
  padding: 0;
  z-index: 4;
  background: rgba(0, 0, 0, 0.18);
  color: #f1f5ff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.advanced-item-edit-btn svg {
  width: 16px;
  height: 16px;
}

.advanced-item-edit-btn[hidden] {
  display: none !important;
}

.advanced-mode-on .link-btn,
.advanced-mode-on .link-btn-disabled {
  padding-left: 52px;
}

@media (hover: hover) {
  .advanced-item-wrap:hover .advanced-item-edit-btn {
    transform: translateY(-50%) scale(1.06);
  }

  .profile-block > .advanced-item-edit-btn:hover {
    transform: translateY(-50%) scale(1.06);
  }
}

.share-toggle-btn {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 42px;
  height: 42px;
  min-width: 42px;
  border-radius: 999px;
  background: transparent !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: transform 0.16s ease;
}

.share-toggle-btn svg {
  width: 20px;
  height: 20px;
}

@media (hover: hover) {
  .share-toggle-btn:hover {
    transform: scale(1.06);
  }
}

.avatar {
  width: 130px;
  height: 130px;
  border-radius: 999px;
  object-fit: cover;
  border: 3px solid var(--accent);
}

.name {
  font-size: 1.35rem;
  margin: 10px 0 4px;
}

.role {
  color: var(--personalize-text-color, var(--muted));
  margin: 0;
}

.bio {
  margin: 12px 0 0;
  color: var(--personalize-text-color, #dbe2ff);
}

.links {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.link-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  background: var(--personalize-item-bg, #202a4b);
  color: var(--personalize-text-color, #fff);
  border-radius: var(--personalize-item-radius, 12px);
  opacity: var(--personalize-item-opacity, 1);
  padding: 12px;
  border: 1px solid #2d3a67;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.link-btn-disabled {
  opacity: 0.75;
  cursor: default;
  pointer-events: none;
}

.link-btn:focus-visible {
  outline: 2px solid #9fc1ff;
  outline-offset: 2px;
}

@media (hover: hover) {
  .link-btn:hover,
  .advanced-item-wrap:hover .link-btn {
    transform: scale(1.06);
  }
}

.link-btn-icon {
  display: inline-flex;
  width: max(var(--icon-size-feather), var(--icon-size-font));
  height: max(var(--icon-size-feather), var(--icon-size-font));
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.link-btn-icon svg {
  width: var(--icon-size-feather);
  height: var(--icon-size-feather);
}

.link-btn-icon .las,
.link-btn-icon .lab,
.link-btn-icon i {
  font-size: var(--icon-size-font);
  line-height: 1;
}

.link-btn-label {
  display: inline-block;
  text-align: left;
}

.meta {
  padding: 10px 16px 20px;
  color: var(--muted);
  font-size: 0.86rem;
}

.share-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
}

.share-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 8, 20, 0.78);
  border: 0;
  border-radius: 0;
  padding: 0;
}

.share-panel {
  position: relative;
  width: min(560px, calc(100vw - 24px));
  margin: 24px auto;
  background: #131c39;
  border: 1px solid #34406d;
  border-radius: 18px;
  padding: 14px;
  display: grid;
  gap: 12px;
  max-height: calc(100vh - 48px);
  overflow: auto;
}

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

.share-panel-header h3 {
  margin: 0;
}

.share-close-btn {
  width: 38px;
  height: 38px;
  min-width: 38px;
  padding: 0;
  border-radius: 10px;
  background: #2b355f;
  font-size: 1.2rem;
}

.share-accordion {
  display: grid;
  gap: 8px;
}

.share-item {
  border: 1px solid #2d3a67;
  border-radius: 12px;
  overflow: hidden;
}

.share-toggle-item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  background: #1d284f;
  border: 0;
  text-align: left;
  border-radius: 0;
}

.share-toggle-item i {
  font-size: 1.35rem;
  width: 24px;
}

.share-toggle-item::after {
  content: '▾';
  margin-left: auto;
  opacity: 0.85;
}

.share-toggle-item[aria-expanded='true']::after {
  content: '▴';
}

.share-item-content {
  display: grid;
  gap: 10px;
  padding: 10px;
  background: #152044;
}

.share-item-content[hidden],
.share-qr[hidden],
.share-modal[hidden] {
  display: none !important;
}

.share-open-btn {
  background: #2b355f;
}

.direct-send-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
}

.direct-send-row select {
  width: auto;
  min-width: 110px;
}

.direct-send-row button {
  width: auto;
  min-width: 90px;
}

@media (max-width: 640px) {
  .direct-send-row {
    grid-template-columns: 1fr;
  }

  .direct-send-row select,
  .direct-send-row button {
    width: 100%;
  }
}

.share-qr {
  border: 1px dashed #42518a;
  border-radius: 12px;
  padding: 10px;
  display: flex;
  justify-content: center;
}

.share-qr img {
  width: 240px;
  height: 240px;
  border-radius: 8px;
  background: #fff;
}

.share-url-box {
  position: relative;
}

.share-url-box input {
  background: #0d1430;
  padding-right: 64px;
}

.copy-inline-text {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: auto;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 0.86rem;
  font-weight: 400;
}

.status {
  margin-top: 8px;
  font-size: 0.9rem;
  color: #b7c7ff;
}

.preview-frame {
  width: 100%;
  height: 640px;
  border: 1px solid #2c3558;
  border-radius: 12px;
  background: #0b1020;
}

.logout-form {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 10px;
}

.topbar-logout-form {
  margin: 0;
}

.logout-form button {
  width: auto;
  min-width: 100px;
}

.topbar-logout-form button {
  min-width: 82px;
  height: 40px;
  padding: 0 14px;
}

@media (max-width: 640px) {
  body.admin-page {
    padding-top: 96px;
  }

  .admin-topbar {
    padding: 12px;
  }

  .admin-topbar-logo img {
    height: 30px;
  }

  .topbar-profile-link {
    font-size: 0.82rem;
  }
}

.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  margin: 0 auto;
}

.login-card {
  width: min(440px, 92vw);
}

.hidden {
  display: none;
}

.status.error {
  color: #ff9b9b;
}

.users-table-wrap {
  overflow-x: auto;
  overflow-y: visible;
  max-height: none;
}

.users-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.users-table th,
.users-table td {
  border: 1px solid var(--line);
  padding: 10px;
  text-align: left;
}

.users-table th {
  color: #c7d2ff;
  font-weight: 600;
  background: #1b2548;
}

.users-table a {
  color: #9fc1ff;
}

.users-filter {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.users-filter button {
  width: auto;
  min-width: 90px;
}

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

.action-btn {
  width: auto;
  min-width: 80px;
  padding: 6px 10px;
  font-size: 0.8rem;
}

.icon-action-btn {
  min-width: 34px;
  width: 34px;
  height: 34px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon-action-btn svg {
  width: 16px;
  height: 16px;
}

.danger-btn {
  background: #b82738;
}

.pagination-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.pagination-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.pagination-controls button {
  width: auto;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  font-size: 1rem;
}

.pagination-controls .small {
  min-width: 112px;
  text-align: center;
}

.page-size-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.master-user-form-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.master-user-form-actions button {
  width: auto;
  min-width: 150px;
  height: 40px;
  padding: 0 16px;
}

.page-size-control select {
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #0d1430;
  color: var(--text);
  padding: 6px 8px;
}

.panel-section {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
}

.accordion-section {
  padding: 8px;
}

.accordion-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  text-align: left;
}

.accordion-toggle::after {
  content: '▾';
  font-size: 0.9rem;
  opacity: 0.9;
}

.accordion-toggle[aria-expanded='true']::after {
  content: '▴';
}

.accordion-content {
  margin-top: 10px;
}

.accordion-content[hidden] {
  display: none !important;
}

.links-order-table td,
.links-order-table th {
  vertical-align: middle;
}

.drag-handle {
  display: inline-flex;
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  cursor: grab;
  -webkit-user-select: none;
  user-select: none;
}

.drag-handle svg {
  width: 16px;
  height: 16px;
}

#linksSection #addLink {
  width: auto;
  min-width: 130px;
  height: 38px;
  padding: 0 14px;
  justify-self: end;
  margin-top: 6px;
}

.dragging-row {
  opacity: 0.5;
}

.inline-check {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 0.9rem;
}

.inline-check input {
  width: auto;
}

.link-icon-only-cell {
  text-align: center;
}

.link-icon-only-cell .inline-check {
  justify-content: center;
  gap: 0;
  margin: 0;
}

.link-actions-cell-empty {
  padding: 10px;
}

.link-editor {
  padding: 12px;
  gap: 10px;
}

.link-title-cell {
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-page-header {
  margin-bottom: 14px;
}

.link-page-card {
  gap: 14px;
}

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

.icon-option {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(max(var(--icon-size-feather), var(--icon-size-font)) * 2.5);
  background: #0d1430;
  border: 1px solid var(--line);
  transition: transform 0.16s ease, border-color 0.16s ease;
}

@media (hover: hover) {
  .icon-option:hover {
    transform: scale(1.06);
    border-color: #9fc1ff;
  }
}

.icon-option.is-selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent), transparent 55%);
}

.icon-preview {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: max(var(--icon-size-feather), var(--icon-size-font));
  height: max(var(--icon-size-feather), var(--icon-size-font));
  line-height: 1;
}

.icon-preview svg {
  width: var(--icon-size-feather);
  height: var(--icon-size-feather);
}

.icon-preview .las,
.icon-preview .lab,
.icon-preview i {
  font-size: var(--icon-size-font);
  line-height: 1;
}

.icon-empty {
  font-weight: 700;
  font-size: 1rem;
}

.public-brand-footer {
  width: min(460px, 92vw);
  margin: 2cm auto 18px;
  text-align: center;
}

.public-brand-footer img {
  width: min(320px, 84vw);
  height: auto;
  display: inline-block;
}

/* Modern Minimal Refresh */
:root {
  --bg: #f5f7fb;
  --card: #ffffff;
  --text: #12182b;
  --muted: #64708b;
  --line: #dce2ef;
  --accent: #0a84ff;
  --accent-strong: #0063db;
  --surface-soft: #eef2fa;
  --shadow-soft: 0 10px 30px rgba(18, 24, 43, 0.08);
  --default-page-background:
    radial-gradient(circle at 12% 0%, rgba(10, 132, 255, 0.14), transparent 34%),
    radial-gradient(circle at 88% 12%, rgba(0, 99, 219, 0.1), transparent 36%),
    linear-gradient(180deg, #f8faff 0%, #eef3fb 54%, #e8eef8 100%);
}

html {
  background-color: var(--bg);
  background: var(--page-background, var(--default-page-background));
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: scroll;
}

body {
  font-family: 'Space Grotesk', 'Instrument Sans', sans-serif;
  color: var(--text);
}

body::before {
  opacity: 1;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    linear-gradient(0deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.22)),
    repeating-linear-gradient(
      90deg,
      rgba(14, 24, 44, 0.018) 0,
      rgba(14, 24, 44, 0.018) 1px,
      transparent 1px,
      transparent 48px
    );
}

.container {
  width: min(1120px, 92vw);
  margin: 34px auto;
}

.master-page .panel-grid {
  grid-template-columns: minmax(360px, 420px) minmax(0, 1fr);
  gap: 18px;
}

.card {
  background: color-mix(in srgb, var(--card), #f2f5fb 6%);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow-soft);
  padding: 20px;
}

h1,
h2,
h3 {
  color: #0e1630;
  letter-spacing: -0.025em;
}

label {
  color: #4f5b76;
  font-weight: 600;
}

input,
textarea,
select,
button {
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--text);
  border-radius: 12px;
  min-height: 44px;
  font-family: inherit;
}

input::placeholder,
textarea::placeholder {
  color: #93a0bc;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--accent), #ffffff 36%);
  box-shadow: 0 0 0 4px rgba(10, 132, 255, 0.14);
}

button {
  border: 1px solid transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #ffffff;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

button.secondary {
  background: #ffffff;
  color: #213150;
  border-color: var(--line);
}

@media (hover: hover) {
  button:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(10, 132, 255, 0.2);
  }

  button.secondary:hover {
    box-shadow: 0 8px 18px rgba(18, 24, 43, 0.12);
  }
}

a {
  color: #0a6ee8;
}

.small {
  color: #56627c;
}

.status {
  color: #3c4f77;
}

.status.error {
  color: #cc2d3f;
}

.admin-topbar {
  height: 74px;
  padding: 12px 20px;
  border-bottom: 1px solid rgba(220, 226, 239, 0.86);
  background: rgba(255, 255, 255, 0.74);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.admin-topbar-logo img {
  height: 36px;
}

.topbar-profile-link {
  color: #0f203f;
  font-size: 0.84rem;
  letter-spacing: 0.06em;
}

.topbar-share-btn,
.topbar-settings-trigger,
.personalization-circle-btn,
.style-edit-close-btn,
.share-close-btn,
.icon-circle-btn {
  border: 1px solid var(--line);
  background: #ffffff !important;
  color: #15233f;
}

.topbar-settings-popover,
.personalization-more-popover,
.style-edit-panel,
.share-panel {
  background: color-mix(in srgb, var(--card), #f5f8ff 8%);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.share-backdrop {
  background: rgba(10, 16, 34, 0.46);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

.share-item {
  border-color: var(--line);
  background: #ffffff;
  overflow: visible;
}

.share-toggle-item {
  background: #f7f9fe;
  color: #1d2f52;
  min-height: 46px;
  padding: 10px 14px;
}

.share-toggle-item i {
  color: #2a4679;
}

.share-toggle-item::after {
  color: #617193;
}

.share-item-content {
  background: #ffffff;
  padding: 12px;
}

.profile-photo-preview,
.admin-user-summary-photo-wrap,
.bg-image-preview-wrap,
.share-qr {
  background: var(--surface-soft);
  border-color: var(--line);
}

.admin-user-summary-photo-wrap {
  background: #d7dce6;
  border-color: #c7cfde;
  position: relative;
}

.admin-user-summary-photo {
  position: relative;
  z-index: 1;
}

.admin-user-summary-photo-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  color: #59657d;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  pointer-events: none;
  z-index: 0;
}

.admin-user-summary-photo[hidden],
.admin-user-summary-photo-placeholder[hidden] {
  display: none !important;
}

.phone-with-country,
.at-handle-input,
.profile-link-input,
.share-url-box input,
.icon-option {
  background: #ffffff;
  border-color: var(--line);
}

.country-prefix,
.at-handle-input span,
.profile-link-input span {
  background: #f5f7fc;
  border-right-color: var(--line);
  color: #53617f;
}

.panel-section,
.accordion-section {
  border-color: var(--line);
  background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
}

.accordion-toggle {
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #f8faff;
  color: #1b2c4d;
  min-height: 48px;
}

.users-table-wrap {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: auto;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.users-table {
  border-collapse: separate;
  border-spacing: 0;
}

.users-table th,
.users-table td {
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.users-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: #233559;
  background: #f4f7fd;
}

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

.users-filter input,
.page-size-control select {
  background: #ffffff;
}

.pagination-controls button {
  border: 1px solid var(--line);
}

.master-user-form-actions button {
  min-width: 160px;
}

.login-wrap {
  min-height: 100dvh;
  padding: 24px 0;
}

.login-card {
  width: min(480px, 94vw);
  border-radius: 22px;
  position: relative;
  overflow: hidden;
}

.login-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, #0a84ff, #20a0ff, #0063db);
}

.login-card > * {
  position: relative;
}

.public-card {
  width: min(500px, 94vw);
}

.public-header {
  padding: 30px 20px 18px;
}

.public-header .name,
.public-header .bio {
  color: var(--personalize-text-color, var(--text));
}

.profile-block {
  margin: 14px;
  border-color: color-mix(in srgb, var(--personalize-item-bg, #e9eef9), #1f2e49 10%);
  box-shadow: 0 6px 22px rgba(18, 24, 43, 0.09);
}

.link-btn {
  border-color: color-mix(in srgb, var(--personalize-item-bg, #dbe3f4), #243758 12%);
}

.link-page-header,
.link-page-card {
  background: color-mix(in srgb, #ffffff, #f3f7ff 8%);
}

.icon-option {
  border-radius: 12px;
  color: #1d2f52;
  background: #ffffff;
}

.icon-option .icon-empty {
  color: #53617f;
}

.icon-option.is-selected {
  border-color: color-mix(in srgb, var(--accent), #ffffff 28%);
  box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.14);
}

.personalization-top-controls {
  margin-top: 8px;
}

.personalization-pill-btn {
  border: 1px solid var(--line);
  background: #ffffff;
  color: #20304f;
}

.personalization-more-list-item {
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  color: #20304f;
  font-weight: 600;
  display: flex;
  align-items: center;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.personalization-more-list-item:focus-visible {
  outline: 2px solid rgba(10, 132, 255, 0.32);
  outline-offset: 2px;
}

@media (hover: hover) {
  .personalization-more-list-item:hover {
    background: #f5f8ff;
    border-color: color-mix(in srgb, var(--accent), #ffffff 32%);
    box-shadow: 0 8px 18px rgba(18, 24, 43, 0.1);
  }
}

.style-divider-line {
  background: var(--line);
}

.style-color-line-wrap {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  overflow: hidden;
}

.style-color-line {
  width: 100%;
  height: 100%;
  margin-top: 0;
  border: 0;
  border-radius: inherit;
}

#opacityRange,
#radiusRange {
  --range-track-color: #ffffff;
  --range-track-border: var(--line);
  --range-color: transparent;
}

#opacityRange[data-user-dragged='true'],
#radiusRange[data-user-dragged='true'] {
  --range-color: var(--accent);
}

.preview-frame {
  border-color: var(--line);
  background: #ffffff;
}

.copy-inline-text {
  top: 6px;
  bottom: 6px;
  right: 8px;
  min-height: 0;
  height: auto;
  line-height: 1;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid transparent;
  white-space: nowrap;
  font-size: 0.8rem;
  font-weight: 600;
  transform: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.share-url-box input {
  padding-right: 102px;
}

.copy-inline-text:hover {
  transform: none;
  color: #0a6ee8;
  background: rgba(10, 132, 255, 0.08);
  box-shadow: 0 8px 18px rgba(18, 24, 43, 0.12);
}

.public-brand-footer {
  margin-top: 52px;
}

@keyframes rise-fade {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.card,
.style-edit-panel,
.share-panel {
  animation: rise-fade 0.4s ease both;
}

.public-card {
  animation: fade-in 0.25s ease both;
}

@media (max-width: 820px) {
  body.admin-page {
    padding-top: 88px;
  }

  .admin-topbar {
    height: 78px;
    padding: 12px;
  }

  .container {
    width: min(100%, calc(100vw - 20px));
    margin: 18px auto;
  }

  .card {
    padding: 16px;
    border-radius: 16px;
  }

  .topbar-profile-link {
    display: none;
  }
}

@media (max-width: 1020px) {
  .master-page .panel-grid {
    grid-template-columns: 1fr;
  }
}

/* Force no blur on admin accordion content sections requested by UX */
#socialSection,
#customSection,
#linksSection {
  filter: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  background: #ffffff;
  border-radius: 12px;
  padding: 12px;
}

/* Remove visual effects from admin section toggles as requested by UX */
.accordion-toggle[data-accordion-target='socialSection'],
.accordion-toggle[data-accordion-target='customSection'],
.accordion-toggle[data-accordion-target='linksSection'] {
  transform: none !important;
  box-shadow: none !important;
  filter: none !important;
  transition: none !important;
}

@media (hover: hover) {
  .accordion-toggle[data-accordion-target='socialSection']:hover,
  .accordion-toggle[data-accordion-target='customSection']:hover,
  .accordion-toggle[data-accordion-target='linksSection']:hover {
    transform: none !important;
    box-shadow: none !important;
    filter: none !important;
  }
}
