:root {
    /* Typography */
    --font-family-base: "Helvetica Neue", Helvetica, Arial, sans-serif;
    --font-family-heading: "Helvetica Neue", Helvetica, Arial, sans-serif;
    --font-family-mono: "Cascadia Code", Consolas, "Courier New", monospace;

    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-body: 1rem;
    --font-size-md: 1.125rem;
    --font-size-lg: 1.25rem;
    --font-size-xl: 1.5rem;

    --font-weight-regular: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --font-weight-heading: 700;

    --line-height-tight: 1.2;
    --line-height-base: 1.5;
    --line-height-relaxed: 1.7;

    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;

    /* Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-round: 999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 10px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.16);

    /* Layout */
    --layout-sidebar-width: 230px;
    --layout-topbar-height: 60px;
    --layout-page-header-height: 60px;
    --layout-page-header-height-mobile: 45px;
    --layout-content-max-width: 1200px;
    --layout-scroll-table-offset-sm: 150px;
    --layout-scroll-table-offset-sm-alt: 170px;
    --layout-scroll-table-offset-user-list: 180px;
    --layout-scroll-table-offset-md: 200px;
    --layout-scroll-table-offset-lg: 250px;
    --layout-scroll-table-max-md: 400px;
    --layout-scroll-table-max-lg: 500px;
    --z-index-sticky-table-head: 1;

    /* Semantic colors built on top of the active theme palette */
    --color-page-bg: #ffffff;
    --color-surface: #ffffff;
    --color-surface-muted: #f8f9fa;
    --color-surface-subtle: #fffdf4;

    --color-text-primary: var(--color-text-on-light, #212121);
    --color-text-secondary: #495057;
    --color-text-muted: #6c757d;
    --color-text-inverse: var(--color-text-on-dark, #ffffff);

    --color-link: var(--color-button-save, #1b6ec2);
    --color-focus-ring: rgba(37, 140, 251, 0.35);
    --color-border-subtle: #dee2e6;
    --color-border-strong: #333333;
    --color-border-header: #cccccc;

    --color-success-soft: #d4edda;
    --color-danger-soft: #f8d7da;
    --color-warning-soft: #fff3cd;
    --color-danger-strong: #b32121;
    --color-validation-error: #e50000;
    --color-validation-success: #26b050;

    --color-avatar-gradient-start: #667eea;
    --color-avatar-gradient-end: #764ba2;
    --color-checkbox-border: gray;
    --color-checkbox-checked-bg: black;
}

html,
body {
    font-family: var(--font-family-base);
    font-size: var(--font-size-body);
    line-height: var(--line-height-base);
    color: var(--color-text-primary);
    background-color: var(--color-page-bg);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-family-heading);
    font-weight: var(--font-weight-heading);
    line-height: var(--line-height-tight);
    color: var(--color-text-primary);
}

small {
    font-size: var(--font-size-sm);
}

::selection {
    background-color: var(--color-button-secondary-hover, #f7e49a);
    color: var(--color-text-primary);
}

a,
.btn-link {
    color: var(--color-link);
}

.btn-primary {
    color: var(--color-text-inverse);
    background-color: var(--color-link);
    border-color: var(--color-border-button-save, var(--color-link));
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.1rem var(--color-surface), 0 0 0 0.25rem var(--color-focus-ring);
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid var(--color-validation-success);
}

.invalid,
.validation-message {
    color: var(--color-validation-error);
}

.invalid {
    outline: 1px solid var(--color-validation-error);
}

.blazor-error-boundary {
    color: var(--color-text-inverse);
    background-color: var(--color-danger-strong);
}

.player-avatar,
.player-avatar-md {
    border: 3px solid var(--color-border-subtle);
    box-shadow: var(--shadow-md);
}

.player-avatar-sm {
    border: 2px solid var(--color-border-subtle);
}

.default-player-icon,
.default-player-icon-sm,
.default-player-icon-md {
    background: linear-gradient(135deg, var(--color-avatar-gradient-start) 0%, var(--color-avatar-gradient-end) 100%);
}

.default-player-icon,
.default-player-icon-md {
    border: 3px solid var(--color-border-subtle);
    box-shadow: var(--shadow-md);
}

.default-player-icon-sm {
    border: 2px solid var(--color-border-subtle);
}

.custom-checkbox {
    border-color: var(--color-checkbox-border);
    background-color: var(--color-surface);
}

.custom-checkbox:checked,
.form-switch .form-check-input,
.form-switch .form-check-input:checked {
    background-color: var(--color-checkbox-checked-bg) !important;
    border-color: var(--color-checkbox-checked-bg) !important;
}

.select-custom,
.select-custom option {
    background-color: var(--color-surface);
    color: var(--color-text-primary);
}

.page-header {
    background-color: var(--color-surface);
    border-bottom: 2px solid var(--color-border-header);
}

.login-status-wrapper {
    border-bottom: 1px solid var(--color-border-strong);
}

.sidebarCustom,
.customNavBar.show {
    border-right: 2px solid var(--color-border-strong);
    border-bottom: 2px solid var(--color-border-strong);
}

@media (max-width: 768px) {
    .sidebarCustom {
        width: 0;
        overflow: hidden;
        background-color: transparent;
        border-right: 0 !important;
        border-bottom: 0 !important;
    }
}

.customButton {
    border: 2px solid var(--color-border-strong);
}

.layout-scroll-y {
    overflow-y: auto;
    overflow-x: hidden;
}

.app-version-text {
    font-size: var(--font-size-xs);
}

.app-login-status-user {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    min-width: 0;
    flex: 1 1 auto;
    white-space: nowrap;
    overflow: hidden;
}

.app-login-status-email {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-login-status-meta {
    flex: 0 0 auto;
}

.app-hidden {
    display: none !important;
}

.app-text-ellipsis-300 {
    max-width: 300px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-scroll-table {
    overflow-y: auto;
}

.app-scroll-table-150 {
    height: calc(100vh - var(--layout-scroll-table-offset-sm));
}

.app-scroll-table-170 {
    height: calc(100vh - var(--layout-scroll-table-offset-sm-alt));
}

.app-scroll-table-200 {
    height: calc(100vh - var(--layout-scroll-table-offset-md));
}

.app-scroll-table-180 {
    height: calc(100vh - var(--layout-scroll-table-offset-user-list));
}

.app-scroll-table-250 {
    height: calc(100vh - var(--layout-scroll-table-offset-lg));
}

.app-scroll-table-max-400 {
    max-height: var(--layout-scroll-table-max-md);
}

.app-scroll-table-max-500 {
    max-height: var(--layout-scroll-table-max-lg);
}

.app-scroll-table-framed {
    border: 1px solid var(--color-border-subtle);
    border-radius: var(--radius-md);
}

.app-sticky-table-head {
    z-index: var(--z-index-sticky-table-head);
    background-color: var(--color-surface) !important;
}

.app-button-row {
    display: flex;
    gap: var(--space-2);
    margin-top: var(--space-4);
}

.app-button-row-center {
    display: flex;
    justify-content: center;
    gap: var(--space-2);
}

.app-inline-alert {
    margin-bottom: 0;
    padding-top: var(--space-2);
    padding-bottom: var(--space-2);
}

.app-inline-alert-spaced {
    margin-left: var(--space-3);
    margin-right: var(--space-3);
}

.app-inline-alert-padded {
    padding-left: var(--space-3);
    padding-right: var(--space-3);
}

.app-inline-alert-stack {
    margin-top: var(--space-4);
}

.app-inline-alert-compact {
    margin-top: var(--space-2);
    margin-bottom: 0;
    padding: var(--space-1) var(--space-2);
}

.app-input-tall {
    min-height: 120px;
}

.app-fluid-image {
    max-width: 100%;
}

.app-cropper-container {
    max-height: 400px;
    overflow: hidden;
    border-radius: var(--radius-md);
}

.app-avatar-lg {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
}

.app-avatar-placeholder-lg {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: var(--color-text-muted);
}

.app-avatar-inline-sm {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.app-avatar-initials {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-avatar-gradient-start) 0%, var(--color-avatar-gradient-end) 100%);
    color: var(--color-text-inverse);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: var(--font-weight-semibold);
    font-size: 0.85rem;
    flex-shrink: 0;
}

.app-score-input {
    width: 70px;
}

.app-select-compact {
    width: 80px;
}

.app-form-control-prominent {
    font-size: 1rem;
    padding: 10px;
}

.app-col-index {
    width: 60px;
    text-align: center;
}

.app-col-rate {
    width: 70px;
    text-align: center;
}

.app-col-team {
    width: 52px;
    text-align: center;
}

.app-col-play {
    width: 44px;
    text-align: center;
}

.app-team-marker-yellow {
    color: var(--color-icon-yellow, #ffc107);
}

.app-team-marker-blue {
    color: var(--color-icon-blue, #0d6efd);
}

.app-clickable-row {
    cursor: pointer;
}

.app-filter-toggle {
    display: flex;
    align-items: center;
}

.app-filter-toggle-input {
    margin-right: 0.2em;
}

.app-filter-toggle-input-leftless {
    margin-left: 0;
}

.app-filter-toggle-label {
    margin-bottom: 0;
    white-space: normal;
    max-width: 200px;
}

.app-modal-visible {
    display: block;
}

.app-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1040;
}

.app-modal-dialog-layer {
    z-index: 1050;
}

.app-modal-overlay-center {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
}

.app-modal-z-2000 {
    z-index: 2000;
}

.app-toast-alert {
    z-index: 9999;
    min-width: 300px;
    text-align: center;
}

.app-divider-cell {
    padding: 0 !important;
}

.app-divider-gradient {
    height: 2px;
    background: linear-gradient(to right, var(--color-icon-yellow, #ffc107), var(--color-border-subtle), var(--color-icon-blue, #0d6efd));
}

.app-team-toggle {
    cursor: pointer;
    border: 2px solid rgba(0, 0, 0, 0.15);
    display: inline-block;
}

.app-badge-xs {
    font-size: 0.65rem;
}

.app-recent-form-stack {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    margin-left: 6px;
}

.app-recent-form-streak {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1;
    color: var(--color-validation-success);
}

.app-recent-form-bars {
    display: inline-flex;
    align-items: flex-end;
    gap: 3px;
    height: 18px;
}

.app-recent-form-bar {
    display: inline-block;
    width: 4px;
    height: var(--form-bar-height, 12px);
    border-radius: var(--radius-round);
    background: var(--form-bar-color, var(--color-text-muted));
}

.app-sticky-first-col-head {
    position: sticky;
    left: 0;
    z-index: 25;
}

.app-sticky-first-col-cell {
    position: sticky;
    left: 0;
    background: var(--color-surface);
    z-index: 20;
}

.app-event-card-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    max-width: var(--layout-content-max-width);
    margin: 0 auto;
}

.app-event-card {
    border: 1px solid var(--color-border-subtle);
    border-radius: var(--radius-md);
    background: var(--color-surface);
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.app-event-card-past {
    opacity: 0.75;
    background-color: var(--color-surface-muted);
}

.app-event-card-yes {
    border-left: 4px solid var(--color-validation-success);
}

.app-event-card-no {
    border-left: 4px solid var(--color-validation-error);
}

.app-event-card-maybe {
    border-left: 4px solid var(--color-icon-yellow, #ffc107);
}

.app-card-location {
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.app-participation-summary {
    font-size: 0.95rem;
}

.app-text-participation-yes {
    color: var(--color-validation-success);
}

.app-text-participation-no {
    color: var(--color-validation-error);
}

.app-text-participation-maybe {
    color: var(--color-icon-yellow, #ffc107);
}

.app-btn-toggle {
    background-color: var(--color-text-muted);
    color: var(--color-text-inverse);
    border: none;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    transition: background-color 0.2s;
}

.app-btn-toggle:hover {
    background-color: #5a6268;
    color: var(--color-text-inverse);
}

.app-participants-list {
    border-top: 1px solid var(--color-border-subtle);
    padding-top: var(--space-4);
}

.app-participants-list .table {
    font-size: 0.9rem;
}

.app-participants-list .table th {
    font-weight: var(--font-weight-semibold);
    font-size: 0.85rem;
}

.app-participants-list .table td {
    padding: var(--space-2);
}

.app-participation-buttons {
    display: flex;
    gap: var(--space-2);
    margin-top: var(--space-4);
    flex-wrap: wrap;
}

.app-btn-participation {
    flex: 1;
    min-width: 80px;
    padding: 0.75rem 1rem;
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    font-weight: var(--font-weight-medium);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 0.6;
}

.app-btn-participation:disabled {
    cursor: not-allowed;
    opacity: 0.3;
    background-color: #e9ecef !important;
    color: var(--color-text-muted) !important;
    border-color: var(--color-border-subtle) !important;
}

.app-btn-participation-yes {
    background-color: var(--color-success-soft);
    color: #155724;
    border-color: #c3e6cb;
}

.app-btn-participation-yes.selected {
    background-color: var(--color-validation-success);
    color: var(--color-text-inverse);
    border-color: var(--color-validation-success);
    opacity: 1;
    font-weight: var(--font-weight-bold);
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.4);
}

.app-btn-participation-yes:not(.selected):hover:not(:disabled) {
    opacity: 0.8;
    border-color: var(--color-validation-success);
}

.app-btn-participation-no {
    background-color: var(--color-danger-soft);
    color: #721c24;
    border-color: #f5c6cb;
}

.app-btn-participation-no.selected {
    background-color: #dc3545;
    color: var(--color-text-inverse);
    border-color: #dc3545;
    opacity: 1;
    font-weight: var(--font-weight-bold);
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.4);
}

.app-btn-participation-no:not(.selected):hover:not(:disabled) {
    opacity: 0.8;
    border-color: #dc3545;
}

.app-btn-participation-maybe {
    background-color: var(--color-warning-soft);
    color: #856404;
    border-color: #ffeaa7;
}

.app-btn-participation-maybe.selected {
    background-color: var(--color-icon-yellow, #ffc107);
    color: #000;
    border-color: var(--color-icon-yellow, #ffc107);
    opacity: 1;
    font-weight: var(--font-weight-bold);
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.4);
}

.app-btn-participation-maybe:not(.selected):hover:not(:disabled) {
    opacity: 0.8;
    border-color: var(--color-icon-yellow, #ffc107);
}

.app-col-weight {
    width: 100px;
}

.app-col-date {
    width: 120px;
}

.app-col-actions {
    width: 180px;
}

.app-col-select-xs {
    width: 5%;
}

.app-col-min-80 {
    min-width: 80px;
}

.app-col-min-100 {
    min-width: 100px;
}

.app-col-min-110 {
    min-width: 110px;
}

.app-col-min-120 {
    min-width: 120px;
}

.app-col-min-140 {
    min-width: 140px;
}

.app-col-min-150 {
    min-width: 150px;
}

.app-col-min-200 {
    min-width: 200px;
}

.app-col-min-260 {
    min-width: 260px;
}

.app-col-10p {
    width: 10%;
}

.app-col-15p {
    width: 15%;
}

.app-section-spacer {
    margin-bottom: 24px;
}

.app-inline-meta-sm {
    font-size: 0.85rem;
}

.app-inline-text-sm {
    font-size: 0.9rem;
}

.app-page-subtitle {
    color: var(--color-text-muted);
    margin-bottom: var(--space-2);
}

.app-field-help {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-top: var(--space-2);
    margin-bottom: 0;
}

.app-field-help-tight {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-top: var(--space-1);
    margin-bottom: 0;
}

.app-meta-stack {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.app-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: var(--space-3);
}

.app-stat-item {
    text-align: center;
}

.app-form-grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--space-4);
}

.app-form-grid-item {
    min-width: 0;
}

.app-layout-sidebar-split {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
    gap: var(--space-4);
}

.app-empty-state-text {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-top: var(--space-4);
    margin-bottom: 0;
}

.app-empty-state-text-compact {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin: 0;
}

.app-empty-state-panel {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin: 0;
    padding: var(--space-3);
}

.app-inline-row-gap-2 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.app-flex-fill {
    flex: 1;
}

.app-player-placeholder-compact {
    width: 28px;
    height: 28px;
    font-size: 0.85rem;
}

.app-inline-content-grow {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

.app-mobile-half-action {
    width: 100%;
    max-width: 50%;
}

.app-bottom-actions-row {
    display: flex;
    gap: 0.5rem;
    width: 100%;
}

.app-modal-loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.8);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    border-radius: 0.3rem;
}

.app-modal-loading-text {
    font-size: 0.9rem;
}

.app-mobile-score-grid {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
}

.app-mobile-score-field {
    flex: 1 1 140px;
    min-width: 140px;
}

.app-history-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-3);
}

.app-toolbar-split {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-3);
    width: 100%;
}

.app-team-balance-stats {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.app-history-team-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--space-4);
}

.app-history-player-line {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.app-winner-tag {
    margin-left: var(--space-1);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    color: var(--color-validation-success);
}

.app-detail-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-bottom: var(--space-2);
}

.app-detail-label {
    flex: 0 0 120px;
    font-weight: var(--font-weight-bold);
}

.app-detail-content {
    flex: 1 1 220px;
    min-width: 0;
}

.app-detail-meta-row {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.app-mobile-menu-page {
    background-color: #f0f2f5;
    min-height: 100vh;
    padding-bottom: var(--space-4);
    margin: calc(-1 * var(--space-4));
}

.app-mobile-menu-header {
    background: linear-gradient(135deg, var(--color-avatar-gradient-start) 0%, var(--color-avatar-gradient-end) 100%);
    color: var(--color-text-inverse);
    padding: var(--space-4) var(--space-6) var(--space-6);
    display: flex;
    align-items: center;
    gap: var(--space-5);
    margin-bottom: var(--space-4);
    box-shadow: var(--shadow-md);
}

.app-mobile-menu-avatar {
    flex-shrink: 0;
}

.app-mobile-menu-avatar-icon {
    font-size: 3.5rem;
}

.app-mobile-menu-details {
    flex-grow: 1;
    overflow: hidden;
}

.app-mobile-menu-email {
    font-size: 0.9rem;
    opacity: 0.95;
    margin-bottom: 0.4rem;
    word-break: break-word;
}

.app-mobile-menu-role {
    font-size: 1.1rem;
    font-weight: var(--font-weight-semibold);
    margin-bottom: 0.3rem;
}

.app-mobile-menu-sections {
    padding: 0 var(--space-4) 80px;
}

.app-mobile-menu-section,
.app-mobile-menu-admin-toggle {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-4);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.app-mobile-menu-section-header {
    font-weight: var(--font-weight-bold);
    font-size: 0.8rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: var(--space-4) var(--space-5) var(--space-3);
    background: var(--color-surface-muted);
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
}

.app-mobile-menu-item {
    display: flex;
    align-items: center;
    padding: 1.1rem 1.25rem;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.app-mobile-menu-item:last-child {
    border-bottom: none;
}

.app-mobile-menu-item:active {
    background-color: var(--color-surface-muted);
}

.app-mobile-menu-icon {
    color: var(--color-avatar-gradient-start);
    font-size: 1.4rem;
    margin-right: var(--space-4);
    flex-shrink: 0;
}

.app-mobile-menu-text {
    flex-grow: 1;
    font-size: 1rem;
    font-weight: var(--font-weight-medium);
    color: var(--color-text-primary);
}

.app-mobile-menu-arrow {
    color: #adb5bd;
    font-size: 1rem;
    flex-shrink: 0;
}

.app-mobile-menu-admin-toggle {
    padding: var(--space-5);
}

.app-mobile-menu-admin-toggle .form-check-label {
    font-weight: var(--font-weight-medium);
    color: var(--color-text-secondary);
    cursor: pointer;
}

.app-mobile-menu-admin-toggle .form-check-input {
    cursor: pointer;
    width: 1.2rem;
    height: 1.2rem;
}

.app-mobile-menu-logout {
    padding: 0 var(--space-2);
    margin-top: var(--space-8);
    margin-bottom: var(--space-8);
}

.app-mobile-menu-logout .btn-danger {
    font-weight: var(--font-weight-semibold);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-mobile-burger-trigger {
    cursor: pointer;
    font-size: 2rem;
    margin-right: var(--space-4);
    line-height: 1;
}

.app-mobile-sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.2);
    z-index: 9998;
}

.app-mobile-sidebar-panel {
    position: fixed;
    color: var(--color-text-primary);
    top: 0;
    left: 0;
    width: 240px;
    height: 100vh;
    background: var(--color-surface);
    border-right: 1px solid var(--color-border-subtle);
    z-index: 9999;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.2);
    transition: left 0.3s;
    display: flex;
    flex-direction: column;
    padding-left: 10px;
    padding-right: 10px;
}

.app-mobile-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-4) var(--space-5);
    border-bottom: 1px solid var(--color-border-subtle);
    flex-shrink: 0;
}

.app-mobile-sidebar-nav {
    flex-grow: 1;
    overflow-y: auto;
    padding-top: var(--space-4);
    padding-bottom: var(--space-8);
}

.app-mobile-sidebar-link {
    color: var(--color-text-primary) !important;
    font-weight: var(--font-weight-semibold);
    padding: 12px 20px;
    background: #f2f2f2;
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-2);
    transition: background 0.17s, color 0.17s;
    border: 1px solid #ddd;
    display: block;
    text-decoration: none;
}

.app-mobile-sidebar-link:hover {
    background: var(--color-link);
    color: var(--color-text-inverse) !important;
    border-color: var(--color-link);
    text-decoration: none;
}

.app-mobile-sidebar-link.active {
    background: grey !important;
    color: var(--color-text-primary) !important;
    border-color: #bbb;
    text-decoration: none;
}

.app-mobile-sidebar-section-title {
    font-weight: var(--font-weight-bold);
}

.app-mobile-tabbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--color-surface);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 0;
    margin: 0;
}

.app-mobile-tabbar-content {
    display: flex;
    justify-content: space-around;
    align-items: center;
    min-height: 74px;
    height: 74px;
    background: var(--color-surface);
}

.app-mobile-tabbar-spacer {
    width: 100%;
    height: 40px;
    background: var(--color-surface);
}

.app-mobile-tabbar-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    padding: 8px 4px;
    transition: all 0.2s ease;
    color: var(--color-text-muted);
    -webkit-tap-highlight-color: transparent;
    min-width: 0;
    height: 100%;
}

.app-mobile-tabbar-item:active {
    transform: scale(0.95);
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: var(--radius-md);
}

.app-mobile-tabbar-item.active {
    color: var(--color-avatar-gradient-start);
}

.app-mobile-tabbar-icon {
    font-size: 1.5rem;
    transition: all 0.2s ease;
}

.app-mobile-tabbar-item.active .app-mobile-tabbar-icon {
    transform: scale(1.1);
}

.app-mobile-tabbar-label {
    font-size: 0.7rem;
    font-weight: var(--font-weight-medium);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.app-mobile-tabbar-item.active .app-mobile-tabbar-label {
    font-weight: var(--font-weight-semibold);
}

.app-mobile-page-wrapper {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background-color: #f0f2f5;
    overflow: hidden;
    padding-top: 20px;
    padding-bottom: 0;
}

.app-mobile-main-content {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 120px;
}

.app-page-content-padding {
    padding: 0 var(--space-4);
}

.app-auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-4);
}

.app-auth-surface {
    width: 100%;
    max-width: 420px;
    background: var(--color-surface);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    padding: var(--space-6);
}

.app-auth-header {
    text-align: center;
    margin-bottom: var(--space-6);
}

.app-auth-subtitle {
    color: var(--color-text-muted);
}

.app-auth-helper-text {
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
    margin-bottom: 0;
}

.app-auth-actions {
    display: grid;
    gap: var(--space-2);
}

.app-auth-link-row {
    text-align: center;
}

.app-selection-label-stack {
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

@media (max-width: 991.98px) {
    .app-layout-sidebar-split {
        grid-template-columns: 1fr;
    }
}
