.dashboard-body {
  padding: 20px 0 28px;
}

.dashboard-shell {
  width: min(1540px, calc(100% - 26px));
  margin: 0 auto;
}

.dashboard-topbar {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
  padding: 28px;
}

.dashboard-topbar-copy {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr) 380px;
  gap: 18px;
  align-items: start;
}

.dashboard-column {
  display: grid;
  gap: 18px;
}

.dashboard-rail,
.dashboard-editor,
.dashboard-actions {
  padding: 20px;
}

.dashboard-card-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 600;
}

.dashboard-subcopy {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.profile-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.profile-list-item {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(230, 195, 144, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.profile-list-item.is-active {
  border-color: rgba(240, 204, 151, 0.42);
  background:
    linear-gradient(160deg, rgba(255, 226, 185, 0.12), rgba(255, 255, 255, 0.025)),
    rgba(255, 255, 255, 0.03);
}

.profile-list-name {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

.profile-list-role {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.editor-form,
.editor-block,
.action-stack {
  display: grid;
  gap: 18px;
}

.editor-form {
  margin-top: 18px;
}

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

.editor-grid.single {
  grid-template-columns: 1fr;
}

.editor-block {
  padding: 18px;
  border: 1px solid rgba(230, 195, 144, 0.1);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.02);
}

.editor-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.editor-block-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.social-editor-list {
  display: grid;
  gap: 12px;
}

.social-editor-row {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(230, 195, 144, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.02);
}

.social-editor-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.social-editor-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 12px;
  border-radius: 14px;
  background: rgba(255, 214, 156, 0.12);
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.social-editor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}

.social-empty {
  padding: 18px;
  border: 1px dashed rgba(230, 195, 144, 0.16);
  border-radius: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.upload-feedback {
  --upload-progress: 0%;
  margin-top: 12px;
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid rgba(230, 195, 144, 0.12);
  border-radius: 18px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)),
    rgba(255, 255, 255, 0.02);
}

.upload-feedback[hidden] {
  display: none !important;
}

.upload-feedback.is-idle {
  opacity: 0.92;
}

.upload-feedback.is-active {
  box-shadow: 0 0 0 1px rgba(240, 201, 140, 0.06);
}

.upload-feedback.is-complete {
  border-color: rgba(126, 213, 164, 0.22);
  box-shadow: 0 0 0 1px rgba(126, 213, 164, 0.08);
  animation: uploadFeedbackPop 0.34s cubic-bezier(0.22, 1, 0.36, 1);
}

.upload-feedback.is-error {
  border-color: rgba(240, 135, 123, 0.22);
  box-shadow: 0 0 0 1px rgba(240, 135, 123, 0.08);
  animation: uploadFeedbackShake 0.38s ease;
}

.upload-feedback-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.upload-feedback-kicker,
.upload-feedback-name,
.upload-feedback-meta,
.upload-feedback-copy {
  margin: 0;
}

.upload-feedback-kicker {
  color: var(--gold);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.upload-feedback-name {
  margin-top: 4px;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.upload-feedback-state {
  min-width: 72px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(230, 195, 144, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: var(--gold);
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.upload-feedback.is-idle .upload-feedback-state {
  color: var(--muted);
}

.upload-feedback.is-active .upload-feedback-state {
  animation: uploadStatePulse 1.2s ease-in-out infinite;
}

.upload-feedback.is-complete .upload-feedback-state {
  color: var(--success);
  border-color: rgba(126, 213, 164, 0.2);
  background: rgba(126, 213, 164, 0.08);
}

.upload-feedback.is-error .upload-feedback-state {
  color: var(--danger);
  border-color: rgba(240, 135, 123, 0.2);
  background: rgba(240, 135, 123, 0.08);
}

.upload-feedback-bar {
  position: relative;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
}

.upload-feedback-bar > span {
  position: relative;
  display: block;
  width: var(--upload-progress);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(240, 201, 140, 0.6), rgba(240, 201, 140, 1));
  box-shadow: 0 0 18px rgba(240, 201, 140, 0.22);
  transition: width 0.28s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.2s ease;
}

.upload-feedback.is-idle .upload-feedback-bar > span {
  background: linear-gradient(90deg, rgba(203, 189, 167, 0.35), rgba(203, 189, 167, 0.6));
  box-shadow: none;
}

.upload-feedback.is-active .upload-feedback-bar > span::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.46), transparent);
  transform: translateX(-100%);
  animation: uploadBarShimmer 1.25s linear infinite;
}

.upload-feedback.is-complete .upload-feedback-bar > span {
  background: linear-gradient(90deg, rgba(126, 213, 164, 0.7), rgba(126, 213, 164, 1));
  box-shadow: 0 0 18px rgba(126, 213, 164, 0.22);
}

.upload-feedback.is-error .upload-feedback-bar > span {
  background: linear-gradient(90deg, rgba(240, 135, 123, 0.74), rgba(240, 135, 123, 1));
  box-shadow: 0 0 18px rgba(240, 135, 123, 0.18);
}

.upload-feedback-meta {
  color: var(--muted);
  font-size: 12px;
}

.upload-feedback-copy {
  color: var(--text);
  font-size: 13px;
  line-height: 1.6;
}

.action-block {
  padding: 18px;
  border: 1px solid rgba(230, 195, 144, 0.1);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.02);
}

.action-grid {
  display: grid;
  gap: 12px;
}

.preview-shell {
  display: grid;
  gap: 16px;
}

.preview-phone {
  overflow: hidden;
  border: 1px solid var(--stroke);
  border-radius: 32px;
  background:
    radial-gradient(circle at top center, rgba(255, 218, 163, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent),
    rgba(20, 15, 11, 0.96);
  box-shadow: var(--shadow-md);
}

.preview-screen {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.preview-hero,
.preview-mini-card {
  padding: 18px;
  border: 1px solid rgba(230, 195, 144, 0.1);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.03);
}

.preview-identity {
  display: flex;
  align-items: center;
  gap: 14px;
}

.preview-portrait {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  object-position: center top;
  margin-bottom: 16px;
  border-radius: 20px;
  border: 1px solid rgba(230, 195, 144, 0.1);
  background: rgba(255, 255, 255, 0.02);
}

.preview-avatar {
  width: 60px;
  height: 60px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 221, 170, 0.12);
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
}

.preview-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 600;
  line-height: 0.95;
}

.preview-role,
.preview-company,
.preview-small,
.preview-warranty-copy {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.preview-role {
  color: var(--gold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.preview-chip-row,
.preview-social-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.preview-chip,
.preview-social-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(230, 195, 144, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-size: 12px;
}

.preview-social-pill strong {
  color: var(--gold);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.preview-warranty-media {
  display: grid;
  place-items: center;
  overflow: hidden;
  margin-top: 14px;
  border-radius: 18px;
  border: 1px solid rgba(230, 195, 144, 0.1);
  background: transparent;
}

.preview-warranty-media img {
  display: block;
  width: 100%;
  object-fit: contain;
  aspect-ratio: 4 / 3;
  background: transparent;
}

.btn:disabled {
  opacity: 0.62;
  cursor: not-allowed;
  transform: none;
}

.btn:disabled:hover {
  transform: none;
  border-color: var(--stroke-strong);
}

body.nfc-dialog-open {
  overflow: hidden;
}

.nfc-write-dialog {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(7, 5, 4, 0.58);
  backdrop-filter: blur(12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.nfc-write-dialog.is-open {
  opacity: 1;
  pointer-events: auto;
}

.nfc-write-panel {
  width: min(460px, 100%);
  padding: 22px;
  display: grid;
  gap: 18px;
  transform: translateY(22px) scale(0.96);
  opacity: 0;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.28s ease;
}

.nfc-write-dialog.is-open .nfc-write-panel {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.nfc-write-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.nfc-write-close {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(230, 195, 144, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.nfc-write-close:hover {
  transform: translateY(-1px);
  border-color: rgba(240, 204, 151, 0.4);
}

.nfc-write-close svg {
  width: 18px;
  height: 18px;
  display: block;
  margin: 0 auto;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
}

.nfc-write-visual {
  position: relative;
  min-height: 194px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(230, 195, 144, 0.1);
  border-radius: 24px;
  background:
    radial-gradient(circle at 50% 28%, rgba(255, 222, 174, 0.18), transparent 34%),
    radial-gradient(circle at 50% 100%, rgba(240, 201, 140, 0.08), transparent 46%),
    rgba(255, 255, 255, 0.025);
}

.nfc-write-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 34%),
    radial-gradient(circle at 50% 40%, rgba(255, 255, 255, 0.06), transparent 44%);
  pointer-events: none;
}

.nfc-visual {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.2s ease, transform 0.24s ease;
}

.nfc-write-dialog.is-writing .nfc-visual-writing,
.nfc-write-dialog.is-success .nfc-visual-success,
.nfc-write-dialog.is-error .nfc-visual-error {
  opacity: 1;
  transform: scale(1);
}

.nfc-wave {
  position: absolute;
  width: 72px;
  height: 72px;
  border: 2px solid rgba(240, 201, 140, 0.46);
  border-radius: 24px;
  opacity: 0;
}

.nfc-wave-1 {
  animation: nfcWavePulse 1.8s ease-out infinite;
}

.nfc-wave-2 {
  animation: nfcWavePulse 1.8s ease-out 0.28s infinite;
}

.nfc-wave-3 {
  animation: nfcWavePulse 1.8s ease-out 0.56s infinite;
}

.nfc-chip {
  position: relative;
  width: 84px;
  height: 108px;
  border-radius: 24px;
  border: 1px solid rgba(240, 204, 151, 0.28);
  background:
    linear-gradient(160deg, rgba(255, 232, 200, 0.26), rgba(255, 255, 255, 0.05)),
    rgba(220, 164, 95, 0.12);
  box-shadow:
    0 22px 50px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
  animation: nfcChipFloat 1.7s ease-in-out infinite;
}

.nfc-chip::before {
  content: "";
  position: absolute;
  inset: 18px;
  border-radius: 16px;
  border: 1px solid rgba(240, 204, 151, 0.32);
  background: rgba(18, 14, 11, 0.18);
}

.nfc-chip-line {
  position: absolute;
  left: 28px;
  right: 28px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 233, 204, 0.2), rgba(255, 233, 204, 0.88), rgba(255, 233, 204, 0.2));
  z-index: 1;
}

.nfc-chip-line-a {
  top: 34px;
}

.nfc-chip-line-b {
  top: 46px;
}

.nfc-chip-line-c {
  top: 58px;
}

.nfc-chip-line-d {
  top: 70px;
}

.nfc-result-ring {
  position: absolute;
  width: 116px;
  height: 116px;
  border-radius: 50%;
  border: 2px solid rgba(126, 213, 164, 0.28);
  box-shadow: 0 0 0 12px rgba(126, 213, 164, 0.06);
  animation: nfcResultRing 0.72s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.nfc-result-ring-error {
  border-color: rgba(240, 135, 123, 0.3);
  box-shadow: 0 0 0 12px rgba(240, 135, 123, 0.06);
}

.nfc-result-icon {
  width: 72px;
  height: 72px;
  fill: none;
  stroke-width: 4.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  animation: nfcResultPop 0.42s cubic-bezier(0.22, 1, 0.36, 1) 0.08s both;
}

.nfc-write-dialog.is-success .nfc-result-icon {
  stroke: var(--success);
}

.nfc-write-dialog.is-error .nfc-result-icon {
  stroke: var(--danger);
  animation-name: nfcErrorPop;
}

.nfc-write-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(30px, 5vw, 42px);
  font-weight: 600;
  line-height: 0.94;
}

.nfc-write-message {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.nfc-write-url-block {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid rgba(230, 195, 144, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
}

.nfc-write-url-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.nfc-write-url {
  color: var(--text);
  font-size: 12px;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.nfc-write-actions {
  display: flex;
  justify-content: flex-end;
}

.nfc-write-action {
  min-width: 138px;
}

@keyframes nfcWavePulse {
  0% {
    transform: scale(0.76);
    opacity: 0;
  }
  18% {
    opacity: 0.72;
  }
  100% {
    transform: scale(2.25);
    opacity: 0;
  }
}

@keyframes nfcChipFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

@keyframes nfcResultRing {
  0% {
    transform: scale(0.64);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes nfcResultPop {
  0% {
    transform: scale(0.6);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes nfcErrorPop {
  0% {
    transform: scale(0.76);
    opacity: 0;
  }
  35% {
    transform: translateX(-6px) scale(1.04);
    opacity: 1;
  }
  60% {
    transform: translateX(6px) scale(1.02);
  }
  100% {
    transform: translateX(0) scale(1);
    opacity: 1;
  }
}

@keyframes uploadStatePulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.04);
  }
}

@keyframes uploadBarShimmer {
  100% {
    transform: translateX(100%);
  }
}

@keyframes uploadFeedbackPop {
  0% {
    transform: scale(0.98);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes uploadFeedbackShake {
  0%,
  100% {
    transform: translateX(0);
  }
  30% {
    transform: translateX(-4px);
  }
  60% {
    transform: translateX(4px);
  }
}

@media (max-width: 1220px) {
  .dashboard-grid {
    grid-template-columns: 280px minmax(0, 1fr);
  }

  .dashboard-column.actions-column {
    grid-column: 1 / -1;
  }
}

@media (max-width: 920px) {
  .dashboard-body {
    padding: 12px 0 24px;
  }

  .dashboard-shell {
    width: min(100%, calc(100% - 18px));
  }

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

  .dashboard-topbar-copy {
    display: grid;
  }

  .editor-grid,
  .social-editor-grid {
    grid-template-columns: 1fr;
  }

  .nfc-write-panel {
    padding: 18px;
  }

  .nfc-write-visual {
    min-height: 174px;
  }
}
