﻿/* ============================================================================
   Play or Pay - Stylesheet
   ============================================================================ */

/* CSS Variables */
:root {
    --primary-color: #1b2838;
    --primary-light: #2a3f5f;
    --primary-dark: #0d1117;
    --accent-color: #1790d9;
    --success-color: #27ae60;
    --text-color: #ecf0f1;
    --text-muted: #95a5a6;
    --bg-color: #0d1117;
    --card-bg: #1a1f26;
    --border-color: #30363d;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

/* ============================================================================
   Global Styles
   ============================================================================ */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ============================================================================
   Navigation
   ============================================================================ */

.navbar {
    background-color: var(--primary-color);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent-color);
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.95rem;
}

.nav-links a:hover {
    color: var(--accent-color);
}

/* â”€â”€ Notification bell â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.notif-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.notif-bell {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0.2rem 0.3rem;
    position: relative;
    line-height: 1;
    color: var(--text-color);
    display: flex;
    align-items: center;
}
.notif-bell:hover { color: var(--accent-color); }
.notif-badge {
    position: absolute;
    top: -4px;
    right: -6px;
    background: #e74c3c;
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    pointer-events: none;
}
.notif-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 320px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    z-index: 1000;
    overflow: hidden;
}
.notif-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.65rem 0.9rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-color);
}
.notif-mark-all {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.75rem;
    color: var(--accent-color);
    padding: 0;
}
.notif-mark-all:hover { text-decoration: underline; }
.notif-list {
    max-height: 360px;
    overflow-y: auto;
}
.notif-empty {
    padding: 1.2rem 0.9rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}
.notif-item {
    padding: 0.6rem 0.9rem;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background 0.15s;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: rgba(255,255,255,0.05); }
.notif-item--unread {
    background: rgba(100,181,246,0.07);
    border-left: 3px solid var(--accent-color);
}
.notif-item--unread:hover { background: rgba(100,181,246,0.12); }
.notif-item-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.2rem;
}
.notif-item-meta {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    font-size: 0.72rem;
    color: var(--text-muted);
}
.notif-item-author { font-weight: 500; }

/* â”€â”€ end notifications â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.btn-login,
.btn-logout {
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-weight: 600;
}

.btn-login {
    background-color: var(--accent-color);
    color: white;
}

.btn-login:hover {
    background-color: #0d66c1;
    color: white;
}

.btn-logout {
    background-color: var(--primary-dark);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.btn-logout:hover {
    background-color: var(--primary-light);
}

/* Steam Login Button */
.steam-button-small {
    display: inline-flex;
    align-items: center;
}

.steam-button-small img {
    height: auto;
    width: auto;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.steam-button-small:hover img {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.steam-login-button {
    display: inline-block;
    margin-top: 1.5rem;
}

.steam-login-button img {
    height: auto;
    width: auto;
    transition: transform 0.2s ease, filter 0.2s ease;
    cursor: pointer;
}

.steam-login-button:hover img {
    transform: scale(1.05);
    filter: brightness(1.1);
}

/* ============================================================================
   Container & Layout
   ============================================================================ */

.container {
    max-width: 1600px;
    width: 100%;
    margin: 0 auto;
    padding: 0 2rem;
    flex: 1;
}

/* ============================================================================
   Cards
   ============================================================================ */

.card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.welcome-card,
.login-card,
.profile-card {
    @extend .card;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================================================
   Welcome Card (Home Page)
   ============================================================================ */

.welcome-card {
    text-align: center;
}

.user-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.avatar {
    width: 120px;
    height: 120px;
    border-radius: 8px;
    border: 2px solid var(--accent-color);
    object-fit: cover;
}

.avatar-placeholder,
.avatar-placeholder-large {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-color);
    color: var(--text-muted);
    font-weight: 600;
    border-radius: 8px;
    border: 2px solid var(--border-color);
}

.avatar-placeholder {
    width: 120px;
    height: 120px;
}

.avatar-placeholder-large {
    width: 200px;
    height: 200px;
    font-size: 1.1rem;
}

.user-info {
    text-align: left;
    flex: 1;
}

.user-info h1 {
    margin-bottom: 0.5rem;
}

.steam-id {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.steam-id code {
    background-color: var(--primary-color);
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    font-family: 'Monaco', 'Courier New', monospace;
}

/* ============================================================================
   Login Card
   ============================================================================ */

.login-card {
    text-align: center;
    max-width: 500px;
    margin: 3rem auto;
}

.login-card h1 {
    margin-bottom: 1rem;
    font-size: 2rem;
}

.login-card p {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

/* ============================================================================
   Not Member Card
   ============================================================================ */

.not-member-card {
    text-align: center;
    max-width: 500px;
    margin: 3rem auto;
}

.not-member-content {
    padding: 2rem;
    background-color: var(--card-bg);
    border: 2px solid #d32f2f;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(211, 47, 47, 0.2);
}

.not-member-card h1 {
    margin-bottom: 1rem;
    font-size: 2rem;
    color: #ff6b6b;
}

.not-member-card p {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.success-message {
    background-color: var(--primary-color);
    border-left: 4px solid #27ae60;
    color: #66bb6a;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
}

.error-message {
    background-color: var(--primary-color);
    border-left: 4px solid #d32f2f;
    padding: 1rem;
    margin: 1.5rem 0;
    border-radius: 4px;
    color: #ff6b6b;
}

.error-message strong {
    color: #ff6b6b;
}

/* ============================================================================
   Profile Card
   ============================================================================ */

.profile-card {
    max-width: 600px;
    margin: 0 auto;
}

/* Status switch */
.status-switch {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    cursor: pointer;
    user-select: none;
}

.status-switch-track {
    position: relative;
    width: 44px;
    height: 24px;
    border-radius: 12px;
    background: rgba(255,255,255,0.12);
    border: 1px solid var(--border-color);
    transition: background 0.25s, border-color 0.25s;
    flex-shrink: 0;
}

.status-switch--on {
    background: #27ae60;
    border-color: #27ae60;
}

.status-switch-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.4);
    transition: transform 0.25s;
}

.status-switch--on .status-switch-thumb {
    transform: translateX(20px);
}

.status-switch-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-color);
}

.status-switch:hover .status-switch-track {
    border-color: #27ae60;
}

.status-confirm {
    margin-top: 0.6rem;
    background: var(--primary-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.6rem 0.75rem;
}

.status-confirm-msg {
    font-size: 0.82rem;
    color: var(--text-color);
    margin: 0 0 0.5rem;
    line-height: 1.4;
}

.status-confirm-actions {
    display: flex;
    gap: 0.5rem;
}

.profile-header {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.profile-header img {
    width: 60%;
    max-width: 180px;
    border-radius: 8px;
    border: 4px solid #000;
    display: block;
}

.profile-info h1 {
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

/* ============================================================================
   Info Lists
   ============================================================================ */

.info-list {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem 1.5rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background-color: var(--primary-color);
    border-radius: 6px;
}

.info-list dt {
    font-weight: 600;
    color: var(--accent-color);
}

.info-list dd {
    word-break: break-word;
}

.info-list a {
    color: var(--accent-color);
    text-decoration: none;
}

.info-list a:hover {
    text-decoration: underline;
}

.info-list code {
    background-color: var(--primary-dark);
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.85rem;
}

/* ============================================================================
   Buttons
   ============================================================================ */

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--accent-color);
    color: white;
}

.btn-primary:hover {
    background-color: #0d66c1;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background-color: var(--primary-light);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    transform: translateY(-2px);
}

.btn-steam {
    background-color: var(--primary-color);
    color: var(--text-color);
    border: 2px solid var(--accent-color);
    font-size: 1.1rem;
    padding: 1rem 2rem;
}

.btn-steam:hover {
    background-color: var(--accent-color);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================================================
   Cycles (list page)
   ============================================================================ */

.cycle-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cycle-entry {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    text-align: left;
    align-items: stretch;
}

.cycle-entry-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.cycle-name {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-color);
}

.cycle-dates {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.cycle-description {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.cycle-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.cycle-entry-link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.cycle-entry-link:hover {
    border-color: var(--accent-color);
    box-shadow: var(--shadow);
}

/* Inner link fills the card when there's also an edit button */
.cycle-entry-inner {
    display: block;
    text-decoration: none;
    color: inherit;
}
.cycle-entry:has(.cycle-entry-inner:hover) {
    border-color: var(--accent-color);
    box-shadow: var(--shadow);
}

/* Action bar â€” inline row of icon buttons between cycle name and status pill */
.cycle-action-bar {
    display: inline-flex;
    gap: 0.3rem;
    flex-shrink: 0;
}
.cycle-action-btn {
    background: none;
    border: 1px solid transparent;
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0.15rem 0.45rem;
    line-height: 1.4;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.cycle-action-btn:hover {
    color: var(--accent-color);
    border-color: var(--accent-color);
    background: rgba(100,181,246,0.08);
}
.cycle-action-btn--danger:hover {
    color: #e74c3c;
    border-color: #e74c3c;
    background: rgba(231,76,60,0.08);
}

/* Add/Remove participant rows */
.ar-participant-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.45rem 0;
    border-bottom: 1px solid var(--border-color);
}
.ar-participant-row:last-child { border-bottom: none; }

.cycle-time-status {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    white-space: nowrap;
}

.cycle-status--upcoming { background: rgba(23,144,217,0.15); color: #1790d9; border: 1px solid #1790d9; }
.cycle-status--running  { background: rgba(39,174,96,0.15);  color: #27ae60; border: 1px solid #27ae60; }
.cycle-status--ended    { background: rgba(149,165,166,0.15); color: #95a5a6; border: 1px solid #95a5a6; }

/* Compact status pill shown on the cycles list */
.cycle-status-pill {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.15rem 0.55rem;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}
.cycle-status-pill--not-started { background: rgba(23,144,217,0.15);  color: #1790d9; border: 1px solid rgba(23,144,217,0.4); }
.cycle-status-pill--running     { background: rgba(39,174,96,0.15);   color: #27ae60; border: 1px solid rgba(39,174,96,0.4); }
.cycle-status-pill--ended       { background: rgba(149,165,166,0.15); color: #95a5a6; border: 1px solid rgba(149,165,166,0.4); }

.cycle-assignment-summary {
    display: flex;
    gap: 1.5rem;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* ============================================================================
   Cycle Cards (profile page)
   ============================================================================ */

.cycle-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    scroll-margin-top: 1rem;
}

/* Permalink target highlight */
.cycle-card--highlight {
    animation: cycle-card-flash 2.6s ease-out;
}
@keyframes cycle-card-flash {
    0%   { box-shadow: 0 0 0 3px var(--accent-color); border-color: var(--accent-color); }
    70%  { box-shadow: 0 0 0 3px var(--accent-color); border-color: var(--accent-color); }
    100% { box-shadow: 0 0 0 0 transparent; }
}

.cycle-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background-color: var(--primary-color);
    border-bottom: 1px solid var(--border-color);
}

.cycle-card-body {
    display: flex;
    min-height: 160px;
}

/* Left sidebar */
.cycle-sidebar {
    width: 200px;
    flex-shrink: 0;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.cycle-panel {
    padding: 0.6rem 0.8rem;
    border-bottom: 1px solid var(--border-color);
}

.cycle-panel:last-child {
    border-bottom: none;
}

.cycle-panel-label {
    font-size: 0.72rem;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.4rem;
}

.cycle-user-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cycle-user-link {
    text-decoration: none;
    color: inherit;
}

.cycle-avatar {
    width: 36px;
    height: 36px;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
}

.cycle-avatar-placeholder {
    background-color: var(--primary-color);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.cycle-username {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-color);
}

.cycle-username-link:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

.cycle-avatar-link { display: inline-flex; flex-shrink: 0; }

.cycle-user-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    min-width: 0;
}

.cycle-links {
    display: flex;
    gap: 0.4rem;
    margin-top: 0.2rem;
    padding: 0;
}

.cycle-links a {
    font-size: 0.7rem;
    color: var(--accent-color);
    text-decoration: none;
}

.cycle-links a:hover {
    text-decoration: underline;
}

.cycle-rules-text {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.5;
    white-space: pre-wrap;
    margin-top: 0.25rem;
}

/* Right content area */
.cycle-content {
    flex: 1;
    padding: 1rem;
}

/* Participant full-width row */
.cycle-participant-row {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.6rem 1rem;
    background-color: var(--primary-color);
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
}

/* Participant label + avatar + name/links, kept vertically centered together */
.cycle-participant-main {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

/* Stacked meta column: Pending wins / Wants to play / Extra rules */
.cycle-part-meta {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex: 1;
    min-width: 0;
    padding-top: 0.15rem;
}
.cycle-meta-row {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    flex-wrap: wrap;
    font-size: 0.8rem;
}
.cycle-meta-label {
    min-width: 108px;
    flex-shrink: 0;
    white-space: nowrap;
}

.cycle-participant-rules {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    margin-left: auto;
    font-size: 0.78rem;
    color: var(--text-muted);
    flex-wrap: wrap;
    max-width: 50%;
}

/* Picker rows: 5 columns */
.cycle-picker-row {
    display: grid;
    grid-template-columns: 180px repeat(4, 1fr);
    border-bottom: 1px solid var(--border-color);
    min-height: 80px;
}

.cycle-picker-row--minor {
    border-bottom: none;
}

.cycle-picker-info {
    padding: 0.6rem 0.8rem;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.cycle-picker-slot {
    padding: 0.7rem 0.8rem;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.cycle-picker-slot:last-child {
    border-right: none;
}

.cycle-picker-slot--empty {
    background-color: rgba(0, 0, 0, 0.1);
}

.cycle-slot-label-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.1rem;
}

.slot-repick-label,
.slot-review-label,
.slot-rejected-label {
    font-size: 0.65rem;
    font-weight: 700;
    border-radius: 20px;
    padding: 0.1rem 0.45rem;
    white-space: nowrap;
}
.slot-repick-label {
    color: #ffa726;
    background: rgba(255,167,38,0.12);
    border: 1px solid rgba(255,167,38,0.35);
}
.slot-review-label {
    color: #64b5f6;
    background: rgba(100,181,246,0.12);
    border: 1px solid rgba(100,181,246,0.35);
}
.slot-rejected-label {
    color: #e74c3c;
    background: rgba(231,76,60,0.12);
    border: 1px solid rgba(231,76,60,0.35);
}

.cycle-slot-label {
    font-size: 0.72rem;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    margin: 0;
}

/* Picks review tabs */
.review-tabs {
    display: flex;
    gap: 0.25rem;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 1.25rem;
}

.review-tab {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    padding: 0.5rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.15s;
}

.review-tab:hover { color: var(--text-color); }

.review-tab--active {
    color: var(--text-color);
    border-bottom-color: var(--accent-color);
}

.review-tab-count {
    background: rgba(255,255,255,0.12);
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 10px;
    padding: 0.1rem 0.45rem;
    min-width: 18px;
    text-align: center;
}

.review-tab-count--approved {
    background: rgba(39,174,96,0.2);
    color: #27ae60;
}

.review-tab-count--rejected {
    background: rgba(192,57,43,0.2);
    color: #c0392b;
}

/* Review action buttons */
.picks-review-actions {
    display: flex;
    gap: 0.4rem;
    justify-content: flex-end;
}

.picks-review-btn {
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 6px;
    padding: 0.3rem 0.65rem;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.15s;
}

.picks-review-btn:disabled { opacity: 0.5; cursor: default; }

.btn-timeline { background: rgba(255,255,255,0.08); color: var(--text-color); border: 1px solid var(--border-color); }
.btn-timeline:hover { background: rgba(255,255,255,0.14); }

.btn-approve { background: #27ae60; color: #fff; }
.btn-approve:hover { opacity: 0.85; }

.btn-reject  { background: #c0392b; color: #fff; }
.btn-reject:hover { opacity: 0.85; }

.btn-undo    { background: #c0392b; color: #fff; }
.btn-undo:hover { opacity: 0.85; }

/* Picks review list */
.picks-review-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.picks-review-row {
    display: grid;
    grid-template-columns: 80px 1fr 180px 110px 130px 160px;
    align-items: center;
    gap: 1rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.6rem 1rem;
}

.picks-review-row--approved {
    border-color: #27ae60;
    background: rgba(39, 174, 96, 0.05);
}

.picks-review-row--rejected {
    border-color: #c0392b;
    background: rgba(192, 57, 43, 0.05);
}

/* Giveaways review override — 4 cols: thumb | info | winner | actions */
.ga-review-row {
    grid-template-columns: 80px 1fr 180px auto;
}
.ga-review-row .picks-review-actions {
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: 0.3rem;
}
.ga-review-row .picks-review-btn {
    padding: 0.3rem 0.45rem;
    font-size: 0.72rem;
}

.review-empty {
    color: var(--text-muted);
    padding: 1rem 0;
}

/* Wide modal variant â€” must override .modal max-width */

/* Timeline estimator inputs */
.tl-estimator {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    padding: 0.6rem 0.85rem;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border-color);
    border-radius: 6px;
}

.tl-estimator-field {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    cursor: default;
}

.tl-estimator-input {
    width: 60px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-color);
    font-size: 0.82rem;
    padding: 0.25rem 0.4rem;
    outline: none;
    text-align: center;
}

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

/* Timeline */
.tl-sessions {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 1.25rem;
}

.tl-session-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.45rem 0.85rem;
    font-size: 0.82rem;
}

.tl-session-num {
    font-weight: 700;
    color: var(--accent-color);
    white-space: nowrap;
    min-width: 72px;
}

.tl-session-dates {
    color: var(--text-muted);
    flex: 1;
}

.tl-session-dur {
    font-weight: 600;
    color: var(--text-color);
    white-space: nowrap;
}

.tl-session-total {
    font-size: 0.82rem;
    color: var(--text-muted);
    text-align: right;
    padding: 0.2rem 0.85rem 0;
}

.tl-chart {
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

.tl-day-group {
    margin-bottom: 1rem;
}

.tl-day-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.4rem;
}

.tl-day-achs {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding-left: 0.5rem;
    border-left: 2px solid var(--border-color);
}

.tl-ach-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.8rem;
}

.tl-ach-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
}

.tl-ach-time {
    color: var(--text-muted);
    font-size: 0.75rem;
    min-width: 75px;
    white-space: nowrap;
}

.tl-ach-name {
    color: var(--text-color);
}

.picks-review-thumb {
    width: 80px;
    height: auto;
    border-radius: 4px;
    flex-shrink: 0;
}

.picks-review-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
    min-width: 160px;
}

.picks-review-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-color);
}

.picks-review-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.picks-review-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.78rem;
    color: var(--text-muted);
    text-decoration: none;
}

.picks-review-link:hover {
    color: var(--accent-color);
}

.picks-review-playtime {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.picks-review-participant {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    overflow: hidden;
}

.picks-review-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.picks-review-slot {
    font-size: 0.72rem;
    color: var(--text-muted);
    white-space: nowrap;
    text-align: right;
}

/* Pick display */
.pick-display {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    padding: 0.25rem 0;
}

.pick-header-img {
    width: 60%;
    border-radius: 4px;
    display: block;
    margin: 0.4rem auto;
}

.pick-name {
    font-size: 0.82rem;
    color: var(--text-color);
    line-height: 1.3;
    margin: 0;
}

.pick-stats {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
}

.pick-stats-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    flex: 1;
}

.pick-stats-points {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
}

.pick-achievements-link {
    font-size: 0.78rem;
    color: var(--text-muted);
    text-decoration: none;
}

.pick-achievements-link:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

.pick-playtime {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.pick-change-btn {
    background: none;
    border: none;
    padding: 0;
    font-size: 0.7rem;
    color: var(--text-muted);
    cursor: pointer;
    text-align: left;
    text-decoration: underline;
}

.pick-change-btn:hover {
    color: var(--accent-color);
}

/* Game search */
.pick-search-wrap {
    position: relative;
    display: flex;
    flex-direction: column;
}

.pick-search-input {
    width: 100%;
    box-sizing: border-box;
    background: var(--input-bg, #1a1a2e);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-color);
    font-size: 0.78rem;
    padding: 0.35rem 0.5rem;
    outline: none;
}

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

.pick-results {
    display: none;
    margin-top: 2px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.5);
    max-height: 260px;
    overflow-y: auto;
}

.pick-result-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.5rem;
    cursor: pointer;
    font-size: 0.8rem;
    color: var(--text-color);
}

.pick-result-item:hover {
    background: rgba(255,255,255,0.07);
}

.pick-result-empty {
    padding: 0.5rem 0.75rem;
    font-size: 0.82rem;
    color: var(--text-muted);
}

/* Pick status */
.pick-status-display {
    font-size: 0.72rem;
    font-weight: 600;
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    border: none;
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.3rem;
}

.pick-status-arrow {
    font-size: 0.6rem;
    opacity: 0.8;
}

.pick-status-badge {
    font-size: 0.72rem;
    font-weight: 600;
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    display: inline-block;
    cursor: default;
}

/* Shared color states â€” apply to display button, badge, and dropdown options */
.pick-status--not-started { background: rgba(255,255,255,0.08); color: var(--text-muted); }
.pick-status--unfinished  { background: #e67e22; color: #fff; }
.pick-status--beaten      { background: #27ae60; color: #fff; }
.pick-status--completed   { background: #64b5f6; color: #fff; }
.pick-status--abandoned   { background: #c0392b; color: #fff; }

/* Custom status dropdown */
.pick-status-dropdown {
    margin-top: 4px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.5);
    overflow: hidden;
}

.pick-status-option {
    padding: 0.4rem 0.75rem;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pick-status-option::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}

.pick-status-option:hover {
    filter: brightness(1.15);
}

.pick-result-item img {
    width: 60px;
    height: auto;
    border-radius: 3px;
    flex-shrink: 0;
}

/* ============================================================================
   Modal
   ============================================================================ */

.modal-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 100;
    align-items: center;
    justify-content: center;
}

.modal-backdrop.open {
    display: flex;
}

.modal {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    gap: 0;
}

.modal.modal--wide {
    max-width: 1100px;
    width: 80vw;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 1rem;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--text-color);
}

.modal-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
}

.field-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}

.field-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    background: var(--primary-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-color);
    font-size: 0.9rem;
}

.field-input:focus {
    outline: none;
    border-color: var(--accent-color);
}

select.field-input {
    appearance: none;
    cursor: pointer;
}

.field-msg {
    font-size: 0.82rem;
    min-height: 1.2em;
}

/* ============================================================================
   Debug Panel
   ============================================================================ */

.debug-panel {
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: var(--primary-dark);
    border: 1px dashed var(--border-color);
    border-radius: 6px;
    font-size: 0.85rem;
}

.debug-panel h3 {
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.debug-panel dl {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.5rem 1rem;
}

.debug-panel dt {
    font-weight: 600;
    color: var(--text-muted);
}

.debug-panel dd {
    word-break: break-all;
}

.debug-panel pre {
    background-color: var(--primary-color);
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
    margin-top: 1rem;
}

/* ============================================================================
   Footer
   ============================================================================ */

footer {
    background-color: var(--primary-color);
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    margin-top: 3rem;
    text-align: center;
    color: var(--text-muted);
}

/* ============================================================================
   Giveaways page
   ============================================================================ */

.ga-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.ga-card {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.9rem 1rem;
    transition: border-color 0.15s;
}
.ga-card:hover { border-color: var(--accent-color); }
.ga-card--ended { opacity: 1; }

.ga-thumb-wrap { flex-shrink: 0; }
.ga-thumb {
    width: 231px;
    height: 87px;
    object-fit: cover;
    border-radius: 4px;
    display: block;
}
.ga-thumb--placeholder {
    background: var(--primary-light);
}

.ga-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.ga-title-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}
.ga-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-color);
    text-decoration: none;
}
.ga-title:hover { color: var(--accent-color); text-decoration: underline; }

.ga-status-pill {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    flex-shrink: 0;
}
.ga-status--active { background: rgba(46,204,113,0.15); color: #2ecc71; }
.ga-status--ended  { background: rgba(127,140,141,0.15); color: #7f8c8d; }

.ga-meta-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    font-size: 0.83rem;
    color: var(--text-muted);
}
.ga-creator {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
}
.ga-creator:hover { text-decoration: underline; }
.ga-creator-avatar {
    width: 18px;
    height: 18px;
    border-radius: 50%;
}

.ga-tags-row {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}
.ga-tag {
    font-size: 0.72rem;
    padding: 0.1rem 0.45rem;
    border-radius: 4px;
    background: var(--primary-light);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}

.ga-time-row { font-size: 0.78rem; color: var(--text-muted); }
.ga-time--ended { color: #e74c3c; }

.ga-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.35rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}
.ga-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    font-size: 0.85rem;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    color: var(--text-color);
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s;
}
.ga-page-btn:hover { border-color: var(--accent-color); color: var(--accent-color); }
.ga-page-btn--active {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: #fff;
    font-weight: 600;
}
.ga-page-btn--disabled { opacity: 0.4; cursor: default; }
.ga-page-btn--ellipsis { border-color: transparent; background: none; }

/* Card as link â€” wraps the whole ga-card */
a.ga-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}
a.ga-card-link:hover .ga-card { border-color: var(--accent-color); }
a.ga-card-link .ga-card:hover { border-color: var(--accent-color); }

/* ============================================================================
   Giveaway detail page
   ============================================================================ */

/* Hero */
.gd-hero {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.gd-hero-art { flex-shrink: 0; }
.gd-hero-img {
    width: 460px;
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    display: block;
    object-fit: cover;
}
.gd-hero-img--placeholder {
    width: 460px;
    max-width: 100%;
    height: 215px;
    background: var(--primary-light);
    border-radius: 6px;
}

.gd-hero-info { flex: 1; min-width: 220px; }

.gd-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 0;
}

/* Stats row */
.gd-stats-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 0.75rem 0;
}
.gd-stat {
    background: var(--primary-light);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.5rem 0.85rem;
    text-align: center;
    min-width: 64px;
}
.gd-stat-val {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-color);
    line-height: 1;
}
.gd-stat-lbl {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 0.2rem;
}

/* Dates */
.gd-dates {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 0.6rem;
}

/* Section */
.gd-section {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1.1rem 1.25rem;
    margin-bottom: 1.25rem;
}
.gd-section-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.gd-section-count {
    font-size: 0.78rem;
    font-weight: 600;
    background: var(--primary-light);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    padding: 0.1rem 0.55rem;
}

/* Winners table */
.gd-winners-wrap { overflow-x: auto; }
.gd-winners-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}
.gd-winners-table th {
    text-align: left;
    padding: 0.45rem 0.75rem;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
}
.gd-winners-table td {
    padding: 0.55rem 0.75rem;
    border-bottom: 1px solid rgba(48, 54, 61, 0.5);
    vertical-align: middle;
}
.gd-winner-row:last-child td { border-bottom: none; }
.gd-winner-row--played td { background: rgba(39,174,96,0.05); }
.gd-winner-row--notingroup td { opacity: 0.55; }

.gd-sg-link {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
}
.gd-sg-link:hover { text-decoration: underline; }

.gd-member-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
}
.gd-member-link:hover { color: var(--accent-color); text-decoration: underline; }
.gd-member-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
}
.gd-no-member { color: var(--text-muted); }

/* Played toggle button (admin) */
.gd-played-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.gd-played-btn--yes {
    background: rgba(39,174,96,0.15);
    border-color: #27ae60;
    color: #27ae60;
}
.gd-played-btn--yes:hover {
    background: rgba(39,174,96,0.3);
}
.gd-played-btn--no {
    background: rgba(231,76,60,0.1);
    border-color: #e74c3c;
    color: #e74c3c;
}
.gd-played-btn--no:hover {
    background: rgba(231,76,60,0.22);
}

/* Played badge (non-admin read-only) */
.gd-played-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 0.82rem;
    font-weight: 700;
}
.gd-played-badge--approved   { color: #27ae60; font-weight: 600; }
.gd-played-badge--not-played { color: #e57373; font-weight: 600; }
.gd-played-badge--rejected   { color: #e74c3c; font-weight: 600; }
.gd-played-badge--broken     { color: #e67e22; font-weight: 600; }
.gd-played-badge--pending    { color: var(--text-muted); font-style: italic; }
.gd-played-badge--na         { color: var(--text-muted); font-style: italic; white-space: nowrap; }

/* review page broken tab badge */
.review-tab-count--not-played { background: rgba(229,115,115,0.15); color: #e57373; border-color: rgba(229,115,115,0.3); }
.review-tab-count--broken     { background: rgba(230,126,34,0.15);  color: #e67e22; border-color: rgba(230,126,34,0.3); }
/* action buttons */
.btn-not-played { background: rgba(229,115,115,0.15); color: #e57373; border: 1px solid rgba(229,115,115,0.4); }
.btn-not-played:hover { background: rgba(229,115,115,0.28); }
.btn-broken { background: rgba(230,126,34,0.15); color: #e67e22; border: 1px solid rgba(230,126,34,0.4); }
.btn-broken:hover { background: rgba(230,126,34,0.28); }

.gd-empty {
    color: var(--text-muted);
    font-size: 0.9rem;
    padding: 0.5rem 0;
}

/* ============================================================================
   Profile tabs
   ============================================================================ */

.prof-tabs {
    display: flex;
    gap: 0.25rem;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.prof-tab {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    padding: 0.55rem 1rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: color 0.15s, border-color 0.15s;
    white-space: nowrap;
}
.prof-tab:hover { color: var(--text-color); }
.prof-tab--active {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}

.prof-tab-count {
    font-size: 0.72rem;
    font-weight: 700;
    background: var(--primary-light);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    padding: 0.05rem 0.45rem;
}
.prof-tab--active .prof-tab-count {
    background: rgba(23, 144, 217, 0.15);
    color: var(--accent-color);
    border-color: rgba(23, 144, 217, 0.3);
}

.prof-tab-panel { }

/* Giveaway rows inside profile tabs */
.prof-ga-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.prof-ga-row {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.6rem 0.85rem;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s;
}
.prof-ga-row:hover { border-color: var(--accent-color); }

.prof-ga-thumb {
    flex-shrink: 0;
    width: 116px;
    height: 44px;
    border-radius: 4px;
    overflow: hidden;
    background: var(--primary-light);
}
.prof-ga-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.prof-ga-thumb-placeholder {
    width: 100%;
    height: 100%;
    background: var(--primary-light);
}

.prof-ga-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.prof-ga-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.prof-ga-meta {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.prof-ga-played--approved   { color: #27ae60; font-weight: 600; }
.prof-ga-played--not-played { color: #e57373; font-weight: 600; }
.prof-ga-played--rejected   { color: #e74c3c; font-weight: 600; }
.prof-ga-played--broken     { color: #e67e22; font-weight: 600; }
.prof-ga-played--pending    { color: var(--text-muted); font-style: italic; }

.prof-ga-row--approved   { border-color: rgba(39,174,96,0.4);   background: rgba(39,174,96,0.07); }
.prof-ga-row--not-played { border-color: rgba(229,115,115,0.4); background: rgba(229,115,115,0.07); }
.prof-ga-row--rejected   { border-color: rgba(231,76,60,0.4);   background: rgba(231,76,60,0.07); }
.prof-ga-row--broken     { border-color: rgba(230,126,34,0.4);  background: rgba(230,126,34,0.07); }
.prof-ga-row--approved:hover   { border-color: rgba(39,174,96,0.7); }
.prof-ga-row--not-played:hover { border-color: rgba(229,115,115,0.7); }
.prof-ga-row--rejected:hover   { border-color: rgba(231,76,60,0.7); }
.prof-ga-row--broken:hover     { border-color: rgba(230,126,34,0.7); }

/* ============================================================================
   Admin Panel
   ============================================================================ */

.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.admin-section-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--border-color);
}

.admin-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.admin-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.admin-card h3 {
    color: var(--accent-color);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.admin-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Push action button to the bottom of every card */
.admin-card > .btn,
.admin-card > button.btn {
    margin-top: auto;
}

/* â”€â”€ Add to Cycle form â”€â”€ */
.atc-msg {
    padding: 0.65rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}
.atc-msg--error   { background: rgba(231,76,60,0.15);  color: #e74c3c; border: 1px solid rgba(231,76,60,0.3); }
.atc-msg--success { background: rgba(39,174,96,0.15);  color: #27ae60; border: 1px solid rgba(39,174,96,0.3); }

/* â”€â”€ Cycle comments â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.cycle-comments-section {
    border-top: 1px solid var(--border-color);
}
.cycle-comments-body {
    padding: 0.6rem 0.9rem 0.8rem;
}
.cycle-comments-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-bottom: 0.75rem;
}
.cycle-comment-row {
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
}
.cycle-comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.cycle-comment-avatar--placeholder {
    background: var(--primary-light);
    color: var(--text-muted);
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cycle-comment-body  { flex: 1; }
.cycle-comment-meta  { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.15rem; }
.cycle-comment-author {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-color);
}
.cycle-comment-time {
    font-size: 0.82rem;
    color: var(--text-muted);
}
.cycle-comment-delete {
    margin-left: auto;
    background: none;
    border: none;
    color: transparent;
    cursor: pointer;
    font-size: 0.75rem;
    padding: 0;
    line-height: 1;
    transition: color 0.15s;
}
.cycle-comment-row:hover .cycle-comment-delete { color: var(--text-muted); }
.cycle-comment-delete:hover { color: #e74c3c !important; }

/* Comment type badges */
.cycle-comment-badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.1rem 0.45rem;
    border-radius: 20px;
    white-space: nowrap;
}
.cycle-comment-badge--review {
    background: rgba(100,181,246,0.15);
    color: #64b5f6;
    border: 1px solid rgba(100,181,246,0.3);
}
.cycle-comment-badge--repick {
    background: rgba(255,167,38,0.15);
    color: #ffa726;
    border: 1px solid rgba(255,167,38,0.3);
}
.cycle-comment-badge--resolved {
    background: rgba(102,187,106,0.12);
    color: #66bb6a;
    border: 1px solid rgba(102,187,106,0.3);
    text-decoration: line-through;
    opacity: 0.75;
}

.cycle-comment-text {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-color);
    line-height: 1.55;
    word-break: break-word;
}

/* Type selector row */
.cycle-comments-type-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.4rem;
    flex-wrap: wrap;
}
.cycle-comments-type-label {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.82rem;
    color: var(--text-muted);
    cursor: pointer;
    user-select: none;
}
.cycle-comments-type-label input { cursor: pointer; accent-color: var(--accent-color); }
.cycle-comments-slot-select {
    background: var(--primary-dark);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-color);
    padding: 0.25rem 0.5rem;
    font-size: 0.82rem;
    outline: none;
    cursor: pointer;
    transition: border-color 0.15s;
    max-width: 200px;
}
.cycle-comments-slot-select:focus { border-color: var(--accent-color); }

/* Repick pending highlight on slot */
.cycle-picker-slot.slot--repick-pending {
    outline: 2px dashed #ffa726;
    outline-offset: -2px;
    position: relative;
}
.cycle-picker-slot.slot--repick-pending::after {
    content: '🔄';
    position: absolute;
    top: 4px;
    right: 4px;
    font-size: 0.85rem;
    line-height: 1;
}

.cycle-comments-input-row {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.25rem;
    align-items: center;
}

/* Emoji picker */
.cycle-emoji-wrap {
    position: relative;
    flex-shrink: 0;
}
.cycle-emoji-btn {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.35rem 0.5rem;
    font-size: 1.2rem;
    cursor: pointer;
    line-height: 1;
    transition: border-color 0.15s, background 0.15s;
}
.cycle-emoji-btn:hover {
    border-color: var(--accent-color);
    background: rgba(255,255,255,0.05);
}
.cycle-emoji-picker {
    display: none;
    position: absolute;
    bottom: calc(100% + 6px);
    left: 0;
    grid-template-columns: repeat(8, 2.2rem);
    gap: 2px;
    width: max-content;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.5rem;
    z-index: 300;
    box-shadow: var(--shadow);
}
.cycle-emoji-picker--open { display: grid; }
.cycle-emoji-item {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.35rem;
    width: 2.2rem;
    height: 2.2rem;
    padding: 0;
    border-radius: 4px;
    line-height: 2.2rem;
    transition: background 0.1s;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cycle-emoji-item:hover { background: rgba(255,255,255,0.08); }
.cycle-comments-input {
    flex: 1;
    background: var(--primary-dark);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-color);
    padding: 0.45rem 0.75rem;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.15s;
}
.cycle-comments-input:focus { border-color: var(--accent-color); }

/* Two-column page grid */
.atc-page-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}
.atc-col-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.9rem;
    color: var(--text-color);
}

.atc-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.atc-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.atc-backup-badge {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.1rem 0.4rem;
    border-radius: 20px;
    background: rgba(100,181,246,0.15);
    color: #64b5f6;
    border: 1px solid rgba(100,181,246,0.3);
}

.atc-select,
.atc-input {
    width: 100%;
    background: var(--primary-dark);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-color);
    padding: 0.6rem 0.9rem;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.15s;
}
.atc-select:focus,
.atc-input:focus  { border-color: var(--accent-color); }

.atc-search-wrap { position: relative; }

.atc-results {
    position: absolute;
    top: calc(100% + 3px);
    left: 0; right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    z-index: 200;
    max-height: 220px;
    overflow-y: auto;
    box-shadow: var(--shadow);
}

.atc-result-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.1s;
}
.atc-result-item:hover { background: rgba(255,255,255,0.05); }

.atc-result-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.atc-avatar-placeholder {
    display: flex; align-items: center; justify-content: center;
    background: var(--primary-light); color: var(--text-muted); font-size: 0.7rem;
}

.atc-result-hint {
    padding: 0.6rem 0.75rem;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.atc-status-tag {
    margin-left: auto;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.1rem 0.4rem;
    border-radius: 20px;
    background: rgba(255,255,255,0.08);
    color: var(--text-muted);
}

/* Selected input state */
.atc-input--selected {
    border-color: rgba(23,144,217,0.5);
    background: rgba(23,144,217,0.08);
    color: var(--text-color);
    padding-right: 2rem;
}

/* Inline clear button inside search wrap */
.atc-input-clear {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.72rem;
    padding: 0.1rem 0.2rem;
    line-height: 1;
    display: flex;
    align-items: center;
    z-index: 1;
}
.atc-input-clear:hover { color: #e74c3c; }

/* Remove side â€” participant list */
.atc-remove-list {
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
    max-height: 320px;
    overflow-y: auto;
}
.atc-remove-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.86rem;
}
.atc-remove-row:last-child { border-bottom: none; }
.atc-remove-name {
    flex: 1;
    color: var(--text-color);
    font-weight: 500;
}
.atc-remove-btn {
    background: none;
    border: 1px solid rgba(231,76,60,0.4);
    color: #e74c3c;
    border-radius: 4px;
    font-size: 0.75rem;
    padding: 0.2rem 0.55rem;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    white-space: nowrap;
}
.atc-remove-btn:hover {
    background: rgba(231,76,60,0.12);
    border-color: #e74c3c;
}

/* Danger button variant */
.btn-danger {
    background: #e74c3c;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 0.5rem 1.1rem;
    font-size: 0.9rem;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.15s;
}
.btn-danger:hover { background: #c0392b; }

/* â”€â”€ Rules public page â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.rules-page {
    max-width: 820px;
    margin: 2rem auto;
}
.rules-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}
.rules-page-header h1 {
    margin: 0;
    font-size: 1.8rem;
}

/* Markdown body â€” shared by public page and editor preview */
.markdown-body {
    color: var(--text-color);
    line-height: 1.75;
    font-size: 0.95rem;
}
.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4 {
    color: var(--text-color);
    margin-top: 1.8rem;
    margin-bottom: 0.6rem;
    font-weight: 700;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.3rem;
}
.markdown-body h1 { font-size: 1.6rem; }
.markdown-body h2 { font-size: 1.25rem; }
.markdown-body h3 { font-size: 1.05rem; border-bottom: none; }
.markdown-body p  { margin: 0.65rem 0; }
.markdown-body ul,
.markdown-body ol {
    padding-left: 1.5rem;
    margin: 0.5rem 0;
}
.markdown-body li { margin: 0.3rem 0; }
.markdown-body strong { color: var(--text-color); }
.markdown-body a  { color: var(--accent-color); text-decoration: none; }
.markdown-body a:hover { text-decoration: underline; }
.markdown-body code {
    background: rgba(255,255,255,0.07);
    border-radius: 4px;
    padding: 0.1em 0.4em;
    font-size: 0.88em;
    font-family: monospace;
}
.markdown-body pre {
    background: var(--primary-dark);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 1rem;
    overflow-x: auto;
}
.markdown-body pre code {
    background: none;
    padding: 0;
    font-size: 0.87em;
}
.markdown-body blockquote {
    border-left: 3px solid var(--accent-color);
    margin: 0.75rem 0;
    padding: 0.4rem 1rem;
    color: var(--text-muted);
}
.markdown-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.9rem;
}
.markdown-body th {
    background: rgba(255,255,255,0.05);
    color: var(--text-muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.55rem 0.85rem;
    border: 1px solid var(--border-color);
    text-align: left;
}
.markdown-body td {
    padding: 0.5rem 0.85rem;
    border: 1px solid var(--border-color);
}
.markdown-body tr:nth-child(even) td {
    background: rgba(255,255,255,0.02);
}
.markdown-body hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 1.5rem 0;
}

/* â”€â”€ Rules admin editor â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.rules-editor-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    height: calc(100vh - 160px);
    min-height: 500px;
}
.rules-editor-pane {
    display: flex;
    flex-direction: column;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}
.rules-editor-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 1rem;
    border-bottom: 1px solid var(--border-color);
    background: rgba(255,255,255,0.03);
    flex-shrink: 0;
}
.rules-editor-title {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}
.rules-editor-textarea {
    flex: 1;
    resize: none;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-color);
    font-family: 'Consolas', 'Fira Mono', monospace;
    font-size: 0.88rem;
    line-height: 1.65;
    padding: 1rem;
    overflow-y: auto;
}
.rules-editor-preview {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.25rem;
}

/* Help button in toolbar */
.rules-help-btn {
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: rgba(255,255,255,0.05);
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: border-color 0.15s, color 0.15s;
}
.rules-help-btn:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

/* Markdown help modal grid */
.md-help-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}
.md-help-section {
    padding: 1.1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
}
.md-help-section:nth-child(even) {
    border-right: none;
}
.md-help-section--wide {
    grid-column: 1 / -1;
    border-right: none;
}
.md-help-section--wide:last-child {
    border-bottom: none;
}
.md-help-section-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 0.6rem;
}
.md-help-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.83rem;
}
.md-help-table td {
    padding: 0.22rem 0.3rem;
    vertical-align: middle;
}
.md-help-table td:first-child {
    width: 55%;
    color: var(--text-muted);
}
.md-help-table td code {
    background: rgba(255,255,255,0.07);
    border-radius: 3px;
    padding: 0.1em 0.35em;
    font-size: 0.82em;
    font-family: monospace;
}
.md-help-table--rendered th {
    background: rgba(255,255,255,0.05);
    color: var(--text-muted);
    font-size: 0.75rem;
    padding: 0.3rem 0.5rem;
    border: 1px solid var(--border-color);
    text-align: left;
}
.md-help-table--rendered td {
    border: 1px solid var(--border-color);
    padding: 0.3rem 0.5rem;
    width: auto;
}
.md-help-pre {
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    padding: 0.6rem 0.75rem;
    font-size: 0.8rem;
    font-family: monospace;
    margin: 0;
    white-space: pre;
    color: var(--text-muted);
}

/* Progress bar */
.progress-bar-wrap {
    background-color: var(--primary-color);
    border-radius: 4px;
    height: 8px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background-color: var(--accent-color);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.4rem;
    text-align: right;
}

/* Sync log */
.sync-log {
    margin-top: 0.75rem;
    background-color: var(--primary-dark);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.75rem;
    max-height: 260px;
    overflow-y: auto;
    font-size: 0.82rem;
    font-family: 'Monaco', 'Courier New', monospace;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.log-line        { color: var(--text-muted); }
.log-added       { color: #4caf87; }
.log-exists      { color: var(--text-muted); opacity: 0.6; }
.log-done        { color: var(--accent-color); font-weight: 600; margin-top: 0.4rem; }
.log-error       { color: #ff6b6b; }

/* ============================================================================
   Grid Layout
   ============================================================================ */

.row {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.col-3  { flex: 0 0 25%; }
.col-9  { flex: 0 0 calc(75% - 1.5rem); }

/* ============================================================================
   Members Page
   ============================================================================ */

.members-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
}

.member-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    text-align: center;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.member-card:hover {
    box-shadow: var(--shadow);
}

.member-card[data-membership="Admin"] {
    border-color: #f0c040;
    box-shadow: 0 0 6px rgba(240, 192, 64, 0.3);
}
.member-card[data-membership="Admin"]:hover {
    box-shadow: 0 0 12px rgba(240, 192, 64, 0.5);
}

.member-card[data-membership="Moderator"] {
    border-color: #4a90d9;
    box-shadow: 0 0 6px rgba(74, 144, 217, 0.3);
}
.member-card[data-membership="Moderator"]:hover {
    box-shadow: 0 0 12px rgba(74, 144, 217, 0.5);
}

.member-card[data-membership="Guest"] {
    border-color: #d94a4a;
    box-shadow: 0 0 6px rgba(217, 74, 74, 0.3);
}
.member-card[data-membership="Guest"]:hover {
    box-shadow: 0 0 12px rgba(217, 74, 74, 0.5);
}

.member-avatar {
    width: 80px;
    height: 80px;
    border-radius: 6px;
    border: 2px solid var(--border-color);
    object-fit: cover;
}

.member-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
}

.member-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-color);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-decoration: none;
}

.member-name:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

.member-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.15rem 0.45rem;
    border-radius: 3px;
    line-height: 1.4;
}

.member-badge--admin     { background: rgba(240,192,64,0.15); color: #f0c040; border: 1px solid #f0c040; }
.member-badge--moderator { background: rgba(74,144,217,0.15); color: #4a90d9; border: 1px solid #4a90d9; }
.member-badge--guest     { background: rgba(217,74,74,0.15);  color: #d94a4a; border: 1px solid #d94a4a; }
.member-badge--left      { background: rgba(140,140,140,0.15); color: #9aa0a6; border: 1px solid #9aa0a6; }

/* Members who left the group: greyscale avatar + muted card */
.member-card--left .member-avatar,
.member-card--left .avatar-placeholder {
    filter: grayscale(100%);
    opacity: 0.7;
}
.member-card--left { opacity: 0.85; }

.avatar-left { filter: grayscale(100%); opacity: 0.8; }

/* Profile mark for a user who left the group */
.left-group-mark {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 600;
    color: #9aa0a6;
    background: rgba(140,140,140,0.15);
    border: 1px solid #9aa0a6;
    border-radius: 4px;
    padding: 0.2rem 0.55rem;
}

.member-links {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.member-links a {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    background-color: var(--primary-color);
    border: 1px solid var(--border-color);
    color: var(--accent-color);
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.member-links a:hover {
    background-color: var(--primary-light);
}

.member-site-link,
.profile-site-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.site-favicon {
    width: 14px;
    height: 14px;
    object-fit: contain;
    display: block;
    flex-shrink: 0;
}

/* ============================================================================
   Responsive Design
   ============================================================================ */

@media (max-width: 768px) {
    .navbar .container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        width: 100%;
        justify-content: center;
    }

    .user-header {
        flex-direction: column;
        text-align: center;
    }

    .user-info {
        text-align: center;
    }

    .info-list {
        grid-template-columns: 1fr;
    }

    .row {
        flex-direction: column;
    }

    .col-3,
    .col-9 {
        flex: 1 1 100%;
    }

    .members-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .container {
        padding: 0 1rem;
    }

    .card {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .nav-links {
        gap: 0.75rem;
    }

    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .avatar {
        width: 80px;
        height: 80px;
    }

    .avatar-placeholder {
        width: 80px;
        height: 80px;
    }
}

/* ============================================================================
   Cycle Tabs
   ============================================================================ */

.cycle-tabs-bar {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 1.25rem;
}

.cycle-tab {
    padding: 0.55rem 1.25rem;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}

.cycle-tab:hover {
    color: var(--text-color);
}

.cycle-tab--active {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}

/* ============================================================================
   Leaderboard
   ============================================================================ */

.leaderboard-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.leaderboard-table thead tr {
    background: rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid var(--border-color);
}

.leaderboard-table th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    white-space: nowrap;
    user-select: none;
}

.leaderboard-table th.sortable {
    cursor: pointer;
    transition: color 0.15s;
}

.leaderboard-table th.sortable:hover,
.leaderboard-table th.lb-sorted {
    color: var(--text-color);
}

.leaderboard-table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.12s;
}

.leaderboard-table tbody tr:last-child {
    border-bottom: none;
}

.leaderboard-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.leaderboard-table td {
    padding: 0.65rem 1rem;
    vertical-align: middle;
}

.lb-rank                        { width: 48px; text-align: center; }
.lb-num                         { text-align: center; }
.leaderboard-table th.lb-rank,
.leaderboard-table th.lb-num   { text-align: center; }

.lb-rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 0.78rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.07);
    color: var(--text-muted);
}

.lb-rank-badge.lb-rank--gold   { background: rgba(255, 200, 40, 0.2);  color: #ffc828; }
.lb-rank-badge.lb-rank--silver { background: rgba(180, 190, 200, 0.2); color: #b4bec8; }
.lb-rank-badge.lb-rank--bronze { background: rgba(180, 110, 60, 0.2);  color: #b46e3c; }

.lb-player {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.lb-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.lb-avatar-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.lb-name {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
}

.lb-name:hover { color: var(--accent-color); }

.lb-sort-icon { font-size: 0.7rem; }

.lb-spacer-col {
    width: 80px;
    min-width: 80px;
    max-width: 80px;
    background: transparent !important;
    border-left: none !important;
    border-right: none !important;
}

.lb-all-clear-empty {
    color: var(--text-muted);
    opacity: 0.4;
}

.lb-all-clear-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    padding: 0.15rem 0.45rem;
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 700;
    background: rgba(255, 200, 40, 0.18);
    color: #ffc828;
    border: 1px solid rgba(255, 200, 40, 0.4);
    white-space: nowrap;
    vertical-align: middle;
}

.lb-all-clear-badge--dim {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    border-color: rgba(255, 255, 255, 0.1);
    opacity: 0.5;
}

/* ============================================================================
   Participant Totals Slot (sits in the minor row Very Long position)
   ============================================================================ */

.cycle-totals-slot {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.cycle-totals-stats {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.72rem;
    color: var(--text-muted);
}

.cycle-totals-points {
    display: flex;
    gap: 0.6rem;
    align-items: flex-end;
    justify-content: center;
    flex-wrap: wrap;
}

.cycle-pts-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
}

.cycle-pts-label {
    font-size: 0.62rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}

.cycle-pts-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 28px;
    border-radius: 7px;
    padding: 0 8px;
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1;
}

/* Achieved â€“ amber, pending confirmation */
.cycle-pts-badge--achieved {
    background: rgba(230, 162, 60, 0.18);
    color: #e6a23c;
    border: 1px solid rgba(230, 162, 60, 0.4);
}

/* Approved â€“ green, officially confirmed */
.cycle-pts-badge--approved {
    background: rgba(39, 174, 96, 0.18);
    color: #27ae60;
    border: 1px solid rgba(39, 174, 96, 0.4);
}

/* ============================================================================
   Points System â€“ slot visuals
   ============================================================================ */

/* Status-driven border accent */
.cycle-picker-slot.slot--beaten {
    border-top: 3px solid #27ae60;
}

.cycle-picker-slot.slot--completed {
    border-top: 3px solid #64b5f6;
}

/* Approval fill â€“ beaten (green) */
.cycle-picker-slot.slot--beaten.slot--approved {
    background: rgba(39, 174, 96, 0.12);
}

/* Approval fill â€“ completed (light blue) */
.cycle-picker-slot.slot--completed.slot--approved {
    background: rgba(100, 181, 246, 0.12);
}

/* Abandoned â€“ dark red border accent */
.cycle-picker-slot.slot--abandoned {
    border-top: 3px solid #c0392b;
    background: rgba(192, 57, 43, 0.08);
}

/* Rejected â€“ red border and fill, overrides other states */
.cycle-picker-slot.slot--rejected {
    border-top: 3px solid #e74c3c;
    background: rgba(231, 76, 60, 0.1);
}

/* Points pills â€“ inline in the stats row */
.slot-pts-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 22px;
    border-radius: 11px;
    padding: 0 6px;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
    flex-shrink: 0;
}

.slot-pts-pill--neutral {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
}

.slot-pts-pill--beaten {
    background: #27ae60;
    color: #fff;
}

.slot-pts-pill--completed {
    background: #64b5f6;
    color: #fff;
}

/* +1 bonus pill */
.slot-pts-bonus-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 22px;
    border-radius: 11px;
    padding: 0 5px;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1;
    flex-shrink: 0;
    background: #64b5f6;
    color: #fff;
    border: none;
}

.slot-pts-bonus-pill--dim {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    opacity: 0.45;
}

/* ============================================================================
   Lists page
   ============================================================================ */

.lists-summary {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.lists-stat {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.6rem 1.1rem;
    text-align: center;
    min-width: 100px;
}
.lists-stat-val {
    display: block;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-color);
    line-height: 1;
}
.lists-stat-lbl {
    display: block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* ── Drag-and-drop Lists page ───────────────────────────────────── */

/* 4 drop zone columns */
.dnd-zones {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}
@media (max-width: 900px) {
    .dnd-zones { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 500px) {
    .dnd-zones { grid-template-columns: 1fr; }
}

.dnd-zone {
    background: var(--card-bg);
    border: 2px dashed var(--border-color);
    border-radius: 10px;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    transition: border-color 0.15s, background 0.15s;
}
.dnd-zone--over {
    border-color: var(--accent-color);
    background: rgba(23,144,217,0.06);
}

.dnd-zone-label {
    font-weight: 700;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-color);
}
.dnd-zone-count {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-color);
    line-height: 1;
}
.dnd-zone-sublabel {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* zone inner link (replaces card area) */
.dnd-zone-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    padding: 1.5rem 1rem;
    text-decoration: none;
    flex: 1;
    border-radius: 8px;
    transition: background 0.15s;
}
.dnd-zone-inner:hover { background: rgba(23,144,217,0.06); }

/* Pool header */
.dnd-pool-header {
    margin-bottom: 0.75rem;
    padding: 0.5rem 0;
    border-top: 1px solid var(--border-color);
}
.dnd-pool-count {
    background: rgba(149,165,166,0.2);
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    margin-left: 0.4rem;
}

/* Uncategorized pool */
.dnd-pool {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.6rem;
    padding: 0.75rem;
    background: var(--card-bg);
    border: 2px dashed var(--border-color);
    border-radius: 10px;
    min-height: 120px;
    transition: border-color 0.15s, background 0.15s;
}
.dnd-pool--over {
    border-color: var(--text-muted);
    background: rgba(149,165,166,0.05);
}

/* Pool game card */
.pool-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-secondary, #1a1a2e);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    cursor: grab;
    transition: transform 0.12s, border-color 0.12s, opacity 0.15s;
    user-select: none;
}
.pool-card:hover { border-color: var(--accent-color); transform: translateY(-2px); }
.pool-card.dragging { opacity: 0.35; transform: none; }

.pool-card-img {
    width: 100%;
    aspect-ratio: 231/87;
    object-fit: cover;
    display: block;
}
.pool-card-name {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-color);
    padding: 0.3rem 0.4rem 0.1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pool-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 0.4rem 0.3rem;
    gap: 0.3rem;
}
.pool-card-playtime {
    font-size: 0.66rem;
    color: var(--text-muted);
}
.pool-card-sg-badge {
    font-size: 0.62rem;
    font-weight: 700;
    color: #2ecc71;
    background: rgba(46,204,113,0.12);
    border: 1px solid rgba(46,204,113,0.3);
    border-radius: 4px;
    padding: 0.05rem 0.35rem;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Won on SG info card */
.dnd-zones-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}
.dnd-zone--sg {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1.25rem;
    text-decoration: none;
    border-style: solid;
    min-height: auto;
    border-color: rgba(46,204,113,0.35);
    transition: border-color 0.15s, background 0.15s;
}
.dnd-zone--sg:hover {
    border-color: #2ecc71;
    background: rgba(46,204,113,0.06);
}
.dnd-zone--sg .dnd-zone-label { font-size: 0.9rem; }
.dnd-zone--sg .dnd-zone-count { font-size: 1.5rem; }

/* ── List detail page ───────────────────────────────────────────── */
.detail-game-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.detail-row {
    display: grid;
    grid-template-columns: 116px 1fr auto;
    align-items: center;
    gap: 1rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.5rem 0.85rem 0.5rem 0.5rem;
    transition: border-color 0.15s;
}
.detail-row:hover { border-color: var(--accent-color); }

.detail-row-img {
    width: 116px;
    height: 43px;
    object-fit: cover;
    border-radius: 4px;
    display: block;
    flex-shrink: 0;
}

.detail-row-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}
.detail-row-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.detail-row-playtime {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.detail-row-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* Status select */
.detail-status-select {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    color: var(--text-color);
    cursor: pointer;
    width: auto;
}

/* Row full-border accent by status */
.detail-row--unfinished { border-color: #e67e22; }
.detail-row--beaten     { border-color: #2ecc71; }
.detail-row--completed  { border-color: #3498db; }
.detail-row--abandoned  { border-color: #e74c3c; }

/* Read-only status badge on public list view */
.detail-status-badge {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    white-space: nowrap;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    background: transparent;
}
.detail-status-badge--beaten     { color: #2ecc71; border-color: rgba(46,204,113,0.4);  }
.detail-status-badge--completed  { color: #3498db; border-color: rgba(52,152,219,0.4);  }
.detail-status-badge--abandoned  { color: #e74c3c; border-color: rgba(231,76,60,0.4);   }
.detail-status-badge--unfinished { color: #e67e22; border-color: rgba(230,126,34,0.4);  }

.btn-icon-danger {
    background: none;
    border: 1px solid transparent;
    border-radius: 5px;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 0.25rem 0.45rem;
    transition: color 0.15s, border-color 0.15s;
    line-height: 1;
}
.btn-icon-danger:hover {
    color: #e74c3c;
    border-color: #e74c3c;
}

/* ── Payments table ─────────────────────────────────────────────── */
.pay-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}
.pay-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.pay-table thead th {
    text-align: left;
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-muted);
    padding: 0.7rem 1rem;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}
.pay-table tbody td {
    padding: 0.65rem 1rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}
.pay-table tbody tr:last-child td { border-bottom: none; }
.pay-table tbody tr:hover { background: rgba(127,127,127,0.06); }
.pay-num { text-align: center; font-variant-numeric: tabular-nums; }
.pay-good { color: #2ecc71; }
.pay-bad  { color: #e74c3c; }
.pay-muted { color: var(--text-muted); }
.pay-pending { font-weight: 600; }
.pay-actions-col { text-align: right; width: 1%; white-space: nowrap; }
.pay-btn { padding: 0.3rem 0.9rem; font-size: 0.82rem; }
.pay-user {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
}
.pay-user:hover span:last-child { text-decoration: underline; }
.pay-avatar {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
}
.pay-avatar--empty {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--border-color);
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ── Payment history (profile + modal) ──────────────────────────── */
.pay-summary {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.pay-summary-item {
    flex: 1;
    min-width: 90px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    padding: 0.9rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}
.pay-summary-num { font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.pay-summary-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}
.pay-history {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}
.pay-history-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.9rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.85rem;
}
.pay-history-row:last-child { border-bottom: none; }
.pay-history-row:hover { background: rgba(127,127,127,0.06); }
.pay-history-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: var(--text-color);
    min-width: 0;
    flex: 1;
}
.pay-history-link:hover .pay-history-name { text-decoration: underline; }
.pay-history-code {
    font-family: monospace;
    background: var(--primary-dark);
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    font-size: 0.8rem;
    flex-shrink: 0;
}
.pay-history-name { color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pay-history-special { color: var(--accent-color); font-weight: 600; flex: 1; }
.pay-history-meta { color: var(--text-muted); font-size: 0.78rem; }
.pay-history-date { color: var(--text-muted); font-size: 0.78rem; flex-shrink: 0; margin-left: auto; }

.pay-undo-btn {
    background: none;
    border: 1px solid transparent;
    border-radius: 5px;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    padding: 0.2rem 0.4rem;
    flex-shrink: 0;
    transition: color 0.15s, border-color 0.15s;
}
.pay-undo-btn:hover {
    color: #e74c3c;
    border-color: #e74c3c;
}

/* ── Giveaways-review winner filter (searchable dropdown) ───────── */
.wr-filter { position: relative; }
.wr-filter-wrap { position: relative; }
.wr-filter-wrap .field-input { width: 100%; padding-right: 2rem; }
.wr-filter-clear {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.85rem;
    line-height: 1;
    padding: 0.2rem;
}
.wr-filter-clear:hover { color: var(--text-color); }
.wr-filter-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 50;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.35);
    max-height: 280px;
    overflow-y: auto;
    padding: 0.25rem;
}
.wr-filter-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.45rem 0.55rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.88rem;
}
.wr-filter-item:hover { background: rgba(127,127,127,0.12); }
.wr-filter-avatar {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
}
.wr-filter-avatar--empty {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--border-color);
    color: var(--text-muted);
    font-size: 0.75rem;
}
.wr-filter-empty {
    padding: 0.6rem 0.55rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ── Nav badge (pending counts) ─────────────────────────────────── */
.nav-badge {
    display: inline-block;
    min-width: 1.1rem;
    padding: 0.05rem 0.35rem;
    border-radius: 999px;
    background: var(--accent-color);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    text-align: center;
    line-height: 1.3;
    vertical-align: middle;
}

/* ── Reviews page ───────────────────────────────────────────────── */
.review-section-title { margin: 0 0 1rem; font-size: 1.05rem; }
.review-count {
    display: inline-block;
    margin-left: 0.4rem;
    padding: 0.05rem 0.5rem;
    border-radius: 999px;
    background: rgba(127,127,127,0.18);
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 700;
    vertical-align: middle;
}
.review-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1rem;
}
.review-card {
    display: flex;
    gap: 0.85rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.85rem;
}
.review-thumb-wrap { flex-shrink: 0; width: 92px; }
.review-thumb {
    width: 92px;
    height: 43px;
    object-fit: cover;
    border-radius: 4px;
    display: block;
}
.review-thumb--placeholder { background: var(--primary-light); }
.review-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.review-head { display: flex; align-items: center; gap: 0.5rem; justify-content: space-between; }
.review-game {
    font-weight: 600;
    font-size: 0.92rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.review-trigger {
    flex-shrink: 0;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 0.12rem 0.4rem;
    border-radius: 3px;
    border: 1px solid;
}
.review-trigger--beaten    { color: #2ecc71; border-color: rgba(46,204,113,0.4); }
.review-trigger--completed { color: #3498db; border-color: rgba(52,152,219,0.4); }
.review-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    font-size: 0.8rem;
}
.review-owner {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--text-color);
    text-decoration: none;
}
.review-owner:hover { text-decoration: underline; }
.review-owner-avatar { width: 20px; height: 20px; border-radius: 3px; object-fit: cover; }
.review-cycle { color: var(--text-muted); text-decoration: none; }
.review-cycle:hover { text-decoration: underline; color: var(--accent-color); }
.review-controls { display: flex; flex-direction: column; gap: 0.5rem; }
.review-verdicts { display: flex; gap: 0.4rem; }
.review-verdict {
    flex: 1;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1.1rem;
    padding: 0.3rem 0;
    cursor: pointer;
    opacity: 0.55;
    transition: opacity 0.15s, border-color 0.15s, background 0.15s;
}
.review-verdict:hover { opacity: 0.9; }
.review-verdict.is-selected { opacity: 1; }
.review-verdict--up.is-selected      { border-color: #2ecc71; background: rgba(46,204,113,0.15); }
.review-verdict--neutral.is-selected { border-color: #e6b800; background: rgba(230,184,0,0.15); }
.review-verdict--down.is-selected    { border-color: #e74c3c; background: rgba(231,76,60,0.15); }
.review-comment { width: 100%; resize: vertical; font-size: 0.85rem; }
.review-actions { display: flex; align-items: center; justify-content: flex-end; gap: 0.6rem; }
.review-submit { padding: 0.35rem 1rem; font-size: 0.85rem; }
.review-msg { font-size: 0.8rem; }
.review-msg--ok { color: #2ecc71; }
.review-msg--error { color: #e74c3c; }

/* ── Admin users table ──────────────────────────────────────────── */
.usr-table th, .usr-table td { white-space: nowrap; }
.usr-link { color: var(--accent-color); text-decoration: none; font-size: 0.85rem; }
.usr-link:hover { text-decoration: underline; }
.usr-yes { color: #2ecc71; font-weight: 600; }
.usr-avatar-left { filter: grayscale(100%); opacity: 0.7; }
.usr-left-tag {
    font-size: 0.65rem;
    font-weight: 700;
    color: #9aa0a6;
    border: 1px solid #9aa0a6;
    border-radius: 3px;
    padding: 0.02rem 0.3rem;
    margin-left: 0.25rem;
    vertical-align: middle;
}

.usr-toggle {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    padding: 0.15rem 0.6rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.usr-toggle:disabled { opacity: 0.5; cursor: default; }
.usr-toggle--on  { color: #2ecc71; border-color: rgba(46,204,113,0.5); background: rgba(46,204,113,0.1); }
.usr-toggle--off { color: var(--text-muted); }
.usr-toggle--off:hover { color: var(--text-color); border-color: var(--text-muted); }
.usr-owe { color: #e74c3c; font-weight: 700; }

.review-verdict-img {
    display: block;
    height: 26px;
    width: auto;
    margin: 0 auto;
    object-fit: contain;
    pointer-events: none;
}

/* ── Admin cron jobs ────────────────────────────────────────────── */
.cron-list { display: flex; flex-direction: column; gap: 1rem; }
.cron-card {
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    align-items: flex-start;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.1rem 1.25rem;
    flex-wrap: wrap;
}
.cron-main { flex: 1; min-width: 240px; }
.cron-head { display: flex; align-items: baseline; gap: 0.75rem; flex-wrap: wrap; }
.cron-name { font-weight: 600; font-size: 1rem; }
.cron-interval {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
    border-radius: 3px;
    padding: 0.05rem 0.4rem;
}
.cron-desc { color: var(--text-muted); font-size: 0.85rem; margin: 0.4rem 0 0.6rem; }
.cron-meta { display: flex; gap: 1.5rem; flex-wrap: wrap; font-size: 0.82rem; color: var(--text-muted); }
.cron-meta strong { color: var(--text-color); font-weight: 600; }
.cron-status {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 0.05rem 0.4rem;
    border-radius: 3px;
    margin-left: 0.3rem;
}
.cron-status--success { color: #2ecc71; border: 1px solid rgba(46,204,113,0.5); }
.cron-status--error   { color: #e74c3c; border: 1px solid rgba(231,76,60,0.5); }
.cron-status--running { color: #e6b800; border: 1px solid rgba(230,184,0,0.5); }
.cron-msg { font-size: 0.8rem; color: var(--text-muted); margin: 0.6rem 0 0; font-style: italic; }
.cron-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 0.6rem; }

/* ── Cycle participant pending wins ─────────────────────────────── */
.cycle-pending-wins {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-left: 0.5rem;
}
.pending-wins-list { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.pending-win {
    display: inline-block;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.75rem;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.pending-win:hover { color: var(--text-color); border-color: var(--text-muted); }
.pending-win--picked {
    color: #2ecc71;
    border-color: rgba(46,204,113,0.6);
    background: rgba(46,204,113,0.12);
    font-weight: 600;
}

/* Pending-win entries in the pick search results */
.pick-result-item--win { background: rgba(46,204,113,0.08); }
.pick-result-item--win:hover { background: rgba(46,204,113,0.16); }
.pick-result-win-badge {
    margin-left: auto;
    flex-shrink: 0;
    font-size: 0.68rem;
    font-weight: 700;
    color: #2ecc71;
    border: 1px solid rgba(46,204,113,0.5);
    border-radius: 999px;
    padding: 0.05rem 0.4rem;
    white-space: nowrap;
}

/* ── Admin reviews overview ─────────────────────────────────────── */
.rv-cycle { margin-bottom: 2rem; }
.rv-cycle-title {
    display: flex; align-items: baseline; gap: 0.6rem;
    font-size: 1.05rem; margin: 0 0 0.9rem;
    border-bottom: 1px solid var(--border-color); padding-bottom: 0.4rem;
}
.rv-cycle-title a { color: var(--text-color); text-decoration: none; }
.rv-cycle-title a:hover { color: var(--accent-color); }
.rv-cycle-count { font-size: 0.78rem; color: var(--text-muted); font-weight: 400; }
.rv-entry {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.9rem 1rem;
    margin-bottom: 0.85rem;
}
.rv-entry-head { display: flex; align-items: center; gap: 0.85rem; flex-wrap: wrap; }
.rv-entry-thumb { width: 92px; height: 43px; object-fit: cover; border-radius: 4px; flex-shrink: 0; }
.rv-entry-info { flex: 1; min-width: 180px; }
.rv-entry-game { font-weight: 600; font-size: 0.95rem; display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.rv-trigger {
    font-size: 0.66rem; font-weight: 700; text-transform: uppercase;
    padding: 0.1rem 0.4rem; border-radius: 3px; border: 1px solid;
}
.rv-trigger--beaten { color: #2ecc71; border-color: rgba(46,204,113,0.4); }
.rv-trigger--completed { color: #3498db; border-color: rgba(52,152,219,0.4); }
.rv-entry-owner { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.25rem; }
.rv-owner-link, .rv-reviewer-name {
    display: inline-flex; align-items: center; gap: 0.35rem;
    color: var(--text-color); text-decoration: none;
}
.rv-owner-link:hover, .rv-reviewer-name:hover { text-decoration: underline; }
.rv-owner-avatar, .rv-reviewer-avatar { width: 18px; height: 18px; border-radius: 3px; object-fit: cover; }
.rv-entry-summary { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-left: auto; }
.rv-count { font-size: 0.78rem; font-variant-numeric: tabular-nums; }
.rv-count--up { color: #2ecc71; }
.rv-count--down { color: #e74c3c; }
.rv-count--neutral { color: #e6b800; }
.rv-count--pending { color: var(--text-muted); }
.rv-reviewers {
    margin-top: 0.75rem; padding-top: 0.6rem;
    border-top: 1px solid var(--border-color);
    display: flex; flex-direction: column; gap: 0.5rem;
}
.rv-reviewer { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; font-size: 0.85rem; }
.rv-reviewer-name { font-weight: 500; }
.rv-verdict { font-size: 0.72rem; font-weight: 600; padding: 0.1rem 0.45rem; border-radius: 999px; border: 1px solid; white-space: nowrap; }
.rv-verdict--up { color: #2ecc71; border-color: rgba(46,204,113,0.5); }
.rv-verdict--neutral { color: #e6b800; border-color: rgba(230,184,0,0.5); }
.rv-verdict--down { color: #e74c3c; border-color: rgba(231,76,60,0.5); }
.rv-verdict--pending { color: var(--text-muted); border-color: var(--border-color); }
.rv-comment { color: var(--text-muted); font-style: italic; }
.rv-time { color: var(--text-muted); font-size: 0.75rem; margin-left: auto; }

/* Weighted auto-approval progress + trusted-reviewer badge (admin-only) */
.rv-approval {
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    padding: 0.1rem 0.45rem;
    font-weight: 600;
}
.rv-approval--met { color: #2ecc71; border-color: rgba(46,204,113,0.5); background: rgba(46,204,113,0.1); }
.rv-trusted {
    font-size: 0.7rem; font-weight: 700; white-space: nowrap;
    color: #e6b800; border: 1px solid rgba(230,184,0,0.5);
    border-radius: 999px; padding: 0.1rem 0.4rem;
}

/* Trusted-reviewer selector in the admin Users table */
.usr-trusted-select {
    font-size: 0.8rem;
    padding: 0.15rem 0.35rem;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: var(--bg-color, transparent);
    color: var(--text-color);
    cursor: pointer;
}
.usr-trusted-select:disabled { opacity: 0.5; cursor: default; }

.rv-filters {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}
.rv-filters .field-input { width: auto; min-width: 160px; font-size: 0.85rem; }

/* ── Secret pre-start picks ─────────────────────────────────────── */
.cycle-secret-banner {
    background: rgba(230,184,0,0.12);
    border: 1px solid rgba(230,184,0,0.4);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    font-size: 0.88rem;
    color: var(--text-color);
}
.cycle-secret-notice {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1.75rem 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-style: italic;
    border-top: 1px solid var(--border-color);
    margin-top: 0.5rem;
}

/* ── "I want to play" profile picker ────────────────────────────── */
.wtp-wrap { display: flex; flex-direction: column; gap: 0.4rem; }
.wtp-current { font-size: 0.9rem; }
.wtp-game { color: var(--text-color); font-weight: 500; }
.wtp-empty { color: var(--text-muted); }
.wtp-editor { display: flex; align-items: center; gap: 0.4rem; }
.wtp-input-wrap { position: relative; flex: 1; }
.wtp-input-wrap .field-input { width: 100%; font-size: 0.82rem; padding: 0.3rem 0.5rem; }
.wtp-menu {
    position: absolute;
    top: calc(100% + 3px);
    left: 0; right: 0;
    z-index: 60;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    max-height: 260px;
    overflow-y: auto;
    padding: 0.2rem;
}
.wtp-menu-item {
    display: flex; align-items: center; gap: 0.5rem;
    padding: 0.35rem 0.4rem; border-radius: 5px;
    cursor: pointer; font-size: 0.82rem;
}
.wtp-menu-item:hover { background: rgba(127,127,127,0.12); }
.wtp-menu-img { width: 46px; height: 21px; object-fit: cover; border-radius: 3px; flex-shrink: 0; }
.wtp-menu-empty { padding: 0.5rem 0.4rem; color: var(--text-muted); font-size: 0.8rem; }
