:root {
  --bg: #f7f3ef;
  --bg-accent: #f0e6dc;
  --text: #1f1d1a;
  --muted: #5d564f;
  --accent: #d76a4a;
  --accent-dark: #b44a2f;
  --header: #6a35c8;
  --header-dark: #562ba2;
  --card: #ffffff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Montserrat", "Trebuchet MS", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at top left, #fff7ef 10%, transparent 45%),
    linear-gradient(135deg, var(--bg) 0%, var(--bg-accent) 100%);
  min-height: 100vh;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 20px 6vw;
  background: linear-gradient(135deg, var(--header), var(--header-dark));
  color: #fff;
  box-shadow: 0 10px 24px -18px rgba(0, 0, 0, 0.45);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo img {
  width: 120px;
  height: auto;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.logo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.help-sticky {
  position: fixed;
  right: 22px;
  bottom: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 40;
}

.help-item {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.help-chip {
  border-radius: 999px;
  border: 1px solid rgba(106, 53, 200, 0.18);
  background: rgba(255, 255, 255, 0.96);
  color: #4a328a;
  font-size: 12px;
  font-weight: 700;
  padding: 10px 14px;
  box-shadow: 0 14px 30px -20px rgba(31, 29, 26, 0.55);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.help-chip:hover,
.help-chip:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 18px 30px -18px rgba(31, 29, 26, 0.6);
}

.help-panel {
  display: none;
  width: min(520px, 92vw);
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(106, 53, 200, 0.14);
  border-radius: 18px;
  padding: 24px 26px;
  box-shadow: 0 20px 50px -30px rgba(31, 29, 26, 0.6);
  position: relative;
}

.help-panel.is-open {
  display: block;
  animation: help-fade 180ms ease;
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 80;
}

.help-panel-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.help-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(106, 53, 200, 0.16);
  background: rgba(255, 255, 255, 0.9);
  color: #4a328a;
  font-size: 18px;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.help-close:hover,
.help-close:focus-visible {
  box-shadow: 0 10px 20px rgba(106, 53, 200, 0.18);
}

.help-panel-list {
  margin: 0;
  padding: 0 0 0 18px;
  color: #4d4d5a;
  font-size: 13px;
}

@keyframes help-fade {
  from {
    opacity: 0;
    transform: translate(-50%, -48%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

.site-nav {
  display: flex;
  align-items: baseline;
  gap: 24px;
  font-weight: 600;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.site-nav a {
  color: #fff;
  text-decoration: none;
  position: relative;
  padding-bottom: 4px;
}

.auth-menu {
  position: relative;
}

.auth-link {
  border: none;
  background: #fff;
  color: var(--header);
  font: inherit;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.7);
}

.auth-link::after {
  display: none;
}

.auth-name {
  font-weight: 700;
}

.auth-link:hover,
.auth-link:focus-visible {
  background: #f5f0ff;
}

.auth-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  background: #1f1d1a;
  color: #fff;
  border-radius: 14px;
  padding: 8px;
  min-width: 220px;
  display: grid;
  box-shadow: 0 18px 36px -20px rgba(0, 0, 0, 0.7);
  z-index: 20;
  transform-origin: top right;
  transform: translateY(-12px) scale(0.96);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 220ms ease;
}

.auth-dropdown.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.auth-dropdown-item {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.auth-dropdown-item:hover,
.auth-dropdown-item:focus-visible {
  background: rgba(255, 255, 255, 0.12);
}

.confirm-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 60;
}

.confirm-modal.is-open {
  display: flex;
}

.confirm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(23, 18, 44, 0.55);
  backdrop-filter: blur(4px);
}

.confirm-dialog {
  position: relative;
  z-index: 1;
  width: min(400px, 90vw);
  background: rgba(255, 255, 255, 0.98);
  border-radius: 22px;
  padding: 24px;
  box-shadow: 0 30px 60px -30px rgba(31, 29, 26, 0.65);
  border: 1px solid rgba(106, 53, 200, 0.08);
  display: grid;
  gap: 12px;
}

.confirm-dialog h3 {
  margin: 0;
  font-size: 18px;
}

.confirm-dialog p {
  margin: 0;
  color: var(--muted);
}

.confirm-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: #fff;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 200ms ease;
}

.site-nav a:hover::after,
.site-nav a:focus::after {
  transform: scaleX(1);
}

.auth-dropdown-item::after {
  display: none;
}

.hero {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6vw 48px;
}

.hero-content {
  max-width: 720px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.eyebrow {
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
}

.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(30px, 4.5vw, 46px);
  line-height: 1.05;
}

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

.tool-link {
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

.tool-link.ghost {
  border: 1px solid rgba(106, 53, 200, 0.45);
  padding: 12px 20px;
  background: linear-gradient(135deg, #7b46ea, #5b2bbf);
  color: #fff;
  cursor: pointer;
  position: relative;
  transition: border 150ms ease, transform 150ms ease, box-shadow 150ms ease;
  box-shadow: 0 12px 18px -16px rgba(75, 36, 160, 0.9);
}

.tool-link.ghost:hover,
.tool-link.ghost:focus-visible {
  border-color: rgba(255, 255, 255, 0.6);
  transform: translateY(-1px);
  box-shadow: 0 18px 24px -16px rgba(75, 36, 160, 0.9);
}

.tool-link.ghost:disabled,
.tool-link.ghost[disabled] {
  background: linear-gradient(135deg, #b8a6e6, #a28bdc);
  border-color: rgba(106, 53, 200, 0.2);
  color: rgba(255, 255, 255, 0.8);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  opacity: 0.8;
}


.tool-content {
  display: block;
  width: min(1000px, 100%);
  margin: 0 auto;
}

.toolbar-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(106, 53, 200, 0.12);
  border-radius: 18px;
  padding: 14px 18px;
  box-shadow: 0 18px 40px -28px rgba(31, 29, 26, 0.45);
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 18px auto 22px;
  width: min(1000px, 100%);
}

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

.toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.imports-card {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(106, 53, 200, 0.12);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 18px 40px -30px rgba(31, 29, 26, 0.45);
}

.imports-header {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 14px;
}

.imports-note {
  margin: -6px 0 14px;
  font-size: 14px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  text-align: center;
}

.tool-error {
  margin: 0 0 12px;
  color: #b23b3b;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  min-height: 16px;
}

.badge-new {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: #ff8b2c;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 8px 18px rgba(255, 139, 44, 0.35);
}

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

.photo-slot-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.photo-slot {
  border-radius: 16px;
  border: 2px dashed rgba(106, 53, 200, 0.35);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.65), rgba(246, 242, 255, 0.5));
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 8px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.photo-slot-item.is-processed .photo-slot {
  border-style: solid;
  border-color: #6a35c8;
  box-shadow: 0 10px 24px rgba(106, 53, 200, 0.22);
}

.photo-slot:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(106, 53, 200, 0.16);
}

.photo-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
  border-radius: 12px;
}

.photo-slot.has-image img {
  display: block;
}

.slot-actions {
  display: none;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.photo-slot-item.has-image .slot-actions {
  display: flex;
}

.slot-action {
  border-radius: 999px;
  border: 1px solid rgba(106, 53, 200, 0.16);
  background: rgba(255, 255, 255, 0.85);
  color: rgba(74, 50, 138, 0.8);
  font-size: 11px;
  font-weight: 600;
  padding: 6px 10px 6px 9px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  max-width: 100%;
}

.slot-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(106, 53, 200, 0.18);
}

.slot-action::before {
  content: "";
  width: 12px;
  height: 12px;
  display: inline-block;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  opacity: 0.75;
}

.slot-action.remove::before {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236a35c8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M3 6h18'/><path d='M8 6V4h8v2'/><path d='M7 6l1 14h8l1-14'/></svg>");
}

.slot-action.replace::before {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236a35c8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M3 12a9 9 0 0 1 15-6'/><path d='M21 3v6h-6'/><path d='M21 12a9 9 0 0 1-15 6'/></svg>");
}

.slot-action:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.slot-plus {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(106, 53, 200, 0.35);
  background: rgba(255, 255, 255, 0.8);
  color: rgba(106, 53, 200, 0.8);
  font-size: 28px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tool-panel h2 {
  margin: 0;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
}

.tool-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin: 28px 0 48px;
}

.progress {
  width: min(760px, 100%);
  margin: 0 auto 42px;
  text-align: center;
  display: none;
}

.progress-warning {
  margin: 0 0 6px;
  font-size: 14px;
}

.progress-fraction {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 8px;
}

.progress.is-active {
  display: block;
}

.progress-track {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(106, 53, 200, 0.15);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(106, 53, 200, 0.2);
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #6a35c8, #8e5bff);
  border-radius: 999px;
  transition: width 300ms ease;
}

.progress-steps {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 14px 0 10px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.progress-steps span {
  opacity: 0.5;
  transition: opacity 200ms ease, color 200ms ease;
}

.progress-steps span.is-active {
  opacity: 1;
  color: var(--header);
  font-weight: 700;
}

.progress-note {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

.cta {
  border: none;
  background: var(--accent);
  color: #fff;
  padding: 14px 32px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 16px 24px -18px rgba(215, 106, 74, 0.9);
  transition: transform 150ms ease, box-shadow 150ms ease,
    background 150ms ease;
}

.cta:hover,
.cta:focus-visible {
  transform: translateY(-2px);
  background: var(--accent-dark);
  box-shadow: 0 20px 28px -18px rgba(180, 74, 47, 0.9);
}

.file-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.is-hidden {
  display: none !important;
}

.upload-empty {
  background: #fff7f0;
  border: 1px solid #f0d9c6;
  border-radius: 18px;
  padding: 22px 28px;
  box-shadow: 0 10px 28px rgba(238, 152, 74, 0.12);
  display: flex;
  flex-direction: row;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  margin: 16px 0 24px;
}

.upload-empty p {
  margin: 0;
  max-width: 520px;
  font-weight: 700;
}

.upload-empty .cta {
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(239, 142, 52, 0.28);
}

.upload-empty .cta::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0) 20%, rgba(255, 255, 255, 0.7) 45%, rgba(255, 255, 255, 0) 70%);
  transform: translateX(-120%);
  opacity: 0.7;
  pointer-events: none;
  mix-blend-mode: screen;
  animation: cta-bright 2.4s ease-in-out infinite;
}

@keyframes cta-bright {
  0% {
    transform: translateX(-120%);
  }
  50% {
    transform: translateX(120%);
  }
  100% {
    transform: translateX(120%);
  }
}

.preview-frame {
  width: 100%;
  border-radius: 18px;
  border: 2px dashed rgba(106, 53, 200, 0.35);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.65), rgba(246, 242, 255, 0.5));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  gap: 12px;
  flex-direction: column;
  padding: 24px;
  min-height: 220px;
}

.preview-thumb {
  width: 180px;
  min-height: 140px;
  padding: 12px;
}

.preview-placeholder {
  color: var(--muted);
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.preview-cta {
  padding: 12px 28px;
}

.preview-frame img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: none;
}

.preview-frame.has-image img {
  display: block;
}

.preview-frame.has-image .preview-placeholder {
  display: none;
}

.preview-frame.has-image .preview-cta {
  display: none;
}

.result-link {
  display: none;
}

.tool-actions.has-result .result-link {
  display: inline-flex;
}

.auth-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 50;
}

.auth-modal.is-open {
  display: flex;
}

.auth-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(23, 18, 44, 0.55);
  backdrop-filter: blur(4px);
}

.auth-dialog {
  position: relative;
  z-index: 1;
  width: min(440px, 92vw);
  background: #fff;
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 30px 60px -30px rgba(31, 29, 26, 0.65);
  display: grid;
  gap: 18px;
}

.auth-close {
  position: absolute;
  top: 10px;
  right: 12px;
  border: none;
  background: transparent;
  font-size: 24px;
  cursor: pointer;
  color: var(--muted);
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #f3eefb;
  border-radius: 999px;
  padding: 4px;
  gap: 4px;
}

.auth-tab {
  border: none;
  background: transparent;
  padding: 10px;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
  color: var(--muted);
}

.auth-tab.is-active {
  background: #fff;
  color: var(--header);
  box-shadow: 0 12px 20px -16px rgba(90, 60, 160, 0.8);
}

.auth-panel {
  display: none;
  gap: 14px;
}

.auth-panel.is-active {
  display: grid;
}

.auth-panel h3 {
  margin: 0 0 -6px;
}

.auth-error {
  margin: 0;
  font-size: 13px;
  color: #b12424;
  font-weight: 600;
  min-height: 18px;
}

.auth-success {
  margin: 0;
  font-size: 13px;
  color: #2b7a4b;
  font-weight: 600;
  min-height: 18px;
}

.auth-field {
  display: grid;
  gap: 6px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 700;
}

.auth-field input {
  border: 1px solid rgba(31, 29, 26, 0.15);
  border-radius: 12px;
  padding: 12px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.auth-note {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.account {
  padding: 32px 6vw 80px;
}

.account-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.account-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.account-badges {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.account-badge {
  background: #fff;
  border-radius: 16px;
  padding: 12px 16px;
  box-shadow: 0 18px 30px -24px rgba(31, 29, 26, 0.5);
  display: grid;
  gap: 4px;
  min-width: 140px;
}

.account-badge span {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}

.account-badge strong {
  font-size: 18px;
  font-weight: 700;
}

.account-sections {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.account-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.account-tab {
  border: none;
  background: #fff;
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
  padding: 10px 16px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 14px 24px -20px rgba(31, 29, 26, 0.4);
}

.account-tab.is-active {
  background: linear-gradient(135deg, var(--header), var(--header-dark));
  color: #fff;
}

.account-panel {
  display: none;
}

.account-panel.is-active {
  display: block;
}

.photo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--header), var(--header-dark));
  color: #fff;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.photo-link.ghost {
  background: #fff;
  color: var(--header);
  border: 1px solid rgba(106, 53, 200, 0.4);
}

.photo-thumb {
  display: inline-flex;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(106, 53, 200, 0.18);
  box-shadow: 0 10px 22px -16px rgba(31, 29, 26, 0.5);
}

.photo-thumb img {
  width: 90px;
  height: 60px;
  object-fit: cover;
  display: block;
}
.subscription-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(31, 29, 26, 0.06);
  box-shadow: 0 22px 44px -32px rgba(31, 29, 26, 0.45);
  border-radius: 22px;
  padding: 24px;
}

.subscription-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.subscription-header .card-label {
  font-weight: 700;
  font-size: 22px;
}

.subscription-plan {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--header);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.subscription-card.is-active .subscription-plan::before {
  content: "Plus";
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(106, 53, 200, 0.12);
  color: var(--header);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.subscription-pill {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  background: rgba(31, 29, 26, 0.08);
  color: var(--muted);
}

.subscription-pill.is-active {
  background: rgba(50, 160, 90, 0.15);
  color: #2b7a4b;
}

.subscription-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
}


.subscription-details span {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 6px;
}

.subscription-details strong {
  font-size: 16px;
}

.subscribe-cta {
  align-self: center;
  background: linear-gradient(135deg, var(--header), var(--header-dark));
  box-shadow: 0 16px 24px -18px rgba(75, 36, 160, 0.9);
}

.subscribe-cta:hover,
.subscribe-cta:focus-visible {
  background: linear-gradient(135deg, var(--header-dark), var(--header));
  box-shadow: 0 20px 28px -18px rgba(75, 36, 160, 0.9);
}

.header-subscribe {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid #fff;
  background: transparent;
  color: #fff;
  box-shadow: none;
}

.header-subscribe:hover,
.header-subscribe:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  box-shadow: none;
}

.header-credits {
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.subscribe {
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding: 32px 6vw 80px;
  align-items: center;
}

.subscribe-hero {
  max-width: 680px;
  text-align: center;
}

.subscribe-grid {
  width: min(1100px, 100%);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}

.subscribe-card {
  width: 100%;
  background: #fff;
  border-radius: 24px;
  padding: 28px;
  box-shadow: 0 28px 50px -32px rgba(31, 29, 26, 0.5);
  border: 1px solid rgba(31, 29, 26, 0.08);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.subscribe-card .subscribe-cta {
  margin-top: auto;
  padding-left: 40px;
  padding-right: 40px;
}

.subscribe-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
}

.subscribe-header > div:first-child {
  flex: 1;
}

.card-label {
  display: flex;
  justify-content: center;
}

.subscribe-header > div:first-child {
  align-items: center;
  text-align: center;
  display: flex;
  flex-direction: column;
}

.subscribe-header h2 {
  margin: 6px 0 0;
  font-size: 36px;
}

.plan-name {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.plan-name.plus {
  background: rgba(255, 139, 44, 0.12);
  color: #d7681a;
}

.plan-name.pro {
  background: rgba(106, 53, 200, 0.12);
  color: #5a2fc2;
}

.plan-name.enterprise {
  background: rgba(29, 140, 99, 0.12);
  color: #1a7a55;
}

.subscribe-badge {
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: #6a35c8;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.subscribe-features {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
  color: var(--text);
  font-size: 14px;
}

.subscribe-features li {
  list-style: none;
  position: relative;
  padding-left: 18px;
}

.subscribe-features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(106, 53, 200, 0.7);
  box-shadow: 0 4px 12px rgba(106, 53, 200, 0.35);
}

.account-section-header h3 {
  margin: 0 0 6px;
}

.account-form {
  display: grid;
  gap: 12px;
}

.profile-meta {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 14px;
}

.profile-meta strong {
  color: var(--text);
}

.account-header h2 {
  margin: 0 0 12px;
  font-size: clamp(26px, 3vw, 40px);
}

.account-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.admin {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 24px 6vw 72px;
}

.admin-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.admin-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.admin-actions input {
  border: 1px solid rgba(31, 29, 26, 0.15);
  border-radius: 999px;
  padding: 12px 16px;
  font-size: 14px;
  min-width: 220px;
}

.admin-tabs {
  display: inline-flex;
  gap: 8px;
  background: #f3eefb;
  border-radius: 999px;
  padding: 6px;
  align-self: flex-start;
}

.admin-tab {
  border: none;
  background: transparent;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
  color: var(--muted);
}

.admin-tab.is-active {
  background: #fff;
  color: var(--header);
  box-shadow: 0 12px 20px -16px rgba(90, 60, 160, 0.8);
}

.admin-panel {
  display: none;
  flex-direction: column;
  gap: 24px;
}

.admin-panel.is-active {
  display: flex;
}

.admin-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.admin-card {
  background: var(--card);
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 24px 40px -30px rgba(31, 29, 26, 0.5);
}

.admin-table {
  background: var(--card);
  border-radius: 22px;
  padding: 20px;
  box-shadow: 0 24px 40px -30px rgba(31, 29, 26, 0.5);
}

.admin-tools {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.admin-form {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.admin-form input {
  border: 1px solid rgba(31, 29, 26, 0.15);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14px;
}

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

.admin-table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  text-align: left;
  padding: 12px 8px;
  border-bottom: 1px solid rgba(31, 29, 26, 0.08);
}

td {
  white-space: nowrap;
}

th {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 11px;
  color: var(--muted);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.status.ok {
  background: rgba(50, 160, 90, 0.12);
  color: #2b7a4b;
}

.status.pending {
  background: rgba(215, 106, 74, 0.12);
  color: var(--accent-dark);
}

@media (max-width: 700px) {
  .admin-actions {
    width: 100%;
  }

  .admin-actions input {
    flex: 1;
  }
}

@media (max-width: 900px) {
  .site-header {
    padding: 18px 6vw;
  }
}

@media (max-width: 700px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-nav {
    width: 100%;
    justify-content: flex-start;
    gap: 16px;
    flex-wrap: wrap;
  }
  .hero-content {
    text-align: left;
    align-items: flex-start;
  }
  .tool-content {
    width: 100%;
  }
  .photo-slots {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .tool-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 500px) {
  .cta {
    width: 100%;
    text-align: center;
  }
}
