/*
 * Springer Skak – administrations- og formularlayout.
 * Bruges af sider, der renderes gennem includes/layout.php samt login/forside.
 */

/********************************************************************************
*                                  GLOBAL RESET                                  *
********************************************************************************/

* {
    box-sizing: border-box;
}

:root {
    --bg-dark: #0c0c0c;
    --bg-green: #061008;
    --bg-green-soft: #0c1b0f;
    --accent: #84cc16;
    --accent-hover: #a3e635;
    --accent-soft: rgba(132, 204, 22, 0.16);
    --text-light: #ffffff;
    --text-muted: #d1d5db;
    --text-dark: #111827;
    --danger: #991b1b;
    --danger-bg: #7f1d1d;
    --card-bg: #ffffff;
    --page-bg: #f3f4f6;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text-light);
}


/********************************************************************************
*                               FORSIDE OG LOGIN                                *
********************************************************************************/

.front-body,
.login-body {
    min-height: 100vh;
    background:
        radial-gradient(circle at center, rgba(71, 106, 50, 0.22), transparent 28%),
        linear-gradient(135deg, var(--bg-green) 0%, var(--bg-green-soft) 45%, #030805 100%);
    display: flex;
    justify-content: center;
    align-items: center;
}

.front-card,
.login-card {
    width: 100%;
    max-width: 380px;
    background: rgba(12, 12, 12, 0.96);
    border: 2px solid var(--accent);
    border-radius: 18px;
    padding: 28px 26px;
    text-align: center;
    box-shadow: 0 0 45px rgba(132, 204, 22, 0.18);
}

.logo-box {
    display: flex;
    justify-content: center;
    margin-bottom: 12px;
}

.main-logo {
    width: 350px;
    max-width: 100%;
    display: block;
    margin: 0 auto 12px;
}

.login-logo {
    width: 350px;
    margin-bottom: 5px;
    filter:
        drop-shadow(0 0 8px rgba(132, 204, 22, 0.35))
        drop-shadow(0 0 16px rgba(132, 204, 22, 0.20));
}

.front-card h1,
.login-card h1 {
    margin: 0 0 12px;
    color: var(--text-light);
    font-size: 30px;
    text-shadow: 0 0 8px rgba(96, 165, 250, 0.8);
}

.front-card h2 {
    margin: 0 0 10px;
    font-size: 21px;
    color: var(--text-light);
}

.front-subtitle,
.front-text,
.lead {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.45;
}

.front-divider {
    height: 1px;
    background: rgba(132, 204, 22, 0.35);
    margin: 26px 0;
}

.front-link,
.back-link {
    display: inline-block;
    margin-top: 12px;
    color: var(--accent-hover);
    text-decoration: none;
    font-weight: bold;
}

.front-link:hover,
.back-link:hover {
    text-decoration: underline;
}

.login-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
}

.login-links a {
    color: var(--accent-hover);
    text-decoration: none;
    font-weight: 800;
}

.login-links a:hover {
    text-decoration: underline;
}

.login-card select {
    width: 100%;
    padding: 13px;
    margin-top: 6px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    background: #eaf2ff;
    color: var(--text-dark);
}


/********************************************************************************
*                                  KNAPPER                                      *
********************************************************************************/






/********************************************************************************
*                                  FORMULARER                                   *
********************************************************************************/

label {
    display: block;
    text-align: left;
    margin-top: 16px;
    color: #4b5563;
    font-size: 13px;
    font-weight: bold;
}

/* Labels på mørke kort skal fortsat være lyse */
.login-card label,
.front-card label,
.modal-card label {
    color: #e5e7eb;
}

input,
textarea,
select {
    width: 100%;
    padding: 13px;
    margin-top: 6px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    background: #eaf2ff;
    color: var(--text-dark);
}

.panel input[type="text"],
.panel textarea,
.panel select {
    width: 100%;
    padding: 14px;
    background: #eaf2ff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    color: #111827;
    font-size: 15px;
    box-sizing: border-box;
}

textarea {
    resize: vertical;
}

.alert {
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 14px;
}

.error {
    background: #fee2e2;
    color: var(--danger);
}

.success {
    background: #dcfce7;
    color: #166534;
}

.alert-success {
    margin-bottom: 22px;
    padding: 16px 20px;
    border-radius: 14px;
    background: rgba(126, 224, 0, 0.16);
    border: 1px solid rgba(126, 224, 0, 0.45);
    color: #2f7d00;
    font-weight: 800;
    box-shadow: 0 8px 22px rgba(126, 224, 0, 0.16);
}

/********************************************************************************
*                              APP LAYOUT / SIDEBAR                             *
********************************************************************************/

.app-body {
    min-height: 100vh;
    display: flex;
    background: var(--page-bg);
    color: var(--text-dark);
}

.sidebar {
    width: 260px;
    min-height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    background: rgba(12, 12, 12, 0.96);
    border-right: 2px solid var(--accent);
    box-shadow:
        0 0 20px rgba(132, 204, 22, 0.18),
        0 0 50px rgba(132, 204, 22, 0.12);
    padding: 24px 18px;
    color: var(--text-light);
}

.sidebar-logo {
    margin-bottom: 32px;
    text-align: center;
}

.sidebar-logo-img {
    width: 170px;
    max-width: 100%;
    display: block;
    margin: 0 auto 12px;
    filter: drop-shadow(0 0 10px rgba(132, 204, 22, 0.45));
}

.sidebar-logo h2 {
    margin: 0;
    font-size: 26px;
    color: var(--text-light);
}

.sidebar-logo p {
    margin: 6px 0 0;
    color: var(--text-muted);
    font-size: 14px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-nav a {
    color: var(--text-light);
    text-decoration: none;
    padding: 13px 14px;
    border-radius: 12px;
    font-weight: bold;
    border: 1px solid transparent;
    transition: all 0.18s ease;
}

.sidebar-nav a:hover {
    background: rgba(132, 204, 22, 0.10);
    color: #d9f99d;
}

.sidebar-nav a.active {
    background: var(--accent-soft);
    border: 1px solid var(--accent);
    color: #d9f99d;
    box-shadow:
        0 0 10px rgba(132, 204, 22, 0.30),
        inset 0 0 12px rgba(132, 204, 22, 0.08);
}

.sidebar-nav a.active:hover {
    background: rgba(132, 204, 22, 0.20);
}

.sidebar-nav .logout-link {
    margin-top: 30px;
    background: var(--danger-bg);
    border-color: transparent;
}

.sidebar-nav .logout-link:hover {
    background: #991b1b;
    color: var(--text-light);
}

.sidebar-logo-link {
    display: block;
    text-decoration: none;
}

.sidebar-logo-link:hover .sidebar-logo-img {
    transform: scale(1.03);
    transition: 0.2s ease;
}

/********************************************************************************
*                                APP INDHOLD                                    *
********************************************************************************/

.app-main {
    margin-left: 260px;
    width: calc(100% - 260px);
    padding: 32px;
}

.app-header {
    margin-bottom: 28px;
}

.app-header h1 {
    margin: 0;
    font-size: 34px;
}

.app-header p {
    margin: 8px 0 0;
    color: #6b7280;
}

.panel,
.card {
    background: var(--card-bg);
    border: 2px solid transparent;
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
}

.card {
    margin-bottom: 26px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-top: 24px;
}

.card-link {
    text-decoration: none;
    color: inherit;
}

.card-link .card {
    height: 100%;
}

.card-link .card:hover,
.card:hover {
    transform: none !important;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08) !important;
}


/********************************************************************************
*                                  RESPONSIV                                    *
********************************************************************************/

@media (max-width: 900px) {
    .front-card,
    .login-card {
        max-width: 92%;
    }

    .app-body {
        display: block;
    }

    .sidebar {
        position: relative;
        width: 100%;
        min-height: auto;
    }

    .app-main {
        margin-left: 0;
        width: 100%;
        padding: 20px;
    }

    .grid {
        grid-template-columns: 1fr;
    }
}

/********************************************************************************
*                                  STATS / INFO                                  *
********************************************************************************/

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-bottom: 24px;
}

.stat-card {
    background: #ffffff;
    border-radius: 18px;
    padding: 22px 24px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.stat-card:hover {
    border-color: #84cc16;
    box-shadow:
        0 0 15px rgba(132, 204, 22, 0.20),
        0 0 30px rgba(132, 204, 22, 0.12);
}

.stat-card span {
    display: block;
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 8px;
}

.stat-card strong {
    display: block;
    font-size: 34px;
    color: #111827;
}

/********************************************************************************
*                                  CONTENT GRID                                  *
********************************************************************************/

.content-grid {
    display: grid;
    gap: 22px;
}

.two-columns {
    grid-template-columns: 420px 1fr;
}

/********************************************************************************
*                                  TABLES                                        *
********************************************************************************/

.table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 18px;
}

.data-table th {
    text-align: left;
    font-size: 13px;
    color: #6b7280;
    border-bottom: 2px solid #e5e7eb;
    padding: 12px 10px;
}

.data-table td {
    padding: 14px 10px;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: top;
}

.data-table td small {
    display: block;
    margin-top: 5px;
    color: #6b7280;
    font-size: 12px;
}

.data-table tr:hover {
    background: #f9fafb;
}

/********************************************************************************
*                                  BUTTONS                                       *
********************************************************************************/













.data-table td {
    vertical-align: middle;
}

.action-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
}

.action-buttons form {
    margin: 0;
}

.custom-group-button {
    border: 1px solid #d8e2f0;
    cursor: pointer;
}

.custom-group-button.is-selected {
    background: #84cc16;
    color: #111827;
    border-color: #84cc16;
    box-shadow: 0 0 14px rgba(132, 204, 22, 0.35);
}

/********************************************************************************
*                                  FORMS                                         *
********************************************************************************/

.form-grid {
    margin-top: 10px;
}

.search-input {
    width: 100%;
    max-width: 420px;
    margin-top: 10px;
    margin-bottom: 4px;
}

.inline-form {
    display: inline;
}

/********************************************************************************
*                                  MODAL                                         *
********************************************************************************/

.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(3, 8, 5, 0.78);
    z-index: 999;
    align-items: center;
    justify-content: center;
}

.modal-overlay.show {
    display: flex;
}

.modal-card {
    width: 100%;
    max-width: 460px;
    background: rgba(12, 12, 12, 0.97);
    border: 2px solid #84cc16;
    border-radius: 18px;
    padding: 28px;
    color: #ffffff;
    box-shadow:
        0 0 25px rgba(132, 204, 22, 0.25),
        0 0 60px rgba(132, 204, 22, 0.16);
}

.modal-card h2 {
    margin-top: 0;
}

.modal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 10px;
}

/********************************************************************************
*                                  RESPONSIVE                                    *
********************************************************************************/

@media (max-width: 1100px) {
    .two-columns {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/********************************************************************************
*                                  STATUS BADGES                                 *
********************************************************************************/

.status-badge {
    display: inline-block;
    padding: 7px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

.status-draft {
    background: #e5e7eb;
    color: #374151;
}

.status-active {
    background: #dcfce7;
    color: #166534;
}

.status-finished {
    background: #fee2e2;
    color: #991b1b;
}

/********************************************************************************
*                                  HELP TEXT                                     *
********************************************************************************/

.help-text {
    margin-top: 8px;
    font-size: 13px;
    color: #6b7280;
    line-height: 1.4;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 18px;
    color: #111827;
}

.checkbox-label input {
    width: auto;
    margin: 0;
}

/********************************************************************************
*                              CHECKBOX LISTS                                    *
********************************************************************************/

.checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 520px;
    overflow-y: auto;
    padding-right: 6px;
}

.player-check {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px;
    color: #111827;
    cursor: pointer;
    transition: all 0.15s ease;
}

.player-check:hover {
    border-color: #84cc16;
    box-shadow: 0 0 12px rgba(132, 204, 22, 0.16);
}

.player-check input {
    width: auto;
    margin: 0;
}

.player-check span {
    display: flex;
    flex-direction: column;
}

.player-check small {
    color: #6b7280;
    margin-top: 3px;
}

.group-title {
    margin: 26px 0 8px;
    color: #111827;
}

/********************************************************************************
*                              SELECTABLE TABLES                                 *
********************************************************************************/

.selectable-table input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
}

.selectable-table th:first-child,
.selectable-table td:first-child {
    text-align: center;
}

.selectable-table tbody tr {
    cursor: pointer;
}

.selectable-table tbody tr:hover {
    background: #f3fce8;
}

/********************************************************************************
*                              SPACING FIXES                                     *
********************************************************************************/

.panel {
    margin-bottom: 22px;
}

.stats-grid {
    gap: 22px;
    margin-top: 22px;
    margin-bottom: 28px;
}

.content-grid {
    margin-top: 28px;
}

.two-columns {
    gap: 28px;
}

/********************************************************************************
*                           TOURNAMENT PLAYER TABLES                             *
********************************************************************************/

.tournament-player-table {
    table-layout: fixed;
}

.tournament-player-table th:nth-child(1),
.tournament-player-table td:nth-child(1) {
    width: 55%;
}

.tournament-player-table th:nth-child(2),
.tournament-player-table td:nth-child(2) {
    width: 20%;
}

.tournament-player-table th:nth-child(3),
.tournament-player-table td:nth-child(3) {
    width: 25%;
}

/********************************************************************************
*                                  RESULTS                                       *
********************************************************************************/

.inline-select-form select {
    width: 100%;
    max-width: 420px;
    padding: 13px;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    background: #eaf2ff;
    color: #111827;
    font-size: 16px;
}

.round-actions {
    margin-top: 18px;
}

.data-table select {
    width: 100%;
    min-width: 150px;
    padding: 9px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    background: #eaf2ff;
    color: #111827;
}

/********************************************************************************
*                              STANDINGS TABLES                                  *
********************************************************************************/

.standings-table {
    table-layout: fixed;
    width: 100%;
}

.standings-table th,
.standings-table td {
    white-space: nowrap;
}

.standings-table th:nth-child(1),
.standings-table td:nth-child(1) {
    width: 8%;
}

.standings-table th:nth-child(2),
.standings-table td:nth-child(2) {
    width: 36%;
}

.standings-table th:nth-child(3),
.standings-table td:nth-child(3) {
    width: 16%;
}

.standings-table th:nth-child(4),
.standings-table td:nth-child(4) {
    width: 13%;
}

.standings-table th:nth-child(5),
.standings-table td:nth-child(5) {
    width: 13%;
}

.standings-table th:nth-child(6),
.standings-table td:nth-child(6) {
    width: 14%;
}

/********************************************************************************
*                              CLASS SELECT ROW                                  *
********************************************************************************/

.class-select-row {
    display: flex;
    width: 100%;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.class-select-row > div {
    flex: 1;
}

.class-select-row label {
    display: block;
    margin-bottom: 6px;
}

.class-select-row select {
    width: 100%;
    padding: 13px;
    margin-top: 6px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    background: #eaf2ff;
    color: #111827;
    font-size: 15px;
}

/********************************************************************************
*                              MODAL BUTTON FIX                                  *
********************************************************************************/





/********************************************************************************
*                              ROUND BUTTONS                                    *
********************************************************************************/

.round-navigation-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.round-nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 14px;
    border-radius: 999px;
    background: #eef3fb;
    color: #0f172a;
    text-decoration: none;
    font-weight: 700;
    border: 1px solid #d8e2f0;
    transition: 0.2s ease;
}

.round-nav-link:hover {
    background: #dfeafb;
    transform: translateY(-1px);
}

.round-nav-link.is-active {
    background: #991b1b;
    color: #ffffff;
    border-color: #991b1b;
}

.round-nav-link.standings-link {
    background: #f3f4f6;
}

/********************************************************************************
*                              RESULTS TABLE                                    *
********************************************************************************/

.results-table th:nth-child(1),
.results-table td:nth-child(1) {
    width: 8%;
}

.results-table th:nth-child(2),
.results-table td:nth-child(2) {
    width: 28%;
}

.results-table th:nth-child(3),
.results-table td:nth-child(3) {
    width: 28%;
}

.results-table th:nth-child(4),
.results-table td:nth-child(4) {
    width: 26%;
}

.results-table th:nth-child(5),
.results-table td:nth-child(5) {
    width: 10%;
}

.results-table .save-btn {
    width: 100%;
}

/********************************************************************************
*                                   STREAM                                      *
********************************************************************************/

.stream-select-wrapper {
    box-shadow: none;
}

.stream-select-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
}

.stream-select-card {
    width: 260px;
    height: 170px;
    flex: 0 0 260px;

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    padding: 22px;
    border-radius: 16px;
    text-decoration: none;

    background: #ffffff;
    color: #0b1220;

    border: 1px solid rgba(145, 255, 0, 0.55);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);

    transition: 0.2s ease;
}

.stream-view-select {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    background: #eaf2ff;
    color: #111827;
    font-weight: 700;
}



.stream-select-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 28px rgba(145, 255, 0, 0.45);
}

.stream-select-card h3 {
    margin: 0;
    color: #0b1220;
    font-size: 20px;
    line-height: 1.25;
}

.stream-select-card span {
    color: #4bb800;
    font-weight: 800;
}

.stream-select-wrapper {
    box-shadow: none !important;
    border: none !important;
}

/********************************************************************************
*                           PLAYMASTER SECTION                                  *
********************************************************************************/

.playmaster-form {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    align-items: end;
}

.playmaster-form div {
    display: flex;
    flex-direction: column;
}

.playmaster-form label {
    font-weight: 700;
    margin-bottom: 6px;
    color: #1f2937;
}

.playmaster-form input,
.playmaster-form select {
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    font-size: 15px;
}











.data-table td {
    vertical-align: middle;
}

.data-table .action-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}

.data-table .action-buttons form {
    margin: 0;
    padding: 0;
}



/********************************************************************************
*                           PLAYERS SECTION                                     *
********************************************************************************/

.player-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.player-list-photo {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #84cc16;
    background: #e5e7eb;
}

/********************************************************************************
*                           CHESSMASTER SECTION                                 *
********************************************************************************/
.master-sidebar {
    border-right: 3px solid #6d28d9;
}

.master-nav a.active {
    background: #6d28d9;
    color: #ffffff;
}

.sidebar-divider {
    height: 1px;
    margin: 14px 18px;
    background: rgba(255, 255, 255, 0.18);
}

/********************************************************************************
*                           FORM LAYOUT SECTION                                 *
********************************************************************************/
.form-container {
    width: 100%;
    max-width: 980px;
    margin: 0 auto 0 0;
}

.form-page {
    width: 100%;
}

.form-section {
    padding: 0 0 24px 0;
    margin-bottom: 24px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.12);
}

.form-section:last-of-type {
    border-bottom: 0;
    margin-bottom: 0;
}

.form-section h2 {
    margin: 0 0 18px 0;
}

.form-page label {
    display: block;
    margin: 14px 0 6px;
    font-weight: 700;
    color: #4b5563;
}

.form-page input,
.form-page select,
.form-page textarea {
    width: 100%;
    box-sizing: border-box;
}

.form-help {
    margin: 6px 0 0;
    font-size: 0.9rem;
    color: #6b7280;
}

.form-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 24px;
}







.alert ul {
    margin: 8px 0 0 18px;
}

@media (max-width: 760px) {
    .form-container {
        max-width: none;
    }

    .form-actions {
        flex-direction: column;
        align-items: stretch;
    }

    
}

/********************************************************************************
*                           MASTER SCHOOL CARD SECTION                          *
********************************************************************************/
.panel-actions {
    margin-top: 18px;
}





.school-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 22px;
}

.school-card {
    background: #ffffff;
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.school-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.school-card-header h2 {
    margin: 0;
}

.school-card-subtitle {
    margin: 6px 0 0;
    opacity: 0.7;
    font-size: 0.92rem;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    padding: 7px 12px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 0.85rem;
}

.status-badge.active {
    background: rgba(104, 213, 0, 0.16);
    color: #265f00;
}

.status-badge.inactive {
    background: rgba(153, 27, 27, 0.12);
    color: #991b1b;
}

.school-card-info {
    display: grid;
    gap: 10px;
}

.info-row {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 14px;
    padding: 11px 0;
    border-bottom: 1px solid rgba(15, 23, 42, 0.10);
}

.info-row span {
    opacity: 0.72;
    font-weight: 700;
}

.info-row strong {
    font-weight: 800;
    overflow-wrap: anywhere;
}

.school-card-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 22px;
}



@media (max-width: 760px) {
    .school-card-grid {
        grid-template-columns: 1fr;
    }

    .school-card {
        padding: 18px;
    }

    .school-card-header {
        flex-direction: column;
    }

    .info-row {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    
}

.checkbox-row {
    display: inline-flex !important;
    align-items: center;
    gap: 10px;
    margin-top: 18px !important;
    font-weight: 800;
    color: #4b5563;
    cursor: pointer;
}

.checkbox-row input {
    width: auto !important;
    margin: 0 !important;
    transform: scale(1.2);
}

.checkbox-row span {
    color: #4b5563;
}


/********************************************************************************
*                           READABILITY FIXES                                    *
********************************************************************************/

/* Ensartet og mere læsbar farve på små tekster over inputfelter */
.panel label,
.form-section label,
.form-grid label,
.class-select-row label,
.playmaster-form label {
    color: #4b5563;
}

/* Hjælpetekster skal være diskrete, men stadig tydelige */
.help-text,
.form-help,
.data-table td small,
.player-check small {
    color: #6b7280;
}

/********************************************************************************
*                           USERS ADMIN SECTION                                  *
********************************************************************************/

.users-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

.users-topbar h2 {
    margin: 0 0 6px 0;
    font-size: 28px;
    color: #111827;
}

.users-topbar p {
    margin: 0;
    color: #6b7280;
}



.users-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(160px, 1fr));
    gap: 18px;
    margin-bottom: 22px;
}

.users-stat-card {
    background: #ffffff;
    border-radius: 18px;
    padding: 20px 22px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.users-stat-card strong {
    display: block;
    font-size: 30px;
    color: #111827;
    margin-bottom: 6px;
}

.users-stat-card span {
    color: #6b7280;
    font-weight: 700;
}

.filter-container.users-filter-container {
    width: 100%;
    max-width: 760px;
    margin: 0 0 24px 0;
}

.users-filter-panel {
    margin-bottom: 0;
}

.users-filter-panel .form-section {
    padding-bottom: 20px;
    margin-bottom: 18px;
}

.users-filter-panel .form-actions {
    justify-content: flex-start;
    margin-top: 0;
}

.users-school-list {
    display: grid;
    gap: 22px;
}

.users-school-section {
    background: #ffffff;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    margin-bottom: 24px;
}

.users-school-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    padding-bottom: 18px;
    margin-bottom: 18px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.10);
}

.users-school-header h2 {
    margin: 0 0 6px 0;
    color: #111827;
}

.users-school-header p {
    margin: 0;
    color: #6b7280;
    font-weight: 700;
}

.users-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 18px;
}

.user-card {
    border: 1px solid rgba(15, 23, 42, 0.10);
    border-radius: 18px;
    padding: 18px;
    background: #f9fafb;
}

.user-card-header {
    display: grid;
    grid-template-columns: 54px 1fr;
    gap: 14px;
    align-items: center;
    margin-bottom: 16px;
}

.user-avatar {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(132, 204, 22, 0.22);
    border: 2px solid #84cc16;
    color: #1f3b00;
    font-weight: 900;
    font-size: 18px;
}

.user-card h3 {
    margin: 0 0 4px 0;
    color: #111827;
    font-size: 18px;
}

.user-card-header p {
    margin: 0;
    color: #6b7280;
    font-weight: 800;
}

.user-card-meta {
    display: grid;
    gap: 10px;
}

.user-info-row {
    display: grid;
    grid-template-columns: 105px 1fr;
    gap: 12px;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.user-info-row span {
    color: #6b7280;
    font-weight: 800;
    font-size: 13px;
}

.user-info-row strong {
    color: #111827;
    font-weight: 800;
    overflow-wrap: anywhere;
}

@media (max-width: 900px) {
    .users-topbar {
        flex-direction: column;
        align-items: stretch;
    }

    

    .users-stats-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 620px) {
    .users-stats-grid,
    .users-card-grid {
        grid-template-columns: 1fr;
    }

    .user-info-row {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}

/********************************************************************************
*                    TOURNAMENT PLAYERS TABLE FIX                                *
********************************************************************************/

.tournament-player-table {
    width: 100%;
    table-layout: fixed;
}

.tournament-player-table th:nth-child(1),
.tournament-player-table td:nth-child(1) {
    width: 42%;
}

.tournament-player-table th:nth-child(2),
.tournament-player-table td:nth-child(2) {
    width: 12%;
}

.tournament-player-table th:nth-child(3),
.tournament-player-table td:nth-child(3) {
    width: 26%;
}

.tournament-player-table th:nth-child(4),
.tournament-player-table td:nth-child(4) {
    width: 20%;
}

.tournament-player-table td select {
    width: 240px;
    max-width: 100%;
}

.tournament-player-table select {
    width: 100%;
    min-width: 0;
}



/********************************************************************************
*                    CHESSMASTER DEVELOPMENT PLAN                               *
********************************************************************************/

.dev-create-panel,
.dev-overview-panel {
    color: #111827;
}

.dev-section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 22px;
}

.dev-section-header h2 {
    margin: 0 0 7px 0;
    color: #111827;
}

.dev-section-header p {
    margin: 0;
    color: #6b7280;
    font-weight: 600;
    line-height: 1.45;
}



.dev-form-grid,
.dev-filter-grid {
    display: grid;
    grid-template-columns: 1.1fr 1.4fr 0.7fr 0.7fr;
    gap: 16px;
    align-items: end;
}

.dev-form textarea {
    min-height: 130px;
}

.dev-form-actions {
    justify-content: flex-start;
}



.dev-mini-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.dev-mini-stats span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f9fafb;
    border: 1px solid rgba(15, 23, 42, 0.10);
    border-radius: 999px;
    padding: 9px 13px;
    color: #4b5563;
    font-weight: 800;
}

.dev-mini-stats strong {
    color: #111827;
}

.dev-filter-form {
    margin-bottom: 24px;
}

.dev-filter-grid {
    grid-template-columns: 1fr 1fr auto;
}

.dev-filter-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}



.dev-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 18px;
}

.dev-item-card {
    display: flex;
    flex-direction: column;
    min-height: 270px;
    background: #f9fafb;
    border: 1px solid rgba(15, 23, 42, 0.10);
    border-radius: 18px;
    padding: 18px;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.dev-item-card:hover {
    border-color: rgba(132, 204, 22, 0.65);
    box-shadow: 0 0 18px rgba(132, 204, 22, 0.16);
}

.dev-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 14px;
}

.dev-area-badge,
.dev-status-badge,
.dev-priority-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    line-height: 1;
}

.dev-area-badge {
    max-width: 70%;
    padding: 8px 11px;
    background: rgba(17, 24, 39, 0.08);
    color: #111827;
    overflow-wrap: anywhere;
}

.dev-status-badge {
    min-width: 72px;
    padding: 8px 11px;
}

.dev-status-badge.active {
    background: rgba(104, 213, 0, 0.16);
    color: #265f00;
}

.dev-status-badge.done {
    background: rgba(53, 56, 205, 0.10);
    color: #3538cd;
}

.dev-status-badge.deleted {
    background: rgba(153, 27, 27, 0.12);
    color: #991b1b;
}

.dev-status-badge.neutral {
    background: #e5e7eb;
    color: #374151;
}

.dev-item-card h3 {
    margin: 0 0 10px 0;
    color: #111827;
    font-size: 19px;
    line-height: 1.25;
}

.dev-description {
    flex: 1;
    margin: 0 0 16px 0;
    color: #374151;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.dev-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 14px;
    border-top: 1px solid rgba(15, 23, 42, 0.10);
}

.dev-priority-badge {
    padding: 8px 10px;
}

.dev-priority-badge.high {
    background: #fee2e2;
    color: #991b1b;
}

.dev-priority-badge.medium {
    background: #fef3c7;
    color: #92400e;
}

.dev-priority-badge.low {
    background: #dcfce7;
    color: #166534;
}

.dev-date {
    display: inline-flex;
    align-items: center;
    color: #6b7280;
    font-size: 12px;
    font-weight: 800;
}

.dev-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}



.dev-empty {
    background: #f9fafb;
    border: 1px dashed rgba(15, 23, 42, 0.22);
    border-radius: 18px;
    padding: 28px;
    text-align: center;
}

.dev-empty h3 {
    margin: 0 0 8px 0;
}

.dev-empty p {
    margin: 0;
    color: #6b7280;
    font-weight: 700;
}

@media (max-width: 1150px) {
    .dev-form-grid {
        grid-template-columns: 1fr 1fr;
    }

    .dev-filter-grid {
        grid-template-columns: 1fr 1fr;
    }

    .dev-filter-actions {
        grid-column: 1 / -1;
    }
}

@media (max-width: 760px) {
    .dev-section-header {
        flex-direction: column;
    }

    .dev-mini-stats {
        justify-content: flex-start;
    }

    .dev-form-grid,
    .dev-filter-grid {
        grid-template-columns: 1fr;
    }

    .dev-filter-actions,
    .dev-form-actions {
        flex-direction: column;
        align-items: stretch;
    }

    

    .dev-card-grid {
        grid-template-columns: 1fr;
    }

    .dev-card-top {
        flex-direction: column;
    }

    .dev-area-badge {
        max-width: 100%;
    }
}

/********************************************************************************
*                    TOURNAMENT SIDEBAR CONTEXT                                 *
********************************************************************************/

.tournament-sidebar-box {
    margin: 6px 0 10px;
    padding: 12px 13px;
    border-radius: 14px;
    background: rgba(132, 204, 22, 0.10);
    border: 1px solid rgba(132, 204, 22, 0.35);
    color: #ffffff;
}

.tournament-sidebar-label {
    display: block;
    margin-bottom: 5px;
    color: #a3e635;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.tournament-sidebar-box strong {
    display: block;
    color: #ffffff;
    font-size: 14px;
    line-height: 1.25;
}

.sidebar-submenu {
    display: grid;
    gap: 6px;
    margin: 2px 0 10px 12px;
    padding-left: 10px;
    border-left: 2px solid rgba(132, 204, 22, 0.28);
}

.sidebar-round-link {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 10px 11px !important;
    border-radius: 10px !important;
    font-size: 13px;
}

.sidebar-round-link small {
    font-size: 10px;
    font-weight: 900;
    color: #a3e635;
    opacity: 0.9;
}

.sidebar-round-link.active,
.sidebar-round-link:hover {
    background: rgba(132, 204, 22, 0.16) !important;
}

/********************************************************************************
*                           ROUND OVERVIEW CARDS                                *
********************************************************************************/

.round-overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
    margin-top: 18px;
}

.round-overview-card {
    background: #f9fafb;
    border: 1px solid rgba(15, 23, 42, 0.10);
    border-radius: 18px;
    padding: 18px;
}

.round-overview-header {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 16px;
}

.round-overview-header h3 {
    margin: 0 0 5px;
    color: #111827;
}

.round-overview-header p {
    margin: 0;
    color: #6b7280;
    font-weight: 700;
}

.round-overview-meta {
    display: grid;
    gap: 8px;
}
/********************************************************************************
*                         TOURNAMENT MANAGEMENT CARDS                           *
********************************************************************************/

.tournament-management-section {
    margin-bottom: 22px;
}

.tournament-management-heading {
    margin-bottom: 14px;
}

.tournament-management-heading h2 {
    margin: 0;
    color: #111827;
    font-size: 25px;
}

.tournament-management-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 22px;
    align-items: stretch;
}

.tournament-management-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 24px;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.10);
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.tournament-round-card {
    border-top: 5px solid #7ee000;
}

.tournament-control-card {
    border-top: 5px solid #111827;
}

.tournament-card-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 18px;
}

.tournament-card-kicker {
    display: block;
    margin-bottom: 5px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.tournament-card-header h3 {
    margin: 0;
    color: #111827;
    font-size: 21px;
}

.round-settings-form {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) auto;
    gap: 12px;
    align-items: end;
}

.round-settings-form label {
    grid-column: 1 / -1;
    margin: 0;
    color: #374151;
    font-size: 14px;
}

.round-settings-form select {
    margin: 0;
    min-height: 48px;
}



















.tournament-card-divider {
    height: 1px;
    margin: 22px 0;
    background: rgba(15, 23, 42, 0.11);
}

.next-round-area form,
.management-action-block form {
    margin: 0;
}

.management-action-block {
    display: grid;
    gap: 15px;
}

.management-action-block h4 {
    margin: 0 0 6px;
    color: #111827;
    font-size: 17px;
}

.management-action-block p {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.45;
}



.tournament-state-message {
    padding: 13px 15px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 11px;
    color: #4b5563;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
}

.tournament-state-message.is-complete {
    background: rgba(126, 224, 0, 0.12);
    border-color: rgba(126, 224, 0, 0.32);
    color: #285d00;
}

@media (max-width: 980px) {
    .tournament-management-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    .tournament-management-card {
        padding: 18px;
    }

    .round-settings-form {
        grid-template-columns: 1fr;
    }

    .round-settings-form label {
        grid-column: auto;
    }

    
}

/********************************************************************************
*                    SPRINGER SKAK – LÅST GLOBALT DESIGNSYSTEM                  *
********************************************************************************/

:root {
    --ui-green: #7ee000;
    --ui-green-hover: #9dff00;
    --ui-black: #111827;
    --ui-black-hover: #1f2937;
    --ui-orange: #f59e0b;
    --ui-orange-hover: #fbbf24;
    --ui-red: #dc2626;
    --ui-red-hover: #ef4444;
    --ui-blue: #2563eb;
    --ui-blue-hover: #3b82f6;
    --ui-white: #ffffff;

    --button-height-compact: 38px;
    --button-height-standard: 44px;
    --button-height-large: 52px;
    --button-width-compact: 110px;
    --button-width-standard: 160px;
    --button-width-large: 220px;
    --button-radius: 10px;
}

/* -----------------------------------------------------------------------------
   Fælles knapgeometri. Inline-grid bruges for stabil vandret og lodret centrering
   på både <a>, <button> og <input>. Den ekstra pixel øverst giver optisk centrering.
----------------------------------------------------------------------------- */
.btn,
button.btn,
a.btn,
input.btn,
.small-btn,
.btn-green,
.btn-danger,
.tournament-action-btn,
.btn-round-save,
.btn-round-generate,
.btn-participants,
.btn-finish-tournament,
.front-btn,
.users-topbar-btn,
.dev-reset-btn {
    appearance: none;
    -webkit-appearance: none;
    box-sizing: border-box;

    display: inline-grid;
    place-items: center;

    width: auto;
    min-width: var(--button-width-standard);
    height: var(--button-height-standard);
    min-height: var(--button-height-standard);

    margin: 0;
    padding: 1px 20px 0;

    border: 1px solid transparent;
    border-radius: var(--button-radius);

    font-family: Arial, Helvetica, sans-serif;
    font-size: 15px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0;

    text-align: center;
    text-decoration: none !important;
    white-space: nowrap;
    vertical-align: middle;

    cursor: pointer;
    user-select: none;

    transition:
        background-color .18s ease,
        color .18s ease,
        border-color .18s ease,
        box-shadow .18s ease,
        transform .18s ease;
}

.btn:hover,
button.btn:hover,
a.btn:hover,
input.btn:hover,
.small-btn:hover,
.btn-green:hover,
.btn-danger:hover,
.tournament-action-btn:hover,
.btn-round-save:hover,
.btn-round-generate:hover,
.btn-participants:hover,
.btn-finish-tournament:hover,
.front-btn:hover,
.users-topbar-btn:hover,
.dev-reset-btn:hover {
    text-decoration: none !important;
    transform: translateY(-1px);
}

.btn:active,
button.btn:active,
a.btn:active,
input.btn:active,
.small-btn:active,
.btn-green:active,
.btn-danger:active,
.tournament-action-btn:active,
.btn-round-save:active,
.btn-round-generate:active,
.btn-participants:active,
.btn-finish-tournament:active,
.front-btn:active,
.users-topbar-btn:active,
.dev-reset-btn:active {
    transform: translateY(1px);
}

.btn:focus-visible,
button.btn:focus-visible,
a.btn:focus-visible,
input.btn:focus-visible,
.small-btn:focus-visible,
.btn-green:focus-visible,
.btn-danger:focus-visible,
.tournament-action-btn:focus-visible,
.btn-round-save:focus-visible,
.btn-round-generate:focus-visible,
.btn-participants:focus-visible,
.btn-finish-tournament:focus-visible,
.front-btn:focus-visible,
.users-topbar-btn:focus-visible,
.dev-reset-btn:focus-visible {
    outline: 3px solid rgba(37, 99, 235, .28);
    outline-offset: 2px;
}

.btn:disabled,
button.btn:disabled,
input.btn:disabled,
.small-btn:disabled,
.btn-green:disabled,
.btn-danger:disabled,
.tournament-action-btn:disabled,
.btn-round-save:disabled,
.btn-round-generate:disabled,
.btn-participants:disabled,
.btn-finish-tournament:disabled,
.btn.is-disabled {
    opacity: .5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Faste størrelser */
.btn.compact,
button.btn.compact,
a.btn.compact,
input.btn.compact,
.small-btn {
    min-width: var(--button-width-compact);
    height: var(--button-height-compact);
    min-height: var(--button-height-compact);
    padding: 1px 14px 0;
    border-radius: 8px;
    font-size: 14px;
}

.btn.large,
button.btn.large,
a.btn.large,
input.btn.large {
    min-width: var(--button-width-large);
    height: var(--button-height-large);
    min-height: var(--button-height-large);
    padding: 1px 24px 0;
    border-radius: 12px;
    font-size: 17px;
}

.btn.full-width,
button.btn.full-width,
a.btn.full-width,
input.btn.full-width {
    width: 100%;
    min-width: 100%;
}

/* Primær: grøn / sort */
.btn.primary,
button.btn.primary,
a.btn.primary,
input.btn.primary,
.btn-green,
.btn-round-save,
.btn-round-generate,
.front-btn {
    background: var(--ui-green);
    color: #101800;
    border-color: var(--ui-green);
    box-shadow: 0 6px 14px rgba(126, 224, 0, .24);
}

.btn.primary:hover,
button.btn.primary:hover,
a.btn.primary:hover,
input.btn.primary:hover,
.btn-green:hover,
.btn-round-save:hover,
.btn-round-generate:hover,
.front-btn:hover {
    background: var(--ui-green-hover);
    color: #101800;
    border-color: var(--ui-green-hover);
}

/* Sekundær: sort / grøn */
.btn.secondary,
button.btn.secondary,
a.btn.secondary,
input.btn.secondary,
.small-btn:not(.danger):not(.edit):not(.info),
.users-topbar-btn,
.dev-reset-btn {
    background: var(--ui-black);
    color: var(--ui-green);
    border-color: #263244;
    box-shadow: 0 6px 14px rgba(17, 24, 39, .22);
}

.btn.secondary:hover,
button.btn.secondary:hover,
a.btn.secondary:hover,
input.btn.secondary:hover,
.small-btn:not(.danger):not(.edit):not(.info):hover,
.users-topbar-btn:hover,
.dev-reset-btn:hover {
    background: var(--ui-black-hover);
    color: var(--ui-green-hover);
    border-color: var(--ui-green);
}

/* Tertiær: orange / sort */
.btn.tertiary,
button.btn.tertiary,
a.btn.tertiary,
input.btn.tertiary,
.small-btn.edit,
.btn-participants {
    background: var(--ui-orange);
    color: #111111;
    border-color: var(--ui-orange);
    box-shadow: 0 6px 14px rgba(245, 158, 11, .22);
}

.btn.tertiary:hover,
button.btn.tertiary:hover,
a.btn.tertiary:hover,
input.btn.tertiary:hover,
.small-btn.edit:hover,
.btn-participants:hover {
    background: var(--ui-orange-hover);
    color: #111111;
    border-color: var(--ui-orange-hover);
}

/* Fare: rød / sort */
.btn.danger,
button.btn.danger,
a.btn.danger,
input.btn.danger,
.small-btn.danger,
.btn-danger,
.btn-finish-tournament {
    background: var(--ui-red);
    color: #111111;
    border-color: var(--ui-red);
    box-shadow: 0 6px 14px rgba(220, 38, 38, .22);
}

.btn.danger:hover,
button.btn.danger:hover,
a.btn.danger:hover,
input.btn.danger:hover,
.small-btn.danger:hover,
.btn-danger:hover,
.btn-finish-tournament:hover {
    background: var(--ui-red-hover);
    color: #111111;
    border-color: var(--ui-red-hover);
}

/* Info: blå / hvid */
.btn.info,
button.btn.info,
a.btn.info,
input.btn.info,
.small-btn.info {
    background: var(--ui-blue);
    color: var(--ui-white);
    border-color: var(--ui-blue);
    box-shadow: 0 6px 14px rgba(37, 99, 235, .22);
}

.btn.info:hover,
button.btn.info:hover,
a.btn.info:hover,
input.btn.info:hover,
.small-btn.info:hover {
    background: var(--ui-blue-hover);
    color: var(--ui-white);
    border-color: var(--ui-blue-hover);
}

/* Knapgrupper */
.action-buttons,
.form-actions,
.modal-actions,
.panel-actions,
.school-card-actions,
.section-heading-row,
.users-topbar,
.dev-card-actions,
.dev-filter-actions,
.template-downloads {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.section-heading-row,
.users-topbar {
    justify-content: space-between;
}

.action-buttons form,
.inline-form,
.school-card-actions form,
.panel-actions form,
.management-action-block form,
.next-round-area form {
    display: inline-flex;
    align-items: center;
    margin: 0;
    padding: 0;
}

.action-buttons .btn,
.action-buttons .small-btn,
.form-actions .btn,
.modal-actions .btn,
.panel-actions .btn,
.school-card-actions .btn,
.section-heading-row .btn,
.users-topbar .btn,
.dev-card-actions .btn,
.dev-filter-actions .btn,
.template-downloads .btn,
.template-downloads .small-btn {
    width: auto;
    margin: 0;
}

/* Lodrette formularers hovedknap */
.form-grid > .btn.primary,
.form-grid > button.btn.primary,
.form-grid > input.btn.primary {
    width: 100%;
    min-width: 100%;
    margin-top: 14px;
}

/* Modalens to knapper har samme bredde og højde */
.modal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.modal-actions .btn {
    width: 100%;
    min-width: 0;
}

/* Gamle transparente streamknapper beholdes som teksthandling */
.stream-open-btn {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 38px;
    margin-top: 10px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #4bb800;
    font: inherit;
    font-weight: 900;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
}

.stream-open-btn:hover {
    color: var(--ui-green-hover);
    text-decoration: underline;
}

@media (max-width: 620px) {
    .section-heading-row,
    .users-topbar,
    .panel-actions,
    .school-card-actions,
    .form-actions,
    .dev-card-actions,
    .dev-filter-actions,
    .template-downloads {
        align-items: stretch;
        flex-direction: column;
    }

    .section-heading-row .btn,
    .users-topbar .btn,
    .panel-actions .btn,
    .school-card-actions .btn,
    .form-actions .btn,
    .dev-card-actions .btn,
    .dev-filter-actions .btn,
    .template-downloads .btn,
    .template-downloads .small-btn {
        width: 100%;
        min-width: 100%;
    }

    .modal-actions {
        grid-template-columns: 1fr;
    }
}

/* ==========================================
   Modal formularer
   ========================================== */

.modal-card label,
.modal-card .checkbox-label,
.modal-card .help-text,
.modal-card h2,
.modal-card h3,
.modal-card p,
.event-edit-modal-card label,
.event-edit-modal-card .checkbox-label {
    color: #ffffff;
}

.modal-card .help-text {
    color: rgba(255,255,255,.75);
}

.modal-card input,
.modal-card select,
.modal-card textarea {
    color: #111827;
}

.modal-card .edit-warning {
    color: #9a3412;
}
/********************************************************************************
*          SPRINGER SKAK – STANDARDISEREDE MODALER OG UI-KOMPONENTER            *
*                                                                               *
* Denne sektion er stylesheetets autoritative komponentlag.                     *
* Reglerne er bevidst kontekstafgrænsede, så mørke modaler ikke ændrer tekst     *
* eller formularfelter på sider med lys baggrund.                               *
********************************************************************************/

:root {
    --ui-surface: #ffffff;
    --ui-surface-soft: #f8fafc;
    --ui-surface-muted: #f3f4f6;
    --ui-border: rgba(15, 23, 42, 0.12);
    --ui-border-strong: rgba(15, 23, 42, 0.20);
    --ui-text: #111827;
    --ui-text-soft: #374151;
    --ui-text-muted: #6b7280;

    --modal-surface: #0c0c0c;
    --modal-surface-soft: #111827;
    --modal-border: #7ee000;
    --modal-text: #ffffff;
    --modal-text-muted: rgba(255, 255, 255, 0.74);
    --modal-field-bg: #f8fafc;
    --modal-field-text: #111827;
    --modal-field-border: #cbd5e1;

    --ui-shadow-card: 0 8px 24px rgba(15, 23, 42, 0.08);
    --ui-shadow-modal:
        0 0 28px rgba(126, 224, 0, 0.23),
        0 24px 70px rgba(0, 0, 0, 0.46);
}

/* -----------------------------------------------------------------------------
   Modal-overlay
----------------------------------------------------------------------------- */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 24px;
    overflow-y: auto;
    background: rgba(3, 8, 5, 0.82);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.modal-overlay.show,
.modal-overlay.is-open,
.modal-overlay[aria-hidden="false"] {
    display: flex;
}

body.modal-open {
    overflow: hidden;
}

/* -----------------------------------------------------------------------------
   Standardmodal – mørk som udgangspunkt
----------------------------------------------------------------------------- */
.modal-card {
    position: relative;
    width: min(100%, 520px);
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    margin: auto;
    padding: 28px;
    border: 2px solid var(--modal-border);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.99), rgba(8, 12, 10, 0.99));
    color: var(--modal-text);
    box-shadow: var(--ui-shadow-modal);
}

.modal-card.modal-sm {
    width: min(100%, 420px);
}

.modal-card.modal-lg {
    width: min(100%, 760px);
}

.modal-card.modal-xl {
    width: min(100%, 980px);
}

.modal-card.modal-danger {
    border-color: var(--ui-red);
    box-shadow:
        0 0 26px rgba(220, 38, 38, 0.24),
        0 24px 70px rgba(0, 0, 0, 0.46);
}

/* Valgfri lys modal. Brug kun klassen .modal-light på selve .modal-card. */
.modal-card.modal-light {
    border-color: var(--ui-border-strong);
    background: var(--ui-surface);
    color: var(--ui-text);
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
}

/* -----------------------------------------------------------------------------
   Modalstruktur
----------------------------------------------------------------------------- */
.modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin: 0 0 20px;
    padding: 0 0 17px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.modal-card.modal-light .modal-header {
    border-bottom-color: var(--ui-border);
}

.modal-title-group {
    min-width: 0;
}

.modal-kicker {
    display: block;
    margin-bottom: 6px;
    color: var(--ui-green);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.modal-card.modal-light .modal-kicker {
    color: #4d8f00;
}

.modal-card h2,
.modal-card h3,
.modal-card h4,
.modal-title {
    margin: 0;
    color: var(--modal-text);
    line-height: 1.2;
}

.modal-card.modal-light h2,
.modal-card.modal-light h3,
.modal-card.modal-light h4,
.modal-card.modal-light .modal-title {
    color: var(--ui-text);
}

.modal-subtitle {
    margin: 7px 0 0;
    color: var(--modal-text-muted);
    font-size: 14px;
    line-height: 1.5;
}

.modal-card.modal-light .modal-subtitle {
    color: var(--ui-text-muted);
}

.modal-body {
    color: var(--modal-text);
}

.modal-body > :first-child {
    margin-top: 0;
}

.modal-body > :last-child {
    margin-bottom: 0;
}

.modal-footer,
.modal-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.modal-card.modal-light .modal-footer,
.modal-card.modal-light .modal-actions {
    border-top-color: var(--ui-border);
}

/* Luk-knap */
.modal-close {
    appearance: none;
    -webkit-appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    margin: -5px -5px 0 0;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    font-size: 25px;
    font-weight: 400;
    line-height: 1;
    cursor: pointer;
    transition: background-color .18s ease, border-color .18s ease, transform .18s ease;
}

.modal-close:hover {
    transform: translateY(-1px);
    border-color: rgba(126, 224, 0, 0.65);
    background: rgba(126, 224, 0, 0.14);
}

.modal-close:focus-visible {
    outline: 3px solid rgba(126, 224, 0, 0.28);
    outline-offset: 2px;
}

.modal-card.modal-light .modal-close {
    border-color: var(--ui-border);
    background: var(--ui-surface-muted);
    color: var(--ui-text);
}

/* -----------------------------------------------------------------------------
   Formularer i mørke og lyse modaler
----------------------------------------------------------------------------- */
.modal-card label,
.modal-card .checkbox-label,
.modal-card .checkbox-row,
.modal-card .radio-label {
    color: #e5e7eb;
}

.modal-card .help-text,
.modal-card .form-help,
.modal-card small {
    color: var(--modal-text-muted);
}

.modal-card input:not([type="checkbox"]):not([type="radio"]),
.modal-card select,
.modal-card textarea {
    width: 100%;
    border: 1px solid var(--modal-field-border);
    background: var(--modal-field-bg);
    color: var(--modal-field-text);
}

.modal-card input::placeholder,
.modal-card textarea::placeholder {
    color: #6b7280;
    opacity: 1;
}

.modal-card input:focus,
.modal-card select:focus,
.modal-card textarea:focus {
    outline: none;
    border-color: var(--ui-green);
    box-shadow: 0 0 0 3px rgba(126, 224, 0, 0.18);
}

.modal-card input[type="checkbox"],
.modal-card input[type="radio"] {
    accent-color: var(--ui-green);
}

.modal-card.modal-light label,
.modal-card.modal-light .checkbox-label,
.modal-card.modal-light .checkbox-row,
.modal-card.modal-light .radio-label {
    color: var(--ui-text-soft);
}

.modal-card.modal-light .help-text,
.modal-card.modal-light .form-help,
.modal-card.modal-light small {
    color: var(--ui-text-muted);
}

/* -----------------------------------------------------------------------------
   Modalbeskeder og bekræftelsesfelter
----------------------------------------------------------------------------- */
.modal-message,
.ui-notice {
    padding: 14px 16px;
    border: 1px solid transparent;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.5;
}

.modal-message {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.14);
    color: #f3f4f6;
}

.modal-message.is-warning,
.ui-notice.warning {
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.42);
    color: #fef3c7;
}

.modal-message.is-danger,
.ui-notice.danger {
    background: rgba(220, 38, 38, 0.16);
    border-color: rgba(220, 38, 38, 0.42);
    color: #fee2e2;
}

.modal-message.is-success,
.ui-notice.success {
    background: rgba(126, 224, 0, 0.13);
    border-color: rgba(126, 224, 0, 0.38);
    color: #d9f99d;
}

.modal-card.modal-light .modal-message {
    background: var(--ui-surface-muted);
    border-color: var(--ui-border);
    color: var(--ui-text-soft);
}

.modal-card.modal-light .modal-message.is-warning,
.ui-notice.warning {
    background: #fffbeb;
    border-color: #fcd34d;
    color: #92400e;
}

.modal-card.modal-light .modal-message.is-danger,
.ui-notice.danger {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #991b1b;
}

.modal-card.modal-light .modal-message.is-success,
.ui-notice.success {
    background: #f0fdf4;
    border-color: #86efac;
    color: #166534;
}

/* -----------------------------------------------------------------------------
   Fælles UI-kort. Disse regler gælder kun i appens lyse indhold.
----------------------------------------------------------------------------- */
.app-main .ui-card,
.app-main .ui-panel,
.app-main .component-card {
    background: var(--ui-surface);
    color: var(--ui-text);
    border: 1px solid var(--ui-border);
    border-radius: 18px;
    box-shadow: var(--ui-shadow-card);
}

.app-main .ui-card,
.app-main .component-card {
    padding: 22px;
}

.app-main .ui-panel {
    padding: 24px;
}

.ui-card-header,
.ui-section-header,
.ui-toolbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.ui-card-header,
.ui-section-header {
    margin-bottom: 18px;
}

.ui-card-header h2,
.ui-card-header h3,
.ui-section-header h2,
.ui-section-header h3 {
    margin: 0;
    color: var(--ui-text);
}

.ui-card-header p,
.ui-section-header p {
    margin: 6px 0 0;
    color: var(--ui-text-muted);
    line-height: 1.45;
}

.ui-toolbar {
    align-items: center;
    margin-bottom: 20px;
}

.ui-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.ui-actions form {
    display: inline-flex;
    margin: 0;
}

/* -----------------------------------------------------------------------------
   Badges – fælles semantik uden konflikt med eksisterende statustyper
----------------------------------------------------------------------------- */
.ui-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 28px;
    padding: 6px 10px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;
}

.ui-badge.neutral {
    background: #e5e7eb;
    color: #374151;
}

.ui-badge.success {
    background: #dcfce7;
    color: #166534;
}

.ui-badge.warning {
    background: #fef3c7;
    color: #92400e;
}

.ui-badge.danger {
    background: #fee2e2;
    color: #991b1b;
}

.ui-badge.info {
    background: #dbeafe;
    color: #1d4ed8;
}

.ui-badge.accent {
    background: rgba(126, 224, 0, 0.17);
    color: #315f00;
    border-color: rgba(126, 224, 0, 0.35);
}

/* -----------------------------------------------------------------------------
   Tomme tilstande
----------------------------------------------------------------------------- */
.ui-empty-state {
    padding: 34px 24px;
    border: 1px dashed var(--ui-border-strong);
    border-radius: 18px;
    background: var(--ui-surface-soft);
    color: var(--ui-text);
    text-align: center;
}

.ui-empty-state h3 {
    margin: 0 0 8px;
    color: var(--ui-text);
}

.ui-empty-state p {
    max-width: 620px;
    margin: 0 auto;
    color: var(--ui-text-muted);
    line-height: 1.5;
}

.ui-empty-state .ui-actions {
    justify-content: center;
    margin-top: 18px;
}

/* -----------------------------------------------------------------------------
   Ensartede formularrækker og responsive grids
----------------------------------------------------------------------------- */
.ui-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.ui-form-grid.three-columns {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ui-form-field {
    min-width: 0;
}

.ui-form-field.full-width {
    grid-column: 1 / -1;
}

.ui-form-field label {
    margin: 0 0 6px;
}

/* -----------------------------------------------------------------------------
   Mobiltilpasning
----------------------------------------------------------------------------- */
@media (max-width: 760px) {
    .modal-overlay {
        align-items: flex-start;
        padding: 14px;
    }

    .modal-card,
    .modal-card.modal-sm,
    .modal-card.modal-lg,
    .modal-card.modal-xl {
        width: 100%;
        max-height: calc(100vh - 28px);
        padding: 21px 18px;
        border-radius: 15px;
    }

    .modal-header {
        gap: 12px;
    }

    .modal-footer,
    .modal-actions {
        display: grid;
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .modal-footer .btn,
    .modal-actions .btn,
    .modal-footer button,
    .modal-actions button {
        width: 100%;
        min-width: 100%;
    }

    .ui-card-header,
    .ui-section-header,
    .ui-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .ui-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .ui-actions .btn,
    .ui-actions button,
    .ui-actions a.btn,
    .ui-actions form {
        width: 100%;
    }

    .ui-actions form .btn,
    .ui-actions form button {
        width: 100%;
        min-width: 100%;
    }

    .ui-form-grid,
    .ui-form-grid.three-columns {
        grid-template-columns: 1fr;
    }

    .ui-form-field.full-width {
        grid-column: auto;
    }
}

/********************************************************************************
*                    QUALIFICATIONMASTER / KONTAKTPERSON                       *
********************************************************************************/
.qualification-sidebar {
    border-right-color: #f59e0b;
    box-shadow: 0 0 20px rgba(245, 158, 11, .18), 0 0 50px rgba(132, 204, 22, .10);
}
.qualification-nav a.active {
    background: rgba(245, 158, 11, .16);
    border-color: #f59e0b;
    color: #fde68a;
    box-shadow: 0 0 12px rgba(245, 158, 11, .22);
}
.qualification-nav a:hover { color: #fde68a; }

.qualification-mail-action {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 7px;
}
.qualification-mail-action small { color:#6b7280; }
.ui-badge.neutral { background:#e5e7eb; color:#374151; }
.ui-badge.danger { background:#fee2e2; color:#991b1b; }

/* LOCAL QUALIFICATION FLOW */
.qualification-help-box{display:flex;align-items:center;justify-content:space-between;gap:24px;border-left:5px solid var(--ui-green)}
.qualification-help-box h2{margin:4px 0 10px}.qualification-help-box p{margin:0;max-width:850px;line-height:1.55;color:#4b5563}
.qualification-steps{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:20px 0}
.qualification-steps>div{display:flex;align-items:center;gap:10px;padding:14px;border:1px solid #e5e7eb;border-radius:12px;background:#f9fafb;color:#6b7280;font-weight:800}
.qualification-steps strong{display:grid;place-items:center;width:30px;height:30px;border-radius:50%;background:#e5e7eb;color:#374151}
.qualification-steps .is-done,.qualification-steps .is-current{border-color:rgba(126,224,0,.55);background:rgba(126,224,0,.08);color:#285d00}.qualification-steps .is-done strong,.qualification-steps .is-current strong{background:var(--ui-green);color:#101800}
.standings-table tr.is-qualifying{background:rgba(126,224,0,.08)}
@media(max-width:760px){.qualification-help-box{flex-direction:column;align-items:stretch}.qualification-steps{grid-template-columns:1fr}.qualification-help-box .btn{width:100%}}

/********************************************************************************
*                    QUALIFICATIONMASTER 1.0                                    *
********************************************************************************/

.qualification-help-box,
.qualification-next-action,
.qualification-complete-panel,
.finalist-transfer-box,
.round-completion-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.qualification-help-box p,
.qualification-next-action p,
.qualification-complete-panel p,
.finalist-transfer-box p,
.round-completion-box p {
    margin: 8px 0 0;
    color: #6b7280;
    line-height: 1.5;
}

.qualification-stat-name {
    font-size: 22px !important;
    line-height: 1.25;
}

.qualification-dashboard-links {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-top: 22px;
}

.qualification-dashboard-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 18px;
    border: 1px solid rgba(15, 23, 42, .10);
    border-radius: 16px;
    background: #f9fafb;
    color: #111827;
    text-decoration: none;
    transition: .18s ease;
}

.qualification-dashboard-card:hover {
    border-color: #84cc16;
    box-shadow: 0 0 18px rgba(132, 204, 22, .16);
}

.qualification-dashboard-card strong {
    font-size: 17px;
}

.qualification-dashboard-card span {
    color: #6b7280;
    font-weight: 700;
}

.qualification-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 20px;
}

.qualification-steps > * {
    display: grid;
    grid-template-columns: 38px 1fr;
    grid-template-rows: auto auto;
    column-gap: 10px;
    align-items: center;
    padding: 14px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #f9fafb;
    color: #374151;
    text-decoration: none;
}

.qualification-steps strong {
    grid-row: 1 / 3;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #374151;
}

.qualification-steps span {
    font-weight: 900;
}

.qualification-steps small {
    margin-top: 3px;
    color: #6b7280;
    font-weight: 700;
}

.qualification-steps .is-current {
    border-color: #f59e0b;
    background: #fff7ed;
}

.qualification-steps .is-current strong {
    background: #f59e0b;
    color: #111827;
}

.qualification-steps .is-done {
    border-color: rgba(126, 224, 0, .45);
    background: rgba(126, 224, 0, .10);
}

.qualification-steps .is-done strong {
    background: #7ee000;
    color: #101800;
}

.round-card-status {
    min-height: 38px;
    margin-bottom: 14px;
    color: #6b7280;
    font-weight: 700;
}

.round-completion-box,
.finalist-transfer-box {
    margin-top: 24px;
    padding: 20px;
    border: 1px solid rgba(245, 158, 11, .35);
    border-radius: 16px;
    background: #fff7ed;
}

.round-completion-box.is-complete {
    border-color: rgba(126, 224, 0, .40);
    background: rgba(126, 224, 0, .10);
}

.round-completion-box h3,
.finalist-transfer-box h3 {
    margin: 0;
    color: #111827;
}

.qualification-complete-panel {
    border-top: 5px solid #7ee000;
}

.ui-notice.warning {
    background: #fff7ed;
    border-color: #fed7aa;
    color: #9a3412;
}

.ui-notice.success {
    background: #dcfce7;
    border-color: #bbf7d0;
    color: #166534;
}

.qualification-standings-table tr.is-finalist-position {
    background: rgba(126, 224, 0, .07);
}

.finalist-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.finalist-card {
    display: grid;
    grid-template-columns: 44px 58px 1fr;
    gap: 14px;
    align-items: center;
    padding: 18px;
    border: 1px solid rgba(15, 23, 42, .10);
    border-radius: 16px;
    background: #f9fafb;
}

.finalist-rank {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #7ee000;
    color: #101800;
    font-weight: 900;
}

.finalist-photo {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #84cc16;
    background: #e5e7eb;
}

.finalist-card h3 {
    margin: 0 0 5px;
    color: #111827;
    font-size: 17px;
}

.finalist-card p,
.finalist-card small {
    margin: 0;
    color: #6b7280;
}

@media (max-width: 1000px) {
    .qualification-dashboard-links,
    .qualification-steps {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 700px) {
    .qualification-help-box,
    .qualification-next-action,
    .qualification-complete-panel,
    .finalist-transfer-box,
    .round-completion-box {
        flex-direction: column;
        align-items: stretch;
    }

    .qualification-dashboard-links,
    .qualification-steps {
        grid-template-columns: 1fr;
    }

    .qualification-help-box .btn,
    .qualification-next-action .btn,
    .qualification-complete-panel .btn,
    .finalist-transfer-box .btn,
    .round-completion-box .btn {
        width: 100%;
    }
}

/* Etape 6 – finalistoversigt og seed-preview */
.final-seed-badge{display:inline-grid;place-items:center;width:34px;height:34px;border-radius:50%;background:#7ee000;color:#101800;font-weight:900}
.seed-pair-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(340px,1fr));gap:16px}
.seed-pair-card{display:grid;grid-template-columns:1fr auto 1fr;gap:14px;align-items:center;position:relative;padding:42px 18px 18px;border:1px solid rgba(15,23,42,.10);border-radius:16px;background:#f9fafb}
.seed-pair-card>div{display:flex;flex-direction:column;gap:5px}.seed-pair-card small{color:#6b7280;font-weight:700}.seed-board-label{position:absolute;top:14px;left:18px;color:#6b7280;font-size:12px;font-weight:900;text-transform:uppercase}.seed-versus{font-weight:900;color:#f59e0b}.seed-pair-card.has-conflict{border-color:#f59e0b;background:#fff7ed}.seed-conflict-text{grid-column:1/-1;margin:6px 0 0;color:#9a3412;font-size:12px;font-weight:800}
@media(max-width:700px){.seed-pair-card{grid-template-columns:1fr;text-align:center}.seed-versus{padding:4px 0}}


/* ==========================================================================
   ETAPE 7 – GENERISK KNOCKOUTMOTOR
   ========================================================================== */

.knockout-create-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    border-top: 5px solid #7ee000;
}

.knockout-create-panel p {
    margin: 8px 0 0;
    color: #6b7280;
    line-height: 1.5;
}

.bracket-round-navigation {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.bracket-round-navigation .round-nav-link {
    display: inline-flex;
    gap: 8px;
}

.bracket-round-navigation small {
    opacity: .72;
    text-transform: capitalize;
}

.knockout-match-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 18px;
}

.knockout-match-card {
    padding: 18px;
    border: 1px solid rgba(15, 23, 42, .10);
    border-radius: 17px;
    background: #f9fafb;
}

.knockout-match-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    color: #6b7280;
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
}

.knockout-player-row {
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 12px;
    align-items: center;
    min-height: 68px;
    padding: 12px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
}

.knockout-player-row + .knockout-player-row {
    border-top: 0;
}

.knockout-player-row:first-of-type {
    border-radius: 12px 12px 0 0;
}

.knockout-player-row:nth-of-type(2) {
    border-radius: 0 0 12px 12px;
}

.knockout-player-row.is-winner {
    background: rgba(126, 224, 0, .13);
    border-color: rgba(126, 224, 0, .45);
}

.knockout-player-row strong {
    display: block;
    color: #111827;
}

.knockout-player-row small {
    display: block;
    margin-top: 4px;
    color: #6b7280;
    font-weight: 700;
}

.knockout-seed {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #111827;
    color: #7ee000;
    font-weight: 900;
}

.knockout-result-form {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.knockout-result-form label {
    margin: 0;
}

.knockout-result-form select,
.knockout-result-form input {
    margin: 0;
}

.knockout-result-note {
    margin: 16px 0 0;
    padding: 12px;
    border-radius: 10px;
    background: #eef3fb;
    color: #4b5563;
    font-weight: 800;
}

@media (max-width: 700px) {
    .knockout-create-panel {
        flex-direction: column;
        align-items: stretch;
    }

    .knockout-create-panel .btn {
        width: 100%;
    }

    .knockout-match-grid {
        grid-template-columns: 1fr;
    }
}


/* ==========================================================================
   ETAPE 8 – FINALEKONTROL 1.0
   ========================================================================== */

.final-control-hero,
.final-control-status-grid,
.final-control-card-grid,
.final-podium-grid,
.final-results-grid {
    display: grid;
    gap: 18px;
}

.final-control-hero {
    grid-template-columns: 1fr auto;
    align-items: center;
    border-top: 5px solid #7ee000;
}

.final-control-hero p {
    margin: 8px 0 0;
    color: #6b7280;
    line-height: 1.5;
}

.final-progress-track {
    height: 14px;
    overflow: hidden;
    border-radius: 999px;
    background: #e5e7eb;
}

.final-progress-track > div {
    height: 100%;
    border-radius: inherit;
    background: #7ee000;
    transition: width .25s ease;
}

.final-control-status-grid {
    grid-template-columns: repeat(3, 1fr);
    margin-top: 20px;
}

.final-control-status-grid > div {
    padding: 16px;
    border-radius: 14px;
    background: #f9fafb;
    border: 1px solid rgba(15, 23, 42, .10);
}

.final-control-status-grid span,
.final-control-status-grid strong {
    display: block;
}

.final-control-status-grid span {
    margin-bottom: 6px;
    color: #6b7280;
    font-size: 13px;
    font-weight: 800;
}

.final-control-card-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.final-control-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 120px;
    padding: 20px;
    border: 1px solid rgba(15, 23, 42, .10);
    border-radius: 17px;
    background: #f9fafb;
    color: #111827;
    text-decoration: none;
    transition: .18s ease;
}

.final-control-card:hover {
    border-color: #84cc16;
    box-shadow: 0 0 20px rgba(132, 204, 22, .18);
    transform: translateY(-2px);
}

.final-control-card strong {
    font-size: 18px;
}

.final-control-card span {
    color: #6b7280;
    font-weight: 700;
}

.final-control-card.is-disabled {
    opacity: .68;
}

.final-podium-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    margin-top: 18px;
}

.final-podium-grid article,
.final-results-grid article {
    padding: 20px;
    border: 1px solid rgba(15, 23, 42, .10);
    border-radius: 17px;
    background: #f9fafb;
}

.final-podium-grid span,
.final-results-grid span {
    display: block;
    margin-bottom: 7px;
    color: #4bb800;
    font-weight: 900;
    text-transform: uppercase;
}

.final-podium-grid strong,
.final-podium-grid small {
    display: block;
}

.final-podium-grid small,
.final-results-grid p,
.final-results-grid small {
    color: #6b7280;
}

.final-match-table td {
    vertical-align: middle;
}

.final-results-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.final-results-grid h3 {
    margin: 0 0 8px;
    color: #111827;
}

.final-results-grid p,
.final-results-grid small {
    margin: 0;
}

@media (max-width: 900px) {
    .final-control-hero {
        grid-template-columns: 1fr;
    }

    .final-control-status-grid {
        grid-template-columns: 1fr;
    }
}

/********************************************************************************
*                      GRAFISK KNOCKOUT-BRACKET – ADMIN                         *
********************************************************************************/

.final-bracket-hero {
    overflow: hidden;
    border-color: rgba(132, 204, 22, .28);
    background:
        radial-gradient(circle at right top, rgba(132, 204, 22, .14), transparent 36%),
        #ffffff;
}

.final-bracket-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin: 22px 0 28px;
}

.final-bracket-stats article {
    padding: 20px 22px;
    border: 1px solid #dce7cd;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .07);
}

.final-bracket-stats span,
.final-bracket-stats strong {
    display: block;
}

.final-bracket-stats span {
    color: #6b7280;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.final-bracket-stats strong {
    margin-top: 7px;
    color: #111827;
    font-size: 31px;
}

.visual-bracket-panel {
    padding: 0;
    overflow: hidden;
}

.visual-bracket-heading {
    padding: 24px 26px 18px;
    border-bottom: 1px solid #e5e7eb;
}

.visual-bracket-mobile-select {
    display: none;
    width: min(320px, 100%);
    margin: 0;
}

.visual-bracket-mobile-select span {
    display: block;
    margin-bottom: 5px;
    color: #4b5563;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.visual-bracket-scroll {
    width: 100%;
    overflow-x: auto;
    padding: 28px;
    background:
        linear-gradient(rgba(132, 204, 22, .035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(132, 204, 22, .035) 1px, transparent 1px),
        #f8fafc;
    background-size: 24px 24px;
}

.visual-bracket-tree {
    display: grid;
    grid-template-columns: repeat(var(--bracket-round-count), minmax(270px, 1fr));
    gap: 54px;
    min-width: calc(var(--bracket-round-count) * 300px);
    align-items: stretch;
}

.visual-bracket-round {
    display: flex;
    flex-direction: column;
    min-width: 270px;
}

.visual-bracket-round-header {
    min-height: 82px;
    margin-bottom: 18px;
    padding: 14px 16px;
    border: 1px solid #d8e2f0;
    border-radius: 14px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 7px 18px rgba(15, 23, 42, .07);
}

.visual-bracket-round.is-active .visual-bracket-round-header {
    border-color: #84cc16;
    box-shadow: 0 0 0 3px rgba(132, 204, 22, .13), 0 8px 22px rgba(0,0,0,.08);
}

.visual-bracket-round-header span {
    color: #65a30d;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.visual-bracket-round-header h3 {
    margin: 4px 0 3px;
    color: #111827;
    font-size: 19px;
}

.visual-bracket-round-header small {
    color: #6b7280;
}

.visual-bracket-round-matches {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    gap: 18px;
}

.visual-bracket-match {
    position: relative;
    overflow: visible;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .08);
}

.visual-bracket-match::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 100%;
    width: 55px;
    height: 2px;
    background: #94a3b8;
}

.visual-bracket-round:last-child .visual-bracket-match::after {
    display: none;
}

.visual-bracket-match.is-ready {
    border-color: #84cc16;
    box-shadow: 0 0 0 3px rgba(132, 204, 22, .10), 0 8px 18px rgba(15, 23, 42, .08);
}

.visual-bracket-match.is-completed {
    border-color: rgba(22, 163, 74, .42);
}

.visual-bracket-match.is-waiting {
    opacity: .76;
}

.visual-bracket-match > header {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 12px;
    border-bottom: 1px solid #e5e7eb;
    color: #334155;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.visual-bracket-status {
    color: #65a30d;
}

.visual-bracket-player {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 24px;
    align-items: center;
    gap: 9px;
    min-height: 58px;
    padding: 9px 11px;
    border-bottom: 1px solid #eef2f7;
}

.visual-bracket-player.is-winner {
    background: linear-gradient(90deg, rgba(132, 204, 22, .20), rgba(132, 204, 22, .05));
}

.visual-bracket-seed {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #111827;
    color: #a3e635;
    font-size: 12px;
    font-weight: 900;
}

.visual-bracket-player-copy {
    min-width: 0;
}

.visual-bracket-player-copy strong,
.visual-bracket-player-copy small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.visual-bracket-player-copy strong {
    color: #111827;
    font-size: 14px;
}

.visual-bracket-player-copy small {
    margin-top: 3px;
    color: #6b7280;
    font-size: 11px;
}

.visual-bracket-winner-mark {
    color: #16a34a;
    font-size: 19px;
    font-weight: 950;
}

.visual-bracket-match > footer {
    padding: 8px 11px;
    border-radius: 0 0 13px 13px;
    background: #f8fafc;
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
}

.visual-bracket-empty {
    display: grid;
    place-items: center;
    min-height: 140px;
    padding: 20px;
    border: 1px dashed #cbd5e1;
    border-radius: 14px;
    color: #64748b;
    background: rgba(255,255,255,.65);
}

.visual-bronze-panel {
    display: grid;
    grid-template-columns: minmax(240px, .55fr) minmax(300px, 1fr);
    gap: 28px;
    align-items: center;
}

.visual-bronze-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
}

.visual-bronze-grid .visual-bracket-match::after {
    display: none;
}

@media (max-width: 1100px) {
    .final-bracket-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .visual-bracket-mobile-select {
        display: block;
    }

    .visual-bracket-scroll {
        overflow: visible;
        padding: 20px;
    }

    .visual-bracket-tree {
        display: block;
        min-width: 0;
    }

    .visual-bracket-round {
        display: none;
        min-width: 0;
    }

    .visual-bracket-round.is-mobile-selected {
        display: flex;
    }

    .visual-bracket-match::after {
        display: none;
    }
}

@media (max-width: 700px) {
    .final-bracket-stats {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .final-bracket-stats article {
        padding: 16px;
    }

    .final-bracket-stats strong {
        font-size: 25px;
    }

    .visual-bracket-heading,
    .visual-bracket-scroll {
        padding: 17px;
    }

    .visual-bronze-panel {
        grid-template-columns: 1fr;
    }
}

/********************************************************************************
*                    FINALE COMMAND CENTER / OPE CONTROL                         *
********************************************************************************/

.final-command-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    border-top: 5px solid var(--ui-green, #7ee000);
    background:
        radial-gradient(circle at right top, rgba(126, 224, 0, .13), transparent 34%),
        #ffffff;
}

.final-command-hero-copy h2,
.final-next-action h2,
.final-progress-command-panel h2,
.final-workspaces-panel h2,
.ope-status-panel h2 {
    margin: 4px 0 8px;
    color: #111827;
}

.final-command-hero-copy p,
.final-next-action p {
    margin: 0;
    color: #6b7280;
    line-height: 1.5;
}

.final-command-hero-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.ope-online-badge {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 11px 15px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 950;
    letter-spacing: .06em;
}

.ope-online-badge i {
    flex: 0 0 auto;
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.ope-online-badge.is-online {
    background: rgba(126, 224, 0, .14);
    color: #2f6500;
    border: 1px solid rgba(126, 224, 0, .32);
}

.ope-online-badge.is-online i {
    background: #7ee000;
    animation: opePulseOnline 1.4s infinite;
}

.ope-online-badge.is-offline {
    background: rgba(220, 38, 38, .12);
    color: #991b1b;
    border: 1px solid rgba(220, 38, 38, .28);
}

.ope-online-badge.is-offline i {
    background: #dc2626;
    animation: opePulseOffline 1.4s infinite;
}

@keyframes opePulseOnline {
    0% {
        box-shadow: 0 0 0 0 rgba(126, 224, 0, .72);
        opacity: 1;
    }
    70% {
        box-shadow: 0 0 0 11px rgba(126, 224, 0, 0);
        opacity: .78;
    }
    100% {
        box-shadow: 0 0 0 0 rgba(126, 224, 0, 0);
        opacity: 1;
    }
}

@keyframes opePulseOffline {
    0% {
        box-shadow: 0 0 0 0 rgba(220, 38, 38, .68);
        opacity: 1;
    }
    70% {
        box-shadow: 0 0 0 11px rgba(220, 38, 38, 0);
        opacity: .72;
    }
    100% {
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0);
        opacity: 1;
    }
}

.final-command-overview-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin: 22px 0;
}

.final-command-overview-grid article {
    padding: 21px 22px;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .08);
    border: 1px solid rgba(15, 23, 42, .08);
}

.final-command-overview-grid span,
.final-command-overview-grid strong,
.final-command-overview-grid small {
    display: block;
}

.final-command-overview-grid span {
    color: #6b7280;
    font-size: 13px;
    font-weight: 800;
}

.final-command-overview-grid strong {
    margin: 7px 0 5px;
    color: #111827;
    font-size: 28px;
}

.final-command-overview-grid small {
    color: #6b7280;
    font-weight: 700;
}

.final-next-action {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    overflow: hidden;
    position: relative;
}

.final-next-action::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 6px;
    background: #2563eb;
}

.final-next-action-action::before,
.final-next-action-ready::before { background: #7ee000; }
.final-next-action-complete::before { background: #16a34a; }
.final-next-action-waiting::before { background: #f59e0b; }

.final-progress-command-panel {
    margin-top: 22px;
}

.final-progress-percent {
    color: #111827;
    font-size: 34px;
}

.final-command-progress-track {
    height: 16px;
    overflow: hidden;
    border-radius: 999px;
    background: #e5e7eb;
    box-shadow: inset 0 1px 3px rgba(15, 23, 42, .12);
}

.final-command-progress-track > div {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #60c900, #9dff00);
    transition: width .35s ease;
}

.final-command-status-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.final-command-status-grid > div {
    padding: 15px 16px;
    border: 1px solid rgba(15, 23, 42, .09);
    border-radius: 13px;
    background: #f8fafc;
}

.final-command-status-grid span,
.final-command-status-grid strong {
    display: block;
}

.final-command-status-grid span {
    margin-bottom: 5px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 800;
}

.final-command-status-grid strong {
    color: #111827;
}

.final-command-main-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(300px, .7fr);
    gap: 22px;
    align-items: start;
}

.final-command-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.final-command-card {
    min-height: 145px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid rgba(15, 23, 42, .09);
    border-radius: 16px;
    background: #f8fafc;
    color: #111827;
    text-decoration: none;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.final-command-card:hover {
    transform: translateY(-2px);
    border-color: rgba(126, 224, 0, .65);
    box-shadow: 0 10px 24px rgba(126, 224, 0, .14);
}

.final-command-card.is-disabled {
    opacity: .45;
    pointer-events: none;
}

.final-command-card-icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 11px;
    background: #111827;
    color: #9dff00;
    font-weight: 950;
}

.final-command-card strong {
    margin-top: auto;
    font-size: 17px;
}

.final-command-card small {
    margin-top: 5px;
    color: #6b7280;
    font-weight: 700;
}

.ope-status-panel {
    border-top: 5px solid #111827;
}

.ope-status-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.ope-status-light {
    width: 15px;
    height: 15px;
    border-radius: 50%;
}

.ope-status-light.is-online {
    background: #7ee000;
    animation: opePulseOnline 1.4s infinite;
}

.ope-status-light.is-offline {
    background: #dc2626;
    animation: opePulseOffline 1.4s infinite;
}

.ope-check-list {
    display: grid;
    gap: 9px;
}

.ope-check-row {
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 10px;
    align-items: center;
    padding: 11px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid rgba(15, 23, 42, .07);
}

.ope-check-icon {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-weight: 950;
}

.ope-check-row.is-ok .ope-check-icon {
    background: rgba(126, 224, 0, .16);
    color: #397700;
}

.ope-check-row.is-waiting .ope-check-icon {
    background: #e5e7eb;
    color: #6b7280;
}

.ope-check-row strong,
.ope-check-row small {
    display: block;
}

.ope-check-row strong {
    color: #111827;
    font-size: 13px;
}

.ope-check-row small {
    margin-top: 3px;
    color: #6b7280;
}

.ope-footer-mark {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid rgba(15, 23, 42, .1);
}

.ope-footer-mark strong,
.ope-footer-mark span,
.ope-footer-mark small {
    display: block;
}

.ope-footer-mark strong {
    color: #111827;
    font-size: 26px;
    letter-spacing: .08em;
}

.ope-footer-mark span {
    margin-top: 2px;
    color: #374151;
    font-weight: 900;
}

.ope-footer-mark small {
    margin-top: 4px;
    color: #6b7280;
    font-weight: 800;
}

.ope-footer-state {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    width: max-content;
    margin-top: 12px;
    padding: 7px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-style: normal;
    font-weight: 950;
    letter-spacing: .07em;
}

.ope-footer-state i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.ope-footer-state.is-online {
    background: rgba(126, 224, 0, .14);
    color: #2f6500;
}

.ope-footer-state.is-online i {
    background: #7ee000;
    animation: opePulseOnline 1.4s infinite;
}

.ope-footer-state.is-offline {
    background: rgba(220, 38, 38, .12);
    color: #991b1b;
}

.ope-footer-state.is-offline i {
    background: #dc2626;
    animation: opePulseOffline 1.4s infinite;
}

@media (prefers-reduced-motion: reduce) {
    .ope-online-badge i,
    .ope-status-light,
    .ope-footer-state i {
        animation: none !important;
    }
}

.final-system-job-panel {
    margin-top: 22px;
}

@media (max-width: 1180px) {
    .final-command-overview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .final-command-main-grid { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
    .final-command-hero,
    .final-next-action { flex-direction: column; align-items: stretch; }
    .final-command-hero-actions { justify-content: flex-start; }
    .final-command-card-grid,
    .final-command-status-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
    .final-command-overview-grid,
    .final-command-card-grid,
    .final-command-status-grid { grid-template-columns: 1fr; }
    .final-command-hero-actions .btn,
    .final-next-action .btn { width: 100%; }
}

/*
|--------------------------------------------------------------------------
| Formularafstande
|--------------------------------------------------------------------------
*/

.playmaster-create-form {
    row-gap: 16px;
}

.playmaster-create-form > div {
    min-width: 0;
}

.playmaster-create-form input[type="file"] {
    display: block;
    width: 100%;
    margin-bottom: 8px;
}

.playmaster-create-form > div:last-child {
    margin-top: 8px;
}

.login-submit-button {
    margin-top: 18px;
}

.login-card #password + .btn.primary {
    margin-top: 20px;
}

/********************************************************************************
*                    QUALIFICATIONMASTER LOGIN FLOW                             *
********************************************************************************/

.qualification-login-card {
    max-width: 380px;
}

.login-role-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    padding: 7px 13px;
    border: 1px solid rgba(126, 224, 0, 0.55);
    border-radius: 999px;
    background: rgba(126, 224, 0, 0.12);
    color: var(--accent-hover);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.qualification-login-intro {
    margin: 0 0 18px;
}

.qualification-login-card .login-submit-button {
    margin-top: 18px;
}

.qualification-login-help {
    display: grid;
    gap: 8px;
    text-align: center;
}

.qualification-login-help span {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.4;
}

.qualification-login-help a {
    color: var(--accent-hover);
    font-weight: 900;
    text-decoration: none;
}

.qualification-login-help a:hover {
    text-decoration: underline;
}

.qualification-login-card .alert {
    text-align: left;
    line-height: 1.45;
}

@media (max-width: 620px) {
    .qualification-login-card {
        padding: 24px 20px;
    }

    .login-role-label {
        font-size: 12px;
    }
}


/********************************************************************************
*                         LOGIN ROLE CHOICE MODAL                               *
********************************************************************************/

body.modal-open {
    overflow: hidden;
}

.login-choice-modal {
    padding: 20px;
    z-index: 5000;
}

.login-choice-card {
    position: relative;
    max-width: 460px;
    text-align: center;
}

.login-choice-close {
    position: absolute;
    top: 10px;
    right: 14px;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #ffffff;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
}

.login-choice-close:hover {
    color: var(--accent-hover);
}

.login-choice-logo-box {
    display: flex;
    justify-content: center;
    margin: 0 38px 10px;
}

.login-choice-logo {
    display: block;
    width: 300px;
    max-width: 100%;
    filter:
        drop-shadow(0 0 8px rgba(132, 204, 22, 0.35))
        drop-shadow(0 0 16px rgba(132, 204, 22, 0.20));
}

.login-choice-card h2 {
    margin: 0 0 8px;
    color: #ffffff;
    font-size: 29px;
    text-shadow: 0 0 8px rgba(96, 165, 250, 0.8);
}

.login-choice-intro {
    margin: 0 0 20px;
    color: var(--text-muted);
    line-height: 1.45;
}

.login-choice-options {
    display: grid;
    gap: 14px;
}

.login-choice-option {
    appearance: none;
    -webkit-appearance: none;
    display: grid;
    width: 100%;
    gap: 6px;
    padding: 18px;
    border: 1px solid rgba(132, 204, 22, 0.55);
    border-radius: 14px;
    background: rgba(132, 204, 22, 0.08);
    color: #ffffff;
    font: inherit;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition:
        border-color 0.18s ease,
        background-color 0.18s ease,
        box-shadow 0.18s ease,
        transform 0.18s ease;
}

.login-choice-option:hover,
.login-choice-option:focus-visible {
    border-color: var(--accent-hover);
    background: rgba(132, 204, 22, 0.16);
    box-shadow: 0 0 20px rgba(132, 204, 22, 0.20);
    transform: translateY(-1px);
    outline: none;
}

.login-choice-option strong {
    color: var(--accent-hover);
    font-size: 17px;
    font-weight: 900;
}

.login-choice-option span {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.45;
}

.login-choice-return {
    display: grid;
    gap: 7px;
    margin-top: 20px;
    text-align: center;
}

.login-choice-return span {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.4;
}

.login-choice-return a,
.login-choice-text-button {
    appearance: none;
    -webkit-appearance: none;
    display: inline;
    width: auto;
    min-width: 0;
    height: auto;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--accent-hover);
    font: inherit;
    font-weight: 900;
    line-height: 1.3;
    text-decoration: none;
    cursor: pointer;
    box-shadow: none;
}

.login-choice-return a:hover,
.login-choice-text-button:hover {
    color: var(--ui-green-hover);
    text-decoration: underline;
    transform: none;
}

@media (max-width: 620px) {
    .login-choice-modal {
        padding: 12px;
    }

    .login-choice-card {
        padding: 24px 18px;
    }

    .login-choice-card h2 {
        font-size: 25px;
    }

    .login-choice-option {
        padding: 16px;
    }
}
