@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600;700&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@500&display=swap');

:root {
  --bg: #ffffff;
  --surface: #fafafa;
  --fg: #1a1a2e;
  --fg-muted: #666680;
  --fg-dim: #9999aa;
  --border: #e8e8f0;
  --gold: #c9a84c;
  --gold-light: #e8d9a0;
  --gold-dim: rgba(201,168,76,0.08);
  --gold-glow: rgba(201,168,76,0.15);
  --mono: 'JetBrains Mono', 'SF Mono', monospace;
  --display: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Inter', system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  min-height: 100vh;
}

/* ── Animations ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 var(--gold-glow); }
  50% { box-shadow: 0 0 20px 4px var(--gold-glow); }
}

/* ── Header ── */
.hero {
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 0;
}
.hero-divider {
  width: calc(100% - 48px);
  max-width: 520px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  background-size: 200% 100%;
  margin-top: 8px;
  animation: shimmer 4s ease-in-out infinite;
}
.logo {
  width: 180px;
  height: auto;
  display: block;
  animation: fadeUp 0.8s ease-out;
}

/* ── Content ── */
.content {
  max-width: 480px;
  margin: 0 auto;
  padding: 32px 20px 48px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.section-title {
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--fg);
  text-align: center;
  letter-spacing: 0.02em;
  animation: fadeUp 0.6s ease-out both;
}

/* ── Ornamental divider ── */
.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 4px 0;
  animation: fadeUp 0.7s ease-out both;
}
.ornament-line {
  width: 48px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-light));
}
.ornament-line:last-child {
  background: linear-gradient(90deg, var(--gold-light), transparent);
}
.ornament-diamond {
  width: 6px;
  height: 6px;
  background: var(--gold);
  transform: rotate(45deg);
  flex-shrink: 0;
}

/* ── Card ── */
.card-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  animation: fadeUp 0.8s ease-out both;
  transition: box-shadow 0.3s ease;
}
.card-block:hover {
  box-shadow: 0 4px 24px var(--gold-glow);
}
.field {
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
}
.field:hover {
  background: var(--gold-dim);
}
.field:last-child { border-bottom: none; }
.field-label {
  font-size: 0.6875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg-dim);
}
.field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.field-value {
  font-family: var(--mono);
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--fg);
  letter-spacing: 0.03em;
  word-break: break-word;
  min-width: 0;
  font-variant-numeric: tabular-nums;
}
.field-value.name-value {
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.copy-btn {
  flex-shrink: 0;
  background: var(--gold-dim);
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--gold);
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 6px 14px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
  white-space: nowrap;
}
.copy-btn:hover { border-color: var(--gold); transform: scale(1.04); }
.copy-btn:active { transform: scale(0.97); }
.copy-btn.copied { background: var(--gold); color: #fff; }

/* ── Licenses ── */
.licenses-section {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 20px 48px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  animation: fadeUp 1s ease-out both;
}
.license-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: box-shadow 0.3s ease, border-color 0.3s;
}
.license-card:hover {
  border-color: var(--gold-light);
  box-shadow: 0 2px 16px var(--gold-glow);
}
.license-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
  cursor: pointer;
  user-select: none;
  gap: 12px;
}
.license-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--gold-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.license-icon svg {
  width: 18px;
  height: 18px;
  stroke: var(--gold);
  fill: none;
  stroke-width: 1.5;
}
.license-info {
  flex: 1;
  min-width: 0;
}
.license-name {
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--fg);
  line-height: 1.3;
}
.license-number {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--fg-dim);
  letter-spacing: 0.03em;
  margin-top: 2px;
}
.license-chevron {
  width: 20px;
  height: 20px;
  stroke: var(--fg-dim);
  fill: none;
  stroke-width: 1.5;
  transition: transform 0.3s ease;
  flex-shrink: 0;
}
.license-card.open .license-chevron {
  transform: rotate(180deg);
}
.license-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}
.license-card.open .license-body {
  max-height: 600px;
}
.license-content {
  padding: 0 22px 20px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}
.license-content p {
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--fg-muted);
  margin-bottom: 10px;
}
.license-content p:last-child { margin-bottom: 0; }
.license-meta {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.license-meta-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.license-meta-label {
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg-dim);
}
.license-meta-value {
  font-family: var(--mono);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--fg);
}
.license-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(42,96,65,0.08);
  color: #2a6041;
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 6px;
  letter-spacing: 0.03em;
}
.license-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  background: #2a6041;
  border-radius: 50%;
  animation: pulseGlow 2s ease-in-out infinite;
}

/* ── Footer ── */
.footer {
  text-align: center;
  padding: 32px 20px 40px;
  border-top: 1px solid var(--border);
  max-width: 480px;
  margin: 0 auto;
}
.footer-logo {
  width: 48px;
  height: auto;
  opacity: 0.4;
  margin-bottom: 12px;
}
.footer-text {
  font-size: 0.75rem;
  color: var(--fg-dim);
  line-height: 1.6;
  letter-spacing: 0.02em;
}
.footer-text a {
  color: var(--gold);
  text-decoration: none;
}

/* ── Partners ── */
.partners_wrapper {
  display: flex;
  width: 100%;
  justify-content: center;
  align-items: center;
  padding: 24px 20px;
  gap: 20px;
  flex-wrap: wrap;
}
.partners_logo {
  max-width: 120px;
  height: auto;
  opacity: 0.6;
  transition: opacity 0.3s;
  filter: grayscale(30%);
}
.partners_logo:hover {
  opacity: 1;
  filter: grayscale(0%);
}
.micrologo {
  width: 18px;
}

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: #2a6041;
  color: #a0e8c0;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 10px;
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  pointer-events: none;
  z-index: 10;
}
.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--fg-dim);
  font-size: 0.875rem;
}

/* ── Admin page ── */
.admin-container {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  padding: 32px;
}
.page-title {
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 600;
  text-align: center;
  margin: 0 0 24px;
  color: var(--fg);
}
.gold-line {
  width: 60px;
  height: 1px;
  margin: 0 auto 24px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.login-card input {
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 500;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--fg);
  outline: none;
  transition: border-color 0.15s;
}
.login-card input:focus { border-color: var(--gold); }
.login-error {
  color: #c44;
  font-size: 0.8125rem;
  text-align: center;
  display: none;
}
.login-btn, .btn-save {
  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 12px;
  border: none;
  border-radius: 10px;
  background: var(--gold);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}
.login-btn:hover, .btn-save:hover { background: var(--gold-light); transform: scale(1.02); }
.login-btn:active, .btn-save:active { transform: scale(0.98); }
.btn-save:disabled { opacity: 0.4; cursor: default; transform: none; }

.admin-card {
  display: none;
  flex-direction: column;
  gap: 16px;
}
.admin-card.active { display: flex; }

.current-data {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}
.cur-field {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cur-field:last-child { border-bottom: none; }
.cur-label {
  font-size: 0.6875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg-dim);
}
.cur-value {
  font-family: var(--mono);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--fg);
}
.cur-value.name-val {
  font-family: var(--display);
  font-size: 1.1rem;
  font-weight: 600;
}

.edit-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}
.form-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}
.form-field:last-of-type { border-bottom: none; }
.form-field label {
  font-size: 0.6875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-dim);
}
.form-field input {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 500;
  padding: 8px 0;
  border: none;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  color: var(--fg);
  outline: none;
  transition: border-color 0.15s;
}
.form-field input:focus { border-color: var(--gold); }
.form-actions {
  padding: 14px 20px;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.logout-btn {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--fg-dim);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  align-self: flex-end;
}
.logout-btn:hover { color: #c44; border-color: #c44; }

@media (max-width: 480px) {
  .logo { width: 140px; }
  .hero-divider { width: calc(100% - 48px); }
  .license-meta { gap: 12px; }
}
