﻿:root {
    --bg: #08090c;
    --panel: #13161b;
    --panel-soft: #1c2027;
    --ink: #f8f4ec;
    --muted: #b8b0a1;
    --line: rgba(255, 255, 255, 0.1);
    --accent: #f2c14e;
    --accent-2: #67d0b3;
    --danger: #e35d5b;
    --max: 1180px;
}

html,
body {
    background: var(--bg);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
    margin: 0;
}

a {
    color: inherit;
}

.page-section {
    padding: 5rem 5vw;
}

.section-inner {
    margin: 0 auto;
    max-width: var(--max);
}

.wide-table-page {
    padding-left: clamp(1rem, 2vw, 2rem);
    padding-right: clamp(1rem, 2vw, 2rem);
}

.wide-table-page .section-inner {
    max-width: min(1800px, 100%);
}

.eyebrow {
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero {
    background:
        linear-gradient(90deg, rgba(8, 9, 12, 0.92) 0%, rgba(8, 9, 12, 0.72) 44%, rgba(8, 9, 12, 0.26) 100%),
        url("https://images.unsplash.com/photo-1502904550040-7534597429ae?auto=format&fit=crop&w=2200&q=80") center/cover;
    min-height: calc(100vh - 72px);
    padding: 6rem 5vw 4rem;
}

.hero-grid {
    align-items: end;
    display: grid;
    gap: 2rem;
    grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
    margin: 0 auto;
    max-width: var(--max);
}

.hero h1,
.page-hero h1 {
    font-size: clamp(3rem, 8vw, 7.2rem);
    font-weight: 900;
    line-height: 0.92;
    margin: 1rem 0;
    max-width: 900px;
}

.hero p,
.page-hero p {
    color: #ddd4c5;
    font-size: clamp(1.05rem, 2vw, 1.28rem);
    line-height: 1.7;
    max-width: 680px;
}

.hero-actions,
.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 2rem;
}

.toolbar input {
    flex: 0 1 auto;
}

    .toolbar input.auto-grow-input {
        max-width: min(100%, 42ch);
        width: min(100%, 32ch);
        min-width: 20rem;
    }

.toolbar select {
    flex: 0 0 auto;
    min-width: 100px;
}

.btn-strong,
.btn-soft {
    border-radius: 8px;
    display: inline-flex;
    font-weight: 800;
    justify-content: center;
    min-height: 44px;
    padding: 0.78rem 1rem;
    text-decoration: none;
}

.btn-strong {
    background: var(--accent);
    color: #111111;
}

.btn-soft {
    background: rgba(255, 255, 255, 0.1);
    color: var(--ink);
}

.cookie-consent-backdrop {
    align-items: center;
    background: rgba(0, 0, 0, 0.72);
    bottom: 0;
    display: flex;
    justify-content: center;
    left: 0;
    padding: 1rem;
    position: fixed;
    right: 0;
    top: 0;
    z-index: 3000;
}

.cookie-consent-modal {
    background: var(--panel);
    border: 1px solid rgba(248, 244, 236, 0.18);
    border-radius: 8px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
    color: var(--ink);
    max-width: 560px;
    padding: 1.5rem;
    width: min(560px, 100%);
}

.cookie-consent-modal h2 {
    font-size: 1.35rem;
    margin: 0 0 0.9rem;
}

.cookie-consent-modal p {
    color: #ddd4c5;
    line-height: 1.55;
    margin: 0 0 0.85rem;
}

.cookie-consent-button {
    margin-top: 0.35rem;
}

.metric-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.metric,
.feature-card,
.data-card,
.profile-card,
.story-card,
.world-card {
    background: rgba(19, 22, 27, 0.88);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.metric {
    padding: 1.1rem;
}

.metric strong {
    display: block;
    font-size: clamp(1.8rem, 4vw, 3rem);
    line-height: 1;
}

.stickycol {
    position: sticky;
    left: 0;
    background-color: #ffffff; /* Ustaw tło zgodne z motywem strony */
    z-index: 2; /* Warstwa wyżej, aby komórki pod spodem nie nachodziły */
}

.metric span {
    color: var(--muted);
    display: block;
    margin-top: 0.45rem;
}

.feature-grid,
.profile-grid,
.story-grid,
.world-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.share-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.feature-card,
.profile-card,
.story-card,
.world-card,
.data-card {
    padding: 1.25rem;
}

.feature-card h3,
.profile-card h3,
.story-card h3,
.world-card h3 {
    font-size: 1.1rem;
    margin: 0.6rem 0;
}

.feature-card p,
.profile-card p,
.story-card p,
.world-card p,
.data-card p {
    color: var(--muted);
    line-height: 1.6;
}

.card-number {
    color: var(--accent-2);
    font-weight: 900;
}

.page-hero {
    background: #101217;
    border-bottom: 1px solid var(--line);
    padding: 5rem 5vw 3rem;
}

.data-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr 1fr;
}

.form-control,
.form-select,
input:not([type="checkbox"]) {
    background: #0f1116;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    min-height: 44px;
    padding: 0.7rem 0.85rem;
}

.form-control:focus,
input:not([type="checkbox"]):focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 0.18rem rgba(242, 193, 78, 0.22);
    outline: none;
}

input[type="checkbox"] {
    accent-color: var(--accent);
}

.table-wrap {
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow-x: auto;
}

.sticky-horizontal-scroll {
    position: fixed;
    bottom: 0;
    height: 18px;
    overflow-x: auto;
    overflow-y: hidden;
    background: white;
    z-index: 9999;
    display: block;
    border-top: 1px solid #ddd;
}

.sticky-horizontal-scroll-content {
    height: 1px;
}

.context-menu {
    position: absolute;
    display: none;
    background: #ffffff;
    border: 1px solid #ccc;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.2);
    padding: 10px;
    z-index: 1000;
    border-radius: 4px;
}

.context-menu label {
    display: block;
    cursor: pointer;
    margin-bottom: 5px;
}

.table {
    color: var(--ink);
    margin: 0;
}

.table th {
    color: var(--muted);
    font-size: 0.76rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.table th.sortable {
    cursor: pointer;
    user-select: none;
    transition: color 0.2s ease;
}

.table th.sortable:hover {
    color: var(--accent);
}

.sort-indicator {
    display: inline-block;
    margin-left: 0.4rem;
    font-size: 0.65rem;
    color: var(--accent);
    vertical-align: middle;
}

.table td,
.table th {
    border-color: var(--line);
    padding: 0.95rem;
}

.status-message {
    background: rgba(103, 208, 179, 0.12);
    border: 1px solid rgba(103, 208, 179, 0.28);
    border-radius: 8px;
    color: #d5fff3;
    padding: 1rem;
    white-space: pre-wrap;
}

.timeline {
    border-left: 1px solid var(--line);
    display: grid;
    gap: 1rem;
    margin-top: 2rem;
    padding-left: 1.2rem;
}

.timeline-item {
    position: relative;
}

.timeline-item::before {
    background: var(--accent);
    border-radius: 999px;
    content: "";
    height: 10px;
    left: -1.55rem;
    position: absolute;
    top: 0.45rem;
    width: 10px;
}

#blazor-error-ui {
    display: none;
}

@media (max-width: 920px) {
    .hero {
        min-height: auto;
        padding-top: 4rem;
    }

    .hero-grid,
    .data-grid {
        grid-template-columns: 1fr;
    }

    .feature-grid,
    .profile-grid,
    .story-grid,
    .world-grid,
    .metric-grid {
        grid-template-columns: 1fr;
    }

    .page-section {
        padding: 3rem 1rem;
    }
}

.member-summary {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 1rem;
}

.leader-strip {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 1.25rem 0 1rem;
}

.leader-card {
    background: linear-gradient(180deg, rgba(242, 193, 78, 0.12), rgba(19, 22, 27, 0.88));
    border: 1px solid rgba(242, 193, 78, 0.24);
    border-radius: 8px;
    min-height: 180px;
    padding: 1.1rem;
}

.leader-rank {
    color: var(--accent);
    display: block;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.leader-card h4 {
    font-size: 1.25rem;
    margin: 0.8rem 0 1rem;
}

.leader-stats {
    align-items: baseline;
    display: flex;
    gap: 0.45rem;
}

.leader-stats strong {
    font-size: 2.25rem;
    line-height: 1;
}

.leader-stats span,
.leader-card p,
.subtle,
.table-tools {
    color: var(--muted);
}

.table-tools {
    display: flex;
    flex-wrap: wrap;
    font-size: 0.9rem;
    gap: 0.8rem;
    justify-content: space-between;
    margin-top: 1.5rem;
}

.member-table td strong,
.member-table td .subtle {
    display: block;
}

.rank-cell,
.number-cell {
    color: var(--accent);
    font-weight: 900;
}

.status-pill {
    border-radius: 999px;
    display: inline-flex;
    font-size: 0.78rem;
    font-weight: 800;
    min-width: 68px;
    justify-content: center;
    padding: 0.32rem 0.6rem;
}

.status-active {
    background: rgba(103, 208, 179, 0.16);
    color: #9ff2dc;
}

.status-quiet {
    background: rgba(255, 255, 255, 0.08);
    color: var(--muted);
}

@media (max-width: 920px) {
    .member-summary,
    .leader-strip {
        grid-template-columns: 1fr;
    }
}

.row-actions,
.club-actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.45rem;
    white-space: nowrap;
}

.row-actions .btn-soft,
.club-actions .btn-soft,
.btn-disabled {
    border: 0;
    border-radius: 8px;
    font-size: 0.82rem;
    min-height: 36px;
    padding: 0.45rem 0.7rem;
    text-decoration: none;
}

.row-actions .btn-table-action {
    background: rgba(13, 16, 20, 0.86);
    border: 1px solid rgba(248, 244, 236, 0.16);
    color: #f8f4ec;
    white-space: nowrap;
}

.actions-column,
.report-column,
.report-inline {
    white-space: nowrap;
}

.row-actions .btn-table-action:hover,
.row-actions .btn-table-action:focus-visible {
    background: rgba(24, 30, 38, 0.96);
    border-color: rgba(95, 211, 185, 0.45);
    color: var(--accent-2);
}

.btn-disabled {
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    color: rgba(248, 244, 236, 0.38);
    display: inline-flex;
    font-weight: 800;
}

.detail-row td {
    background: rgba(255, 255, 255, 0.035);
}

.detail-panel {
    padding: 1rem;
}

.detail-panel h4 {
    font-size: 1rem;
    margin: 0 0 0.8rem;
}

.history-grid {
    display: grid;
    gap: 0.45rem 1rem;
    grid-template-columns: repeat(5, max-content);
}

.history-grid h4 {
    color: var(--accent);
}

.history-grid strong {
    color: var(--accent);
}

.history-grid span {
    color: var(--accent);
}


.detail-panel .member-history-title {
    background: #f2c14e !important;
    border: 1px solid rgba(255, 255, 255, 0.28) !important;
    border-left: 6px solid #67d0b3 !important;
    border-radius: 8px;
    color: #08090c !important;
    display: block;
    font-size: 1.05rem;
    font-weight: 900;
    line-height: 1.3;
    margin: 0 0 0.9rem;
    padding: 0.7rem 0.9rem;
}
