:root {
    --bg: #0b132b;
    --panel: #1c2541;
    --muted: #3a506b;
    --accent: #5bc0be;
    --accent-strong: #9ef0f0;
    --text: #f5f7fb;
    --danger: #ff6b6b;
    --success: #82e1a9;
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;600;700&display=swap');

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    font-family: 'Manrope', system-ui, -apple-system, sans-serif;
    background: radial-gradient(circle at 20% 20%, rgba(91, 192, 190, 0.08), transparent 35%), var(--bg);
    color: var(--text);
    min-height: 100%;
}

a { color: var(--accent-strong); text-decoration: none; }
a:hover { text-decoration: underline; }

.cluster {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.auth-shell {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 2rem;
}

.auth-card {
    width: min(920px, 100%);
    background: linear-gradient(135deg, rgba(24, 33, 62, 0.95), rgba(17, 25, 48, 0.92));
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 22px;
    padding: 2.5rem;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 10% 10%, rgba(91, 192, 190, 0.22), transparent 40%),
                radial-gradient(circle at 90% 20%, rgba(255, 209, 102, 0.18), transparent 35%);
    pointer-events: none;
}

.auth-grid {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 2rem;
    align-items: center;
}

.auth-hero {
    display: grid;
    gap: 1rem;
    padding-right: 1rem;
}

.auth-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: rgba(91, 192, 190, 0.2);
    color: var(--accent-strong);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.75rem;
}

.auth-title {
    margin: 0;
    font-size: clamp(2rem, 3vw, 2.6rem);
    line-height: 1.1;
}

.auth-subtitle {
    margin: 0;
    color: #b9c4d9;
    font-size: 1.05rem;
}

.auth-list {
    margin: 0;
    padding-left: 1.2rem;
    color: #d8e3f5;
    display: grid;
    gap: 0.35rem;
}

.auth-badge {
    align-self: flex-start;
    padding: 0.5rem 1rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    color: #d8e3f5;
    font-weight: 600;
}

.auth-form {
    background: rgba(12, 19, 43, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 2rem;
    display: grid;
    gap: 1rem;
}

.auth-form h2 {
    margin: 0;
    font-size: 1.5rem;
}

.auth-form p {
    margin: 0;
    color: #b9c4d9;
}

.auth-switch {
    margin: 0;
    color: #b9c4d9;
}

form .stack { display: grid; gap: 1rem; }

input, select, textarea {
    width: 100%;
    padding: 0.9rem 1rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
}

select option {
    color: #0b132b;
    background: #ffffff;
}

.check-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.4rem;
}

.check-row span {
    order: 2;
}

.check-row input[type="checkbox"] {
    order: 1;
    margin-left: 0;
    width: 14px;
    height: 14px;
    border-radius: 4px;
    border: 1.5px solid rgba(255, 255, 255, 0.35);
    background: rgba(12, 19, 43, 0.35);
    appearance: none;
    display: inline-grid;
    place-content: center;
    cursor: pointer;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2);
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.check-row input[type="checkbox"]::after {
    content: "";
    width: 5px;
    height: 8px;
    border-right: 2px solid var(--accent-strong);
    border-bottom: 2px solid var(--accent-strong);
    transform: scale(0) rotate(45deg);
    transform-origin: center;
    transition: transform 0.15s ease;
}

.check-row input[type="checkbox"]:checked {
    background: rgba(91, 192, 190, 0.12);
    border-color: rgba(91, 192, 190, 0.7);
}

.check-row input[type="checkbox"]:checked::after {
    transform: scale(1) rotate(45deg);
}

.check-row input[type="checkbox"]:focus-visible {
    outline: 2px solid rgba(91, 192, 190, 0.6);
    outline-offset: 2px;
}
}

.inline-field {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.inline-field input,
.inline-field select {
    max-width: 180px;
}

.date-range {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

button {
    border: none;
    border-radius: 12px;
    padding: 0.85rem 1.2rem;
    font-weight: 700;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(120deg, var(--accent), var(--accent-strong));
    color: #0b132b;
}

.btn-ghost {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.06);
}

.btn-ghost.danger {
    border-color: rgba(255, 107, 107, 0.5);
    color: var(--danger);
}

.layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    min-height: 100vh;
}

.sidebar {
    background: linear-gradient(180deg, rgba(28, 37, 65, 0.95), rgba(12, 18, 35, 0.98));
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.brand {
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--accent-strong);
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}

.brand svg {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.nav-links {
    display: grid;
    gap: 0.4rem;
}

.nav-link {
    padding: 0.85rem 1rem;
    border-radius: 12px;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.nav-link.active, .nav-link:hover {
    background: rgba(91, 192, 190, 0.15);
}

.nav-link.nav-sub {
    padding-left: 2rem;
    font-size: 0.95rem;
    opacity: 0.9;
}

.sidebar .bottom-actions {
    margin-top: auto;
    display: grid;
    gap: 0.5rem;
}

.sidebar-toggle {
    display: none;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    border-radius: 10px;
    padding: 0.5rem 0.75rem;
    font-weight: 700;
}

.sidebar-backdrop {
    display: none;
}

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(11, 19, 43, 0.75);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header .cluster {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header select {
    min-width: 240px;
    width: auto;
    padding: 0.5rem 0.75rem;
    border-radius: 10px;
}

.header .cluster:last-child {
    margin-left: auto;
}

.game-time {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.02em;
}

.public-url-text {
    color: var(--accent-strong);
}

.public-header {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 0.85rem 1.5rem;
    background: rgba(11, 19, 43, 0.85);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
}

.public-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.public-header .brand-label {
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.75);
}

.public-header .brand-label-prefix {
    display: inline-block;
    white-space: nowrap;
}

.public-header .brand-label-suffix {
    display: inline-block;
}

.public-header .game-time {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.35rem;
    text-align: right;
}

.public-header .game-time-label,
.public-header .game-time-value {
    white-space: nowrap;
}

.public-dashboard-extras {
    display: grid;
    gap: 1.5rem;
}

.panel.public-dashboard-frame {
    margin-left: 0;
    margin-right: 0;
}

.public-dashboard-frame .public-dashboard-extras {
    margin-top: 0.75rem;
}

.flag-icon {
    width: 1.3rem;
    height: 0.85rem;
    border-radius: 2px;
    display: inline-block;
    object-fit: cover;
}

.icon-menu-panel .flag-icon {
    margin-right: 0.5rem;
    vertical-align: middle;
}

.icon-menu > summary .flag-icon {
    width: 1.3rem;
    height: 0.85rem;
    display: block;
}

.panel-header.compact {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
}

.panel-header.compact .collapse-toggle {
    margin-left: auto;
}

.collapse-toggle {
    display: inline-flex;
}

.collapse-toggle svg {
    transition: transform 0.2s ease;
}

.collapse-toggle.collapsed svg {
    transform: rotate(180deg);
}
.last-updated {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.85rem;
}

.event-select {
    min-width: 220px;
}

.pill {
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    background: rgba(91, 192, 190, 0.15);
    color: var(--accent-strong);
    font-weight: 700;
}

.user-menu {
    position: relative;
}

.user-menu summary {
    list-style: none;
    cursor: pointer;
}

.user-menu summary::-webkit-details-marker {
    display: none;
}

.user-menu-panel {
    position: absolute;
    right: 0;
    top: 120%;
    min-width: 280px;
    background: rgba(28, 37, 65, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 1rem;
    box-shadow: var(--shadow);
    z-index: 120;
}

.user-menu-panel .user-menu-content {
    gap: 1rem;
}

.user-menu-panel .user-menu-actions {
    gap: 0.75rem;
}

.user-menu-panel .user-menu-danger {
    margin-top: 0.5rem;
}

.user-menu-panel .user-menu-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin-top: 0.25rem;
}

.content {
    padding: 1.5rem;
    display: grid;
    gap: 1.5rem;
}

.ptr-indicator {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transform: translateY(calc(-44px + var(--ptr-offset, 0px)));
    opacity: 0;
    transition: transform 0.2s ease, opacity 0.2s ease;
    z-index: 140;
}

.ptr-indicator-inner {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: rgba(12, 18, 32, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #cfe3ff;
    font-size: 0.85rem;
    letter-spacing: 0.02em;
    box-shadow: var(--shadow);
}

.ptr-indicator-arrow {
    display: inline-block;
    transition: transform 0.2s ease;
}

.ptr-pulling .ptr-indicator {
    opacity: 1;
}

.ptr-ready .ptr-indicator-arrow {
    transform: rotate(180deg);
}

.panel {
    background: rgba(28, 37, 65, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    padding: 1.25rem;
    box-shadow: var(--shadow);
}

.panel h2 {
    margin: 0 0 0.75rem;
    font-size: 1.2rem;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.summary-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.stat-card {
    display: grid;
    gap: 0.25rem;
}

.stat-label {
    color: #b9c4d9;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.75rem;
}

.stat-value {
    font-size: clamp(1.8rem, 2.8vw, 2.4rem);
    font-weight: 700;
}

.target-percent {
    font-size: 1.05rem;
    font-weight: 700;
}

.progress {
    height: 10px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    overflow: hidden;
    margin-top: 0.75rem;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-strong));
    border-radius: 999px;
    transition: width 0.3s ease;
}

table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    color: var(--text);
}

table thead,
table tbody {
}

table th, table td {
    padding: 0.65rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

table th {
    color: #b9c4d9;
    font-weight: 600;
}

.responsive-table {
    width: 100%;
    display: block;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
}

.table-card-list {
    display: none;
    gap: 0.9rem;
}

.table-card {
    background: rgba(20, 29, 52, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 0.9rem;
    display: grid;
    gap: 0.75rem;
    box-shadow: var(--shadow);
}

.table-card-fields {
    margin: 0;
    display: grid;
    gap: 0.6rem;
}

.table-card-field {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
}

.table-card-field dt {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #b9c4d9;
    font-weight: 600;
}

.table-card-field dd {
    margin: 0;
    text-align: right;
    word-break: break-word;
}

.table-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
}

.icon-spin {
    animation: icon-spin 1s linear infinite;
    transform-origin: 50% 50%;
}

@keyframes icon-spin {
    to { transform: rotate(360deg); }
}

.table-view.flip .responsive-table {
    display: none;
}

.table-view.flip .table-card-list {
    display: grid;
}

.table-tools {
    display: grid;
    gap: 0.75rem;
    justify-content: flex-start;
    margin-bottom: 0.75rem;
}

.table-tools-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: flex-start;
    align-items: center;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.panel-header h2 {
    margin: 0;
}

.panel-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-left: auto;
}

@media (max-width: 720px) {
    .panel-actions {
        flex-basis: 100%;
        justify-content: flex-start;
    }
}

.public-dashboard-extras.collapsed {
    display: none;
}

@media (max-width: 720px) {
    .public-dashboard-members,
    .panel.public-dashboard-frame {
        margin-left: -1.5rem;
        margin-right: -1.5rem;
    }
}

.table-tools input {
    width: auto;
    flex: 1 1 260px;
    max-width: 420px;
}

.sortable {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.sort-indicator {
    margin-left: 0.35rem;
    color: var(--accent-strong);
}

.column-toggle {
    position: relative;
}

.column-toggle summary {
    list-style: none;
}

.column-toggle summary::-webkit-details-marker {
    display: none;
}

.column-toggle-panel {
    position: absolute;
    right: 0;
    top: 110%;
    min-width: 160px;
    max-width: min(320px, 92vw);
    width: max-content;
    max-height: 70vh;
    overflow: auto;
    background: rgba(28, 37, 65, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 0.75rem;
    display: grid;
    gap: 0.4rem;
    box-shadow: var(--shadow);
    z-index: 50;
}

.column-toggle-panel label {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.35rem;
    font-size: 0.85rem;
    width: 100%;
}

.column-toggle-panel label span {
    flex: 0 1 auto;
}

.column-toggle-panel input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    flex: 0 0 auto;
}

.icon-menu {
    position: relative;
}

.icon-menu summary {
    list-style: none;
}

.icon-menu summary::-webkit-details-marker {
    display: none;
}

.icon-menu-panel {
    position: absolute;
    right: 0;
    top: 110%;
    min-width: 160px;
    max-width: min(320px, 92vw);
    max-height: 70vh;
    overflow: visible;
    background: rgba(28, 37, 65, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 0.5rem;
    display: grid;
    gap: 0.35rem;
    box-shadow: var(--shadow);
    z-index: 50;
}

.icon-menu-panel.lang-menu {
    max-height: min(60vh, 320px);
    overflow-y: auto;
    overflow-x: hidden;
    display: block;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: rgba(155, 179, 219, 0.6) rgba(12, 18, 35, 0.35);
    -webkit-overflow-scrolling: touch;
}

.icon-menu-panel.lang-menu::-webkit-scrollbar {
    width: 8px;
}

.icon-menu-panel.lang-menu::-webkit-scrollbar-track {
    background: rgba(12, 18, 35, 0.35);
    border-radius: 999px;
}

.icon-menu-panel.lang-menu::-webkit-scrollbar-thumb {
    background: rgba(155, 179, 219, 0.6);
    border-radius: 999px;
}

.icon-menu.align-left .icon-menu-panel {
    left: 0;
    right: auto;
}

.icon-menu-panel .btn-ghost,
.icon-menu-panel summary.btn-ghost {
    width: 100%;
    text-align: left;
    font-weight: 600;
    border: none;
    background: transparent;
    padding: 0.6rem 0.8rem;
    border-radius: 10px;
}

.icon-menu-panel .btn-ghost:hover,
.icon-menu-panel summary.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.06);
}

.icon-menu > summary.btn-ghost {
    border: none;
    background: transparent;
}

.icon-menu > summary.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.06);
}

.icon-menu > summary.btn-ghost.framed {
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: transparent;
}

.icon-menu > summary.btn-ghost.framed:hover {
    background: rgba(255, 255, 255, 0.06);
}

.icon-submenu {
    position: relative;
}

.icon-submenu > .column-toggle-panel {
    position: absolute;
    left: 100%;
    top: 0;
    margin-left: 0.5rem;
    min-width: 180px;
    max-width: min(260px, 80vw);
    width: max-content;
    max-height: 70vh;
    overflow: auto;
    background: rgba(28, 37, 65, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 0.75rem;
    box-shadow: var(--shadow);
    z-index: 60;
}

.icon-menu-panel .icon-submenu > .column-toggle-panel {
    display: none;
}

.icon-submenu[open] > .column-toggle-panel {
    display: grid;
    gap: 0.4rem;
}

@media (max-width: 900px) {
    .icon-submenu > .column-toggle-panel {
        left: 0;
        right: auto;
        top: 100%;
        margin-left: 0;
        margin-top: 0.5rem;
        min-width: 0;
        max-width: min(260px, 86vw);
    }
}

.badge {
    display: inline-block;
    padding: 0.4rem 0.7rem;
    border-radius: 10px;
    background: rgba(91, 192, 190, 0.2);
    color: var(--accent-strong);
    font-weight: 700;
}

.calendar-panel {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.calendar-desktop-view {
    display: grid;
    gap: 1rem;
}

.calendar-mobile-view {
    display: none;
}

.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.calendar-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.calendar-title {
    font-size: 1.2rem;
    font-weight: 700;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.5rem;
}

.calendar-weekday {
    text-align: center;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
}

.calendar-day {
    min-height: 110px;
    padding: 0.5rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(12, 18, 35, 0.6);
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.calendar-day.is-outside {
    opacity: 0.45;
}

.calendar-day.is-today {
    border-color: rgba(91, 192, 190, 0.8);
    box-shadow: 0 0 0 1px rgba(91, 192, 190, 0.3);
}

.calendar-day-header {
    font-size: 0.85rem;
    font-weight: 700;
}

.calendar-events {
    display: grid;
    gap: 0.3rem;
}

.calendar-event {
    display: block;
    padding: 0.2rem 0.4rem;
    border-radius: 8px;
    font-size: 0.75rem;
    line-height: 1.2;
    background: rgba(91, 192, 190, 0.16);
    color: var(--accent-strong);
}

.calendar-more {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.6);
    text-align: left;
    padding: 0.2rem 0.4rem;
    border-radius: 8px;
    width: fit-content;
}

.calendar-mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.calendar-day-cards {
    display: grid;
    gap: 0.6rem;
}

.calendar-day-card {
    padding: 0.7rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(12, 18, 35, 0.6);
    display: grid;
    gap: 0.5rem;
}

.calendar-day-card .calendar-day-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.calendar-day-card.is-today {
    border-color: rgba(91, 192, 190, 0.8);
    box-shadow: 0 0 0 1px rgba(91, 192, 190, 0.3);
}

@media (max-width: 720px) {
    .calendar-desktop-view {
        display: none;
    }

    .calendar-mobile-view {
        display: grid;
        gap: 1rem;
    }

    .calendar-event {
        font-size: 0.7rem;
    }
}

.calendar-event-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.4rem 0.6rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
}

.calendar-event-label {
    font-weight: 600;
}

.calendar-event-time {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    white-space: nowrap;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    display: grid;
    place-items: center;
    z-index: 2000;
}

.modal {
    display: block !important;
    background: rgba(28, 37, 65, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    width: min(520px, 92vw);
    height: auto !important;
    max-height: 90vh;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    z-index: 2100;
    position: relative;
    overflow: auto;
}

.alert {
    padding: 0.85rem 1rem;
    border-radius: 12px;
    background: rgba(255, 107, 107, 0.12);
    border: 1px solid rgba(255, 107, 107, 0.4);
    color: #ffc1c1;
}

.chip-group { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.chip { padding: 0.4rem 0.7rem; background: rgba(255,255,255,0.06); border-radius: 10px; }

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.6rem 0.8rem;
}

.btn-ghost.icon-btn {
    border: none;
}

.icon-btn svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}

.spacer { flex: 1; }

#blazor-error-ui {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 0.6rem 1rem;
    background: #ffecec;
    color: #222;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

@media (max-width: 1024px) {
    .layout { grid-template-columns: 1fr; }
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: min(320px, 86vw);
        transform: translateX(-105%);
        transition: transform 0.25s ease, opacity 0.25s ease;
        opacity: 0;
        z-index: 1200;
        flex-direction: column;
        overflow-y: auto;
    }
    .sidebar.open { transform: translateX(0); opacity: 1; }
    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.45);
        z-index: 1100;
        display: block;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.25s ease;
    }
    .sidebar-backdrop.show { opacity: 1; pointer-events: auto; }
    .sidebar-toggle { display: inline-flex; align-items: center; }
    .header { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 0.75rem; }
    .header .cluster { flex-wrap: wrap; }
}

@media (max-width: 640px) {
    .auth-shell {
        padding: 0;
        place-items: stretch;
    }
    .auth-card {
        width: 100%;
        padding-left: 0;
        padding-right: 0;
    }
    .auth-hero,
    .auth-form {
        width: 100%;
    }
    .auth-form {
        min-width: 0;
    }
    .header select {
        min-width: 0;
        width: 140px;
        max-width: 140px;
        flex: 0 1 140px;
        overflow: hidden;
    }
    .header .cluster {
        gap: 0.5rem;
        flex-wrap: nowrap;
    }
    .header .game-time {
        order: 3;
        flex: 1 1 100%;
        text-align: right;
        font-size: 0.78rem;
        line-height: 1.05;
    }
    .header .user-menu {
        order: 2;
        margin-left: auto;
    }
    .header .cluster:first-child {
        order: 1;
        flex: 1 1 auto;
        min-width: 0;
    }
    .pill {
        padding: 0.4rem 0.7rem;
        font-size: 0.9rem;
    }
    .user-menu-panel {
        right: 0;
        left: auto;
        width: min(320px, 92vw);
    }
    table th,
    table td {
        white-space: nowrap;
    }
    .responsive-table {
        display: none;
    }
    .table-card-list {
        display: grid;
    }
    .table-card-field {
        display: grid;
        grid-template-columns: minmax(120px, 40%) minmax(0, 1fr);
        align-items: start;
    }
    .table-card-field dd {
        text-align: right;
        width: auto;
    }
    .table-card-actions {
        justify-content: flex-start;
    }
    .table-view.flip .responsive-table {
        display: table;
    }
    .table-view.flip .table-card-list {
        display: none;
    }
    .icon-menu-panel {
        left: 0;
        right: auto;
        width: min(320px, 92vw);
    }
    .icon-submenu > .column-toggle-panel {
        left: 0;
        top: 110%;
        margin-left: 0;
        width: min(320px, 92vw);
    }
    .auth-grid {
        grid-template-columns: 1fr;
    }
    .auth-hero {
        padding: 1.25rem 1rem 0;
    }
    .auth-form {
        padding: 1.25rem 1rem 1.5rem;
    }
    .icon-menu-panel.lang-menu {
        width: min(320px, 86vw);
        max-height: 60vh;
        overflow-y: auto;
        overflow-x: hidden;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sidebar,
    .sidebar-backdrop {
        transition: none;
    }
    .icon-spin {
        animation: none;
    }
}

@media (max-width: 720px) {
    .icon-menu-panel.lang-menu {
        width: min(320px, 86vw);
        max-height: 60vh;
        overflow-y: auto;
        overflow-x: hidden;
    }
}
