.packs-page {
    padding-bottom: 2rem;
    color: #1f2933;
}

.packs-hero {
    margin-top: 2rem;
    padding: 1.5rem;
    border: 1px solid rgba(23, 162, 184, 0.24);
    border-radius: 8px;
    background: #ffffff;
}

.packs-kicker {
    color: #0f7c8c;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.packs-hero h1 {
    margin: 0.25rem 0 0.5rem;
    color: #17212b;
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 800;
    letter-spacing: 0;
}

.packs-hero p {
    max-width: 760px;
    margin: 0;
    color: #344452;
    font-size: 1.05rem;
    line-height: 1.6;
}

.packs-summary {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.75rem;
    margin: 1rem 0;
}

.packs-summary-item {
    padding: 0.9rem 1rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    background: #ffffff;
}

.packs-summary-item span {
    display: block;
    color: #17212b;
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.15;
}

.packs-summary-item strong {
    display: block;
    color: #667784;
    font-size: 0.86rem;
}

.packs-table-panel {
    padding: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    background: #ffffff;
}

.packs-table-toolbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.packs-table-toolbar h2 {
    color: #17212b;
    font-weight: 800;
}

.packs-muted {
    color: #667784;
}

.packs-format-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    justify-content: flex-end;
}

.packs-format-filter button {
    min-height: 36px;
    padding: 0.35rem 0.7rem;
    border: 1px solid rgba(23, 162, 184, 0.28);
    border-radius: 8px;
    background: #ffffff;
    color: #0f7c8c;
    font-weight: 800;
    line-height: 1.2;
}

.packs-format-filter button:hover,
.packs-format-filter button:focus,
.packs-format-filter button.is-active {
    border-color: rgba(23, 162, 184, 0.78);
    background: rgba(23, 162, 184, 0.1);
    color: #084f5a;
    outline: 0;
}

.packs-table {
    margin-bottom: 0 !important;
    border-collapse: separate !important;
    border-spacing: 0;
}

.packs-table thead th {
    border-top: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.12);
    color: #42515f;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.packs-table tbody td {
    vertical-align: middle;
    border-top-color: rgba(0, 0, 0, 0.07);
}

.packs-image-cell {
    text-align: center;
}

.packs-count-cell {
    font-variant-numeric: tabular-nums;
}

.set-image {
    display: block;
    width: 52px;
    height: 52px;
    margin: 0 auto;
    border-radius: 6px;
    object-fit: contain;
    background: #eef5f7;
}

.packs-set-link {
    color: #17212b;
    font-weight: 800;
}

.packs-set-link:hover,
.packs-set-link:focus {
    color: #0b6f7e;
}

.packs-format-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1;
}

.packs-format-badge.is-tcg {
    background: rgba(23, 162, 184, 0.16);
    color: #0b6270;
}

.packs-format-badge.is-ocg {
    background: rgba(255, 193, 7, 0.22);
    color: #765800;
}

.packs-format-badge.is-md {
    background: rgba(40, 167, 69, 0.16);
    color: #1f6b34;
}

.packs-format-badge.is-dl {
    background: rgba(108, 117, 125, 0.16);
    color: #495057;
}

.packs-table-panel .dataTables_wrapper .row:first-child {
    align-items: center;
    margin-bottom: 0.75rem;
}

.packs-table-panel .dataTables_length label,
.packs-table-panel .dataTables_filter label {
    color: #667784;
    font-weight: 700;
}

.packs-table-panel .dataTables_filter input,
.packs-table-panel .dataTables_length select {
    border-radius: 8px;
}

.packs-table-panel .dataTables_filter input {
    min-width: 240px;
    margin-left: 0;
}

.packs-table-panel .dataTables_info {
    color: #667784;
}

.packs-table-panel .page-link {
    color: #0b6f7e;
}

.packs-table-panel .page-item.active .page-link {
    border-color: #17a2b8;
    background-color: #17a2b8;
}

[data-bs-theme="dark"] .packs-page {
    color: #e5e7eb;
}

[data-bs-theme="dark"] .packs-hero,
[data-bs-theme="dark"] .packs-summary-item,
[data-bs-theme="dark"] .packs-table-panel {
    border-color: rgba(255, 255, 255, 0.14);
    background: #202428;
}

[data-bs-theme="dark"] .packs-hero h1,
[data-bs-theme="dark"] .packs-table-toolbar h2,
[data-bs-theme="dark"] .packs-summary-item span,
[data-bs-theme="dark"] .packs-set-link {
    color: #e5e7eb;
}

[data-bs-theme="dark"] .packs-hero p,
[data-bs-theme="dark"] .packs-muted,
[data-bs-theme="dark"] .packs-summary-item strong,
[data-bs-theme="dark"] .packs-table-panel .dataTables_length label,
[data-bs-theme="dark"] .packs-table-panel .dataTables_filter label,
[data-bs-theme="dark"] .packs-table-panel .dataTables_info {
    color: #b8c2cc;
}

[data-bs-theme="dark"] .packs-format-filter button {
    border-color: rgba(255, 255, 255, 0.14);
    background: #202428;
    color: #67d2e3;
}

[data-bs-theme="dark"] .packs-format-filter button:hover,
[data-bs-theme="dark"] .packs-format-filter button:focus,
[data-bs-theme="dark"] .packs-format-filter button.is-active {
    border-color: rgba(23, 162, 184, 0.85);
    background: #252d32;
    color: #ffc107;
}

[data-bs-theme="dark"] .packs-table thead th,
[data-bs-theme="dark"] .packs-table tbody td {
    border-color: rgba(255, 255, 255, 0.12);
}

[data-bs-theme="dark"] .packs-table tbody tr {
    background: #202428;
}

[data-bs-theme="dark"] .packs-table tbody td,
[data-bs-theme="dark"] .packs-table tbody td .packs-muted,
[data-bs-theme="dark"] .packs-table tbody td .dtr-data {
    color: #e5e7eb;
}

[data-bs-theme="dark"] .packs-table thead th {
    color: #d8dee4;
}

[data-bs-theme="dark"] .packs-table-panel .dataTables_filter input,
[data-bs-theme="dark"] .packs-table-panel .dataTables_length select {
    border-color: rgba(255, 255, 255, 0.18);
    background: #252d32;
    color: #e5e7eb;
}

[data-bs-theme="dark"] .set-image {
    background: #151a1f;
}

[data-bs-theme="dark"] .packs-format-badge.is-tcg {
    background: rgba(103, 210, 227, 0.18);
    color: #8be4f0;
}

[data-bs-theme="dark"] .packs-format-badge.is-ocg {
    background: rgba(255, 193, 7, 0.18);
    color: #ffd65a;
}

[data-bs-theme="dark"] .packs-format-badge.is-md {
    background: rgba(40, 167, 69, 0.22);
    color: #89df9d;
}

[data-bs-theme="dark"] .packs-format-badge.is-dl {
    background: rgba(184, 194, 204, 0.18);
    color: #d8dee4;
}

@media (max-width: 991.98px) {
    .packs-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .packs-table-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .packs-format-filter {
        justify-content: flex-start;
    }
}

@media (max-width: 575.98px) {
    .packs-hero {
        padding: 1.2rem;
    }

    .packs-table-panel {
        padding: 0.75rem;
    }

    .packs-format-filter button {
        flex: 1 1 calc(50% - 0.45rem);
    }

    .packs-table-panel .dataTables_filter input {
        min-width: 0;
        width: 100%;
    }
}
