/* SGI Showet — Catppuccin Mocha Dark Theme */

:root {
    --base: #1e1e2e;
    --mantle: #181825;
    --surface0: #313244;
    --surface1: #45475a;
    --surface2: #585b70;
    --text: #cdd6f4;
    --subtext: #a6adc8;
    --blue: #89b4fa;
    --sapphire: #74c7ec;
    --teal: #94e2d5;
    --green: #a6e3a1;
    --red: #f38ba8;
    --peach: #fab387;
    --yellow: #f9e2af;
    --overlay: #6c7086;
    --crust: #11111b;
    --club-color: #d92626;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: var(--base);
    color: var(--text);
    min-height: 100vh;
}

a {
    color: var(--club-color);
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

/* ==================== LOGIN / REGISTER ==================== */

.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.auth-card {
    background: linear-gradient(135deg, var(--mantle) 0%, rgba(24, 24, 37, 0.8) 100%);
    border: 1px solid var(--surface0);
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.auth-card h1 {
    font-size: 26px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 8px;
}

.auth-card h1::before {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, var(--club-color), var(--teal));
    border-radius: 2px;
    margin: 0 auto 16px;
}

.auth-card .subtitle {
    color: var(--subtext);
    text-align: center;
    font-size: 13px;
    margin-bottom: 24px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 13px;
    color: var(--subtext);
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    padding: 10px 14px;
    background-color: var(--surface0);
    color: var(--text);
    border: 1.5px solid var(--surface1);
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: all 0.2s ease;
}

.form-input::placeholder {
    color: var(--overlay);
}

.form-input:focus {
    border-color: var(--club-color);
    box-shadow: 0 0 0 3px rgba(137, 180, 250, 0.1);
}

.form-input:hover:not(:focus) {
    border-color: var(--surface2);
}

.form-select {
    width: 100%;
    padding: 10px 14px;
    background-color: var(--surface0);
    color: var(--text);
    border: 1px solid var(--surface1);
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    appearance: none;
    cursor: pointer;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
}

.btn:active {
    transform: translateY(0) !important;
}

.btn-primary {
    width: 100%;
    background: linear-gradient(135deg, var(--club-color) 0%, var(--sapphire) 100%);
    color: var(--base);
    padding: 12px;
    font-size: 15px;
    box-shadow: 0 4px 12px rgba(137, 180, 250, 0.25);
}
.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(137, 180, 250, 0.35);
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: var(--surface0);
    color: var(--text);
    border: 1px solid var(--surface1);
}
.btn-secondary:hover {
    background-color: var(--surface1);
    border-color: var(--club-color);
    transform: translateY(-1px);
}

.btn-danger {
    background-color: transparent;
    color: var(--red);
    border: 1px solid var(--surface1);
}
.btn-danger:hover {
    border-color: var(--red);
    background-color: rgba(243, 139, 168, 0.1);
}

.btn-success {
    background: linear-gradient(135deg, var(--green) 0%, var(--teal) 100%);
    color: var(--base);
    box-shadow: 0 4px 12px rgba(166, 227, 161, 0.25);
}
.btn-success:hover {
    box-shadow: 0 6px 20px rgba(166, 227, 161, 0.35);
    transform: translateY(-1px);
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
    color: var(--subtext);
}

.error-msg {
    background: linear-gradient(135deg, rgba(243, 139, 168, 0.15), rgba(243, 139, 168, 0.08));
    color: var(--red);
    padding: 12px 14px;
    border-radius: 8px;
    border-left: 3px solid var(--red);
    font-size: 13px;
    margin-bottom: 16px;
    display: none;
}

.dev-badge {
    display: inline-block;
    background-color: rgba(255, 152, 0, 0.2);
    color: #ff9800;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: bold;
    margin-bottom: 16px;
}

.dev-info {
    background-color: var(--surface0);
    border-radius: 8px;
    padding: 12px;
    margin-top: 16px;
    font-size: 12px;
    color: var(--subtext);
}

.dev-info code {
    color: var(--peach);
}

/* ==================== LAYOUT (Dashboard) ==================== */

.app-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 220px;
    min-width: 220px;
    background: linear-gradient(180deg, var(--mantle) 0%, rgba(24, 24, 37, 0.9) 100%);
    border-right: 1px solid var(--surface0);
    padding: 20px 12px;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.15);
}

.user-info {
    background: linear-gradient(135deg, var(--surface0), rgba(49, 50, 68, 0.6));
    border: 1px solid var(--surface1);
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 20px;
    transition: all 0.2s ease;
}

.user-info:hover {
    border-color: var(--club-color);
}

.user-info .name {
    font-size: 15px;
    font-weight: 700;
}

.user-info .role {
    color: var(--club-color);
    font-size: 12px;
    margin-top: 2px;
}

.user-info .teams {
    color: var(--subtext);
    font-size: 11px;
    margin-top: 4px;
}

.nav-list {
    list-style: none;
    flex: 1;
}

.nav-item {
    margin-bottom: 4px;
}

.nav-link {
    display: block;
    padding: 10px 15px;
    color: var(--text);
    border-radius: 8px;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.15s ease;
    position: relative;
}

.nav-link:hover {
    background-color: var(--surface0);
    text-decoration: none;
    padding-left: 18px;
}

.nav-link.active {
    background: linear-gradient(90deg, rgba(137, 180, 250, 0.15), transparent);
    color: var(--club-color);
    font-weight: 600;
    border-left: 3px solid var(--club-color);
    padding-left: 12px;
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 16px;
}

/* Main content */
.main-content {
    flex: 1;
    padding: 24px 32px;
    overflow-y: auto;
}

.page-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: -0.3px;
}

.page-subtitle {
    color: var(--subtext);
    font-size: 14px;
    margin-bottom: 24px;
}

/* Status dots */
.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
}

.status-dot.live {
    background: var(--red);
    box-shadow: 0 0 8px rgba(243, 139, 168, 0.6);
    animation: pulse-dot 1.5s infinite;
}

@keyframes pulse-dot {
    0%, 100% { box-shadow: 0 0 4px rgba(243, 139, 168, 0.4); }
    50% { box-shadow: 0 0 12px rgba(243, 139, 168, 0.8); }
}

/* ==================== VIDEO PLAYER ==================== */

.video-container {
    background-color: #000;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    margin-bottom: 16px;
}

.video-container video {
    width: 100%;
    max-height: 65vh;
    display: block;
}

.video-controls {
    background: linear-gradient(135deg, var(--mantle), rgba(24, 24, 37, 0.8));
    border: 1px solid var(--surface0);
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.controls-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.controls-row:last-child {
    margin-bottom: 0;
}

.timeline {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: var(--surface0);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

.timeline::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    background: var(--club-color);
    border-radius: 50%;
    cursor: pointer;
}

.time-display {
    font-size: 13px;
    font-family: monospace;
    color: var(--subtext);
    min-width: 70px;
}

.ctrl-btn {
    background-color: var(--surface0);
    color: var(--text);
    border: 1px solid var(--surface1);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.15s;
}

.ctrl-btn:hover {
    background-color: var(--surface1);
    border-color: var(--club-color);
}

.speed-select {
    background-color: var(--surface0);
    color: var(--text);
    border: 1px solid var(--surface1);
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 13px;
    outline: none;
    cursor: pointer;
}

.volume-slider {
    width: 100px;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    background: var(--surface0);
    border-radius: 2px;
    outline: none;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: var(--text);
    border-radius: 50%;
    cursor: pointer;
}

/* Clip section */
.clip-section {
    background: linear-gradient(135deg, var(--mantle) 0%, rgba(24, 24, 37, 0.7) 100%);
    border: 1px solid var(--surface0);
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.clip-section h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
}

.clip-btn {
    background-color: var(--surface0);
    color: var(--green);
    border: 1px solid var(--surface1);
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
}

.clip-btn:hover {
    background-color: var(--surface1);
    border-color: var(--green);
}

.clip-info {
    font-size: 13px;
    color: var(--subtext);
    font-family: monospace;
}

/* ==================== UPLOAD ==================== */

.upload-area {
    border: 2px dashed var(--surface1);
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.upload-area:hover {
    border-color: var(--club-color);
    background: rgba(137, 180, 250, 0.05);
    box-shadow: inset 0 0 20px rgba(137, 180, 250, 0.03);
    transform: scale(1.01);
}

.upload-area.dragover {
    border-color: var(--green);
    background: rgba(166, 227, 161, 0.08);
    transform: scale(1.02);
}

.upload-area.dragover {
    border-color: var(--green);
    background-color: rgba(166, 227, 161, 0.08);
}

.upload-icon {
    font-size: 40px;
    margin-bottom: 10px;
}

/* Upload thumbnails */
.upload-thumbs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.upload-thumb {
    position: relative;
    width: 140px;
    background: var(--surface0);
    border: 1px solid var(--surface1);
    border-radius: 8px;
    overflow: hidden;
}

.upload-thumb-img {
    width: 100%;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

.upload-thumb-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.upload-thumb-loading {
    width: 20px;
    height: 20px;
    border: 2px solid var(--surface1);
    border-top-color: var(--club-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.upload-thumb-name {
    font-size: 11px;
    padding: 4px 6px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text);
}

.upload-thumb-size {
    font-size: 10px;
    padding: 0 6px 4px;
    color: var(--subtext);
}

.upload-thumb-remove {
    position: absolute;
    top: 3px;
    right: 3px;
    background: rgba(0, 0, 0, 0.6);
    color: var(--red);
    border: none;
    border-radius: 4px;
    width: 18px;
    height: 18px;
    font-size: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.15s;
}

.upload-thumb:hover .upload-thumb-remove {
    opacity: 1;
}

.upload-thumb-remove:hover {
    background: var(--red);
    color: var(--base);
}

.upload-thumb-add {
    border-style: dashed;
    cursor: pointer;
    transition: border-color 0.15s;
}

.upload-thumb-add:hover {
    border-color: var(--club-color);
}

.video-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.video-team-box {
    background: var(--mantle);
    border: 1px solid var(--surface0);
    border-radius: 12px;
    overflow: hidden;
}

.video-team-header {
    font-size: 15px;
    font-weight: 700;
    padding: 12px 16px;
    background: var(--surface0);
    color: var(--club-color);
    border-bottom: 1px solid var(--surface1);
}

.video-match-box {
    border-bottom: 1px solid var(--surface0);
}
.video-match-box:last-child {
    border-bottom: none;
}

.video-match-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    cursor: pointer;
    background: var(--mantle);
    transition: background 0.15s;
}
.video-match-header:hover {
    background: var(--surface0);
}

.video-match-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.video-match-count {
    font-size: 12px;
    color: var(--subtext);
    background: var(--surface0);
    padding: 2px 8px;
    border-radius: 10px;
}

.video-match-clips {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 10px;
    padding: 10px 16px 14px;
}

.video-match-box.collapsed .video-match-clips {
    display: none;
}

.match-chevron {
    display: inline-block;
    margin-left: 4px;
    font-size: 10px;
    transition: transform 0.2s;
}
.video-match-box.collapsed .match-chevron {
    transform: rotate(-90deg);
}

.video-card-broken {
    border-color: var(--red) !important;
    background: linear-gradient(135deg, rgba(243,139,168,0.12), rgba(49,50,68,0.6)) !important;
    cursor: default !important;
    opacity: 0.85;
}

.video-broken-badge {
    background: var(--red);
    color: var(--base);
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 8px;
    display: inline-block;
}

.video-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 10px;
    padding: 10px 16px 14px;
}

.video-card {
    background: linear-gradient(135deg, var(--surface0), rgba(49, 50, 68, 0.6));
    border: 1px solid var(--surface1);
    border-radius: 10px;
    padding: 10px 12px;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.video-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--club-color), var(--teal));
    opacity: 0;
    transition: opacity 0.25s;
}

.video-card:hover {
    border-color: var(--club-color);
    background: linear-gradient(135deg, var(--surface1), rgba(69, 71, 90, 0.7));
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.video-card:hover::after {
    opacity: 1;
}

.video-card .video-name {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
    word-break: break-word;
}

.video-card .video-meta {
    display: flex;
    gap: 8px;
    font-size: 11px;
    color: var(--subtext);
    flex-wrap: wrap;
}

.video-card .video-players {
    color: var(--peach);
}

.video-card .video-notes {
    font-size: 11px;
    color: var(--overlay);
    margin-top: 4px;
    font-style: italic;
}

.video-card .video-size {
    font-size: 12px;
    color: var(--subtext);
}

.video-card.selected {
    border-color: var(--club-color);
    box-shadow: 0 0 0 2px var(--club-color);
    opacity: 0.92;
}

.video-delete-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    background: var(--surface1);
    color: var(--red);
    border: none;
    border-radius: 4px;
    width: 20px;
    height: 20px;
    font-size: 11px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-card:hover .video-delete-btn {
    opacity: 1;
}

.video-delete-btn:hover {
    background: var(--red);
    color: var(--base);
}

.video-new-badge {
    background: var(--green);
    color: var(--base);
    font-size: 9px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 3px;
    letter-spacing: 0.5px;
    line-height: 1.4;
    flex-shrink: 0;
}

.video-uploader {
    color: var(--lavender);
    font-style: italic;
}

.video-card-sm {
    padding: 6px 10px;
}
.video-card-sm .video-name {
    font-size: 12px;
}
.video-card-sm .video-meta {
    font-size: 10px;
}

.video-card-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 6px 16px 10px;
}
.video-card-grid .video-card {
    width: fit-content;
    max-width: 100%;
}

.video-section-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--subtext);
    padding: 8px 16px 2px;
}

.video-card-actions {
    margin-top: 4px;
    display: flex;
    gap: 4px;
}

.video-pres-btn {
    background: var(--surface1);
    color: var(--teal);
    border: none;
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 10px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s;
}
.video-card:hover .video-pres-btn {
    opacity: 1;
}
.video-pres-btn:hover {
    background: var(--teal);
    color: var(--base);
}

/* ==================== PRÆSENTATION ==================== */

.pres-card {
    border-bottom: 1px solid var(--surface0);
    padding: 12px 16px;
}
.pres-card:last-child {
    border-bottom: none;
}

.pres-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.pres-card-title {
    font-size: 14px;
    font-weight: 600;
}

.pres-card-meta {
    font-size: 12px;
    color: var(--subtext);
}

.pres-card-actions {
    display: flex;
    gap: 6px;
}

.pres-clips {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pres-clip-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px;
    background: var(--surface0);
    border-radius: 6px;
    font-size: 12px;
}

.pres-clip-nr {
    color: var(--club-color);
    font-weight: 700;
    min-width: 20px;
}

.pres-clip-title {
    flex: 1;
    cursor: pointer;
}
.pres-clip-title:hover {
    color: var(--club-color);
}

.pres-clip-note {
    color: var(--subtext);
    font-style: italic;
    font-size: 11px;
}

/* ==================== LIVESTREAM ==================== */

.stream-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.stream-panel {
    background-color: var(--mantle);
    border: 1px solid var(--surface0);
    border-radius: 12px;
    padding: 20px;
}

.stream-panel h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
}

.stream-preview {
    background-color: #000;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 12px;
    min-height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stream-preview video,
.stream-preview canvas {
    width: 100%;
    max-height: 480px;
    object-fit: contain;
}

.stream-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    padding: 4px 10px;
    border-radius: 6px;
    margin-bottom: 12px;
}

.stream-status.live {
    background-color: rgba(243, 139, 168, 0.15);
    color: var(--red);
}

.stream-status.offline {
    background-color: var(--surface0);
    color: var(--subtext);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.live {
    background-color: var(--red);
    animation: pulse 1.5s infinite;
}

.status-dot.offline {
    background-color: var(--overlay);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* ==================== RESPONSIVE ==================== */

/* ==================== MOBILE: Hamburger menu ==================== */

.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--mantle);
    border-bottom: 1px solid var(--surface0);
    padding: 10px 16px;
    align-items: center;
    justify-content: space-between;
    height: 52px;
}

.mobile-header-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--club-color);
}

.hamburger-btn {
    background: none;
    border: none;
    color: var(--text);
    font-size: 24px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    line-height: 1;
}

.hamburger-btn:hover {
    background: var(--surface0);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1001;
}

@media (max-width: 768px) {
    .mobile-header {
        display: flex;
    }

    .app-layout {
        flex-direction: column;
        padding-top: 52px;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: -280px;
        width: 260px;
        min-width: 260px;
        height: 100vh;
        z-index: 1002;
        transition: left 0.25s ease;
        overflow-y: auto;
        border-right: 1px solid var(--surface0);
    }

    .sidebar.open {
        left: 0;
    }

    .sidebar-overlay.open {
        display: block;
    }

    .main-content {
        padding: 16px;
        width: 100%;
    }

    .page-title {
        font-size: 20px;
    }

    .page-subtitle {
        font-size: 12px;
    }

    .clip-section h3 {
        font-size: 13px;
    }

    /* Video controls — compact */
    .video-controls .controls-row {
        flex-wrap: wrap;
        gap: 4px;
    }

    .clip-section .controls-row {
        flex-wrap: wrap;
        gap: 6px;
    }

    .speed-select {
        font-size: 11px;
        padding: 3px 4px;
    }

    .volume-slider {
        width: 60px;
    }

    /* Video player fuld bredde */
    .video-container {
        border-radius: 8px;
    }

    /* Klipmarkering stacker */
    .clip-section .controls-row .clip-btn,
    .clip-section .controls-row .clip-info {
        font-size: 11px;
    }

    /* Dashboard kort */
    .dashboard-cards {
        grid-template-columns: 1fr;
    }

    /* Video-kort grid */
    .video-card-grid {
        grid-template-columns: 1fr !important;
    }

    .video-match-clips {
        grid-template-columns: 1fr !important;
        padding: 8px 10px 10px;
    }

    /* Streams */
    .stream-container {
        grid-template-columns: 1fr;
    }

    /* Admin: storage overview */
    .storage-overview {
        grid-template-columns: 1fr !important;
    }

    /* Admin/Coach tabeller: horizontal scroll */
    .table-scroll-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .user-table {
        font-size: 12px;
        min-width: 500px;
    }

    .user-table th,
    .user-table td {
        padding: 6px 8px;
        white-space: nowrap;
    }

    /* Admin brugere + hold side-by-side → stacker */
    .admin-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .admin-row-actions {
        width: 100%;
        display: flex;
        gap: 6px;
        flex-wrap: wrap;
    }

    /* Livestream: fuld bredde preview */
    .stream-preview {
        min-height: 200px;
    }

    .stream-panel {
        padding: 12px;
    }

    .stream-panel h3 {
        font-size: 14px;
    }

    /* Storage controls stacker */
    .storage-control-row {
        flex-wrap: wrap !important;
        gap: 8px !important;
    }

    /* Logoer side-by-side → stacker */
    .logo-grid {
        grid-template-columns: 1fr !important;
    }

    /* Tag-panel grid → stack */
    #tag-panel .form-group {
        margin-bottom: 10px;
    }

    #tag-panel > div:first-child {
        grid-template-columns: 1fr !important;
    }

    /* Profil-billede upload */
    .profile-photo-container {
        width: 120px !important;
        height: 120px !important;
    }
}

/* ===================== ADMIN/COACH ROWS ===================== */

.admin-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: var(--surface0);
    border-radius: 8px;
    margin-bottom: 8px;
    gap: 12px;
    flex-wrap: wrap;
}

.admin-row-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 13px;
}

.admin-row-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.role-badge {
    background: var(--surface2);
    color: var(--text);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.player-tag {
    display: inline-block;
    background: var(--club-color);
    color: var(--base);
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    margin-right: 4px;
}

.btn-sm {
    padding: 4px 10px;
    font-size: 12px;
}

/* Team boxes i admin */
.team-box {
    background: var(--mantle);
    border: 1px solid var(--surface0);
    border-radius: 10px;
    margin-bottom: 16px;
    overflow: hidden;
    transition: border-color 0.2s;
}

.team-box:hover {
    border-color: var(--surface1);
}

.team-box-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: linear-gradient(135deg, var(--surface0), rgba(49, 50, 68, 0.7));
    font-weight: 600;
    font-size: 14px;
    color: var(--club-color);
    transition: background 0.2s;
}

.team-box-header:hover {
    background: linear-gradient(135deg, var(--surface1), rgba(69, 71, 90, 0.7));
}

.team-box .admin-row {
    margin: 0;
    border-radius: 0;
    border-bottom: 1px solid var(--surface0);
}

.team-box .admin-row:last-child {
    border-bottom: none;
}

/* ===================== FAMILIE-OVERSIGT (Admin) ===================== */

.family-card {
    background: var(--mantle);
    border-radius: 10px;
    padding: 10px 12px;
    width: 220px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.family-player {
    display: flex;
    align-items: center;
    gap: 8px;
}

.family-photo {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid var(--surface1);
}

.family-photo-placeholder {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--surface0);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.family-info {
    min-width: 0;
}

.family-name {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.family-nr {
    display: inline-block;
    background: var(--peach);
    color: var(--base);
    font-size: 10px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 4px;
    margin-right: 5px;
}

.family-meta {
    font-size: 10px;
    color: var(--subtext);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.family-parent {
    display: flex;
    align-items: center;
    gap: 5px;
    padding-left: 6px;
    font-size: 12px;
}

.family-link-line {
    color: var(--surface2);
    font-family: monospace;
    font-size: 14px;
    line-height: 1;
}

.family-photo-sm {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.family-parent-name {
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.family-parent-label {
    font-size: 10px;
    color: var(--overlay);
    flex-shrink: 0;
}

.family-no-parent {
    opacity: 0.5;
}

/* ===================== USER TABLE (Admin) ===================== */

.user-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.user-table thead th {
    text-align: left;
    padding: 8px 10px;
    color: var(--subtext);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--surface1);
    white-space: nowrap;
}

.user-table-row td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--surface0);
    vertical-align: middle;
}

.user-table-row:last-child td {
    border-bottom: none;
}

.user-table-row:hover td {
    background-color: var(--surface0);
}

.ut-nr { width: 45px; text-align: center; }
.ut-name { min-width: 140px; font-weight: 600; }
.ut-role { width: 90px; }
.ut-email { color: var(--subtext); }
.ut-teams { color: var(--teal); font-size: 11px; }
.ut-actions { white-space: nowrap; text-align: right; }

.player-nr {
    display: inline-block;
    background: var(--peach);
    color: var(--base);
    width: 28px;
    height: 28px;
    line-height: 28px;
    text-align: center;
    border-radius: 6px;
    font-weight: 700;
    font-size: 13px;
}

.player-nr-empty {
    color: var(--surface2);
}

.status-pending {
    color: var(--yellow);
    font-size: 11px;
    font-weight: 400;
}

/* ===================== PLAYER CHECKBOXES (Tagging) ===================== */

.player-checkbox {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
}

.player-checkbox input[type="checkbox"] {
    display: none;
}

.player-check-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 13px;
    background: var(--surface1);
    color: var(--text);
    border: 1px solid transparent;
    transition: all 0.15s;
}

.player-checkbox input:checked + .player-check-label {
    background: rgba(166, 227, 161, 0.15);
    border-color: var(--green);
    color: var(--green);
}

.player-check-nr {
    background: var(--peach);
    color: var(--base);
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
}

.player-checkbox input:checked + .player-check-label .player-check-nr {
    background: var(--green);
}

.player-photo-sm {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--surface2);
    flex-shrink: 0;
}

.player-checkbox input:checked + .player-check-label .player-photo-sm {
    border-color: var(--green);
}

/* ==================== PRÆSENTATION POPUP ==================== */

.pres-popup {
    position: absolute;
    z-index: 1000;
    background: var(--mantle);
    border: 1px solid var(--surface1);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    width: 250px;
    overflow: hidden;
}

.pres-popup-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--subtext);
    padding: 10px 12px 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.pres-popup-list {
    max-height: 180px;
    overflow-y: auto;
}

.pres-popup-item {
    padding: 8px 12px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.1s;
}

.pres-popup-item:hover {
    background: var(--surface0);
    color: var(--club-color);
}

.pres-popup-team {
    font-size: 11px;
    color: var(--overlay);
}

.pres-popup-new {
    display: flex;
    gap: 6px;
    padding: 8px 12px 10px;
    border-top: 1px solid var(--surface0);
}

.pres-popup-new .form-input {
    flex: 1;
    min-width: 0;
}

/* ==================== TOAST ==================== */

.toast-msg {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--base);
    font-size: 13px;
    font-weight: 600;
    padding: 8px 20px;
    border-radius: 8px;
    z-index: 9999;
    animation: toast-fade 2.5s ease forwards;
    pointer-events: none;
}

@keyframes toast-fade {
    0% { opacity: 0; transform: translateX(-50%) translateY(10px); }
    10% { opacity: 1; transform: translateX(-50%) translateY(0); }
    80% { opacity: 1; }
    100% { opacity: 0; }
}

/* ==================== ANNOTATIONS ==================== */

.video-container:fullscreen,
.video-container:-webkit-full-screen {
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    max-height: none !important;
}

.video-container:fullscreen video,
.video-container:-webkit-full-screen video {
    max-width: 100vw;
    max-height: 100vh;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.video-container:fullscreen .annotation-canvas,
.video-container:-webkit-full-screen .annotation-canvas {
    z-index: 10;
}

.annotation-canvas {
    position: absolute;
    pointer-events: none;
    z-index: 10;
}

.annotation-canvas.drawing {
    pointer-events: auto;
    cursor: crosshair;
}

.zoom-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: var(--text);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    z-index: 20;
    pointer-events: none;
    transition: opacity 0.5s;
}

.annotation-toolbar-wrapper {
    margin-bottom: 8px;
}

.annotation-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--mantle);
    border: 1px solid var(--surface0);
    border-radius: 10px;
    padding: 8px 14px;
    flex-wrap: wrap;
}

.ann-tools, .ann-colors, .ann-actions {
    display: flex;
    gap: 4px;
    align-items: center;
}

.ann-divider {
    width: 1px;
    height: 24px;
    background: var(--surface1);
}

.ann-tool {
    background: var(--surface0);
    color: var(--text);
    border: 1px solid var(--surface1);
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.15s;
}

.ann-tool:hover {
    background: var(--surface1);
}

.ann-tool.active {
    border-color: var(--club-color);
    background: var(--surface1);
    color: var(--club-color);
}

.ann-color {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: border-color 0.15s;
}

.ann-color:hover {
    border-color: var(--surface2);
}

.ann-color.active {
    border-color: var(--text);
}

.ann-action {
    background: var(--surface0);
    color: var(--subtext);
    border: 1px solid var(--surface1);
    border-radius: 6px;
    padding: 5px 10px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s;
}

.ann-action:hover {
    background: var(--surface1);
    color: var(--text);
}

.ann-save {
    background: var(--green);
    color: var(--base);
    border-color: var(--green);
}

.ann-save:hover {
    background: var(--teal);
    border-color: var(--teal);
}

.ann-burn {
    background: var(--club-color);
    color: var(--base);
    border-color: var(--club-color);
}

.ann-burn:hover {
    background: var(--sapphire);
    border-color: var(--sapphire);
}

.ann-burn:disabled {
    opacity: 0.5;
    cursor: wait;
}

/* Annotation guide */
.ann-guide {
    display: none;
    background: var(--mantle);
    border: 1px solid var(--surface0);
    border-top: none;
    border-radius: 0 0 10px 10px;
    padding: 14px 18px;
    font-size: 13px;
    color: var(--text);
    line-height: 1.6;
}

.ann-guide-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--club-color);
}

.ann-guide-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 20px;
    margin-bottom: 12px;
}

.ann-guide-item {
    font-size: 12px;
    color: var(--subtext);
}

.ann-guide-item strong {
    color: var(--text);
}

.ann-guide-icon {
    display: inline-block;
    width: 20px;
    text-align: center;
}

.ann-guide-section {
    font-size: 12px;
    color: var(--subtext);
    margin-bottom: 6px;
}

.ann-guide-section strong {
    color: var(--text);
}

.ann-guide kbd {
    background: var(--surface0);
    border: 1px solid var(--surface1);
    border-radius: 3px;
    padding: 1px 5px;
    font-size: 11px;
    font-family: monospace;
    color: var(--text);
}

#ann-help-toggle {
    font-weight: 700;
    font-size: 13px;
    min-width: 26px;
    text-align: center;
}

.ann-text-input {
    position: absolute;
    z-index: 20;
    background: var(--surface0);
    color: var(--text);
    border: 1px solid var(--club-color);
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 14px;
    font-family: 'Segoe UI', system-ui, sans-serif;
    outline: none;
    min-width: 120px;
}

/* Annotation list */
.ann-list {
    background: var(--mantle);
    border: 1px solid var(--surface0);
    border-top: none;
    border-radius: 0 0 10px 10px;
    padding: 0;
    max-height: 240px;
    overflow-y: auto;
}

.ann-list-header {
    font-size: 12px;
    font-weight: 700;
    color: var(--subtext);
    padding: 8px 14px 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ann-list-empty {
    padding: 10px 14px;
    font-size: 12px;
    color: var(--overlay);
    font-style: italic;
}

.ann-list-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    font-size: 12px;
    color: var(--text);
    cursor: pointer;
    transition: background 0.1s;
    border-bottom: 1px solid var(--surface0);
}

.ann-list-item:last-child {
    border-bottom: none;
}

.ann-list-item:hover {
    background: var(--surface0);
}

.ann-list-item.ann-list-selected {
    background: var(--surface0);
    border-left: 3px solid var(--club-color);
}

.ann-list-icon {
    font-size: 14px;
    flex-shrink: 0;
    width: 20px;
    text-align: center;
}

.ann-list-label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--subtext);
}

.ann-list-time-label {
    font-size: 10px;
    color: var(--overlay);
    flex-shrink: 0;
}

.ann-time-input {
    width: 52px;
    background: var(--surface0);
    color: var(--text);
    border: 1px solid var(--surface1);
    border-radius: 4px;
    padding: 2px 4px;
    font-size: 11px;
    text-align: center;
    flex-shrink: 0;
}

.ann-time-input:focus {
    border-color: var(--club-color);
    outline: none;
}

.ann-list-delete {
    background: none;
    border: none;
    color: var(--overlay);
    font-size: 14px;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 4px;
    flex-shrink: 0;
    transition: all 0.15s;
}

.ann-list-delete:hover {
    color: var(--red);
    background: var(--surface1);
}

/* Keyframe badge og underliste */
.ann-kf-badge {
    font-size: 10px;
    color: var(--yellow);
    flex-shrink: 0;
    margin-left: 2px;
    font-weight: 700;
}

.ann-kf-list {
    background: var(--crust);
    padding: 2px 14px 4px 40px;
    border-bottom: 1px solid var(--surface0);
}

.ann-kf-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 2px 0;
    font-size: 11px;
    color: var(--subtext);
}

.ann-kf-diamond {
    color: var(--yellow);
    font-size: 10px;
}

.ann-kf-time {
    min-width: 40px;
}

.ann-kf-goto,
.ann-kf-delete {
    background: none;
    border: none;
    color: var(--overlay);
    font-size: 11px;
    cursor: pointer;
    padding: 1px 4px;
    border-radius: 3px;
    transition: all 0.15s;
}

.ann-kf-goto:hover {
    color: var(--club-color);
    background: var(--surface0);
}

.ann-kf-delete:hover {
    color: var(--red);
    background: var(--surface0);
}

/* ==================== Storage Management ==================== */

.storage-overview {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.storage-stat {
    flex: 1;
    min-width: 160px;
    background: var(--surface0);
    border-radius: 8px;
    padding: 12px 14px;
}

.storage-stat-label {
    font-size: 11px;
    color: var(--subtext);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.storage-stat-value {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 6px;
}

.storage-bar {
    height: 6px;
    background: var(--surface1);
    border-radius: 3px;
    overflow: hidden;
}

.storage-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s;
}

.storage-controls {
    padding: 10px 0;
    border-top: 1px solid var(--surface0);
}

.storage-control-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* ==================== OneDrive Browser ==================== */

.onedrive-browse-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 6px;
    transition: border-color 0.2s;
}

.onedrive-browse-btn:hover {
    border-color: var(--club-color) !important;
}

.onedrive-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.7);
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.onedrive-modal-content {
    background: var(--mantle);
    border: 1px solid var(--surface1);
    border-radius: 12px;
    width: 600px;
    max-width: 90vw;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}

.onedrive-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--surface0);
    font-weight: 600;
    font-size: 14px;
}

.onedrive-modal-close {
    background: none;
    border: none;
    color: var(--subtext);
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
}

.onedrive-modal-close:hover {
    background: var(--surface0);
    color: var(--red);
}

.onedrive-nav {
    display: flex;
    align-items: center;
    padding: 8px 18px;
    border-bottom: 1px solid var(--surface0);
}

.onedrive-file-list {
    flex: 1;
    overflow-y: auto;
    padding: 4px 0;
}

.onedrive-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 18px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.15s;
}

.onedrive-item:hover {
    background: var(--surface0);
}

.onedrive-item-icon {
    font-size: 16px;
    flex-shrink: 0;
}

.onedrive-item-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.onedrive-item-size {
    font-size: 11px;
    color: var(--subtext);
    flex-shrink: 0;
}

.onedrive-check {
    accent-color: var(--club-color);
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.onedrive-folder .onedrive-item-name {
    color: var(--club-color);
    font-weight: 500;
}

.onedrive-file.selected {
    background: var(--surface0);
}

.onedrive-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    border-top: 1px solid var(--surface0);
}

/* ==================== REDIGERING: To-kolonne layout ==================== */

.edit-layout {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.edit-player-col {
    flex: 1;
    min-width: 0;
}

.edit-clips-col {
    width: 320px;
    flex-shrink: 0;
}

.clip-browser {
    background: var(--mantle);
    border: 1px solid var(--surface0);
    border-radius: 12px;
    padding: 16px;
    position: sticky;
    top: 16px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

/* Klip-items i browseren */
.cb-section-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--subtext);
    padding: 10px 0 4px;
}

.cb-clip-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
    border: 1px solid transparent;
}

.cb-clip-item:hover {
    background: var(--surface0);
}

.cb-clip-item.cb-clip-active {
    background: var(--surface0);
    border-color: var(--club-color);
}

.cb-clip-item.cb-clip-exported {
    border-left: 3px solid var(--green);
}

.cb-clip-check {
    margin-top: 3px;
    flex-shrink: 0;
    accent-color: var(--club-color);
}

.cb-clip-info {
    min-width: 0;
    flex: 1;
}

.cb-clip-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cb-clip-meta {
    font-size: 11px;
    color: var(--subtext);
    display: flex;
    gap: 8px;
    margin-top: 2px;
}

.cb-clip-notes {
    font-size: 11px;
    color: var(--overlay);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Responsive: stack på små skærme */
@media (max-width: 900px) {
    .edit-layout {
        flex-direction: column;
    }
    .edit-clips-col {
        width: 100%;
    }
    .clip-browser {
        position: static;
        max-height: none;
    }
}
