/* 03-components.css
   Reusable UI components (no page scaffolding).
-------------------------------------------------------------- */

/* Alerts / messages */
.messages {
    font: italic 10px Verdana, sans-serif;
    margin: var(--space-6) 0 0; /* 12px */
}

.successMessages,
.specialMessages,
.errorMessages {
    margin: var(--space-5) 0 0 0; /* 10px */
    padding: var(--space-5) var(--space-8); /* 10px 16px */
    font: bold var(--text-sm)/18px Verdana, sans-serif;
}

.successMessages {
    background: var(--color-success-bg);
}

.specialMessages {
    background: var(--color-warning-bg);
}

.errorMessages {
    background: var(--color-error-bg);
}

.errorMessages ul,
.successMessages ul,
.specialMessages ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
}

.errorMessages ul li,
.successMessages ul li,
.specialMessages ul li {
    list-style-position: inside;
}

/* Inventory pill */
.inventory {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    background: var(--color-surface-tint);
    padding: 3px 8px;              /* restore original feel */
    border-radius: var(--radius-pill);
    border: var(--border-1) solid var(--color-border-strong);
}

.inventory.icon {
    display: inline-flex;
    align-items: center;
    line-height: 1;
    vertical-align: middle;
    padding-left: 28px;
    background-position: 7px center;
}

/* Avatars */
.avatar {
    flex: 0 0 80px;
    width: 80px;
    height: 80px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    border: var(--border-1) solid var(--color-border-strong);
}

.avatar.small {
    flex: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
}

/* Navigation */
.main-nav,
.sub-nav {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
    gap: var(--space-3); /* 6px if --space-3=6px; otherwise keep literal */
}

.main-nav::-webkit-scrollbar,
.sub-nav::-webkit-scrollbar {
    display: none;
}

.main-nav {
    background: var(--color-surface);
    border: var(--border-1) solid var(--color-border-nav);
    border-radius: var(--radius-xl); /* if you have it; else keep 12px */
    padding: 5px; /* small literal */
    box-shadow: none;
    margin-bottom: var(--space-6); /* 12px */
}

.main-nav.has-subnav {
    margin-bottom: 0;
    border-bottom: 0;
    border-radius: 12px 12px 0 0; /* keep literal unless you want corner tokens */
    box-shadow: none;
}

.sub-nav {
    margin-bottom: var(--space-6); /* 12px */
    border-top: 0;
    border: var(--border-1) solid var(--color-border-nav-soft);
    border-radius: 0 0 12px 12px;
    padding: 3px 5px;
    background: var(--color-primary-soft);
    box-shadow: none;
}

.nav-item,
.sub-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;

    padding: 6px 11px;
    border-radius: 9px;
    text-decoration: none;

    color: #1f2a37;
    font-weight: 500;
    border: 1px solid transparent;

    transition: background var(--dur-fast) ease;
}

.nav-item:hover,
.sub-item:hover {
    background: var(--color-surface-hover);
}

.nav-item.active,
.sub-item.active {
    color: var(--color-primary-ink);
    box-shadow: none;
}

.nav-item.active {
    background: var(--color-primary-soft);
    border-color: var(--color-primary-border);
}

.sub-item.active {
    background: var(--color-surface);
    border-color: var(--color-border-nav-active);
}

/* Inventory pill on inactive items */
.nav-item:not(.active) .inventory {
    opacity: 0.92;
}

/* Page header */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: nowrap;
    margin-bottom: 18px;
}

.page-header.has-subtitle {
    margin-bottom: 0;
}

.page-header-image-series {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
}

.page-header-image-avatar {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    border: 2px solid var(--color-border-strong);
    flex-shrink: 0;
}

.page-header-content {
    flex: 1 1 auto;
    min-width: 0;
}

.page-title {
    margin: 0;
    line-height: 1.1;
    font-size: 28px;
    font-weight: 600;
    color: var(--color-text);
}

.page-header-actions {
    flex: 0 0 auto;
    white-space: nowrap;
}

.page-header-actions a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 14px;
}

.page-subtitle {
    margin: 10px 0 18px 0;
    color: var(--color-text-muted);
    font-size: var(--text-base);
    line-height: 1.35;
    padding-bottom: 2px;
    display: flex;
    flex-direction: row;
    align-items: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.page-subtitle-item {
    white-space: nowrap;
    font-size: var(--text-base);
    color: var(--color-text-muted);
}

.page-subtitle-item + .page-subtitle-item::before {
    content: " • ";
    color: var(--color-text-separator);
    margin: 0 8px;
}

/* Confirmation dialog */
#confirm-container {
    background: var(--color-surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    width: var(--modal-width);
    max-width: var(--modal-max-width);
    font-family: var(--font-sans);
    z-index: var(--z-modal);
}

#confirm-container .confirm-header {
    padding: var(--space-10) var(--space-12); /* 20px 24px */
    border-bottom: var(--border-1) solid var(--color-border);
    background: var(--color-surface);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

#confirm-container .confirm-header .title {
    margin: 0;
    font-size: var(--text-title-sm);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text);
}

#confirm-container .confirm-body {
    padding: var(--space-12);
    background: var(--color-surface);
    overflow-y: auto;
    max-height: var(--modal-body-max-height);
}

#confirm-container .confirm-body .message {
    margin: 0;
    font-size: var(--text-md);
    line-height: var(--line-relaxed);
    color: var(--color-text-secondary);
}

#confirm-container .confirm-footer {
    padding: var(--space-8) var(--space-12); /* 16px 24px */
    background: var(--color-row-hover);
    border-top: var(--border-1) solid var(--color-border);
    display: flex;
    gap: var(--space-6); /* 12px */
    justify-content: flex-end;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
}

#confirm-container .confirm-footer button {
    padding: var(--space-4) var(--space-8); /* 8px 16px */
    font-size: var(--text-md);
    font-weight: var(--font-weight-medium);
    border-radius: 6px; /* candidate token later if you standardize button radii */
    cursor: pointer;
    transition: background-color var(--dur) var(--ease),
    border-color var(--dur) var(--ease),
    color var(--dur) var(--ease);
    border: var(--border-1) solid var(--color-border-subtle);
    background: var(--color-surface);
    color: var(--color-text-muted);
    min-width: 80px;
    position: relative;
    z-index: 1;
}

/* Cancel */
#confirm-container .btn-confirm-cancel {
    background: var(--color-surface);
    color: var(--color-text-muted);
    border-color: var(--color-border-subtle);
}

#confirm-container .btn-confirm-cancel:hover,
#confirm-container .btn-confirm-cancel:focus {
    background: var(--color-surface-2);
    border-color: var(--color-icon-muted);
    outline: none;
}

/* Delete */
#confirm-container .btn-confirm-delete {
    background: var(--color-danger);
    color: var(--color-text-inverse);
    border-color: var(--color-danger);
}

#confirm-container .btn-confirm-delete:hover,
#confirm-container .btn-confirm-delete:focus {
    background: var(--color-danger-hover);
    border-color: var(--color-danger-hover);
    color: var(--color-text-inverse);
    outline: none;
}

/* Overlay */
#confirm-overlay {
    background: var(--color-overlay);
    z-index: var(--z-modal-overlay);
}

/* Close button */
.modal-close {
    position: absolute;
    top: var(--space-6); /* 12px */
    right: var(--space-8); /* 16px */
    color: var(--color-icon-muted);
    font-size: 24px; /* candidate token later */
    text-decoration: none;
    font-weight: 300;
    line-height: 1;
    z-index: var(--z-modal-close);
}

.modal-close:hover {
    color: var(--color-text-muted);
}

/* SimpleModal overrides */
#confirm-container.simplemodal-container {
    height: auto !important;
}

#confirm-container > .simplemodal-wrap {
    height: auto !important;
    overflow: visible !important;
}

#confirm-container .confirm-modal {
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - var(--modal-max-height-offset));
}

/* Toggle switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: var(--toggle-width);
    height: var(--toggle-height);
    cursor: pointer;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    inset: 0;
    background-color: var(--color-toggle-bg);
    border-radius: var(--toggle-height);
    transition: background-color var(--dur-slow) var(--ease);
}

.toggle-slider::before {
    content: "";
    position: absolute;
    height: var(--toggle-knob-size);
    width: var(--toggle-knob-size);
    left: var(--toggle-padding);
    bottom: var(--toggle-padding);
    background-color: var(--color-surface);
    border-radius: 50%;
    transition: transform var(--dur-slow) var(--ease);
}

.toggle-switch input:checked + .toggle-slider {
    background-color: var(--color-toggle-bg-active);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(
            calc(
                    var(--toggle-width)
                    - var(--toggle-knob-size)
                    - (var(--toggle-padding) * 2)
            )
    );
}

/* Toast */
.toast {
    position: fixed;
    bottom: var(--toast-offset);
    right: var(--toast-offset);

    padding: var(--toast-padding-y) var(--toast-padding-x);
    border-radius: var(--toast-radius);

    color: var(--color-text-inverse);
    font-size: var(--text-md);

    opacity: 0;
    transform: translateY(var(--toast-translate));

    transition: opacity var(--dur-slow) var(--ease),
    transform var(--dur-slow) var(--ease);

    z-index: var(--z-modal);
    box-shadow: var(--shadow-md);
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-success {
    background: var(--color-toast-success);
}

.toast-error {
    background: var(--color-toast-error);
}

/* Buttons */
.btn {
    padding: var(--space-4) var(--space-8);
    border: var(--border-1) solid var(--color-border-subtle);
    background-color: var(--color-surface);
    border-radius: var(--radius-sm);
    font-size: var(--text-base);
    cursor: pointer;
    color: var(--color-text-muted);
    text-decoration: none;
    display: inline-block;
    margin-right: var(--space-3);
    transition: all var(--dur) var(--ease);
}

.btn.icon {
    padding-left: 32px; /* room for icon */
    background-position: 8px center; /* align icon nicely */
}

.btn__icon {
    width: 14px;
    height: 14px;
    margin-right: 6px;
    flex-shrink: 0;
}

.btn.icon.refresh {
    color: var(--color-text-muted);
}

.btn:hover {
    background-color: var(--color-surface-2);
    border-color: var(--color-icon-muted);
}

.btn.primary {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-text-inverse);
}

.btn.primary:hover {
    background-color: var(--color-primary-hover);
    border-color: var(--color-primary-hover);
}

.btn.secondary {
    background-color: var(--color-surface-2);
    border-color: #d0d0d0; /* candidate token later */
    color: var(--color-primary);
}

.btn.secondary:hover {
    background-color: var(--color-primary-soft);
    border-color: var(--color-primary-border);
    color: var(--color-primary-ink);
}

.btn.save {
    background: #4e79a7; /* keep literal for now */
    color: var(--color-text-inverse);
    border: var(--border-1) solid #4e79a7;
    width: 120px;
}

.btn.save:hover {
    background: #3f648c;
    border-color: #3a6a97;
}

.btn.save-and-view {
    background: #2e7d32; /* keep literal for now */
    color: var(--color-text-inverse);
    border: var(--border-1) solid #2e7d32;
    width: 120px;
}

.btn.save-and-view:hover {
    background: #256628;
    border-color: #256830;
}

.btn.cancel {
    background: var(--color-surface);
    color: var(--color-text-muted);
    border: var(--border-1) solid var(--color-border-strong);
    width: 120px;
}

.btn.cancel:hover {
    background: var(--color-surface-2);
    border-color: #aaa;
}

.btn.delete-confirm {
    color: var(--color-text-muted);
    border-color: var(--color-border);
    margin-left: var(--space-12); /* 24px */
}

.btn.delete-confirm:hover {
    background: #ffebee; /* candidate token later */
    border-color: var(--color-danger);
    color: var(--color-danger);
}

a.btn,
a.btn:link,
a.btn:visited,
a.btn:hover,
a.btn:active {
    text-decoration: none;
}

a.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Badges */
.visibility-badge {
    font-family: var(--font-sans);
    font-size: 10px;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    font-weight: var(--font-weight-bold);
    text-transform: uppercase;
    line-height: 1;

    flex: 0 0 auto;
    white-space: nowrap;
}

.visibility-badge.private {
    background: #fff3e0;
    color: #e65100;
}

.visibility-badge.public {
    background: #dcf5c2;
    color: #265e15;
}

.category-badge {
    font-size: var(--text-sm);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    background: #f0f0f0;
    color: var(--color-text-muted);
    font-weight: var(--font-weight-medium);
}

/* Icons */
.flag {
    display: inline-block;
    vertical-align: middle;
    width: 16px;
    height: 11px;
    object-fit: contain;
}

/* Base icon class (background sprite-style) */
.icon {
    background-repeat: no-repeat;
    background-position: left center;
    background-size: 16px 16px;
    display: inline-block;
    min-height: 16px;
    padding-left: 20px;
}

/* Icon mappings */
.activated {
    background-image: url(../img/own-activated.png);
}

.unactivated {
    background-image: url(../img/own-unactivated.png);
}

.non-trackable {
    background-image: url(../img/own-non-trackable.png);
}

.add {
    background-image: url(../img/add.jpg);
}

.delete {
    background-image: url(../img/delete.png);
}

.edit {
    background-image: url(../img/edit.png);
}

.view {
    background-image: url(../img/view.png);
}

.refresh {
    background-image: url(../img/reload.png);
}

.link {
    background-image: url(../img/link.png);
}

.switch {
    background-image: url(../img/switch.png);
}

.email {
    background-image: url(../img/mail.png);
}

.email-send {
    background-image: url(../img/mail-send.png);
}

.invite {
    background-image: url(../img/ticket-plus.png);
}

.collection {
    background-image: url(../img/collection.png);
}

.collection-add {
    background-image: url(../img/collection-add.png);
}

.list {
    background-image: url(../img/list.png);
}

.list-add {
    background-image: url(../img/list-add.png);
}

.list-remove {
    background-image: url(../img/list-remove.png);
}

.tradelist {
    background-image: url(../img/trade.png);
}

.marketplace {
    background-image: url(../img/store.png);
}

.audit-log {
    background-image: url(../img/audit-log.png);
}

.mass-update {
    background-image: url(../img/mass-update.png);
}

.permissions {
    background-image: url(../img/shield.png);
}

.password {
    background-image: url(../img/key.png);
}

.pdf {
    background-image: url(../img/pdf.png);
}

.picture {
    background-image: url(../img/picture.png);
}

.valuation {
    background-image: url(../img/chart.png);
}

.users {
    background-image: url(../img/users.png);
}

.user {
    background-image: url(../img/user.png);
}

.user-signal {
    background-image: url(../img/user-signal.png);
}

.user-admin {
    background-image: url(../img/user-admin.png);
}

.user-editor {
    background-image: url(../img/user-editor.png);
}

.user-inactive {
    background-image: url(../img/user-inactive.png);
}

.user-unknown {
    background-image: url(../img/user-unknown.png);
}

.moderator {
    background-image: url(../img/gavel.png);
}

.moderator-ex {
    background-image: url(../img/gavel-gray.png);
}

.reviewer {
    background-image: url(../img/publish.png);
}

.reviewer-ex {
    background-image: url(../img/publish-gray.png);
}

.pending {
    background-image: url(../img/pending.png);
}

.pending-add {
    background-image: url(../img/pending-add.png);
}

.released {
    background-image: url(../img/released.png);
}

.removed {
    background-image: url(../img/removed.png);
}

.geocaching {
    background-image: url(../img/geocaching.png);
}

.lackey {
    background-image: url(../img/geocaching.png);
}

.lackey-ex {
    background-image: url(../img/geocaching-gray.png);
}

.translator {
    background-image: url(../img/globe.png);
}

.translator-ex {
    background-image: url(../img/globe-gray.png);
}

.whats-new {
    background-image: url(../img/fire.png);
}

.wishlist {
    background-image: url(../img/wishlist.png);
}

.wishlist-empty {
    background-image: url(../img/wishlist-empty.png);
}

.wishlist-add {
    background-image: url(../img/wishlist-add.png);
}

/* Tables
-------------------------------------------------------------- */

.data-table {
    border-collapse: collapse;
    table-layout: fixed;
    width: 100%;
}

.data-table thead {
    background: var(--color-primary);
    color: var(--color-text-inverse);
}

.data-table th {
    padding: var(--space-6) var(--space-8); /* 12px 16px */
    text-align: left;
    font-weight: var(--font-weight-semibold);
    font-size: var(--text-base);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table td {
    padding: var(--space-8); /* 16px */
    vertical-align: middle;
    border-bottom: var(--border-1) solid var(--color-divider-light);
}

.data-table tbody tr:hover {
    background: var(--color-row-hover);
}

.actions-cell {
    white-space: nowrap;
    text-align: right;
    vertical-align: middle;
}

/* Legacy table variants */
TABLE.dataList {
    border: var(--border-1) solid var(--color-datalist-border);
    border-spacing: 1px;
    background-color: var(--color-surface);
    width: auto;
}

TABLE.dataList TD {
    background-color: var(--color-datalist-cell-bg);
    vertical-align: top;
    padding: 1px;
}

TABLE.dataList thead th {
    text-align: left;
    background: none;
    background-color: var(--color-datalist-cell-bg);
    font: bold 14px/30px Verdana, Arial, sans-serif;
    padding: 1px;
}

TABLE.dataList TR.summary TH,
TABLE.dataList TR.summary A {
    background-color: var(--color-datalist-summary-bg);
    color: var(--color-text-inverse);
}

TABLE.dataList TR.tab TD {
    border-left: 0 solid var(--color-surface);
    background: var(--color-surface);
}

TABLE.dataList TR.tab TD.activeTab {
    background: var(--color-datalist-summary-bg);
    font-weight: bold;
    font-size: var(--text-sm);
    color: var(--color-text-inverse);
    text-align: center;
}

TABLE.dataList TH {
    font-size: var(--text-sm);
    font-weight: bold;
    text-align: center;
}

TABLE.dataList TD,
TABLE.dataList TH {
    padding: 2px;
    white-space: nowrap;
    vertical-align: middle;
}

TABLE.coinList {
    background-color: var(--color-surface);
    width: 100%;
}

TABLE.coinList TD {
    padding: 2px;
    white-space: nowrap;
    vertical-align: top;
}

/* Specs / content tables (legacy forms)
-------------------------------------------------------------- */

table.specs tr.spacer {
    height: 18px;
}

table.specs td {
    vertical-align: top;
    padding-bottom: 6px;
}

table.specs table td {
    padding: 0 24px 3px 0;
}

table.specs input[type="text"] {
    width: var(--control-width-sm);
}

table.specs select {
    width: calc(var(--control-width-sm) + 4px); /* preserves 204px */
}

table.specs .autowidth {
    width: auto;
}

TABLE.specs select.currencySelect {
    max-width: var(--control-width-sm);
    min-width: calc(var(--control-width-sm) + 5px); /* preserves 205px */
}

/* Login page */
table.content td {
    padding-bottom: 6px;
}

/* Forms (legacy columnForm)
-------------------------------------------------------------- */

fieldset {
    border: none;
}

form.columnForm .form-stack {
    margin: 0 0 var(--space-4) 0; /* 8px */
}

form.columnForm .form-row {
    margin: 0 0 var(--space-5) 0; /* 10px */
}

form.columnForm .form-row label {
    display: block;
    font-weight: bold;
    padding: 2px 0;
    margin: 0 0 4px 0;
}

form.columnForm input[type="text"],
form.columnForm input[type="password"],
form.columnForm select,
form.columnForm textarea {
    box-sizing: border-box;
    width: var(--control-width-md);
}

form.columnForm .form-row-wide textarea {
    width: 100%;
    max-width: 940px; /* keep literal until wrapper/content system is standardized */
}

form.columnForm .help-text {
    margin: 4px 0 0 0;
    font-size: var(--text-sm);
    color: var(--color-text-subtle);
    line-height: var(--line-normal);
}

form.columnForm .autoWidth,
form.columnForm .customButton {
    width: auto;
}

form.columnForm input[type="checkbox"],
form.columnForm input[type="radio"] {
    width: auto !important;
}

form.columnForm fieldset {
    margin: 0 0 var(--space-4) 0; /* 8px */
    border: none;
}

input,
select,
fieldset img,
input.radio {
    vertical-align: middle;
}

form.columnForm label {
    display: block;
    font-weight: bold;
    padding: 2px 0;
}

form.columnForm label.checkbox-label {
    display: inline-block;
    font-weight: normal;
    padding: 0;
}

form.columnForm label.radio-label {
    display: inline-block;
    align-items: center;
    gap: 5px;
    font-weight: normal;
}

form.columnForm .error {
    color: var(--color-form-error);
}

form.columnForm fieldset.date input,
form.columnForm fieldset.date select,
fieldset.date input,
fieldset.date select {
    width: auto;
}

/* Additional legacy helpers */
label.column {
    float: left;
    width: 72px;
    font-weight: bold;
}

label.to,
label.from {
    width: auto;
    margin-right: 15px;
    font-weight: bold;
}

.labelNextToInputFieldset label {
    display: block;
    float: left;
    width: 68px;
}

.checkbox1,
.checkbox2 {
    clear: both;
    margin: 0 2px 0 0;
}

.checkbox2 {
    margin-left: 26px;
}

label.to {
    margin-right: 10px;
}

.submit {
    margin-left: 20px;
}

input.inlineinputtext {
    text-align: left;
    width: 90%;
}

input.inlineinputprice {
    text-align: right;
    width: 90%;
}

fieldset#registration p {
    padding: 0;
    margin: 0;
}

fieldset#registration div {
    margin: 10px 0 10px 0;
}

.checkbox {
    display: inline;
}

.textareaWide {
    width: 570px;
    height: 82px;
}

fieldset.multichoice h2 {
    clear: both;
    font: bold 11px Verdana, Arial, sans-serif;
    margin: 2px 0;
}

fieldset.multichoice div {
    float: left;
    width: 240px;
    margin-right: 2px;
}

form.columnForm fieldset.multichoice label {
    float: none;
    display: inline;
}

/* Empty results
-------------------------------------------------------------- */

.noResults {
    color: var(--color-text-muted);
    max-width: 720px;
    margin: var(--space-12) auto 0; /* 24px */
    text-align: center;
    padding: var(--space-12) var(--space-8); /* 24px 16px */
}

.noResults p {
    margin: 0;
    line-height: 1.5;
    font-size: var(--text-lg);
}

.noResults .noResults-lead {
    font-size: var(--text-xl);
    margin-bottom: var(--space-5); /* 10px */
    line-height: var(--line-normal);
}

.noResults .noResults-lead strong {
    font-weight: var(--font-weight-bold);
}

.noResults .noResults-sub {
    color: var(--color-text-muted);
    font-size: var(--text-lg);
    margin-bottom: var(--space-9); /* 18px */
}

.noResults-actions {
    margin-top: var(--space-7); /* 14px */
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-5); /* 10px */
    flex-wrap: wrap;
}

.noResults-or {
    color: var(--color-text-faint);
    font-size: var(--text-sm);
    padding: 0 6px;
}

.noResults .btn {
    padding: 10px 14px;
    font-size: var(--text-md);
    margin-right: 0;
    min-width: 210px;
    text-align: center;
}

/* Marketplace/edition typography helpers
-------------------------------------------------------------- */

.tradeName,
.editionName {
    font-size: 1rem;
    font-weight: normal;
    font-family: var(--font-display);
}

.editionDescription,
.description-text {
    font-size: var(--text-md);
    line-height: var(--line-relaxed);
    color: var(--color-text);
}

.accordionPrefix,
.editionInformation,
.tradeInventoryLabel,
.marketplaceSeller {
    font-weight: normal;
    font-family: var(--font-display);
    font-size: .75rem;
    line-height: 1.25rem;
    color: var(--color-text-subtle);
}

.editionInformation,
.tradeInventoryLabel {
    display: block;
    min-height: 0.3rem;
}

.tradeInventoryLabel {
    min-width: 50px;
}

.tradeInventoryRow {
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.subSeriesName {
    font-size: var(--text-lg);
    font-weight: bold;
    margin: 0;
    padding: 0;
}

.marketplacePrice {
    margin-top: 2px;
    float: left;
    display: block;
    font-size: 1.25rem;
    font-weight: bold;
    min-width: 90px;
    text-align: left;
    padding-right: 5px;
}

/* Copy tooltip
-------------------------------------------------------------- */
.copy-tooltip {
    position: absolute;
    padding: 4px 8px;
    background: var(--color-tooltip-bg);
    color: var(--color-text-inverse);
    font-size: var(--text-sm);
    border-radius: var(--radius-sm);
    white-space: nowrap;
    pointer-events: none;
    z-index: var(--z-tooltip);

    opacity: 0;
    transform: translateY(-4px);
    transition: opacity var(--dur-fast) var(--ease),
    transform var(--dur-fast) var(--ease);
}

.copy-tooltip.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Sectioned list card
-------------------------------------------------------------- */

.list-card {
    border: var(--border-1) solid var(--color-list-border);
    border-radius: 6px;
    background: var(--color-surface);
    margin-bottom: var(--space-10);
    overflow: hidden;
}

.list-card__header {
    background: var(--color-list-header-bg);
    border-bottom: var(--border-1) solid var(--color-list-border);
    padding: 7px 14px;
    font-size: var(--text-sm);
    letter-spacing: var(--letterspace-wide, 0.07em);
    color: var(--color-list-header-text);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.list-card__header-link {
    display: flex;
    align-items: center;
    font-weight: var(--font-weight-medium);
    gap: var(--space-5);
    text-decoration: none;
    color: inherit;
    min-width: 0;
}

.list-card__header-link:hover {
    text-decoration: none;
}

.list-card__header-date {
    font-weight: var(--font-weight-bold);
}

.list-card__count {
    font-weight: var(--font-weight-normal);
    text-transform: none;
    letter-spacing: 0;
    color: var(--color-text-faint);
    font-size: var(--text-xxs, 11px);
}

.list-card__row {
    display: flex;
    align-items: center;
    gap: var(--space-5);
    padding: var(--space-4) 14px; /* keep 14px unless you want a token for it */
    text-decoration: none;
    color: inherit;
    transition: background var(--dur-fast) var(--ease);
}

.list-card__row:last-child {
    border-bottom: none;
}

.list-card__row:hover {
    background: var(--color-list-row-hover);
}

.list-card__label {
    flex: 1;
    font-size: var(--text-base);
    color: var(--color-list-link);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* =========================
   Cards: shared primitives
   ========================= */

.cards-grid {
    display: grid;
    gap: var(--space-8);
    margin: var(--space-10) auto;
}

/* sensible default: responsive columns */
.cards-grid--auto {
    grid-template-columns: repeat(auto-fill, minmax(345px, 1fr));
}

/* center the grid and prevent “stretched” feeling */
.cards-grid--max {
    max-width: var(--wrapper-max);
    padding: 0 var(--space-10);
}

/* Card shell */
.card {
    border: var(--border-1) solid var(--color-border-nav-active);
    border-radius: var(--radius-md);
    background: var(--color-surface);
    padding: var(--space-8);
    position: relative;
}

.card:hover {
    box-shadow: var(--shadow-sm);
}

/* Optional muted card skin (matches your old users gray) */
.card--muted {
    background: var(--color-surface-hover);
}

.card-actions .btn {
    margin-right: 0;
}

/* Edition grid layout
   ========================= */
.editions-grid {
    padding: 8px 14px 10px;
    display: grid;
    grid-template-columns: repeat(auto-fill, 250px);
    gap: 18px;
}

.edition-card {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 10px;
    background: white;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
}

.edition-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-color: #ccc;
}

.edition-card.normal {
    opacity: 1;
}

.edition-card.missing {
    opacity: 0.5;
}

.edition-image {
    position: relative;
    width: 100%;
    margin-bottom: 10px;
}

.edition-image img {
    display: block;
    width: 100%;
    height: auto;
    max-height: none;
}

.edition-info {
    flex: 1;
}

.edition-name {
    font-size: 13px;
    color: #666;
    font-weight: var(--font-weight-semibold);
    margin-bottom: 8px;
    line-height: 1.4;
}

.edition-byline {
    font-size: 10.5px;
    color: #aaa;
    font-style: italic;
    margin-top: 2px;
}

.edition-actions {
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid #f0f0f0;
}

.edition-pill {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 9px;
    font-weight: var(--font-weight-bold);
    letter-spacing: .04em;
    border-radius: 3px;
    padding: 2px 5px;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.series-block {
    border-bottom: var(--border-1) solid var(--color-list-row-divider);
}

.series-block:last-child {
    border-bottom: none;
}

.pill-new {
    background: #e6f4ea;
    color: #1e7e34;
    border: 1px solid #b6ddbf;
}

.pill-updated {
    background: #f0f2f5;
    color: #888;
    border: 1px solid #d5d9e0;
}

.pill-new {
    background: #e8f5e9;
    color: #2e7d32;
}

.pill-updated {
    background: #fff8e1;
    color: #e65100;
}

/* Trackable match card (tracking code match) */

.trackable-match__body {
    display: flex;
    align-items: stretch;
}

.trackable-match__codes {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    padding: 12px 12px;
    border-right: 1px solid #f0f2f5;
    flex: 0 0 100px;
    min-width: 0;
    align-items: flex-start;
}

.trackable-match__code {
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 14px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.trackable-match__code--public {
    font-weight: 700;
    color: #2c3345;
}

.trackable-match__code--private {
    font-weight: 500;
    letter-spacing: 0.04em;
    color: #c0c6d4;
}

.trackable-match__code a {
    color: inherit;
    text-decoration: none;
}

.trackable-match__code a:hover {
    text-decoration: underline;
}

.trackable-match__main {
    flex: 1;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    min-width: 0;
}

.trackable-match__info {
    flex: 1;
    min-width: 0;
}

.trackable-match__badges {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    flex-wrap: wrap;
}

.trackable-match__name {
    font-size: var(--text-base);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text);
    margin-bottom: 3px;
    line-height: 1.35;
}

.trackable-match__edition {
    font-size: var(--text-md);
    font-weight: var(--font-weight-normal);
    color: var(--color-text-muted);
    margin-bottom: 2px;
    line-height: 1.35;
}

.trackable-match__meta {
    font-size: var(--text-sm);
    color: var(--color-text-faint);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 5px;
    flex-wrap: wrap;
}

.trackable-match__actions {
    display: flex;
    align-items: center;
    align-self: center;
    gap: 6px;
    flex-shrink: 0;
}

/* Important: prevent .btn margin-right from fighting flex gap */
.trackable-match__actions .btn {
    margin-right: 0;
}

.trackable-match__meta-item + .trackable-match__meta-item::before {
    content: " • ";
    color: var(--color-text-separator);
    margin: 0 6px;
}

.trackable-match .series-title__name {
    font-weight: var(--font-weight-medium);
}

/* Series Title Component
-------------------------------------------------------------- */

.series-title {
    display: inline-flex;
    align-items: center;
    letter-spacing: 0;
}

.series-title__icon {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: contain;
    margin-right: 8px;
}

.series-title__id {
    color: var(--color-text-muted);
    font-weight: var(--font-weight-medium);
}

.series-title__sep {
    margin: 0 6px;
    color: var(--color-text-muted);
}

.series-title__name {
    color: var(--color-list-link);
    font-weight: var(--font-weight-normal);
    text-decoration: none;
}

.series-title__name:hover {
    text-decoration: underline;
}

/* Pagination
-------------------------------------------------------------- */

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-6);
    margin: var(--space-10) 0;
    font-size: var(--text-sm);
}

.pagination__pages {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

/* All clickable items */
.pagination a {
    min-width: 36px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 var(--space-4);
    border-radius: var(--radius-sm);
    border: var(--border-1) solid transparent;
    text-decoration: none;
    cursor: pointer;
}

.pagination a:hover {
    background: var(--color-surface-hover);
    text-decoration: none; /* override global link rule */
}

/* Current page */
.pagination .current {
    min-width: 36px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 var(--space-4);
    border-radius: var(--radius-sm);
    border: var(--border-1) solid var(--color-border-nav-active);
    background: var(--color-primary-soft);
    color: var(--color-primary-ink);
    font-weight: var(--font-weight-semibold);
    cursor: default;
}

/* Ellipsis */
.pagination__ellipsis {
    min-width: 22px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-faint);
    user-select: none;
}

.pagination .is-disabled {
    opacity: 0.55;
    pointer-events: none;
    cursor: default;
}