/* ========================================================================== 
   FAMILY CENTRAL ADMIN
   Full admin stylesheet rewrite with improved family profile/member editor UI.
   ========================================================================== */

.admin-page .app-shell,
.admin-app-shell {
  width: min(96vw, 1560px);
  margin: 0 auto;
  padding: clamp(16px, 2vw, 28px) 0 clamp(28px, 4vw, 44px);
}

.admin-page .card__body {
  background: #fbfcff;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(16px, 1.5vw, 24px);
  align-items: start;
}

.admin-tool-card,
.admin-card {
  grid-column: span 12;
}

@media (min-width: 1100px) {
  .admin-card--family {
    grid-column: span 8;
  }

  .admin-card--profile {
    grid-column: span 4;
  }
}

.admin-card-header--family {
  background: linear-gradient(135deg, rgba(236, 246, 255, 0.95), rgba(246, 240, 255, 0.95));
}

.admin-card-header--profile {
  background: linear-gradient(135deg, rgba(255, 245, 235, 0.95), rgba(255, 240, 246, 0.95));
}

.admin-action-stack,
.admin-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-mini-preview,
.admin-empty-panel,
.family-admin-hint {
  margin-top: 16px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(219, 227, 239, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.56);
}

.family-admin-hint {
  margin-top: 0;
  margin-bottom: 16px;
  color: #40556f;
  line-height: 1.45;
}

.admin-stat-grid {
  display: grid;
  gap: 12px;
}

.admin-stat {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(219, 227, 239, 0.85);
  box-shadow: 0 5px 14px rgba(34, 55, 94, 0.05);
}

.admin-stat__label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.admin-stat__value {
  font-size: 20px;
  line-height: 1;
}

.admin-list-mini {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(219, 227, 239, 0.85);
  box-shadow: 0 5px 14px rgba(34, 55, 94, 0.05);
}

/* ========================================================================== 
   Shared form controls
   ========================================================================== */

.admin-field {
  display: grid;
  gap: 7px;
}

.admin-field__label {
  font-weight: 800;
  color: #35506f;
  font-size: 0.92rem;
}

.admin-field input[type="text"],
.admin-field input[type="color"],
.admin-field select,
.alias-input-row input {
  min-height: 44px;
  border-radius: 15px;
  border: 1px solid rgba(177, 195, 222, 0.92);
  background: rgba(255, 255, 255, 0.94);
  color: #20354f;
  padding: 9px 12px;
  font: inherit;
  outline: none;
  box-shadow: 0 5px 14px rgba(34, 55, 94, 0.04);
}

.admin-field input:focus,
.admin-field select:focus,
.alias-input-row input:focus {
  border-color: rgba(90, 143, 230, 0.88);
  box-shadow:
    0 0 0 4px rgba(90, 143, 230, 0.12),
    0 5px 14px rgba(34, 55, 94, 0.04);
}

.admin-field-grid {
  display: grid;
  gap: 14px;
}

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

@media (max-width: 740px) {
  .admin-field-grid--two {
    grid-template-columns: 1fr;
  }
}

.btn--primary,
.btn.btn--primary {
  background: linear-gradient(180deg, #4d8fff 0%, #3674db 100%);
  color: #fff;
  border-color: rgba(42, 96, 186, 0.45);
  box-shadow: 0 8px 18px rgba(45, 105, 200, 0.18);
}

.btn--secondary,
.btn.btn--secondary {
  background: rgba(255, 255, 255, 0.88);
  color: #304761;
  border-color: rgba(177, 195, 222, 0.82);
}

.btn--danger,
.btn.btn--danger {
  background: linear-gradient(180deg, #ff7d7d 0%, #e05757 100%);
  color: #fff;
  border-color: rgba(178, 65, 65, 0.45);
  box-shadow: 0 8px 18px rgba(194, 54, 54, 0.16);
}

/* ========================================================================== 
   Family profile card
   ========================================================================== */

.family-profile-manager {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.family-profile-manager__left {
  display: flex;
  align-items: center;
  justify-content: center;
}

.family-profile-manager__right {
  display: grid;
  gap: 14px;
}

.family-profile-avatar,
.family-member-avatar,
.member-preview-avatar,
.photo-crop-preview {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(189, 203, 224, 0.72);
  box-shadow: 0 10px 24px rgba(34, 55, 94, 0.08);
}

.family-profile-avatar {
  width: 150px;
  height: 150px;
}

.family-profile-avatar img,
.family-member-avatar img,
.member-preview-avatar img,
.photo-crop-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.family-profile-avatar__fallback,
.family-member-avatar__fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: #334a6a;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(236, 242, 250, 0.96));
}

.shape-square {
  border-radius: 20px;
}

.shape-circle {
  border-radius: 999px;
}

.shape-oval {
  border-radius: 999px;
  width: 180px !important;
  height: 120px !important;
}

/* ========================================================================== 
   Family member cards
   ========================================================================== */

.family-members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.family-member-card {
  --member-color: #7aa2f7;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 15px;
  align-items: center;
  padding: 15px;
  border-radius: 22px;
  background:
    radial-gradient(circle at top left, color-mix(in srgb, var(--member-color) 20%, transparent) 0%, transparent 42%),
    rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(189, 203, 224, 0.74);
  box-shadow: 0 10px 24px rgba(34, 55, 94, 0.07);
  position: relative;
  overflow: hidden;
}

.family-member-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 16px;
  bottom: 16px;
  width: 6px;
  border-radius: 999px;
  background: var(--member-color);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--member-color) 18%, transparent);
}

.family-member-avatar-frame {
  display: grid;
  place-items: center;
  min-width: 0;
}

.family-member-avatar {
  width: 88px;
  height: 88px;
  border: 4px solid rgba(255, 255, 255, 0.96);
  outline: 3px solid color-mix(in srgb, var(--member-color) 52%, rgba(86, 107, 138, 0.2));
}

.family-member-info {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.family-member-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.family-member-name {
  font-weight: 900;
  font-size: 1.08rem;
  color: #1f3551;
  min-width: 0;
  word-break: break-word;
}

.family-member-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: #60748b;
  font-size: 0.84rem;
  font-weight: 700;
}

.family-member-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(241, 246, 252, 0.92);
  border: 1px solid rgba(189, 203, 224, 0.65);
}

.family-color-chip {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 3px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 0 1px rgba(86, 107, 138, 0.22), 0 5px 12px rgba(34, 55, 94, 0.12);
  flex: 0 0 auto;
}

.family-member-aliases {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  min-height: 26px;
}

.family-member-alias-chip,
.family-member-alias-empty {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
}

.family-member-alias-chip {
  color: #314964;
  background: color-mix(in srgb, var(--member-color) 22%, white);
  border: 1px solid color-mix(in srgb, var(--member-color) 46%, rgba(189, 203, 224, 0.78));
}

.family-member-alias-empty {
  color: #72839a;
  background: rgba(244, 248, 253, 0.9);
  border: 1px dashed rgba(189, 203, 224, 0.82);
}

.family-member-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ========================================================================== 
   True member editor modal
   ========================================================================== */

.fc-modal[aria-hidden="true"] {
  display: none;
}

.fc-modal {
  position: fixed;
  inset: 0;
  z-index: 5000;
}

.fc-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 30, 48, 0.52);
  backdrop-filter: blur(5px);
}

.fc-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100vw - 36px));
  max-height: calc(100dvh - 36px);
  margin: 18px auto;
  background: #f7fbff;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 26px 78px rgba(16, 27, 44, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.72);
}

.fc-modal__dialog--member-editor {
  width: min(1060px, calc(100vw - 32px));
}

.fc-modal__dialog--photo-crop {
  width: min(1160px, calc(100vw - 32px));
}

.fc-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border-bottom: 1px solid rgba(189, 203, 224, 0.55);
  background: rgba(255, 255, 255, 0.9);
}

.family-member-modal__header {
  background:
    radial-gradient(circle at top left, rgba(122, 162, 255, 0.16), transparent 36%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(242, 247, 255, 0.94));
}

.fc-modal__title-wrap {
  min-width: 0;
}

.fc-modal__title,
.fc-modal__header h3 {
  margin: 0;
  color: #1f3551;
  font-size: clamp(1.35rem, 1.3vw, 1.8rem);
  line-height: 1.05;
}

.fc-modal__subtitle {
  margin: 5px 0 0;
  color: #657894;
  font-weight: 650;
}

.fc-modal__close {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: rgba(241, 246, 253, 0.92);
  color: #314763;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.fc-modal__body {
  padding: 20px;
}

.family-member-editor {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 20px;
  align-items: stretch;
  overflow: auto;
  max-height: calc(100dvh - 130px);
}

.family-member-editor__preview {
  min-width: 0;
}

.member-preview-card {
  position: sticky;
  top: 0;
  display: grid;
  gap: 13px;
  justify-items: center;
  text-align: center;
  padding: 22px 18px;
  border-radius: 26px;
  background:
    radial-gradient(circle at center 30%, color-mix(in srgb, var(--member-color, #7aa2f7) 20%, transparent), transparent 38%),
    rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(189, 203, 224, 0.7);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 12px 26px rgba(34, 55, 94, 0.08);
}

.member-preview-glow {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: #7aa2f7;
  box-shadow: 0 0 0 5px rgba(122, 162, 247, 0.14);
}

.member-preview-avatar {
  --member-color: #7aa2f7;
  width: 142px;
  height: 142px;
  border: 5px solid #fff;
  outline: 4px solid color-mix(in srgb, var(--member-color) 54%, rgba(86, 107, 138, 0.2));
}

.member-preview-card h3 {
  margin: 4px 0 0;
  color: #1f3551;
  font-size: 1.35rem;
  line-height: 1.1;
}

.member-preview-aliases {
  min-height: 34px;
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

.member-preview-aliases span,
.member-preview-aliases em {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(241, 246, 253, 0.92);
  color: #52667f;
  font-size: 0.8rem;
  font-weight: 800;
  font-style: normal;
}

.member-preview-note {
  margin: -4px 0 0;
  color: #6c7f98;
  font-size: 0.86rem;
}

.family-member-editor__fields {
  min-width: 0;
  display: grid;
  gap: 16px;
  align-content: start;
}

.member-color-control {
  display: grid;
  grid-template-columns: 74px 140px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.member-color-control input[type="color"] {
  inline-size: 74px;
  min-height: 48px;
  padding: 4px;
  cursor: pointer;
}

.member-color-control input[type="text"] {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.member-color-example {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #60748b;
  font-size: 0.86rem;
  line-height: 1.25;
}

.member-color-swatch-static {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 3px solid #fff;
  box-shadow: 0 0 0 1px rgba(86, 107, 138, 0.25), 0 5px 12px rgba(34, 55, 94, 0.12);
  flex: 0 0 auto;
}

.alias-editor-panel {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(245, 249, 255, 0.92));
  border: 1px solid rgba(189, 203, 224, 0.74);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.alias-editor-panel__head h3 {
  margin: 0;
  color: #203650;
}

.alias-editor-panel__head p {
  margin: 5px 0 0;
  color: #60748b;
  line-height: 1.35;
}

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

.alias-chip-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  min-height: 38px;
  align-items: center;
}

.alias-chip,
.alias-chip-empty {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 850;
}

.alias-chip {
  border: 1px solid rgba(151, 174, 205, 0.82);
  background: #fff;
  color: #314964;
  cursor: pointer;
  box-shadow: 0 5px 12px rgba(34, 55, 94, 0.05);
}

.alias-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(100, 143, 210, 0.88);
}

.alias-chip strong {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  color: #fff;
  background: #7890aa;
  line-height: 1;
}

.alias-chip-empty {
  color: #6a7f98;
  border: 1px dashed rgba(177, 195, 222, 0.86);
  background: rgba(255, 255, 255, 0.62);
}

.family-member-editor__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 4px;
}

.family-member-editor__spacer {
  flex: 1 1 auto;
}

/* ========================================================================== 
   Photo crop modal
   ========================================================================== */

.photo-crop-modal {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 20px;
  align-items: start;
  overflow: auto;
  max-height: calc(100dvh - 130px);
}

.photo-crop-stage-wrap {
  width: 100%;
  height: min(70dvh, 620px);
  border-radius: 22px;
  overflow: hidden;
  background: #eaf1f8;
  border: 1px solid rgba(189, 203, 224, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.photo-crop-stage-wrap img {
  display: block;
  max-width: 100%;
}

.photo-crop-modal__right {
  display: grid;
  gap: 16px;
}

.photo-crop-preview-block {
  display: grid;
  gap: 10px;
}

.photo-crop-preview-label {
  font-weight: 800;
  color: #35506f;
}

.photo-crop-preview {
  width: 160px;
  height: 160px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(189, 203, 224, 0.8);
  box-shadow: 0 8px 22px rgba(34, 55, 94, 0.08);
}

/* ========================================================================== 
   Responsive admin layout
   ========================================================================== */

@media (max-width: 920px) {
  .family-profile-manager,
  .family-member-editor,
  .photo-crop-modal {
    grid-template-columns: 1fr;
  }

  .family-profile-manager__left {
    justify-content: flex-start;
  }

  .member-preview-card {
    position: relative;
  }

  .shape-oval {
    width: 160px !important;
    height: 110px !important;
  }
}

@media (max-width: 640px) {
  .admin-page .app-shell,
  .admin-app-shell {
    width: min(96vw, 1560px);
    padding-top: 12px;
  }

  .admin-action-stack,
  .admin-actions,
  .family-member-actions,
  .family-member-editor__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-action-stack .btn,
  .admin-action-stack .btn-soft,
  .admin-actions .btn,
  .family-member-actions .btn,
  .family-member-editor__actions .btn {
    width: 100%;
  }

  .family-member-card {
    grid-template-columns: 76px minmax(0, 1fr);
    padding: 12px;
    border-radius: 18px;
  }

  .family-member-avatar {
    width: 70px;
    height: 70px;
  }

  .member-color-control,
  .alias-input-row {
    grid-template-columns: 1fr;
  }

  .member-color-control input[type="color"] {
    width: 100%;
  }

  .fc-modal__dialog {
    width: calc(100vw - 18px);
    max-height: calc(100dvh - 18px);
    margin: 9px auto;
    border-radius: 22px;
  }

  .fc-modal__header,
  .fc-modal__body {
    padding: 16px;
  }

  .family-member-editor,
  .photo-crop-modal {
    max-height: calc(100dvh - 110px);
  }
}

/* ========================================================================== 
   Quick Links Admin
   ========================================================================== */

.admin-card--quicklinks .card__body {
  background: linear-gradient(180deg, rgba(248, 242, 255, 0.98) 0%, rgba(240, 247, 255, 0.98) 100%);
}

.admin-card-header--quicklinks {
  background: linear-gradient(180deg, rgba(234, 224, 255, 0.98) 0%, rgba(218, 235, 255, 0.98) 100%);
}

.quicklinks-admin-hint {
  margin-bottom: 16px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(189, 203, 224, 0.78);
  box-shadow: 0 8px 20px rgba(34, 55, 94, 0.05);
  color: #28415f;
  line-height: 1.35;
}

.quick-links-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
  gap: 14px;
  align-items: stretch;
}

.quick-link-tile {
  min-width: 0;
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  text-align: center;
  text-decoration: none;
  padding: 10px 8px;
  border-radius: 18px;
  border: 1px solid rgba(192, 204, 226, 0.85);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 10px 24px rgba(41, 58, 95, 0.08);
  color: #31445f;
  cursor: pointer;
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    border-color 0.16s ease,
    opacity 0.16s ease;
}

.quick-link-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(41, 58, 95, 0.13);
  border-color: rgba(122, 162, 255, 0.75);
}

.quick-link-tile.is-disabled {
  opacity: 0.55;
}

.quick-link-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  font-size: 24px;
  line-height: 1;
  background: rgba(255, 255, 255, 0.82);
  color: #31445f;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.75), 0 6px 14px rgba(34,55,94,0.08);
  overflow: hidden;
}

.quick-link-icon img,
.quicklink-icon-choice__image img {
  display: block;
  width: 72%;
  height: 72%;
  object-fit: contain;
}

.quick-link-label {
  display: block;
  max-width: 100%;
  font-size: 0.9rem;
  line-height: 1.06;
  font-weight: 800;
  color: #31445f;
  overflow-wrap: anywhere;
}

.quick-link-admin-url {
  max-width: 100%;
  font-size: 0.72rem;
  line-height: 1.15;
  color: #64748b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fc-modal__dialog--quicklink-editor {
  width: min(1040px, calc(100vw - 34px));
  max-height: calc(100dvh - 34px);
  margin: 17px auto;
  background: #f7fbff;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 28px 80px rgba(16, 27, 44, 0.30);
}

.quicklink-modal__header {
  background: linear-gradient(180deg, rgba(255,255,255,0.94) 0%, rgba(241,247,255,0.94) 100%);
}

.quicklink-editor {
  display: grid;
  grid-template-columns: 285px minmax(0, 1fr);
  gap: 22px;
  max-height: calc(100dvh - 130px);
  overflow: auto;
}

.quicklink-editor__preview {
  min-width: 0;
}

.quicklink-preview-card {
  position: sticky;
  top: 0;
  display: grid;
  gap: 14px;
  justify-items: center;
  padding: 18px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(235,244,255,0.92));
  border: 1px solid rgba(189, 203, 224, 0.72);
  box-shadow: 0 14px 30px rgba(34,55,94,0.08);
}

.quicklink-preview-card__tile {
  width: min(190px, 100%);
  aspect-ratio: 1 / 1;
  border-radius: 24px;
}

.quicklink-preview-card__tile .quick-link-icon {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  font-size: 34px;
}

.quicklink-preview-card__tile .quick-link-label {
  font-size: 1.05rem;
}

.quicklink-preview-card__url {
  width: 100%;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,0.8);
  border: 1px solid rgba(189,203,224,0.65);
  color: #516780;
  font-size: 0.82rem;
  text-align: center;
  overflow-wrap: anywhere;
}

.quicklink-preview-card__note {
  margin: 0;
  color: #60758f;
  font-size: 0.86rem;
  line-height: 1.35;
  text-align: center;
}

.quicklink-editor__fields {
  min-width: 0;
  display: grid;
  gap: 16px;
}

.quicklink-enabled-field {
  align-content: start;
}

.quicklink-toggle-row {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,0.78);
  border: 1px solid rgba(189,203,224,0.72);
  color: #35506f;
  font-weight: 700;
}

.quicklink-toggle-row input {
  width: 18px;
  height: 18px;
  accent-color: #7aa2ff;
}

.quicklink-icon-panel {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 22px;
  background: rgba(255,255,255,0.76);
  border: 1px solid rgba(189,203,224,0.72);
  box-shadow: 0 10px 24px rgba(34,55,94,0.05);
}

.quicklink-icon-panel__head h3 {
  margin: 0;
  color: #1f3551;
  font-size: 1.05rem;
}

.quicklink-icon-panel__head p {
  margin: 5px 0 0;
  color: #60758f;
  font-size: 0.9rem;
  line-height: 1.35;
}

.quicklink-icon-panel__head code {
  padding: 1px 5px;
  border-radius: 6px;
  background: rgba(215,226,242,0.7);
}

.quicklink-icon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 10px;
  max-height: 310px;
  overflow: auto;
  padding-right: 4px;
}

.quicklink-icon-choice {
  display: grid;
  justify-items: center;
  gap: 7px;
  padding: 10px 8px;
  border-radius: 16px;
  background: rgba(255,255,255,0.78);
  border: 1px solid rgba(189,203,224,0.7);
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.quicklink-icon-choice:hover,
.quicklink-icon-choice.is-selected {
  transform: translateY(-1px);
  border-color: rgba(122,162,255,0.9);
  box-shadow: 0 10px 20px rgba(34,55,94,0.08);
}

.quicklink-icon-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.quicklink-icon-choice__image {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(248,251,255,0.95);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.85), 0 4px 12px rgba(34,55,94,0.06);
  font-size: 22px;
  overflow: hidden;
}

.quicklink-icon-choice__label {
  max-width: 100%;
  color: #31445f;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
  overflow-wrap: anywhere;
}

.quicklink-editor__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 4px;
}

.quicklink-editor__spacer {
  flex: 1 1 auto;
}

@media (max-width: 860px) {
  .quicklink-editor {
    grid-template-columns: 1fr;
  }

  .quicklink-preview-card {
    position: static;
  }
}

@media (max-width: 640px) {
  .quick-links-admin-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quicklink-editor__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .quicklink-editor__actions .btn {
    width: 100%;
  }
}
