@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,600;700&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  --portal-ink: #18382f;
  --portal-muted: #66756c;
  --portal-green: #1f6b4f;
  --portal-green-deep: #14392f;
  --portal-gold: #d6a846;
  --portal-cream: #f8f3e8;
  --portal-card: rgba(255, 255, 255, 0.92);
  --portal-line: rgba(24, 56, 47, 0.12);
  --portal-shadow: 0 26px 70px rgba(32, 48, 41, 0.1);
}

* {
  box-sizing: border-box;
}

body.portal-page {
  margin: 0;
  min-height: 100vh;
  font-family: 'Manrope', 'Segoe UI', sans-serif;
  color: var(--portal-ink);
  background:
    radial-gradient(circle at top left, rgba(214, 168, 70, 0.17), transparent 26%),
    radial-gradient(circle at top right, rgba(31, 107, 79, 0.14), transparent 24%),
    linear-gradient(180deg, #f7f2e7 0%, #f3ede1 100%);
}

.portal-shell {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.portal-stack {
  display: grid;
  gap: 24px;
}

.portal-panel {
  border: 1px solid var(--portal-line);
  background: var(--portal-card);
  border-radius: 30px;
  box-shadow: var(--portal-shadow);
  backdrop-filter: blur(10px);
}

.portal-header {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px;
}

.portal-brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--portal-line);
  background: rgba(255, 255, 255, 0.88);
  border-radius: 28px;
  padding: 10px 14px;
  width: fit-content;
}

.portal-brand-mark {
  width: 96px;
  height: 64px;
  border-radius: 18px;
  background: #fff;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 24px rgba(24, 56, 47, 0.08);
}

.portal-brand-mark img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.portal-brand-copy {
  display: grid;
  gap: 3px;
}

.portal-brand-title {
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.portal-brand-subtitle {
  font-size: 0.82rem;
  color: var(--portal-muted);
}

.portal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.portal-button,
.portal-button-secondary {
  appearance: none;
  border: none;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 14px 20px;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.portal-button {
  background: linear-gradient(135deg, var(--portal-green), #2f8461);
  color: white;
  box-shadow: 0 18px 36px rgba(31, 107, 79, 0.22);
}

.portal-button:hover,
.portal-button:focus-visible {
  transform: translateY(-1px);
}

.portal-button:disabled {
  opacity: 0.7;
  cursor: wait;
  transform: none;
}

.portal-button-secondary {
  background: white;
  color: var(--portal-ink);
  border: 1px solid var(--portal-line);
}

.portal-login {
  display: grid;
  gap: 22px;
  padding: 22px;
}

.portal-login-simple {
  max-width: 540px;
  margin: 0 auto;
}

.portal-login-header {
  display: flex;
  justify-content: center;
}

.portal-login-heading {
  margin-bottom: 16px;
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.9rem;
  line-height: 1.02;
  letter-spacing: -0.03em;
  text-align: center;
}

.portal-hero {
  display: grid;
  gap: 12px;
}

.portal-eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--portal-line);
  background: rgba(255, 255, 255, 0.84);
  color: var(--portal-green);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.portal-title {
  margin: 0;
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(1.9rem, 4.7vw, 3.4rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
  max-width: 11ch;
}

.portal-copy {
  margin: 0;
  font-size: 1rem;
  line-height: 1.75;
  color: var(--portal-muted);
  max-width: 40rem;
}

.portal-form {
  display: grid;
  gap: 14px;
}

.portal-login-form-wrap {
  width: 100%;
}

.portal-login-simple .portal-login-form-wrap {
  max-width: 420px;
  margin: 0 auto;
}

.portal-field {
  display: grid;
  gap: 8px;
}

.portal-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--portal-ink);
}

.portal-input {
  width: 100%;
  border: 1px solid rgba(24, 56, 47, 0.14);
  border-radius: 18px;
  padding: 15px 16px;
  font: inherit;
  color: var(--portal-ink);
  background: rgba(255, 255, 255, 0.92);
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.portal-input:focus {
  border-color: rgba(31, 107, 79, 0.45);
  box-shadow: 0 0 0 4px rgba(31, 107, 79, 0.08);
}

.portal-help {
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--portal-muted);
}

.portal-message {
  min-height: 1.2rem;
  font-size: 0.92rem;
  font-weight: 600;
}

.portal-message.error {
  color: #c2410c;
}

.portal-message.success {
  color: var(--portal-green);
}

.portal-dashboard {
  display: grid;
  gap: 22px;
}

.portal-topbar {
  display: flex;
  flex-direction: column;
  gap: 14px;
  justify-content: space-between;
}

.portal-account {
  display: grid;
  gap: 6px;
}

.portal-account-label {
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--portal-green);
}

.portal-account-email {
  font-size: 0.98rem;
  color: var(--portal-muted);
}

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

.portal-stat-card {
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--portal-line);
}

.portal-stat-label {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--portal-muted);
}

.portal-stat-value {
  margin-top: 10px;
  font-size: clamp(1.3rem, 4vw, 2rem);
  font-weight: 800;
  line-height: 1;
}

.portal-stat-meta {
  margin-top: 8px;
  font-size: 0.86rem;
  color: var(--portal-muted);
}

.portal-venues {
  display: grid;
  gap: 16px;
}

.portal-venue-card {
  padding: 20px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--portal-line);
  display: grid;
  gap: 18px;
}

.portal-venue-head {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.portal-venue-meta {
  display: grid;
  gap: 6px;
}

.portal-venue-name {
  margin: 0;
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.7rem;
  line-height: 1.02;
}

.portal-venue-location {
  color: var(--portal-muted);
  font-size: 0.96rem;
}

.portal-link {
  color: var(--portal-green);
  font-weight: 700;
  text-decoration: none;
}

.portal-link:hover {
  text-decoration: underline;
}

.portal-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.portal-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(31, 107, 79, 0.08);
  color: var(--portal-green-deep);
  font-size: 0.78rem;
  font-weight: 800;
}

.portal-venue-thumbnail {
  width: 100%;
  max-width: 180px;
  aspect-ratio: 4 / 3;
  border-radius: 20px;
  object-fit: cover;
  border: 1px solid var(--portal-line);
}

.portal-section-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--portal-muted);
}

.portal-note {
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--portal-muted);
}

.portal-photo-manager {
  display: grid;
  gap: 16px;
  padding-top: 4px;
}

.portal-photo-manager-head {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.portal-photo-manager-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.portal-inline-button,
.portal-inline-button-secondary {
  appearance: none;
  border: none;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 11px 14px;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.portal-inline-button {
  background: linear-gradient(135deg, var(--portal-green), #2f8461);
  color: white;
  box-shadow: 0 16px 34px rgba(31, 107, 79, 0.18);
}

.portal-inline-button-secondary {
  background: white;
  color: var(--portal-ink);
  border: 1px solid var(--portal-line);
}

.portal-inline-button:hover,
.portal-inline-button-secondary:hover,
.portal-inline-button:focus-visible,
.portal-inline-button-secondary:focus-visible {
  transform: translateY(-1px);
}

.portal-inline-button:disabled,
.portal-inline-button-secondary:disabled {
  opacity: 0.7;
  cursor: wait;
  transform: none;
}

.portal-inline-message {
  font-size: 0.86rem;
  font-weight: 600;
}

.portal-inline-message.error {
  color: #c2410c;
}

.portal-inline-message.success {
  color: var(--portal-green);
}

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

.portal-photo-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 20px;
  border: 1px solid var(--portal-line);
  background: rgba(255, 255, 255, 0.88);
}

.portal-photo-card.is-hidden {
  background: rgba(246, 240, 232, 0.92);
}

.portal-photo-thumb-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  aspect-ratio: 1 / 1;
  background: #efe6d6;
}

.portal-photo-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.portal-photo-hidden-chip {
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(20, 57, 47, 0.82);
  color: white;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.portal-photo-meta {
  display: grid;
  gap: 8px;
}

.portal-photo-date {
  font-size: 0.84rem;
  color: var(--portal-muted);
}

.portal-photo-status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.portal-photo-status.visible {
  background: rgba(31, 107, 79, 0.1);
  color: var(--portal-green-deep);
}

.portal-photo-status.hidden {
  background: rgba(203, 90, 70, 0.12);
  color: #a43d2a;
}

.portal-photo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.portal-empty {
  padding: 22px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px dashed rgba(24, 56, 47, 0.18);
  color: var(--portal-muted);
}

.portal-loading {
  padding: 28px 22px;
  text-align: center;
  color: var(--portal-muted);
}

@media (min-width: 720px) {
  .portal-shell {
    padding-top: 34px;
  }

  .portal-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .portal-login {
    padding: 28px;
  }

  .portal-topbar,
  .portal-venue-head {
    flex-direction: row;
    align-items: flex-start;
  }

  .portal-photo-manager-head {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .portal-stat-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .portal-venue-metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .portal-photo-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 980px) {
  .portal-login {
    grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
    align-items: center;
    gap: 32px;
  }

  .portal-login-form-wrap {
    padding-left: 10px;
  }

  .portal-login-simple {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .portal-login-simple .portal-login-form-wrap {
    padding-left: 0;
  }
}
