:root {
  --bg: #f3f6fb;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --text: #142033;
  --muted: #5d6b82;
  --line: #d9e1ec;
  --primary: #1d4ed8;
  --primary-dark: #163ea9;
  --primary-soft: #e7efff;
  --success: #18794e;
  --danger: #b42318;
  --shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
  --radius-lg: 0;
  --radius-md: 0;
  --radius-sm: 0;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top, rgba(29, 78, 216, 0.08), transparent 28%),
    linear-gradient(180deg, #f7f9fc 0%, #edf2f8 100%);
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
  border: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

.hidden {
  display: none !important;
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 64px;
}

.hero,
.page-hero {
  padding: 8px 0 12px;
}

.topbar,
.internal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(217, 225, 236, 0.9);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.public-topbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
}

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

.brand strong,
.hero h1,
.section-heading h2,
.hero-card h2,
.hero-brand-name,
.creator-copy h3,
.feature-card h3,
.news-card h3,
.account-card h3,
.panel-card h3 {
  margin: 0;
  color: var(--text);
  font-family: "Bebas Neue", sans-serif;
  letter-spacing: 0.03em;
}

.brand p,
.hero-text,
.feature-card p,
.account-card p,
.section-badge,
.feedback,
.message-list p,
.detail-list dd,
.creator-copy p,
.panel-card p {
  color: var(--muted);
}

.site-logo {
  width: 72px;
  height: 72px;
  display: block;
  flex: 0 0 auto;
  object-fit: contain;
}

.site-menu {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--surface-soft);
}

.menu-link {
  padding: 10px 14px;
  border-radius: 0;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
  transition: 0.2s ease;
}

.menu-link:hover,
.menu-link.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
}

.topbar-actions,
.hero-cta,
.card-title-row,
.dashboard-header,
.section-heading.split,
.header-account-tools,
.profile-photo-inline,
.profile-photo-inline-form,
.profile-photo-card {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-actions,
.hero-cta,
.card-title-row,
.dashboard-header,
.section-heading.split {
  justify-content: space-between;
}

.profile-photo-card,
.profile-photo-inline-form {
  flex-wrap: wrap;
}

.page-hero-content,
.dashboard {
  margin-top: 24px;
}

.hero-content {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.75fr);
  gap: 20px;
  margin-top: 20px;
  align-items: stretch;
}

.hero-card-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.account-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.panel-card,
.account-card,
.hero-card,
.modal-card {
  border-radius: var(--radius-md);
  padding: 22px;
  background: var(--surface);
}

.modal-card {
  width: 520px;
  max-width: 100%;
}

.cards-grid {
  display: grid;
  gap: 18px;
}

.hero-card-grid,
.panel-grid,
.account-grid {
  margin-top: 24px;
}

.dashboard-header,
.panel-card h3 {
  font-size: 1rem;
}

.profile-photo-card,
.profile-photo-inline {
  flex-direction: column;
  align-items: flex-start;
}

.stack-form button,
.primary-button,
.secondary-button {
  width: auto;
  min-width: 140px;
}

@media (max-width: 960px) {
  .page-shell {
    width: min(100%, calc(100% - 24px));
    padding: 16px 0 48px;
  }

  .topbar,
  .internal-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .public-topbar {
    grid-template-columns: 1fr;
  }

  .site-menu {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .site-menu .menu-link {
    flex: 1;
    text-align: center;
    border-left: none;
  }

  .topbar-actions,
  .hero-cta,
  .card-title-row,
  .dashboard-header,
  .section-heading.split {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-content {
    grid-template-columns: 1fr;
  }

  .hero-card-grid,
  .panel-grid,
  .account-grid {
    grid-template-columns: 1fr;
  }

  .panel-card {
    padding: 18px;
  }

  .modal-card {
    padding: 20px;
  }

  .stack-form button,
  .primary-button,
  .secondary-button {
    width: 100%;
  }

  .site-media-input,
  .profile-photo-form {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .hero-card-grid,
  .panel-grid,
  .account-grid {
    gap: 12px;
  }

  .hero-card h2,
  .panel-card h3,
  .account-card h3 {
    font-size: 1.25rem;
  }

  .site-menu .menu-link {
    font-size: 0.85rem;
  }

  .dashboard-header,
  .hero-cta,
  .card-title-row {
    gap: 8px;
  }

  .hero-card {
    padding: 16px;
  }

  .topbar,
  .internal-header {
    padding: 12px;
  }
}

.hero-card-grid-four {
  align-items: stretch;
}

.hero-copy,
.hero-card,
.feature-card,
.news-card,
.account-card,
.panel-card,
.stat-card,
.page-hero-copy,
.creator-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.hero-copy,
.page-hero-copy,
.feature-card,
.news-card,
.account-card,
.panel-card,
.stat-card {
  padding: 24px;
}

.featured-banner {
  display: grid;
  grid-template-columns: minmax(220px, 0.95fr) minmax(0, 1.05fr);
  gap: 20px;
  align-items: stretch;
}

.featured-banner-media,
.creator-photo-wrap {
  overflow: hidden;
  border-radius: var(--radius-md);
}

.featured-banner-image,
.creator-photo,
.hero-card-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.featured-banner-image {
  min-height: 260px;
}

.featured-banner-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
}

.hero h1 {
  font-size: clamp(2.4rem, 4vw, 4rem);
  line-height: 1;
}

.hero-text {
  margin: 0;
  max-width: 640px;
  font-size: 1rem;
  line-height: 1.7;
}

.hero-card {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: linear-gradient(180deg, #fefefe 0%, #f7faff 100%);
}

.square-hero-card {
  min-height: 0;
  padding: 0;
  overflow: hidden;
}

.square-hero-card-brand {
  padding: 18px;
}

.square-hero-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
}

.square-hero-copy {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.square-brand-row {
  min-height: 100%;
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 18px;
  align-items: center;
}

.square-brand-logo {
  width: 100%;
  max-width: 120px;
  height: auto;
  display: block;
  object-fit: contain;
}

.hero-card-image {
  height: 150px;
  border-radius: var(--radius-md);
}

.hero-card h2 {
  font-size: 2rem;
  line-height: 1;
}

.eyebrow {
  margin: 0;
  color: var(--primary);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.pill,
.section-badge,
.message-counter,
.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 8px 12px;
  border-radius: 0;
  font-size: 0.82rem;
  font-weight: 700;
}

.pill,
.section-badge,
.message-counter {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.event-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
  color: var(--muted);
}

.primary-button,
.secondary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 0;
  font-weight: 700;
  transition: 0.2s ease;
}

.primary-button {
  background: var(--primary);
  color: #ffffff;
}

.primary-button:hover {
  background: var(--primary-dark);
}

.secondary-button {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line);
}

.secondary-button:hover,
.ghost-button:hover {
  border-color: #bfd0ea;
  background: #f8fbff;
}

.ghost-button {
  background: transparent;
  color: var(--text);
}

.section {
  margin-top: 28px;
}

.section-heading h2 {
  font-size: clamp(2rem, 3vw, 3rem);
}

.feature-grid,
.news-grid,
.account-grid,
.stats-grid,
.panel-grid,
.showcase-grid,
.contact-layout {
  display: grid;
  gap: 20px;
}

.feature-grid,
.news-grid,
.account-grid,
.showcase-grid,
.contact-layout {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

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

.panel-grid,
.admin-layout {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.95fr);
}

.admin-layout {
  display: grid;
  gap: 20px;
  margin-top: 20px;
}

.admin-forms {
  display: grid;
  gap: 20px;
}

.feature-card,
.account-card,
.news-card,
.panel-card,
.stat-card {
  height: 100%;
}

.news-card,
.message-item {
  display: grid;
  gap: 12px;
}

.feature-card h3,
.news-card h3,
.account-card h3,
.panel-card h3 {
  font-size: 1.7rem;
}

.news-card time {
  color: var(--primary-dark);
  font-weight: 700;
}

.tag-row,
.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.news-tag {
  padding: 7px 10px;
  border-radius: 0;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.account-card code {
  display: inline-block;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  word-break: break-word;
}

.creator-card {
  display: grid;
  grid-template-columns: minmax(240px, 0.4fr) minmax(0, 1fr);
  overflow: hidden;
}

.creator-copy {
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
}

.creator-copy h3 {
  font-size: clamp(2rem, 3vw, 3rem);
}

.internal-shell {
  padding-top: 28px;
}

.stat-card {
  display: grid;
  gap: 8px;
}

.stat-card span {
  color: var(--muted);
  font-size: 0.92rem;
}

.stat-card strong {
  font-size: 1.8rem;
}

.detail-list {
  margin: 0;
  display: grid;
  gap: 14px;
}

.detail-list div {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.detail-list div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.detail-list dt {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.detail-list dd {
  margin: 0;
  color: var(--text);
  font-weight: 700;
}

.message-item {
  padding: 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--surface-soft);
}

.message-item time {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

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

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  text-align: left;
}

th {
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.status-active {
  background: #e8f7ef;
  color: var(--success);
}

.status-inactive {
  background: #fff1f1;
  color: var(--danger);
}

.action-button {
  min-height: 38px;
  padding: 0 12px;
  border-radius: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 700;
}

.action-button.warn {
  color: var(--danger);
}

.action-button.ok {
  color: var(--success);
}

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

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

.stack-form label {
  display: grid;
  gap: 8px;
  font-weight: 700;
}

.panel-intro,
.field-hint {
  margin: 0 0 14px;
  color: var(--muted);
}

.field-hint {
  font-size: 0.92rem;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.checkbox-row {
  display: flex !important;
  align-items: center;
  gap: 10px;
}

.checkbox-row input {
  width: auto;
}

.stack-form input,
.stack-form textarea,
.stack-form select {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.stack-form textarea {
  min-height: 120px;
  resize: vertical;
}

.stack-form input:focus,
.stack-form textarea:focus,
.stack-form select:focus {
  outline: none;
  border-color: #94b6ff;
  box-shadow: 0 0 0 4px rgba(29, 78, 216, 0.12);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.38);
}

.modal-card {
  width: min(480px, 100%);
  padding: 28px;
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: transparent;
  color: var(--muted);
  font-size: 1.8rem;
}

.feedback {
  min-height: 22px;
  margin: 0;
}

.empty-state {
  padding: 18px;
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  color: var(--muted);
}

.profile-photo,
.table-profile-photo {
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--surface-soft);
}

.profile-photo {
  width: 88px;
  height: 88px;
}

.profile-photo-large {
  width: 132px;
  height: 132px;
}

.table-profile-photo {
  width: 56px;
  height: 56px;
  display: block;
}

.table-profile-photo-placeholder,
.profile-photo-placeholder {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 700;
}

.profile-photo-form {
  min-width: min(320px, 100%);
}

.admin-home-preview {
  min-height: 420px;
}

@media (max-width: 1080px) {
  .public-topbar {
    grid-template-columns: 1fr;
  }

  .topbar,
  .internal-header,
  .dashboard-header,
  .section-heading.split,
  .topbar-actions,
  .hero-cta,
  .header-account-tools,
  .profile-photo-inline,
  .profile-photo-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-menu {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    border-radius: var(--radius-md);
  }

  .hero-content,
  .featured-banner,
  .form-grid-two,
  .feature-grid,
  .news-grid,
  .account-grid,
  .showcase-grid,
  .contact-layout,
  .stats-grid,
  .admin-stats,
  .panel-grid,
  .admin-layout,
  .creator-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 20px, 100%);
    padding-top: 12px;
  }

  .hero-copy,
  .page-hero-copy,
  .feature-card,
  .news-card,
  .account-card,
  .panel-card,
  .stat-card,
  .modal-card,
  .creator-copy {
    padding: 20px;
  }

  .site-logo {
    width: 60px;
    height: 60px;
  }

  .featured-banner-image,
  .hero-card-image {
    min-height: 180px;
    height: 180px;
  }

  .hero h1 {
    font-size: 2rem;
  }
}
