/* =========================================================
   RECHERCHE APP — GUI FOUNDATION
   JW CHALLENGE 2027
   ========================================================= */


/* =========================================================
   BASIS
   ========================================================= */

:root {
    --bg: #111315;

    --surface: #191c1f;
    --surface-2: #202428;
    --surface-3: #282d31;

    --line: #353b40;
    --line-light: #454c52;

    --text: #f0f1ed;
    --text-muted: #9da3a5;
    --text-dim: #6f777b;

    --accent: #d5a84c;
    --accent-dark: #9f7a2d;

    --danger: #c85b52;
    --success: #62a77b;

    --radius: 8px;
    --radius-small: 5px;

    --header-height: 72px;
    --nav-height: 76px;
}


/* =========================================================
   RESET
   ========================================================= */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}


html,
body {
    width: 100%;
    height: 100%;
}


body {
    background: #080909;

    color: var(--text);

    font-family:
        Inter,
        "Segoe UI",
        Roboto,
        Arial,
        sans-serif;

    overflow: hidden;
}


/* =========================================================
   APP
   ========================================================= */

#app {
    width: 100%;
    height: 100%;
}


.screen {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;

    display: none;

    background: var(--bg);
}


.screen.active {
    display: flex;
}


.hidden {
    display: none !important;
}


/* =========================================================
   LOGIN
   ========================================================= */

#loginScreen {
    align-items: center;
    justify-content: center;

    background:
        radial-gradient(
            circle at 50% 35%,
            #292d30 0,
            #17191b 38%,
            #0c0d0e 75%
        );
}


    width: 62px;
    display: grid;

    margin: 0 auto 20px;

    display: flex;
    align-items: center;
    display: flex;
    align-items: center;
    gap: 10px;

    color: var(--accent);

    font-weight: 700;
}
.dashboard-legend-swatch {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    border: 3px solid #fff;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .35);
}

.dashboard-legend-swatch.player { background: #d5a84c; }
.dashboard-legend-swatch.team { background: #1976d2; }
.dashboard-legend-swatch.noc { background: #7b1fa2; }
.dashboard-legend-swatch.assignment { background: #d32f2f; }



.login-panel h1 {
    text-align: center;

    font-size: 21px;
    font-weight: 600;

    letter-spacing: 4px;
}


.login-subtitle {
    margin-top: 8px;

    color: var(--text-muted);

    text-align: center;

    font-size: 10px;

    letter-spacing: 3px;
}


.login-divider {
    height: 1px;

    margin: 28px 0;

    background: var(--line);
}


.login-label {
    margin-bottom: 10px;

    color: var(--text-dim);

    font-size: 8px;
    font-weight: 700;

    letter-spacing: 1.5px;
}


.role-buttons {
    display: flex;
    flex-direction: column;

    gap: 10px;
}


.role-button {
    width: 100%;

    display: flex;
    align-items: center;

    gap: 15px;

    padding: 16px;

    color: var(--text);

    background: var(--surface-2);

    border: 1px solid var(--line);

    border-radius: var(--radius-small);

    cursor: pointer;

    text-align: left;

    font-family: inherit;

    transition:
        background .15s ease,
        border-color .15s ease,
        transform .15s ease;
}


.role-button:hover {
    background: var(--surface-3);

    border-color: var(--line-light);
}


.role-button:active {
    transform: scale(.985);
}


.role-icon {
    width: 38px;
    height: 38px;

    flex: 0 0 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid var(--line-light);

    color: var(--accent);

    border-radius: 50%;

    font-size: 19px;
}


.role-button strong {
    display: block;

    font-size: 14px;
    font-weight: 600;
}


.role-button small {
    display: block;

    margin-top: 3px;

    color: var(--text-muted);

    font-size: 11px;
}


/* =========================================================
   APP SCREEN
   ========================================================= */

#appScreen {
    flex-direction: column;

    overflow: hidden;
}


.phone-frame {
    position: relative;

    width: 100%;
    height: 100%;

    display: flex;
    flex-direction: column;

    overflow: hidden;

    background: var(--bg);
}


/* =========================================================
   HEADER
   ========================================================= */

.app-header {
    flex: 0 0 var(--header-height);

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 18px;

    background: #151719;

    border-bottom: 1px solid var(--line);

    z-index: 20;
}


.header-left {
    display: flex;
    align-items: center;

    gap: 10px;
}


.header-logo {
    width: 31px;
    height: 31px;

    flex: 0 0 31px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid var(--accent);

    color: var(--accent);

    border-radius: 50%;

    font-size: 14px;
    font-weight: 700;
}


.header-title {
    display: flex;
    flex-direction: column;

    gap: 3px;

    font-size: 12px;
    font-weight: 700;

    letter-spacing: 2px;
}


.header-title span {
    color: var(--text-muted);

    font-size: 9px;
    font-weight: 400;

    letter-spacing: 1px;
}


.header-right {
    display: flex;
    align-items: center;

    gap: 12px;
}


.game-time {
    color: var(--text);

    font-family:
        "Courier New",
        monospace;

    font-size: 14px;
    font-weight: 600;
}


.connection-status {
    color: var(--success);

    font-size: 9px;
    font-weight: 600;

    white-space: nowrap;
}


/* =========================================================
   MAIN CONTENT
   ========================================================= */

/* De hoofdcontent moet tussen header en bottom-nav blijven. */
.app-main {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    overflow: hidden;
}

.app-content {
    position: relative;

    flex: 1;

    min-height: 0;

    overflow: hidden;
}


.view {
    position: absolute;

    inset: 0;

    display: none;

    padding: 20px;

    overflow-y: auto;
}


.view.active {
    display: flex;

    flex-direction: column;
}


.view::-webkit-scrollbar {
    width: 4px;
}


.view::-webkit-scrollbar-thumb {
    background: var(--line);
}


.view::-webkit-scrollbar-track {
    background: transparent;
}


/* =========================================================
   VIEW HEADER
   ========================================================= */

.view-header {
    flex: 0 0 auto;

    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    margin-bottom: 14px;
}


.view-header h2 {
    font-size: 21px;
    font-weight: 600;

    letter-spacing: -.2px;
}


.view-subtitle {
    display: block;

    margin-top: 4px;

    color: var(--text-muted);

    font-size: 9px;

    letter-spacing: 1px;
}


/* =========================================================
   MAP
   ========================================================= */
   
#map {
    touch-action: none;
}


/* =========================================================
   DASHBOARD
   ========================================================= */

body.dashboard-page {
    display: block;
    width: 100%;
    min-height: 100vh;
    overflow: hidden;
    background: var(--bg, #111315);
}

.dashboard-screen {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    background: var(--bg, #111315);
    color: var(--text, #f0f1ed);
}

.dashboard-header {
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    border-bottom: 1px solid var(--line, #353b40);
    background: rgba(17, 19, 21, 0.96);
}

.dashboard-title {
    display: flex;
    align-items: center;
    gap: 14px;
}

.dashboard-title-mark {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border: 1px solid var(--accent, #d5a84c);
    color: var(--accent, #d5a84c);
    font-weight: 700;
}

.dashboard-title h1 {
    margin: 0;
    font-size: 16px;
    letter-spacing: .12em;
}

.dashboard-title span {
    display: block;
    margin-top: 3px;
    color: var(--text-muted, #9da3a5);
    font-size: 11px;
    letter-spacing: .08em;
}

.dashboard-status {
    display: flex;
    align-items: center;
    gap: 18px;
    color: var(--text-muted, #9da3a5);
    font: 12px "Courier New", monospace;
}

.dashboard-status strong {
    color: var(--success, #62a77b);
}

.dashboard-main {
    height: calc(100vh - 72px);
    height: calc(100dvh - 72px);
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr);
    background: var(--bg, #111315);
}

.dashboard-map-panel {
    position: relative;
    min-width: 0;
    height: 100%;
    background: #111315;
}

.dashboard-map-panel #map {
    position: absolute;
    inset: 0;
}

.dashboard-map-label {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 20;
    padding: 8px 10px;
    background: rgba(17, 19, 21, 0.88);
    border: 1px solid rgba(53, 59, 64, 0.9);
    color: var(--text, #f0f1ed);
    font: 11px "Courier New", monospace;
    letter-spacing: .08em;
}

.dashboard-side {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--surface, #191c1f);
    border-left: 1px solid var(--line, #353b40);
    overflow: hidden;
}

.dashboard-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 14px 14px 10px;
    border-bottom: 1px solid var(--line, #353b40);
    background: var(--surface-2, #202428);
}

.dashboard-tab {
    padding: 10px 8px;
    background: transparent;
    border: 1px solid var(--line, #353b40);
    color: var(--text-muted, #9da3a5);
    font: 700 10px "Segoe UI", sans-serif;
    letter-spacing: .12em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all .15s ease;
}

.dashboard-tab.active {
    background: var(--accent, #d5a84c);
    color: #17191b;
    border-color: var(--accent, #d5a84c);
}

.dashboard-panel {
    padding: 14px;
    flex: 1;
    overflow: auto;
}

.dashboard-list {
    display: grid;
    gap: 8px;
}

.dashboard-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 11px;
    background: var(--surface-2, #202428);
    border: 1px solid var(--line, #353b40);
    font-size: 12px;
    color: var(--text, #f0f1ed);
}

.dashboard-row-button {
    width: 100%;
    color: inherit;
    text-align: left;
    font: inherit;
    cursor: pointer;
}

.dashboard-row-button:hover {
    border-color: var(--line-light, #454c52);
}

.dashboard-row-button.selected {
    border-color: var(--accent, #d5a84c);
}

.dashboard-message-composer {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--line, #353b40);
}

.dashboard-message-composer[hidden] {
    display: none;
}

.dashboard-message-heading {
    margin-bottom: 9px;
    color: var(--text-muted, #9da3a5);
    font: 700 10px "Segoe UI", sans-serif;
    letter-spacing: .1em;
}

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

.dashboard-message-form textarea {
    width: 100%;
    min-height: 72px;
    resize: vertical;
    padding: 9px 10px;
    border: 1px solid var(--line, #353b40);
    background: var(--bg, #111315);
    color: var(--text, #f0f1ed);
    font: 12px "Segoe UI", sans-serif;
}

.dashboard-message-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.dashboard-message-status {
    color: var(--text-muted, #9da3a5);
    font-size: 10px;
}

.dashboard-message-submit {
    padding: 8px 11px;
    border: 1px solid var(--accent, #d5a84c);
    background: var(--accent, #d5a84c);
    color: #17191b;
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
}

.dashboard-row-main {
    min-width: 0;
}

.dashboard-row-name {
    display: block;
    font-weight: 700;
}

.dashboard-row-meta {
    display: block;
    margin-top: 3px;
    color: var(--text-muted, #9da3a5);
    font-size: 10px;
}

.dashboard-state {
    flex: 0 0 auto;
    padding: 4px 6px;
    border: 1px solid var(--line-light, #454c52);
    color: var(--text-muted, #9da3a5);
    font: 10px "Courier New", monospace;
}

.dashboard-state.active {
    color: var(--success, #62a77b);
    border-color: var(--success, #62a77b);
}

.dashboard-state.alert {
    color: var(--danger, #c85b52);
    border-color: var(--danger, #c85b52);
}

.dashboard-empty {
    padding: 14px;
    color: var(--text-muted, #9da3a5);
    background: var(--surface-2, #202428);
    border: 1px dashed var(--line, #353b40);
    font-size: 11px;
}

.dashboard-legend-block {
    padding: 0 14px 14px;
    border-top: 1px solid var(--line, #353b40);
    background: var(--surface, #191c1f);
}

.dashboard-legend-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0 10px;
    color: var(--text-muted, #9da3a5);
    font: 700 10px "Segoe UI", sans-serif;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.dashboard-legend {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px 12px;
}

.dashboard-legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    color: var(--text-muted, #9da3a5);
    font-size: 11px;
}

.dashboard-legend-swatch {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    border: 3px solid #fff;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .35);
}

.dashboard-legend-swatch.player { background: #d5a84c; }
.dashboard-legend-swatch.team { background: #1976d2; }
.dashboard-legend-swatch.noc { background: #7b1fa2; }
.dashboard-legend-swatch.assignment { background: #d32f2f; }

.messages-list {
    display: grid;
    align-content: start;
    gap: 10px;
    padding: 14px;
}

.message-card,
.message-empty {
    padding: 12px;
    border: 1px solid var(--line, #353b40);
    background: var(--surface, #191c1f);
}

.message-card-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    color: var(--text, #f0f1ed);
    font-size: 12px;
}

.message-card-header time {
    color: var(--text-muted, #9da3a5);
    font: 10px "Courier New", monospace;
}

.message-card-body {
    margin-top: 8px;
    color: var(--text, #f0f1ed);
    font-size: 13px;
    line-height: 1.45;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.message-empty {
    color: var(--text-muted, #9da3a5);
    font-size: 12px;
}

#dashboardLogin[hidden],
#dashboardScreen[hidden] {
    display: none !important;
}

.dashboard-login {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background: var(--bg, #111315);
}

.dashboard-login-card {
    width: min(420px, 100%);
    padding: 28px;
    background: var(--surface, #191c1f);
    border: 1px solid var(--line, #353b40);
}

.dashboard-login-card .login-logo {
    margin-bottom: 24px;
}

.dashboard-login-card .login-panel {
    display: none;
}

.dashboard-login-card .login-panel.active {
    display: block;
}

.dashboard-login-card .login-choice-buttons {
    display: grid;
    gap: 10px;
}

.dashboard-login-card .login-choice-button,
.dashboard-login-card .login-submit-button,
.dashboard-login-card .login-back-button {
    width: 100%;
    cursor: pointer;
}

.dashboard-login-card .login-form {
    display: grid;
    gap: 10px;
}

.dashboard-login-card .login-form select,
.dashboard-login-card .login-form input {
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 900px) {
    body.dashboard-page {
        overflow: auto;
    }

    .dashboard-main {
        grid-template-columns: 1fr;
        min-height: calc(100vh - 72px);
    }

    .dashboard-map-panel {
        min-height: 52vh;
        height: 52vh;
    }

    .dashboard-screen {
        height: auto;
        min-height: 100vh;
    }
}

#mapView {
    padding: 0;
}


#mapView .view-header {
    position: absolute;

    top: 16px;
    left: 16px;

    z-index: 10;

    margin: 0;

    padding: 10px 13px;

    background: rgba(17, 19, 21, .88);

    border: 1px solid rgba(53, 59, 64, .9);

    border-radius: var(--radius);

    backdrop-filter: blur(8px);

    pointer-events: none;
}


#mapView .view-header h2 {
    font-size: 16px;
}


#mapView .view-subtitle {
    margin-top: 2px;
}


.map-container {
    position: relative;

    flex: 1;

    min-height: 0;

    width: 100%;

    overflow: hidden;

    background: #d8d4ca;
}


#map {
    position: absolute;

    inset: 0;

    width: 100%;
    height: 100%;
}


.map-controls {
    position: absolute;

    right: 12px;
    bottom: 54px;

    z-index: 10;

    display: flex;
    flex-direction: column;

    gap: 6px;
}


.player-coordinates {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 15;

    min-width: 120px;
    padding: 8px 10px;

    background: rgba(17, 19, 21, .88);
    border: 1px solid rgba(53, 59, 64, .9);
    border-radius: var(--radius);

    box-shadow: 0 10px 24px rgba(0, 0, 0, .25);
    backdrop-filter: blur(8px);
}


.player-coordinates-label {
    color: var(--text-muted);
    font-size: 9px;
    letter-spacing: 1.5px;
    margin-bottom: 4px;
}


.player-coordinates-value {
    color: var(--text);
    font-family: "Courier New", monospace;
    font-size: 11px;
    line-height: 1.45;
    font-weight: 700;
}


.map-control {
    width: 36px;
    height: 36px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: var(--text);

    background: rgba(17, 19, 21, .9);

    border: 1px solid var(--line);

    border-radius: var(--radius-small);

    cursor: pointer;

    font-family: inherit;

    font-size: 20px;

    backdrop-filter: blur(6px);

    transition:
        background .15s ease,
        border-color .15s ease;
}


.map-control:hover {
    background: var(--surface-3);

    border-color: var(--line-light);
}


.map-control:active {
    transform: scale(.95);
}


/* MapLibre attribution */

.maplibregl-ctrl-attrib {
    font-size: 8px !important;
}


.maplibregl-ctrl-attrib a {
    color: inherit;
}


/* =========================================================
   MAP STATUS
   ========================================================= */

.map-status {
    position: absolute;

    left: 12px;
    right: 12px;
    bottom: 10px;

    z-index: 10;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 7px 10px;

    color: var(--text-muted);

    background: rgba(17, 19, 21, .9);

    border: 1px solid var(--line);

    border-radius: var(--radius-small);

    font-size: 8px;

    pointer-events: none;

    backdrop-filter: blur(6px);
}


.map-status > div {
    display: flex;
    align-items: center;

    gap: 6px;

    color: var(--success);

    font-weight: 700;

    letter-spacing: 1px;
}


.status-dot {
    width: 6px;
    height: 6px;

    display: block;

    background: var(--success);

    border-radius: 50%;
}


/* =========================================================
   CONTENT STACK
   ========================================================= */

.content-stack {
    display: flex;
    flex-direction: column;

    gap: 10px;
}


.info-card,
.evidence-card,
.person-card,
.message-card {
    background: var(--surface);

    border: 1px solid var(--line);

    border-radius: var(--radius);
}


.info-card {
    padding: 17px;
}


.priority-card {
    border-left: 3px solid var(--accent);
}


.card-tag {
    color: var(--accent);

    font-size: 7px;
    font-weight: 700;

    letter-spacing: 1.2px;
}


.info-card h2 {
    margin-top: 7px;

    font-size: 16px;
    font-weight: 600;
}


.info-card p {
    margin-top: 7px;

    color: var(--text-muted);

    font-size: 12px;

    line-height: 1.5;
}


.card-header {
    display: flex;
    justify-content: space-between;
}


.card-status {
    color: var(--success);

    font-size: 8px;
    font-weight: 600;

    letter-spacing: 1px;
}


/* =========================================================
   EMPTY STATES
   ========================================================= */

.empty-state {
    flex: 1;

    min-height: 220px;

    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    padding: 30px;

    text-align: center;
}


.empty-icon {
    width: 54px;
    height: 54px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-bottom: 15px;

    color: var(--text-dim);

    border: 1px solid var(--line);

    border-radius: 50%;

    font-size: 22px;
}


.empty-state h3 {
    font-size: 14px;
    font-weight: 600;
}


.empty-state p {
    max-width: 260px;

    margin-top: 7px;

    color: var(--text-muted);

    font-size: 11px;

    line-height: 1.5;
}


/* =========================================================
   DOSSIER
   ========================================================= */

.evidence-card {
    display: flex;
    align-items: center;

    gap: 13px;

    padding: 13px;
}


.evidence-icon {
    width: 44px;
    height: 44px;

    flex: 0 0 44px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: var(--surface-3);

    border: 1px solid var(--line-light);

    color: var(--text-muted);

    border-radius: var(--radius-small);

    font-size: 7px;
    font-weight: 700;

    letter-spacing: .5px;
}


.evidence-content {
    min-width: 0;
}


.evidence-content h2 {
    margin-top: 4px;

    font-size: 13px;
    font-weight: 600;
}


.evidence-content p {
    margin-top: 3px;

    color: var(--text-muted);

    font-size: 10px;
}


/* =========================================================
   BERICHTEN
   ========================================================= */

.unread-count {
    min-width: 22px;
    height: 22px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: var(--surface-2);

    border: 1px solid var(--line);

    color: var(--text-muted);

    border-radius: 50%;

    font-size: 9px;
}


.messages-list {
    display: flex;
    flex-direction: column;

    gap: 10px;
}


.message-card {
    padding: 15px;
}


.message-meta {
    display: flex;
    justify-content: space-between;

    color: var(--text-dim);

    font-size: 7px;
    font-weight: 700;

    letter-spacing: 1px;
}


.message-card h2 {
    margin-top: 9px;

    font-size: 14px;
    font-weight: 600;
}


.message-card p {
    margin-top: 6px;

    color: var(--text-muted);

    font-size: 11px;

    line-height: 1.5;
}


.system-message {
    border-left: 3px solid var(--accent);
}


/* =========================================================
   PERSONEN
   ========================================================= */

.person-card {
    display: flex;
    align-items: center;

    gap: 12px;

    padding: 13px;
}


.person-avatar {
    width: 45px;
    height: 45px;

    flex: 0 0 45px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: var(--surface-3);

    border: 1px solid var(--line-light);

    color: var(--text-dim);

    border-radius: 50%;

    font-size: 17px;
}


.person-info {
    min-width: 0;
}


.person-info h2 {
    margin-top: 4px;

    font-size: 13px;
    font-weight: 600;
}


.person-info p {
    margin-top: 3px;

    color: var(--text-muted);

    font-size: 10px;
}


/* =========================================================
   BOTTOM NAVIGATIE
   ========================================================= */

.bottom-nav {
    flex: 0 0 var(--nav-height);

    display: flex;
    align-items: stretch;

    background: #151719;

    border-top: 1px solid var(--line);

    z-index: 20;
}


.nav-button {
    position: relative;

    flex: 1;

    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    gap: 5px;

    color: var(--text-dim);

    background: transparent;

    border: 0;

    cursor: pointer;

    font-family: inherit;

    font-size: 8px;

    transition: color .15s ease;
}


.nav-button:hover {
    color: var(--text-muted);
}


.nav-button.active {
    color: var(--accent);
}


.nav-button.active::before {
    content: "";

    position: absolute;

    top: -1px;
    left: 25%;
    right: 25%;

    height: 2px;

    background: var(--accent);
}


.nav-icon {
    font-size: 18px;

    line-height: 1;
}


/* =========================================================
   BUTTONS
   ========================================================= */

.primary-button {
    margin-top: 15px;

    padding: 10px 14px;

    color: #111315;

    background: var(--accent);

    border: 0;

    border-radius: var(--radius-small);

    font-size: 11px;
    font-weight: 700;

    cursor: pointer;
}


.primary-button:hover {
    background: #e0b75d;
}


/* =========================================================
   MOBIELE TELEFOONVORM
   ========================================================= */

@media (min-width: 601px) {

    body {
        display: flex;
        align-items: center;
        justify-content: center;

        background: #080909;
    }


    #app {
        position: relative;

        width: 390px;
        height: 844px;

        overflow: hidden;

        border: 9px solid #050505;

        border-radius: 40px;

        box-shadow:
            0 25px 70px rgba(0, 0, 0, .7),
            0 0 0 1px #333;
    }


    .screen {
        position: absolute;

        width: 100%;
        height: 100%;
    }


    #appScreen::before,
    #loginScreen::before {
        content: "";

        position: absolute;

        z-index: 1000;

        top: 0;
        left: 50%;

        width: 120px;
        height: 23px;

        transform: translateX(-50%);

        background: #050505;

        border-radius: 0 0 14px 14px;

        pointer-events: none;
    }

}


/* =========================================================
   KLEINERE TELEFOONS
   ========================================================= */

@media (max-width: 380px) {

    :root {
        --header-height: 66px;
        --nav-height: 70px;
    }


    .view {
        padding: 16px;
    }


    .view-header h2 {
        font-size: 19px;
    }


    .app-header {
        padding-left: 14px;
        padding-right: 14px;
    }


    .map-status {
        left: 10px;
        right: 10px;
    }


    .map-controls {
        right: 10px;
    }

}


/* =========================================================
   TOEGANKELIJKHEID / INTERACTIE
   ========================================================= */

button {
    font-family: inherit;

    -webkit-tap-highlight-color: transparent;
}


button:focus-visible {
    outline: 2px solid var(--accent);

    outline-offset: 2px;
}


::selection {
    color: #111315;

    background: var(--accent);
}


/* =========================================================
   LOGIN MODULE
   JW CHALLENGE 2027
   ========================================================= */


/* ---------------------------------------------------------
   LOGIN PANELEN
   --------------------------------------------------------- */

.login-panel {
    display: none;
    width: 100%;
    max-width: 360px;
    flex-direction: column;
    align-items: center;
}

.login-panel.active {
    display: block;
}


/* ---------------------------------------------------------
   LOGIN KEUZE
   --------------------------------------------------------- */

.login-choice-buttons {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 32px;
}


.login-choice-button {
    width: 100%;
    padding: 18px 20px;

    border: 1px solid var(--line);
    border-radius: 8px;

    background: var(--surface-2);
    color: var(--text);

    text-align: left;
    cursor: pointer;

    transition:
        border-color 0.15s ease,
        background 0.15s ease,
        transform 0.15s ease;
}


.login-choice-button:hover {
    border-color: var(--accent);
    background: var(--surface-3);
}


.login-choice-button:active {
    transform: scale(0.98);
}


.login-choice-title {
    display: block;

    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.08em;

    color: var(--accent);
}


.login-choice-description {
    display: block;

    margin-top: 5px;

    font-size: 12px;
    color: var(--text-muted);
}


/* ---------------------------------------------------------
   LOGIN FORMULIER
   --------------------------------------------------------- */

.login-form {
    width: 100%;
    display: flex;
    flex-direction: column;

    margin-top: 30px;
}


.login-form label {
    margin-bottom: 7px;

    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;

    color: var(--text-muted);
}


.login-input {
    width: 100%;
    height: 46px;

    margin-bottom: 18px;
    padding: 0 12px;

    box-sizing: border-box;

    border: 1px solid var(--line);
    border-radius: 6px;

    background: var(--surface-2);
    color: var(--text);

    font-family: inherit;
    font-size: 14px;

    outline: none;
}


.login-input:focus {
    border-color: var(--accent);
}


.login-input::placeholder {
    color: var(--text-muted);
}


/* ---------------------------------------------------------
   LOGIN KNOP
   --------------------------------------------------------- */

.login-submit-button {
    width: 100%;
    height: 46px;

    margin-top: 4px;

    border: 1px solid var(--accent);
    border-radius: 6px;

    background: var(--accent);
    color: #111;

    font-family: inherit;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;

    cursor: pointer;

    transition:
        background 0.15s ease,
        transform 0.15s ease;
}


.login-submit-button:hover {
    background: #d8b45a;
}


.login-submit-button:active {
    transform: scale(0.98);
}


/* ---------------------------------------------------------
   TERUG-KNOP
   --------------------------------------------------------- */

.login-back-button {
    margin-top: 18px;

    border: 0;
    background: transparent;

    color: var(--text-muted);

    font-family: inherit;
    font-size: 12px;

    cursor: pointer;
}


.login-back-button:hover {
    color: var(--text);
}


/* ---------------------------------------------------------
   FOUTMELDING
   --------------------------------------------------------- */

.login-error {
    min-height: 18px;

    margin-top: -6px;
    margin-bottom: 8px;

    color: var(--danger);

    font-size: 12px;
}


/* ---------------------------------------------------------
   SELECT
   --------------------------------------------------------- */

.login-input option {
    background: #111;
    color: var(--text);
}

/* =========================================================
   LOGIN — RECHERCHE / DOSSIER STYLE
   ========================================================= */

#loginScreen {
    position: relative;
    overflow: hidden;
}

/* Subtiele achtergrondstructuur */
#loginScreen::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;

    background:
        linear-gradient(
            90deg,
            transparent 49.8%,
            rgba(213,168,76,.035) 50%,
            transparent 50.2%
        ),
        linear-gradient(
            0deg,
            transparent 49.8%,
            rgba(213,168,76,.025) 50%,
            transparent 50.2%
        );

    background-size: 80px 80px;
    opacity: .35;
}

/* Login inhoud boven de achtergrondlaag */
#loginScreen > * {
    position: relative;
    z-index: 2;
}

/* Hoofdlogo */
#loginScreen .app-logo {
    width: 72px;
    height: 72px;

    margin-bottom: 22px;

    border: 1px solid var(--accent);
    border-radius: 50%;

    color: var(--accent);

    font-size: 30px;
    font-weight: 600;

    box-shadow:
        0 0 0 6px rgba(213,168,76,.035),
        0 0 30px rgba(213,168,76,.08);
}

/* Titel */
#loginScreen .login-panel h1 {
    font-size: 24px;
    font-weight: 500;

    letter-spacing: 7px;

    text-transform: uppercase;
}

/* Kleine ondertitel */
#loginScreen .login-subtitle {
    margin-top: 9px;

    color: var(--text-dim);

    font-size: 9px;
    letter-spacing: 3px;
}

/* Lijn onder de titel */
#loginScreen .login-divider {
    width: 100%;
    height: 1px;

    margin: 26px 0 22px;

    background:
        linear-gradient(
            90deg,
            transparent,
            var(--line-light),
            transparent
        );
}

/* Label */
#loginScreen .login-label {
    color: var(--text-dim);

    font-size: 8px;
    letter-spacing: 2px;

    text-transform: uppercase;
}

/* Team / NOC keuzes */
#loginScreen .login-choice-buttons {
    margin-top: 18px;
    gap: 10px;
}

/* Knoppen */
#loginScreen .login-choice-button {
    position: relative;

    padding: 17px 18px;

    background: rgba(32,36,40,.72);

    border: 1px solid var(--line);
    border-radius: 5px;

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.025);

    transition:
        border-color .2s ease,
        background .2s ease,
        transform .15s ease,
        box-shadow .2s ease;
}

/* Gouden accent aan de linkerkant */
#loginScreen .login-choice-button::before {
    content: "";

    position: absolute;
    left: -1px;
    top: 10px;
    bottom: 10px;

    width: 2px;

    background: var(--accent);

    opacity: .45;

    transition: opacity .2s ease;
}

#loginScreen .login-choice-button:hover {
    background: rgba(40,45,49,.95);

    border-color: var(--line-light);

    box-shadow:
        0 8px 25px rgba(0,0,0,.25);
}

#loginScreen .login-choice-button:hover::before {
    opacity: 1;
}

#loginScreen .login-choice-button:active {
    transform: scale(.985);
}

/* Titel Team / NOC */
#loginScreen .login-choice-title {
    font-size: 14px;
    font-weight: 700;

    letter-spacing: 2px;
}

/* Beschrijving */
#loginScreen .login-choice-description {
    margin-top: 5px;

    color: var(--text-dim);

    font-size: 9px;
    letter-spacing: 1px;
}

/* Formulier iets strakker */
#loginScreen .login-form {
    margin-top: 24px;
}

#loginScreen .login-input {
    height: 44px;

    background: rgba(32,36,40,.8);

    border-color: var(--line);

    border-radius: 5px;
}

#loginScreen .login-input:focus {
    border-color: var(--accent);

    box-shadow:
        0 0 0 2px rgba(213,168,76,.08);
}

/* Inlogknop */
#loginScreen .login-submit-button {
    height: 44px;

    margin-top: 8px;

    background: var(--accent);

    border: 1px solid var(--accent);

    border-radius: 5px;

    letter-spacing: 2px;

    box-shadow:
        0 6px 20px rgba(0,0,0,.25);
}

/* Terug */
#loginScreen .login-back-button {
    font-size: 10px;
    letter-spacing: 1px;
}

/* =========================================================
   ROLGEBASEERDE NAVIGATIE
   ========================================================= */

.noc-nav {
    display: none;
}

.team-nav {
    display: flex;
}


/* =========================================================
   NOC PLACEHOLDER PANEL
   ========================================================= */

.placeholder-panel {
    margin: 16px;
    padding: 20px;

    border: 1px solid var(--line);
    border-radius: 14px;

    background: var(--surface);

    text-align: left;
}

.placeholder-panel strong {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    letter-spacing: 0.08em;
}

.placeholder-panel p {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.5;
}

/* =========================================================
   FIX — TEAM LOGIN + MAP LAYOUT
   ========================================================= */

.login-choice-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.login-choice-button {
    width: 100%;
}

.map-wrapper {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    background: #d8d4ca;
}

#mapView {
    padding: 0;
}

#mapView .map {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

#mapView .map-overlay-top {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 10;
}

#mapView .map-controls {
    position: absolute;
    right: 12px;
    bottom: 54px;
    top: auto;
    z-index: 20;
}

#mapView .map-gps-status {
    position: absolute;
    left: 12px;
    bottom: 10px;
    z-index: 10;
    padding: 7px 10px;
    color: var(--text-muted);
    background: rgba(17, 19, 21, .90);
    border: 1px solid var(--line);
    border-radius: var(--radius-small);
    font-size: 8px;
    letter-spacing: 1px;
    pointer-events: none;
    backdrop-filter: blur(6px);
}

#mapView .map-gps-status[data-state="active"] .status-dot {
    background: var(--success);
}

#mapView .map-gps-status[data-state="error"] .status-dot {
    background: var(--danger);
}

#mapView .map-status {
    position: static;
    display: flex;
    align-items: center;
    gap: 7px;
    width: auto;
    padding: 7px 10px;
    color: var(--text-muted);
    background: rgba(17, 19, 21, .90);
    border: 1px solid var(--line);
    border-radius: var(--radius-small);
    font-size: 8px;
}

#mapView .map-status-dot {
    width: 6px;
    height: 6px;
    display: inline-block;
    background: var(--success);
    border-radius: 50%;
}

.login-container {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

#loginChoice,
#teamLoginPanel {
    margin: 0;
}

/* =========================================================
   OSM KAART — geïntegreerde browser
   ========================================================= */
#map {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #d8d4ca;
}

.osm-tile-layer {
    position: absolute;
    pointer-events: none;
}

.osm-tile {
    position: absolute;
    width: 256px;
    height: 256px;
    display: block;
    user-select: none;
}

.player-marker {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 18px;
    height: 18px;
    margin-left: -9px;
    margin-top: -9px;
    border-radius: 50%;
    background: #d5a84c;
    border: 3px solid #111315;
    box-shadow: 0 1px 5px rgba(0,0,0,.55);
    z-index: 8;
    pointer-events: none;
}

.map-attribution-local {
    position: absolute;
    right: 4px;
    bottom: 4px;
    z-index: 9;
    padding: 2px 5px;
    color: #333;
    background: rgba(255,255,255,.75);
    font-size: 8px;
    pointer-events: none;
}


/* =========================================================
   JW CHALLENGE 2027 — GAME MARKERS
   Toevoeging op bestaande v5 CSS
   ========================================================= */

/* Alleen nodig voor slepen in Device Emulation */
#map {
    touch-action: none;
}


/* ---------------------------------------------------------
   ALGEMENE GAME MARKER
   --------------------------------------------------------- */

.game-marker {
    position: absolute;

    width: 22px;
    height: 22px;

    margin-left: -11px;
    margin-top: -11px;

    border-radius: 50%;
    border: 3px solid #ffffff;

    box-shadow:
        0 2px 6px rgba(0, 0, 0, 0.45);

    z-index: 15;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 0;

    cursor: default;
}


/* ---------------------------------------------------------
   TEAM
   --------------------------------------------------------- */

.game-marker-team {
    background: #1976d2;
}


/* ---------------------------------------------------------
   NOC
   --------------------------------------------------------- */

.game-marker-noc {
    background: #7b1fa2;
}


/* ---------------------------------------------------------
   OPDRACHT
   --------------------------------------------------------- */

.game-marker-opdracht {
    background: #d32f2f;
    cursor: pointer;
}

.game-marker-opdracht:hover {
    transform: scale(1.15);
}


/* ---------------------------------------------------------
   DEFAULT
   --------------------------------------------------------- */

.game-marker-default {
    background: #555555;
}


/* ---------------------------------------------------------
   LABEL
   --------------------------------------------------------- */

.game-marker-label {
    position: absolute;

    left: 50%;
    top: 28px;

    transform: translateX(-50%);

    white-space: nowrap;

    padding: 4px 7px;

    border-radius: 4px;

    background: rgba(0, 0, 0, 0.78);
    color: #ffffff;

    font-size: 12px;
    line-height: 1.2;
    font-weight: 600;

    pointer-events: none;

    box-shadow:
        0 1px 4px rgba(0, 0, 0, 0.3);
}