:root {
    --app-bg: #eef8fc;
    --app-bg-2: #f8fcff;
    --app-surface: #ffffff;
    --app-surface-soft: #f2f8fc;
    --app-surface-strong: #101724;
    --app-border: #d5e7f0;
    --app-border-strong: #a9cfdf;
    --app-ink: #111827;
    --app-ink-rgb: 17, 24, 39;
    --app-muted: #667085;
    --app-primary: #168fd8;
    --app-primary-rgb: 22, 143, 216;
    --app-primary-dark: #0c6fa8;
    --app-accent: #c060a8;
    --app-accent-rgb: 192, 96, 168;
    --app-accent-dark: #963a7e;
    --app-success: #19a974;
    --app-warning: #b7791f;
    --app-danger: #d92d20;
    --app-radius: 8px;
    --app-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
    --app-shadow-soft: 0 8px 22px rgba(15, 23, 42, 0.06);
    --app-font: "Segoe UI", "Aptos", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* {
    letter-spacing: 0;
}

html {
    min-height: 100%;
}

body {
    min-height: 100%;
    background: var(--app-bg);
    background-image: none;
    color: var(--app-ink);
    font-family: var(--app-font) !important;
    font-size: 15px;
    line-height: 1.45;
}

button,
input,
optgroup,
select,
textarea,
.btn,
.form-control,
.form-select,
.table,
.dataTables_wrapper,
.dropdown-menu {
    font-family: var(--app-font) !important;
}

a {
    color: var(--app-accent-dark);
}

a:hover {
    color: var(--app-primary);
}

.app-navbar {
    position: sticky;
    top: 0;
    z-index: 1030;
    min-height: 64px;
    background: var(--app-surface-strong) !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.18) !important;
    backdrop-filter: blur(14px);
}

.app-nav-container {
    max-width: 1240px;
}

.app-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    color: #fff !important;
    font-weight: 800;
    text-decoration: none;
}

.app-brand-logo {
    height: 34px;
    width: auto;
}

.app-main-nav {
    align-items: center;
    gap: 0.25rem;
    margin-left: 1.25rem;
}

.app-user-nav {
    margin-left: auto;
}

.app-navbar .nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
    min-height: 38px;
    padding: 0.45rem 0.72rem !important;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.76) !important;
    font-size: 0.92rem;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.app-navbar .nav-link:hover,
.app-navbar .nav-link.active,
.app-navbar .nav-link.show {
    background: rgba(255, 255, 255, 0.11);
    color: #fff !important;
}

.app-navbar .nav-link.active {
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.user-pill {
    background: rgba(var(--app-primary-rgb), 0.24);
    color: #fff !important;
}

.app-nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
    border-radius: 999px !important;
    padding: 0 !important;
    color: #fff !important;
}

.app-nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    border-radius: 999px;
    background: #fff;
}

.dropdown-menu {
    padding: 0.45rem !important;
    border: 1px solid var(--app-border) !important;
    border-radius: var(--app-radius) !important;
    box-shadow: var(--app-shadow) !important;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.58rem;
    min-height: 2.2rem;
    border-radius: 6px;
    color: var(--app-ink) !important;
    font-weight: 650;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background: #e7f5fc !important;
    color: var(--app-primary-dark) !important;
}

.navbar .dropdown-menu {
    background: #ffffff !important;
}

.mobile-nav-overlay {
    position: fixed;
    inset: 0;
    z-index: 1040;
    display: none;
    background: rgba(15, 23, 42, 0.52);
    backdrop-filter: blur(3px);
}

.mobile-nav-dropdown {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 1050;
    width: min(360px, 92vw);
    height: 100vh;
    padding: 1rem;
    background: var(--app-surface-strong);
    box-shadow: -18px 0 45px rgba(15, 23, 42, 0.28);
    transform: translateX(100%);
    transition: transform 0.22s ease;
}

.mobile-nav-dropdown.show {
    transform: translateX(0);
}

.mobile-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 1rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.mobile-nav-user {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    color: #fff;
    font-weight: 800;
}

.mobile-nav-close {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.mobile-nav-menu {
    padding: 0;
    margin: 0;
    list-style: none;
}

.mobile-nav-menu a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.82rem 0.75rem;
    border-radius: var(--app-radius);
    color: rgba(255, 255, 255, 0.82);
    font-weight: 750;
    text-decoration: none;
}

.mobile-nav-menu a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.mobile-nav-menu i {
    width: 1.2rem;
    text-align: center;
}

.page-shell {
    max-width: 1240px;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.page-title-wrap {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 0.75rem;
}

.page-title-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    border-radius: var(--app-radius);
    background: var(--app-primary);
    background-image: none;
    color: #fff;
    box-shadow: var(--app-shadow-soft);
}

.page-header h1 {
    margin: 0;
    color: var(--app-ink);
    font-size: clamp(1.75rem, 3vw, 2.45rem);
    font-weight: 850;
    line-height: 1.05;
}

.page-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem;
}

.app-card,
.detail-card,
.form-container,
.form-section,
.bulk-enrich-container,
.import-container,
.chart-container,
.summary-card,
.card,
.collection-toolbar {
    background: var(--app-surface) !important;
    border: 1px solid var(--app-border) !important;
    border-radius: var(--app-radius) !important;
    box-shadow: var(--app-shadow-soft) !important;
}

.detail-card,
.form-container,
.bulk-enrich-container,
.import-container,
.chart-container {
    padding: 1.25rem;
    margin-bottom: 1.25rem;
}

.form-section,
.controls-section,
.progress-section {
    padding: 1rem;
    margin-bottom: 1rem;
    background: var(--app-surface-soft) !important;
    border: 1px solid var(--app-border) !important;
    border-radius: var(--app-radius) !important;
    box-shadow: none !important;
}

.form-section h4,
.detail-card h3,
.detail-card h4,
.chart-title,
.card-title {
    color: var(--app-ink);
    font-size: 1.04rem;
    font-weight: 850;
}

.form-label {
    color: #344054;
    font-size: 0.86rem;
    font-weight: 750;
}

.form-control,
.form-select {
    min-height: 42px;
    border: 1px solid var(--app-border-strong) !important;
    border-radius: var(--app-radius) !important;
    background-color: #fff !important;
    color: var(--app-ink) !important;
    box-shadow: none !important;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--app-accent) !important;
    box-shadow: 0 0 0 0.22rem rgba(var(--app-accent-rgb), 0.16) !important;
}

.form-check-input:checked {
    background-color: var(--app-primary);
    border-color: var(--app-primary);
}

.form-error-message,
.is-invalid-custom {
    border-color: var(--app-danger) !important;
}

.info-field {
    background: #f2f7fb !important;
    color: #344054 !important;
    font-weight: 800 !important;
}

.info-field::before {
    content: none !important;
}

.btn {
    min-height: 40px;
    border-radius: var(--app-radius) !important;
    font-weight: 800 !important;
    letter-spacing: 0;
    box-shadow: none !important;
}

.btn-sm {
    min-height: 32px;
    font-size: 0.82rem;
}

.btn-primary {
    background: var(--app-primary) !important;
    border-color: var(--app-primary) !important;
    color: #fff !important;
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--app-primary-dark) !important;
    border-color: var(--app-primary-dark) !important;
}

.btn-secondary,
.btn-outline-secondary:hover {
    background: #243041 !important;
    border-color: #243041 !important;
    color: #fff !important;
}

.btn-outline-primary {
    border-color: var(--app-primary) !important;
    color: var(--app-primary) !important;
}

.btn-outline-primary:hover,
.btn-check:checked + .btn-outline-primary,
.btn-outline-primary.active {
    background: var(--app-primary) !important;
    border-color: var(--app-primary) !important;
    color: #fff !important;
}

.btn-outline-danger {
    border-color: rgba(217, 45, 32, 0.55) !important;
    color: var(--app-danger) !important;
}

.btn-outline-danger:hover {
    background: var(--app-danger) !important;
    color: #fff !important;
}

.btn-info,
.btn-outline-info:hover {
    background: #0891b2 !important;
    border-color: #0891b2 !important;
    color: #fff !important;
}

.btn-outline-info {
    border-color: #0891b2 !important;
    color: #087f99 !important;
}

.btn-success,
.btn-outline-success:hover {
    background: var(--app-success) !important;
    border-color: var(--app-success) !important;
}

.bg-primary,
.bg-info {
    background-color: var(--app-primary) !important;
}

.text-primary {
    color: var(--app-primary) !important;
}

.summary-card {
    position: relative;
    height: 100%;
    padding: 1.1rem;
    overflow: hidden;
    text-align: left;
    transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.summary-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    background: var(--app-primary);
}

.summary-card.clickable:hover {
    transform: translateY(-2px);
    box-shadow: var(--app-shadow) !important;
}

.summary-card h3 {
    margin: 0 0 0.15rem;
    font-size: clamp(1.6rem, 3vw, 2.15rem);
    font-weight: 900;
}

.summary-card p {
    margin: 0;
    color: var(--app-muted);
    font-weight: 800;
}

.metric-card h3 {
    font-size: clamp(1.35rem, 2.5vw, 1.9rem);
}

.summary-card-link {
    display: block;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.summary-card-link:hover {
    color: inherit;
}

.status-badge,
.lifecycle-badge,
.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: 999px;
    padding: 0.28rem 0.65rem;
    font-size: 0.76rem;
    font-weight: 850;
    line-height: 1.1;
    white-space: nowrap;
}

.status-owned,
.status-received,
.status-played,
.status-completed,
.lifecycle-completed {
    background: rgba(25, 169, 116, 0.14);
    color: #087443;
}

.status-not-owned,
.status-not-received,
.status-not-played,
.status-not-completed,
.lifecycle-wishlist {
    background: rgba(102, 112, 133, 0.14);
    color: #475467;
}

.lifecycle-ordered {
    background: rgba(245, 165, 36, 0.17);
    color: #8a5a00;
}

.lifecycle-backlog {
    background: rgba(var(--app-primary-rgb), 0.14);
    color: var(--app-primary-dark);
}

.lifecycle-playing {
    background: rgba(var(--app-accent-rgb), 0.14);
    color: var(--app-accent-dark);
}

.filter-chip {
    background: #e7f5fc;
    color: var(--app-ink);
    border: 1px solid #c5e3f1;
}

.filter-chip button {
    border: 0;
    background: transparent;
    color: inherit;
    padding: 0;
}

.collection-toolbar {
    padding: 1rem;
    margin-bottom: 1rem;
}

.collection-toolbar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.collection-filter-toggle {
    min-height: 3.05rem;
    border-radius: var(--app-radius);
    font-weight: 850;
}

.collection-filter-toggle.active,
.collection-filter-toggle.has-active-filters {
    color: #fff !important;
    background: var(--app-primary) !important;
    border-color: var(--app-primary) !important;
}

.collection-filter-toggle.active:hover,
.collection-filter-toggle.has-active-filters:hover {
    color: #fff !important;
    background: var(--app-primary-dark) !important;
    border-color: var(--app-primary-dark) !important;
}

.filter-count-badge {
    display: inline-grid;
    min-width: 1.35rem;
    height: 1.35rem;
    place-items: center;
    padding: 0 0.35rem;
    color: var(--app-primary);
    font-size: 0.72rem;
    line-height: 1;
    background: #fff;
    border-radius: 999px;
}

.filter-chevron {
    transition: transform 0.16s ease;
}

.collection-filter-toggle[aria-expanded="true"] .filter-chevron {
    transform: rotate(180deg);
}

.collection-filters {
    margin-top: 0.9rem;
    padding-top: 0.9rem;
    border-top: 1px solid var(--app-border);
}

.collection-filter-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 0.85rem;
}

.filter-field {
    grid-column: span 2;
    min-width: 0;
}

.filter-field-search,
.filter-field-wide {
    grid-column: span 3;
}

#activeFilters {
    margin-top: 0.75rem;
}

#activeFilters:empty {
    display: none !important;
}

.collection-toolbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.collection-sort-panel {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.45rem;
    background: var(--app-surface-soft);
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
}

.collection-sort-field {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.control-eyebrow {
    color: var(--app-muted);
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0;
    text-transform: uppercase;
    white-space: nowrap;
}

.collection-sort-field .form-select {
    width: auto;
    min-width: 168px;
    height: 2.55rem;
    border-radius: 0.75rem;
}

.collection-direction-toggle {
    height: 2.55rem;
    padding: 0.18rem;
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: 0.85rem;
}

.collection-direction-toggle .btn {
    min-width: 4.45rem;
    border: 0;
    border-radius: 0.65rem !important;
    color: var(--app-muted);
    font-weight: 850;
}

.collection-direction-toggle .btn.active {
    color: #fff;
    background: var(--app-primary) !important;
    border-color: transparent !important;
    box-shadow: 0 8px 16px rgba(var(--app-primary-rgb), 0.22);
}

.collection-view-toggle .btn {
    height: 3.05rem;
    min-width: 7.3rem;
    font-weight: 850;
}

.collection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 1rem;
}

.game-card {
    display: flex;
    min-height: 100%;
    overflow: hidden;
    flex-direction: column;
    color: inherit;
    text-decoration: none;
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    box-shadow: var(--app-shadow-soft);
    transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}

.game-card:hover {
    color: inherit;
    transform: translateY(-2px);
    border-color: rgba(var(--app-primary-rgb), 0.36);
    box-shadow: var(--app-shadow);
}

.game-cover,
.game-cover-large,
.game-cover-small,
.game-card-cover {
    background: #dcecf5;
    object-fit: cover;
}

.cover-placeholder {
    color: #536273;
}

.cover-placeholder i {
    opacity: 0.72;
}

.game-cover {
    width: 48px;
    height: 64px;
    border-radius: 6px;
}

.game-cover-small {
    width: 42px;
    height: 56px;
    border-radius: 5px;
}

.game-cover-large {
    max-width: 275px;
    width: 100%;
    border-radius: var(--app-radius);
    box-shadow: var(--app-shadow);
}

.game-card-cover {
    width: 100%;
    aspect-ratio: 3 / 4;
}

.game-card-body {
    display: grid;
    gap: 0.55rem;
    padding: 0.85rem;
}

.game-card-title {
    min-height: 2.35em;
    font-weight: 900;
    line-height: 1.18;
}

.game-meta {
    color: var(--app-muted);
    font-size: 0.86rem;
}

.quick-actions,
.action-button-group {
    display: inline-flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.35rem;
}

.quick-actions {
    justify-content: flex-start;
}

.action-button-group {
    justify-content: flex-end;
    white-space: nowrap;
}

.action-button-group .btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    min-height: 2rem;
    padding: 0 !important;
    flex: 0 0 auto;
    line-height: 1;
}

.actions-cell {
    width: 86px;
    min-width: 86px;
    text-align: right !important;
    white-space: nowrap;
}

.action-menu {
    min-width: 11rem;
}

.action-menu .dropdown-item i {
    width: 1rem;
    text-align: center;
}

.table-responsive {
    overflow-x: auto;
    overflow-y: visible;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    background: var(--app-surface);
    box-shadow: var(--app-shadow-soft);
}

.dataTables_wrapper {
    color: var(--app-ink);
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
    padding: 0.65rem 0;
    color: var(--app-muted) !important;
    font-size: 0.88rem;
    font-weight: 750;
}

.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
    margin: 0 0.35rem;
}

.collection-table,
.app-data-table,
.dataTable {
    width: 100% !important;
    table-layout: fixed;
    border-collapse: separate !important;
    border-spacing: 0;
    font-family: var(--app-font) !important;
}

.collection-table th,
.collection-table td,
.app-data-table th,
.app-data-table td,
.dataTable th,
.dataTable td {
    box-sizing: border-box;
}

.collection-table.table > :not(caption) > * > *,
.app-data-table.table > :not(caption) > * > *,
.dataTable.table > :not(caption) > * > * {
    padding: 0.56rem 0.75rem !important;
    vertical-align: middle;
    border-color: var(--app-border) !important;
    border-bottom-width: 1px !important;
    box-shadow: none !important;
}

.collection-table thead th,
.app-data-table thead th,
.dataTable thead th {
    background: var(--app-surface-strong) !important;
    color: #fff !important;
    border-color: #263345 !important;
    font-size: 0.78rem;
    font-weight: 850;
    text-transform: uppercase;
}

.collection-table tbody tr:hover td,
.app-data-table tbody tr:hover td,
.dataTable tbody tr:hover td {
    background: #f4fbfe !important;
}

.collection-table.table-striped > tbody > tr:nth-of-type(odd) > *,
.app-data-table.table-striped > tbody > tr:nth-of-type(odd) > *,
.dataTable.table-striped > tbody > tr:nth-of-type(odd) > * {
    --bs-table-accent-bg: #fff;
}

.collection-table.table-striped > tbody > tr:nth-of-type(even) > *,
.app-data-table.table-striped > tbody > tr:nth-of-type(even) > *,
.dataTable.table-striped > tbody > tr:nth-of-type(even) > * {
    --bs-table-accent-bg: #fbfdff;
}

.collection-table th:nth-child(1),
.collection-table td:nth-child(1) {
    width: 72px;
}

.collection-table th:nth-child(2),
.collection-table td:nth-child(2) {
    width: 250px;
}

.collection-table th:nth-child(3),
.collection-table td:nth-child(3) {
    width: 170px;
}

.collection-table th:nth-child(4),
.collection-table td:nth-child(4),
.collection-table th:nth-child(5),
.collection-table td:nth-child(5),
.collection-table th:nth-child(6),
.collection-table td:nth-child(6),
.collection-table th:nth-child(7),
.collection-table td:nth-child(7) {
    width: 104px;
}

.collection-table th:nth-child(8),
.collection-table td:nth-child(8) {
    width: 76px;
}

.game-table-title {
    display: -webkit-box;
    max-height: 2.45em;
    overflow: hidden;
    line-height: 1.22;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.step-indicator {
    counter-reset: steps;
}

.step {
    padding: 0.75rem;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    background: var(--app-surface);
    color: var(--app-muted);
    text-align: center;
    font-weight: 850;
}

.step.active {
    background: var(--app-primary);
    background-image: none;
    border-color: var(--app-primary);
    color: #fff;
}

.step.completed {
    background: rgba(25, 169, 116, 0.13);
    color: #087443;
}

.mapping-row {
    padding: 0.85rem;
    margin-bottom: 0.65rem;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    background: var(--app-surface-soft);
}

.progress-section {
    display: none;
}

.progress-section.active {
    display: block;
}

.progress {
    overflow: hidden;
    border-radius: 999px;
    background: #e6edf5;
}

.progress-bar {
    background: var(--app-primary);
    background-image: none;
}

.ai-field {
    min-width: 0;
    max-width: none;
    white-space: normal;
    word-break: normal;
    overflow-wrap: anywhere;
}

.ai-field-description {
    min-width: 0;
}

.enrich-table {
    min-width: 980px;
}

.enrich-table .checkbox-cell {
    width: 56px;
}

.enrich-table .cover-cell {
    width: 72px;
}

.enrich-table .title-cell {
    width: 190px;
}

.enrich-table .ai-field-description {
    width: 300px;
}

.enrich-table .rating-cell {
    width: 104px;
}

.enrich-table .playtime-cell {
    width: 118px;
}

.enrich-table .trailer-cell {
    width: 120px;
}

.enrich-table .actions-cell {
    width: 96px;
    min-width: 96px;
}

.diff-cell {
    display: grid;
    gap: 0.2rem;
}

.diff-text {
    display: -webkit-box;
    max-height: 4.35em;
    overflow: hidden;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.enriching {
    background-color: #fff8e7 !important;
}

.enriched {
    background-color: #eaf8f1 !important;
}

.enrich-error {
    background-color: #fff0ef !important;
}

.checkbox-cell,
.cover-cell {
    width: 1%;
}

.app-toast-container {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 1080;
    display: grid;
    gap: 0.75rem;
    max-width: min(380px, calc(100vw - 2rem));
}

.app-toast {
    padding: 0.85rem 1rem;
    border-left: 4px solid var(--app-accent);
    border-radius: var(--app-radius);
    background: #111827;
    color: #fff;
    box-shadow: var(--app-shadow);
}

.app-toast.success {
    border-left-color: var(--app-success);
}

.app-toast.error {
    border-left-color: var(--app-danger);
}

.app-toast.warning {
    border-left-color: var(--app-warning);
}

.empty-state,
.loading-state {
    padding: 2rem;
    border: 1px dashed var(--app-border-strong);
    border-radius: var(--app-radius);
    background: rgba(255, 255, 255, 0.8);
    text-align: center;
}

.detail-field-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
    gap: 0.65rem 1rem;
    margin: 0 0 1rem;
}

.detail-field {
    min-width: 0;
    padding-bottom: 0.55rem;
    border-bottom: 1px solid var(--app-border);
}

.detail-field-label {
    margin: 0 0 0.15rem;
    color: var(--app-muted);
    font-size: 0.75rem;
    font-weight: 850;
    text-transform: uppercase;
}

.detail-field-value {
    margin: 0;
    overflow-wrap: anywhere;
    font-weight: 800;
}

.image-upload-area {
    position: relative;
    border: 2px dashed var(--app-border-strong);
    border-radius: var(--app-radius);
    background: linear-gradient(180deg, #ffffff 0%, #f8fcff 100%);
    cursor: pointer;
    transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.image-upload-area:hover {
    border-color: var(--app-accent);
    background: #f5fbfd;
    box-shadow: inset 0 0 0 1px rgba(var(--app-accent-rgb), 0.08);
}

.upload-placeholder-desktop i {
    color: var(--app-primary);
}

.upload-native-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    clip: rect(0, 0, 0, 0);
}

.mobile-upload-actions {
    display: none;
    grid-template-columns: 1fr;
    gap: 0.65rem;
}

.mobile-upload-action {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: flex-start;
    gap: 0.85rem;
    margin: 0;
    padding: 0.95rem;
    color: var(--app-ink);
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    user-select: none;
    background: #ffffff;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    box-shadow: 0 8px 18px rgba(var(--app-ink-rgb), 0.04);
    transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.mobile-upload-action-primary {
    color: #073f62;
    background: #e8f6fd;
    border-color: rgba(var(--app-primary-rgb), 0.28);
}

.mobile-upload-action-secondary {
    color: #682455;
    background: #fff5fb;
    border-color: rgba(var(--app-accent-rgb), 0.24);
}

.mobile-upload-icon {
    display: inline-grid;
    width: 2.8rem;
    height: 2.8rem;
    flex: 0 0 auto;
    place-items: center;
    color: #fff;
    font-size: 1.15rem;
    background: var(--app-primary);
    border-radius: var(--app-radius);
    box-shadow: 0 8px 18px rgba(var(--app-primary-rgb), 0.22);
}

.mobile-upload-action-secondary .mobile-upload-icon {
    background: var(--app-accent);
    box-shadow: 0 8px 18px rgba(var(--app-accent-rgb), 0.18);
}

.mobile-upload-copy {
    display: grid;
    min-width: 0;
    gap: 0.1rem;
}

.mobile-upload-action:hover,
.mobile-upload-action:focus {
    color: var(--app-ink);
    border-color: var(--app-accent);
    box-shadow: 0 12px 24px rgba(var(--app-ink-rgb), 0.08);
    outline: none;
}

.mobile-upload-action:active,
.mobile-upload-action.is-pressing {
    transform: scale(0.98);
}

.mobile-upload-title {
    font-weight: 850;
}

.mobile-upload-subtitle {
    color: var(--app-muted);
    font-size: 0.85rem;
}

.image-upload-area.mobile-upload-mode .upload-placeholder-desktop {
    display: none !important;
}

.image-upload-area.mobile-upload-mode .mobile-upload-actions {
    display: grid;
}

.is-saving,
.changed-field {
    border-color: var(--app-accent) !important;
    box-shadow: 0 0 0 0.2rem rgba(var(--app-accent-rgb), 0.16) !important;
}

.chart-shell .position-relative {
    min-height: 240px;
}

.chart-shell canvas {
    max-width: 100%;
}

.acquisition-chart-frame {
    height: 430px;
}

.video-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
}

.trailer-card .video-container {
    max-width: 860px;
    margin: 0 auto;
}

.video-container iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: var(--app-radius);
}

.modal-content {
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    box-shadow: var(--app-shadow);
}

.modal-header,
.modal-footer {
    border-color: var(--app-border);
}

.btn-close,
button[aria-label] {
    touch-action: manipulation;
}

@media (max-width: 991.98px) {
    .app-nav-toggle {
        display: block;
    }

    .app-nav-collapse {
        display: none !important;
    }
}

@media (min-width: 992px) {
    .app-nav-collapse {
        display: flex !important;
    }
}

@media (max-width: 767.98px) {
    body {
        font-size: 14px;
    }

    .page-shell {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .page-header {
        align-items: stretch;
        flex-direction: column;
    }

    .page-actions {
        justify-content: flex-start;
    }

    .collection-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.7rem;
    }

    .filter-field,
    .filter-field-wide {
        grid-column: span 1;
    }

    .filter-field-search {
        grid-column: 1 / -1;
    }

    .collection-toolbar {
        padding: 0.9rem;
    }

    .collection-toolbar-head {
        align-items: stretch;
        flex-direction: column;
    }

    .collection-filter-toggle {
        width: 100%;
        justify-content: center;
    }

    .collection-toolbar-actions {
        width: 100%;
        justify-content: stretch;
        gap: 0.65rem;
    }

    .collection-sort-panel {
        width: 100%;
        align-items: stretch;
        flex-direction: column;
    }

    .collection-sort-field .form-select {
        width: 100%;
        min-width: 0;
    }

    .collection-sort-field {
        width: 100%;
    }

    .collection-direction-toggle {
        width: 100%;
    }

    .collection-direction-toggle .btn {
        flex: 1 1 0;
    }

    #clearFilters,
    .collection-view-toggle {
        flex: 1 1 auto;
    }

    .collection-view-toggle .btn {
        flex: 1 1 0;
    }

    .collection-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.75rem;
    }

    .game-card-title {
        font-size: 0.95rem;
    }

    .table-responsive {
        overflow-x: auto;
    }

    .acquisition-chart-frame {
        height: 320px;
    }

    .summary-card {
        padding: 0.95rem;
    }

    .app-toast-container {
        right: 0.75rem;
        bottom: 0.75rem;
    }
}
