:root {
    color-scheme: light;
    --bg: #f5f5f4;
    --surface: #ffffff;
    --surface-2: #eeece8;
    --surface-3: #e4e1dc;
    --panel: #ffffff;
    --soft: #eeece8;
    --ink: #1c1917;
    --muted: rgba(28, 25, 23, 0.68);
    --faint: rgba(28, 25, 23, 0.42);
    --line: #d7d3cc;
    --accent: #b9852f;
    --accent-strong: #7a511d;
    --danger: #a03030;
    --success: #2f6b36;
    --shadow: 0 1px 2px rgba(28, 25, 23, 0.08);
    --gutter: clamp(16px, 2.4vw, 36px);
    --header-height: 72px;
    --radius: 6px;
}

[data-theme="dark"] {
    color-scheme: dark;
    --bg: #141312;
    --surface: #1c1917;
    --surface-2: #292524;
    --surface-3: #38322f;
    --panel: #1c1917;
    --soft: #292524;
    --ink: #fafaf9;
    --muted: rgba(250, 250, 249, 0.68);
    --faint: rgba(250, 250, 249, 0.42);
    --line: #3f3a36;
    --accent: #d2a24e;
    --accent-strong: #f0c878;
    --danger: #ffb4a8;
    --success: #9fdfa5;
    --shadow: 0 18px 55px rgba(0, 0, 0, 0.32);
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

.sr-only {
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: "IBM Plex Sans", "Segoe UI", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.5;
    min-height: 100dvh;
    width: 100%;
}

html {
    min-height: 100%;
    scroll-behavior: smooth;
}

main {
    width: 100%;
}

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

img {
    max-width: 100%;
}

.site-header {
    align-items: center;
    backdrop-filter: blur(14px);
    background: color-mix(in srgb, var(--bg) 92%, transparent);
    border-bottom: 1px solid var(--line);
    display: grid;
    gap: 14px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    min-height: var(--header-height);
    margin: 0;
    padding: 10px var(--gutter);
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 50;
}

.brand {
    align-items: center;
    display: inline-flex;
    font-size: 0.86rem;
    font-weight: 750;
    gap: 10px;
    letter-spacing: 0.12em;
    min-height: 44px;
    text-transform: uppercase;
}

.brand img {
    height: 42px;
    width: 42px;
}

.brand-centered {
    justify-content: center;
    margin-bottom: 22px;
    width: 100%;
}

.top-nav {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    grid-column: 3;
    justify-content: flex-end;
    min-width: min(100%, 720px);
}

.flow-trail {
    align-items: center;
    color: var(--muted);
    display: flex;
    flex: 1 1 auto;
    flex-wrap: wrap;
    font-size: 0.84rem;
    gap: 8px;
    grid-column: 2;
    min-width: 180px;
    overflow: hidden;
}

.flow-trail a {
    color: var(--muted);
}

.flow-trail a:hover,
.flow-trail [aria-current="page"] {
    color: var(--ink);
}

.flow-separator {
    color: var(--line);
}

.top-nav a,
.link-button,
.theme-toggle {
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius);
    color: var(--muted);
    cursor: pointer;
    font: inherit;
    font-size: 0.9rem;
    min-height: 40px;
    padding: 9px 10px;
    transition:
        background 160ms ease,
        border-color 160ms ease,
        color 160ms ease,
        transform 160ms ease;
}

.nav-label {
    color: var(--muted);
    font-size: 0.9rem;
}

.top-nav a:hover,
.link-button:hover,
.theme-toggle:hover {
    background: var(--surface-2);
    border-color: var(--line);
    color: var(--ink);
}

.top-nav a:active,
.link-button:active,
.theme-toggle:active,
.button:active {
    transform: translateY(1px);
}

.language-menu {
    position: relative;
}

.language-menu summary {
    border: 1px solid transparent;
    border-radius: var(--radius);
    color: var(--muted);
    cursor: pointer;
    list-style: none;
    min-height: 40px;
    padding: 9px 10px;
}

.language-menu summary::-webkit-details-marker {
    display: none;
}

.language-menu summary::after {
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    content: "";
    display: inline-block;
    margin-left: 6px;
    vertical-align: middle;
}

.language-options {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: grid;
    gap: 4px;
    min-width: 120px;
    padding: 8px;
    position: fixed;
    z-index: 80;
}

.language-menu:not([open]) .language-options {
    display: none;
}

.language-options a {
    border-radius: 4px;
    padding: 8px 10px;
}

.language-options a:hover,
.language-options a.nav-current {
    background: var(--surface-2);
}

.top-nav a.nav-current,
.top-nav a[aria-current="page"] {
    background: color-mix(in srgb, var(--accent) 12%, transparent);
    border-color: color-mix(in srgb, var(--accent) 26%, transparent);
    color: var(--ink);
    font-weight: 700;
}

.top-nav a.flow-origin-link {
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--ink);
}

.global-search-form {
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    display: flex;
    flex: 1 1 260px;
    min-height: 40px;
    overflow: hidden;
    max-width: 360px;
}

.global-search-form input {
    background: transparent;
    border: 0;
    color: var(--ink);
    font: inherit;
    min-width: 130px;
    outline: none;
    padding: 8px 4px 8px 12px;
    width: 100%;
}

.global-search-form button {
    background: var(--surface-2);
    border-left: 1px solid var(--line);
    border: 0;
    color: var(--ink);
    cursor: pointer;
    font: inherit;
    font-size: 0.86rem;
    font-weight: 700;
    min-height: 40px;
    padding: 0 12px;
}

.button {
    align-items: center;
    background: var(--accent);
    border: 1px solid var(--ink);
    border-color: var(--accent);
    border-radius: var(--radius);
    color: #ffffff;
    display: inline-flex;
    font-weight: 750;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    transition:
        background 160ms ease,
        border-color 160ms ease,
        color 160ms ease,
        transform 160ms ease;
}

.button-small {
    min-height: 36px;
    padding: 0 16px;
}

.secondary-button {
    background: transparent;
    border-color: var(--line);
    color: var(--ink);
}

.button:hover {
    background: var(--accent-strong);
    border-color: var(--accent-strong);
}

.secondary-button:hover {
    background: var(--surface-2);
    border-color: var(--line);
}

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

.search-page-form label {
    display: grid;
    gap: 8px;
}

.search-page-form input {
    font-size: 1.05rem;
}

.search-summary {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: space-between;
    margin: 0 0 18px;
}

.search-section {
    display: grid;
    gap: 14px;
    margin-bottom: 24px;
}

.search-internal-scope {
    border-top: 1px solid var(--line);
    margin-top: 28px;
    padding-top: 22px;
}

.search-internal-heading {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    display: grid;
    gap: 6px;
    padding: 16px;
}

.search-internal-heading h2 {
    margin: 0;
}

.search-internal-heading p {
    margin: 0;
}

.search-internal-group {
    display: grid;
    gap: 12px;
}

.search-result-internal {
    border-style: dashed;
}

.search-result-list {
    display: grid;
    gap: 12px;
}

.search-result {
    align-items: stretch;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    display: grid;
    gap: 16px;
    grid-template-columns: 132px minmax(0, 1fr);
    overflow: hidden;
    padding: 12px;
}

.search-result:hover {
    border-color: var(--accent);
}

.search-result h3 {
    font-size: 1.12rem;
    margin: 0 0 6px;
}

.search-result p {
    margin: 0 0 8px;
}

.search-thumb {
    align-items: center;
    aspect-ratio: 4 / 3;
    background: var(--surface-2);
    border-radius: 6px;
    display: flex;
    justify-content: center;
    overflow: hidden;
    width: 100%;
}

.search-thumb img {
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.search-thumb img.search-logo-thumb {
    height: 72%;
    object-fit: contain;
    opacity: 0.86;
    width: 72%;
}

.hero {
    align-items: center;
    display: grid;
    gap: 28px;
    grid-template-columns: minmax(0, 1fr) minmax(180px, 280px);
    margin: 0;
    width: 100%;
    min-height: 360px;
    overflow: hidden;
    padding: 34px var(--gutter) 38px;
    position: relative;
}

.hero-with-banner {
    grid-template-columns: minmax(0, 760px);
    padding-left: 22px;
    padding-right: 22px;
}

.hero-with-banner::before {
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.68), rgba(0, 0, 0, 0.24));
    content: "";
    inset: 0;
    position: absolute;
    z-index: 1;
}

.hero-banner-image {
    height: 100%;
    inset: 0;
    object-fit: cover;
    position: absolute;
    width: 100%;
    z-index: 0;
}

.hero > * {
    position: relative;
    z-index: 2;
}

.hero-with-banner .hero-copy h1,
.hero-with-banner .hero-copy p,
.hero-with-banner .eyebrow,
.hero-with-banner .muted {
    color: #ffffff;
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45);
}

.hero-with-banner .button {
    background: #ffffff;
    border-color: #ffffff;
    color: #191716;
}

.hero-copy h1 {
    font-size: clamp(2.6rem, 6vw, 5.8rem);
    font-weight: 650;
    letter-spacing: -0.04em;
    line-height: 0.92;
    margin: 0 0 18px;
    max-width: 900px;
    text-wrap: balance;
}

.hero-copy p {
    color: var(--muted);
    font-size: 1.15rem;
    max-width: 62ch;
}

.hero-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 28px;
}

.hero-mark {
    align-items: center;
    aspect-ratio: 1;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex;
    justify-content: center;
    padding: 28px;
}

.hero-mark img {
    display: block;
}

.eyebrow {
    color: var(--accent-strong);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.16em;
    margin: 0 0 10px;
    text-transform: uppercase;
}

.muted {
    color: var(--muted);
}

.stats-grid,
.card-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    margin: 0;
    width: 100%;
    padding: 0 var(--gutter) 28px;
}

.module-section {
    margin: 0;
    width: 100%;
    padding: 0 var(--gutter) 22px;
}

.module-section .card-grid {
    padding: 0;
}

.page-shell .module-section {
    padding-left: 0;
    padding-right: 0;
}

.compact-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.section-heading {
    margin-bottom: 14px;
}

.section-heading h2 {
    margin: 0 0 4px;
}

.section-heading p {
    color: var(--muted);
    margin: 0;
}

.stat-card,
.module-card,
.profile-panel,
.qr-panel,
.auth-card,
.admin-panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.stat-card {
    padding: 18px;
}

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

.stat-card strong {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    margin-top: 8px;
}

.report-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 18px 0;
    max-width: none;
    padding: 0;
}

.report-stats .stat-card {
    box-shadow: none;
    padding: 16px;
}

.report-stats .stat-card strong {
    font-size: 1.35rem;
}

.content-band,
.page-shell {
    margin: 0;
    min-height: calc(100dvh - var(--header-height));
    width: 100%;
    padding: 28px var(--gutter) 72px;
}

.content-band {
    align-items: start;
    display: grid;
    gap: 28px;
    grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.9fr);
}

.page-shell .card-grid,
.page-shell .stats-grid {
    padding-left: 0;
    padding-right: 0;
}

.page-shell {
    align-content: start;
    display: grid;
    gap: 24px;
}

.content-band h2,
.page-heading h1,
.auth-card h1,
.profile-panel h1 {
    font-size: 2.45rem;
    font-weight: 650;
    letter-spacing: -0.035em;
    line-height: 1.02;
    margin: 0 0 10px;
    text-wrap: balance;
}

.page-heading {
    border-bottom: 1px solid var(--line);
    display: grid;
    gap: 8px;
    margin-bottom: 4px;
    padding-bottom: 22px;
}

.feature-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.feature-list span {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--muted);
    padding: 10px 14px;
}

.home-posts-section {
    margin: 0;
    width: 100%;
    padding: 22px var(--gutter) 72px;
}

.home-post-list {
    display: grid;
    gap: 12px;
}

.home-post-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(132px, 220px) minmax(0, 1fr);
    overflow: hidden;
    transition:
        background 160ms ease,
        border-color 160ms ease,
        transform 160ms ease;
}

.home-post-card:hover {
    background: color-mix(in srgb, var(--surface) 92%, var(--accent) 8%);
    border-color: var(--accent);
    transform: translateY(-1px);
}

.home-post-thumb {
    align-items: center;
    aspect-ratio: 16 / 10;
    background: var(--surface-2);
    display: flex;
    overflow: hidden;
    width: 100%;
}

.home-post-thumb img,
.home-post-thumb video {
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.home-post-thumb .home-post-logo-thumb {
    height: 120px;
    margin: auto;
    min-height: 0;
    object-fit: contain;
    opacity: 0.82;
    width: 120px;
}

.home-post-content {
    display: grid;
    gap: 8px;
    padding: 18px 22px 18px 0;
}

.home-post-content h3 {
    font-size: 1.32rem;
    letter-spacing: -0.02em;
    line-height: 1.12;
    margin: 0;
}

.home-post-content p {
    color: var(--muted);
    margin: 0;
}

.home-post-meta-line {
    color: var(--faint);
    font-size: 0.82rem;
    line-height: 1.45;
    margin: 0;
}

.page-heading {
    margin-bottom: 4px;
}

.page-heading p {
    color: var(--muted);
    margin: 0;
    max-width: 76ch;
}

.module-card {
    display: grid;
    gap: 6px;
    min-height: 0;
    padding: 18px;
    transition:
        background 160ms ease,
        border-color 160ms ease,
        transform 160ms ease;
}

.module-card:hover {
    background: color-mix(in srgb, var(--surface) 92%, var(--accent) 8%);
    border-color: var(--accent);
    transform: translateY(-1px);
}

.module-card h2 {
    font-size: 1.12rem;
    margin: 0;
}

.module-card p {
    color: var(--muted);
    margin: 0;
}

.page-shell .module-section .card-grid {
    gap: 10px;
    grid-template-columns: minmax(0, 1fr);
}

.page-shell .module-section .module-card {
    align-items: center;
    grid-template-columns: minmax(180px, 0.32fr) minmax(0, 1fr);
}

.page-shell .module-section .module-card h2 {
    margin: 0;
}

.page-shell .module-section .module-card p {
    max-width: 76ch;
}

.page-shell .module-section .section-heading {
    border-top: 1px solid var(--line);
    display: grid;
    gap: 4px;
    margin-bottom: 10px;
    padding-top: 18px;
}

.dashboard-shell {
    gap: 18px;
}

.dashboard-hero {
    align-items: stretch;
    background:
        radial-gradient(circle at 90% 20%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 34%),
        var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: grid;
    gap: 20px;
    grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
    margin: 0;
    padding: 24px;
}

.dashboard-hero h1 {
    margin-bottom: 8px;
}

.dashboard-user-summary {
    align-content: center;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    display: grid;
    gap: 5px;
    padding: 18px;
}

.dashboard-user-summary span,
.dashboard-user-summary small {
    color: var(--muted);
}

.dashboard-user-summary span {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.dashboard-user-summary strong {
    font-size: 1.12rem;
}

.dashboard-section {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: grid;
    gap: 14px;
    padding: 18px;
}

.dashboard-section > .section-heading {
    align-items: end;
    border-bottom: 1px solid var(--line);
    display: flex;
    gap: 14px;
    justify-content: space-between;
    margin: 0;
    padding: 0 0 14px;
}

.dashboard-section > .section-heading h2 {
    font-size: 1.04rem;
    margin: 0;
}

.dashboard-section > .section-heading p {
    color: var(--muted);
    margin: 0;
}

.dashboard-card-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.dashboard-primary-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.dashboard-module-card {
    align-items: start;
    display: grid;
    gap: 14px;
    grid-template-columns: 42px minmax(0, 1fr);
    min-height: 112px;
    padding: 18px;
}

.dashboard-module-copy {
    display: grid;
    gap: 6px;
}

.dashboard-module-icon {
    align-items: center;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--accent-strong);
    display: grid;
    height: 42px;
    justify-items: center;
    position: relative;
    width: 42px;
}

.dashboard-module-icon::before,
.dashboard-module-icon::after {
    box-sizing: border-box;
    content: "";
    position: absolute;
}

.dashboard-module-card[data-dashboard-card="/profile"] .dashboard-module-icon::before {
    background: currentColor;
    border-radius: 50%;
    height: 10px;
    top: 9px;
    width: 10px;
}

.dashboard-module-card[data-dashboard-card="/profile"] .dashboard-module-icon::after {
    border: 2px solid currentColor;
    border-radius: 12px 12px 4px 4px;
    border-bottom: 0;
    height: 12px;
    top: 25px;
    width: 22px;
}

.dashboard-module-card[data-dashboard-card="/trainings"] .dashboard-module-icon::before {
    border: 2px solid currentColor;
    border-radius: 4px;
    inset: 10px 9px 8px;
}

.dashboard-module-card[data-dashboard-card="/trainings"] .dashboard-module-icon::after {
    background: currentColor;
    height: 2px;
    left: 12px;
    right: 12px;
    top: 17px;
}

.dashboard-module-card[data-dashboard-card="/members"] .dashboard-module-icon::before {
    background: currentColor;
    border-radius: 50%;
    height: 8px;
    left: 12px;
    top: 10px;
    width: 8px;
    box-shadow: 10px 2px 0 -1px currentColor;
}

.dashboard-module-card[data-dashboard-card="/members"] .dashboard-module-icon::after {
    border: 2px solid currentColor;
    border-radius: 12px 12px 4px 4px;
    border-bottom: 0;
    height: 11px;
    left: 10px;
    top: 25px;
    width: 24px;
}

.dashboard-module-card[data-dashboard-card="/admin/clubs"] .dashboard-module-icon::before {
    background: currentColor;
    border-radius: 2px;
    height: 24px;
    left: 12px;
    top: 9px;
    width: 3px;
}

.dashboard-module-card[data-dashboard-card="/admin/clubs"] .dashboard-module-icon::after {
    border: 2px solid currentColor;
    border-left: 0;
    border-radius: 0 4px 4px 0;
    height: 13px;
    left: 15px;
    top: 10px;
    width: 17px;
}

.dashboard-module-card[data-dashboard-card="/fees"] .dashboard-module-icon::before {
    border: 2px solid currentColor;
    border-radius: 5px;
    inset: 12px 8px 10px;
}

.dashboard-module-card[data-dashboard-card="/fees"] .dashboard-module-icon::after {
    background: currentColor;
    height: 2px;
    left: 12px;
    right: 12px;
    top: 20px;
}

.dashboard-module-card[data-dashboard-card="/reports"] .dashboard-module-icon::before {
    background: currentColor;
    bottom: 10px;
    height: 10px;
    left: 13px;
    width: 4px;
    box-shadow:
        7px -5px 0 currentColor,
        14px -10px 0 currentColor;
}

.dashboard-module-card[data-dashboard-card="/content"] .dashboard-module-icon::before,
.dashboard-module-card[data-dashboard-card="/posts"] .dashboard-module-icon::before {
    border: 2px solid currentColor;
    border-radius: 4px;
    inset: 9px 11px 9px 10px;
}

.dashboard-module-card[data-dashboard-card="/content"] .dashboard-module-icon::after,
.dashboard-module-card[data-dashboard-card="/posts"] .dashboard-module-icon::after {
    background: currentColor;
    height: 2px;
    left: 15px;
    right: 15px;
    top: 17px;
    box-shadow: 0 7px 0 currentColor;
}

.dashboard-module-card[data-dashboard-card="/admin"] .dashboard-module-icon::before {
    border: 2px solid currentColor;
    border-radius: 7px 7px 10px 10px;
    height: 24px;
    top: 8px;
    width: 18px;
}

.dashboard-module-card[data-dashboard-card="/admin"] .dashboard-module-icon::after {
    background: currentColor;
    border-radius: 3px;
    height: 8px;
    top: 16px;
    width: 6px;
}

.post-detail {
    margin: 0;
    width: 100%;
}

.post-detail h1 {
    font-size: clamp(2.4rem, 6vw, 4.8rem);
    line-height: 0.98;
    margin: 0 0 14px;
}

.post-summary {
    color: var(--muted);
    font-size: 1.16rem;
    margin: 24px 0;
}

.post-body {
    font-size: 1.05rem;
    white-space: pre-wrap;
}

.inline-link {
    color: var(--ink);
    text-decoration: underline;
    text-decoration-color: var(--accent);
    text-underline-offset: 3px;
}

.post-media-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 28px 0;
}

.post-media-item {
    margin: 0;
}

.post-media-item img,
.post-media-item video {
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 8px;
    display: block;
    width: 100%;
}

.post-media-item img {
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.post-media-item video {
    aspect-ratio: 4 / 3;
    object-fit: contain;
}

.post-media-item figcaption {
    color: var(--muted);
    font-size: 0.9rem;
    margin-top: 8px;
}

.auth-page {
    min-height: 100vh;
}

.auth-shell {
    display: grid;
    min-height: 100vh;
    padding: 24px;
    place-items: center;
}

.auth-card {
    max-width: 430px;
    padding: 32px;
    width: 100%;
}

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

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

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

input,
select,
textarea {
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--ink);
    font: inherit;
    min-height: 44px;
    padding: 10px 12px;
    transition:
        background 160ms ease,
        border-color 160ms ease,
        box-shadow 160ms ease;
}

input:focus,
select:focus,
textarea:focus {
    background: var(--surface);
    border-color: var(--accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
    outline: none;
}

textarea {
    min-height: 112px;
    resize: vertical;
}

select {
    appearance: none;
}

.alert {
    background: #fff0f0;
    border: 1px solid #e0a1a1;
    border-radius: var(--radius);
    color: #8c1d1d;
    padding: 12px;
}

[data-theme="dark"] .alert {
    background: #361d1d;
    border-color: #6f3838;
    color: #ffd1d1;
}

.auth-links {
    display: flex;
    gap: 14px;
    justify-content: center;
    margin-top: 22px;
}

.auth-links a {
    color: var(--muted);
}

.profile-layout {
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 1fr);
}

.profile-panel,
.qr-panel {
    padding: 26px;
}

.profile-avatar {
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    height: 140px;
    margin: 18px 0;
    overflow: hidden;
    width: 140px;
}

.profile-avatar img {
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.profile-image-form {
    border-top: 1px solid var(--line);
    margin-top: 24px;
    padding-top: 24px;
}

.admin-profile-image {
    display: grid;
    gap: 18px;
}

.admin-profile-image img {
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    height: 150px;
    object-fit: cover;
    padding: 8px;
    width: 150px;
}

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

.detail-list div {
    border-bottom: 1px solid var(--line);
    display: grid;
    gap: 6px;
    grid-template-columns: 180px minmax(0, 1fr);
    padding-bottom: 12px;
}

.detail-list dt {
    color: var(--muted);
}

.detail-list dd {
    margin: 0;
}

.form-subsection {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    display: grid;
    gap: 14px;
    padding: 16px;
}

.form-subsection h3 {
    font-size: 1rem;
    margin: 0;
}

.checkbox-inline {
    align-items: center;
    color: var(--muted);
    display: inline-flex;
    gap: 8px;
}

.public-profile-hero {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 22px;
    overflow: hidden;
    padding: 28px;
}

.public-profile-hero.hero-with-banner {
    min-height: 300px;
    position: relative;
}

.public-profile-hero.hero-with-banner > *:not(.hero-banner-image) {
    position: relative;
    z-index: 1;
}

.public-profile-title {
    align-items: center;
    display: flex;
    gap: 18px;
    margin-bottom: 18px;
}

.public-profile-title h1 {
    font-size: clamp(2rem, 5vw, 4rem);
    line-height: 0.98;
    margin: 0;
}

.profile-avatar-small {
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    height: 92px;
    object-fit: cover;
    width: 92px;
}

.profile-stats,
.stack-list {
    display: grid;
    gap: 10px;
}

.profile-stats {
    grid-template-columns: repeat(2, minmax(0, max-content));
    margin-top: 18px;
}

.profile-stats span,
.stack-row,
.document-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-2);
}

.profile-stats span {
    padding: 8px 12px;
}

.stack-row {
    color: var(--ink);
    display: grid;
    gap: 4px;
    padding: 12px;
}

.stack-row span {
    color: var(--muted);
}

.document-list {
    display: grid;
    gap: 14px;
}

.document-card {
    align-items: center;
    display: flex;
    gap: 18px;
    justify-content: space-between;
    padding: 18px;
}

.document-card h2 {
    margin: 0 0 6px;
}

.document-card p {
    color: var(--muted);
    margin: 0 0 8px;
}

.qr-panel img {
    background: #ffffff;
    border-radius: var(--radius);
    margin-top: 18px;
    max-width: 340px;
    padding: 12px;
    width: 100%;
}

.qr-checkin-form {
    display: grid;
    gap: 14px;
    margin-bottom: 22px;
}

.qr-checkin-form label {
    display: grid;
    gap: 7px;
}

.qr-checkin-form label span {
    color: var(--muted);
    font-size: 0.92rem;
}

.qr-video {
    aspect-ratio: 4 / 3;
    background: #000000;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    object-fit: cover;
    width: 100%;
}

.qr-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 0;
}

.admin-layout {
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(0, 1fr);
    margin-bottom: 24px;
}

.admin-panel {
    padding: 18px;
}

.collapsible-panel {
    position: relative;
}

.collapse-generated-header {
    margin-bottom: 18px;
}

.collapse-generated-header > h1,
.collapse-generated-header > h2,
.collapse-generated-header > h3 {
    margin: 0;
}

.admin-panel > .collapse-generated-header > h2 {
    margin: 0;
}

.collapse-toggle {
    align-items: center;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--muted);
    cursor: pointer;
    display: inline-flex;
    flex: 0 0 auto;
    font: inherit;
    font-size: 0.84rem;
    font-weight: 800;
    justify-content: center;
    margin-left: auto;
    min-height: 34px;
    padding: 0 12px;
}

.collapse-toggle:hover,
.collapse-toggle:focus-visible {
    color: var(--ink);
}

.collapse-toggle-floating {
    margin: 0 0 14px auto;
}

.collapsible-panel[data-collapsed="true"] > :not([data-collapse-header]):not([data-collapse-toggle]) {
    display: none !important;
}

.collapsible-panel[data-collapsed="true"] {
    box-shadow: none;
}

.admin-panel h2 {
    font-size: 1.18rem;
    letter-spacing: -0.015em;
    margin: 0 0 14px;
}

.admin-panel-wide {
    min-width: 0;
}

.admin-panel-full {
    margin-bottom: 24px;
}

.panel-header {
    align-items: center;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin-bottom: 14px;
}

.panel-header span {
    color: var(--muted);
}

.panel-form {
    border-bottom: 1px solid var(--line);
    margin-bottom: 18px;
    padding-bottom: 18px;
}

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

.full-span {
    grid-column: 1 / -1;
}

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

.form-grid.compact-grid {
    grid-template-columns: minmax(0, 1fr);
}

.form-grid label,
.form-stack label {
    display: grid;
    gap: 7px;
}

.form-grid label span,
.form-stack label span {
    color: var(--muted);
    font-size: 0.92rem;
}

.checkbox-group {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    display: grid;
    gap: 12px;
    grid-column: 1 / -1;
    margin: 0;
    padding: 14px;
}

.checkbox-group legend {
    color: var(--muted);
    padding: 0 6px;
}

.checkbox-group label {
    align-items: center;
    display: inline-flex;
    gap: 7px;
}

.checkbox-group input {
    min-height: 0;
    padding: 0;
}

.checkbox-line {
    align-items: center;
    display: inline-flex;
    gap: 8px;
}

.checkbox-line input {
    min-height: 0;
    padding: 0;
    width: auto;
}

.form-note {
    color: var(--muted);
    font-size: 0.92rem;
    margin: 14px 0 0;
}

.filter-bar {
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(0, 1fr);
    margin: 0 0 18px;
}

.filter-bar label {
    display: grid;
    gap: 7px;
}

.form-actions {
    margin-top: 18px;
}

.compact-input {
    max-width: 120px;
}

.plan-list {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.plan-item {
    border-top: 1px solid var(--line);
    padding-top: 16px;
}

.plan-item h3 {
    margin: 0;
}

.gallery-grid,
.media-grid {
    display: grid;
    gap: 18px;
}

.gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.gallery-card,
.media-tile {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: inherit;
    overflow: hidden;
    text-decoration: none;
}

.gallery-card img,
.media-tile img,
.media-tile video {
    aspect-ratio: 16 / 10;
    background: var(--soft);
    display: block;
    object-fit: cover;
    width: 100%;
}

.media-preview-link {
    display: block;
}

.media-view-panel {
    display: grid;
    justify-items: center;
    overflow: hidden;
    padding: 18px;
}

.media-preview-image,
.media-preview-video,
.media-preview-frame {
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    display: block;
    max-height: min(76vh, 860px);
    max-width: 100%;
    width: 100%;
}

.media-preview-image,
.media-preview-video {
    object-fit: contain;
}

.media-preview-frame {
    aspect-ratio: 16 / 10;
    min-height: 620px;
}

.gallery-card div,
.media-tile div {
    padding: 16px;
}

.gallery-card h2,
.media-tile h3 {
    margin: 0 0 8px;
}

.gallery-card p,
.media-tile p {
    color: var(--muted);
    margin: 0;
}

.media-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.pre-line {
    white-space: pre-line;
}

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

.data-table {
    border-collapse: collapse;
    min-width: 760px;
    width: 100%;
}

.data-table th,
.data-table td {
    border-bottom: 1px solid var(--line);
    padding: 13px 12px;
    text-align: left;
    vertical-align: middle;
}

.data-table th {
    color: var(--faint);
    font-size: 0.82rem;
    font-weight: 750;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.data-table td span {
    color: var(--muted);
    display: block;
    font-size: 0.9rem;
}

.audit-table {
    min-width: 1080px;
}

.metadata-cell {
    display: block;
    max-width: 420px;
    white-space: normal;
    word-break: break-word;
}

.action-cell {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.row-actions {
    margin-top: 8px;
}

.inline-form {
    display: grid;
    gap: 8px;
}

.inline-form select {
    min-width: 0;
}

.status-pill {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--ink) !important;
    display: inline-flex !important;
    font-size: 0.82rem !important;
    padding: 4px 8px;
}

.danger {
    color: var(--danger);
}

body[data-ajax-busy="true"] {
    cursor: progress;
}

form[data-ajax-pending="true"] {
    opacity: 0.72;
    pointer-events: none;
}

.ajax-status {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    bottom: 18px;
    box-shadow: var(--shadow);
    color: var(--ink);
    left: 50%;
    max-width: min(420px, calc(100vw - 32px));
    padding: 12px 16px;
    position: fixed;
    transform: translateX(-50%);
    z-index: 1000;
}

.ajax-status.success {
    border-color: var(--success);
    color: var(--success);
}

.ajax-status.error {
    border-color: var(--danger);
    color: var(--danger);
}

.confirm-overlay {
    align-items: center;
    background: rgba(0, 0, 0, 0.48);
    display: flex;
    inset: 0;
    justify-content: center;
    padding: 22px;
    position: fixed;
    z-index: 1100;
}

.confirm-dialog {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    max-width: 440px;
    padding: 24px;
    width: 100%;
}

.confirm-dialog p {
    margin: 0;
}

.confirm-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 22px;
}

@media (max-width: 1180px) {
    .site-header {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .flow-trail,
    .top-nav {
        grid-column: 1 / -1;
    }

    .top-nav {
        justify-content: flex-start;
    }

    .global-search-form {
        max-width: min(100%, 420px);
    }
}

@media (max-width: 840px) {
    .hero,
    .content-band,
    .profile-layout,
    .admin-layout,
    .post-media-grid,
    .home-post-card,
    .page-shell .module-section .module-card {
        grid-template-columns: 1fr;
    }

    .hero {
        min-height: auto;
    }

    .hero-mark {
        max-width: 320px;
    }

    .stats-grid,
    .card-grid {
        grid-template-columns: 1fr;
    }

    .global-search-form {
        width: min(100%, 360px);
    }

    .global-search-form input {
        min-width: 0;
        width: 100%;
    }

    .home-post-thumb,
    .home-post-thumb img,
    .home-post-thumb video {
        min-height: 0;
    }

    .home-post-content {
        padding: 0 18px 18px;
    }

    .content-band,
    .page-shell {
        padding-left: 16px;
        padding-right: 16px;
    }

    .page-heading h1,
    .auth-card h1,
    .profile-panel h1 {
        font-size: 2rem;
    }

    .detail-list div {
        grid-template-columns: 1fr;
    }

    .document-card,
    .public-profile-title {
        align-items: flex-start;
        flex-direction: column;
    }

    .profile-stats {
        grid-template-columns: 1fr;
    }

    .search-result {
        grid-template-columns: 104px minmax(0, 1fr);
    }

    .form-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .site-header {
        align-items: stretch;
        grid-template-columns: 1fr;
    }

    .brand,
    .flow-trail,
    .top-nav {
        grid-column: 1;
        justify-content: flex-start;
    }

    .top-nav {
        flex-wrap: nowrap;
        min-width: 0;
        overflow-x: auto;
        padding-bottom: 4px;
        scrollbar-width: none;
    }

    .top-nav::-webkit-scrollbar {
        display: none;
    }

    .global-search-form {
        flex: 0 0 270px;
        max-width: 270px;
        width: 270px;
    }

    .search-result {
        max-width: none;
        width: 100%;
    }

    .search-result {
        grid-template-columns: 1fr;
    }

    .search-thumb {
        max-height: 190px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}

body.public-shell {
    color-scheme: light;
    --bg: #f7f6f3;
    --surface: #ffffff;
    --surface-2: #f1efea;
    --surface-3: #e5e1d8;
    --panel: #ffffff;
    --soft: #f1efea;
    --ink: #151412;
    --muted: rgba(21, 20, 18, 0.66);
    --faint: rgba(21, 20, 18, 0.42);
    --line: #d8d3c9;
    --accent: #b67a1e;
    --accent-strong: #875511;
    --shadow: 0 1px 2px rgba(21, 20, 18, 0.08);
    background: var(--bg);
    color: var(--ink);
}

body.public-shell .site-header {
    background: #111111;
    border-bottom: 1px solid #292929;
    color: #f8f7f3;
    grid-template-columns: auto minmax(0, 1fr);
    padding: 8px 20px;
}

body.public-shell .brand {
    align-items: center;
    color: #f8f7f3;
    column-gap: 12px;
    display: grid;
    grid-template-columns: 50px minmax(0, 1fr);
    grid-template-rows: auto auto;
    justify-content: start;
    letter-spacing: 0;
    min-height: 54px;
    text-transform: uppercase;
}

body.public-shell .brand img {
    grid-row: 1 / 3;
    height: 50px;
    width: 50px;
}

body.public-shell .brand span {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.55rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    line-height: 1;
}

body.public-shell .brand::after {
    color: rgba(248, 247, 243, 0.82);
    content: "BRAZILIAN JIU-JITSU";
    font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
    font-size: 0.68rem;
    font-weight: 800;
    grid-column: 2;
    letter-spacing: 0.22em;
    line-height: 1;
}

body.public-shell .top-nav {
    flex-wrap: nowrap;
    gap: 18px;
    grid-column: 2;
    justify-content: flex-end;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

body.public-shell .top-nav::-webkit-scrollbar {
    display: none;
}

body.public-shell .top-nav a,
body.public-shell .link-button,
body.public-shell .theme-toggle,
body.public-shell .language-menu summary {
    border-color: transparent;
    color: rgba(248, 247, 243, 0.82);
    white-space: nowrap;
}

body.public-shell .top-nav a:hover,
body.public-shell .link-button:hover,
body.public-shell .theme-toggle:hover,
body.public-shell .language-menu summary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.14);
    color: #ffffff;
}

body.public-shell .global-search-form {
    background: #232323;
    border-color: #414141;
    flex: 0 1 300px;
    margin-right: auto;
    max-width: 300px;
}

body.public-shell .global-search-form input {
    color: #f8f7f3;
}

body.public-shell .global-search-form input::placeholder {
    color: rgba(248, 247, 243, 0.48);
}

body.public-shell .global-search-form button {
    background: #303030;
    border-left-color: #414141;
    color: #ffffff;
}

body.public-shell .language-options {
    background: #1b1b1b;
    border-color: #3a3a3a;
}

body.public-shell .language-options a:hover,
body.public-shell .language-options a.nav-current {
    background: rgba(255, 255, 255, 0.08);
}

body.public-shell .hero {
    background:
        radial-gradient(circle at 86% 30%, rgba(182, 122, 30, 0.16), transparent 32%),
        var(--bg);
    border-bottom: 1px solid var(--line);
    min-height: 390px;
    padding-top: clamp(44px, 6vw, 76px);
    padding-bottom: clamp(44px, 6vw, 76px);
}

body.public-shell .hero-copy h1 {
    font-size: clamp(2.4rem, 5vw, 5.2rem);
    max-width: 820px;
}

body.public-shell .hero-mark {
    background: #ffffff;
}

body.public-shell .home-posts-section,
body.public-shell .page-shell {
    background: var(--bg);
}

body.public-shell .home-post-card,
body.public-shell .module-card,
body.public-shell .admin-panel,
body.public-shell .public-profile-hero,
body.public-shell .document-card,
body.public-shell .gallery-card,
body.public-shell .media-tile {
    background: var(--surface);
    box-shadow: var(--shadow);
}

body.public-shell .page-heading {
    border-bottom-color: var(--line);
}

@media (max-width: 1120px) {
    body.public-shell .site-header {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    body.public-shell .brand,
    body.public-shell .top-nav {
        grid-column: 1;
    }

    body.public-shell .top-nav {
        justify-content: flex-start;
    }
}

@media (max-width: 560px) {
    body.public-shell .site-header {
        padding-left: 14px;
        padding-right: 14px;
    }

    body.public-shell .brand {
        grid-template-columns: 44px minmax(0, 1fr);
    }

    body.public-shell .brand img {
        height: 44px;
        width: 44px;
    }

    body.public-shell .brand span {
        font-size: 1.28rem;
    }

    body.public-shell .top-nav {
        gap: 12px;
        padding-bottom: 4px;
    }

    body.public-shell .global-search-form {
        flex: 0 0 270px;
        max-width: 270px;
        width: 270px;
    }
}

body.app-shell {
    color-scheme: light;
    --bg: #f7f6f3;
    --surface: #ffffff;
    --surface-2: #f1efea;
    --surface-3: #e5e1d8;
    --panel: #ffffff;
    --soft: #f1efea;
    --ink: #151412;
    --muted: rgba(21, 20, 18, 0.66);
    --faint: rgba(21, 20, 18, 0.42);
    --line: #d8d3c9;
    --accent: #b67a1e;
    --accent-strong: #875511;
    --shadow: 0 1px 2px rgba(21, 20, 18, 0.08);
    background: var(--bg);
    color: var(--ink);
}

[data-theme="dark"] body.public-shell,
[data-theme="dark"] body.app-shell {
    color-scheme: dark;
    --bg: #151413;
    --surface: #1f1d1a;
    --surface-2: #292621;
    --surface-3: #373229;
    --panel: #1f1d1a;
    --soft: #292621;
    --ink: #f8f7f3;
    --muted: rgba(248, 247, 243, 0.68);
    --faint: rgba(248, 247, 243, 0.44);
    --line: #403a31;
    --accent: #d0a04f;
    --accent-strong: #f0c878;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.34);
    background: var(--bg);
    color: var(--ink);
}

[data-theme="dark"] body.public-shell .hero {
    background:
        radial-gradient(circle at 86% 30%, rgba(208, 160, 79, 0.12), transparent 32%),
        var(--bg);
}

[data-theme="dark"] body.public-shell .hero-mark,
[data-theme="dark"] body.app-shell .app-sidebar {
    background: #1b1916;
}

[data-theme="dark"] body.public-shell .home-post-card,
[data-theme="dark"] body.public-shell .module-card,
[data-theme="dark"] body.public-shell .admin-panel,
[data-theme="dark"] body.public-shell .public-profile-hero,
[data-theme="dark"] body.public-shell .document-card,
[data-theme="dark"] body.public-shell .gallery-card,
[data-theme="dark"] body.public-shell .media-tile,
[data-theme="dark"] body.app-shell .admin-panel,
[data-theme="dark"] body.app-shell .dashboard-section,
[data-theme="dark"] body.app-shell .module-card,
[data-theme="dark"] body.app-shell .profile-panel,
[data-theme="dark"] body.app-shell .qr-panel {
    background: var(--surface);
}

[data-theme="dark"] body.app-shell .app-sidebar a:hover,
[data-theme="dark"] body.app-shell .app-sidebar a[aria-current="page"],
[data-theme="dark"] body.app-shell .app-sidebar-collapse {
    background: #292621;
}

body.app-shell .site-header {
    background: #111111;
    border-bottom: 1px solid #292929;
    color: #f8f7f3;
    grid-template-columns: 264px minmax(0, 1fr);
    padding: 8px 20px;
}

body.app-shell .brand {
    align-items: center;
    color: #f8f7f3;
    column-gap: 12px;
    display: grid;
    grid-template-columns: 50px minmax(0, 1fr);
    grid-template-rows: auto auto;
    justify-content: start;
    letter-spacing: 0;
    min-height: 54px;
    text-transform: uppercase;
}

body.app-shell .brand img {
    grid-row: 1 / 3;
    height: 50px;
    width: 50px;
}

body.app-shell .brand span {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.55rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    line-height: 1;
}

body.app-shell .brand::after {
    color: rgba(248, 247, 243, 0.82);
    content: "BRAZILIAN JIU-JITSU";
    font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
    font-size: 0.68rem;
    font-weight: 800;
    grid-column: 2;
    letter-spacing: 0.22em;
    line-height: 1;
}

body.app-shell .top-nav {
    flex-wrap: nowrap;
    gap: 18px;
    grid-column: 2;
    justify-content: flex-end;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

body.app-shell .top-nav::-webkit-scrollbar {
    display: none;
}

body.app-shell .top-nav a,
body.app-shell .link-button,
body.app-shell .theme-toggle,
body.app-shell .language-menu summary {
    border-color: transparent;
    color: rgba(248, 247, 243, 0.82);
    white-space: nowrap;
}

body.app-shell .top-nav a:hover,
body.app-shell .link-button:hover,
body.app-shell .theme-toggle:hover,
body.app-shell .language-menu summary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.14);
    color: #ffffff;
}

body.app-shell .global-search-form {
    background: #232323;
    border-color: #414141;
    flex: 0 1 300px;
    margin-right: auto;
    max-width: 300px;
}

body.app-shell .global-search-form input {
    color: #f8f7f3;
}

body.app-shell .global-search-form input::placeholder {
    color: rgba(248, 247, 243, 0.48);
}

body.app-shell .global-search-form button {
    background: #303030;
    border-left-color: #414141;
    color: #ffffff;
}

body.app-shell .language-options {
    background: #1b1b1b;
    border-color: #3a3a3a;
}

body.app-shell .app-sidebar {
    background: #fbfaf7;
    border-right: 1px solid var(--line);
    bottom: 0;
    display: flex;
    flex-direction: column;
    left: 0;
    overflow: hidden;
    position: fixed;
    top: var(--header-height);
    width: 264px;
    z-index: 35;
    scrollbar-width: none;
}

body.app-shell .app-sidebar::-webkit-scrollbar {
    display: none;
}

body.app-shell .app-sidebar nav {
    display: grid;
    flex: 1 1 auto;
    gap: 22px;
    min-height: 0;
    overflow-y: auto;
    padding: 22px 0;
    scrollbar-width: none;
}

body.app-shell .app-sidebar nav::-webkit-scrollbar {
    display: none;
}

body.app-shell .app-sidebar section {
    display: grid;
    gap: 4px;
}

body.app-shell .app-sidebar h2 {
    color: var(--faint);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    margin: 10px 22px 6px;
    text-transform: uppercase;
}

body.app-shell .app-sidebar a {
    align-items: center;
    border-left: 3px solid transparent;
    color: var(--ink);
    display: grid;
    gap: 12px;
    grid-template-columns: 22px minmax(0, 1fr);
    min-height: 42px;
    padding: 0 22px;
}

body.app-shell .app-sidebar a > span {
    display: block;
    height: 22px;
    opacity: 0.82;
    position: relative;
    width: 22px;
}

body.app-shell .app-sidebar a > span::before,
body.app-shell .app-sidebar a > span::after {
    box-sizing: border-box;
    content: "";
    position: absolute;
}

body.app-shell .app-sidebar a[data-shell-nav="dashboard"] > span::before {
    background: currentColor;
    border-radius: 2px;
    height: 6px;
    left: 4px;
    top: 4px;
    width: 6px;
    box-shadow:
        9px 0 0 currentColor,
        0 9px 0 currentColor,
        9px 9px 0 currentColor;
}

body.app-shell .app-sidebar a[data-shell-nav="admin"] > span::before {
    border: 2px solid currentColor;
    border-radius: 6px 6px 8px 8px;
    height: 16px;
    left: 5px;
    top: 3px;
    width: 12px;
}

body.app-shell .app-sidebar a[data-shell-nav="admin"] > span::after {
    background: currentColor;
    border-radius: 3px;
    height: 6px;
    left: 9px;
    top: 8px;
    width: 4px;
}

body.app-shell .app-sidebar a[data-shell-nav="trainings"] > span::before {
    border: 2px solid currentColor;
    border-radius: 3px;
    inset: 4px 3px 3px;
}

body.app-shell .app-sidebar a[data-shell-nav="trainings"] > span::after {
    background: currentColor;
    height: 2px;
    left: 5px;
    right: 5px;
    top: 9px;
}

body.app-shell .app-sidebar a[data-shell-nav="fees"] > span::before {
    border: 2px solid currentColor;
    border-radius: 4px;
    inset: 5px 2px 4px;
}

body.app-shell .app-sidebar a[data-shell-nav="fees"] > span::after {
    background: currentColor;
    height: 2px;
    left: 5px;
    right: 5px;
    top: 10px;
}

body.app-shell .app-sidebar a[data-shell-nav="members"] > span::before {
    background: currentColor;
    border-radius: 50%;
    height: 6px;
    left: 5px;
    top: 4px;
    width: 6px;
    box-shadow: 7px 2px 0 -1px currentColor;
}

body.app-shell .app-sidebar a[data-shell-nav="members"] > span::after {
    border: 2px solid currentColor;
    border-radius: 9px 9px 3px 3px;
    border-bottom: 0;
    height: 8px;
    left: 3px;
    top: 13px;
    width: 15px;
}

body.app-shell .app-sidebar a[data-shell-nav="clubs"] > span::before {
    background: currentColor;
    border-radius: 2px;
    height: 17px;
    left: 4px;
    top: 3px;
    width: 2px;
}

body.app-shell .app-sidebar a[data-shell-nav="clubs"] > span::after {
    border: 2px solid currentColor;
    border-left: 0;
    border-radius: 0 3px 3px 0;
    height: 9px;
    left: 6px;
    top: 4px;
    width: 12px;
}

body.app-shell .app-sidebar a[data-shell-nav="posts"] > span::before,
body.app-shell .app-sidebar a[data-shell-nav="docs"] > span::before,
body.app-shell .app-sidebar a[data-shell-nav="content"] > span::before {
    border: 2px solid currentColor;
    border-radius: 3px;
    inset: 3px 5px 3px 4px;
}

body.app-shell .app-sidebar a[data-shell-nav="posts"] > span::after,
body.app-shell .app-sidebar a[data-shell-nav="docs"] > span::after,
body.app-shell .app-sidebar a[data-shell-nav="content"] > span::after {
    background: currentColor;
    height: 2px;
    left: 8px;
    right: 8px;
    top: 9px;
    box-shadow: 0 5px 0 currentColor;
}

body.app-shell .app-sidebar a[data-shell-nav="media"] > span::before {
    border: 2px solid currentColor;
    border-radius: 3px;
    inset: 4px 3px 3px;
}

body.app-shell .app-sidebar a[data-shell-nav="media"] > span::after {
    border-bottom: 2px solid currentColor;
    border-left: 2px solid currentColor;
    height: 7px;
    left: 6px;
    top: 9px;
    transform: rotate(-45deg);
    width: 10px;
}

body.app-shell .app-sidebar a[data-shell-nav="reports"] > span::before {
    background: currentColor;
    bottom: 4px;
    height: 7px;
    left: 5px;
    width: 3px;
    box-shadow:
        5px -4px 0 currentColor,
        10px -8px 0 currentColor;
}

body.app-shell .app-sidebar a[data-shell-nav="settings"] > span::before {
    border-bottom: 2px solid currentColor;
    border-top: 2px solid currentColor;
    height: 12px;
    left: 3px;
    top: 5px;
    width: 16px;
}

body.app-shell .app-sidebar a[data-shell-nav="settings"] > span::after {
    background: currentColor;
    border-radius: 50%;
    height: 5px;
    left: 7px;
    top: 3px;
    width: 5px;
    box-shadow:
        6px 7px 0 currentColor,
        -2px 14px 0 currentColor;
}

body.app-shell .app-sidebar a[data-shell-nav="audit"] > span::before {
    background: currentColor;
    border-radius: 50%;
    height: 3px;
    left: 4px;
    top: 6px;
    width: 3px;
    box-shadow:
        0 5px 0 currentColor,
        0 10px 0 currentColor;
}

body.app-shell .app-sidebar a[data-shell-nav="audit"] > span::after {
    background: currentColor;
    height: 2px;
    left: 10px;
    right: 3px;
    top: 6px;
    box-shadow:
        0 5px 0 currentColor,
        0 10px 0 currentColor;
}

body.app-shell .app-sidebar a > strong {
    font-size: 0.95rem;
    font-weight: 600;
}

body.app-shell .app-sidebar a:hover,
body.app-shell .app-sidebar a[aria-current="page"] {
    background: #f0ede5;
    border-left-color: var(--accent);
    color: var(--accent-strong);
}

body.app-shell .app-sidebar-collapse {
    align-items: center;
    background: #f0ede5;
    border: 0;
    border-top: 1px solid var(--line);
    color: var(--ink);
    cursor: pointer;
    display: flex;
    flex: 0 0 auto;
    font: inherit;
    gap: 8px;
    justify-content: flex-start;
    margin-top: 0;
    min-height: 48px;
    padding: 0 22px;
}

body.app-sidebar-collapsed .app-sidebar {
    width: 72px;
}

body.app-sidebar-collapsed .app-sidebar h2,
body.app-sidebar-collapsed .app-sidebar a strong {
    display: none;
}

body.app-sidebar-collapsed .app-sidebar a {
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 0;
}

body.app-sidebar-collapsed .app-sidebar-collapse {
    font-size: 0;
    justify-content: center;
    padding: 0;
}

body.app-sidebar-collapsed .app-sidebar-collapse::before {
    color: var(--ink);
    content: ">";
    font-size: 1rem;
    font-weight: 800;
}

body.app-shell .page-shell {
    background: var(--bg);
    gap: 18px;
    margin-left: 264px;
    min-height: calc(100dvh - var(--header-height));
    padding: 22px 28px 48px;
    width: auto;
}

body.app-sidebar-collapsed .page-shell {
    margin-left: 72px;
}

body.app-shell .page-shell > .flow-trail {
    color: var(--muted);
    display: flex;
    font-size: 0.88rem;
    grid-column: 1 / -1;
    min-width: 0;
}

body.app-shell .page-shell > .flow-trail a {
    color: var(--muted);
}

body.app-shell .page-shell > .flow-trail a:hover,
body.app-shell .page-shell > .flow-trail [aria-current="page"] {
    color: var(--ink);
}

body.app-shell .page-heading {
    border-bottom: 0;
    gap: 6px;
    padding-bottom: 4px;
}

body.app-shell .page-heading h1 {
    font-size: clamp(2rem, 3vw, 2.55rem);
    font-weight: 760;
    letter-spacing: -0.045em;
}

body.app-shell .eyebrow {
    color: var(--faint);
}

body.app-shell .stats-grid {
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

body.app-shell .stat-card {
    background: var(--surface);
    min-height: 110px;
    padding: 18px 20px;
}

body.app-shell .stat-card span {
    color: var(--faint);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

body.app-shell .stat-card strong {
    font-size: 2rem;
}

body.app-shell .admin-panel,
body.app-shell .module-card,
body.app-shell .profile-panel,
body.app-shell .qr-panel {
    background: var(--surface);
    box-shadow: var(--shadow);
}

body.app-shell .admin-panel {
    padding: 0;
}

body.app-shell .admin-panel > :not(.panel-header):not(.collapse-generated-header),
body.app-shell .admin-panel > form,
body.app-shell .admin-panel > .table-wrap,
body.app-shell .admin-panel > .filter-bar,
body.app-shell .admin-panel > p {
    margin-left: 18px;
    margin-right: 18px;
}

body.app-shell .panel-header,
body.app-shell .collapse-generated-header {
    border-bottom: 1px solid var(--line);
    margin: 0;
    min-height: 48px;
    padding: 0 18px;
}

body.app-shell .admin-panel h2 {
    font-size: 1rem;
    font-weight: 760;
}

body.app-shell .data-table th,
body.app-shell .data-table td {
    padding: 12px 18px;
}

body.app-shell .page-shell .module-section .section-heading {
    border-top: 1px solid var(--line);
    margin: 4px 0 0;
    padding-top: 22px;
}

body.app-shell .page-shell .module-section .module-card {
    min-height: 58px;
}

body.app-shell .button {
    background: var(--accent);
    border-color: var(--accent);
}

body.app-shell .secondary-button {
    background: transparent;
    border-color: var(--line);
    color: var(--ink);
}

body.app-shell .dashboard-hero {
    border: 1px solid var(--line);
    gap: 20px;
    padding: 24px;
}

body.app-shell .dashboard-hero h1 {
    margin-bottom: 8px;
}

body.app-shell .dashboard-section > .section-heading {
    border-bottom: 1px solid var(--line);
    border-top: 0;
    margin: 0;
    padding: 0 0 14px;
}

@media (max-width: 1120px) {
    body.app-shell .site-header {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    body.app-shell .brand,
    body.app-shell .top-nav {
        grid-column: 1;
    }
}

@media (max-width: 960px) {
    body.app-shell .app-sidebar {
        display: none;
    }

    body.app-shell .page-shell,
    body.app-sidebar-collapsed .page-shell {
        margin-left: 0;
    }

    body.app-shell .top-nav {
        gap: 12px;
        justify-content: flex-start;
    }

    body.app-shell .global-search-form {
        flex: 0 0 270px;
        max-width: 270px;
    }
}

@media (max-width: 840px) {
    .dashboard-hero {
        grid-template-columns: minmax(0, 1fr);
        padding: 18px;
    }

    .dashboard-section > .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-card-grid,
    .dashboard-primary-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media print {
    .site-header,
    .top-nav,
    .no-print,
    .hero-actions,
    .collapse-toggle,
    .confirm-overlay {
        display: none;
    }

    .collapsible-panel[data-collapsed="true"] > :not([data-collapse-toggle]) {
        display: revert !important;
    }

    body {
        background: #ffffff;
        color: #000000;
    }

    .stat-card,
    .module-card,
    .profile-panel,
    .qr-panel,
    .admin-panel {
        box-shadow: none;
    }

    .page-shell {
        max-width: none;
        padding: 0;
    }

    .report-section {
        break-inside: avoid;
    }
}
