:root {
    --app-bg: #f3efe7;
    --app-surface: rgba(255, 252, 247, 0.88);
    --app-surface-strong: #fffaf1;
    --app-ink: #172121;
    --app-muted: #5e6b6b;
    --app-accent: #ff7a00;
    --app-accent-deep: #d85f00;
    --app-border: rgba(23, 33, 33, 0.1);
    --app-shadow: 0 24px 60px rgba(29, 38, 38, 0.12);
}

html, body {
    min-height: 100%;
    font-family: Bahnschrift, "Segoe UI Variable", "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(255, 122, 0, 0.18), transparent 24%),
        radial-gradient(circle at top right, rgba(33, 181, 168, 0.18), transparent 30%),
        linear-gradient(180deg, #f8f4ec 0%, var(--app-bg) 100%);
    color: var(--app-ink);
}

body {
    margin: 0;
}

#app {
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

.app-loading-splash {
    position: relative;
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 2rem;
    overflow: hidden;
}

.app-loading-splash::before,
.app-loading-splash::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    filter: blur(10px);
    opacity: 0.65;
}

.app-loading-splash::before {
    width: 20rem;
    height: 20rem;
    top: -5rem;
    left: -3rem;
    background: radial-gradient(circle, rgba(255, 122, 0, 0.28), transparent 68%);
}

.app-loading-splash::after {
    width: 24rem;
    height: 24rem;
    right: -7rem;
    bottom: -8rem;
    background: radial-gradient(circle, rgba(33, 181, 168, 0.2), transparent 68%);
}

.app-loading-splash__panel {
    position: relative;
    z-index: 1;
    width: min(100%, 34rem);
    padding: 2rem;
    border-radius: 2rem;
    border: 1px solid rgba(23, 33, 33, 0.08);
    background:
        linear-gradient(155deg, rgba(255, 255, 255, 0.92), rgba(255, 250, 241, 0.88)),
        var(--app-surface-strong);
    box-shadow: 0 30px 80px rgba(29, 38, 38, 0.14);
    backdrop-filter: blur(20px);
}

.app-loading-splash__brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.app-loading-splash__mark {
    display: inline-grid;
    place-items: center;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 1.15rem;
    background: linear-gradient(135deg, var(--app-accent), #ffb703);
    color: #20150d;
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    box-shadow: 0 12px 24px rgba(255, 122, 0, 0.24);
}

.app-loading-splash__eyebrow {
    margin: 0 0 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--app-muted);
}

.app-loading-splash__title {
    margin: 0;
    font-size: clamp(1.8rem, 3vw, 2.35rem);
    line-height: 1.05;
}

.app-loading-splash__copy {
    margin: 1.35rem 0 1.5rem;
    color: var(--app-muted);
    font-size: 1rem;
}

.app-loading-splash__progress {
    height: 0.95rem;
    padding: 0.18rem;
    border-radius: 999px;
    background: rgba(23, 33, 33, 0.08);
    box-shadow: inset 0 1px 2px rgba(23, 33, 33, 0.08);
}

.app-loading-splash__progress-bar {
    width: var(--blazor-load-percentage, 0%);
    height: 100%;
    border-radius: inherit;
    background:
        linear-gradient(90deg, var(--app-accent), #ffb703 55%, #21b5a8 100%);
    box-shadow: 0 10px 24px rgba(255, 122, 0, 0.24);
    transition: width 120ms ease-out;
}

.app-loading-splash__meta {
    margin-top: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.92rem;
}

.app-loading-splash__label {
    color: var(--app-muted);
}

.app-loading-splash__percent {
    font-weight: 700;
    color: var(--app-ink);
    font-variant-numeric: tabular-nums;
}

.app-loading-splash__percent::after {
    content: var(--blazor-load-percentage-text, "0%");
}

.shell-header {
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(18px);
    background: rgba(243, 239, 231, 0.72);
    border-bottom: 1px solid rgba(23, 33, 33, 0.08);
}

.brand-link {
    display: inline-flex;
    align-items: center;
    gap: 0.9rem;
}

.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 1rem;
    background: linear-gradient(135deg, var(--app-accent), #ffb703);
    color: #20150d;
    font-weight: 800;
}

.brand-title,
.brand-subtitle {
    display: block;
}

.brand-title {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.brand-subtitle {
    color: var(--app-muted);
    font-size: 0.86rem;
}

.nav-pill {
    padding: 0.7rem 1rem;
    border-radius: 999px;
    font-weight: 600;
}

.nav-pill.active {
    background: rgba(23, 33, 33, 0.08);
}

.panel {
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: 1.8rem;
    box-shadow: var(--app-shadow);
    padding: 1.5rem;
}

.panel--hero {
    background:
        linear-gradient(135deg, rgba(23, 33, 33, 0.96), rgba(35, 61, 60, 0.9)),
        var(--app-surface-strong);
    color: #fff8ef;
}

.panel--hero .text-light-emphasis,
.panel--hero .session-progress small {
    color: rgba(255, 248, 239, 0.84) !important;
}

.hero-panel .panel {
    min-height: 100%;
}

.eyebrow {
    display: inline-block;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.75rem;
    font-weight: 700;
    color: rgba(255, 248, 239, 0.72);
}

.identity-strip {
    margin-top: 2rem;
    padding: 1rem;
    border-radius: 1.2rem;
    background: rgba(255, 255, 255, 0.08);
}

.btn-accent {
    background: linear-gradient(135deg, var(--app-accent), #ffb703);
    color: #20150d;
    border: none;
    font-weight: 700;
}

.btn-accent:hover,
.btn-accent:focus {
    background: linear-gradient(135deg, var(--app-accent-deep), #f0a202);
    color: #20150d;
}

.session-grid,
.member-grid,
.deck-grid {
    display: grid;
    gap: 1rem;
}

.session-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.member-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.deck-grid {
    grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
}

.session-card {
    width: 100%;
    text-align: left;
    border: 1px solid var(--app-border);
    border-radius: 1.4rem;
    background: white;
    padding: 1.1rem;
    transition: transform 140ms ease, box-shadow 140ms ease;
}

.session-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 30px rgba(23, 33, 33, 0.12);
}

.session-card__meta,
.session-card__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.session-card__id,
.session-card__time,
.member-card__role,
.session-progress small {
    color: var(--app-muted);
}

.session-card__title {
    margin: 0.9rem 0 0.7rem;
    font-size: 1.15rem;
}

.empty-state {
    padding: 2rem;
    text-align: center;
    border-radius: 1.4rem;
    border: 1px dashed rgba(23, 33, 33, 0.2);
    color: var(--app-muted);
}

.session-progress {
    min-width: min(100%, 20rem);
}

.session-progress__value {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.member-card {
    padding: 1rem;
    border-radius: 1.3rem;
    background: white;
    border: 1px solid var(--app-border);
}

.member-card--organizer {
    border-color: rgba(255, 122, 0, 0.35);
    background: linear-gradient(180deg, rgba(255, 122, 0, 0.08), white);
}

.member-card__name {
    font-weight: 700;
}

.member-card__value {
    min-width: 3.5rem;
    padding: 0.55rem 0.75rem;
    text-align: center;
    border-radius: 0.9rem;
    background: #172121;
    color: #fff8ef;
    font-size: 1.05rem;
    font-weight: 700;
}

.vote-panel {
    padding: 1rem;
    border-radius: 1.4rem;
    background: rgba(23, 33, 33, 0.04);
}

.deck-card {
    min-height: 5.8rem;
    border-radius: 1.3rem;
    border: 1px solid rgba(23, 33, 33, 0.12);
    background: white;
    font-size: 1.15rem;
    font-weight: 700;
}

.deck-card--selected {
    background: linear-gradient(135deg, #172121, #23403f);
    color: #fff8ef;
    border-color: #172121;
}

.selected-chip {
    padding: 0.6rem 0.9rem;
    border-radius: 999px;
    background: rgba(255, 122, 0, 0.12);
    color: #8a4300;
    font-weight: 700;
}

#blazor-error-ui {
    background: #fff5d9;
    bottom: 0;
    box-shadow: 0 -1px 4px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    float: right;
}

@media (max-width: 767.98px) {
    .app-loading-splash {
        padding: 1.2rem;
    }

    .app-loading-splash__panel {
        padding: 1.5rem;
        border-radius: 1.5rem;
    }

    .app-loading-splash__brand {
        align-items: flex-start;
    }

    .app-loading-splash__meta {
        align-items: flex-start;
        flex-direction: column;
    }

    .panel {
        border-radius: 1.4rem;
        padding: 1.2rem;
    }

    .brand-subtitle {
        display: none;
    }
}
