:root {
    --ink: #f5f5f5;
    --muted: #bdbdbd;
    --line: #343834;
    --surface: #1f1f1f;
    --canvas: #121212;
    --sidebar: #000000;
    --sidebar-soft: #20261f;
    --orange: #a3c212;
    --orange-dark: #c2dd3f;
    --green: #a3c212;
    --green-soft: #2b3513;
    --yellow: #d0df70;
    --yellow-soft: #373a1b;
    --red: #e27b70;
    --red-soft: #40221f;
    --purple: #b7d94a;
    --shadow: 0 12px 32px rgba(0, 0, 0, .28);
    --radius: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    color: var(--ink);
    background: var(--canvas);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4, p { margin-top: 0; }
h1, h2, h3, h4 { font-family: inherit; letter-spacing: -.035em; }
h2 { font-size: 21px; }
h3 { font-size: 16px; }
.muted { color: var(--muted); }
.text-orange { color: var(--orange); }
.text-right { text-align: right; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }

.admin-shell { min-height: 100vh; }
.sidebar {
    width: 248px;
    position: fixed;
    inset: 0 auto 0 0;
    background: var(--sidebar);
    color: #e8ebe7;
    z-index: 30;
    display: flex;
    flex-direction: column;
    padding: 24px 16px 18px;
}
.brand { display: inline-flex; align-items: center; gap: 11px; color: #fff; padding: 2px 8px; }
.brand > span:last-child { font: 800 22px/1 ui-sans-serif, system-ui, sans-serif; letter-spacing: -.07em; position: relative; }
.brand strong { color: var(--orange); }
.brand small {
    display: block;
    margin-top: 6px;
    font: 600 8px/1 ui-sans-serif, system-ui, sans-serif;
    letter-spacing: .24em;
    color: #939993;
}
.brand-mark { width: 35px; height: 35px; display: flex; align-items: center; justify-content: center; gap: 3px; }
.brand-mark i { display: block; width: 5px; height: 25px; background: var(--orange); border-radius: 2px; transform: rotate(24deg); }
.brand-mark i:nth-child(2) { height: 34px; }
.brand-dark { color: var(--ink); }
.side-nav { display: flex; flex-direction: column; gap: 4px; margin-top: 43px; }
.nav-section {
    padding: 0 13px 10px;
    color: #777e78;
    text-transform: uppercase;
    letter-spacing: .15em;
    font-size: 9px;
    font-weight: 700;
}
.side-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 42px;
    border-radius: 9px;
    padding: 0 12px;
    color: #aeb4af;
    font-weight: 600;
    transition: .18s ease;
}
.side-nav a:hover { color: #fff; background: #1d221e; }
.side-nav a.active { color: #fff; background: var(--sidebar-soft); box-shadow: inset 3px 0 var(--orange); }
.nav-icon { width: 22px; color: #7c837d; font-size: 16px; text-align: center; }
.side-nav a.active .nav-icon { color: var(--orange); }
.sidebar-footer { margin-top: auto; border-top: 1px solid #2c312d; padding: 18px 7px 0; }
.gym-status { font-size: 11px; color: #8e958f; display: flex; align-items: center; gap: 8px; }
.gym-status i { width: 7px; height: 7px; background: #50c592; border-radius: 50%; box-shadow: 0 0 0 4px rgba(80,197,146,.1); }
.sidebar-user { display: flex; align-items: center; gap: 10px; margin: 19px 0 12px; }
.sidebar-user span:last-child { display: flex; flex-direction: column; min-width: 0; }
.sidebar-user strong { font-size: 12px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sidebar-user small { font-size: 10px; color: #818782; }
.avatar {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-grid;
    place-items: center;
    background: #343a35;
    color: #fff;
    font-weight: 700;
}
.avatar-orange { background: var(--orange); }
.avatar-photo { display: block; object-fit: cover; background: #343a35; }
.logout-link {
    width: 100%;
    border: 0;
    background: transparent;
    color: #7f8580;
    text-align: left;
    padding: 7px 2px;
    display: flex;
    justify-content: space-between;
    font-size: 11px;
}
.logout-link:hover { color: #fff; }
.admin-main { margin-left: 248px; min-height: 100vh; }
.topbar {
    height: 96px;
    padding: 21px 34px 19px;
    background: rgba(255,255,255,.92);
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(12px);
}
.topbar h1 { font-size: 25px; margin: 1px 0 0; }
.eyebrow {
    margin-bottom: 0;
    text-transform: uppercase;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .17em;
    color: var(--orange);
}
.topbar-actions { display: flex; align-items: center; gap: 14px; }
.today { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.mobile-menu { display: none; border: 0; background: transparent; font-size: 20px; }
.page-content { padding: 28px 34px 46px; max-width: 1550px; margin: 0 auto; }

.alert {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 44px 12px 14px;
    border-radius: 10px;
    margin-bottom: 18px;
    font-weight: 600;
    border: 1px solid transparent;
}
.alert > span { width: 21px; height: 21px; display: grid; place-items: center; border-radius: 50%; font-size: 12px; }
.alert.success { color: #23634f; background: var(--green-soft); border-color: #cce6dc; }
.alert.success > span { background: #c2e3d6; }
.alert.error { color: #91392f; background: var(--red-soft); border-color: #f1d3ce; }
.alert.error > span { background: #efc7c1; }
.alert button { position: absolute; right: 12px; border: 0; background: transparent; color: currentColor; font-size: 18px; }

.button {
    min-height: 40px;
    border: 1px solid transparent;
    border-radius: 9px;
    padding: 0 16px;
    background: var(--orange);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 700;
    font-size: 12px;
    transition: .18s ease;
}
.button:hover { background: var(--orange-dark); transform: translateY(-1px); }
.button-light { background: #fff; color: var(--ink); border-color: var(--line); }
.button-light:hover { background: #f7f7f3; }
.button-dark { background: var(--ink); }
.button-dark:hover { background: #2b2e2a; }
.button-danger { color: var(--red); background: #fff; border-color: #efd6d2; }
.button-danger:hover { color: #fff; background: var(--red); }
.button-small { min-height: 34px; padding: 0 12px; font-size: 11px; }
.button-wide { width: 100%; }
.button:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.icon-button { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 9px; border: 1px solid var(--line); background: #fff; }

.page-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 22px; }
.page-heading h1,
.page-heading h2 { margin-bottom: 4px; font-size: 22px; }
.page-heading p { margin: 0; color: var(--muted); }
.heading-actions { display: flex; gap: 8px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; margin: 0 0 15px; }
.section-heading h2, .section-heading h3 { margin: 0; }
.section-heading a { color: var(--orange); font-size: 12px; font-weight: 700; }

.stat-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-bottom: 24px; }
.stat-card {
    min-height: 130px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px;
    position: relative;
    box-shadow: 0 1px 0 rgba(0,0,0,.02);
    overflow: hidden;
}
.stat-card::after { content: ""; position: absolute; width: 55px; height: 55px; right: -18px; top: -18px; border-radius: 50%; background: #f3f3ee; }
.stat-card.highlight { color: #fff; background: var(--ink); border-color: var(--ink); }
.stat-card.highlight::after { background: rgba(241,91,56,.25); }
.stat-card > span { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); font-weight: 700; }
.stat-card.highlight > span { color: #aeb4af; }
.stat-card strong { display: block; font: 800 29px/1 ui-sans-serif, system-ui, sans-serif; margin: 14px 0 9px; letter-spacing: -.05em; }
.stat-card small { color: var(--muted); }
.stat-card.highlight small { color: #aeb4af; }
.trend { color: var(--green) !important; font-weight: 700; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, .8fr); gap: 18px; align-items: start; }
.stack { display: grid; gap: 18px; }
.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: 0 1px 0 rgba(0,0,0,.015);
}
.card-flush { padding: 0; overflow: hidden; }
.card-header { padding: 18px 20px; border-bottom: 1px solid var(--line); }
.card-header h2, .card-header h3 { margin: 0; }
.card-dark { color: #fff; background: var(--ink); border-color: var(--ink); }
.card-dark .muted { color: #a8ada8; }

.class-list { display: grid; gap: 2px; }
.class-row {
    display: grid;
    grid-template-columns: 58px 5px minmax(160px, 1fr) minmax(120px, .7fr) 110px 80px;
    gap: 14px;
    align-items: center;
    padding: 14px 20px;
    border-top: 1px solid #f0f0eb;
}
.class-row:first-child { border-top: 0; }
.class-row:hover { background: #fafaf7; }
.class-time strong { font-size: 14px; }
.class-time span { display: block; color: var(--muted); font-size: 10px; text-transform: uppercase; }
.color-bar { width: 4px; height: 35px; border-radius: 4px; }
.class-title strong { display: block; }
.class-title span, .class-meta { color: var(--muted); font-size: 11px; }
.capacity { min-width: 90px; }
.capacity-bar { height: 4px; background: #ecece7; border-radius: 3px; overflow: hidden; margin-top: 6px; }
.capacity-bar i { display: block; height: 100%; background: var(--orange); }

.schedule-toolbar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 18px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--line);
}
.calendar-navigation { display: flex; align-items: center; gap: 7px; }
.schedule-range { text-align: center; }
.schedule-range > span {
    display: block;
    color: var(--orange);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}
.schedule-range h2 { margin: 2px 0 0; font-size: 20px; }
.schedule-range small { color: var(--muted); font-size: 10px; }
.calendar-view-switch {
    justify-self: end;
    display: inline-flex;
    gap: 3px;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #151715;
}
.calendar-view-switch a {
    min-width: 68px;
    padding: 7px 12px;
    border-radius: 7px;
    color: var(--muted);
    text-align: center;
    font-size: 11px;
    font-weight: 700;
}
.calendar-view-switch a:hover { color: #fff; }
.calendar-view-switch a.active {
    color: #11140b;
    background: var(--orange);
}
.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    border-bottom: 1px solid var(--line);
    background: #181a18;
}
.schedule-card-week .calendar-weekdays { display: none; }
.calendar-weekdays span {
    padding: 9px 12px;
    color: #9ba19a;
    border-left: 1px solid var(--line);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .1em;
    text-align: center;
    text-transform: uppercase;
}
.calendar-weekdays span:first-child { border-left: 0; }
.schedule-calendar {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}
.calendar-day {
    min-width: 0;
    padding: 11px;
    border-left: 1px solid var(--line);
    border-top: 1px solid var(--line);
    background: #1d1f1d;
}
.calendar-day:nth-child(7n + 1) { border-left: 0; }
.schedule-calendar-month .calendar-day:nth-child(-n + 7) { border-top: 0; }
.schedule-calendar-week .calendar-day { min-height: 490px; border-top: 0; }
.schedule-calendar-month .calendar-day { min-height: 135px; padding: 8px; }
.calendar-day:nth-child(7n),
.calendar-day:nth-child(7n - 1) { background: #1a1c1a; }
.calendar-day.outside-period { background: #151715; }
.calendar-day.outside-period .calendar-day-header,
.calendar-day.outside-period .calendar-events { opacity: .35; }
.calendar-day.is-today { box-shadow: inset 0 3px var(--orange); }
.calendar-day-header {
    display: flex;
    align-items: baseline;
    gap: 7px;
    min-height: 31px;
    margin-bottom: 8px;
}
.calendar-day-header strong {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    margin-left: auto;
    border-radius: 50%;
    font: 800 14px ui-sans-serif, system-ui, sans-serif;
}
.calendar-day.is-today .calendar-day-header strong {
    color: #11140b;
    background: var(--orange);
}
.calendar-day-header small {
    color: var(--orange-dark);
    font-size: 9px;
    font-weight: 700;
}
.calendar-weekday {
    color: #aeb4ad;
    font-size: 10px;
    font-weight: 700;
}
.schedule-calendar-month .calendar-weekday { display: none; }
.schedule-calendar-month .calendar-day-header strong { margin-left: 0; }
.calendar-events { display: grid; gap: 6px; }
.schedule-event {
    position: relative;
    display: grid;
    gap: 2px;
    min-width: 0;
    padding: 9px 9px 9px 11px;
    overflow: hidden;
    border: 1px solid #363b36;
    border-radius: 9px;
    background: #151715;
    transition: .16s ease;
}
.schedule-event::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: var(--event-color);
}
.schedule-event:hover {
    border-color: #535a52;
    background: #242724;
    transform: translateY(-1px);
}
.schedule-event-time {
    color: var(--event-color);
    font-size: 10px;
    font-weight: 800;
}
.schedule-event strong {
    overflow: hidden;
    color: #f3f3f3;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.schedule-event-type,
.schedule-event-trainer,
.schedule-event-meta {
    overflow: hidden;
    color: #aeb4ad;
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.schedule-event-meta { margin-top: 3px; color: #858c85; }
.schedule-event-cancelled { opacity: .55; }
.schedule-event-cancelled strong { text-decoration: line-through; }
.schedule-event-draft { border-style: dashed; }
.schedule-calendar-month .schedule-event {
    gap: 1px;
    padding: 6px 6px 6px 9px;
    border-radius: 6px;
}
.schedule-calendar-month .schedule-event strong { font-size: 9px; }
.schedule-calendar-month .schedule-event-time { font-size: 8px; }
.schedule-calendar-month .schedule-event-type,
.schedule-calendar-month .schedule-event-trainer,
.schedule-calendar-month .schedule-event-meta { display: none; }
.calendar-no-classes {
    padding: 14px 4px;
    color: #70766f;
    font-size: 10px;
    text-align: center;
}
.calendar-empty-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 18px;
    border-top: 1px solid var(--line);
    background: #181a18;
}
.calendar-empty-banner > span {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    color: var(--orange);
    background: #2b3513;
}
.calendar-empty-banner strong,
.calendar-empty-banner small { display: block; }
.calendar-empty-banner small { color: var(--muted); }

.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
}
.badge.positive { color: #23634f; background: var(--green-soft); }
.badge.warning { color: #855d08; background: var(--yellow-soft); }
.badge.negative { color: #9e3931; background: var(--red-soft); }
.badge.neutral { color: #626760; background: #eceeea; }
.badge.outline { background: transparent; border: 1px solid currentColor; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th {
    text-align: left;
    color: #888c86;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: .1em;
    padding: 11px 16px;
    border-bottom: 1px solid var(--line);
    background: #fafaf7;
}
td { padding: 13px 16px; border-bottom: 1px solid #efefe9; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fcfcf9; }
.member-cell { display: flex; align-items: center; gap: 10px; }
.member-cell .avatar { background: #eeeee8; color: var(--ink); }
.member-cell strong, .member-cell span { display: block; }
.member-cell span { color: var(--muted); font-size: 11px; }
.table-link { color: var(--orange); font-weight: 700; }

.filters { display: flex; gap: 10px; margin-bottom: 16px; }
.search-box { flex: 1; max-width: 430px; position: relative; }
.search-box::before { content: "⌕"; position: absolute; left: 13px; top: 9px; color: var(--muted); }
.search-box input { padding-left: 36px; }

.field { display: grid; gap: 6px; }
.field label { font-size: 10px; text-transform: uppercase; letter-spacing: .07em; font-weight: 700; color: #5e625c; }
.field label span { color: var(--orange); }
input, select, textarea {
    width: 100%;
    min-height: 40px;
    border: 1px solid #dcded8;
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    padding: 9px 11px;
    outline: none;
    transition: .15s ease;
}
textarea { min-height: 100px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(241,91,56,.1); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.form-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.field-span-2 { grid-column: span 2; }
.field-span-full { grid-column: 1 / -1; }
.checkbox { display: flex; align-items: flex-start; gap: 9px; cursor: pointer; }
.checkbox input { width: 17px; height: 17px; min-height: 0; margin: 2px 0 0; accent-color: var(--orange); }
.checkbox span { color: var(--muted); font-size: 12px; }
.form-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.subtle-box { padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: #fafaf7; }

.detail-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(290px, .8fr); gap: 18px; align-items: start; }
.profile-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    background: var(--ink);
    color: #fff;
    border-radius: var(--radius);
    padding: 25px;
    margin-bottom: 18px;
    overflow: hidden;
    position: relative;
}
.profile-head::after { content: ""; position: absolute; width: 160px; height: 160px; border: 32px solid rgba(241,91,56,.12); border-radius: 50%; right: -60px; top: -70px; }
.profile-identity { display: flex; align-items: center; gap: 16px; position: relative; z-index: 1; }
.profile-avatar { width: 58px; height: 58px; border-radius: 15px; background: var(--orange); display: grid; place-items: center; font: 800 19px ui-sans-serif, system-ui, sans-serif; }
.profile-head h1,
.profile-head h2 { margin: 0 0 4px; font-size: 23px; }
.profile-head p { color: #aab0aa; margin: 0; }
.profile-actions { position: relative; z-index: 1; display: flex; gap: 8px; }
.profile-actions .button-light { background: transparent; border-color: #414741; color: #fff; }
.definition-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.definition-grid div { min-width: 0; }
.definition-grid dt { font-size: 9px; text-transform: uppercase; color: var(--muted); letter-spacing: .09em; font-weight: 700; }
.definition-grid dd { margin: 4px 0 0; font-weight: 600; overflow-wrap: anywhere; }
.medical-note { margin-top: 18px; border-left: 3px solid var(--orange); padding: 11px 14px; background: #fff5f1; border-radius: 0 8px 8px 0; }
.medical-note strong { display: block; font-size: 10px; text-transform: uppercase; color: var(--orange-dark); margin-bottom: 3px; }

.membership-card { padding: 17px; border: 1px solid var(--line); border-radius: 11px; margin-top: 10px; }
.membership-card.active { border-left: 3px solid var(--green); }
.membership-card h3 { margin-bottom: 4px; }
.membership-meta { display: flex; justify-content: space-between; gap: 10px; margin-top: 13px; color: var(--muted); font-size: 11px; }
.credit-balance { font: 800 28px ui-sans-serif, system-ui, sans-serif; color: var(--orange); }

.timeline { display: grid; }
.timeline-item { position: relative; padding: 0 0 20px 26px; border-left: 1px solid var(--line); margin-left: 7px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before { content: ""; position: absolute; width: 9px; height: 9px; border: 3px solid #fff; background: var(--orange); border-radius: 50%; left: -5px; top: 2px; box-shadow: 0 0 0 1px var(--line); }
.timeline-item h4 { margin-bottom: 3px; font-size: 13px; }
.timeline-item p { margin: 0; color: var(--muted); font-size: 12px; }
.timeline-item small { color: #969a94; font-size: 10px; }

.module-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.module-item {
    border: 1px solid var(--line);
    border-radius: 11px;
    padding: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.module-item strong { display: block; font-size: 12px; }
.module-item small { color: var(--muted); font-size: 10px; }
.module-dot { width: 9px; height: 9px; border-radius: 50%; background: #b9bdb7; }
.module-dot.on { background: #46b986; box-shadow: 0 0 0 4px var(--green-soft); }
.switch { position: relative; width: 38px; height: 22px; flex: 0 0 auto; }
.switch input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    pointer-events: none;
}
.switch span { position: absolute; inset: 0; border-radius: 20px; background: #d7d9d4; transition: .2s; }
.switch span::after { content: ""; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; box-shadow: 0 1px 4px rgba(0,0,0,.18); transition: .2s; }
.switch input:checked + span { background: var(--orange); }
.switch input:checked + span::after { transform: translateX(16px); }
.switch input:focus-visible + span {
    outline: 3px solid rgba(163, 194, 18, .5);
    outline-offset: 3px;
}

.empty-state { padding: 40px 20px; text-align: center; color: var(--muted); }
.empty-state .empty-icon { width: 48px; height: 48px; margin: 0 auto 12px; display: grid; place-items: center; border-radius: 14px; background: #f0f0eb; color: var(--orange); font-size: 20px; }
.empty-state h3 { color: var(--ink); margin-bottom: 5px; }

dialog {
    width: min(650px, calc(100vw - 30px));
    border: 0;
    padding: 0;
    border-radius: 16px;
    box-shadow: 0 30px 80px rgba(0,0,0,.25);
}
dialog::backdrop { background: rgba(17,20,17,.62); backdrop-filter: blur(3px); }
.modal-head { padding: 20px 22px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; }
.modal-head h2 { margin: 0; }
.modal-body { padding: 22px; }
.modal-close { border: 0; background: transparent; font-size: 22px; color: var(--muted); }

.plan-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.plan-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 20px;
    position: relative;
    overflow: hidden;
}
.plan-card.featured { border-color: var(--orange); box-shadow: 0 12px 30px rgba(241,91,56,.11); }
.plan-card.featured::before { content: "POPULAIR"; position: absolute; top: 12px; right: -27px; background: var(--orange); color: #fff; width: 100px; text-align: center; font-size: 8px; font-weight: 700; padding: 4px; transform: rotate(40deg); }
.plan-code { color: var(--orange); font-size: 9px; letter-spacing: .1em; font-weight: 700; }
.plan-card h3 { font-size: 17px; margin: 9px 0 5px; }
.plan-card p { color: var(--muted); font-size: 12px; min-height: 54px; }
.plan-price { font: 800 25px ui-sans-serif, system-ui, sans-serif; margin: 14px 0; }
.plan-price small { font: 500 10px ui-sans-serif, system-ui, sans-serif; color: var(--muted); }
.plan-features { padding: 14px 0; border-top: 1px solid var(--line); display: grid; gap: 7px; color: #555a54; font-size: 11px; }
.plan-features span::before { content: "✓"; color: var(--green); margin-right: 7px; font-weight: 700; }
.plan-actions,
.row-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}
.plan-actions {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}
.plan-actions form,
.row-actions form { margin: 0; }

.invoice-summary { display: flex; justify-content: flex-end; gap: 12px; margin-bottom: 15px; }
.invoice-summary div { min-width: 150px; padding: 12px 15px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.invoice-summary span { display: block; font-size: 9px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.invoice-summary strong { display: block; margin-top: 4px; font: 700 17px ui-sans-serif, system-ui, sans-serif; }

.portal-shell { background: #f4f4ef; min-height: 100vh; }
.portal-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.portal-nav { max-width: 1180px; height: 76px; margin: auto; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; }
.portal-nav nav { display: flex; align-items: stretch; height: 100%; gap: 28px; }
.portal-nav nav a { display: flex; align-items: center; color: var(--muted); font-weight: 600; position: relative; }
.portal-nav nav a::after { content: ""; position: absolute; bottom: 0; height: 3px; left: 0; right: 0; background: transparent; }
.portal-nav nav a.active { color: var(--ink); }
.portal-nav nav a.active::after { background: var(--orange); }
.portal-user { display: flex; align-items: center; gap: 10px; }
.portal-user form { margin: 0; }
.portal-content { max-width: 1180px; margin: auto; padding: 34px 24px 70px; }
.portal-hero {
    color: #fff;
    background: var(--ink);
    border-radius: 20px;
    padding: 33px 36px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
}
.portal-hero::before, .portal-hero::after { content: ""; position: absolute; border: 35px solid rgba(241,91,56,.14); border-radius: 50%; }
.portal-hero::before { width: 170px; height: 170px; right: -50px; top: -100px; }
.portal-hero::after { width: 90px; height: 90px; right: 130px; bottom: -90px; }
.portal-hero h1 { font-size: 31px; margin: 5px 0 7px; }
.portal-hero p { color: #aeb3ae; margin: 0; }
.portal-hero .kicker { color: var(--orange); }
.portal-hero-action { position: relative; z-index: 1; }
.portal-stats { display: flex; gap: 10px; }
.portal-stat { min-width: 120px; padding: 14px; border: 1px solid #3a403b; border-radius: 11px; background: rgba(255,255,255,.03); }
.portal-stat span { display: block; color: #8f968f; font-size: 9px; text-transform: uppercase; letter-spacing: .08em; }
.portal-stat strong { display: block; font: 700 19px ui-sans-serif, system-ui, sans-serif; margin-top: 3px; }
.portal-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, .75fr); gap: 18px; align-items: start; }
.portal-profile-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr); gap: 18px; align-items: start; }
.portal-photo-card { display: grid; gap: 20px; }
.portal-photo-preview {
    width: min(280px, 100%);
    aspect-ratio: 1;
    margin: 0 auto;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: #292d29;
}
.portal-photo-preview img,
.profile-photo-placeholder { width: 100%; height: 100%; }
.portal-photo-preview img { display: block; object-fit: cover; }
.portal-photo-preview img[hidden] { display: none; }
.profile-photo-placeholder {
    display: grid;
    place-items: center;
    color: #11140a;
    background: var(--orange);
    font-size: 54px;
    font-weight: 800;
}
.profile-photo-placeholder[hidden] { display: none; }
.profile-photo-form { display: grid; gap: 14px; }
.profile-photo-form .button { justify-self: start; }
.portal-account-details { grid-template-columns: 1fr; }
.portal-consent-heading { align-items: flex-start; flex-wrap: wrap; gap: 12px; }
.consent-options {
    display: grid;
    gap: 10px;
    min-width: 0;
    margin: 18px 0 0;
    padding: 0;
    border: 0;
}
.consent-options legend {
    margin-bottom: 9px;
    color: var(--ink);
    font-weight: 700;
    font-size: 12px;
}
.consent-option {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #181a18;
    cursor: pointer;
}
.consent-option:has(input:checked) {
    border-color: var(--orange);
    box-shadow: 0 0 0 3px rgba(163,194,18,.12);
}
.consent-option:focus-within {
    outline: 3px solid rgba(163,194,18,.45);
    outline-offset: 2px;
}
.consent-option input {
    width: 18px;
    height: 18px;
    min-height: 0;
    margin: 1px 0 0;
    accent-color: var(--orange);
}
.consent-option span { min-width: 0; }
.consent-option strong,
.consent-option small { display: block; }
.consent-option strong { color: var(--ink); font-size: 12px; }
.consent-option small { margin-top: 3px; color: var(--muted); }
.portal-shell :focus-visible {
    outline: 3px solid rgba(163,194,18,.45);
    outline-offset: 3px;
}
.portal-booking {
    display: grid;
    grid-template-columns: 55px 5px 1fr auto;
    gap: 13px;
    align-items: center;
    padding: 14px 0;
    border-top: 1px solid var(--line);
}
.portal-booking:first-of-type { border-top: 0; }
.portal-booking .day { text-align: center; }
.portal-booking .day strong { display: block; font: 800 19px/1 ui-sans-serif, system-ui, sans-serif; }
.portal-booking .day span { font-size: 9px; text-transform: uppercase; color: var(--muted); }
.announcement { padding: 15px 0; border-top: 1px solid var(--line); }
.announcement:first-of-type { border-top: 0; padding-top: 0; }
.announcement h3 { margin: 0 0 5px; }
.announcement p { margin: 0; color: var(--muted); font-size: 12px; }
.announcement small { display: block; color: var(--orange); font-weight: 700; margin-bottom: 5px; }
.portal-mobile-nav { display: none; }
.schedule-days { display: grid; gap: 18px; }
.day-heading { display: flex; align-items: center; gap: 12px; margin: 10px 0 8px; }
.day-heading h2 { margin: 0; font-size: 18px; }
.day-heading span { color: var(--muted); }
.day-heading::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.portal-class-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 13px;
    display: grid;
    grid-template-columns: 105px 5px 1fr 160px 180px;
    align-items: center;
    gap: 17px;
    padding: 17px 19px;
    margin-bottom: 8px;
}
.portal-class-card .time { font: 700 19px ui-sans-serif, system-ui, sans-serif; }
.portal-class-card .time small { display: block; font: 500 10px ui-sans-serif, system-ui, sans-serif; color: var(--muted); }
.portal-class-card h3 { margin: 0 0 3px; }
.portal-class-card p { margin: 0; color: var(--muted); font-size: 11px; }

.auth-shell { background: #fff; min-height: 100vh; }
.auth-grid { min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr; }
.auth-visual {
    color: #fff;
    background:
        radial-gradient(circle at 83% 13%, rgba(241,91,56,.3), transparent 25%),
        linear-gradient(140deg, #111411 0%, #202621 65%, #151815 100%);
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}
.auth-visual::before {
    content: "";
    position: absolute;
    inset: -10% -40% auto auto;
    width: 620px;
    height: 620px;
    border: 80px solid rgba(255,255,255,.025);
    border-radius: 50%;
}
.auth-visual::after {
    content: "BB";
    position: absolute;
    right: -30px;
    bottom: -90px;
    font: 800 300px/1 ui-sans-serif, system-ui, sans-serif;
    color: rgba(255,255,255,.018);
    letter-spacing: -.13em;
}
.auth-visual-inner { height: 100%; padding: 38px 55px 48px; display: flex; flex-direction: column; position: relative; z-index: 1; }
.auth-statement { margin: auto 0; max-width: 610px; }
.kicker { font-size: 9px; letter-spacing: .2em; color: var(--orange); font-weight: 700; }
.auth-statement h1 { font-size: clamp(42px, 5vw, 72px); line-height: 1.03; margin: 17px 0; }
.auth-statement h1 em { color: var(--orange); font-style: normal; }
.auth-statement p { color: #aeb5af; max-width: 490px; font-size: 16px; }
.auth-proof { display: flex; gap: 50px; border-top: 1px solid #343a35; padding-top: 22px; }
.auth-proof div { display: flex; flex-direction: column; }
.auth-proof strong { font: 700 21px ui-sans-serif, system-ui, sans-serif; }
.auth-proof span { color: #8c938d; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.auth-panel { display: grid; place-items: center; padding: 40px; background: #fafaf7; }
.auth-card { width: min(410px, 100%); }
.auth-card h2 { font-size: 28px; margin-bottom: 7px; }
.auth-card > p { color: var(--muted); margin-bottom: 28px; }
.auth-card form { display: grid; gap: 15px; }
.auth-card .button { min-height: 46px; margin-top: 5px; }
.demo-login { margin-top: 22px; padding: 14px; background: #fff; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); font-size: 11px; }
.demo-login strong { color: var(--ink); display: block; margin-bottom: 5px; }
.auth-switch { margin-top: 17px; text-align: center; color: var(--muted); font-size: 12px; }
.auth-switch a { color: var(--orange); font-weight: 700; }
@media (max-width: 1180px) {
    .stat-grid { grid-template-columns: repeat(3, 1fr); }
    .plan-grid { grid-template-columns: repeat(2, 1fr); }
    .class-row { grid-template-columns: 50px 4px 1fr 100px 70px; }
    .class-row .class-meta { display: none; }
    .portal-class-card { grid-template-columns: 90px 4px 1fr 140px; }
    .portal-class-card > :nth-child(4) { display: none; }
}

@media (max-width: 900px) {
    .sidebar {
        visibility: hidden;
        transform: translateX(-100%);
        transition: transform .2s, visibility 0s linear .2s;
        box-shadow: 20px 0 50px rgba(0,0,0,.25);
    }
    .sidebar.open {
        visibility: visible;
        transform: translateX(0);
        transition-delay: 0s;
    }
    .admin-main { margin-left: 0; }
    .mobile-menu { display: block; }
    .topbar { padding-inline: 20px; }
    .page-content { padding: 22px 20px 40px; }
    .dashboard-grid, .detail-grid, .portal-grid { grid-template-columns: 1fr; }
    .module-grid { grid-template-columns: repeat(2, 1fr); }
    .auth-grid { grid-template-columns: 1fr; }
    .auth-visual { display: none; }
    .auth-panel { min-height: 100vh; }
    .portal-nav nav { display: none; }
    .portal-content { padding-bottom: 95px; }
    .schedule-calendar-week { grid-template-columns: 1fr; }
    .schedule-calendar-week .calendar-day {
        min-height: 120px;
        border-left: 0;
        border-top: 1px solid var(--line);
    }
    .schedule-calendar-week .calendar-day:first-child { border-top: 0; }
    .schedule-calendar-week .calendar-day-header strong { margin-left: 0; order: -1; }
    .schedule-calendar-week .calendar-day-header small { margin-left: auto; }
    .portal-mobile-nav {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 25;
        background: rgba(255,255,255,.96);
        border-top: 1px solid var(--line);
        backdrop-filter: blur(12px);
    }
    .portal-mobile-nav a { display: grid; place-items: center; gap: 2px; padding: 9px; color: var(--muted); }
    .portal-mobile-nav a.active { color: var(--orange); }
    .portal-mobile-nav span { font-size: 9px; }
}

@media (max-width: 680px) {
    .today, .topbar-actions .button { display: none; }
    .topbar { height: 80px; }
    .topbar h1 { font-size: 21px; }
    .page-heading { align-items: flex-start; flex-direction: column; }
    .heading-actions { width: 100%; }
    .heading-actions .button { flex: 1; }
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .stat-card { min-height: 115px; padding: 15px; }
    .stat-card strong { font-size: 23px; }
    .form-grid, .form-grid-3, .form-grid-4 { grid-template-columns: 1fr; }
    .field-span-2 { grid-column: auto; }
    .definition-grid { grid-template-columns: repeat(2, 1fr); }
    .module-grid, .plan-grid { grid-template-columns: 1fr; }
    .profile-head { flex-direction: column; }
    .profile-actions { width: 100%; }
    .profile-actions .button { flex: 1; }
    .class-row { grid-template-columns: 45px 4px 1fr 65px; padding: 12px; gap: 9px; }
    .class-row .capacity { display: none; }
    .portal-nav { height: 65px; padding: 0 15px; }
    .portal-user-name { display: none; }
    .portal-content { padding: 20px 14px 90px; }
    .portal-profile-grid { grid-template-columns: 1fr; }
    .portal-hero { padding: 25px 22px; display: block; }
    .portal-hero h1 { font-size: 26px; }
    .portal-hero-action { margin-top: 20px; }
    .portal-stats { flex-wrap: wrap; }
    .portal-stat { flex: 1; }
    .portal-class-card { grid-template-columns: 65px 4px 1fr; padding: 13px; gap: 10px; }
    .portal-class-card > :nth-child(4), .portal-class-card > :nth-child(5) { grid-column: 1 / -1; display: block; }
    .portal-class-card > :nth-child(5) .button, .portal-class-card > :nth-child(5) form { width: 100%; }
    .portal-booking { grid-template-columns: 45px 4px 1fr; }
    .portal-booking > :last-child { grid-column: 1 / -1; }
    .portal-booking .button { width: 100%; }
    .invoice-summary { overflow-x: auto; justify-content: flex-start; }
    .filters { flex-wrap: wrap; }
    .search-box { max-width: none; flex-basis: 100%; }
    .schedule-toolbar {
        grid-template-columns: 1fr;
        justify-items: stretch;
        padding: 14px;
    }
    .calendar-navigation { justify-content: center; }
    .schedule-range { order: -1; }
    .calendar-view-switch { justify-self: stretch; }
    .calendar-view-switch a { flex: 1; }
    .schedule-card-month { overflow-x: auto; }
    .schedule-card-month .schedule-toolbar,
    .schedule-card-month .calendar-weekdays,
    .schedule-card-month .schedule-calendar { min-width: 780px; }
    .schedule-card-month .schedule-toolbar {
        grid-template-columns: 1fr auto 1fr;
        justify-items: initial;
    }
    .schedule-card-month .schedule-range { order: initial; }
    .schedule-calendar-month .calendar-day { min-height: 120px; }
}

/* 180 Degrees CrossFit-inspired dark palette */
html { color-scheme: dark; }
body { color: #e0e0e0; background: var(--canvas); }
p { color: #cccccc; }
.muted { color: var(--muted); }

.sidebar {
    background: #000;
    border-right: 1px solid #222622;
}
.brand > span:last-child,
.stat-card strong,
.profile-avatar,
.credit-balance,
.plan-price,
.invoice-summary strong,
.portal-stat strong,
.portal-booking .day strong,
.portal-class-card .time,
.auth-proof strong {
    font-family: inherit;
}
.brand small {
    color: #aeb7ac;
    max-width: 155px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.side-nav a { color: #b7bdb7; }
.side-nav a:hover { color: #fff; background: #171b17; }
.side-nav a.active {
    color: #fff;
    background: linear-gradient(90deg, #242c1e 0%, #171b17 100%);
}
.side-nav a.active .nav-icon,
.eyebrow,
.kicker,
.table-link,
.section-heading a,
.text-orange,
.plan-code {
    color: var(--orange);
}
.sidebar-user .avatar { background: #2f352f; }
.gym-status i,
.module-dot.on { background: var(--orange); }

.topbar {
    background: rgba(0, 0, 0, .92);
    border-color: #292d29;
}
.topbar h1,
.page-heading h1,
.page-heading h2,
.section-heading h2,
.section-heading h3,
.card h2,
.card h3 { color: #f5f5f5; }
.page-content { background: var(--canvas); }

.button {
    background: var(--orange);
    color: #11140b;
}
.button:hover {
    background: var(--orange-dark);
    color: #070806;
}
.button-light {
    background: #1f1f1f;
    color: #f5f5f5;
    border-color: #3a3f3a;
}
.button-light:hover {
    background: #2b302b;
    color: #fff;
    border-color: #505950;
}
.button-dark {
    background: #000;
    color: #f5f5f5;
    border-color: #3a3f3a;
}
.button-dark:hover { background: #252925; color: var(--orange-dark); }
.button-danger {
    background: #1f1f1f;
    color: #e98a80;
    border-color: #673a35;
}
.button-danger:hover { color: #fff; background: #9c4038; }
.icon-button { background: #1f1f1f; color: #f5f5f5; border-color: var(--line); }

.card,
.stat-card,
.plan-card,
.invoice-summary div,
.portal-class-card,
.demo-login {
    background: var(--surface);
    border-color: var(--line);
    box-shadow: var(--shadow);
}
.card-dark,
.stat-card.highlight,
.profile-head,
.portal-hero { background: #000; border-color: #292d29; }
.stat-card::after { background: #282d26; }
.stat-card.highlight::after { background: rgba(163, 194, 18, .18); }
.stat-card.highlight small,
.stat-card.highlight > span,
.card-dark .muted { color: #aeb4ae; }
.trend { color: var(--orange-dark) !important; }

.card-header,
td,
th,
.timeline-item,
.portal-booking,
.announcement,
.plan-features,
.form-actions { border-color: var(--line); }
th { color: #a7ada6; background: #181a18; }
tbody tr:hover td,
.class-row:hover { background: #252825; }
.class-row { border-color: #303430; }
.member-cell .avatar,
.empty-state .empty-icon {
    background: #303530;
    color: var(--orange-dark);
}
.class-title span,
.class-meta,
.member-cell span,
.plan-card p { color: #b4b9b3; }
.capacity-bar { background: #363b35; }
.capacity-bar i { background: var(--orange); }

.badge.positive { color: #d9e995; background: #2b3513; }
.badge.warning { color: #e0e8ad; background: #3a3d20; }
.badge.negative { color: #f0aea7; background: #40221f; }
.badge.neutral { color: #c3c8c2; background: #353935; }

input,
select,
textarea {
    color: #f0f0f0;
    background: #171917;
    border-color: #444944;
}
input::placeholder,
textarea::placeholder { color: #777e77; }
input:focus,
select:focus,
textarea:focus {
    border-color: var(--orange);
    box-shadow: 0 0 0 3px rgba(163, 194, 18, .14);
}
.field label { color: #c1c6c0; }
.subtle-box { background: #181a18; border-color: var(--line); }

.profile-head::after { border-color: rgba(163, 194, 18, .12); }
.profile-avatar { color: #11140b; }
.medical-note {
    background: #2c3019;
    color: #e0e6bf;
}
.medical-note strong { color: var(--orange-dark); }
.membership-card { border-color: var(--line); background: #1a1c1a; }
.membership-card.active { border-left-color: var(--orange); }
.credit-balance { color: var(--orange-dark); }
.timeline-item::before {
    border-color: var(--surface);
    background: var(--orange);
}

.module-item { background: #1a1c1a; border-color: var(--line); }
.module-item small { color: #aeb4ad; }
.switch span { background: #464c46; }
.switch input:checked + span { background: var(--orange); }
.switch input:checked + span::after { background: #111; }

dialog { color: #e0e0e0; background: var(--surface); }
.modal-head { border-color: var(--line); }
.modal-close { color: #c4c9c3; }
.plan-card.featured {
    border-color: var(--orange);
    box-shadow: 0 12px 32px rgba(163, 194, 18, .13);
}
.plan-card.featured::before { color: #10130a; }
.invoice-summary strong { color: #f5f5f5; }

.portal-shell,
.auth-shell { background: var(--canvas); }
.portal-header {
    background: #000;
    border-color: #292d29;
}
.brand-dark { color: #fff; }
.portal-nav nav a { color: #b8beb7; }
.portal-nav nav a.active { color: #f5f5f5; }
.portal-nav nav a.active::after { background: var(--orange); }
.portal-mobile-nav {
    background: rgba(0, 0, 0, .96);
    border-color: #292d29;
}
.portal-stat { border-color: #394039; }

.auth-visual {
    background:
        radial-gradient(circle at 83% 13%, rgba(163, 194, 18, .22), transparent 25%),
        linear-gradient(140deg, #000 0%, #1c211b 65%, #101210 100%);
}
.auth-statement h1 em { color: var(--orange); }
.auth-panel { background: #121212; }
.demo-login { color: #b9beb8; }

.alert.success {
    color: #dceaa1;
    background: #293312;
    border-color: #475b17;
}
.alert.success > span { background: #435516; }
.alert.error {
    color: #f0b4ae;
    background: #3a201e;
    border-color: #65352f;
}
.alert.error > span { background: #5a2f2b; }

.brand-preview {
    min-height: 96px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #000;
    color: #fff;
}
.brand-preview > span:last-child {
    font: 800 25px/1 ui-sans-serif, system-ui, sans-serif;
    letter-spacing: -.07em;
}
.brand-preview strong { color: var(--orange); }
.brand-preview small {
    display: block;
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 7px;
    color: #b7bdb6;
    font: 600 9px/1 ui-sans-serif, system-ui, sans-serif;
    letter-spacing: .18em;
    text-transform: uppercase;
    white-space: nowrap;
}

/* Central club identity */
.club-brand-logo {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    object-fit: contain;
}

.brand-sidebar .club-brand-logo {
    max-width: 190px;
    max-height: 52px;
}

.brand-portal .club-brand-logo {
    max-width: min(210px, 42vw);
    max-height: 46px;
}

.brand-auth .club-brand-logo {
    max-width: min(330px, 70vw);
    max-height: 100px;
}

.auth-mobile-brand { display: none; margin-bottom: 34px; }
.brand-auth-mobile {
    justify-content: flex-start;
    padding: 0;
}
.brand-auth-mobile .club-brand-logo {
    max-width: min(250px, 72vw);
    max-height: 72px;
}

.brand-settings {
    justify-content: center;
    min-width: 0;
    max-width: 100%;
}
.brand-settings .club-brand-logo {
    max-width: min(280px, 100%);
    max-height: 82px;
}
.brand-on-light { color: #171917; }
.brand-on-light small { color: #616861; }

.club-logo-settings {
    display: grid;
    grid-template-columns: minmax(300px, .9fr) minmax(320px, 1.1fr);
    gap: 26px;
    align-items: start;
}
.club-logo-previews {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border: 1px solid var(--admin-border, var(--line));
    border-radius: 13px;
    overflow: hidden;
}
.club-logo-preview {
    min-width: 0;
    min-height: 180px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 28px;
    justify-content: center;
}
.club-logo-preview > small {
    align-self: flex-start;
    color: #aeb5ae;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .11em;
    text-transform: uppercase;
}
.club-logo-preview-dark { background: #090a09; }
.club-logo-preview-light { background: #f4f5f1; }
.club-logo-preview-light > small { color: #5c635c; }
.club-logo-controls { min-width: 0; }
.club-logo-controls .form-actions { justify-content: flex-start; }
.club-logo-delete {
    margin-top: 13px;
    padding-top: 17px;
    border-top: 1px solid var(--admin-border, var(--line));
}

/* --------------------------------------------------------------------------
   BoxBase admin UX system
   These rules are intentionally scoped to the admin shell so the member
   portal and login screens can keep their own, more expressive layouts.
   -------------------------------------------------------------------------- */

.admin-shell {
    --admin-bg: #101110;
    --admin-panel: #191b19;
    --admin-panel-raised: #1e211e;
    --admin-panel-soft: #151715;
    --admin-border: #303530;
    --admin-border-strong: #464c46;
    --admin-text: #f4f5f2;
    --admin-muted: #a8afa7;
    --admin-accent: #a3c212;
    --admin-accent-hover: #bddb34;
    --admin-accent-soft: #293310;
    --admin-danger: #e98a80;
    --admin-danger-soft: #2e1d1b;
    --admin-info-soft: #20291b;
    min-height: 100vh;
    color: var(--admin-text);
    background: var(--admin-bg);
}

.admin-shell :focus-visible {
    outline: 3px solid rgba(163, 194, 18, .45);
    outline-offset: 3px;
}

.admin-shell a,
.admin-shell button,
.admin-shell input,
.admin-shell select,
.admin-shell textarea,
.admin-shell summary {
    -webkit-tap-highlight-color: transparent;
}

.skip-link {
    position: fixed;
    top: 10px;
    left: 50%;
    z-index: 100;
    padding: 10px 16px;
    border-radius: 9px;
    color: #10130a;
    background: var(--admin-accent);
    font-weight: 800;
    transform: translate(-50%, -160%);
    transition: transform .15s ease;
}

.skip-link:focus { transform: translate(-50%, 0); }

.admin-shell .sidebar {
    width: 260px;
    padding: 20px 14px 16px;
    border-right: 1px solid #272b27;
    overflow: hidden;
}

.admin-shell .brand {
    min-height: 46px;
    padding: 3px 10px;
}

.admin-shell .side-nav {
    flex: 1;
    min-height: 0;
    margin-top: 31px;
    padding-right: 3px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #3b403b transparent;
}

.admin-shell .side-nav a {
    min-height: 44px;
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 0 11px;
    font-size: 13px;
}

.admin-shell .side-nav a:hover {
    border-color: #2d322d;
    background: #171a17;
}

.admin-shell .side-nav a.active {
    border-color: #344023;
    background: linear-gradient(90deg, #252d1c, #191d18);
    box-shadow: inset 3px 0 var(--admin-accent);
}

.admin-shell .nav-icon {
    display: grid;
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 8px;
    color: #9ba19b;
    background: #181b18;
    font-size: 14px;
}

.admin-shell .side-nav a.active .nav-icon {
    color: #15180d;
    background: var(--admin-accent);
}

.admin-shell .sidebar-footer {
    margin-top: 15px;
    padding: 15px 8px 0;
}

.admin-shell .admin-main {
    min-height: 100vh;
    margin-left: 260px;
}

.admin-shell .topbar {
    height: 70px;
    padding: 0 32px;
    border-color: #292d29;
    background: rgba(16, 17, 16, .92);
}

.topbar-start,
.breadcrumbs,
.topbar-actions {
    display: flex;
    align-items: center;
}

.topbar-start { min-width: 0; gap: 14px; }
.breadcrumbs { min-width: 0; gap: 9px; color: #777e77; font-size: 12px; }
.breadcrumbs a { color: var(--admin-muted); font-weight: 650; }
.breadcrumbs a:hover { color: var(--admin-accent-hover); }
.breadcrumbs strong {
    overflow: hidden;
    color: var(--admin-text);
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-shell .today {
    display: grid;
    gap: 0;
    color: var(--admin-text);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .03em;
    line-height: 1.2;
    text-align: right;
}

.admin-shell .today small {
    color: #777e77;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.admin-shell .mobile-menu {
    width: 40px;
    height: 40px;
    border: 1px solid var(--admin-border);
    border-radius: 10px;
    color: var(--admin-text);
    background: var(--admin-panel);
}

.sidebar-overlay {
    position: fixed;
    inset: 0;
    z-index: 25;
    display: none;
    width: 100%;
    height: 100%;
    border: 0;
    background: rgba(0, 0, 0, .62);
    cursor: default;
}

.sidebar-close { display: none; }

.admin-shell .page-content {
    width: 100%;
    max-width: 1480px;
    margin: 0 auto;
    padding: 32px 34px 56px;
    background: transparent;
}

.admin-shell .page-content:focus {
    outline: 2px solid rgba(163, 194, 18, .5);
    outline-offset: -2px;
}

.admin-shell .page-heading {
    align-items: center;
    min-height: 64px;
    margin-bottom: 24px;
}

.admin-shell .page-heading > div:first-child { min-width: 0; }

.admin-shell .page-heading h1,
.admin-shell .page-heading h2 {
    margin: 0;
    color: var(--admin-text);
    font-size: clamp(24px, 2.2vw, 31px);
    font-weight: 780;
    letter-spacing: -.045em;
    line-height: 1.15;
}

.admin-shell .page-heading p {
    max-width: 780px;
    margin-top: 7px;
    color: var(--admin-muted);
    font-size: 13px;
}

.page-kicker {
    display: block;
    margin-bottom: 7px;
    color: var(--admin-accent);
    font-size: 9px;
    font-weight: 850;
    letter-spacing: .15em;
    text-transform: uppercase;
}

.admin-shell .heading-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: flex-end;
    gap: 9px;
}

.content-stack,
.section-stack { display: grid; gap: 20px; }
.section-stack-compact { display: grid; gap: 12px; }
.section-gap { margin-top: 20px; }
.section-gap-lg { margin-top: 26px; }
.control-row { display: flex; align-items: center; gap: 10px; }
.control-row-wrap { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.copy-tight { margin: 4px 0 0; }
.copy-prose { max-width: 820px; margin: 0; }
.text-success { color: var(--admin-accent-hover) !important; }
.text-danger { color: var(--admin-danger) !important; }

.admin-shell .card,
.admin-shell .stat-card,
.admin-shell .plan-card {
    border: 1px solid var(--admin-border);
    border-radius: 15px;
    background: var(--admin-panel);
    box-shadow: 0 9px 28px rgba(0, 0, 0, .12);
}

.admin-shell .card { padding: 22px; }
.admin-shell .card-flush { padding: 0; }
.admin-shell .card-header {
    min-height: 67px;
    padding: 17px 20px;
    border-color: var(--admin-border);
}

.admin-shell .section-heading {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 10px 16px;
    margin-bottom: 17px;
}

.admin-shell .section-heading h2,
.admin-shell .section-heading h3 {
    color: var(--admin-text);
    line-height: 1.25;
}

.admin-shell .section-heading h2 { font-size: 19px; }
.admin-shell .section-heading h3 { font-size: 16px; }
.admin-shell .section-heading p { max-width: 760px; margin: 4px 0 0; }

.admin-shell .button {
    min-height: 42px;
    border-radius: 9px;
    padding: 0 16px;
    color: #11140a;
    background: var(--admin-accent);
    font-size: 12px;
    font-weight: 780;
    line-height: 1.2;
}

.admin-shell .button:hover {
    color: #090b05;
    background: var(--admin-accent-hover);
    transform: translateY(-1px);
}

.admin-shell .button-light {
    color: var(--admin-text);
    background: var(--admin-panel-raised);
    border-color: var(--admin-border-strong);
}

.admin-shell .button-light:hover {
    color: #fff;
    background: #292d29;
    border-color: #5b635b;
}

.admin-shell .button-danger {
    color: #f0a39b;
    background: transparent;
    border-color: #68403b;
}

.admin-shell .button-danger:hover {
    color: #fff;
    background: #8f3e37;
    border-color: #a64c43;
}

.admin-shell .button-small {
    min-height: 38px;
    padding: 0 12px;
    font-size: 11px;
}

.admin-shell .icon-button {
    width: 40px;
    height: 40px;
    border-color: var(--admin-border-strong);
    border-radius: 9px;
    color: var(--admin-text);
    background: var(--admin-panel-raised);
}

.admin-shell .button:disabled,
.admin-shell .button[aria-disabled="true"] {
    opacity: .45;
    cursor: not-allowed;
    transform: none;
}

.admin-shell .badge {
    min-height: 24px;
    padding: 4px 9px;
    font-size: 10px;
    letter-spacing: .01em;
}

.admin-shell .badge.positive { color: #dbe99b; background: #2c3517; }
.admin-shell .badge.warning { color: #e7eab9; background: #383b22; }
.admin-shell .badge.negative { color: #f0b0a9; background: #3a2421; }
.admin-shell .badge.neutral { color: #ced2cd; background: #303430; }

.admin-shell .table-wrap {
    max-width: 100%;
    overflow: auto;
    scrollbar-width: thin;
    scrollbar-color: #454b45 #171917;
}

.admin-shell table { min-width: 720px; }
.admin-shell th {
    padding: 12px 16px;
    color: #aeb4ad;
    background: #151715;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .09em;
}

.admin-shell td {
    padding: 14px 16px;
    border-color: var(--admin-border);
    color: #e8eae7;
}

.admin-shell tbody tr:hover td { background: #202320; }
.admin-shell th:last-child,
.admin-shell td:last-child { padding-right: 20px; }
.admin-shell .row-actions { gap: 8px; }
.admin-shell .row-actions select {
    width: auto;
    min-width: 170px;
    max-width: 260px;
}

.admin-shell .member-cell { min-width: 210px; }
.admin-shell .member-cell .avatar {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: #2d332a;
}

.admin-shell .member-cell strong { color: var(--admin-text); font-size: 13px; }
.admin-shell .member-cell span { color: var(--admin-muted); font-size: 11px; }
.admin-shell .member-cell .avatar-photo { background: #2d332a; }

.member-form-heading {
    display: flex;
    align-items: center;
    gap: 15px;
}

.member-form-heading .profile-avatar { flex: 0 0 auto; }

.admin-shell .filters {
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
    padding: 12px;
    border: 1px solid var(--admin-border);
    border-radius: 12px;
    background: var(--admin-panel);
}

.admin-shell .filters .search-box { min-width: 230px; }
.admin-shell .filters > select { width: auto; min-width: 160px; }

.admin-shell .field { gap: 7px; }
.admin-shell .field label,
.admin-shell .field-label {
    color: #d1d5d0;
    font-size: 11px;
    font-weight: 720;
    letter-spacing: .015em;
    line-height: 1.35;
    text-transform: none;
}

.admin-shell input,
.admin-shell select,
.admin-shell textarea {
    min-height: 44px;
    border-color: #424842;
    border-radius: 9px;
    color: var(--admin-text);
    background: #141614;
}

.admin-shell input:hover,
.admin-shell select:hover,
.admin-shell textarea:hover { border-color: #596059; }

.admin-shell input:focus,
.admin-shell select:focus,
.admin-shell textarea:focus {
    border-color: var(--admin-accent);
    box-shadow: 0 0 0 3px rgba(163, 194, 18, .13);
}

.admin-shell input:disabled,
.admin-shell select:disabled,
.admin-shell textarea:disabled {
    color: #8e948d;
    background: #1e211e;
    border-color: #343834;
    cursor: not-allowed;
}

.admin-shell input[type="color"] {
    min-width: 54px;
    padding: 5px;
}

.admin-shell .field > small,
.field-help {
    color: var(--admin-muted);
    font-size: 11px;
    line-height: 1.45;
}

.admin-shell .form-grid { gap: 17px; }
.admin-shell .checkbox { gap: 10px; }
.admin-shell .checkbox input {
    flex: 0 0 19px;
    width: 19px;
    height: 19px;
}

.admin-shell .checkbox span {
    color: var(--admin-muted);
    font-size: 12px;
    line-height: 1.45;
}

.admin-shell .form-actions {
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 24px;
    padding-top: 18px;
    border-color: var(--admin-border);
}

.admin-shell .subtle-box {
    border-color: var(--admin-border);
    border-radius: 11px;
    color: var(--admin-text);
    background: var(--admin-panel-soft);
}

.info-panel {
    padding: 15px 16px;
    border: 1px solid #39462b;
    border-radius: 11px;
    color: #dfe6c0;
    background: var(--admin-info-soft, #20291b);
}

.info-panel strong {
    display: block;
    margin-bottom: 3px;
    color: var(--admin-accent-hover, #bddb34);
}
.info-panel p { margin: 0; color: #bec6ad; }

.admin-shell .empty-state {
    padding: 46px 24px;
    color: var(--admin-muted);
}

.admin-shell .empty-state .empty-icon {
    width: 52px;
    height: 52px;
    color: var(--admin-accent-hover);
    background: var(--admin-accent-soft);
}

.admin-shell .empty-state h3 { color: var(--admin-text); }
.admin-shell .empty-state p { max-width: 480px; margin: 0 auto; }

/* Summary cards */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.summary-card {
    min-width: 0;
    padding: 17px 18px;
    border: 1px solid var(--admin-border);
    border-radius: 13px;
    background: var(--admin-panel);
}

.summary-card span {
    display: block;
    overflow: hidden;
    color: var(--admin-muted);
    font-size: 10px;
    font-weight: 760;
    letter-spacing: .07em;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.summary-card strong {
    display: block;
    margin-top: 7px;
    color: var(--admin-text);
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -.04em;
}

.summary-card small { display: block; margin-top: 3px; color: #858c85; }
.summary-card small a {
    color: var(--admin-accent-hover);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.summary-card.is-accent { border-color: #435221; background: linear-gradient(145deg, #252d17, #191d17); }
.summary-card.is-accent strong { color: var(--admin-accent-hover); }

/* Reusable entity management */
.resource-layout,
.management-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    align-items: start;
}

.resource-layout { grid-template-columns: minmax(0, 1.55fr) minmax(340px, .8fr); }
.class-settings-layout { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.resource-list,
.entity-list { display: grid; gap: 10px; }
.resource-list { padding: 14px; }

.create-panel,
.entity-card,
.card-management {
    border: 1px solid var(--admin-border);
    border-radius: 11px;
    background: var(--admin-panel-soft);
    overflow: clip;
}

.create-panel { margin-bottom: 14px; border-style: dashed; }

.create-panel > summary,
.entity-summary,
.card-management > summary {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 56px;
    padding: 12px 14px;
    color: var(--admin-text);
    cursor: pointer;
    list-style: none;
    transition: background .15s ease;
}

.create-panel > summary::-webkit-details-marker,
.entity-summary::-webkit-details-marker,
.card-management > summary::-webkit-details-marker { display: none; }

.create-panel > summary:hover,
.entity-summary:hover,
.card-management > summary:hover { background: #202320; }

.create-panel > summary::after,
.entity-summary::after,
.card-management > summary::after {
    content: "›";
    flex: 0 0 auto;
    margin-left: auto;
    color: #858c85;
    font-size: 22px;
    line-height: 1;
    transform: rotate(90deg);
    transition: transform .15s ease;
}

.create-panel[open] > summary::after,
.entity-card[open] > .entity-summary::after,
.card-management[open] > summary::after { transform: rotate(-90deg); }

.create-panel[open],
.entity-card[open],
.card-management[open] { border-color: var(--admin-border-strong); }

.create-panel > summary strong,
.entity-title strong { display: block; color: var(--admin-text); font-size: 13px; }
.create-panel > summary small,
.entity-title small { display: block; margin-top: 2px; color: var(--admin-muted); font-size: 11px; }

.create-icon,
.entity-icon {
    display: grid;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 10px;
    color: #11140a;
    background: var(--admin-accent);
    font-size: 15px;
    font-weight: 850;
}

.entity-icon.is-neutral { color: var(--admin-accent-hover); background: #293027; }
.entity-title { min-width: 0; flex: 1; }
.entity-summary > span:first-child { min-width: 0; flex: 1; }
.entity-summary > span:first-child strong,
.entity-summary > span:first-child small { display: block; }
.entity-summary > span:first-child strong { color: var(--admin-text); font-size: 13px; }
.entity-summary > span:first-child small {
    overflow: hidden;
    margin-top: 2px;
    color: var(--admin-muted);
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.entity-card[style*="--entity-color"] > .entity-summary { box-shadow: inset 3px 0 var(--entity-color); }
.entity-title small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.entity-meta {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 7px;
}

.entity-meta-text { color: var(--admin-muted); font-size: 11px; white-space: nowrap; }
.entity-editor-body {
    padding: 18px;
    border-top: 1px solid var(--admin-border);
    background: var(--admin-panel);
}

.entity-editor-body > form + *,
.entity-editor-body > * + .entity-lifecycle { margin-top: 16px; }

.entity-lifecycle {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 9px;
    padding-top: 15px;
    border-top: 1px solid var(--admin-border);
}

.entity-lifecycle > form { margin: 0; }
.entity-lifecycle .inline-management {
    display: flex;
    align-items: flex-end;
    flex: 1 1 330px;
    flex-wrap: wrap;
    gap: 8px;
}

.entity-lifecycle select { width: auto; min-width: 190px; flex: 1; }
.entity-card.is-archived { opacity: .82; }
.entity-card.is-archived .entity-icon { filter: grayscale(1); }

.card-management { margin-top: 14px; }
.card-management > summary { min-height: 42px; padding: 8px 11px; color: var(--admin-muted); font-size: 11px; font-weight: 750; }
.card-management-body {
    display: grid;
    gap: 10px;
    padding: 12px;
    border-top: 1px solid var(--admin-border);
}

.card-management > .entity-lifecycle {
    display: grid;
    align-items: stretch;
    padding: 14px;
    border-top: 1px solid var(--admin-border);
}

.card-management > .entity-lifecycle > p { margin: 0; }

/* Team and account management */
.entity-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--admin-border);
    background: var(--admin-panel-soft);
}

.entity-toolbar .search-box { flex: 1; min-width: 230px; max-width: none; }
.entity-toolbar select { width: auto; min-width: 155px; }
.entity-toolbar-result { margin-left: auto; color: var(--admin-muted); font-size: 11px; }

.account-list { display: grid; }
.account-row {
    display: grid;
    grid-template-columns: minmax(250px, 1.65fr) minmax(170px, .9fr) minmax(125px, .65fr) minmax(180px, .9fr) auto;
    gap: 18px;
    align-items: center;
    min-height: 78px;
    padding: 14px 18px;
    border-top: 1px solid var(--admin-border);
}

.account-row:first-child { border-top: 0; }
.account-row:hover { background: #202320; }
.account-row.is-inactive { background: #171917; }
.account-row.is-inactive .account-identity { opacity: .72; }
.account-identity { display: flex; min-width: 0; align-items: center; gap: 11px; }
.account-identity .avatar { width: 42px; height: 42px; border-radius: 12px; color: #15180d; background: var(--admin-accent); }
.account-identity > span:last-child { min-width: 0; }
.account-identity strong,
.account-identity small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-identity strong { color: var(--admin-text); font-size: 13px; }
.account-identity small { margin-top: 3px; color: var(--admin-muted); font-size: 11px; }
.account-access,
.account-activity { display: grid; justify-items: start; gap: 5px; }
.account-access small,
.account-activity small { color: var(--admin-muted); font-size: 10px; }
.account-state { display: grid; justify-items: start; gap: 5px; }
.account-action { justify-self: end; }
.account-schedule-warning { color: #dfe7b1 !important; }

.role-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.role-card {
    padding: 17px;
    border: 1px solid var(--admin-border);
    border-radius: 12px;
    background: var(--admin-panel-soft);
}

.role-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; }
.role-card-icon {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 9px;
    color: var(--admin-accent-hover);
    background: var(--admin-accent-soft);
    font-size: 10px;
    font-weight: 850;
}

.role-card h3 { margin: 0; font-size: 14px; }
.role-card p { margin: 0; color: var(--admin-muted); font-size: 11px; }
.role-points { display: grid; gap: 5px; margin: 11px 0 0; padding: 0; color: #c6cbc5; font-size: 11px; list-style: none; }
.role-points li::before { content: "✓"; margin-right: 7px; color: var(--admin-accent); font-weight: 800; }

.editor-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
    gap: 20px;
    align-items: start;
}

.editor-main,
.editor-aside { display: grid; gap: 18px; }
.editor-aside { position: sticky; top: 90px; }
.form-section { padding: 22px; }
.form-section + .form-section { margin-top: 0; }
.form-section-header { margin-bottom: 19px; }
.form-section-header h2,
.form-section-header h3 { margin: 0; color: var(--admin-text); }
.form-section-header h2 { font-size: 19px; }
.form-section-header h3 { font-size: 15px; }
.form-section-header p { margin: 5px 0 0; color: var(--admin-muted); font-size: 12px; }

.account-summary {
    display: grid;
    gap: 13px;
}

.account-summary-head { display: flex; align-items: center; gap: 11px; }
.account-summary-head .avatar { width: 44px; height: 44px; color: #11140a; background: var(--admin-accent); }
.account-summary-head h3 { margin: 0; }
.account-summary-head p { margin: 2px 0 0; color: var(--admin-muted); font-size: 11px; }
.account-summary dl { display: grid; gap: 10px; margin: 0; }
.account-summary dl > div { display: flex; justify-content: space-between; gap: 14px; padding-top: 10px; border-top: 1px solid var(--admin-border); }
.account-summary dt { color: var(--admin-muted); font-size: 11px; }
.account-summary dd { margin: 0; color: var(--admin-text); font-size: 11px; font-weight: 700; text-align: right; }

.setting-option {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 15px;
    border: 1px solid var(--admin-border);
    border-radius: 11px;
    background: var(--admin-panel-soft);
}

.setting-option .checkbox { flex: 1; }

.danger-zone {
    margin-top: 20px;
    padding: 20px;
    border: 1px solid #633c37;
    border-radius: 14px;
    background: var(--admin-danger-soft);
}

.danger-zone-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 15px;
}

.danger-zone h2,
.danger-zone h3 { margin: 0; color: #f2c2bd; }
.danger-zone p { max-width: 760px; margin: 5px 0 0; color: #cda8a4; font-size: 12px; }
.danger-zone form { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 10px; margin: 0; }
.danger-zone .field { flex: 1 1 260px; }

/* Plans */
.admin-shell .plan-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.admin-shell .plan-card {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    padding: 20px;
    overflow: visible;
}

.admin-shell .plan-card p { min-height: 0; }
.admin-shell .plan-features { color: #c2c8c1; }
.plan-status-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.admin-shell .plan-actions {
    align-items: stretch;
    margin-top: auto;
}

.admin-shell .plan-actions > .button { flex: 1; }

/* Dialogs */
.admin-shell dialog {
    max-height: calc(100vh - 40px);
    border: 1px solid var(--admin-border-strong);
    color: var(--admin-text);
    background: var(--admin-panel);
    overflow: auto;
}

.admin-shell dialog::backdrop { background: rgba(0, 0, 0, .72); }
.admin-shell .modal-head { position: sticky; top: 0; z-index: 2; align-items: center; padding: 18px 20px; border-color: var(--admin-border); background: var(--admin-panel); }
.admin-shell .modal-close { width: 40px; height: 40px; border-radius: 9px; color: var(--admin-muted); }
.admin-shell .modal-close:hover { color: var(--admin-text); background: var(--admin-panel-raised); }

@media (max-width: 1180px) {
    .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .resource-layout { grid-template-columns: 1fr; }
    .admin-shell .plan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .account-row {
        grid-template-columns: minmax(240px, 1.5fr) minmax(160px, .9fr) minmax(130px, .65fr) auto;
    }
    .account-activity { display: none; }
}

@media (max-width: 900px) {
    .admin-shell .sidebar { z-index: 40; }
    .admin-shell .sidebar-close {
        position: absolute;
        top: 17px;
        right: 14px;
        display: grid;
        width: 38px;
        height: 38px;
        place-items: center;
        border: 1px solid var(--admin-border);
        border-radius: 10px;
        color: var(--admin-text);
        background: var(--admin-panel);
        font-size: 22px;
    }
    .admin-shell .sidebar.open + .sidebar-overlay { display: block; }
    .admin-shell.menu-open { overflow: hidden; }
    .admin-shell .admin-main { margin-left: 0; }
    .admin-shell .topbar { padding: 0 20px; }
    .admin-shell .page-content { padding: 26px 20px 46px; }
    .auth-mobile-brand { display: block; }
    .club-logo-settings { grid-template-columns: 1fr; }
    .editor-grid { grid-template-columns: 1fr; }
    .editor-aside { position: static; order: -1; }
    .management-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
    .admin-shell .page-heading {
        align-items: stretch;
        flex-direction: column;
        gap: 16px;
    }

    .admin-shell .heading-actions {
        width: 100%;
        justify-content: stretch;
        flex-wrap: wrap;
    }

    .admin-shell .heading-actions .button { flex: 1 1 170px; }
    .role-grid { grid-template-columns: 1fr; }
    .club-logo-previews { grid-template-columns: 1fr; }
    .club-logo-preview { min-height: 145px; }

    .account-list { gap: 10px; padding: 12px; }
    .account-row {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 12px;
        min-height: 0;
        padding: 15px;
        border: 1px solid var(--admin-border);
        border-radius: 12px;
        background: var(--admin-panel-soft);
    }

    .account-row:first-child { border-top: 1px solid var(--admin-border); }
    .account-access { grid-column: 1 / -1; display: flex; align-items: center; flex-wrap: wrap; }
    .account-state { grid-column: 1; grid-row: 2; }
    .account-action { grid-column: 2; grid-row: 1 / span 2; align-self: end; }
    .entity-toolbar-result { width: 100%; margin-left: 0; }
}

@media (max-width: 680px) {
    .admin-shell .topbar { height: 64px; padding: 0 14px; }
    .breadcrumbs a,
    .breadcrumbs > span { display: none; }
    .admin-shell .page-content { padding: 22px 14px 40px; }
    .admin-shell .page-heading h1,
    .admin-shell .page-heading h2 { font-size: 25px; }
    .summary-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
    .summary-card { padding: 14px; }
    .summary-card strong { font-size: 21px; }
    .admin-shell .card,
    .form-section { padding: 17px; }
    .admin-shell .card-flush { padding: 0; }
    .admin-shell .card-header { padding: 15px 16px; }
    .admin-shell .section-heading { align-items: flex-start; }
    .admin-shell .form-actions { justify-content: stretch; }
    .admin-shell .form-actions .button { flex: 1 1 150px; }
    .admin-shell .filters > *,
    .admin-shell .filters > select,
    .admin-shell .filters .search-box { width: 100%; max-width: none; }
    .entity-summary { align-items: flex-start; }
    .entity-meta { display: none; }
    .entity-editor-body { padding: 15px; }
    .entity-lifecycle { align-items: stretch; }
    .entity-lifecycle > form,
    .entity-lifecycle .inline-management,
    .entity-lifecycle .button,
    .entity-lifecycle select { width: 100%; max-width: none; }
    .admin-shell .plan-grid { grid-template-columns: 1fr; }
    .danger-zone form,
    .danger-zone .field,
    .danger-zone .button { width: 100%; }
    .today { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}

/* Admin content patterns used across domain screens */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.heading-with-status { margin-top: 9px !important; }
.form-notice { margin-bottom: 19px; }
.finance-summary { max-width: 780px; margin-left: auto; }
.table-action-cell { text-align: right; white-space: nowrap; }
.table-note { display: block; max-width: 230px; margin-top: 5px; color: var(--admin-muted); line-height: 1.4; }

.form-save-bar {
    position: sticky;
    bottom: 14px;
    z-index: 12;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid var(--admin-border-strong);
    border-radius: 13px;
    background: rgba(25, 27, 25, .96);
    box-shadow: 0 16px 45px rgba(0, 0, 0, .32);
    backdrop-filter: blur(12px);
}

.announcement-heading h2 { margin: 9px 0 3px !important; }
.announcement-body {
    max-width: 900px;
    border-top: 1px solid var(--admin-border);
    padding-top: 12px;
}

.announcement-body > summary {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--admin-accent-hover);
    cursor: pointer;
    font-size: 11px;
    font-weight: 750;
}

.announcement-body > summary::after { content: "↓"; font-size: 10px; }
.announcement-body[open] > summary::after { content: "↑"; }
.announcement-body p { margin: 13px 0 0; color: #d4d8d3; }
.announcement-management { max-width: 620px; }
.profile-management { margin-bottom: 18px; }

.section-divider {
    margin-top: 20px;
    padding-top: 19px;
    border-top: 1px solid var(--admin-border);
}

.section-divider h3 { margin: 0 0 3px; }
.section-divider > p { margin-bottom: 13px; }
.transaction-list { display: grid; gap: 9px; }
.transaction-item {
    padding: 14px;
    border: 1px solid var(--admin-border);
    border-radius: 11px;
    background: var(--admin-panel-soft);
}

.transaction-main { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.transaction-main strong,
.transaction-main small { display: block; }
.transaction-main strong { font-size: 15px; }
.transaction-main small { margin-top: 3px; color: var(--admin-muted); }
.transaction-item .card-management { margin-bottom: 0; }
.invoice-corrections { margin-top: 0; }
.invoice-corrections form { display: block; width: 100%; }
.inline-form { display: flex; align-items: center; gap: 7px; min-width: 240px; }
.inline-form select { min-width: 125px; }
.lesson-management { margin: 0 0 18px; }
.filter-checkbox { min-width: 160px; }
.audit-context > summary {
    color: var(--admin-accent-hover);
    cursor: pointer;
    font-size: 11px;
    font-weight: 700;
}

.audit-context code {
    display: block;
    max-width: 420px;
    margin-top: 8px;
    padding: 9px;
    overflow: auto;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    color: #cbd0ca;
    background: #121412;
    font-size: 10px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.purchase-lines { display: grid; gap: 9px; }
.purchase-line {
    display: grid;
    grid-template-columns: 34px minmax(220px, 1.6fr) minmax(100px, .45fr) minmax(130px, .6fr) minmax(120px, .55fr) 40px;
    gap: 12px;
    align-items: end;
    padding: 13px;
    border: 1px solid var(--admin-border);
    border-radius: 11px;
    background: var(--admin-panel-soft);
}

.purchase-line-number {
    display: grid;
    width: 30px;
    height: 30px;
    margin-bottom: 7px;
    place-items: center;
    border-radius: 8px;
    color: var(--admin-accent-hover);
    background: var(--admin-accent-soft);
    font-size: 11px;
    font-weight: 800;
}

.purchase-line-total {
    display: grid;
    gap: 5px;
    min-height: 44px;
    align-content: center;
}

.purchase-line-total span,
.purchase-total span {
    color: var(--admin-muted);
    font-size: 9px;
    font-weight: 750;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.purchase-line-total strong { color: var(--admin-text); font-size: 13px; }
.purchase-line-remove { margin-bottom: 2px; color: var(--admin-danger) !important; }
.purchase-total {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 18px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--admin-border);
}

.purchase-total strong { color: var(--admin-accent-hover); font-size: 22px; }
.calendar-scroll { min-width: 0; }

.coaching-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    align-items: start;
}

.coaching-column { display: grid; gap: 11px; min-width: 0; }
.subsection-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.subsection-heading h3 { margin: 0; }
.record-list { display: grid; gap: 8px; }
.record-editor {
    border: 1px solid var(--admin-border);
    border-radius: 10px;
    background: var(--admin-panel-soft);
    overflow: clip;
}

.record-editor > summary {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-height: 58px;
    padding: 12px;
    cursor: pointer;
    list-style: none;
}

.record-editor > summary::-webkit-details-marker { display: none; }
.record-editor > summary:hover { background: #202320; }
.record-editor[open] { border-color: var(--admin-border-strong); }
.record-copy { flex: 1; min-width: 0; }
.record-copy strong,
.record-copy small { display: block; }
.record-copy strong {
    overflow: hidden;
    color: var(--admin-text);
    font-size: 12px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.record-copy small {
    overflow: hidden;
    margin-top: 4px;
    color: var(--admin-muted);
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.empty-state-compact { padding: 20px 12px !important; }
.empty-state-compact h3 { font-size: 14px; }
.empty-state-compact p { font-size: 11px; }
.dashboard-announcement p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}
.membership-management { margin-top: 11px; }
.membership-delete { margin: 11px 0 0; }
.membership-history-note { margin: 11px 0 0; font-size: 11px; }
.definition-grid-single { grid-template-columns: 1fr; }

/* Analytics */
.analytics-filter {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) auto;
    gap: 18px 26px;
    align-items: end;
    margin-bottom: 14px;
}

.analytics-filter-copy h2 { margin: 0; color: var(--admin-text); font-size: 17px; }
.analytics-filter-copy p { max-width: 660px; margin: 5px 0 0; color: var(--admin-muted); font-size: 12px; }
.analytics-filter-controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(145px, 180px)) auto;
    gap: 9px;
    align-items: end;
}

.analytics-filter-controls .field { min-width: 0; }
.analytics-presets {
    display: flex;
    grid-column: 1 / -1;
    flex-wrap: wrap;
    gap: 7px;
    padding-top: 2px;
}

.analytics-preset {
    display: inline-flex;
    min-height: 31px;
    align-items: center;
    padding: 0 11px;
    border: 1px solid var(--admin-border);
    border-radius: 999px;
    color: var(--admin-muted);
    background: var(--admin-panel-soft);
    font-size: 10px;
    font-weight: 750;
}

.analytics-preset:hover,
.analytics-preset.is-active {
    color: #11140a;
    background: var(--admin-accent);
    border-color: var(--admin-accent);
}

.analytics-period-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 20px;
    color: var(--admin-muted);
    font-size: 11px;
}

.analytics-period-summary strong { color: var(--admin-text); }
.analytics-section-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 24px;
    padding: 8px;
    border: 1px solid var(--admin-border);
    border-radius: 12px;
    background: var(--admin-panel);
}

.analytics-section-nav a {
    display: inline-flex;
    min-height: 35px;
    align-items: center;
    padding: 0 12px;
    border-radius: 8px;
    color: var(--admin-muted);
    font-size: 11px;
    font-weight: 750;
}

.analytics-section-nav a:hover { color: var(--admin-text); background: var(--admin-panel-raised); }
.analytics-section { scroll-margin-top: 90px; }
.analytics-section + .analytics-section { margin-top: 34px; }
.analytics-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
}

.analytics-section-head h2 { margin: 0; color: var(--admin-text); font-size: 21px; }
.analytics-section-head p { max-width: 760px; margin: 5px 0 0; color: var(--admin-muted); font-size: 12px; }
.analytics-section-index {
    color: #657063;
    font-size: 10px;
    font-weight: 850;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.analytics-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.analytics-kpi {
    min-width: 0;
    padding: 17px;
    border: 1px solid var(--admin-border);
    border-radius: 13px;
    background: var(--admin-panel);
}

.analytics-kpi.is-accent {
    border-color: #435221;
    background: linear-gradient(145deg, #252d17, #191d17);
}

.analytics-kpi-label {
    display: block;
    overflow: hidden;
    color: var(--admin-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .08em;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.analytics-kpi-value {
    display: block;
    margin-top: 7px;
    color: var(--admin-text);
    font-size: 25px;
    font-weight: 820;
    letter-spacing: -.045em;
    line-height: 1.15;
}

.analytics-kpi.is-accent .analytics-kpi-value { color: var(--admin-accent-hover); }
.analytics-kpi small { display: block; margin-top: 5px; color: #858c85; font-size: 10px; line-height: 1.4; }
.analytics-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
}

.analytics-grid-main { grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr); }
.analytics-panel { min-width: 0; }
.analytics-panel + .analytics-panel { margin-top: 16px; }
.analytics-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 17px;
}

.analytics-panel-head h3 { margin: 0; color: var(--admin-text); font-size: 16px; }
.analytics-panel-head p { margin: 4px 0 0; color: var(--admin-muted); font-size: 11px; }
.analytics-panel-head .badge { flex: 0 0 auto; }
.analytics-bar-list { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.analytics-bar-item { min-width: 0; }
.analytics-bar-head,
.analytics-bar-meta {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
}

.analytics-bar-head strong {
    overflow: hidden;
    color: var(--admin-text);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.analytics-bar-head > span { flex: 0 0 auto; color: var(--admin-text); font-size: 11px; font-weight: 760; }
.analytics-bar-track {
    height: 7px;
    margin: 7px 0 6px;
    overflow: hidden;
    border-radius: 999px;
    background: #2a2e2a;
}

.analytics-bar-fill {
    display: block;
    width: var(--analytics-value, 0%);
    min-width: var(--analytics-min, 0);
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #7f9810, var(--admin-accent-hover));
}

.analytics-bar-fill.is-secondary { background: linear-gradient(90deg, #4e594b, #8f9b8d); }
.analytics-bar-fill.is-danger { background: linear-gradient(90deg, #8f3e37, #d66f65); }
.analytics-bar-meta { color: #858c85; font-size: 9px; }
.analytics-bar-meta span:last-child { text-align: right; }
.analytics-compact-list { display: grid; gap: 8px; }
.analytics-compact-row {
    display: grid;
    grid-template-columns: minmax(90px, 1fr) minmax(100px, 1.5fr) auto;
    gap: 10px;
    align-items: center;
    min-height: 34px;
}

.analytics-compact-row > span:first-child {
    overflow: hidden;
    color: #d9ddd8;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.analytics-compact-row .analytics-bar-track { margin: 0; }
.analytics-compact-row strong { min-width: 44px; color: var(--admin-text); font-size: 10px; text-align: right; }
.analytics-empty {
    display: grid;
    min-height: 180px;
    place-items: center;
    padding: 28px;
    text-align: center;
}

.analytics-empty > div { max-width: 470px; }
.analytics-empty-icon {
    display: grid;
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    place-items: center;
    border-radius: 13px;
    color: var(--admin-accent-hover);
    background: var(--admin-accent-soft);
    font-size: 18px;
}

.analytics-empty h3 { margin: 0 0 5px; color: var(--admin-text); font-size: 15px; }
.analytics-empty p { margin: 0; color: var(--admin-muted); font-size: 11px; }
.analytics-table-note { display: block; margin-top: 3px; color: var(--admin-muted); font-size: 10px; }
.analytics-rate-unavailable { color: #777e77; }
.analytics-method {
    margin-top: 16px;
    border-top: 1px solid var(--admin-border);
    padding-top: 13px;
}

.analytics-method > summary {
    color: var(--admin-accent-hover);
    cursor: pointer;
    font-size: 10px;
    font-weight: 760;
}

.analytics-method p,
.analytics-method ul { max-width: 920px; margin: 10px 0 0; color: var(--admin-muted); font-size: 10px; }
.analytics-method ul { padding-left: 18px; }
.analytics-method li + li { margin-top: 4px; }
.analytics-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    color: var(--admin-muted);
    font-size: 9px;
}

.analytics-legend span { display: inline-flex; align-items: center; gap: 5px; }
.analytics-legend i { width: 8px; height: 8px; border-radius: 2px; background: var(--admin-accent); }
.analytics-legend .is-secondary { background: #8f9b8d; }
.analytics-legend .is-danger { background: #d66f65; }

.analytics-chart {
    --analytics-chart-primary: var(--admin-accent-hover);
    --analytics-chart-secondary: #9aa69a;
    --analytics-chart-danger: var(--admin-danger);
    --analytics-chart-muted: #747d74;
    display: grid;
    min-width: 0;
    gap: 11px;
    margin: 0;
}

.analytics-chart-stage {
    position: relative;
    width: 100%;
    min-width: 0;
    height: 300px;
    isolation: isolate;
}

.analytics-chart-svg {
    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: inherit;
    font-variant-numeric: tabular-nums;
}

.analytics-chart-grid,
.analytics-chart-zero {
    fill: none;
    vector-effect: non-scaling-stroke;
}

.analytics-chart-grid {
    stroke: var(--admin-border);
    stroke-width: 1;
}

.analytics-chart-zero {
    stroke: var(--admin-border-strong);
    stroke-width: 1.5;
}

.analytics-chart-axis-label {
    fill: var(--admin-muted);
    font-size: 11px;
    font-weight: 650;
}

.analytics-chart-axis-label-x { font-weight: 700; }

.analytics-chart-series.is-primary {
    --analytics-chart-series-color: var(--analytics-chart-primary);
}

.analytics-chart-series.is-secondary {
    --analytics-chart-series-color: var(--analytics-chart-secondary);
}

.analytics-chart-series.is-danger {
    --analytics-chart-series-color: var(--analytics-chart-danger);
}

.analytics-chart-series.is-muted {
    --analytics-chart-series-color: var(--analytics-chart-muted);
}

.analytics-chart-line {
    fill: none;
    stroke: var(--analytics-chart-series-color);
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
}

.analytics-chart-line.is-dashed { stroke-dasharray: 7 5; }
.analytics-chart-line.is-dotted { stroke-dasharray: 1 5; }

.analytics-chart-point {
    fill: var(--admin-panel);
    stroke: var(--analytics-chart-series-color);
    stroke-width: 2;
    vector-effect: non-scaling-stroke;
}

.analytics-chart-column {
    fill: var(--analytics-chart-series-color);
    opacity: .9;
}

.analytics-chart-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px 15px;
    min-width: 0;
    margin: 0;
    padding: 0;
    color: var(--admin-muted);
    font-size: 11px;
    font-weight: 650;
    list-style: none;
}

.analytics-chart-legend li {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    gap: 7px;
}

.analytics-chart-legend-mark {
    display: inline-block;
    flex: 0 0 auto;
    width: 18px;
    color: var(--analytics-chart-series-color);
}

.analytics-chart-legend-mark.is-line {
    height: 0;
    border-top: 2px solid currentColor;
}

.analytics-chart-legend-mark.is-line.is-dashed { border-top-style: dashed; }
.analytics-chart-legend-mark.is-line.is-dotted { border-top-style: dotted; }
.analytics-chart-legend-mark.is-bar {
    width: 12px;
    height: 8px;
    border-radius: 2px;
    background: currentColor;
}

.analytics-chart figcaption,
.analytics-chart-caption {
    margin: 0;
    color: var(--admin-muted);
    font-size: 11px;
}

.analytics-chart-caption {
    display: grid;
    gap: 3px;
}

.analytics-chart-caption strong {
    color: var(--admin-text);
    font-size: 13px;
    font-weight: 780;
}

.analytics-chart-caption span {
    max-width: 680px;
    line-height: 1.45;
}

.analytics-chart-loading {
    position: absolute;
    inset: 0;
    display: grid;
    margin: 0;
    place-items: center;
    color: var(--admin-muted);
    font-size: 11px;
}

.analytics-chart-data {
    margin-top: 2px;
    padding-top: 9px;
    border-top: 1px solid var(--admin-border);
}

.analytics-chart-data > summary {
    color: var(--admin-muted);
    cursor: pointer;
    font-size: 10px;
    font-weight: 750;
}

.analytics-chart-data > summary:hover { color: var(--admin-accent-hover); }
.analytics-chart-data[open] > summary { color: var(--admin-text); }
.analytics-chart-data .table-wrap {
    margin-top: 10px;
    border: 1px solid var(--admin-border);
    border-radius: 10px;
}

.admin-shell .analytics-chart-data table { min-width: 560px; }
.analytics-chart-data table caption {
    padding: 10px 12px;
    color: var(--admin-muted);
    background: var(--admin-panel-soft);
    font-size: 10px;
    text-align: left;
}

.analytics-trend-panel { overflow: hidden; }
.analytics-chart-stack {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    min-width: 0;
}

.analytics-chart-stack > .analytics-chart + .analytics-chart {
    padding-left: 24px;
    border-left: 1px solid var(--admin-border);
}

.analytics-chart.is-rendered .analytics-chart-data-source {
    position: absolute !important;
    width: 1px !important;
    min-width: 0 !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

@media (max-width: 1180px) {
    .analytics-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .analytics-grid-main { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
    .analytics-filter { grid-template-columns: 1fr; }
    .analytics-filter-controls { justify-self: stretch; }
    .analytics-chart-stack { grid-template-columns: 1fr; gap: 20px; }
    .analytics-chart-stack > .analytics-chart + .analytics-chart {
        padding-top: 20px;
        padding-left: 0;
        border-top: 1px solid var(--admin-border);
        border-left: 0;
    }
}

@media (max-width: 760px) {
    .analytics-grid { grid-template-columns: 1fr; }
    .analytics-section-head { align-items: flex-start; flex-direction: column; gap: 7px; }
    .analytics-chart-stage { height: 275px; }
}

@media (max-width: 560px) {
    .analytics-filter-controls { grid-template-columns: 1fr 1fr; }
    .analytics-filter-controls .button { grid-column: 1 / -1; }
    .analytics-kpi-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
    .analytics-kpi { padding: 14px; }
    .analytics-kpi-value { font-size: 21px; }
    .analytics-compact-row { grid-template-columns: minmax(82px, 1fr) minmax(70px, 1fr) auto; }
    .analytics-chart-stage { height: 250px; }
    .analytics-chart-legend { gap: 6px 12px; }
}

/* Team entity rows */
.admin-shell .entity-list { gap: 0; }
.entity-row {
    display: grid;
    grid-template-columns: minmax(220px, 1.15fr) minmax(240px, 1.2fr) minmax(210px, 1fr) auto;
    gap: 18px;
    align-items: center;
    min-height: 82px;
    padding: 14px 18px;
    border-top: 1px solid var(--admin-border);
}

.entity-row:first-child { border-top: 0; }
.entity-row:hover { background: #202320; }
.entity-primary { display: flex; min-width: 0; align-items: center; gap: 11px; }
.entity-primary .avatar { width: 42px; height: 42px; border-radius: 12px; color: #11140a; background: var(--admin-accent); }
.entity-primary > span:last-child { min-width: 0; }
.entity-primary strong,
.entity-primary small { display: block; }
.entity-primary strong { color: var(--admin-text); font-size: 13px; }
.entity-primary > span > small {
    overflow: hidden;
    margin-top: 3px;
    color: var(--admin-muted);
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.entity-primary strong .badge { display: inline-flex; margin-left: 5px; vertical-align: middle; }
.entity-row .entity-meta { justify-content: flex-start; }
.entity-activity { display: grid; gap: 4px; color: var(--admin-muted); font-size: 10px; }
.entity-activity span,
.entity-activity small { display: block; }
.entity-activity strong { color: #dce0db; font-weight: 700; }
.entity-actions { justify-self: end; }

.admin-shell .account-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
    padding: 16px 18px;
    border: 1px solid var(--admin-border);
    border-radius: 13px;
    background: linear-gradient(135deg, #20251d, #191b19);
}

.editor-sidebar {
    position: sticky;
    top: 90px;
    display: grid;
    gap: 18px;
}

.role-summary { margin: 19px 0 0; }
.role-summary .summary-card { min-height: 112px; }
.role-summary .summary-card small { margin-top: 8px; color: var(--admin-muted); line-height: 1.45; }
.dependency-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 13px; }
.dependency-notice {
    margin-bottom: 15px;
    padding: 14px 15px;
    border: 1px solid #6d4a34;
    border-radius: 10px;
    background: #30241b;
}

.dependency-notice strong { color: #efc19e; }
.dependency-notice p { margin: 4px 0 0; color: #d4b49d; }
.lifecycle-zone .entity-lifecycle { padding-top: 0; border-top: 0; }

@media (max-width: 1180px) {
    .entity-row {
        grid-template-columns: minmax(220px, 1.1fr) minmax(230px, 1.1fr) auto;
    }
    .entity-activity { display: none; }
    .purchase-line {
        grid-template-columns: 30px minmax(210px, 1.4fr) minmax(90px, .45fr) minmax(120px, .6fr) 40px;
    }
    .purchase-line-total { grid-column: 2 / 5; grid-row: 2; display: flex; align-items: baseline; justify-content: flex-end; }
    .purchase-line-remove { grid-column: 5; grid-row: 1; }
}

@media (max-width: 900px) {
    .editor-sidebar { position: static; }
    .finance-summary { max-width: none; margin-left: 0; }
    .coaching-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
    .entity-list { gap: 10px !important; padding: 12px; }
    .entity-row {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 12px;
        min-height: 0;
        padding: 15px;
        border: 1px solid var(--admin-border);
        border-radius: 12px;
        background: var(--admin-panel-soft);
    }
    .entity-row:first-child { border-top: 1px solid var(--admin-border); }
    .entity-row .entity-meta {
        display: flex;
        grid-column: 1 / -1;
        grid-row: 2;
    }
    .entity-actions { grid-column: 2; grid-row: 1; align-self: center; }
    .admin-shell .account-summary { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 680px) {
    .form-save-bar { position: static; align-items: stretch; }
    .form-save-bar .heading-actions,
    .form-save-bar .button { width: 100%; }
    .transaction-main { align-items: flex-start; flex-direction: column; }
    .inline-form { min-width: 0; align-items: stretch; flex-direction: column; }
    .inline-form select,
    .inline-form .button { width: 100%; }
    .purchase-line {
        grid-template-columns: 30px minmax(0, 1fr) 40px;
        align-items: start;
    }
    .purchase-line-number { grid-column: 1; grid-row: 1; margin: 0; }
    .purchase-line-description { grid-column: 2; grid-row: 1; }
    .purchase-line-remove { grid-column: 3; grid-row: 1; margin: 0; }
    .purchase-line > .field:not(.purchase-line-description) { grid-column: 2 / -1; }
    .purchase-line-total { grid-column: 2 / -1; grid-row: auto; justify-content: space-between; }
    .schedule-card-month { overflow: visible; }
    .schedule-card-month .schedule-toolbar {
        min-width: 0;
        grid-template-columns: 1fr;
        justify-items: stretch;
    }
    .schedule-card-month .schedule-range { order: -1; }
    .schedule-card-month .calendar-navigation { justify-content: center; }
    .schedule-card-month .calendar-view-switch { justify-self: stretch; }
    .calendar-scroll { overflow-x: auto; overscroll-behavior-inline: contain; }
    .schedule-card-month .calendar-scroll .calendar-weekdays,
    .schedule-card-month .calendar-scroll .schedule-calendar { min-width: 780px; }
}

/* Events, verified patches and opt-in member community */
.event-patch-frame {
    display: grid;
    flex: 0 0 auto;
    width: 112px;
    height: 112px;
    place-items: center;
    overflow: hidden;
    border: 1px solid #414841;
    border-radius: 24px;
    background:
        radial-gradient(circle at 35% 30%, rgba(163, 194, 18, .16), transparent 42%),
        #131513;
    box-shadow: inset 0 0 0 5px rgba(255,255,255,.025);
}

.event-patch-frame img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.event-patch-frame-admin { width: 120px; height: 120px; }
.event-patch-frame-large { width: 180px; height: 180px; border-radius: 34px; }
.event-status-line { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.event-meta-line { margin: 0; color: #b8beb7; font-size: 12px; }
.event-description {
    display: -webkit-box;
    margin: 8px 0 0;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.event-admin-grid { display: grid; gap: 13px; }
.event-admin-card {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr) auto;
    gap: 19px;
    align-items: center;
}
.event-admin-copy { min-width: 0; }
.event-admin-copy h2 { margin: 7px 0 3px; font-size: 19px; }
.event-admin-copy h2 a:hover { color: var(--orange-dark); }
.event-counts { display: flex; flex-wrap: wrap; gap: 15px; margin-top: 13px; color: #aab0aa; font-size: 10px; }
.event-counts strong { color: #f5f5f5; }
.event-admin-actions { display: grid; gap: 7px; min-width: 112px; }
.event-management { grid-column: 1 / -1; margin: 0 -20px -20px; border-width: 1px 0 0; border-radius: 0 0 var(--radius) var(--radius); }
.event-management .card-management-body { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.event-management .card-management-body p { margin: 0; }

.event-patch-preview {
    width: min(180px, 100%);
    margin: 0 auto;
    overflow: hidden;
    border: 1px solid var(--admin-border);
    border-radius: 28px;
    background: #131513;
}
.event-patch-preview img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }

.event-detail-hero {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 27px;
    align-items: center;
    margin-bottom: 18px;
    background: linear-gradient(135deg, #1d211a, #181a18);
}
.event-detail-hero h2 { margin: 10px 0 6px; font-size: 27px; }
.event-detail-hero p { max-width: 800px; margin-bottom: 12px; color: #c7cbc6; }
.event-review-section { margin-bottom: 18px; }
.event-review-list { display: grid; }
.event-review-row {
    display: grid;
    grid-template-columns: minmax(220px, 1.1fr) minmax(210px, .9fr) minmax(260px, 1.25fr);
    gap: 18px;
    align-items: center;
    padding: 17px 20px;
    border-top: 1px solid var(--line);
}
.event-review-row:first-child { border-top: 0; }
.event-review-person { display: flex; min-width: 0; align-items: center; gap: 11px; }
.event-review-person > span:last-child { min-width: 0; }
.event-review-person strong,
.event-review-person small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.event-review-person small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.event-review-person a:hover { color: var(--orange-dark); }
.event-result-link {
    min-width: 0;
    overflow: hidden;
    color: var(--orange-dark);
    font-size: 12px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.event-review-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.inline-review-form { position: relative; }
.inline-review-form > summary {
    color: #e98a80;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}
.inline-review-form[open] {
    width: 100%;
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #161816;
}
.inline-review-form[open] > summary { margin-bottom: 10px; }
.inline-review-form form { display: grid; gap: 9px; }
.inline-review-form textarea { min-height: 76px; }
.event-history-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.event-history-list { display: grid; }
.event-history-list > article {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
    padding: 16px 20px;
    border-top: 1px solid var(--line);
}
.event-history-list > article:first-child { border-top: 0; }
.event-history-list strong,
.event-history-list small { display: block; }
.event-history-list small { margin: 3px 0 7px; color: var(--muted); font-size: 10px; }
.event-history-list p { margin: 4px 0 7px; color: #d5b5b1; font-size: 11px; }
.event-history-list a { color: var(--orange-dark); font-size: 11px; font-weight: 700; }

.community-tabs {
    display: inline-flex;
    gap: 4px;
    margin: -5px 0 22px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: #171917;
}
.community-tabs a { padding: 9px 15px; border-radius: 8px; color: #aeb4ae; font-size: 12px; font-weight: 700; }
.community-tabs a:hover { color: #f5f5f5; }
.community-tabs a.active { color: #11140b; background: var(--orange); }

.portal-event-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.portal-event-card { display: flex; min-height: 100%; flex-direction: column; gap: 17px; }
.portal-event-card.is-earned { border-color: #526421; box-shadow: 0 14px 36px rgba(163,194,18,.10); }
.portal-event-head { display: flex; align-items: center; gap: 17px; }
.portal-event-head > div:last-child { min-width: 0; }
.portal-event-head h2 { margin: 7px 0 3px; font-size: 20px; }
.portal-event-description { margin: 0; color: #c1c6c0; }
.event-earned-panel {
    margin-top: auto;
    padding: 15px;
    border: 1px solid #4c5e1d;
    border-radius: 11px;
    background: linear-gradient(135deg, #2b3513, #202713);
}
.event-earned-panel strong { color: #e4efb4; }
.event-earned-panel p { margin: 4px 0 8px; color: #bdc796; font-size: 12px; }
.event-earned-panel a { color: var(--orange-dark); font-size: 11px; font-weight: 800; }
.event-pending-panel a { color: var(--orange-dark); font-size: 11px; font-weight: 700; }
.event-inline-alert { margin: 0; align-items: flex-start; }
.event-claim-form { display: grid; gap: 13px; margin-top: auto; }
.event-claim-form .checkbox { align-items: center; }
.event-update-proof { border-top: 1px solid var(--line); padding-top: 12px; }
.event-update-proof > summary { color: var(--orange-dark); font-size: 11px; font-weight: 700; cursor: pointer; }
.event-update-proof[open] > summary { margin-bottom: 12px; }
.event-withdraw-form { padding-top: 2px; }

.community-privacy-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
    padding: 17px 19px;
    border: 1px solid #4b504b;
    border-radius: 13px;
    background: #1a1c1a;
}
.community-privacy-banner.is-visible { border-color: #4b5e1c; background: #222916; }
.community-privacy-banner strong { color: #f1f3ee; }
.community-privacy-banner p { margin: 4px 0 0; color: #aeb4ad; font-size: 12px; }
.community-search { margin-bottom: 18px; }
.community-search .search-box { max-width: 460px; }
.community-member-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.community-member-card {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    transition: transform .16s ease, border-color .16s ease;
}
.community-member-card:hover { border-color: #596555; transform: translateY(-2px); }
.community-avatar,
.community-profile-photo {
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid #444a44;
    border-radius: 22px;
    background: #303530;
    object-fit: cover;
}
.community-avatar { width: 72px; height: 72px; }
.community-avatar-fallback { color: #11140b; background: var(--orange); font-size: 18px; font-weight: 800; }
.community-member-copy { min-width: 0; }
.community-member-copy strong,
.community-member-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.community-member-copy small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.community-card-arrow { color: var(--orange-dark); font-size: 18px; }
.community-profile-hero {
    display: flex;
    align-items: center;
    gap: 21px;
    margin-bottom: 18px;
    padding: 24px;
    border: 1px solid #343934;
    border-radius: var(--radius);
    background: linear-gradient(135deg, #000, #1c2119);
}
.community-profile-photo { width: 132px; height: 132px; border-radius: 30px; }
.community-profile-hero h2 { margin: 8px 0 3px; font-size: 27px; }
.community-profile-hero p { margin: 0; color: #aeb4ad; }
.community-privacy-footnote { margin: 13px 0 0; color: #8f968e; font-size: 10px; text-align: center; }

.event-badge-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.event-badge-grid-compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.event-badge-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: #181a18;
}
.event-badge-card img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; background: #111; }
.event-badge-card > div { padding: 13px; }
.event-badge-card h3 { margin: 0 0 3px; font-size: 13px; }
.event-badge-card p { margin: 0; color: var(--muted); font-size: 10px; }
.event-badge-share-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.event-badge-share-actions form { margin: 0; }
.event-badge-share-actions .button { min-height: 32px; padding: 6px 9px; font-size: 9px; }
.public-share-ready {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 10px;
    margin: 17px 0;
    padding: 14px;
    border: 1px solid #526421;
    border-radius: 12px;
    background: #232b16;
}
.public-share-ready strong,
.public-share-ready small { display: block; }
.public-share-ready small {
    max-width: 100%;
    margin-top: 3px;
    overflow: hidden;
    color: #bdc796;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.public-share-shell {
    min-height: 100vh;
    background:
        radial-gradient(circle at 12% 18%, rgba(163,194,18,.14), transparent 28%),
        radial-gradient(circle at 88% 40%, rgba(163,194,18,.08), transparent 25%),
        #0d0f0d;
}
.public-share-shell :focus-visible {
    outline: 3px solid rgba(163,194,18,.55);
    outline-offset: 3px;
}
.public-share-header {
    border-bottom: 1px solid #292d29;
    background: rgba(0,0,0,.82);
    backdrop-filter: blur(15px);
}
.public-share-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(1120px, calc(100% - 40px));
    min-height: 78px;
    margin: 0 auto;
}
.brand-public { padding-left: 0; }
.public-share-label {
    color: #92998f;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .15em;
    text-transform: uppercase;
}
.public-share-content { width: min(1120px, calc(100% - 40px)); margin: 0 auto; padding: 58px 0 34px; }
.public-profile-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    padding: 34px;
    overflow: hidden;
    border: 1px solid #343a34;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(255,255,255,.045), rgba(163,194,18,.08));
    box-shadow: 0 24px 70px rgba(0,0,0,.24);
}
.public-profile-identity { display: flex; align-items: center; gap: 25px; min-width: 0; }
.public-profile-photo {
    display: grid;
    flex: 0 0 auto;
    width: 150px;
    height: 150px;
    place-items: center;
    overflow: hidden;
    border: 1px solid #4d554d;
    border-radius: 34px;
    object-fit: cover;
}
.public-profile-initials { color: #10130a; background: var(--orange); font-size: 40px; font-weight: 900; }
.public-profile-hero .kicker,
.public-section-heading .kicker { color: var(--orange-dark); font-size: 9px; letter-spacing: .14em; }
.public-profile-hero h1 { margin: 8px 0 5px; font-size: clamp(34px, 5vw, 58px); line-height: 1; }
.public-profile-hero p { margin: 0; color: #aeb5ad; }
.public-patch-collection { margin-top: 28px; }
.public-section-heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: 16px; }
.public-section-heading h2 { margin: 4px 0 0; font-size: 27px; }
.public-patch-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px; }
.public-patch-card {
    overflow: hidden;
    border: 1px solid #303530;
    border-radius: 18px;
    background: #161816;
    transition: transform .18s ease, border-color .18s ease;
}
.public-patch-card:hover { border-color: #566255; transform: translateY(-3px); }
.public-patch-card img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }
.public-patch-card > div { padding: 17px; }
.public-patch-card h3 { margin: 8px 0 3px; font-size: 18px; }
.public-patch-card p { margin: 0; color: #9da49c; font-size: 11px; }
.public-verified-mark { color: #d9e99c; font-size: 9px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.public-text-button {
    margin-top: 13px;
    padding: 0;
    border: 0;
    color: var(--orange-dark);
    background: transparent;
    font-size: 11px;
    font-weight: 800;
}
.public-empty-state {
    display: grid;
    min-height: 240px;
    place-items: center;
    align-content: center;
    border: 1px dashed #363c36;
    border-radius: 18px;
    color: #8f968e;
}
.public-empty-state span { color: var(--orange); font-size: 28px; }
.public-empty-state p { margin: 8px 0 0; }
.public-single-patch {
    display: grid;
    grid-template-columns: minmax(320px, .9fr) minmax(360px, 1.1fr);
    align-items: center;
    gap: clamp(40px, 7vw, 90px);
    min-height: 620px;
}
.public-single-patch-art { position: relative; padding: 7%; }
.public-single-patch-art img {
    position: relative;
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid #4a514a;
    border-radius: 28%;
    box-shadow: 0 35px 80px rgba(0,0,0,.48);
    transform: rotate(-2deg);
}
.public-patch-glow {
    position: absolute;
    inset: 16%;
    border-radius: 50%;
    background: rgba(163,194,18,.25);
    filter: blur(60px);
}
.public-single-patch-copy h1 { margin: 13px 0 12px; font-size: clamp(40px, 6vw, 72px); line-height: .96; }
.public-achievement-line { color: #b8beb7; font-size: 16px; }
.public-achievement-line strong { color: #f5f5f5; }
.public-patch-details { display: grid; gap: 0; margin: 28px 0; border-top: 1px solid #303530; }
.public-patch-details div { display: grid; grid-template-columns: 105px 1fr; gap: 18px; padding: 11px 0; border-bottom: 1px solid #303530; }
.public-patch-details dt { color: #818881; font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.public-patch-details dd { margin: 0; font-weight: 650; }
.public-patch-description { max-width: 640px; color: #a8afa7; }
.public-share-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.public-privacy-note { margin: 28px auto 0; color: #777f77; font-size: 10px; text-align: center; }
.public-share-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: min(1120px, calc(100% - 40px));
    margin: 35px auto 0;
    padding: 25px 0 35px;
    border-top: 1px solid #292d29;
    color: #7f867e;
    font-size: 10px;
}
.public-share-footer p { margin: 0; }
.public-share-footer a { color: var(--orange-dark); font-weight: 800; }

@media (max-width: 1180px) {
    .portal-event-grid,
    .event-history-grid { grid-template-columns: 1fr; }
    .community-member-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .event-review-row { grid-template-columns: minmax(200px, 1fr) minmax(190px, .9fr); }
    .event-review-actions { grid-column: 1 / -1; justify-content: flex-start; }
    .public-patch-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
    .event-admin-card { grid-template-columns: 92px minmax(0, 1fr); align-items: start; }
    .event-patch-frame-admin { width: 92px; height: 92px; border-radius: 20px; }
    .event-admin-actions { grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .event-detail-hero { grid-template-columns: 110px minmax(0, 1fr); gap: 17px; }
    .event-patch-frame-large { width: 110px; height: 110px; border-radius: 24px; }
    .event-detail-hero h2 { font-size: 22px; }
    .event-review-row { grid-template-columns: 1fr; }
    .event-review-actions { grid-column: auto; justify-content: flex-start; }
    .event-history-list > article { flex-direction: column; }
    .community-member-grid { grid-template-columns: 1fr; }
    .event-badge-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .public-profile-hero { align-items: flex-start; flex-direction: column; }
    .public-profile-hero .button { width: 100%; }
    .public-profile-photo { width: 120px; height: 120px; border-radius: 28px; }
    .public-single-patch { grid-template-columns: 1fr; min-height: 0; }
    .public-single-patch-art { width: min(460px, 100%); margin: 0 auto; padding: 2% 10%; }
    .public-single-patch-copy { padding-top: 5px; }
    .public-share-ready { grid-template-columns: 1fr 1fr; }
    .public-share-ready > div { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
    .community-tabs { display: grid; grid-template-columns: 1fr; }
    .community-privacy-banner { align-items: flex-start; flex-direction: column; }
    .community-privacy-banner .button { width: 100%; }
    .portal-event-head { align-items: flex-start; }
    .portal-event-head .event-patch-frame { width: 84px; height: 84px; border-radius: 19px; }
    .event-detail-hero { grid-template-columns: 1fr; }
    .event-patch-frame-large { width: 120px; height: 120px; }
    .community-profile-hero { align-items: flex-start; flex-direction: column; }
    .community-profile-photo { width: 108px; height: 108px; border-radius: 25px; }
    .event-badge-grid,
    .event-badge-grid-compact { grid-template-columns: 1fr 1fr; }
    .public-share-nav { width: min(100% - 28px, 1120px); }
    .public-share-label { display: none; }
    .public-share-content { width: min(100% - 28px, 1120px); padding-top: 28px; }
    .public-profile-hero { padding: 23px; }
    .public-profile-identity { align-items: flex-start; flex-direction: column; }
    .public-profile-hero h1 { font-size: 36px; }
    .public-patch-grid { grid-template-columns: 1fr; }
    .public-single-patch { gap: 24px; }
    .public-single-patch-copy h1 { font-size: 42px; }
    .public-patch-details div { grid-template-columns: 85px 1fr; }
    .public-share-actions .button { width: 100%; }
    .public-share-footer { align-items: flex-start; flex-direction: column; width: min(100% - 28px, 1120px); }
    .public-share-ready { grid-template-columns: 1fr; }
    .public-share-ready > div { grid-column: auto; }
}
