html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #0071c1;
}

:root {
    --app-primary: #1b6ec2;
    --app-primary-hover: #155a9f;
    --app-primary-subtle: #eef5fc;
    --app-secondary: #667085;
    --app-secondary-hover: #475467;
    --app-success: #198754;
    --app-success-hover: #146c43;
    --app-warning: #b7791f;
    --app-warning-hover: #8a5a16;
    --app-danger: #c73737;
    --app-danger-hover: #a92f2f;
    --app-border: #d7dce2;
}

.btn {
    align-items: center;
    border-radius: 6px;
    display: inline-flex;
    font-weight: 600;
    gap: .4rem;
    justify-content: center;
    line-height: 1.2;
    min-height: 2.375rem;
    padding: .45rem .85rem;
    text-decoration: none;
    transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease, color .15s ease, transform .15s ease;
    white-space: normal;
}

.btn:hover:not(:disabled):not(.disabled) {
    transform: translateY(-1px);
}

.btn-sm {
    border-radius: 5px;
    font-size: .85rem;
    min-height: 2rem;
    padding: .3rem .6rem;
}

.btn-primary {
    background-color: var(--app-primary);
    border-color: var(--app-primary);
    color: #fff;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--app-primary-hover);
    border-color: var(--app-primary-hover);
    color: #fff;
}

.btn-secondary,
.btn-outline-secondary {
    border-color: #c4cbd4;
}

.btn-outline-primary {
    border-color: var(--app-primary);
    color: var(--app-primary);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    background-color: var(--app-primary-subtle);
    border-color: var(--app-primary-hover);
    color: var(--app-primary-hover);
}

.btn-outline-secondary {
    color: var(--app-secondary-hover);
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus {
    background-color: #f3f4f6;
    border-color: var(--app-secondary);
    color: #344054;
}

.btn-success,
.btn-outline-success {
    border-color: var(--app-success);
}

.btn-outline-success {
    color: var(--app-success);
}

.btn-outline-success:hover,
.btn-outline-success:focus {
    background-color: #ecfdf3;
    border-color: var(--app-success-hover);
    color: var(--app-success-hover);
}

.btn-warning,
.btn-outline-warning {
    border-color: var(--app-warning);
}

.btn-outline-warning {
    color: var(--app-warning);
}

.btn-outline-warning:hover,
.btn-outline-warning:focus {
    background-color: #fff8e6;
    border-color: var(--app-warning-hover);
    color: var(--app-warning-hover);
}

.btn-danger {
    background-color: var(--app-danger);
    border-color: var(--app-danger);
    color: #fff;
}

.btn-danger:hover,
.btn-danger:focus {
    background-color: var(--app-danger-hover);
    border-color: var(--app-danger-hover);
    color: #fff;
}

.btn-outline-danger {
    border-color: var(--app-danger);
    color: var(--app-danger);
}

.btn-outline-danger:hover,
.btn-outline-danger:focus {
    background-color: #fff5f5;
    border-color: var(--app-danger-hover);
    color: var(--app-danger-hover);
}

.btn:disabled,
.btn.disabled,
fieldset:disabled .btn {
    opacity: .55;
    pointer-events: none;
    transform: none;
}

.btn-primary {
    color: #fff;
    background-color: var(--app-primary);
    border-color: var(--app-primary);
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

.content > h1 {
    margin-bottom: 1.25rem;
}

.profile-requirements-backdrop {
    align-items: center;
    background: rgba(16, 24, 40, .42);
    display: flex;
    inset: 0;
    justify-content: center;
    padding: 1rem;
    position: fixed;
    z-index: 1050;
}

.profile-requirements-dialog {
    background: #fff;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    box-shadow: 0 1.25rem 3rem rgba(16, 24, 40, .22);
    max-width: 42rem;
    padding: 1.25rem;
    width: min(100%, 42rem);
}

.profile-requirements-header {
    align-items: flex-start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.profile-requirements-header h2 {
    font-size: 1.35rem;
    margin: 0 0 .25rem;
}

.profile-requirements-header p {
    color: #475467;
    margin: 0;
}

.profile-requirements-list {
    display: grid;
    gap: .75rem;
}

.profile-requirements-item {
    align-items: center;
    border: 1px solid #e4e7ec;
    border-radius: 8px;
    display: grid;
    gap: .75rem;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: .85rem;
}

.profile-requirements-item span {
    color: #475467;
    display: block;
    margin-top: .2rem;
}

@media (max-width: 640px) {
    .profile-requirements-header,
    .profile-requirements-item {
        align-items: stretch;
        grid-template-columns: 1fr;
    }

    .profile-requirements-header {
        display: grid;
    }
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.loading-progress {
    position: absolute;
    display: block;
    width: 8rem;
    height: 8rem;
    inset: 20vh 0 auto 0;
    margin: 0 auto 0 auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #1b6ec2;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

code {
    color: #c02d76;
}

.page-heading {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.page-heading h1 {
    margin: 0;
}

.page-heading p {
    color: #667085;
    margin: .25rem 0 0;
}

.page-heading-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    justify-content: flex-end;
}

.content-band {
    background: #f8fafc;
    border: 1px solid #d7dce2;
    border-radius: 8px;
    margin-bottom: 1.25rem;
    padding: 1rem;
}

.form-panel {
    max-width: 42rem;
}

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

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

.table-panel .table {
    margin-bottom: 0;
}

.empty-state,
.loading-state {
    color: #667085;
    margin: 1rem 0;
}

.muted-text {
    color: #667085;
}

.table-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.account-nav {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: 1.25rem;
}

.account-nav a {
    border: 1px solid #d7dce2;
    border-radius: 999px;
    color: #344054;
    padding: .35rem .75rem;
    text-decoration: none;
}

.account-nav a:hover,
.account-nav a:focus {
    border-color: #1b6ec2;
    color: #0f4f91;
}

.account-profile-layout {
    display: grid;
    gap: 2rem;
}

.account-profile-layout.has-parental-consent {
    align-items: start;
    grid-template-columns: minmax(18rem, 42rem) minmax(20rem, 1fr);
}

.account-profile-consent {
    max-width: none;
}

.account-profile-consent .parental-consent-layout {
    grid-template-columns: 1fr;
    gap: 1.25rem;
}

.account-profile-consent .parental-consent-text {
    max-height: 22rem;
}

.action-row {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
}

.home-welcome {
    align-items: center;
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.home-welcome img {
    height: 6rem;
    width: 6rem;
}

.home-welcome h1 {
    margin: 0;
}

.home-widget-host {
    align-items: stretch;
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.home-widget-cell {
    display: flex;
    min-width: 0;
}

.home-widget-cell:last-child:nth-child(odd) {
    grid-column: 1 / -1;
}

.home-widget-cell > * {
    flex: 1 1 auto;
    min-width: 0;
}

.home-widget {
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 0.5rem;
    box-shadow: 0 0.25rem 0.75rem rgba(15, 23, 42, 0.08);
    height: 100%;
    overflow: auto;
    padding: 1.25rem;
    width: 100%;
}

.home-schedule h2 {
    font-size: 1.35rem;
    margin-bottom: 1rem;
}

.home-media {
    display: grid;
    gap: 1rem;
}

.home-media-header {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.home-media-header h2 {
    font-size: 1.35rem;
    margin: 0;
}

.home-media-controls {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.home-media-controls span {
    color: #667085;
    min-width: 3rem;
    text-align: center;
}

.home-media-frame {
    display: grid;
    gap: .75rem;
    margin: 0;
}

.home-media-frame img,
.home-media-frame video {
    aspect-ratio: 16 / 9;
    background: #eef1f4;
    border-radius: 8px;
    display: block;
    object-fit: contain;
    width: 100%;
}

.home-media-frame figcaption {
    color: #344054;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.special-events-list {
    display: grid;
    gap: 1rem;
}

.special-event-item {
    border: 1px solid #d7dce2;
    border-radius: 8px;
    display: grid;
    gap: .75rem;
    padding: 1rem;
}

.special-event-item h3 {
    font-size: 1.1rem;
    margin: 0 0 .35rem;
}

.special-event-item p {
    color: #475467;
    margin: 0;
}

.special-event-item dl {
    display: grid;
    gap: .5rem;
    margin: 0;
}

.special-event-item dt {
    color: #667085;
    font-size: .85rem;
    font-weight: 700;
}

.special-event-item dd {
    margin: 0;
}

.auth-panel {
    background: #f8fafc;
    border: 1px solid #d7dce2;
    border-radius: 8px;
    max-width: 48rem;
    padding: 1rem;
}

.auth-panel h1 {
    margin-bottom: 1.25rem;
}

.register-panel {
    max-width: 64rem;
}

.register-grid {
    display: grid;
    gap: 0 1rem;
    grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
}

.registration-rules {
    margin: 1rem 0;
}

.registration-rules h2 {
    font-size: 1.25rem;
}

.rules-box {
    border: 1px solid #d7dce2;
    border-radius: 8px;
    max-height: 22rem;
    overflow: auto;
    padding: 1rem;
}

.user-filters,
.user-edit-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    margin-bottom: 1rem;
}

.user-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.user-inactive-switch {
    margin-bottom: 0;
    min-height: 0;
    padding-left: 2.5rem;
}

.admin-user-details-layout {
    align-items: start;
    display: grid;
    gap: 2rem;
    grid-template-columns: minmax(0, 1fr) minmax(20rem, 1fr);
}

.admin-user-details-layout h2 {
    font-size: 1.25rem;
}

.user-table th,
.user-table td {
    vertical-align: middle;
}

.admin-results-header {
    align-items: center;
    color: #667085;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: .5rem;
}

.admin-table td {
    vertical-align: middle;
}

.admin-badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
}

.admin-status-badge {
    border-radius: 999px;
    display: inline-flex;
    font-size: .85rem;
    font-weight: 600;
    line-height: 1;
    padding: .35rem .6rem;
}

.admin-status-badge.neutral {
    background: #eef1f4;
    color: #344054;
}

.admin-status-badge.success {
    background: #d1e7dd;
    color: #0a3622;
}

.birthday-filter-band {
    align-items: end;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(12rem, 18rem) auto;
    justify-content: start;
}

.role-create-form {
    align-items: end;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(14rem, 24rem) auto;
    margin-bottom: 1rem;
}

.attendance-toolbar {
    align-items: end;
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    margin-bottom: 1rem;
}

.attendance-indemnity {
    max-width: 64rem;
    white-space: pre-line;
}

.attendance-actions {
    margin-bottom: 1rem;
}

.attendance-table td {
    vertical-align: middle;
}

.special-class-attendance-layout {
    display: grid;
    gap: 2rem;
    grid-template-columns: minmax(18rem, 28rem) minmax(18rem, 1fr);
}

.special-class-indemnity-editor {
    min-height: 12rem;
}

@media (max-width: 760px) {
    .special-class-attendance-layout {
        grid-template-columns: 1fr;
    }
}

.training-results-header {
    align-items: center;
    color: #667085;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: .5rem;
}

.training-table td,
.class-plan-table td {
    vertical-align: middle;
}

.training-user-cell {
    display: grid;
    gap: .35rem;
}

.training-status-row {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
}

.training-status-badge {
    border-radius: 999px;
    display: inline-flex;
    font-size: .85rem;
    font-weight: 600;
    line-height: 1;
    padding: .35rem .6rem;
}

.training-status-badge.neutral {
    background: #eef1f4;
    color: #344054;
}

.training-status-badge.success {
    background: #d1e7dd;
    color: #0a3622;
}

.training-status-badge.danger {
    background: #f8d7da;
    color: #58151c;
}

.class-plan-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
}

.class-plan-form {
    display: grid;
    gap: 1rem;
    max-width: 38rem;
}

.grading-form {
    display: grid;
    gap: 1rem;
    max-width: 38rem;
}

.grading-editor {
    display: grid;
    gap: 2rem;
}

.grading-comments {
    min-height: 28rem;
}

.grading-result-media-admin {
    display: grid;
    gap: 1rem;
    margin-top: 2rem;
    max-width: 54rem;
}

.grading-result-media-admin h2 {
    font-size: 1.25rem;
    margin: 0;
}

.grading-result-media-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
}

.grading-result-media-grid.compact {
    grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
    min-width: 14rem;
}

.grading-result-media-item {
    border: 1px solid var(--app-border);
    border-radius: 8px;
    display: grid;
    gap: .5rem;
    margin: 0;
    overflow: hidden;
    padding: .5rem;
}

.grading-result-media-item img,
.grading-result-media-item video {
    aspect-ratio: 4 / 3;
    background: #eef1f4;
    border-radius: 6px;
    display: block;
    object-fit: cover;
    width: 100%;
}

.grading-result-media-item figcaption {
    color: #475467;
    font-size: .85rem;
    overflow-wrap: anywhere;
}

.birthday-today {
    font-weight: 700;
}

.parental-consent-layout {
    display: grid;
    gap: 2rem;
    grid-template-columns: minmax(18rem, 28rem) minmax(18rem, 32rem);
}

.parental-consent-text {
    max-height: 44rem;
    overflow: auto;
    padding: .5rem;
    white-space: pre-line;
}

@media (max-width: 760px) {
    .account-profile-layout.has-parental-consent {
        grid-template-columns: 1fr;
    }

    .parental-consent-layout {
        grid-template-columns: 1fr;
    }
}

.class-plan-editor {
    display: grid;
    gap: 2rem;
    grid-template-columns: minmax(18rem, 28rem) minmax(18rem, 1fr);
}

.class-plan-date {
    width: 20%;
}

.class-plan-today {
    font-weight: 700;
}

.gallery-browser {
    align-items: start;
    display: grid;
    gap: 1.25rem;
    grid-template-columns: 15rem minmax(0, 1fr);
}

.gallery-filter-panel {
    background: #fff;
    border: 1px solid #d7dce2;
    border-radius: 8px;
    display: grid;
    gap: .5rem;
    padding: 1rem;
    position: sticky;
    top: 1rem;
}

.gallery-filter-panel h2 {
    font-size: 1rem;
    margin: .75rem 0 0;
}

.gallery-filter-panel h2:first-child {
    margin-top: 0;
}

.filter-loading {
    align-items: center;
    color: #667085;
    display: flex;
    font-size: .9rem;
    gap: .5rem;
    min-height: 2rem;
}

.gallery-filter {
    align-items: center;
    background: #fff;
    border: 1px solid #d7dce2;
    border-radius: 8px;
    color: #1b1f24;
    display: flex;
    gap: .75rem;
    justify-content: space-between;
    padding: .45rem .65rem;
    text-align: left;
    width: 100%;
}

.gallery-filter.active,
.gallery-filter:hover,
.gallery-filter:focus {
    border-color: #1b6ec2;
    color: #0f4f91;
}

.gallery-filter span {
    color: #667085;
    font-size: .85rem;
}

.gallery-tag-filter {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}

.gallery-results {
    min-width: 0;
}

.gallery-results-header {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: .75rem;
}

.gallery-results-header h2 {
    font-size: 1.15rem;
    margin: 0;
}

.gallery-results-header span {
    color: #667085;
}

.gallery-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}

.gallery-tile {
    background: #fff;
    border: 1px solid #d7dce2;
    border-radius: 8px;
    color: #1b1f24;
    display: grid;
    gap: 0.55rem;
    overflow: hidden;
    text-decoration: none;
}

.gallery-tile:hover,
.gallery-tile:focus {
    border-color: #1b6ec2;
    color: #1b1f24;
    transform: translateY(-1px);
}

.gallery-tile img,
.gallery-tile video {
    aspect-ratio: 4 / 3;
    background: #eef1f4;
    display: block;
    object-fit: cover;
    width: 100%;
}

.gallery-tile span {
    display: block;
    font-weight: 600;
    line-height: 1.25;
    min-height: 2.5rem;
    overflow-wrap: anywhere;
    padding: 0 0.8rem;
}

.gallery-tile small {
    color: #667085;
    padding: 0 .8rem;
}

.gallery-media-kind {
    background: #f3f4f6;
    border-radius: 999px;
    color: #344054;
    font-size: .8rem;
    font-style: normal;
    margin: 0 .8rem;
    padding: .15rem .5rem;
    width: fit-content;
}

.gallery-tile-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    padding: 0 .8rem .85rem;
}

.gallery-tile-tags em {
    background: #eef5fc;
    border-radius: 999px;
    color: #0f4f91;
    font-size: .8rem;
    font-style: normal;
    padding: .15rem .45rem;
}

.pagination-row {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.gallery-detail {
    margin: 0 0 1.5rem;
}

.gallery-detail img,
.gallery-detail video {
    background: #eef1f4;
    display: block;
    max-height: 72vh;
    max-width: 100%;
    object-fit: contain;
    width: 100%;
}

.gallery-detail figcaption {
    color: #667085;
    margin-top: 0.75rem;
}

.gallery-detail-actions,
.gallery-item-nav {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.gallery-item-nav .disabled {
    opacity: .55;
    pointer-events: none;
}

.gallery-admin-toolbar,
.gallery-album-card,
.gallery-album-create,
.gallery-album-delete,
.gallery-admin-danger-row,
.gallery-delete-actions,
.gallery-caption-editor {
    align-items: end;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.gallery-admin-toolbar {
    align-items: end;
    background: #f8fafc;
    border: 1px solid #d7dce2;
    border-radius: 8px;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(18rem, 1.4fr) minmax(11rem, .75fr) minmax(12rem, .85fr) minmax(18rem, 1fr);
    padding: 1rem;
}

.gallery-album-card {
    align-items: start;
    background: #fff;
    border: 1px solid #d7dce2;
    border-radius: 8px;
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 1rem;
}

.gallery-caption-field textarea {
    min-height: 2.375rem;
}

.gallery-caption-field,
.gallery-upload-field,
.gallery-file-picker {
    display: grid;
    gap: .35rem;
    min-width: 0;
}

.gallery-file-picker input {
    max-width: 100%;
}

.gallery-file-input {
    color: #667085;
    min-height: 2.375rem;
    width: 100%;
}

.gallery-file-input::file-selector-button {
    background: #fff;
    border: 1px solid #1b6ec2;
    border-radius: .375rem;
    color: #1b6ec2;
    cursor: pointer;
    margin-right: .75rem;
    padding: .375rem .75rem;
}

.gallery-file-input::file-selector-button:hover {
    background: #eef5fc;
}

@media (max-width: 1100px) {
    .gallery-admin-toolbar {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }
}

.gallery-album-create,
.gallery-album-delete {
    display: grid;
    gap: .35rem;
    margin: 0;
}

.gallery-album-create > div,
.gallery-album-delete > div {
    display: flex;
    gap: .5rem;
}

.gallery-album-delete small {
    color: #667085;
}

.gallery-admin-danger-row {
    display: flex;
    justify-content: flex-end;
    margin: 0 0 1.5rem;
}

.gallery-caption-editor {
    align-items: end;
    background: #f8fafc;
    border: 1px solid #d7dce2;
    border-radius: 8px;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(18rem, 2fr) minmax(12rem, 1fr) minmax(12rem, 1fr);
    padding: 1rem;
}

.gallery-caption-editor .validation-summary-errors {
    grid-column: 1 / -1;
}

.gallery-caption-editor textarea {
    min-height: 2.75rem;
}

.gallery-detail-field,
.gallery-detail-save {
    min-width: 0;
}

.gallery-home-toggle {
    align-self: end;
    grid-column: 1 / 3;
    margin-bottom: .45rem;
}

.gallery-detail-save {
    display: flex;
    grid-column: 3;
    justify-content: flex-end;
}

.gallery-delete-tile {
    cursor: pointer;
}

.gallery-delete-checkbox {
    align-items: center;
    color: #667085;
    display: flex !important;
    font-size: .9rem;
    gap: .45rem;
    min-height: 0 !important;
    padding-bottom: .85rem !important;
}

.gallery-delete-actions {
    background: #fff5f5;
    border: 1px solid #f1b5b5;
    border-radius: 8px;
    justify-content: space-between;
    padding: .75rem 1rem;
}

@media (max-width: 860px) {
    .gallery-browser {
        grid-template-columns: 1fr;
    }

    .gallery-filter-panel {
        position: static;
    }

    .gallery-admin-toolbar,
    .gallery-album-card,
    .gallery-caption-editor {
        grid-template-columns: 1fr;
    }

    .gallery-detail-save {
        grid-column: auto;
        justify-content: flex-start;
    }

    .gallery-home-toggle {
        grid-column: auto;
    }
}

.auth-panel {
    max-width: 28rem;
}

.contact-layout {
    display: grid;
    gap: 2rem;
    grid-template-columns: minmax(0, 32rem) minmax(18rem, 1fr);
}

.contact-details h2 {
    font-size: 1.25rem;
}

.detail-list {
    display: grid;
    gap: 0.5rem 1rem;
    grid-template-columns: max-content minmax(0, 1fr);
}

.detail-list dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.settings-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 56rem;
}

.settings-grid h2 {
    font-size: 1.1rem;
}

.home-widget-settings-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.home-widget-settings-item {
    align-items: center;
    border: 1px solid var(--bs-border-color);
    border-radius: 0.5rem;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: 0.75rem;
}

.home-widget-setting-content {
    display: grid;
    gap: 0.75rem;
}

.home-widget-setting-field {
    min-width: 10rem;
}

.button-row {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.button-row.compact {
    gap: 0.5rem;
    margin-top: 0;
}

.control_button {
    margin: .15rem .2rem .15rem 0;
}

.table .btn,
.admin-table .btn,
.training-table .btn {
    vertical-align: middle;
}

.attendance-form {
    align-items: end;
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    max-width: 34rem;
}

.member-attendance-command .attendance-form {
    margin-bottom: 0;
}

.member-attendance-summary {
    align-items: center;
    color: #667085;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: .5rem;
}

.member-results-header {
    align-items: center;
    color: #667085;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: .5rem;
}

.member-results-header > div {
    align-items: baseline;
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
}

.member-results-header strong {
    color: #1b1f24;
}

.member-table td {
    vertical-align: middle;
}

.member-status-badge {
    border-radius: 999px;
    display: inline-flex;
    font-size: .85rem;
    font-weight: 600;
    line-height: 1;
    padding: .35rem .6rem;
}

.member-status-badge.neutral {
    background: #eef1f4;
    color: #344054;
}

.member-status-badge.success {
    background: #d1e7dd;
    color: #0a3622;
}

.member-status-badge.warning {
    background: #fff3cd;
    color: #664d03;
}

.document-command-band,
.document-filter-band {
    background: #f8fafc;
    border: 1px solid #d7dce2;
    border-radius: 8px;
    margin-bottom: 1rem;
    padding: 1rem;
}

.document-editor,
.document-filter-band {
    align-items: end;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(16rem, 1fr) repeat(3, minmax(10rem, auto));
}

.document-editor .validation-summary-errors {
    grid-column: 1 / -1;
}

.document-editor-field.compact {
    min-width: 12rem;
}

.document-filter-actions {
    align-items: end;
    display: flex;
    gap: .5rem;
}

.document-results-header {
    align-items: center;
    color: #667085;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: .5rem;
}

.document-sort-button {
    background: transparent;
    border: 0;
    color: #1b6ec2;
    font: inherit;
    font-weight: 600;
    padding: 0;
    text-align: left;
}

.document-sort-button:hover,
.document-sort-button:focus {
    color: #0f4f91;
    text-decoration: underline;
}

.document-sort-button:disabled {
    color: #667085;
}

.document-table td {
    vertical-align: middle;
}

.document-name-cell {
    min-width: 14rem;
}

.document-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    min-width: 22rem;
}

.document-status,
.document-file-status {
    border-radius: 999px;
    display: inline-flex;
    font-size: .85rem;
    font-weight: 600;
    line-height: 1;
    padding: .35rem .6rem;
}

.document-status.draft {
    background: #fff3cd;
    color: #664d03;
}

.document-status.published {
    background: #d1e7dd;
    color: #0a3622;
}

.document-status.expired,
.document-file-status.missing {
    background: #f8d7da;
    color: #58151c;
}

.document-file-link {
    overflow-wrap: anywhere;
}

.document-file-input {
    max-width: 13rem;
}

@media (max-width: 760px) {
    .contact-layout {
        grid-template-columns: 1fr;
    }

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

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

    .home-widget-settings-item {
        align-items: flex-start;
        flex-direction: column;
    }

    .attendance-form {
        align-items: stretch;
        flex-direction: column;
    }

    .member-attendance-summary,
    .member-results-header,
    .training-results-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .class-plan-editor {
        grid-template-columns: 1fr;
    }

    .document-editor,
    .document-filter-band {
        align-items: stretch;
        grid-template-columns: 1fr;
    }

    .birthday-filter-band {
        align-items: stretch;
        grid-template-columns: 1fr;
    }

    .home-welcome {
        align-items: flex-start;
        flex-direction: column;
    }

    .home-widget-host {
        grid-template-columns: 1fr;
    }
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}
