:root {
  --purple: #6d55a3;
  --purple-dark: #49346f;
  --teal: #20a9ae;
  --teal-dark: #147b82;
  --gold: #f6c64e;
  --cream: #fff8ed;
  --ink: #252233;
  --muted: #665f75;
  --line: #ece5f5;
  --white: #ffffff;
  --shadow: 0 14px 35px rgba(70, 52, 111, .12);
  --radius: 22px;
  --max: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at top left, #fff4dc 0, transparent 28rem), var(--cream);
  line-height: 1.6;
}
img { max-width: 100%; height: auto; }
a { color: var(--teal-dark); }
a:hover { color: var(--purple-dark); }
.container { width: min(var(--max), calc(100% - 2rem)); margin: 0 auto; }
.skip-link { position: absolute; left: -999px; top: .5rem; background: var(--ink); color: white; padding: .5rem 1rem; z-index: 100; }
.skip-link:focus { left: .5rem; }

.site-header { background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; backdrop-filter: blur(8px); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem 0; }
.brand img { display: block; width: clamp(190px, 26vw, 330px); }
.main-nav { display: flex; align-items: center; gap: .35rem; }
.main-nav a { text-decoration: none; color: var(--purple-dark); font-weight: 700; padding: .55rem .7rem; border-radius: 999px; white-space: nowrap; }
.main-nav a:hover { background: #f3edf9; }
.nav-cta { background: var(--teal); color: white !important; }
.nav-cta:hover { background: var(--teal-dark) !important; }
.nav-toggle { display: none; background: var(--purple); color: white; border: 0; border-radius: 999px; padding: .6rem .9rem; font-weight: 700; }

.site-main { padding: 2rem 0 3rem; }
.hero { display: grid; grid-template-columns: 1.05fr .95fr; gap: 2rem; align-items: center; padding: clamp(1.25rem, 4vw, 3rem); background: linear-gradient(135deg, #fbf2ff, #eafcff); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.hero h1 { font-size: clamp(2rem, 5vw, 4.6rem); line-height: 1.03; margin: 0 0 1rem; color: var(--purple-dark); letter-spacing: -.04em; }
.hero p { font-size: clamp(1rem, 2vw, 1.25rem); color: var(--muted); margin: 0 0 1.25rem; }
.hero-actions, .button-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1rem; }
.button, button.button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; background: var(--purple); color: white; padding: .75rem 1rem; border-radius: 999px; text-decoration: none; font-weight: 800; border: 0; cursor: pointer; }
.button:hover { background: var(--purple-dark); color: white; }
.button.secondary { background: var(--gold); color: #392d0b; }
.button.secondary:hover { background: #e4b334; color: #392d0b; }
.button.light { background: white; color: var(--purple-dark); border: 1px solid var(--line); }
.hero-card { background: rgba(255,255,255,.86); padding: 1.25rem; border-radius: 20px; border: 1px solid #fff; }
.hero-card img { border-radius: 12px; }
.kicker { display: inline-flex; gap: .4rem; align-items: center; color: var(--teal-dark); background: #e7fbfb; padding: .3rem .65rem; border-radius: 999px; font-weight: 800; font-size: .9rem; margin-bottom: 1rem; }

.section { margin: 3rem 0; }
.section-header { max-width: 820px; margin-bottom: 1.25rem; }
.section-header h2, h1.page-title { color: var(--purple-dark); font-size: clamp(1.8rem, 4vw, 3rem); line-height: 1.08; margin: 0 0 .5rem; }
.section-header p { color: var(--muted); font-size: 1.08rem; margin: 0; }
.grid, .profile-grid, .badge-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.card, .profile-card, .badge-card, .content-card { background: white; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.15rem; box-shadow: var(--shadow); }
.card h3, .profile-card h3, .badge-card h3 { margin-top: 0; color: var(--purple-dark); line-height: 1.2; }
.card-icon { width: 3rem; height: 3rem; display: grid; place-items: center; border-radius: 16px; background: #f3edf9; font-size: 1.6rem; margin-bottom: .8rem; }
.profile-card { display: flex; flex-direction: column; gap: .55rem; }
.profile-card-logo { width: 120px; height: 90px; object-fit: contain; align-self: flex-start; }
.profile-meta, .muted { color: var(--muted); }
.profile-tags, .mini-badges, .badge-row { display: flex; flex-wrap: wrap; gap: .4rem; }
.tag, .badge { display: inline-flex; align-items: center; border-radius: 999px; padding: .25rem .55rem; background: #effafa; color: var(--teal-dark); border: 1px solid #cfefef; font-size: .86rem; font-weight: 700; }
.badge { background: #fff5d9; color: #7b5a08; border-color: #f4d87f; }

.filter-form { display: grid; grid-template-columns: repeat(5, 1fr); gap: .8rem; background: white; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); margin: 1.5rem 0; }
.filter-form label { display: grid; gap: .25rem; font-weight: 700; color: var(--purple-dark); }
input, select, textarea { width: 100%; border: 1px solid #d8d0e7; border-radius: 12px; padding: .7rem .75rem; font: inherit; background: white; }
textarea { min-height: 130px; resize: vertical; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.form-section { margin: 1.5rem 0; padding: 1.2rem; border: 1px solid var(--line); background: white; border-radius: var(--radius); box-shadow: var(--shadow); }
.inline-checks { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1rem; }
.checkbox-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
.checkbox-grid label, .check-label {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-weight: 700;
  cursor: pointer;
  line-height: 1.25;
}
.checkbox-grid label {
  min-height: 48px;
  padding: .7rem .75rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbf9ff;
}
.check-label {
  width: fit-content;
  max-width: 100%;
  padding: .65rem .8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fbf9ff;
}
.agreement-check { width: 100%; border-radius: 16px; align-items: flex-start; }
.checkbox-grid input, .check-label input {
  width: 1.1rem;
  height: 1.1rem;
  margin: 0;
  flex: 0 0 1.1rem;
  accent-color: var(--teal);
}
.checkbox-grid span, .check-label span { display: inline-block; }
.success, .notice { padding: 1rem; border-radius: 16px; margin: 1rem 0; }
.success { background: #e7fbef; border: 1px solid #afe2c3; }
.notice { background: #fff5d9; border: 1px solid #f4d87f; }
.error { color: #9f1d31; font-weight: 700; }

.profile-page { background: white; border-radius: var(--radius); padding: clamp(1rem, 4vw, 2rem); border-top: 8px solid var(--profile-main, var(--purple)); box-shadow: var(--shadow); }
.profile-header { display: grid; grid-template-columns: auto 1fr; gap: 1.25rem; align-items: center; border-bottom: 2px solid var(--profile-accent, var(--gold)); padding-bottom: 1rem; }
.profile-logo { max-width: 170px; max-height: 150px; object-fit: contain; }
.profile-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.profile-gallery img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 16px; border: 1px solid var(--line); }
.link-pills { display: flex; flex-wrap: wrap; gap: .6rem; }
.link-pills a { background: var(--profile-main, var(--purple)); color: white; border-radius: 999px; padding: .55rem .8rem; text-decoration: none; font-weight: 800; }
.disclaimer { background: #f8f6fb; border-left: 4px solid var(--profile-accent, var(--gold)); padding: 1rem; border-radius: 12px; margin-top: 1.5rem; }

.site-footer { background: #251f36; color: white; padding: 2.5rem 0 1.25rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr .8fr .8fr; gap: 2rem; }
.footer-logo { width: 220px; background: white; border-radius: 14px; padding: .35rem; }
.site-footer a { color: white; }
.site-footer h2 { font-size: 1rem; color: var(--gold); }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; }
.fine-print { border-top: 1px solid rgba(255,255,255,.16); margin-top: 1.5rem; padding-top: 1rem; font-size: .9rem; color: #ddd6ef; }

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; }
  .grid, .profile-grid, .badge-grid { grid-template-columns: repeat(2, 1fr); }
  .filter-form { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav-toggle { display: inline-flex; }
  .main-nav { display: none; position: absolute; left: 1rem; right: 1rem; top: 100%; background: white; border: 1px solid var(--line); border-radius: 18px; padding: .75rem; box-shadow: var(--shadow); flex-direction: column; align-items: stretch; }
  .main-nav.is-open { display: flex; }
  .main-nav a { display: block; }
}

@media (max-width: 640px) {
  .container { width: min(100% - 1rem, var(--max)); }
  .header-inner { gap: .5rem; }
  .brand img { width: 190px; }
  .hero { padding: 1rem; }
  .grid, .profile-grid, .badge-grid, .form-grid, .checkbox-grid, .profile-gallery, .footer-grid { grid-template-columns: 1fr; }
  .filter-form { grid-template-columns: 1fr; }
  .profile-header { grid-template-columns: 1fr; text-align: center; }
  .profile-logo { margin: 0 auto; }
  .hero-actions .button, .button-row .button { width: 100%; }
}

/* Admin area */
.admin-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .75rem;
    background: #fff;
    border: 1px solid #eadff8;
    border-radius: 999px;
    padding: .6rem .9rem;
    margin: 0 0 1.25rem;
    box-shadow: 0 2px 10px rgba(0,0,0,.04);
}

.admin-bar a {
    color: #5a4395;
    font-weight: 700;
    text-decoration: none;
}

.narrow-card {
    max-width: 560px;
    margin: 2rem auto;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0 2rem;
}

.stat-card {
    background: #fff;
    border: 1px solid #eadff8;
    border-radius: 16px;
    padding: 1rem;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,.04);
}

.stat-card strong {
    display: block;
    font-size: 2rem;
    color: #5a4395;
}

.stat-card span {
    color: #665f6f;
}

.admin-section {
    background: #fff;
    border: 1px solid #eadff8;
    border-radius: 18px;
    padding: 1rem;
    margin: 1.5rem 0;
}

.section-heading-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.admin-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.admin-tabs a {
    display: inline-block;
    padding: .45rem .75rem;
    border-radius: 999px;
    border: 1px solid #d9c9ef;
    text-decoration: none;
    color: #5a4395;
    font-weight: 700;
}

.admin-tabs a.active {
    background: #6d55a3;
    color: #fff;
}

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

.admin-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 740px;
}

.admin-table th,
.admin-table td {
    border-bottom: 1px solid #eee7f7;
    padding: .85rem;
    text-align: left;
    vertical-align: top;
}

.admin-table th {
    color: #4f3f68;
    background: #fbf8ff;
}

.button.small {
    padding: .45rem .7rem;
    font-size: .9rem;
}

.button.danger {
    background: #a82525;
}

.status-pill {
    display: inline-block;
    border-radius: 999px;
    padding: .25rem .55rem;
    font-size: .8rem;
    font-weight: 700;
}

.status-pill.requested {
    background: #fff2cc;
    color: #6d4c00;
}

.status-pill.approved {
    background: #dcf7e3;
    color: #176330;
}

.status-pill.denied {
    background: #ffe1e1;
    color: #7b1d1d;
}

.badge-review-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}

.badge-review-card {
    background: #fbf8ff;
    border: 1px solid #eadff8;
    border-radius: 14px;
    padding: 1rem;
}

.badge-review-card label {
    display: block;
    margin-top: .75rem;
}

.admin-image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
}

.admin-image-grid figure {
    margin: 0;
    background: #fbf8ff;
    border-radius: 12px;
    padding: .75rem;
    text-align: center;
}

.admin-image-grid img {
    max-width: 100%;
    max-height: 160px;
    object-fit: contain;
}

.danger-zone {
    margin: 2rem 0;
    padding: 1rem;
    border: 1px solid #ffd0d0;
    background: #fff6f6;
    border-radius: 14px;
}

@media (max-width: 720px) {
    .admin-bar {
        border-radius: 18px;
        align-items: flex-start;
    }

    .admin-table {
        min-width: 680px;
    }
}

/* Member accounts and admin review additions */
.auth-card {
    max-width: 520px;
    background: #ffffff;
    border: 1px solid #eadff6;
    border-radius: 18px;
    padding: 1.25rem;
    box-shadow: 0 6px 18px rgba(58, 40, 84, .08);
}

.auth-card label,
.review-actions label,
.inline-admin-form label {
    display: block;
}

.inline-admin-form {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    align-items: center;
}

.inline-admin-form select {
    min-width: 125px;
}

.inline-delete {
    margin-top: .75rem;
}

.status-pill.active,
.status-pill.approved {
    background: #e8f7ef;
    color: #17643b;
}

.status-pill.pending,
.status-pill.requested {
    background: #fff4d6;
    color: #7a5400;
}

.status-pill.suspended,
.status-pill.denied {
    background: #fde8e8;
    color: #8a1f1f;
}

.change-request-card details {
    background: #fffaf3;
    border: 1px solid #f0dfc2;
    border-radius: 14px;
    padding: 1rem;
    margin: 1rem 0;
}

.change-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: .85rem;
    margin-top: 1rem;
}

.change-preview-grid div {
    background: #ffffff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: .75rem;
    overflow-wrap: anywhere;
}

.review-actions {
    display: grid;
    gap: .75rem;
}

.review-actions textarea {
    width: 100%;
}

@media (max-width: 720px) {
    .admin-bar {
        align-items: stretch;
    }

    .inline-admin-form {
        display: grid;
    }

    .auth-card {
        max-width: none;
    }
}

.danger-check {
    border-color: #f4b8b8 !important;
    background: #fff5f5 !important;
    color: #8a1f1f;
}
