@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');

html, body {
    font-family: 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background: #f5f7f5;
    color: #19333c;
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #087f8c;
}

.btn-primary {
    color: #fff;
    background-color: #087f8c;
    border-color: #087f8c;
}

.btn-primary:hover, .btn-primary:focus {
    background-color: #066873;
    border-color: #066873;
}

.btn-outline-primary {
    color: #087f8c;
    border-color: #087f8c;
}

.btn-outline-primary:hover {
    background-color: #087f8c;
    border-color: #087f8c;
}

.content {
    padding-top: 2rem;
    padding-bottom: 3rem;
    max-width: 1320px;
}

.top-logout {
    margin-left: .65rem;
}

h1 {
    font-size: clamp(2rem, 3vw, 2.75rem);
    font-weight: 700;
    letter-spacing: -.04em;
    margin-bottom: .7rem;
}

h2 {
    font-size: 1.2rem;
    font-weight: 650;
    margin: 0 0 1rem;
}

.eyebrow {
    color: #087f8c;
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .13em;
    margin: 0 0 .65rem;
    text-transform: uppercase;
}

.page-heading {
    margin-bottom: 1.6rem;
}

.page-heading p:not(.eyebrow) {
    color: #58717a;
    margin: 0;
}

.hero {
    align-items: center;
    background: #fff;
    border: 1px solid #e4ebe8;
    border-radius: 18px;
    display: flex;
    gap: 3rem;
    justify-content: space-between;
    margin-bottom: 1.4rem;
    padding: clamp(1.6rem, 4vw, 3rem);
}

.hero .lead {
    color: #58717a;
    font-size: 1.04rem;
    line-height: 1.65;
    margin: 0;
    max-width: 710px;
}

.hero-actions {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    gap: .75rem;
}

.stat-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(5, 1fr);
    margin-bottom: 1.4rem;
}

.stat {
    background: #fff;
    border: 1px solid #e4ebe8;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    padding: 1.15rem 1.35rem;
}

.stat strong {
    color: #123c55;
    font-size: 2rem;
    line-height: 1.1;
}

.stat span {
    color: #667c82;
}

.panel {
    background: #fff;
    border: 1px solid #e4ebe8;
    border-radius: 14px;
    margin-bottom: 1.25rem;
    padding: 1.35rem;
}

.calendar-create {
    display: flex;
    gap: .8rem;
    max-width: 640px;
}

.calendar-cards {
    display: grid;
    gap: .8rem;
}

.calendar-card {
    align-items: center;
    border: 1px solid #e4ebe8;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    padding: 1rem 1.1rem;
}

.calendar-card.active-calendar {
    background: #f3faf8;
    border-color: #9cced0;
}

.calendar-card-title {
    align-items: center;
    display: flex;
    gap: .65rem;
}

.calendar-card-title h3 {
    font-size: 1.08rem;
    font-weight: 650;
    margin: 0 0 .25rem;
}

.active-label {
    background: #e4f4ee;
    border-radius: 100px;
    color: #08725f;
    font-size: .76rem;
    font-weight: 700;
    padding: .18rem .55rem;
}

.calendar-summary {
    color: #19333c;
    margin: .25rem 0 0;
}

.calendar-card-actions {
    align-items: center;
    display: flex;
    gap: .55rem;
}

.import-options {
    align-items: end;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.import-options .year-input {
    width: 118px;
}

.import-check {
    margin-bottom: .45rem;
}

.import-title {
    align-items: end;
}

.import-table {
    font-size: .9rem;
    min-width: 1020px;
}

.import-warning td {
    background: #fff7e6;
    color: #765108;
}

.steps {
    display: grid;
    gap: .8rem;
    grid-template-columns: repeat(6, 1fr);
}

.steps a {
    border: 1px solid #e7eeec;
    border-radius: 10px;
    color: #19333c;
    display: grid;
    gap: .35rem;
    padding: 1rem;
    text-decoration: none;
}

.steps a:hover {
    border-color: #9cced0;
}

.steps b {
    align-items: center;
    background: #e4f4f2;
    border-radius: 50%;
    color: #087f8c;
    display: inline-flex;
    height: 28px;
    justify-content: center;
    margin-bottom: .3rem;
    width: 28px;
}

.steps span, .muted, .empty {
    color: #687f87;
    font-size: .93rem;
}

.section-title {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin-bottom: .8rem;
}

.section-title h2, .section-title p {
    margin-bottom: 0;
}

.slot-input {
    font-family: Consolas, monospace;
}

.form-actions {
    align-items: center;
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.feedback {
    color: #087f8c;
    font-size: .92rem;
}

.clean-table {
    margin: 0;
}

.clean-table > :not(caption) > * > * {
    border-color: #eef2f0;
    padding: .78rem .55rem;
}

.clean-table thead {
    color: #687f87;
    font-size: .82rem;
    text-transform: uppercase;
}

.danger-link {
    color: #b83c43;
    text-decoration: none;
}

.danger-link:hover {
    color: #932e33;
}

.two-columns {
    display: grid;
    gap: 1.2rem;
    grid-template-columns: minmax(260px, .75fr) minmax(420px, 1.5fr);
}

.teams-workbench {
    align-items: start;
    display: grid;
    gap: 1.2rem;
    grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
}

.responsible-workbench {
    align-items: start;
    display: grid;
    gap: 1.2rem;
    grid-template-columns: minmax(280px, 330px) minmax(0, 1fr);
}

.team-sidebar {
    position: sticky;
    top: 1rem;
}

.team-search {
    display: grid;
    gap: .65rem;
    margin-top: 1rem;
}

.team-list {
    display: grid;
    gap: .45rem;
    margin-top: 1rem;
    max-height: 68vh;
    overflow-y: auto;
    padding-right: .25rem;
}

.team-list-item {
    background: #f7faf8;
    border: 1px solid #e1e8e5;
    border-radius: 10px;
    color: #19333c;
    display: grid;
    gap: .18rem;
    padding: .7rem .8rem;
    text-align: left;
}

.team-list-item:hover, .team-list-item.selected {
    background: #e4f4ee;
    border-color: #82c6bd;
}

.team-list-item span {
    color: #687f87;
    font-size: .82rem;
}

.team-detail-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(360px, .9fr) minmax(360px, 1.1fr);
    margin-top: 1rem;
}

.embedded-panel {
    background: #f8fbfa;
    border: 1px solid #e3ece8;
    border-radius: 12px;
    padding: 1rem;
}

.single-column-form {
    grid-template-columns: 1fr;
}

.compact-block-row {
    grid-template-columns: minmax(220px, 1.35fr) minmax(150px, .85fr) auto;
}

.form-grid {
    display: grid;
    gap: .8rem;
    grid-template-columns: repeat(2, 1fr);
}

.span-two {
    grid-column: span 2;
}

.block-row {
    align-items: center;
    border-top: 1px solid #eef2f0;
    display: grid;
    gap: 1rem;
    grid-template-columns: 1.25fr 1fr auto;
    padding: .65rem 0;
}

.request-editor {
    align-items: start;
    display: flex;
    gap: .7rem;
}

.request-editor textarea {
    flex: 1;
}

.rule-hard, .rule-prefer-no, .rule-prefer-yes, .rule-pending {
    border-radius: 100px;
    display: inline-block;
    font-size: .76rem;
    margin-right: .45rem;
    padding: .18rem .52rem;
    white-space: nowrap;
}

.rule-hard {
    background: #fde8e8;
    color: #9c2f36;
}

.rule-prefer-no {
    background: #fff1dc;
    color: #945608;
}

.rule-prefer-yes {
    background: #e4f4ee;
    color: #08725f;
}

.rule-pending {
    background: #ebeff4;
    color: #506378;
}

.constraint-editor {
    display: grid;
    gap: .8rem;
    grid-template-columns: repeat(2, minmax(230px, 1fr));
}

.constraint-row {
    align-items: center;
    border-top: 1px solid #eef2f0;
    display: grid;
    gap: .85rem;
    grid-template-columns: 1.25fr 1fr .85fr 1.25fr auto;
    padding: .7rem 0;
}

.group-editor {
    align-items: end;
    display: flex;
    gap: 2rem;
}

.group-editor > div {
    min-width: 270px;
}

.group-editor .code-input {
    min-width: 92px;
    text-transform: uppercase;
    width: 92px;
}

.check-line {
    display: flex;
    gap: .55rem;
    padding-bottom: .5rem;
}

.team-selector {
    display: flex;
    flex-wrap: wrap;
    gap: .65rem;
}

.team-selector label {
    background: #f4f8f7;
    border-radius: 8px;
    display: flex;
    gap: .45rem;
    padding: .6rem .8rem;
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
}

.chips span {
    background: #e8f4f3;
    border-radius: 100px;
    color: #195861;
    padding: .35rem .8rem;
}

.calendar-heading {
    align-items: end;
    display: flex;
    justify-content: space-between;
}

.calendar-actions {
    align-items: center;
    display: flex;
    gap: .7rem;
}

.stale-calendar {
    align-items: center;
    background: #fff7e6;
    border-color: #f1d18b;
    color: #765108;
    display: flex;
    gap: .7rem;
}

.generation-running {
    align-items: center;
    background: #eef9fb;
    border-color: #9cced0;
    color: #195861;
    display: flex;
    gap: 1rem;
}

.generation-running span {
    display: block;
    margin-top: .15rem;
}

.loading-spinner {
    animation: spin .8s linear infinite;
    border: 2px solid rgba(255, 255, 255, .55);
    border-top-color: #fff;
    border-radius: 50%;
    display: inline-block;
    height: 1rem;
    margin-right: .45rem;
    vertical-align: -.15rem;
    width: 1rem;
}

.loading-spinner.large {
    border-color: #b8e0df;
    border-top-color: #087f8c;
    flex: 0 0 auto;
    height: 2rem;
    margin-right: 0;
    width: 2rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.generation-box {
    align-items: center;
    display: flex;
    gap: 2rem;
}

.generation-total {
    border-right: 1px solid #e4ebe8;
    display: flex;
    flex-direction: column;
    min-width: 145px;
    padding-right: 1.5rem;
}

.generation-total strong {
    color: #087f8c;
    font-size: 2rem;
}

.notice {
    color: #46626c;
    margin: .25rem 0;
}

.generation-advices {
    border-color: #f1d18b;
}

.advice-card {
    background: #fffaf0;
    border: 1px solid #f1d18b;
    border-radius: 12px;
    margin-top: .8rem;
    padding: 1rem;
}

.advice-card h3 {
    color: #765108;
    font-size: 1.02rem;
    font-weight: 700;
    margin: 0 0 .45rem;
}

.advice-card p {
    margin-bottom: .7rem;
}

.advice-card ul {
    margin: .35rem 0 .75rem;
    padding-left: 1.2rem;
}

.board-title {
    align-items: end;
    gap: 1.5rem;
}

.board-filters {
    align-items: end;
    display: flex;
    gap: .65rem;
}

.board-filters .form-select {
    min-width: 170px;
}

.group-legend {
    display: flex;
    flex-wrap: wrap;
    gap: .8rem;
    margin: 1rem 0 1.2rem;
}

.legend-group {
    background: #f5f8f6;
    border: 1px solid #dde7e2;
    border-radius: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: .6rem .85rem;
    padding: .6rem .8rem;
}

.legend-group strong {
    color: #19333c;
    width: 100%;
}

.legend-group span b {
    color: #087f8c;
    margin-right: .25rem;
}

.grid-scroll {
    overflow-x: auto;
    padding-bottom: .35rem;
}

.excel-calendar {
    border-collapse: collapse;
    color: #152a30;
    font-size: .87rem;
    min-width: 100%;
    table-layout: fixed;
}

.excel-calendar th, .excel-calendar td {
    border: 1px solid #b7c3be;
    height: 32px;
}

.excel-calendar .day-heading, .excel-calendar .date-heading {
    background: #dbe8dd;
    min-width: 90px;
    padding: .45rem;
    text-align: center;
}

.excel-calendar .date-heading {
    min-width: 72px;
}

.gym-heading {
    background: #1e806d;
    color: #fff;
    font-size: .9rem;
    letter-spacing: .03em;
    min-width: 108px;
    padding: .45rem .5rem;
    text-align: center;
    text-transform: uppercase;
}

.time-heading {
    background: #3b9d84;
    color: #fff;
    min-width: 108px;
    padding: .35rem;
    text-align: center;
}

.day-cell, .date-cell {
    background: #f7faf8;
    font-weight: 600;
    padding: 0 .5rem;
    text-transform: capitalize;
    white-space: nowrap;
}

.date-cell {
    text-align: center;
}

.excel-calendar td {
    padding: .18rem .3rem;
    text-align: center;
}

.open-cell {
    background: #fff;
}

.closed-cell {
    background: #d5d9d7;
}

.filtered-cell {
    background: #eff2f1;
}

.match-cell {
    background: #e4f4ee;
    color: #064c45;
    font-weight: 700;
}

.match-cell span {
    white-space: nowrap;
}

.calendar-match {
    cursor: grab;
    display: inline-block;
    padding: .1rem .25rem;
}

.calendar-match:active {
    cursor: grabbing;
}

.open-cell {
    min-width: 108px;
}

.match-edit-panel {
    background: #f7faf8;
    border: 1px solid #dbe7e3;
    border-radius: 12px;
    margin-top: 1rem;
    padding: 1rem;
}

.referee-calendar td {
    height: 42px;
    min-width: 96px;
    vertical-align: middle;
}

.referee-match {
    color: #064c45;
    font-size: .82rem;
    font-weight: 800;
    line-height: 1.15;
}

.referee-label {
    color: #315a64;
    font-size: .7rem;
    font-weight: 650;
    line-height: 1.2;
    margin-top: .18rem;
}

.referee-label.missing {
    color: #a04514;
}

.referee-issues {
    margin: 0;
    padding-left: 1.2rem;
}

.compact-referee-editor {
    max-width: 720px;
}

.referee-edit-row {
    align-items: center;
    display: grid;
    gap: .75rem;
    grid-template-columns: minmax(260px, 1fr) auto;
}

.referee-calendar .gym-heading,
.referee-calendar .time-heading {
    min-width: 96px;
}

.weekend th, .weekend td.open-cell, .weekend td.filtered-cell {
    background: #e4eadb;
}

.calendar-layout {
    display: grid;
    gap: 1.2rem;
    grid-template-columns: minmax(580px, 1fr) 250px;
}

.free-slots div {
    border-bottom: 1px solid #eef2f0;
    font-size: .93rem;
    padding: .5rem 0;
}

.free-slots div span {
    color: #687f87;
    display: block;
    font-size: .82rem;
}

.registry-card .section-title {
    align-items: start;
}

.email-status {
    border-left: 4px solid #d3a028;
}

.email-status.email-ready {
    border-left-color: #13896e;
}

.player-card {
    border-top: 1px solid #e1e8e5;
    margin-top: 1rem;
    padding-top: 1rem;
}

.player-entry-panel {
    margin-bottom: 1rem;
}

.player-entry-grid {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
}

.players-filter-bar {
    align-items: end;
    display: grid;
    gap: .85rem;
    grid-template-columns: minmax(240px, 1.4fr) minmax(190px, .9fr) minmax(150px, .65fr) minmax(180px, .85fr);
}

.shirt-size-dashboard {
    display: grid;
    gap: .65rem;
    grid-template-columns: repeat(9, minmax(80px, 1fr));
}

.shirt-total {
    background: #f7faf8;
    border: 1px solid #e1e8e5;
    border-radius: 12px;
    display: grid;
    gap: .25rem;
    padding: .85rem;
    text-align: center;
}

.shirt-total span {
    color: #687f87;
    font-size: .82rem;
    font-weight: 700;
    text-transform: uppercase;
}

.shirt-total strong {
    color: #087f8c;
    font-size: 1.65rem;
}

.shirt-total.primary {
    background: #e4f4ee;
    border-color: #82c6bd;
}

.shirt-total.warning {
    background: #fff7e6;
    border-color: #f1d18b;
}

.shirt-total.warning strong {
    color: #945608;
}

.players-admin-table {
    min-width: 980px;
}

.team-logo-panel {
    margin-bottom: 1rem;
}

.team-logo-preview {
    align-items: center;
    background: #f3faf8;
    border: 1px solid #dbe7e3;
    border-radius: 16px;
    display: flex;
    height: 120px;
    justify-content: center;
    margin-bottom: .75rem;
    overflow: hidden;
}

.team-logo-preview img {
    height: 100%;
    object-fit: contain;
    width: 100%;
}

.team-logo-preview span {
    color: #087f8c;
    font-size: 2rem;
    font-weight: 800;
}

.login-shell {
    display: flex;
    justify-content: center;
    padding: 4rem 1.5rem;
}

.login-panel {
    max-width: 460px;
    width: 100%;
}

.public-chip {
    background: #f3faf8;
    border: 1px solid #d4e9e3;
    border-radius: 100px;
    color: #087f8c;
    padding: .45rem .8rem;
    text-decoration: none;
}

.public-chip.selected {
    background: #087f8c;
    color: #fff;
}

.public-chip.mini {
    display: inline-flex;
    font-size: .78rem;
    margin-bottom: .35rem;
    padding: .22rem .55rem;
}

.public-hero {
    background: linear-gradient(125deg, #083c4a, #087f8c);
    border-radius: 20px;
    color: #fff;
    margin-bottom: 1.4rem;
    padding: clamp(2rem, 5vw, 4rem);
}

.compact-public-hero {
    padding: clamp(1.6rem, 4vw, 2.5rem);
}

.public-hero .eyebrow, .public-hero .lead {
    color: #d2efef;
}

.public-hero .lead {
    font-size: 1.08rem;
    line-height: 1.65;
    max-width: 680px;
}

.public-hero .btn-outline-primary {
    border-color: #c8eeee;
    color: #fff;
}

.public-event-grid, .news-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.public-event-card {
    border: 1px solid #e1e8e5;
    border-radius: 12px;
    color: #19333c;
    display: flex;
    flex-direction: column;
    gap: .45rem;
    padding: 1.1rem;
    text-decoration: none;
}

.public-event-card span {
    color: #687f87;
}

.public-event-card b {
    color: #087f8c;
}

.public-event-card.detailed {
    background: #f8fbfa;
    border-color: #cfe7e3;
}

.public-event-card.detailed b {
    align-self: flex-start;
    background: #087f8c;
    border-radius: 100px;
    color: #fff;
    margin-top: .35rem;
    padding: .38rem .75rem;
}

.public-day-board {
    border-color: #cfe7e3;
}

.public-day-header {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    text-align: center;
}

.public-day-header h2 {
    font-size: clamp(1.4rem, 3vw, 2rem);
    margin: .15rem 0;
    text-transform: capitalize;
}

.public-date-jump {
    align-items: center;
    display: flex;
    gap: .7rem;
    justify-content: center;
    margin-top: 1rem;
}

.public-date-jump .form-select {
    max-width: 280px;
}

.public-match-grid {
    display: grid;
    gap: .85rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 1rem;
}

.public-match-card {
    border: 1px solid #e1e8e5;
    border-radius: 14px;
    display: grid;
    gap: 1rem;
    grid-template-columns: 96px minmax(0, 1fr);
    padding: 1rem;
}

.match-time {
    align-items: center;
    background: #e4f4ee;
    border-radius: 12px;
    color: #08725f;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: .8rem .4rem;
    text-align: center;
}

.match-time strong {
    font-size: 1.55rem;
}

.match-time span {
    color: #195861;
    font-size: .82rem;
}

.match-body h3 {
    font-size: 1.1rem;
    margin: .25rem 0 .4rem;
}

.match-body h3 span {
    color: #8a9aa0;
    font-weight: 500;
    margin: 0 .3rem;
}

.match-body h3 > span:not(.team-badge-inline) {
    font-size: .8rem;
    text-transform: uppercase;
}

.match-meta-line {
    align-items: center;
    color: #687f87;
    display: flex;
    flex-wrap: wrap;
    font-size: .9rem;
    gap: .35rem .55rem;
    margin-bottom: .35rem;
}

.mobile-match-teams {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .2rem .4rem;
    font-size: 1.05rem;
    font-weight: 750;
}

.mobile-match-teams > span:not(.team-badge-inline) {
    color: #8a9aa0;
    font-size: .78rem;
}

.match-bottom-line {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .35rem .75rem;
    justify-content: space-between;
    margin-top: .35rem;
}

.team-badge-inline {
    align-items: center;
    display: inline-flex;
    gap: .42rem;
    margin: .15rem .2rem .15rem 0;
    vertical-align: middle;
}

.team-badge-inline img,
.team-logo-fallback {
    border: 1px solid #dbe7e3;
    border-radius: 50%;
    height: 28px;
    object-fit: cover;
    width: 28px;
}

.team-logo-fallback {
    align-items: center;
    background: #e4f4ee;
    color: #08725f;
    display: inline-flex;
    font-size: .72rem;
    font-weight: 800;
    justify-content: center;
}

.team-logo-fallback.mini {
    height: 24px;
    width: 24px;
}

.public-referee {
    color: #315a64;
    font-size: .9rem;
    margin: .25rem 0 .45rem;
}

.public-match-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    justify-content: flex-end;
    margin-top: .55rem;
}

.public-match-actions a {
    background: #f3faf8;
    border: 1px solid #d4e9e3;
    border-radius: 100px;
    color: #087f8c;
    font-size: .78rem;
    font-weight: 700;
    padding: .28rem .58rem;
    text-decoration: none;
}

.public-browse-tiles {
    display: grid;
    gap: .75rem;
    margin-bottom: 1rem;
}

.public-browse-tiles h3 {
    color: #19333c;
    font-size: 1rem;
    font-weight: 700;
    margin: .25rem 0 0;
}

.public-browse-tiles button {
    cursor: pointer;
}

.public-group-tile-grid {
    display: grid;
    gap: .65rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.public-group-tile {
    background: #fff;
    border: 1px solid #dbe7e3;
    border-radius: 12px;
    color: #19333c;
    display: grid;
    gap: .15rem;
    padding: .75rem .85rem;
    text-align: left;
    text-decoration: none;
}

.public-group-tile.selected,
.public-group-tile:hover {
    background: #087f8c;
    border-color: #087f8c;
    color: #fff;
}

.public-group-tile span,
.public-group-tile small {
    color: inherit;
    opacity: .72;
}

.public-advanced-filters {
    border-top: 1px solid #edf2f0;
    padding-top: 1rem;
}

.public-group-grid {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.public-group-card {
    background: #fff;
    border: 1px solid #e1e8e5;
    border-radius: 14px;
    margin: 0;
    padding: 1rem;
}

.public-group-card h3 {
    font-size: 1.12rem;
    margin: 0;
}

.public-group-content {
    display: grid;
    gap: 1.2rem;
    grid-template-columns: minmax(300px, 1.15fr) minmax(280px, .85fr);
}

.public-mini-match {
    border-top: 1px solid #edf2f0;
    display: grid;
    gap: .35rem;
    grid-template-columns: 92px minmax(0, 1fr) minmax(120px, .65fr) auto;
    padding: .55rem 0;
}

.public-mini-match span {
    color: #687f87;
    font-size: .86rem;
}

.public-mini-match em {
    color: #087f8c;
    font-style: normal;
    font-weight: 700;
}

.consultation-picker {
    border-color: #cfe7e3;
}

.consultation-group-grid {
    margin-top: 1rem;
}

.consultation-detail .section-title {
    align-items: flex-start;
}

.consultation-tabs {
    background: #f3faf8;
    border: 1px solid #d4e9e3;
    border-radius: 100px;
    display: inline-flex;
    gap: .25rem;
    padding: .25rem;
}

.consultation-tabs button {
    background: transparent;
    border: 0;
    border-radius: 100px;
    color: #087f8c;
    font-weight: 700;
    padding: .45rem .9rem;
}

.consultation-tabs button.selected {
    background: #087f8c;
    color: #fff;
}

.public-fixture-list {
    display: grid;
    gap: .75rem;
}

.public-fixture-row {
    align-items: center;
    border: 1px solid #e1e8e5;
    border-radius: 14px;
    display: grid;
    gap: 1rem;
    grid-template-columns: 92px minmax(0, 1fr) minmax(120px, auto);
    padding: .9rem 1rem;
}

.fixture-date {
    align-items: center;
    background: #e4f4ee;
    border-radius: 12px;
    color: #08725f;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 74px;
    text-align: center;
}

.fixture-date strong {
    font-size: 1.2rem;
}

.fixture-main h3 {
    font-size: 1.08rem;
    margin: .2rem 0;
}

.fixture-main h3 > span:not(.team-badge-inline) {
    color: #8a9aa0;
    font-size: .8rem;
    font-weight: 500;
    margin: 0 .3rem;
    text-transform: uppercase;
}

.fixture-result {
    justify-self: end;
    text-align: right;
}

.consultation-table {
    min-width: 820px;
}

.news-card {
    background: #fff;
    border: 1px solid #e4ebe8;
    border-radius: 14px;
    overflow: hidden;
}

.news-images {
    display: flex;
    gap: .4rem;
    overflow-x: auto;
}

.news-images img {
    height: 210px;
    object-fit: cover;
    width: 100%;
}

.news-images img:not(:only-child) {
    flex: 0 0 70%;
}

.news-body {
    padding: 1.15rem;
}

.news-body time {
    color: #687f87;
    font-size: .85rem;
}

.news-body h3, .admin-news-card h3 {
    font-size: 1.15rem;
    margin: .35rem 0 .6rem;
}

.admin-news-card {
    border-top: 1px solid #e1e8e5;
    padding: 1rem 0;
}

.admin-news-images img {
    height: 120px;
    max-width: 180px;
}

.public-table {
    min-width: 920px;
}

.category-heading {
    border-bottom: 1px solid #e1e8e5;
    color: #087f8c;
    font-size: 1.15rem;
    margin: 1.25rem 0 .8rem;
    padding-bottom: .45rem;
}

.standing-block {
    margin-bottom: 1.5rem;
}

.standing-block h4 {
    font-size: 1rem;
    font-weight: 650;
    margin-bottom: .55rem;
}

.standings-table {
    font-size: .86rem;
    min-width: 760px;
}

.result-total {
    color: #087f8c;
    font-size: 1.55rem;
}

.set-editor {
    align-items: center;
    display: grid;
    gap: .55rem;
    grid-template-columns: 80px minmax(130px, 180px) minmax(130px, 180px);
}

.set-editor input {
    max-width: 110px;
}

.golden-point-editor {
    background: #f8fbfa;
    border: 1px solid #dbe7e3;
    border-radius: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: .65rem 1rem;
    padding: .85rem 1rem;
}

.golden-point-editor strong {
    color: #087f8c;
}

.golden-point-editor label {
    display: inline-flex;
    gap: .35rem;
}

.group-category-editor {
    align-items: end;
    display: flex;
    gap: .65rem;
    margin: 0 0 1rem;
}

.group-category-editor .form-select {
    max-width: 240px;
}

.group-category-editor .form-control {
    max-width: 260px;
}

.administrator-row {
    align-items: center;
    border-top: 1px solid #e1e8e5;
    display: grid;
    gap: .8rem;
    grid-template-columns: minmax(220px, 1fr) 110px minmax(180px, .8fr) auto auto;
    padding: .9rem 0;
}

.challenge-shell {
    background:
        radial-gradient(circle at 18% 14%, rgba(255, 226, 122, .24), transparent 22%),
        radial-gradient(circle at 82% 8%, rgba(120, 224, 255, .2), transparent 20%),
        linear-gradient(145deg, #06142e 0%, #082f4c 48%, #087f8c 100%);
    border-radius: 24px;
    color: #fff;
    margin: -1rem auto 0;
    max-width: 1080px;
    min-height: calc(100vh - 4rem);
    overflow: hidden;
    padding: clamp(1rem, 3vw, 2rem);
    position: relative;
}

.challenge-stars::before,
.challenge-stars::after {
    background-image:
        radial-gradient(circle, rgba(255,255,255,.85) 1px, transparent 1.5px),
        radial-gradient(circle, rgba(255,226,122,.75) 1px, transparent 1.5px);
    background-position: 0 0, 32px 28px;
    background-size: 76px 76px, 112px 112px;
    content: "";
    inset: 0;
    opacity: .45;
    pointer-events: none;
    position: absolute;
}

.challenge-stage {
    position: relative;
    z-index: 1;
}

.challenge-header {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.challenge-header h1 {
    color: #fff;
    font-size: clamp(2.2rem, 6vw, 4.2rem);
    margin-bottom: .3rem;
    text-shadow: 0 6px 18px rgba(0, 0, 0, .28);
}

.challenge-header p:not(.eyebrow) {
    color: #d7f8f8;
    margin: 0;
    max-width: 620px;
}

.challenge-header .eyebrow {
    color: #ffe27a;
}

.challenge-card {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, .94);
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 22px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, .24);
    color: #19333c;
    margin: 0 auto;
    max-width: 760px;
    min-height: 620px;
    overflow: hidden;
    padding: clamp(1rem, 3vw, 1.5rem);
}

.challenge-screen {
    display: none;
}

.challenge-screen.active {
    animation: challengeFade .2s ease-out;
    display: block;
}

@keyframes challengeFade {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.challenge-mascot-preview {
    align-items: center;
    background: radial-gradient(circle at 35% 25%, #fff, #83e6ff 44%, #087f8c 100%);
    border: 6px solid #ffe27a;
    border-radius: 50%;
    box-shadow: 0 16px 38px rgba(8, 127, 140, .28);
    color: #fff;
    display: flex;
    font-size: 1.4rem;
    font-weight: 900;
    height: 118px;
    justify-content: center;
    margin: .4rem auto 1.2rem;
    position: relative;
    text-shadow: 0 2px 6px rgba(0,0,0,.25);
    width: 118px;
}

.challenge-mascot-preview::before,
.challenge-mascot-preview::after {
    background: #ffe27a;
    border-radius: 99px;
    content: "";
    height: 12px;
    position: absolute;
    top: 62px;
    width: 54px;
}

.challenge-mascot-preview::before {
    left: -42px;
    transform: rotate(21deg);
}

.challenge-mascot-preview::after {
    right: -42px;
    transform: rotate(-21deg);
}

.challenge-screen h2 {
    color: #092d42;
    font-size: clamp(1.45rem, 4vw, 2.2rem);
    text-align: center;
}

.challenge-screen > p {
    color: #58717a;
    margin-left: auto;
    margin-right: auto;
    max-width: 560px;
    text-align: center;
}

.challenge-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .7rem;
    justify-content: center;
    margin: 1rem 0;
}

.challenge-records,
.challenge-result-grid {
    display: grid;
    gap: .75rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 1rem auto 0;
    max-width: 520px;
}

.challenge-records span,
.challenge-result-grid span {
    background: #f3faf8;
    border: 1px solid #d4e9e3;
    border-radius: 14px;
    color: #58717a;
    display: grid;
    padding: .85rem;
    text-align: center;
}

.challenge-records strong,
.challenge-result-grid strong {
    color: #087f8c;
    font-size: 1.6rem;
}

.challenge-form {
    display: grid;
    gap: .85rem;
    margin: 1rem auto;
    max-width: 540px;
}

.challenge-form label {
    color: #19333c;
    display: grid;
    font-weight: 700;
    gap: .35rem;
}

.challenge-form label span {
    color: #687f87;
    font-size: .85rem;
    font-weight: 500;
}

.challenge-error {
    color: #b83c43;
    font-weight: 700;
    min-height: 1.2rem;
}

.challenge-hud {
    display: grid;
    gap: .45rem;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin-bottom: .75rem;
}

.challenge-hud span {
    background: #092d42;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 12px;
    color: #b9e8ee;
    display: grid;
    font-size: .72rem;
    font-weight: 700;
    padding: .45rem .35rem;
    text-align: center;
    text-transform: uppercase;
}

.challenge-hud strong {
    color: #ffe27a;
    font-size: 1.15rem;
}

.challenge-canvas-wrap {
    background: #06142e;
    border-radius: 20px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.18), 0 14px 40px rgba(0,0,0,.18);
    display: flex;
    justify-content: center;
    overflow: hidden;
    touch-action: none;
}

#volleyChallengeCanvas {
    display: block;
    max-width: 100%;
    touch-action: none;
}

.challenge-tip {
    font-size: .86rem;
    margin-bottom: 0;
    margin-top: .65rem;
}

.challenge-motivation {
    color: #087f8c !important;
    font-size: 1.05rem;
    font-weight: 700;
}

.challenge-badges {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    justify-content: center;
    min-height: 2.4rem;
}

.challenge-badges span {
    background: #fff7dd;
    border: 1px solid #ffe27a;
    border-radius: 999px;
    color: #765108;
    font-size: .82rem;
    font-weight: 800;
    padding: .38rem .7rem;
}

.challenge-tabs {
    background: #f3faf8;
    border: 1px solid #d4e9e3;
    border-radius: 999px;
    display: flex;
    flex-wrap: wrap;
    gap: .25rem;
    justify-content: center;
    margin: 1rem auto;
    max-width: 560px;
    padding: .25rem;
}

.challenge-tabs button {
    background: transparent;
    border: 0;
    border-radius: 999px;
    color: #087f8c;
    font-weight: 800;
    padding: .42rem .75rem;
}

.challenge-tabs button.selected {
    background: #087f8c;
    color: #fff;
}

.challenge-leaderboard {
    display: grid;
    gap: .55rem;
    list-style-position: inside;
    margin: 0 auto 1rem;
    max-width: 620px;
    padding: 0;
}

.challenge-leaderboard li {
    align-items: center;
    background: #f7faf8;
    border: 1px solid #e1e8e5;
    border-radius: 12px;
    display: grid;
    gap: .3rem .75rem;
    grid-template-columns: 1fr auto;
    padding: .75rem .85rem;
}

.challenge-leaderboard span {
    color: #687f87;
    font-size: .86rem;
}

.challenge-leaderboard b {
    color: #087f8c;
    font-size: 1.25rem;
    grid-row: span 2;
}

.challenge-help-grid {
    display: grid;
    gap: .7rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 1rem 0;
}

.challenge-help-grid div {
    background: #f7faf8;
    border: 1px solid #e1e8e5;
    border-radius: 12px;
    display: grid;
    gap: .25rem;
    padding: .85rem;
}

.challenge-help-grid strong {
    color: #087f8c;
}

.challenge-help-grid span {
    color: #58717a;
    font-size: .92rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    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: "Si e verificato un errore."
    }

@media (max-width: 900px) {
    .hero, .generation-box, .calendar-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .stat-grid, .steps, .two-columns, .teams-workbench, .responsible-workbench, .team-detail-grid, .calendar-layout, .constraint-editor, .players-filter-bar {
        grid-template-columns: 1fr;
    }

    .shirt-size-dashboard {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .team-sidebar {
        position: static;
    }

    .public-event-grid, .news-grid, .public-match-grid, .public-group-content {
        grid-template-columns: 1fr;
    }

    .public-day-header, .public-date-jump {
        align-items: stretch;
        flex-direction: column;
    }

    .public-match-card, .public-mini-match, .public-fixture-row {
        grid-template-columns: 1fr;
    }

    .consultation-detail .section-title {
        align-items: stretch;
        flex-direction: column;
    }

    .fixture-result {
        justify-self: start;
        text-align: left;
    }

    .public-event-grid, .public-group-tile-grid {
        grid-template-columns: 1fr;
    }

    .public-match-card {
        gap: .75rem;
        padding: .85rem;
    }

    .match-time {
        align-items: center;
        flex-direction: row;
        gap: .65rem;
        justify-content: flex-start;
        min-height: auto;
        padding: .65rem .75rem;
    }

    .match-time strong {
        font-size: 1.25rem;
    }

    .match-body h3, .fixture-main h3 {
        display: grid;
        gap: .25rem;
    }

    .match-body h3 > span:not(.team-badge-inline),
    .fixture-main h3 > span:not(.team-badge-inline) {
        margin: 0;
    }

    .team-badge-inline {
        align-items: flex-start;
        max-width: 100%;
    }

    .team-badge-inline span:last-child {
        overflow-wrap: anywhere;
    }

    .public-match-actions {
        justify-content: flex-start;
    }

    .set-editor {
        grid-template-columns: 72px minmax(0, 1fr) minmax(0, 1fr);
    }

    .set-editor input {
        max-width: none;
    }

    .golden-point-editor {
        flex-direction: column;
    }

    .calendar-create, .calendar-card, .calendar-card-actions, .import-options {
        align-items: stretch;
        flex-direction: column;
    }

    .group-category-editor {
        align-items: stretch;
        flex-direction: column;
    }

    .constraint-row, .block-row, .administrator-row {
        grid-template-columns: 1fr;
    }

    .board-title, .board-filters {
        align-items: stretch;
        flex-direction: column;
    }

    .calendar-actions {
        justify-content: flex-start;
    }

    .challenge-header {
        align-items: stretch;
        flex-direction: column;
    }

    .challenge-card {
        min-height: auto;
    }

    .challenge-hud {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .challenge-help-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .content {
        padding-left: .55rem;
        padding-right: .55rem;
        padding-top: .75rem;
    }

    .public-hero {
        margin-bottom: .75rem;
        padding: 1rem;
    }

    .public-hero h1 {
        font-size: 1.45rem;
        margin-bottom: .35rem;
    }

    .public-hero .lead {
        font-size: .92rem;
        line-height: 1.35;
    }

    .panel {
        border-radius: 12px;
        margin-bottom: .75rem;
        padding: .85rem;
    }

    .public-selector .section-title p,
    .public-event-card span,
    .public-selector .chips {
        display: none;
    }

    .public-event-card {
        gap: .25rem;
        padding: .75rem .85rem;
    }

    .public-event-card.detailed b {
        margin-top: .1rem;
        padding: .3rem .6rem;
    }

    .public-day-header {
        display: grid;
        gap: .55rem;
        grid-template-columns: 1fr 1fr;
    }

    .public-day-header > div {
        grid-column: 1 / -1;
        grid-row: 1;
    }

    .public-day-header h2 {
        font-size: 1.28rem;
    }

    .public-day-header .muted {
        margin-bottom: 0;
    }

    .public-day-header .btn {
        padding: .45rem .5rem;
    }

    .public-date-jump {
        display: grid;
        gap: .5rem;
        grid-template-columns: 72px minmax(0, 1fr);
        margin-top: .65rem;
    }

    .public-date-jump .form-select {
        max-width: none;
    }

    .public-match-grid {
        gap: .55rem;
        margin-top: .75rem;
    }

    .public-match-card {
        align-items: stretch;
        display: grid;
        gap: .55rem;
        grid-template-columns: 76px minmax(0, 1fr);
        padding: .65rem;
    }

    .match-time {
        align-items: center;
        flex-direction: column;
        gap: .05rem;
        justify-content: center;
        padding: .45rem .35rem;
    }

    .match-time strong {
        font-size: 1.2rem;
    }

    .match-time span {
        font-size: .74rem;
        line-height: 1.1;
    }

    .match-meta-line {
        font-size: .78rem;
        gap: .25rem .4rem;
        margin-bottom: .2rem;
    }

    .public-chip.mini {
        font-size: .68rem;
        margin-bottom: 0;
        padding: .12rem .42rem;
    }

    .mobile-match-teams {
        align-items: stretch;
        display: grid;
        font-size: .95rem;
        gap: .05rem;
        grid-template-columns: 1fr;
        line-height: 1.12;
    }

    .mobile-match-teams > span:not(.team-badge-inline) {
        font-size: .68rem;
        line-height: 1;
        margin-left: 1.7rem;
    }

    .team-badge-inline {
        gap: .32rem;
        margin: .05rem 0;
    }

    .team-badge-inline img,
    .team-logo-fallback {
        height: 22px;
        width: 22px;
    }

    .team-logo-fallback {
        font-size: .62rem;
    }

    .match-bottom-line {
        align-items: flex-start;
        display: grid;
        gap: .15rem;
        margin-top: .25rem;
    }

    .public-referee {
        font-size: .78rem;
        margin: 0;
    }

    .result-total {
        font-size: .92rem;
    }

    .public-match-actions {
        gap: .3rem;
        margin-top: .35rem;
    }

    .public-match-actions a {
        font-size: .72rem;
        padding: .2rem .45rem;
    }

    .challenge-shell {
        border-radius: 0;
        margin: -.75rem -.55rem 0;
        min-height: calc(100vh - .75rem);
        padding: .75rem;
    }

    .challenge-header {
        gap: .65rem;
        margin-bottom: .7rem;
    }

    .challenge-header h1 {
        font-size: 2.15rem;
    }

    .challenge-header p:not(.eyebrow) {
        font-size: .92rem;
        line-height: 1.35;
    }

    .challenge-card {
        border-radius: 18px;
        padding: .8rem;
    }

    .challenge-actions {
        align-items: stretch;
        display: grid;
        grid-template-columns: 1fr;
    }

    .challenge-records,
    .challenge-result-grid {
        grid-template-columns: 1fr;
    }

    .challenge-hud {
        gap: .3rem;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .challenge-hud span {
        border-radius: 10px;
        font-size: .62rem;
        padding: .35rem .25rem;
    }

    .challenge-hud strong {
        font-size: .98rem;
    }

    .challenge-tabs {
        border-radius: 16px;
    }

    .challenge-tabs button {
        flex: 1 1 42%;
        padding: .38rem .5rem;
    }

    .challenge-leaderboard li {
        grid-template-columns: 1fr;
    }

    .challenge-leaderboard b {
        grid-row: auto;
    }
}
