html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

/* --- Game panel detail cards --- */
.detail-card {
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 0.5rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
}

.detail-card .detail-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.detail-grid {
    display: grid;
    grid-template-columns: 220px 1fr;
    row-gap: 0.4rem;
    column-gap: 1rem;
}

.detail-grid .detail-label {
    color: var(--bs-secondary-color);
    font-weight: 500;
}

.detail-grid .detail-value {
    word-break: break-word;
}

.detail-badge {
    font-size: 0.75rem;
    padding: 0.25em 0.6em;
    border-radius: 1rem;
    font-weight: 600;
}

.detail-badge.badge-online {
    background-color: #198754;
    color: #fff;
}

.detail-badge.badge-active {
    background-color: #198754;
    color: #fff;
}

.detail-badge.badge-offline {
    background-color: #6c757d;
    color: #fff;
}

.detail-badge.badge-banned {
    background-color: #dc3545;
    color: #fff;
}

.detail-badge.badge-deleted {
    background-color: #842029;
    color: #fff;
}

.maintenance-default-password {
    display: inline-block;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-weight: 700;
    font-size: 1.05rem;
    color: #9a3412;
    background: #ffedd5;
    border: 1px solid #fb923c;
    border-radius: 0.375rem;
    padding: 0.15rem 0.55rem;
    letter-spacing: 0.04em;
}

/* --- Account workspace --- */
.account-workspace {
    --account-surface: #ffffff;
    --account-surface-muted: #f8fafc;
    --account-border: #cbd5e1;
    --account-text: #172033;
    --account-muted: #475569;
    --account-accent: #2563eb;
    --account-accent-dark: #1d4ed8;
    color: var(--account-text);
}

.account-workspace h1,
.account-workspace h4,
.account-workspace .card-header,
.account-workspace .detail-title {
    color: var(--account-text);
}

.account-workspace h1 {
    font-size: clamp(1.65rem, 2vw, 2.1rem);
    font-weight: 750;
    letter-spacing: -0.025em;
    margin-bottom: 1.25rem;
}

.account-workspace h4 {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    margin-bottom: 0.75rem;
}

.account-workspace .account-search-bar,
.account-workspace .login-filter-bar {
    background: var(--account-surface-muted);
    border: 1px solid var(--account-border);
    border-radius: 0.75rem;
    padding: 0.85rem;
}

.account-workspace .form-label,
.account-workspace .text-muted {
    color: var(--account-muted) !important;
    font-weight: 600;
}

.account-workspace .form-control,
.account-workspace .form-select {
    color: var(--account-text);
    background-color: var(--account-surface);
    border-color: #94a3b8;
}

.account-workspace .form-control:focus,
.account-workspace .form-select:focus {
    border-color: var(--account-accent);
    box-shadow: 0 0 0 0.2rem rgb(37 99 235 / 18%);
}

.account-workspace .btn-primary {
    background-color: var(--account-accent);
    border-color: var(--account-accent);
    font-weight: 650;
}

.account-workspace .btn-primary:hover {
    background-color: var(--account-accent-dark);
    border-color: var(--account-accent-dark);
}

.account-workspace .detail-card,
.account-workspace .card {
    background: var(--account-surface);
    border: 1px solid var(--account-border);
    border-radius: 0.85rem;
    box-shadow: 0 0.35rem 1.1rem rgb(15 23 42 / 8%);
    overflow: hidden;
}

.account-workspace .detail-card {
    padding: 1.25rem;
}

.account-workspace .detail-card .detail-title {
    font-size: 1.25rem;
    font-weight: 750;
}

.account-workspace .detail-badge,
.account-workspace .detail-badge.badge-online,
.account-workspace .detail-badge.badge-offline,
.account-workspace .detail-badge.badge-banned,
.account-workspace .detail-badge.badge-deleted {
    color: #dde8f2;
    font-weight: 700;
}

.account-workspace .rz-datatable .rz-cell-data .detail-badge,
.account-workspace .rz-datatable .rz-cell-data .badge {
    color: #dde8f2;
}

.account-workspace .detail-grid {
    row-gap: 0.65rem;
}

.account-workspace .detail-grid .detail-label {
    color: var(--account-muted);
    font-weight: 650;
}

.account-workspace .detail-grid .detail-value {
    color: var(--account-text);
    font-weight: 500;
}

.account-workspace .card-header {
    background: var(--account-surface-muted);
    border-bottom: 1px solid var(--account-border);
    font-weight: 700;
    padding: 0.85rem 1rem;
}

.account-workspace .rz-datatable {
    border: 1px solid var(--account-border);
    border-radius: 0.75rem;
    overflow: hidden;
}

.account-workspace .rz-grid-table thead th {
    background: #eaf0f8;
    color: var(--account-text);
    border-color: var(--account-border);
    font-weight: 700;
}

.account-workspace .rz-data-grid-data {
    clip-path: inset(0 round 0.7rem);
}

.account-workspace .rz-datatable-tbody > tr > td {
    color: var(--account-text);
    border-color: #dbe4ef;
    background: var(--account-surface);
    font-weight: 500;
}

.account-workspace .rz-datatable .rz-cell-data,
.account-workspace .rz-datatable .rz-cell-data span,
.account-workspace .rz-datatable .rz-column-title {
    color: var(--account-text);
}

.account-workspace .rz-datatable-tbody > tr:nth-child(even) > td {
    background: #f8fafc;
}

.account-workspace .rz-datatable-tbody > tr:hover > td {
    background: #e0edff;
}

.account-workspace .rz-datatable .rz-cell-filter input,
.account-workspace .rz-datatable .rz-cell-filter .rz-dropdown-label {
    color: var(--account-text);
    font-weight: 500;
}

.account-workspace a {
    color: #0f4fbf;
    font-weight: 600;
}

.account-workspace .card.inv-panel-visible {
    overflow: hidden;
}

.account-workspace .card.inv-panel-visible > .card-header {
    border-top-left-radius: calc(0.85rem - 1px);
    border-top-right-radius: calc(0.85rem - 1px);
}

.inv-layout,
.inv-inventory-cluster,
.inv-equipment-column,
.inv-equipment-frame,
.inv-grid-wrap,
.inv-grid,
.inv-bank-column,
.inv-banks-unified {
    overflow: visible;
}

.inv-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: flex-start;
}

.inv-equipment-column {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex: 0 0 auto;
}

.inv-equipment-frame {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: linear-gradient(180deg, #eef2f8 0%, #e3e9f2 100%);
    border: 1px solid #c8d2e0;
    border-radius: 0.5rem;
    min-width: 280px;
}

.inv-equipment-top,
.inv-equipment-bottom {
    display: flex;
    justify-content: center;
    width: 100%;
}

.inv-equipment-body {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
}

.inv-equipment-side {
    display: flex;
    flex-direction: column;
}

.inv-equipment-avatar {
    width: 96px;
    height: 120px;
    border: 1px dashed #aebace;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0.35rem;
}

.inv-equipment-avatar-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #5b6475;
    word-break: break-word;
}

.inv-equipment-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.inv-equipment-row {
    display: flex;
    flex-direction: row;
    gap: 0.35rem;
    justify-content: center;
}

.inv-equipment-stack {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.inv-main-panel {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
}

.inv-inventory-cluster {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-start;
    flex: 1 1 auto;
    min-width: 0;
}

.inv-main-inventory {
    flex: 0 0 auto;
}

.inv-extra-bags-panel {
    flex: 0 0 auto;
    display: flex;
    justify-content: flex-start;
}

.inv-bags-stack {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.inv-quick-bar-row {
    width: 100%;
    display: flex;
    justify-content: center;
}

.inv-bags-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.inv-grid-wrap {
    display: inline-flex;
    flex-direction: column;
    gap: 0.35rem;
    width: fit-content;
    max-width: 100%;
}

.inv-grid-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #5b6475;
}

.inv-grid {
    display: grid;
    gap: 0.35rem;
    padding: 0.5rem;
    width: fit-content;
    max-width: 100%;
    background: linear-gradient(180deg, #eef2f8 0%, #e3e9f2 100%);
    border: 1px solid #c8d2e0;
    border-radius: 0.5rem;
}

.inv-slot-wrap {
    position: relative;
    display: inline-block;
}

.inv-slot-wrap:hover {
    z-index: 5;
}

.inv-slot {
    position: relative;
    display: block;
    width: 52px;
    height: 52px;
    padding: 0;
    border: 1px solid #aebace;
    border-radius: 0.35rem;
    background: #f8fafc;
    overflow: hidden;
}

.inv-slot:focus {
    outline: none;
}

.inv-slot:focus-visible {
    outline: 2px solid #0f4fbf;
    outline-offset: 1px;
}

.inv-slot-empty {
    background: rgba(255, 255, 255, 0.55);
}

.inv-slot-filled {
    background: #ffffff;
    cursor: pointer;
}

.inv-slot-selected {
    border-color: #0f4fbf;
    box-shadow: 0 0 0 2px #0f4fbf;
}

.inv-slot-hover-tip {
    display: none;
    position: absolute;
    left: 50%;
    top: calc(100% + 6px);
    transform: translateX(-50%);
    padding: 0.25rem 0.45rem;
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1.25;
    width: max-content;
    max-width: 220px;
    white-space: normal;
    text-align: center;
    color: #fff;
    background: rgba(15, 23, 42, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 0.35rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    pointer-events: none;
    z-index: 30;
}

.inv-slot-wrap:hover .inv-slot-hover-tip {
    display: block;
}

.inv-slot-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.inv-slot-count {
    position: absolute;
    right: 2px;
    bottom: 2px;
    min-width: 1.1em;
    padding: 0 3px;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
    color: #fff;
    background: rgba(15, 23, 42, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 3px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
    pointer-events: none;
}

.inv-slot-upgrade {
    position: absolute;
    left: 2px;
    top: 2px;
    padding: 0 3px;
    font-size: 0.6rem;
    font-weight: 700;
    line-height: 1.25;
    color: #ffe066;
    background: rgba(15, 23, 42, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 3px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
    pointer-events: none;
}

.inv-slot-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 0.55rem;
    padding: 0.15rem;
    text-align: center;
    word-break: break-all;
    color: #5b6475;
}

.inv-grid-compact {
    padding: 0.35rem;
}

.inv-grid-wrap-compact .inv-slot,
.inv-grid-compact .inv-slot {
    width: 46px;
    height: 46px;
}

.inv-grid-small {
    padding: 0.3rem;
    gap: 0.25rem;
}

.inv-grid-wrap-small .inv-slot,
.inv-grid-small .inv-slot {
    width: 38px;
    height: 38px;
}

.inv-grid-wrap-small .inv-slot-count,
.inv-grid-small .inv-slot-count {
    right: 1px;
    bottom: 1px;
    padding: 0 2px;
    font-size: 0.55rem;
    line-height: 1.15;
}

.inv-grid-wrap-small .inv-slot-upgrade,
.inv-grid-small .inv-slot-upgrade {
    left: 1px;
    top: 1px;
    padding: 0 2px;
    font-size: 0.5rem;
    line-height: 1.15;
}

.inv-grid-wrap-small .inv-grid-title,
.inv-grid-wrap-compact .inv-grid-title {
    font-size: 0.8rem;
}

.inv-banks-unified {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    align-items: start;
}

.inv-bank-column {
    padding: 0.65rem;
    border: 1px solid #dbe3ef;
    border-radius: 0.5rem;
    background: #fafbfd;
    min-width: 0;
}

.inv-bank-column-header {
    margin-bottom: 0.5rem;
    line-height: 1.35;
}

.inv-bank-current {
    border-color: #9ec5fe;
    background: #f3f8ff;
}

.inv-bank-block {
    padding: 0.75rem;
    border: 1px solid #dbe3ef;
    border-radius: 0.5rem;
    background: #fafbfd;
}

@media (max-width: 992px) {
    .inv-banks-unified {
        grid-template-columns: 1fr;
    }
}

.inv-details-card {
    top: 1rem;
}

.inv-details-list dt {
    color: #5b6475;
}

@media (max-width: 640px) {
    .detail-grid {
        grid-template-columns: 1fr;
    }
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}