﻿@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');

html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #0071c1;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.content {
    padding-top: 1.1rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}




#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }


/* ── Public layout ─────────────────────────────────── */
.pub-navbar {
    background: #1a3a5c;
    padding: 0.55rem 1.2rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.pub-nav-inner {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    max-width: 1500px;
    margin: 0 auto;
}

.pub-nav-home {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    opacity: 0.7;
    transition: opacity 0.15s;
}

.pub-nav-home:hover {
    opacity: 1;
}

.login-layout-teamio {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 5px;
    color: rgba(255,255,255,0.35);
    font-size: 0.75rem;
    text-decoration: none;
    transition: color 0.15s;
}
.login-layout-teamio:hover { color: rgba(255,255,255,0.7); }
.login-layout-teamio img {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    opacity: 0.45;
}
.login-layout-teamio:hover img { opacity: 0.8; }

.pub-nav-home-logo {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: block;
}

.pub-brand {
    color: #fff;
    font-size: 1.15rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    letter-spacing: 0.02em;
}

.pub-nav-links {
    display: flex;
    gap: 0.2rem;
    flex: 1;
}

.pub-nav-item {
    display: flex;
    align-items: center;
}

.pub-home-star {
    background: none;
    border: none;
    color: rgba(255,255,255,0.25);
    font-size: 0.68rem;
    line-height: 1;
    padding: 0 2px 0 1px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s, color 0.15s;
    flex-shrink: 0;
}

.pub-nav-item:hover .pub-home-star {
    opacity: 1;
}

.pub-home-star:hover {
    color: rgba(255,255,255,0.75);
}

.pub-home-star--set {
    color: #ffd700 !important;
    opacity: 1 !important;
}

.pub-nav-link {
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    padding: 0.3rem 0.85rem;
    border-radius: 5px;
    font-size: 0.9rem;
    transition: background 0.15s, color 0.15s;
}

.pub-nav-link:hover {
    color: #fff;
    background: rgba(255,255,255,0.12);
}

.pub-nav-link.active {
    color: #fff;
    background: rgba(255,255,255,0.18);
    font-weight: 600;
}

.pub-nav-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}

.pub-btn-install {
    background: rgba(255,255,255,0.12);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.35);
    border-radius: 5px;
    padding: 0.28rem 0.9rem;
    font-size: 0.87rem;
    transition: background 0.15s;
    cursor: pointer;
}
.pub-btn-install:hover { background: rgba(255,255,255,0.22); }

.pub-btn-login {
    background: rgba(255,255,255,0.12);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.35);
    border-radius: 5px;
    padding: 0.28rem 0.9rem;
    font-size: 0.87rem;
    text-decoration: none;
    transition: background 0.15s;
    cursor: pointer;
}

.pub-btn-login:hover {
    background: rgba(255,255,255,0.22);
    color: #fff;
}

.pub-admin-dropdown {
    position: relative;
}

.pub-admin-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 190px;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.13);
    z-index: 400;
    overflow: hidden;
}

.pub-admin-dropdown--open .pub-admin-menu {
    display: flex;
    flex-direction: column;
}

.pub-admin-item {
    padding: 9px 16px;
    font-size: 0.9rem;
    color: #1f2937;
    text-decoration: none;
    transition: background 0.1s;
}

.pub-admin-item:hover {
    background: #f3f4f6;
    color: #111;
}

.pub-user-name {
    color: rgba(255,255,255,0.75);
    font-size: 0.82rem;
    padding: 0.28rem 0.4rem;
}

.pub-superadmin-badge {
    background: rgba(255, 200, 0, 0.18);
    border: 1px solid rgba(255, 200, 0, 0.4);
    border-radius: 4px;
    color: #ffe066;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    padding: 0.15rem 0.5rem;
}

.pub-btn-logout {
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.6);
    font-size: 0.87rem;
    cursor: pointer;
    padding: 0.28rem 0.6rem;
    border-radius: 4px;
}

.pub-btn-logout:hover {
    color: #fff;
    background: rgba(255,255,255,0.1);
}

/* Hamburger – hidden on desktop, shown on mobile */
.pub-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    margin-left: auto;
    flex-shrink: 0;
}

.pub-hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: rgba(255,255,255,0.85);
    border-radius: 2px;
    transition: transform 0.2s, opacity 0.2s;
}

.pub-hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.pub-hamburger.is-open span:nth-child(2) { opacity: 0; }
.pub-hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Collapse wrapper – inline flex on desktop */
.pub-nav-collapse {
    display: flex;
    align-items: center;
    flex: 1;
    gap: 1rem;
}

.pub-content {
    padding: 1.2rem 1.2rem 2rem;
    max-width: 1500px;
    margin: 0 auto;
}

/* ── Guest / other-team tag (global — used in Lagstyring & Lagoppsett) ── */
.lo-guest-team-tag {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.66rem;
    font-weight: 600;
    color: #4a6285;
    background: #eef3fb;
    border: 1px solid #d4e0f0;
    border-radius: 11px;
    padding: 1px 8px 1px 6px;
    margin-left: 7px;
    vertical-align: middle;
    line-height: 1.55;
    letter-spacing: 0.01em;
    white-space: nowrap;
}
.lo-guest-team-tag::before {
    content: "";
    display: inline-block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #6f93c4;
    flex-shrink: 0;
}

/* ── Calendar base ───────────────────────── */

.pub-cal-wrapper {
    border-radius: 10px;
    overflow: hidden; /* fallback for browsers without clip support */
    overflow: clip;   /* clips to border-radius without creating a scroll container */
    border: 1px solid #e5e7eb;
    background: #fff;
}

/* ── Locked-scroll layout when on the calendar page ── */
body.cal-page {
    height: 100vh;
    height: 100svh;
    overflow: hidden;
    overscroll-behavior: none;   /* prevent iOS rubber-band on body */
    display: flex;
    flex-direction: column;
}
body.cal-page .pub-navbar {
    flex: 0 0 auto;
}
body.cal-page .pub-content {
    flex: 1 1 0;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding-top: 0;       /* remove top gap between navbar and controls */
    padding-bottom: 0;
}
body.cal-page .cal-sticky-controls {
    flex: 0 0 auto;
    padding-top: 0.4rem;    /* was 0.75rem */
    padding-bottom: 0.4rem; /* was 0.6rem  */
    margin-bottom: 0;       /* was 0.5rem  */
}
body.cal-page .pub-cal-wrapper {
    flex: 1 1 0;
    min-height: 0;
    border-radius: 10px 10px 0 0;
    /* make wrapper a flex column so the scroll container can flex-fill remaining height */
    display: flex;
    flex-direction: column;
}
body.cal-page .pub-cal-scroll,
body.cal-page .pub-grid-scroll {
    max-height: none !important;
}
body.cal-page .pub-grid-scroll {
    flex: 1 1 0;         /* fill remaining height inside .pub-cal-wrapper */
    min-height: 0;
    height: auto;
    overflow-x: auto;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}
@media (max-width: 600px) {
    body.cal-page .cal-sticky-controls {
        margin-bottom: 0;
    }
    body.cal-page .pub-cal-wrapper {
        border-radius: 0;
    }
}

/* IMPORTANT: equal width columns */
.pub-cal-table {
    table-layout: fixed;
    width: 100%;
    border-collapse: collapse;
}

    /* Base cells */
    .pub-cal-table th,
    .pub-cal-table td {
        padding: 3px 4px;
        height: 30px;
        font-size: 0.78rem;
        vertical-align: top;
        border-right: 1px solid #e5e7eb;
        border-bottom: 1px solid #f1f3f5;
    }

        /* Remove last border */
        .pub-cal-table th:last-child,
        .pub-cal-table td:last-child {
            border-right: none;
        }

    /* Header */
    .pub-cal-table thead th {
        background: #f8fafc;
        font-weight: 600;
        text-align: center;
    }

/* Day header */
.pub-day-header {
    width: calc(100% / 7);
}

    /* Today highlight */
    .pub-day-header.today {
        background: #e7f1ff !important;
        color: #0d6efd;
    }

.cal-day-summary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 3px;
    padding: 1px 6px;
    font-size: 0.7rem;
    line-height: 1.4;
    background: none;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    color: #6c757d;
    cursor: pointer;
    transition: background 0.12s, color 0.12s, border-color 0.12s;
}

.cal-day-summary-btn:hover {
    background: #f0f4ff;
    border-color: #0d6efd;
    color: #0d6efd;
}

.pub-day-header.today .cal-day-summary-btn {
    border-color: #93bcfd;
    color: #0d6efd;
}

/* ── Day summary modal ──────────────────────────────────────────────── */
.cal-day-dialog {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 520px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.cal-day-dialog-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.1rem;
    border-bottom: 1px solid #e9ecef;
    background: #f0f4ff;
    flex-shrink: 0;
}

.cal-day-section {
    margin-bottom: 1rem;
}

.cal-day-section:last-child {
    margin-bottom: 0;
}

.cal-day-section-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6c757d;
    margin-bottom: 0.35rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid #f0f0f0;
}

.cal-day-item {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    padding: 0.2rem 0;
    font-size: 0.875rem;
    border-bottom: 1px solid #f8f8f8;
}

.cal-day-item:last-child {
    border-bottom: none;
}

.cal-day-time {
    font-variant-numeric: tabular-nums;
    font-size: 0.8rem;
    color: #6c757d;
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 3.2rem;
}

.cal-day-part {
    font-size: 0.75rem;
    color: #adb5bd;
    background: #f1f3f5;
    border-radius: 3px;
    padding: 0 4px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Time column */
.pub-time-col {
    width: 60px !important;
    min-width: 60px;
    max-width: 60px;
    text-align: right;
    background: #fafafa !important;
    font-size: 0.72rem;
    color: #6c757d;
    border-right: 2px solid #dee2e6 !important;
}

/* Sub field headers (A/B) */
.pub-part-header {
    font-size: 0.7rem;
    background: #f1f3f5;
}

/* Empty cells */
.pub-cal-free {
    background: #fff;
}

/* ── Admin interactions ─────────────────────── */

/* Match cells get pointer + hover ring */
.pub-cal-editable {
    cursor: pointer;
}

.pub-cal-match.pub-cal-editable .pub-match-card:hover {
    box-shadow: 0 0 0 2px #0d6efd;
    cursor: pointer;
}

/* Edit hint icon inside match card */
.cal-edit-hint {
    position: absolute;
    top: 4px;
    right: 6px;
    font-size: 0.7rem;
    opacity: 0.5;
}

.pub-match-card {
    position: relative;
}

.pub-match-card:hover .cal-edit-hint {
    opacity: 1;
}

/* ── Sticky controls wrapper ────────────────── */
.cal-sticky-controls {
    position: sticky;
    top: 2.75rem;          /* sits just below the navbar */
    z-index: 50;
    background: #fff;
    padding-bottom: 0.6rem;
    margin-bottom: 0.5rem;
    box-shadow: 0 3px 8px rgba(0,0,0,0.06);
    /* extend to full width of pub-content so shadow spans the layout */
    margin-left: -1.2rem;
    margin-right: -1.2rem;
    padding-left: 1.2rem;
    padding-right: 1.2rem;
    padding-top: 0.75rem;
}

/* ── Toolbar right group ────────────────────── */
.pub-toolbar-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ── Edit mode toggle ───────────────────────── */
.cal-edit-toggle {
    background: #fff;
    border: 1px solid #dee2e6;
    color: #6c757d;
    border-radius: 6px;
    padding: 0.28rem 0.85rem;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.cal-edit-toggle:hover {
    background: #f0f4ff;
    color: #0d6efd;
    border-color: #93c5fd;
}

.cal-edit-toggle--on {
    background: #0d6efd;
    border-color: #0d6efd;
    color: #fff;
    font-weight: 600;
}

.cal-edit-toggle--on:hover {
    background: #0b5ed7;
    border-color: #0b5ed7;
    color: #fff;
}

.cal-undo-btn {
    background: #fff;
    border: 1px solid #fd7e14;
    color: #fd7e14;
    border-radius: 6px;
    padding: 0.3rem 0.75rem;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.cal-undo-btn:hover {
    background: #fd7e14;
    color: #fff;
}

/* ── Booking bar ────────────────────────────── */
.cal-booking-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    transition: border-color 0.15s, background 0.15s;
}

.cal-booking-bar--active {
    background: #eff6ff;
    border-color: #93c5fd;
}

.cal-team-select {
    max-width: 180px;
}

.cal-enddate {
    max-width: 150px;
}

.cal-recurring-label {
    display: flex;
    align-items: center;
    white-space: nowrap;
    color: #374151;
    margin: 0;
    cursor: pointer;
    user-select: none;
}

.cal-booking-hint {
    color: #94a3b8;
    font-size: 0.8rem;
    margin-left: 0.25rem;
}

.cal-book-btn {
    background: #0d6efd;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 0.3rem 0.9rem;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.cal-book-btn:hover:not(:disabled) {
    background: #0b5ed7;
}

.cal-book-btn:disabled {
    opacity: 0.5;
    cursor: default;
}

.cal-cancel-btn {
    background: transparent;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 0.3rem 0.75rem;
    font-size: 0.85rem;
    color: #6c757d;
    cursor: pointer;
    transition: background 0.15s;
}

.cal-cancel-btn:hover {
    background: #f1f3f5;
}

/* ── Picked-up cell (being moved) ───────────── */
.pub-cal-picked {
    outline: 3px dashed #0d6efd !important;
    outline-offset: -3px;
    opacity: 0.65;
}

/* ── Drop-zone free cell ─────────────────────── */
.pub-cal-dropzone {
    background: #eff6ff !important;
    cursor: pointer;
    text-align: center;
    vertical-align: middle;
}

.pub-cal-dropzone:hover {
    background: #dbeafe !important;
}

.cal-drop-arrow {
    color: #3b82f6;
    font-size: 1rem;
    line-height: 1;
}

/* ── Pick-up status bar ──────────────────────── */
.cal-pickup-bar {
    background: #eff6ff;
    border-color: #bfdbfe;
}

/* ── Selectable free cells (booking mode) ───── */
.pub-cal-selectable {
    cursor: pointer;
    transition: background 0.1s;
}

.pub-cal-selectable:hover {
    background: #f0f4ff !important;
}

.pub-cal-sel {
    background: #dbeafe !important;
    text-align: center;
    vertical-align: middle;
}

.cal-sel-mark {
    color: #2563eb;
    font-size: 0.8rem;
    font-weight: 700;
}

/* ── Delete button on booked cells ──────────── */
.pub-booked-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2px;
}

.cal-del-btn {
    background: none;
    border: none;
    color: rgba(0,0,0,0.4);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1;
    padding: 0 1px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.12s, color 0.12s;
    flex-shrink: 0;
}

.pub-cal-booked:hover .cal-del-btn {
    opacity: 1;
}

.cal-del-btn:hover {
    color: #dc2626 !important;
}

/* Match edit panel */
.cal-edit-panel {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.45rem 0.75rem;
    font-size: 0.875rem;
}

.cal-edit-label {
    font-weight: 600;
    color: #334155;
    white-space: nowrap;
}

.cal-pickup-bar {
    background: #eff6ff;
    border-color: #bfdbfe;
}

/* Row hover */
.pub-cal-table tbody tr:hover td {
    background: #f8f9fa;
}

/* ── MATCH BLOCK (fixed height behavior) ───────────────── */

.pub-cal-match {
    padding: 0 !important;
    background: transparent !important;
}

/* Match card fills full rowspan height */
.pub-match-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #e7f1ff;
    border-left: 4px solid #0d6efd;
    border-radius: 6px;
    padding: 6px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    transition: 0.15s ease;
}

    .pub-match-card:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 8px rgba(0,0,0,0.08);
    }

/* Title */
.pub-match-title {
    font-weight: 600;
    font-size: 0.78rem;
    line-height: 1.2;
}

    .pub-match-title span {
        font-weight: 400;
        color: #6c757d;
        margin: 0 3px;
    }

/* Time */
.pub-match-time {
    font-size: 0.72rem;
    color: #0d6efd;
    font-weight: 600;
    margin-top: 3px;
}

/* ── BOOKINGS ───────────────── */

.pub-cal-booked {
    font-size: 0.7rem;
    font-weight: 600;
    border-left: 3px solid rgba(0,0,0,0.2);
}

/* ── Calendar toolbar ───────────────────────────────── */

.pub-cal-toolbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.6rem;
    flex-wrap: wrap;
}

/* ── Field tabs ── */

.pub-field-tabs {
    display: flex;
    border-bottom: 2px solid #dee2e6;
    gap: 0;
}

.pub-field-tab {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    padding: 0.45rem 1.2rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #6c757d;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.15s, border-color 0.15s;
}

.pub-field-tab:hover {
    color: #0d6efd;
    border-bottom-color: #93c5fd;
}

.pub-field-tab.active {
    color: #0d6efd;
    font-weight: 600;
    border-bottom-color: #0d6efd;
}

/* ── Week controls ── */

.pub-week-controls {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.3rem 0.45rem;
}

.pub-nav-arrow {
    background: none;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    color: #495057;
    flex-shrink: 0;
    transition: background 0.15s, color 0.15s;
}

.pub-nav-arrow:hover {
    background: #e9ecef;
    color: #212529;
}

.pub-week-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 190px;
    padding: 0 0.25rem;
}

.pub-week-num {
    font-size: 0.65rem;
    color: #94a3b8;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    line-height: 1;
}

.pub-week-range {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
    line-height: 1.4;
}

.pub-today-btn {
    background: #fff;
    border: 1px solid #0d6efd;
    color: #0d6efd;
    border-radius: 6px;
    padding: 0.25rem 0.7rem;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
}

.pub-today-btn:hover {
    background: #e7f1ff;
}

.pub-toggle-check {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: #6c757d;
    cursor: pointer;
    white-space: nowrap;
    user-select: none;
}

.pub-toggle-check input[type="checkbox"] {
    cursor: pointer;
    accent-color: #0d6efd;
    width: 15px;
    height: 15px;
}

/* ── Treningsplan ────────────────────────────────── */
.tp-grid {
    min-width: 600px;
    font-size: 0.82rem;
}

.tp-grid th,
.tp-grid td {
    padding: 3px 6px;
    height: 28px;
    vertical-align: middle;
}

.tp-time-col {
    width: 56px;
    text-align: right;
    white-space: nowrap;
    background: #f8f9fa !important;
    font-size: 0.75rem;
    color: #6c757d;
    border-right: 2px solid #dee2e6 !important;
}

.tp-part-header {
    color: #495057;
    border-left: 4px solid #0d6efd;
    padding-left: 0.5rem;
    margin-top: 1rem;
}

.tp-day-badge {
    font-size: 0.65rem !important;
    vertical-align: middle;
}

.tp-clickable { cursor: pointer; }

/* Cell contains stacked part rows */
.tp-cell {
    padding: 0 !important;
    vertical-align: top;
}

/* One mini-row per field part inside a cell */
.tp-part-row {
    display: flex;
    align-items: center;
    padding: 2px 6px;
    min-height: 24px;
    font-size: 0.75rem;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    user-select: none;
}

.tp-part-row:last-child {
    border-bottom: none;
}

.tp-part-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: #6c757d;
    min-width: 18px;
}

.tp-booked { background: #d1e7dd; }
.tp-booked:hover { background: #b7d8c9; }

.tp-other { background: #fff3cd; cursor: default; }
.tp-other-name { font-size: 0.68rem; color: #7a5800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 80px; }

.tp-selected { background: #cfe2ff; color: #0a58ca; font-weight: 600; }
.tp-selected:hover { background: #b8d4ff; }

.tp-free:hover { background: #f0f4ff; }

.tp-plus { color: #adb5bd; font-size: 0.9rem; }
.tp-free:hover .tp-plus { color: #0d6efd; }

.tp-count { font-weight: 600; color: #198754; }

.tp-del { opacity: 0.45; font-size: 0.7rem; line-height: 1; }
.tp-del:hover { opacity: 1; }

/* ── Sortable table headers ──────────────────────── */
.sort-header {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.sort-header:hover {
    background: #e9ecef;
}

/* ── Matches page sticky controls block ────────────── */
.match-controls {
    position: sticky;
    top: 0;
    z-index: 20;
    background: #fff;
    margin-top: -1.1rem;
    padding: 1rem 0 0.5rem;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 1rem;
}

.match-controls-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

/* ── Admin page sticky header ──────────────────────── */
.adm-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: #fff;
    margin-top: -1.1rem;
    padding: 1rem 0 0.75rem;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.adm-header-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a2035;
    margin: 0;
}

/* ── Team list ──────────────────────────────────────── */
.team-list {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.team-row {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    gap: 0.75rem;
    transition: box-shadow 0.15s, border-color 0.15s;
}

.team-row:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    border-color: #d0d7e2;
}

.team-row-info { flex: 1; min-width: 0; }

.team-row-name {
    font-weight: 600;
    font-size: 0.97rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.team-row-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.2rem;
}

.team-row-meta-item {
    font-size: 0.8rem;
    color: #6c757d;
    text-decoration: none;
}

.team-row-meta-item:hover { color: #0d6efd; }

.team-fiks-badge {
    background: #f1f3f5;
    color: #495057;
    border-radius: 4px;
    padding: 0.05rem 0.45rem;
    font-size: 0.73rem;
    font-family: 'SFMono-Regular', Consolas, monospace;
    border: 1px solid #dee2e6;
}

/* ── Field card / parts list ─────────────────────── */
.field-card { border-radius: 8px; overflow: hidden; }

.field-card-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    padding: 0.6rem 1rem;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.field-card-name {
    font-weight: 600;
    font-size: 0.97rem;
    flex: 1;
}

.field-part-list { display: flex; flex-direction: column; }

.field-part-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid #f1f3f5;
    min-height: 44px;
}

.field-part-item:last-child { border-bottom: none; }

.field-part-name { flex: 1; font-size: 0.9rem; }

.field-part-res {
    font-size: 0.78rem;
    color: #adb5bd;
    min-width: 80px;
    text-align: right;
}

.field-part-actions { display: flex; gap: 0.3rem; flex-shrink: 0; }

.field-part-add {
    background: #f8fafb;
}

/* ── Kamper filter strip ────────────────────────── */
.kamper-filters {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 0.8rem 1rem;
    margin-bottom: 1.25rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: flex-end;
}

.kamper-filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 130px;
}

.kamper-filter-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ── Match cards (mobile) / table (desktop) ─────── */
.match-card-list { display: none; }
.match-table-wrap { display: block; }

.match-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 0.8rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.match-card-date {
    font-size: 0.78rem;
    color: #6c757d;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.match-card-time {
    background: #e7f1ff;
    color: #0d6efd;
    border-radius: 4px;
    padding: 0.05rem 0.4rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.match-card-teams {
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.match-card-teams .vs {
    font-weight: 400;
    color: #adb5bd;
    font-size: 0.82rem;
}

.match-card-field {
    font-size: 0.78rem;
    color: #adb5bd;
}

.match-card-comment {
    font-size: 0.78rem;
    color: #6c757d;
    font-style: italic;
}

.match-comment-cell {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 767px) {
    .match-card-list {
        display: flex;
        flex-direction: column;
        gap: 0.55rem;
    }
    .match-table-wrap { display: none; }

    .kamper-filter-group { min-width: calc(50% - 0.4rem); }

    .adm-header { padding: 0.8rem 0 0.6rem; }
    .adm-header-title { font-size: 1rem; }
    .field-part-res { display: none; }
}

/* ── Admin nav additions ──────────────────────────── */
.fm-user-name {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.55);
    padding: 0.25rem 0;
    font-style: italic;
}

.fm-menu-footer {
    display: flex;
    flex-direction: column;
    padding: 0.5rem 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 0.5rem;
}

.fm-link-muted {
    opacity: 0.65;
    font-size: 0.85rem;
}

.fm-logout-btn {
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
}

/* ── Superadmin layout ────────────────────────────── */
.sa-navbar {
    background: #1e293b;
    padding: 0.6rem 1.4rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
    position: sticky;
    top: 0;
    z-index: 100;
}

.sa-nav-inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.sa-brand {
    color: #f1f5f9;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
}

.sa-nav-links { display: flex; gap: 0.25rem; flex: 1; }

.sa-link {
    color: rgba(255,255,255,0.65);
    text-decoration: none;
    padding: 0.28rem 0.8rem;
    border-radius: 5px;
    font-size: 0.9rem;
    transition: background 0.15s, color 0.15s;
}

.sa-link:hover, .sa-link.active {
    color: #fff;
    background: rgba(255,255,255,0.12);
}

.sa-logout {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.25);
    color: rgba(255,255,255,0.6);
    border-radius: 5px;
    padding: 0.25rem 0.8rem;
    font-size: 0.85rem;
    cursor: pointer;
    margin-left: auto;
    transition: background 0.15s, color 0.15s;
}

.sa-logout:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

.sa-content {
    padding: 1.5rem 1.4rem 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Login page */
.sa-login-wrap {
    display: flex;
    justify-content: center;
    padding: 4rem 1rem;
}

.sa-login-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.12);
    padding: 2rem;
    width: 100%;
    max-width: 360px;
}

.sa-login-title {
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-align: center;
    color: #1e293b;
    letter-spacing: 0.03em;
}

/* Club cards */
.sa-club-card { border: 1px solid #e2e8f0; }

.sa-club-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.sa-club-thumb {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 5px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    padding: 2px;
    flex-shrink: 0;
}

.sa-club-thumb-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 5px;
    background: #f1f5f9;
    border: 1px dashed #cbd5e1;
    flex-shrink: 0;
}

.sa-club-name {
    font-weight: 600;
    font-size: 1rem;
    color: #1e293b;
    min-width: 140px;
}

.sa-club-slug {
    color: #64748b;
    font-size: 0.85rem;
    font-family: monospace;
    background: #f1f5f9;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    text-decoration: none;
}

a.sa-club-slug:hover {
    background: #e2e8f0;
    color: #1a3a5c;
    text-decoration: underline;
}

.sa-user-count {
    color: #94a3b8;
    font-size: 0.82rem;
    white-space: nowrap;
}

.sa-club-actions {
    display: flex;
    gap: 0.4rem;
    margin-left: auto;
    flex-wrap: wrap;
}

.sa-edit-name { max-width: 200px; }
.sa-edit-slug { max-width: 120px; }

.sa-users-panel {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e2e8f0;
}

/* ── Club logos ───────────────────────────────────── */

/* Navbar logo (public layout) */
.pub-nav-logo {
    height: 32px;
    width: auto;
    object-fit: contain;
    border-radius: 4px;
    vertical-align: middle;
    margin-right: 0.35rem;
    flex-shrink: 0;
}

/* Calendar toolbar logo */
.cal-club-logo {
    height: 36px;
    width: auto;
    max-width: 80px;
    object-fit: contain;
    border-radius: 4px;
    flex-shrink: 0;
    margin-right: 0.25rem;
}

/* Club settings preview */
.club-logo-preview {
    max-height: 160px;
    max-width: 100%;
    width: auto;
    object-fit: contain;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    padding: 0.5rem;
    background: #f8fafc;
}

/* ── Calendar scroll container ───────────────────────── */
.pub-cal-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    position: relative;
}

/* ── Current-time indicator ─────────────────────────── */
.cal-time-line {
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: #ef4444;
    box-shadow: 0 0 4px rgba(239, 68, 68, 0.5);
    pointer-events: none;
    z-index: 10;
    display: none;
}

.cal-time-line::before {
    content: '';
    position: absolute;
    left: 52px;          /* == GridTimeColumnWidth */
    top: -4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ef4444;
}

/* ── Arrangement cells ───────────────────────────────── */
.pub-cal-arrangement {
    background: #fff3e0 !important;
    vertical-align: top;
    padding: 4px 6px !important;
    border-left: 3px solid #ff9800 !important;
}

.pub-arr-card {
    display: flex;
    flex-direction: column;
    gap: 1px;
    height: 100%;
}

.pub-arr-title {
    font-weight: 600;
    font-size: 0.75rem;
    color: #bf360c;
    line-height: 1.3;
    word-break: break-word;
}

.pub-arr-meta {
    font-size: 0.65rem;
    color: #e65100;
    opacity: 0.85;
}

/* ── Today column — subtle body-cell tint ───────────── */
.pub-cal-table tbody td.today-col {
    background-color: rgba(219, 234, 254, 0.4);
}

/* ── Mobile / responsive ─────────────────────────────── */
@media (max-width: 767px) {
    /* Admin nav dropdown footer gets visible border */
    .fm-menu-footer {
        padding: 0.5rem 1.5rem;
        border-top-color: #dee2e6;
        margin-top: 0;
    }
}

/* ── Calendar minimum column widths + sticky headers/column on mobile ── */
/*
 * .pub-cal-table uses table-layout:fixed + width:100% on desktop (all 7 days fill the
 * viewport). On narrow screens we switch to width:auto so the table can be wider than
 * its container, letting .pub-cal-scroll provide horizontal scroll. Each day header is
 * given a fixed pixel width (150 px) so ~2 days are visible on a 375-px phone.
 * .pub-part-header (half-day sub-columns) gets half that width (75 px).
 *
 * Sticky behaviour: .pub-cal-scroll becomes the scroll container in both axes.
 * - thead rows stick to top:0 / top:30px within the scroll area
 * - .pub-time-col cells stick to left:0
 * - top-left corner cell sticks in both directions (z-index 4)
 */
@media (max-width: 767px) {
    .pub-cal-table {
        width: auto;
    }

    .pub-day-header {
        width: 150px;
    }

    .pub-part-header {
        width: 75px;
    }

    /* Give the scroll container a bounded height so the grid scrolls vertically
       inside its own viewport rather than the whole page — this is what makes
       position:sticky work for thead cells within .pub-cal-scroll. */
    .pub-cal-scroll {
        overflow-y: auto;
        max-height: calc(100vh - 110px);
        max-height: calc(100svh - 110px); /* modern browsers: accounts for browser chrome */
    }

    /* ── Sticky first header row (day names) ── */
    .pub-cal-table thead tr:first-child th {
        position: sticky;
        top: 0;
        z-index: 3;
        background: #f8fafc;
    }
    .pub-cal-table thead tr:first-child .pub-day-header.today {
        background: #e7f1ff;
    }

    /* ── Sticky second header row (field part names A/B) ── */
    .pub-cal-table thead tr:nth-child(2) th {
        position: sticky;
        top: 30px; /* height of the first header row */
        z-index: 3;
        background: #f1f3f5;
    }

    /* ── Sticky time column — body ── */
    .pub-cal-table tbody .pub-time-col {
        position: sticky;
        left: 0;
        z-index: 2;
        background: #fff;
        border-right: 1px solid #dee2e6;
    }

    /* ── Sticky time column — header corner (both axes) ── */
    .pub-cal-table thead .pub-time-col {
        position: sticky;
        left: 0;
        z-index: 4; /* above both scrolling header cells and scrolling time col */
        background: #f8fafc;
        border-right: 1px solid #dee2e6;
    }
}

/* ── Custom confirm dialog ──────────────────────────────────────────── */
.fm-dialog-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fm-fade-in 0.1s ease;
}

.fm-dialog {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 12px 48px rgba(0,0,0,0.22);
    width: 100%;
    max-width: 420px;
    margin: 1rem;
    animation: fm-slide-up 0.13s ease;
}

.fm-dialog-header {
    padding: 1.1rem 1.3rem 0.5rem;
}

.fm-dialog-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
}

.fm-dialog-body {
    padding: 0.2rem 1.3rem 0.9rem;
}

.fm-dialog-message {
    margin: 0;
    font-size: 0.9rem;
    color: #374151;
    line-height: 1.6;
    white-space: pre-line;
}

.fm-dialog-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.6rem;
    padding: 0 1.3rem 1.1rem;
}

.fm-dialog-cancel {
    background: #fff;
    border: 1px solid #dee2e6;
    color: #6c757d;
    border-radius: 7px;
    padding: 0.42rem 1.1rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.12s, color 0.12s;
}

.fm-dialog-cancel:hover {
    background: #f1f3f5;
    color: #212529;
}

.fm-dialog-confirm {
    background: #0d6efd;
    border: none;
    color: #fff;
    border-radius: 7px;
    padding: 0.42rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.12s;
}

.fm-dialog-confirm:hover { background: #0b5ed7; }

.fm-dialog-confirm--danger             { background: #dc3545; }
.fm-dialog-confirm--danger:hover       { background: #bb2d3b; }

@keyframes fm-fade-in  { from { opacity: 0; }              to { opacity: 1; } }
@keyframes fm-slide-up { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ── Conflict badge (on arrangement / match cards) ──────────────────── */
.cal-conflict-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
    border-radius: 4px;
    padding: 1px 6px;
    font-size: 0.65rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 4px;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
    line-height: 1.5;
}

.cal-conflict-badge:hover {
    background: #ffc107;
    color: #3d2e00;
}

/* ── Conflict modal ───────────────────────────────────────────────────── */
.cal-conflict-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.cal-conflict-dialog {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 480px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.cal-conflict-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.1rem;
    border-bottom: 1px solid #e9ecef;
    background: #fff8e1;
    flex-shrink: 0;
}

.cal-conflict-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: #1a2035;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cal-conflict-close {
    background: none;
    border: none;
    color: #6c757d;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    flex-shrink: 0;
    transition: color 0.15s;
}

.cal-conflict-close:hover { color: #212529; }

.cal-conflict-body {
    padding: 0.9rem 1.1rem;
    overflow-y: auto;
}

@media (max-width: 575px) {
    /* Reduce outer content padding */
    .pub-content {
        padding: 0.75rem 0.75rem 2rem;
    }

    /* Admin content padding */
    .content.px-4 {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }

    /* Sticky controls: match reduced padding */
    .cal-sticky-controls {
        top: 2.5rem;
        margin-left: -0.75rem;
        margin-right: -0.75rem;
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    /* Public navbar – hamburger collapse on mobile */
    .pub-navbar { padding: 0.35rem 0.7rem; }
    .pub-nav-inner { gap: 0.5rem; flex-wrap: wrap; }   /* let the collapse menu wrap to its own row */
    .pub-brand { font-size: 0.92rem; flex: 1 1 auto; }

    .pub-hamburger { display: flex; }

    .pub-nav-collapse {
        display: none;
        flex-direction: column;
        align-items: stretch;
        flex: 0 0 100%;
        order: 10;
        border-top: 1px solid rgba(255,255,255,0.15);
        padding-top: 0.4rem;
        padding-bottom: 0.25rem;
        gap: 0.25rem;
    }
    .pub-nav-collapse--open { display: flex; }

    .pub-nav-links {
        flex-direction: column;
        flex: none;
        width: 100%;
        gap: 0.1rem;
    }
    .pub-nav-link {
        display: block;
        padding: 0.45rem 0.75rem;
        font-size: 0.9rem;
        border-radius: 6px;
    }

    .pub-nav-actions {
        margin-left: 0;
        flex-wrap: wrap;
        gap: 0.4rem;
        padding: 0.25rem 0.1rem;
    }
    .pub-user-name { font-size: 0.82rem; width: 100%; }
    .pub-btn-login { padding: 0.3rem 0.75rem; font-size: 0.85rem; }
    .pub-btn-logout { padding: 0.3rem 0.6rem; font-size: 0.85rem; }

    /* ── Admin dropdown: inline expansion inside the mobile nav panel ── *
     * Position:absolute + right:0 clips/floats outside the dark panel on mobile.
     * Switch to static flow so the submenu expands downward inside the panel.  */
    .pub-nav-collapse--open .pub-admin-dropdown {
        display: flex;
        flex-direction: column;
        width: 100%;
    }
    .pub-nav-collapse--open .pub-btn-login {
        width: 100%;
        text-align: left;
        background: rgba(255,255,255,0.1);
        border-color: rgba(255,255,255,0.25);
        border-radius: 6px;
        color: #fff;
    }
    .pub-nav-collapse--open .pub-admin-dropdown--open .pub-btn-login {
        background: rgba(255,255,255,0.18);
    }
    /* Override the absolute positioning — render inline inside the panel */
    .pub-nav-collapse--open .pub-admin-menu {
        position: static !important;
        display: none;
        width: 100%;
        min-width: unset;
        border-radius: 6px;
        border: none;
        border-left: 3px solid rgba(255,255,255,0.25);
        background: rgba(0,0,0,0.22);
        box-shadow: none;
        margin-top: 4px;
        overflow: visible;
    }
    .pub-nav-collapse--open .pub-admin-dropdown--open .pub-admin-menu {
        display: flex;
    }
    .pub-nav-collapse--open .pub-admin-item {
        color: rgba(255,255,255,0.85);
        font-size: 0.88rem;
        padding: 8px 14px 8px 18px;
        border-bottom: 1px solid rgba(255,255,255,0.06);
    }
    .pub-nav-collapse--open .pub-admin-item:last-child {
        border-bottom: none;
    }
    .pub-nav-collapse--open .pub-admin-item:hover {
        background: rgba(255,255,255,0.1);
        color: #fff;
    }

    /* Calendar toolbar */
    .pub-cal-toolbar { gap: 0.5rem; }
    .pub-toolbar-right { flex-wrap: wrap; gap: 0.4rem; }

    /* Week controls */
    .pub-week-controls { padding: 0.2rem 0.3rem; gap: 0.2rem; }
    .pub-nav-arrow { width: 28px; height: 28px; font-size: 0.9rem; }
    .pub-week-info { min-width: 120px; }
    .pub-week-num { display: none; }
    .pub-week-range { font-size: 0.78rem; }
    .pub-today-btn { padding: 0.2rem 0.55rem; font-size: 0.75rem; }
    .pub-toggle-check { font-size: 0.75rem; }

    /* Booking bar */
    .cal-booking-bar { padding: 0.4rem 0.5rem; gap: 0.4rem; }
    .cal-team-select { max-width: 160px; }
    .cal-enddate { max-width: 130px; }
    .cal-booking-hint { display: none; }

    /* Time column — narrowed on mobile; day columns set width via header rules above */
    .pub-time-col {
        width: 46px !important;
        min-width: 46px;
        max-width: 46px;
        font-size: 0.65rem;
    }
}

/* ═══════════════════════════════════════════════════════════
   CSS Grid calendar  (pub-grid-* classes used by Index.razor)
   Stacking order:  base cells (auto) → bookings (2) → matches (3) → arrangements (4) → sticky headers (5-7)
   ═══════════════════════════════════════════════════════════ */

/* Scroll wrapper — inherits overflow-x:auto + position:relative from .pub-cal-scroll */
.pub-grid-scroll {
    /* vertical scroll is provided by the page on desktop; bounded on mobile below */
}

/* Desktop grid visible on ≥768px, hidden on mobile */
.pub-grid-desktop { display: block; }
.pub-grid-mobile   { display: none; }
@media (max-width: 767px) {
    .pub-grid-desktop { display: none; }
    .pub-grid-mobile  { display: block; }
}

/* Grid container */
.pub-grid-calendar {
    display: grid;
    position: relative;            /* stacking context for z-index children */
    background: #fff;
    border: 1px solid #e5e7eb;
    font-size: 0.78rem;
    min-width: 500px;
}

/* ── Sticky corner (Time / top-left) ── */
.pub-grid-corner {
    position: sticky;
    top: 0;
    left: 0;
    z-index: 7;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 600;
    color: #6c757d;
    border-right: 1px solid #dee2e6;
    border-bottom: 2px solid #dee2e6;
}

/* ── Sticky day headers (grid row 1) ── */
.pub-grid-day-header {
    position: sticky;
    top: 0;
    z-index: 6;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 6px 4px;
    border-right: 1px solid #e5e7eb;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    text-align: center;
}

.pub-grid-day-header.today {
    background: #e7f1ff !important;
    color: #0d6efd;
}

/* ── Sticky part headers (grid row 2, only when A/B split) ── */
.pub-grid-part-header {
    position: sticky;
    top: 38px;             /* == first header row height, matches C# GridSlotHeight constant */
    z-index: 6;
    background: #f1f3f5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 600;
    border-right: 1px solid #e5e7eb;
    border-bottom: 1px solid #dee2e6;
}

/* ── Sticky time labels (column 1) ── */
.pub-grid-time {
    position: sticky;
    left: 0;
    z-index: 5;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 6px;
    font-size: 0.72rem;
    color: #94a3b8;
    border-right: 1px solid #dee2e6;
    border-bottom: 1px solid #f1f3f5;
}

/* ── Base slot cells (bottom layer — no z-index, DOM order keeps them below) ── */
.pub-grid-cell {
    border-right: 1px solid #e5e7eb;
    border-bottom: 1px solid #f1f3f5;
    background: #fff;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    color: #6c757d;
}

.pub-grid-cell.today-col {
    background: rgba(219, 234, 254, 0.5);
}

.pub-grid-cell.pub-cal-editable:hover {
    background: #f0f4ff;
    cursor: pointer;
}

/* ── Reservation group container (z-index 2, overlays base cells) ── */
.pub-grid-booking-group {
    position: relative;
    z-index: 2;
    display: flex;
    gap: 2px;
    padding: 2px;
    overflow: visible;
    align-items: stretch;
}

.pub-grid-booking-group.today-col {
    border-top: 2px solid rgba(99, 165, 253, 0.5);
}

.pub-grid-booking-group.pub-group-editable {
    cursor: pointer;
}

/* ── Drop strip: bottom edge of occupied slot, only in pick-up mode ── */
.pub-group-drop-strip {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 9px;
    background: rgba(13, 110, 253, 0.18);
    border-top: 2px dashed #0d6efd;
    cursor: cell;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 700;
    color: #0d6efd;
    user-select: none;
}

.pub-group-drop-strip:hover {
    background: rgba(13, 110, 253, 0.35);
}

/* Also dim sub-blocks slightly so strip is more visible */
.pub-group-pickup .pub-booking-sub {
    opacity: 0.75;
    padding-bottom: 10px; /* make room for the strip */
}

/* ── Small "+" chip appended to occupied slots ── */
.pub-group-add-chip {
    flex-shrink: 0;
    width: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: #adb5bd;
    opacity: 0;
    transition: opacity 0.15s;
    pointer-events: all;
    cursor: pointer;
}

.pub-grid-booking-group:hover .pub-group-add-chip {
    opacity: 1;
}

.pub-group-add-chip:hover {
    color: #0d6efd;
}

/* ── Individual booking within a group ── */
.pub-booking-sub {
    flex: 1;
    min-width: 0;
    pointer-events: all;
    display: flex;
    align-items: center;
    padding: 2px 4px;
    font-size: 0.7rem;
    font-weight: 600;
    border-left: 3px solid rgba(0,0,0,0.2);
    border-bottom: 1px solid rgba(0,0,0,0.07);
    overflow: hidden;
    cursor: default;
}

.pub-booking-sub .pub-booking-label {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}

.pub-booking-sub.pub-cal-picked {
    opacity: 0.5;
    outline: 2px dashed #0d6efd;
}

.pub-booking-sub.pub-cal-editable {
    cursor: pointer;
}

.pub-booking-sub.pub-cal-editable:hover {
    filter: brightness(0.88);
}

/* ── Chain slot visuals – consecutive same-team slots merge visually ── */
.pub-booking-sub.pub-chain-first {
    border-bottom: none;
}

.pub-booking-sub.pub-chain-mid {
    border-bottom: none;
    border-top: 1px solid rgba(0,0,0,0.06);
}

.pub-booking-sub.pub-chain-last {
    border-top: 1px solid rgba(0,0,0,0.06);
}

/* ── Match blocks (z-index 3, overlays bookings) ── */
.pub-grid-match {
    z-index: 3;
    overflow: hidden;
    padding: 0;
}

.pub-grid-match .pub-match-card {
    height: 100%;
    border-radius: 4px;
}

.pub-grid-match.pub-cal-editable .pub-match-card:hover {
    box-shadow: 0 0 0 2px #0d6efd;
    cursor: pointer;
}

/* ── Arrangement blocks (z-index 4, overlays matches) ── */
.pub-grid-arrangement {
    z-index: 4;
    background: #fff3e0;
    border-left: 3px solid #ff9800;
    padding: 4px 6px;
    overflow: hidden;
}

.pub-grid-match.today-col .pub-match-card {
    border-left-color: #1d4ed8;
    box-shadow: 0 0 0 1px rgba(99, 165, 253, 0.35);
}

/* ── Drop-zone arrow inside free cell ── */
.pub-grid-cell .cal-drop-arrow {
    font-size: 1.1rem;
    color: #0d6efd;
    pointer-events: none;
}

/* ── Mobile: bounded scroll so sticky headers work within the container ── */
@media (max-width: 767px) {
    .pub-grid-scroll {
        overflow-y: auto;
        max-height: calc(100vh - 130px);
        max-height: calc(100svh - 130px);
    }

    .pub-grid-calendar {
        min-width: 420px;
    }

    .pub-grid-day-header {
        padding: 4px 3px 3px;
    }
}

/* ── Fieldplan ────────────────────────────────────── */
.fieldplan-nav {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.fieldplan-week-label {
    flex: 1;
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    min-width: 160px;
}

.fieldplan-section {
    margin-bottom: 2.25rem;
}

.fieldplan-field-title {
    font-size: 1rem;
    font-weight: 700;
    color: #212529;
    padding-bottom: 0.35rem;
    border-bottom: 2px solid #dee2e6;
    margin-bottom: 0.6rem;
}

/* Table */
.fieldplan-table {
    border-color: #dee2e6;
    margin-bottom: 0;
}

.fieldplan-table thead th {
    background: #f8f9fa;
    vertical-align: middle;
    border-color: #dee2e6;
}

/* Time column */
.fieldplan-time-col {
    width: 86px;
    min-width: 86px;
    font-size: 0.76rem;
    color: #6c757d;
    font-weight: 600;
    background: #f8f9fa !important;
    white-space: nowrap;
    vertical-align: middle;
    padding: 0.3rem 0.5rem;
}

/* Day header (colspan row) */
.fieldplan-day-th {
    padding: 0.3rem 0.4rem;
    border-bottom: 1px solid #dee2e6 !important;
}

.fieldplan-day-name {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: capitalize;
    line-height: 1.2;
}

.fieldplan-day-date {
    font-size: 0.68rem;
    font-weight: 400;
    color: #6c757d;
    line-height: 1.2;
}

/* Field-part sub-header row */
.fieldplan-part-th {
    font-size: 0.72rem;
    font-weight: 700;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.2rem 0.3rem;
    min-width: 80px;
}

/* Today highlight */
.fieldplan-today {
    background: #e7f1ff !important;
}

.fieldplan-today .fieldplan-day-name,
.fieldplan-today .fieldplan-day-date {
    color: #0d6efd;
}

.fieldplan-today-col {
    background: #f5f9ff !important;
}

/* Body cells */
.fieldplan-booked {
    padding: 0.3rem 0.25rem;
    vertical-align: middle;
}

.fieldplan-empty {
    background: #fafafa;
}

.fieldplan-table tbody tr:hover td {
    background-color: #f0f4ff;
}

.fieldplan-table tbody tr:hover .fieldplan-time-col,
.fieldplan-table tbody tr:hover .fieldplan-today-col,
.fieldplan-table tbody tr:hover .fieldplan-empty {
    background-color: #f0f4ff !important;
}

/* Team badge */
.fieldplan-team {
    display: inline-block;
    background: #d1e7dd;
    color: #0a3622;
    border-radius: 5px;
    padding: 0.18rem 0.45rem;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    max-width: 110px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fieldplan-team-dim {
    background: #e9ecef;
    color: #adb5bd;
}

@media (max-width: 767px) {
    .fieldplan-week-label {
        order: -1;
        width: 100%;
        text-align: left;
        font-size: 0.9rem;
    }
}

/* Fieldplan drag-and-drop */
.fieldplan-droptarget {
    cursor: pointer;
}

/* "+" indicator in empty cells for admins */
.fieldplan-cell-add {
    display: inline-block;
    color: #ced4da;
    font-size: 1.1rem;
    line-height: 1;
    user-select: none;
    pointer-events: none;
}

.fieldplan-empty.fieldplan-droptarget:hover .fieldplan-cell-add {
    color: #0d6efd;
}

.fieldplan-drag-over {
    outline: 2px dashed #0d6efd !important;
    outline-offset: -2px;
    background-color: #cfe2ff !important;
}

/* Fieldplan editable team badge */
.fieldplan-team-editable {
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.fieldplan-team-editable:hover {
    background: #0d6efd;
    color: #fff;
}

/* Drop strip at the bottom edge of occupied Fieldplan cells */
.fp-drop-strip {
    display: block;
    height: 5px;
    margin-top: 3px;
    border-top: 2px dashed transparent;
    background: transparent;
    transition: background 0.12s, border-color 0.12s;
    cursor: cell;
    border-radius: 0 0 2px 2px;
}

.fp-drop-strip.fp-drop-strip-active {
    background: rgba(13, 110, 253, 0.22);
    border-top-color: #0d6efd;
}

/* Tone down whole-cell highlight for occupied cells (strip provides the cue) */
.fieldplan-booked.fieldplan-drag-over {
    outline: none !important;
    background-color: transparent !important;
}

/* Multi-booking cell container */
.fp-multi-cell {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    align-items: center;
    justify-content: center;
    min-height: 24px;
}

/* "+" chip shown after existing bookings in occupied cells */
.fp-add-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    color: #adb5bd;
    opacity: 0;
    transition: opacity 0.15s, color 0.15s;
    cursor: pointer;
    flex-shrink: 0;
}

.fieldplan-booked:hover .fp-add-chip {
    opacity: 1;
}

.fp-add-chip:hover {
    color: #0d6efd;
}

/* Fieldplan edit modal */
.fieldplan-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1040;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fieldplan-modal {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.22);
    width: 100%;
    max-width: 420px;
    overflow: hidden;
    z-index: 1050;
}

.fieldplan-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 1.2rem 0.7rem;
    border-bottom: 1px solid #dee2e6;
    background: #f8f9fa;
}

.fieldplan-modal-title {
    font-weight: 700;
    font-size: 1rem;
    color: #212529;
}

.fieldplan-modal-body {
    padding: 1.1rem 1.2rem 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.fieldplan-modal-date {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 0.25rem;
}

/* ── Team player panel ────────────────────────────────────────── */
.team-card-wrapper {
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    margin-bottom: 0.5rem;
    overflow: hidden;
}

.team-card-wrapper .team-row {
    border: none;
    border-radius: 0;
    margin-bottom: 0;
}

.team-players-panel {
    padding: 0.75rem 1rem 0.5rem;
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

.player-table th,
.player-table td {
    font-size: 0.85rem;
    vertical-align: middle;
}

.player-num-col {
    width: 2.5rem;
    text-align: center;
    color: #6c757d;
}

.player-status-col {
    width: 4.5rem;
}

.btn-xs {
    padding: 0.1rem 0.4rem;
    font-size: 0.75rem;
    line-height: 1.4;
    border-radius: 0.2rem;
}

/* ── Landing page ─────────────────────────────────── */
.landing-hero {
    background: linear-gradient(135deg, #1a3a5c 0%, #1e4d78 55%, #1a5e9e 100%);
    color: #fff;
    padding: 5rem 1.5rem 4.5rem;
    text-align: center;
}

.landing-hero-inner {
    max-width: 680px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.landing-logo-img {
    width: 96px;
    height: 96px;
    border-radius: 22px;
    box-shadow: 0 8px 28px rgba(0,0,0,0.35);
    margin-bottom: 0.5rem;
}

.landing-logo-mark {
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.landing-hero-title {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0;
    line-height: 1.1;
}

.landing-hero-sub {
    font-size: 1.2rem;
    font-weight: 500;
    opacity: 0.88;
    margin: 0;
}

.landing-hero-desc {
    font-size: 0.97rem;
    opacity: 0.72;
    max-width: 520px;
    line-height: 1.6;
    margin: 0.25rem 0 0.75rem;
}

.landing-cta-btn {
    display: inline-block;
    background: rgba(255,255,255,0.18);
    border: 1.5px solid rgba(255,255,255,0.45);
    color: #fff;
    padding: 0.65rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s;
    margin-top: 0.5rem;
}

.landing-cta-btn:hover {
    background: rgba(255,255,255,0.28);
    border-color: rgba(255,255,255,0.7);
    color: #fff;
}

.landing-section-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.landing-section-title {
    font-size: 1.65rem;
    font-weight: 700;
    color: #1a3a5c;
    margin: 0 0 0.35rem;
    text-align: center;
}

.landing-section-sub {
    text-align: center;
    color: #6b7280;
    font-size: 0.97rem;
    margin: 0 0 2rem;
}

/* Features */
.landing-features {
    background: #f8f9fb;
    padding: 4rem 1.5rem;
}

.landing-features .landing-section-title {
    margin-bottom: 2rem;
}

.landing-feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.landing-feature-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem 1.4rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.landing-feature-icon {
    font-size: 1.75rem;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.landing-feature-card h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.landing-feature-card p {
    font-size: 0.9rem;
    color: #6b7280;
    margin: 0;
    line-height: 1.55;
}

/* Club search */
.landing-clubs-section {
    padding: 4rem 1.5rem;
    background: #fff;
}

.landing-search-wrap {
    max-width: 480px;
    margin: 0 auto 2.5rem;
}

.landing-search-input {
    width: 100%;
    padding: 0.75rem 1.1rem;
    border: 1.5px solid #d1d5db;
    border-radius: 10px;
    font-size: 1rem;
    color: #111827;
    background: #fff;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    box-sizing: border-box;
}

.landing-search-input:focus {
    border-color: #1a3a5c;
    box-shadow: 0 0 0 3px rgba(26,58,92,0.12);
}

.landing-club-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.landing-club-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.1rem;
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
}

.landing-club-card:hover {
    border-color: #1a3a5c;
    box-shadow: 0 4px 14px rgba(26,58,92,0.1);
    transform: translateY(-1px);
    color: inherit;
}

.landing-club-avatar {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: #e8edf3;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.landing-club-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.landing-club-initials {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1a3a5c;
    letter-spacing: 0.03em;
}

.landing-club-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    flex: 1;
    min-width: 0;
}

.landing-club-name {
    font-size: 0.97rem;
    font-weight: 600;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.landing-club-slug {
    font-size: 0.8rem;
    color: #9ca3af;
}

.landing-club-arrow {
    font-size: 1.3rem;
    color: #9ca3af;
    flex-shrink: 0;
    line-height: 1;
}

.landing-clubs-empty {
    text-align: center;
    color: #6b7280;
    padding: 2.5rem 0;
    font-size: 0.97rem;
}

/* Footer */
.landing-footer {
    background: #f3f4f6;
    border-top: 1px solid #e5e7eb;
    padding: 1.5rem;
    text-align: center;
    font-size: 0.85rem;
    color: #6b7280;
}

.landing-footer-brand {
    font-weight: 700;
    color: #1a3a5c;
}

.landing-footer-sep {
    margin: 0 0.4rem;
}

.landing-footer-contact {
    color: #6b7280;
    text-decoration: none;
}
.landing-footer-contact:hover { color: #1a3a5c; text-decoration: underline; }

@media (max-width: 600px) {
    .landing-hero {
        padding: 3.5rem 1rem 3rem;
    }

    .landing-hero-title {
        font-size: 2.2rem;
    }

    .landing-hero-sub {
        font-size: 1rem;
    }

    .landing-section-title {
        font-size: 1.35rem;
    }

    .landing-features,
    .landing-clubs-section {
        padding: 3rem 1rem;
    }
}

/* ── Chat widget (shared: Lagoppsett + TacticalBoard) ─────────────────── */
.fm-chat-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1040;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.fm-chat-panel {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.18);
    width: 300px;
    max-height: 420px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #e0e0e0;
}

.fm-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: #0d6efd;
    color: #fff;
    font-weight: 600;
    font-size: 0.86rem;
    flex-shrink: 0;
}

.fm-chat-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.fm-chat-close,
.fm-chat-clear {
    background: none;
    border: none;
    color: rgba(255,255,255,0.8);
    font-size: 1rem;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}
.fm-chat-close:hover,
.fm-chat-clear:hover { color: #fff; }

.fm-chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fm-chat-empty {
    color: #adb5bd;
    font-size: 0.82rem;
    text-align: center;
    margin-top: 8px;
}

.fm-chat-msg {
    display: flex;
    flex-direction: column;
    gap: 3px;
    align-items: flex-start;
}
.fm-chat-msg.mine { align-items: flex-end; }

.fm-chat-sender {
    font-size: 0.68rem;
    font-weight: 600;
    color: #6c757d;
    padding: 0 4px;
}

.fm-chat-bubble {
    font-size: 0.84rem;
    background: #f0f4ff;
    color: #212529;
    border-radius: 12px 12px 12px 4px;
    padding: 7px 12px;
    max-width: 220px;
    word-break: break-word;
    line-height: 1.4;
}
.fm-chat-msg.mine .fm-chat-bubble {
    background: #0d6efd;
    color: #fff;
    border-radius: 12px 12px 4px 12px;
}

.fm-chat-footer {
    padding: 8px 10px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    gap: 6px;
    flex-shrink: 0;
    background: #fafafa;
}

.fm-chat-input {
    flex: 1;
    border: 1px solid #dee2e6;
    border-radius: 20px;
    padding: 6px 13px;
    font-size: 0.84rem;
    outline: none;
    background: #fff;
    transition: border-color 0.15s;
}
.fm-chat-input:focus { border-color: #0d6efd; }

.fm-chat-send {
    background: #0d6efd;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    font-size: 0.9rem;
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}
.fm-chat-send:hover { background: #0b5ed7; }

.fm-chat-toggle {
    background: #0d6efd;
    color: #fff;
    border: none;
    border-radius: 24px;
    padding: 9px 20px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 4px 18px rgba(13,110,253,0.35);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.15s, box-shadow 0.15s;
}
.fm-chat-toggle:hover { background: #0b5ed7; box-shadow: 0 6px 22px rgba(13,110,253,0.4); }

.fm-chat-badge {
    background: #dc3545;
    color: #fff;
    border-radius: 10px;
    padding: 1px 7px;
    font-size: 0.72rem;
    font-weight: 700;
    min-width: 18px;
    text-align: center;
}

@media (max-width: 576px) {
    .fm-chat-widget { right: 10px; bottom: 14px; }
    .fm-chat-panel  { width: min(calc(100vw - 20px), 360px); }
}

.pub-footer {
    text-align: center;
    padding: 12px 16px;
    font-size: 0.78rem;
    color: #adb5bd;
    border-top: 1px solid #e9ecef;
    margin-top: 24px;
}
.pub-footer a { color: #adb5bd; text-decoration: none; }
.pub-footer a:hover { color: #6c757d; text-decoration: underline; }
.pub-version { margin-left: 0.75rem; color: #ced4da; font-variant-numeric: tabular-nums; }

/* ── Beta badge & modal ── */
.landing-title-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.landing-beta-badge {
    display: inline-block;
    background: #f59e0b;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 3px 9px;
    border-radius: 20px;
    border: none;
    cursor: pointer;
    vertical-align: middle;
    transition: background 0.15s;
    line-height: 1.4;
}
.landing-beta-badge:hover { background: #d97706; }

.beta-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.beta-modal {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    max-width: 440px;
    width: 100%;
    overflow: hidden;
}
.beta-modal-header {
    background: #fffbeb;
    border-bottom: 1px solid #fde68a;
    padding: 20px 24px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.beta-modal-badge {
    background: #f59e0b;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 20px;
    flex-shrink: 0;
}
.beta-modal-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a3a5c;
    margin: 0;
}
.beta-modal-body {
    padding: 20px 24px;
    font-size: 0.9rem;
    color: #374151;
    line-height: 1.6;
}
.beta-modal-body p { margin: 0 0 10px; }
.beta-modal-body ul { margin: 0 0 10px; padding-left: 20px; }
.beta-modal-body li { margin-bottom: 4px; }
.beta-modal-body a { color: #1a3a5c; }
.beta-modal-footer {
    padding: 12px 24px 20px;
    display: flex;
    justify-content: flex-end;
}
.beta-modal-btn {
    background: #1a3a5c;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 24px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}
.beta-modal-btn:hover { background: #15304f; }


/* ── Reusable modal (shared across pages: Kamper, Lagstyring, …) ── */
.ls-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.ls-modal {
    background: #fff;
    border-radius: 10px;
    width: 100%;
    max-width: 460px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
}
.ls-modal.ls-modal-wide { max-width: 600px; }
/* When an EditForm is the modal shell, let the <form> own the flex column. */
.ls-modal-form { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.ls-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px 12px;
    border-bottom: 1px solid #dee2e6;
    font-size: 0.95rem;
}
.ls-modal-body {
    padding: 14px 16px;
    overflow-y: auto;
    flex: 1;
}
.ls-modal-footer {
    padding: 10px 16px;
    border-top: 1px solid #dee2e6;
    display: flex;
    justify-content: flex-end;
}

/* ── Consistent button styling across the whole app ── */
.btn {
    border-radius: 7px;
    font-weight: 500;
    transition: background-color .12s ease, border-color .12s ease, color .12s ease, box-shadow .12s ease;
}
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:focus, .btn:focus-visible { box-shadow: 0 0 0 0.18rem rgba(13,110,253,0.25); }

/* ── Back buttons (← Lagstyring / ← Lagoppstilling): match the app button style ── */
.fm-back-btn {
    display: inline-flex; align-items: center; gap: 4px;
    background: #fff; color: #495057;
    border: 1px solid #ced4da; border-radius: 7px;
    padding: 5px 12px; font-size: 0.85rem; font-weight: 500;
    line-height: 1.3; text-decoration: none; cursor: pointer;
    transition: background-color .12s ease, border-color .12s ease, color .12s ease;
}
.fm-back-btn:hover  { background: #f1f3f5; border-color: #adb5bd; color: #212529; }
.fm-back-btn:active { transform: translateY(1px); }
