:root {
    --bs-spacer: 0.75rem;
    --bs-primary-rgb: 255, 193, 7;
    --bs-primary: #ffc107;
    --brand-yellow: #ffc107;
    --brand-yellow-dark: #e0a800;
    --brand-yellow-light: #ffca2c;
    --brand-yellow-rgb: 255, 193, 7;
}

/* Override Bootstrap CDN primary colors with higher specificity */
:root {
    --bs-primary-rgb: 255, 193, 7 !important;
    --bs-primary: #ffc107 !important;
}

.btn-primary,
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:focus-visible {
    background-color: var(--brand-yellow) !important;
    border-color: var(--brand-yellow) !important;
    color: #1f1300 !important;
}

.btn-secondary,
.btn-secondary:hover,
.btn-secondary:focus,
.btn-secondary:focus-visible {
    background-color: var(--brand-yellow) !important;
    border-color: var(--brand-yellow) !important;
    color: #1f1300 !important;
}

.btn-primary:active,
.btn-primary.active,
.show > .btn-primary.dropdown-toggle {
    background-color: var(--brand-yellow-light) !important;
    border-color: var(--brand-yellow-light) !important;
    color: #1f1300 !important;
}

.btn-secondary:active,
.btn-secondary.active,
.show > .btn-secondary.dropdown-toggle {
    background-color: var(--brand-yellow-light) !important;
    border-color: var(--brand-yellow-light) !important;
    color: #1f1300 !important;
}

.btn-primary:disabled,
.btn-primary.disabled {
    background-color: var(--brand-yellow) !important;
    border-color: var(--brand-yellow) !important;
    color: #1f1300 !important;
    opacity: 0.65 !important;
}

.btn-outline-primary,
.btn-outline-primary:visited {
    color: var(--brand-yellow) !important;
    border-color: var(--brand-yellow) !important;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:focus-visible {
    color: #1f1300 !important;
    background-color: var(--brand-yellow) !important;
    border-color: var(--brand-yellow) !important;
}

.btn-outline-primary:active,
.btn-outline-primary.active {
    color: #1f1300 !important;
    background-color: var(--brand-yellow-light) !important;
    border-color: var(--brand-yellow-light) !important;
}

.btn-outline-secondary,
.btn-outline-secondary:visited {
    color: var(--brand-yellow) !important;
    border-color: var(--brand-yellow) !important;
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus,
.btn-outline-secondary:focus-visible {
    color: #1f1300 !important;
    background-color: var(--brand-yellow) !important;
    border-color: var(--brand-yellow) !important;
}

.btn-outline-secondary:active,
.btn-outline-secondary.active {
    color: #1f1300 !important;
    background-color: var(--brand-yellow-light) !important;
    border-color: var(--brand-yellow-light) !important;
}

.btn-link,
.btn-link:visited {
    color: var(--brand-yellow) !important;
}

.btn-link:hover,
.btn-link:focus,
.btn-link:focus-visible {
    color: var(--brand-yellow) !important;
    text-decoration: underline;
}

.btn-link:active {
    color: var(--brand-yellow-light) !important;
}

.btn-brand,
.btn-brand:hover,
.btn-brand:focus,
.btn-brand:focus-visible {
    background-color: var(--brand-yellow) !important;
    border-color: var(--brand-yellow) !important;
    color: #1f1300 !important;
}

.btn-brand:active,
.btn-brand.active {
    background-color: var(--brand-yellow-light) !important;
    border-color: var(--brand-yellow-light) !important;
    color: #1f1300 !important;
}

.btn .bi,
.btn svg {
    color: currentColor !important;
    fill: currentColor !important;
}

.text-primary {
    color: var(--brand-yellow) !important;
}

.bg-primary {
    background-color: var(--brand-yellow) !important;
}

.border-primary {
    border-color: var(--brand-yellow) !important;
}

.alert-primary {
    background-color: var(--brand-yellow) !important;
    border-color: var(--brand-yellow-light) !important;
    color: #1f1300 !important;
}

/* Additional overrides for any remaining blue elements */
a:not(.btn):not(.navbar-brand):not(.nav-link):not(.dropdown-item) {
    color: #ffffcc !important;
}

a:not(.btn):not(.navbar-brand):not(.nav-link):not(.dropdown-item):visited {
    color: #ffffcc !important;
}

a:not(.btn):not(.navbar-brand):not(.nav-link):not(.dropdown-item):hover {
    color: #ffffe0 !important;
}

a:not(.btn):not(.navbar-brand):not(.nav-link):not(.dropdown-item):active {
    color: #fff5b8 !important;
}


.user-status {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--bs-gray-600);
}

.user-status__indicator {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background-color: var(--bs-gray-500);
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.05);
}

.user-status--online .user-status__indicator {
    background-color: var(--bs-success);
    box-shadow: 0 0 0 2px rgba(25, 135, 84, 0.25);
}

/* Allow long modal content to scroll even when Bootstrap is loaded from the CDN. */
.modal-dialog-scrollable .modal-content {
    max-height: none;
    overflow: visible;
}

.modal-dialog-scrollable .modal-body {
    max-height: calc(100vh - var(--bs-modal-margin) * 2);
    overflow-y: auto;
}

.user-status--offline .user-status__indicator {
    background-color: var(--bs-secondary);
}

.user-status__label {
    line-height: 1;
}

.form-section {
    background-color: rgba(148, 163, 184, 0.14);
    border: 1px solid rgba(148, 163, 184, 0.22);
}

.form-section .card-header,
.form-section .card-body {
    background-color: transparent;
}

.form-section__header {
    padding: 1rem 1.25rem;
}

.form-section__toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 1rem;
    background: none;
    border: 0;
    padding: 0;
    color: inherit;
    text-align: left;
}

.form-section__toggle:focus-visible {
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(255, 193, 7, 0.25);
    border-radius: 0.5rem;
}

.form-section__title {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: normal;
    text-transform: none;
    color: var(--bs-body-color);
}

.form-section__body {
    display: none;
}

.form-section--open .form-section__body {
    display: block;
}

.form-section__chevron {
    transition: transform 0.2s ease;
    color: var(--bs-secondary-color);
}

.form-section--open .form-section__chevron {
    transform: rotate(180deg);
}

.catalog-lookup-layout {
    position: relative;
}

.catalog-lookup-layout__fields,
.catalog-lookup-layout__sidebar {
    width: 100%;
}

.catalog-lookup-layout__sidebar-inner {
    position: relative;
}

@media (min-width: 992px) {
    .catalog-lookup-layout {
        display: flex;
        align-items: flex-start;
        gap: 1.5rem;
    }

    .catalog-lookup-layout__fields {
        flex: 0 0 66.666667%;
        max-width: 66.666667%;
    }

    .catalog-lookup-layout__sidebar {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }

    .catalog-lookup-layout__sidebar-inner {
        position: sticky;
        top: 1.5rem;
    }
}

@media (min-width: 768px) {
    .sidebar, .help-sidebar {
        position: sticky !important;
        top: var(--navbar-height);
        height: calc(100vh - var(--navbar-height));
        overflow-y: auto;
        flex-shrink: 0;
    }
}

.catalog-lookup-panel {
    border: 1px solid rgba(255, 193, 7, 0.45);
    border-radius: var(--bs-border-radius-lg);
    background: linear-gradient(180deg, rgba(255, 249, 231, 0.95), rgba(255, 243, 205, 0.95));
    color: var(--bs-warning-text-emphasis, #7f5d00);
    overflow: hidden;
}

.catalog-lookup-panel__body {
    color: inherit;
    padding: 1rem 1.25rem;
}

.catalog-lookup-panel--sidebar {
    width: 100%;
}

.help-sidebar .catalog-lookup-panel {
    box-shadow: none;
}

@media (min-width: 768px) {
    .sidebar, .help-sidebar {
        position: sticky;
        top: var(--navbar-height);
        height: calc(100vh - var(--navbar-height));
        overflow-y: auto;
        flex-shrink: 0;
    }
}

.catalog-lookup-panel__header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: inherit;
}

.catalog-lookup-panel__icon {
    color: inherit;
}

.catalog-lookup-panel__title {
    color: inherit;
}

.catalog-lookup-panel__intro {
    color: inherit;
}

.catalog-lookup-panel__results {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.catalog-lookup-result {
    display: block;
    width: 100%;
    text-align: left;
    border: 1px solid rgba(255, 193, 7, 0.45);
    border-radius: var(--bs-border-radius);
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--bs-body-color);
    padding: 0.75rem 1rem;
    line-height: 1.45;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.catalog-lookup-result:hover,
.catalog-lookup-result:focus-visible {
    border-color: rgba(255, 193, 7, 0.7);
    box-shadow: 0 0 0 0.125rem rgba(255, 193, 7, 0.25);
    transform: translateY(-1px);
    outline: none;
    color: var(--bs-body-color);
}

.catalog-lookup-result--active {
    background-color: rgba(255, 193, 7, 0.25);
    border-color: rgba(255, 193, 7, 0.95);
    box-shadow: 0 0 0 0.125rem rgba(255, 193, 7, 0.25);
}

.catalog-lookup-panel__more {
    margin-top: 0.75rem;
}

.catalog-lookup-panel__more-link {
    background: none;
    border: 0;
    padding: 0;
    color: var(--bs-warning-text-emphasis, #7f5d00);
    cursor: pointer;
}

.catalog-lookup-panel__more-link:hover,
.catalog-lookup-panel__more-link:focus-visible {
    text-decoration: underline;
    color: var(--bs-warning-text-emphasis, #7f5d00);
    outline: none;
}

[data-bs-theme='dark'] .catalog-lookup-panel {
    border-color: rgba(255, 193, 7, 0.55);
    background: linear-gradient(180deg, rgba(73, 54, 0, 0.9), rgba(45, 34, 0, 0.92));
    color: rgba(255, 224, 138, 0.95);
    box-shadow: 0 1.25rem 2.5rem rgba(0, 0, 0, 0.35);
}

[data-bs-theme='dark'] .catalog-lookup-panel__body,
[data-bs-theme='dark'] .catalog-lookup-panel__header,
[data-bs-theme='dark'] .catalog-lookup-panel__intro,
[data-bs-theme='dark'] .catalog-lookup-panel__title {
    color: inherit;
}

[data-bs-theme='dark'] .catalog-lookup-panel__icon {
    color: rgba(255, 234, 162, 0.95);
}

[data-bs-theme='dark'] .catalog-lookup-result {
    border-color: rgba(255, 193, 7, 0.35);
    background-color: rgba(33, 37, 41, 0.85);
    color: var(--bs-body-color);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

[data-bs-theme='dark'] .catalog-lookup-result:hover,
[data-bs-theme='dark'] .catalog-lookup-result:focus-visible {
    border-color: rgba(255, 193, 7, 0.7);
    box-shadow: 0 0 0 0.125rem rgba(255, 193, 7, 0.3);
    color: var(--bs-body-color);
}

[data-bs-theme='dark'] .catalog-lookup-result--active {
    background-color: rgba(255, 193, 7, 0.25);
    border-color: rgba(255, 193, 7, 0.95);
    box-shadow: 0 0 0 0.125rem rgba(255, 193, 7, 0.3);
}

[data-bs-theme='dark'] .catalog-lookup-panel__more-link {
    color: rgba(255, 224, 138, 0.95);
}

[data-bs-theme='dark'] .catalog-lookup-panel__more-link:hover,
[data-bs-theme='dark'] .catalog-lookup-panel__more-link:focus-visible {
    color: rgba(255, 234, 162, 0.95);
}

.seller-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    color: var(--bs-body-color);
}


.seller-meta__identity {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.seller-meta__indicator {
    width: 0.625rem;
    height: 0.625rem;
    border-radius: 50%;
    background-color: var(--bs-success);
}

.listing-media-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.listing-media-thumb {
    width: 220px;
    height: 220px;
    overflow: hidden;
    background-color: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease, opacity 0.15s ease;
    cursor: pointer;
    border: none;
    padding: 0;
}

.listing-media-thumb:hover {
    transform: scale(1.03);
    opacity: 0.85;
}

.listing-media-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Listing image lightbox modal - full page overlay */
.listing-lightbox-modal {
    --bs-modal-margin: 0;
    --bs-modal-border-radius: 0;
}

.listing-lightbox-modal .modal-dialog {
    max-width: 100vw;
    width: 100vw;
    height: 100vh;
    margin: 0;
}

.listing-lightbox-modal .modal-content {
    background-color: rgba(0, 0, 0, 0.97);
    border: none;
    border-radius: 0;
    height: 100vh;
}

.listing-lightbox-modal .modal-body {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    position: relative;
    padding: 0;
}

.listing-lightbox-modal .lightbox-image {
    max-width: 95vw;
    max-height: 95vh;
    object-fit: contain;
}

.listing-lightbox-modal .lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    padding: 1rem 0.75rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.listing-lightbox-modal .lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.3);
}

.listing-lightbox-modal .lightbox-nav--prev {
    left: 0;
    border-radius: 0 var(--bs-border-radius) var(--bs-border-radius) 0;
}

.listing-lightbox-modal .lightbox-nav--next {
    right: 0;
    border-radius: var(--bs-border-radius) 0 0 var(--bs-border-radius);
}

.listing-lightbox-modal .lightbox-close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    padding: 0.5rem 0.75rem;
    border-radius: var(--bs-border-radius);
    cursor: pointer;
    transition: background 0.2s ease;
}

.listing-lightbox-modal .lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.listing-lightbox-modal .lightbox-counter {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.7);
}

.listing-media-placeholder {
    min-width: 160px;
    min-height: 96px;
    border: 1px dashed var(--bs-border-color);
    border-radius: var(--bs-border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bs-secondary-color);
    background-color: rgba(0, 0, 0, 0.02);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.message-thread-card {
    max-height: none;
}

.message-thread-messages {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: min(60vh, 480px);
    overflow-y: auto;
    padding-right: 0.25rem;
    min-height: 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 193, 7, 0.45) rgba(148, 163, 184, 0.25);
}

.message-thread-messages::-webkit-scrollbar {
    width: 8px;
}

.message-thread-messages::-webkit-scrollbar-track {
    background-color: rgba(241, 245, 249, 0.85);
    border-radius: 999px;
}

.message-thread-messages::-webkit-scrollbar-thumb {
    background-color: rgba(255, 193, 7, 0.45);
    border-radius: 999px;
}

.message-thread-messages::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 193, 7, 0.65);
}

.message-thread-entry {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.message-thread-entry--incoming {
    align-items: flex-start;
    text-align: left;
}

.message-thread-entry--outgoing {
    align-items: flex-end;
    text-align: right;
}

.message-thread-entry--incoming .message-thread-meta {
    text-align: left;
}

.message-thread-entry--outgoing .message-thread-meta {
    text-align: right;
}

.message-thread-bubble {
    border-radius: var(--bs-border-radius-lg);
    padding: 0.5rem 0.75rem;
    background-color: rgba(15, 23, 42, 0.06);
    color: var(--bs-body-color);
    box-shadow: none;
    max-width: min(480px, 100%);
    white-space: pre-wrap;
    word-break: break-word;
}

.message-thread-entry--outgoing .message-thread-bubble {
    background-color: var(--bs-primary);
    color: #fff;
}

[data-bs-theme='dark'] .message-thread-bubble {
    background-color: rgba(148, 163, 184, 0.18);
    color: #f8fafc;
}

[data-bs-theme='dark'] .message-thread-entry--outgoing .message-thread-bubble {
    background-color: rgba(255, 193, 7, 0.85);
    color: #fff;
}

.message-thread-meta {
    color: rgba(15, 23, 42, 0.85);
}

[data-bs-theme='dark'] .message-thread-meta {
    color: rgba(226, 232, 240, 0.86);
}

.message-thread-footer {
    border-top: 1px solid var(--bs-border-color-translucent);
    padding-top: 0.75rem;
}

.message-thread-composer {
    display: flex;
    align-items: stretch;
    gap: 0.75rem;
}

.message-thread-input {
    flex: 1 1 auto;
    background-color: #ffffff;
    color: #0f172a;
    border: 1px solid rgba(15, 23, 42, 0.12);
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.08);
}

.message-thread-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-inline: 0.75rem;
    aspect-ratio: 1 / 1;
    border-radius: 999px;
}

[data-bs-theme='dark'] .message-thread-input {
    background-color: #ffffff;
    color: #0f172a;
}

[data-bs-theme='dark'] .table > thead > * > th,
[data-bs-theme='dark'] .table thead th {
    background-color: #111827;
    color: #f8fafc;
    border-color: rgba(148, 163, 184, 0.4);
}

[data-bs-theme='dark'] .table thead th a {
    color: inherit;
}

[data-bs-theme='dark'] .table thead th .text-muted {
    color: rgba(226, 232, 240, 0.8) !important;
}

[data-bs-theme='dark'] .table > tfoot > * > th,
[data-bs-theme='dark'] .table > tfoot > * > td,
[data-bs-theme='dark'] .table tfoot th,
[data-bs-theme='dark'] .table tfoot td {
    background-color: #0f172a;
    color: #f8fafc;
    border-color: rgba(148, 163, 184, 0.4);
}

[data-bs-theme='dark'] .table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: rgba(15, 23, 42, 0.65);
}

#currencies-table,
#currencies-table thead,
#currencies-table tbody,
#currencies-table tr,
#currencies-table th,
#currencies-table td {
    background-color: transparent !important;
    --bs-table-bg: transparent;
    --bs-table-striped-bg: transparent;
    --bs-table-hover-bg: rgba(255, 255, 255, 0.04);
    --bs-table-accent-bg: transparent;
}

[data-bs-theme='dark'] .country-group-header {
    background-color: rgba(30, 41, 59, 0.85);
    color: #f8fafc;
}

[data-bs-theme='dark'] .country-group-header .badge.bg-secondary {
    background-color: rgba(148, 163, 184, 0.3) !important;
    color: #e2e8f0;
}

/* #647 #652: Currency cards — site-consistent design */
.banknote-card {
    border-radius: .5rem;
    overflow: hidden;
    background: #f8f9fa;
    color: #212529;
    transition: box-shadow .2s, border-color .2s;
}
.banknote-card:hover {
    box-shadow: 0 4px 14px rgba(0, 0, 0, .1);
}
.banknote-active {
    border-left: 3px solid #198754;
}
.banknote-border {
    border: 1px solid rgba(0, 0, 0, .12);
    border-radius: .5rem;
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.banknote-border::before {
    display: none;
}
.banknote-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    padding: .55rem .75rem;
    border-bottom: 1px solid rgba(0, 0, 0, .08);
    background: rgba(0, 0, 0, .02);
}
/* #652: Default medallion — neutral/historical (muted amber) */
.banknote-medallion {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e0c97a, #c4a84a);
    border: 2px solid #b09530;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: inset 0 1px 3px rgba(255,255,255,.3), 0 1px 3px rgba(0,0,0,.12);
}
.banknote-medallion span {
    font-size: .65rem;
    font-weight: 700;
    color: #4a3800;
    text-transform: uppercase;
    letter-spacing: .02em;
    line-height: 1.1;
    text-align: center;
    max-width: 36px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
/* #652: Active currency medallion — green */
.medallion-active {
    background: linear-gradient(135deg, #52c77e, #1a9b4a) !important;
    border-color: #157a3b !important;
}
.medallion-active span,
.banknote-mini-medallion.medallion-active {
    color: #fff !important;
}
.banknote-medallion-sm {
    width: 32px;
    height: 32px;
}
.banknote-medallion-sm span {
    font-size: .55rem;
    max-width: 26px;
}
.banknote-mini-medallion {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e0c97a, #c4a84a);
    border: 1.5px solid #b09530;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: .5rem;
    font-weight: 700;
    color: #4a3800;
    text-transform: uppercase;
    box-shadow: inset 0 1px 2px rgba(255,255,255,.2);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.banknote-title {
    font-size: .95rem;
    font-weight: 600;
}
.banknote-title a {
    color: #212529;
}
.banknote-subtitle {
    font-size: .72rem;
    color: #6c757d;
    line-height: 1.2;
}
.banknote-body {
    padding: .5rem .75rem;
    flex: 1;
}
.banknote-fields-stacked {
    display: flex;
    flex-direction: column;
    gap: .15rem;
    font-size: .78rem;
    color: #495057;
}
/* #660 #663: Flag button — matches btn-sm bordered height exactly */
.banknote-flag-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    height: calc(1.5em * .875 + .5rem + 2px); /* matches btn-sm: line-height*font-size + padding + border */
    font-size: 1rem; /* base for calc */
}
.banknote-flag-btn img {
    height: 100%;
    width: auto;
    aspect-ratio: 3/2;
    object-fit: cover;
    border-radius: 2px;
}
.banknote-field {
    white-space: nowrap;
}
.banknote-field.banknote-field-wrap {
    white-space: normal;
    word-break: break-word;
}
.banknote-field i {
    opacity: .5;
    font-size: .7rem;
}
/* #651: Prominent year display */
.banknote-era {
    font-weight: 700;
    font-size: .85rem;
    color: #212529;
}
.banknote-id {
    opacity: .35;
    font-size: .7rem;
}
.banknote-ratio {
    font-size: .75rem;
    color: #6c757d;
    margin-top: .25rem;
}
.banknote-notes {
    font-size: .73rem;
    color: #6c757d;
    margin-top: .2rem;
    font-style: italic;
}
.banknote-subunits {
    border-top: 1px solid rgba(0, 0, 0, .08);
    padding: .35rem .75rem .5rem;
}
.banknote-subunits-header {
    font-size: .68rem;
    text-transform: uppercase;
    color: #6c757d;
    font-weight: 600;
    margin-bottom: .35rem;
    letter-spacing: .03em;
}
.banknote-subunit {
    padding: .3rem 0;
}
.banknote-subunit .border-bottom {
    border-color: rgba(0, 0, 0, .06) !important;
}
.banknote-subunit-meta-stacked {
    font-size: .7rem;
    color: #6c757d;
    display: flex;
    flex-direction: column;
    gap: .1rem;
}
.banknote-era-sm {
    font-weight: 600;
    color: #495057;
}
.banknote-card-sm .banknote-border {
    border-width: 1px;
}
.banknote-card-sm .banknote-border::before {
    display: none;
}

/* #652: Dark mode currency cards */
[data-bs-theme='dark'] .banknote-card {
    background: #1a1d21;
    color: #dee2e6;
}
[data-bs-theme='dark'] .banknote-active {
    border-left-color: #28a745;
}
[data-bs-theme='dark'] .banknote-border {
    border-color: rgba(148, 163, 184, .25);
}
[data-bs-theme='dark'] .banknote-header {
    border-color: rgba(148, 163, 184, .15);
    background: rgba(255, 255, 255, .03);
}
[data-bs-theme='dark'] .banknote-medallion {
    background: linear-gradient(135deg, #c9a000, #8b6914);
    border-color: #a07d10;
    box-shadow: inset 0 1px 3px rgba(255,255,255,.15), 0 1px 4px rgba(0,0,0,.3);
}
[data-bs-theme='dark'] .banknote-medallion span {
    color: #fbe38a;
}
[data-bs-theme='dark'] .medallion-active {
    background: linear-gradient(135deg, #28a745, #1a7a35) !important;
    border-color: #157a3b !important;
}
[data-bs-theme='dark'] .medallion-active span,
[data-bs-theme='dark'] .banknote-mini-medallion.medallion-active {
    color: #fff !important;
}
[data-bs-theme='dark'] .banknote-mini-medallion {
    background: linear-gradient(135deg, #c9a000, #8b6914);
    border-color: #a07d10;
    color: #fbe38a;
}
[data-bs-theme='dark'] .banknote-title a {
    color: #f8f9fa;
}
[data-bs-theme='dark'] .banknote-subtitle {
    color: #94a3b8;
}
[data-bs-theme='dark'] .banknote-era {
    color: #f8f9fa;
}
[data-bs-theme='dark'] .banknote-fields-stacked {
    color: #adb5bd;
}
[data-bs-theme='dark'] .banknote-era-sm {
    color: #dee2e6;
}
[data-bs-theme='dark'] .banknote-ratio,
[data-bs-theme='dark'] .banknote-notes {
    color: #94a3b8;
}
[data-bs-theme='dark'] .banknote-subunits {
    border-color: rgba(148, 163, 184, .15);
}
[data-bs-theme='dark'] .banknote-subunits-header {
    color: #94a3b8;
}
[data-bs-theme='dark'] .banknote-subunit-meta {
    color: #94a3b8;
}
[data-bs-theme='dark'] .banknote-subunit .border-bottom {
    border-color: rgba(148, 163, 184, .1) !important;
}

[data-bs-theme='dark'] .card {
    --bs-card-cap-bg: #0f172a;
    --bs-card-cap-color: #f8fafc;
    --bs-card-border-color: rgba(148, 163, 184, 0.4);
}

[data-bs-theme='dark'] .card-header {
    border-color: rgba(148, 163, 184, 0.4);
}

.message-thread-form textarea {
    resize: vertical;
    min-height: 3rem;
}

.message-thread-status {
    min-height: 1.25rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.message-thread-status.is-visible {
    opacity: 1;
}

.message-thread-status--success {
    color: var(--bs-success-text-emphasis, var(--bs-success));
}

.message-thread-status--error {
    color: var(--bs-danger-text-emphasis, var(--bs-danger));
}

.collection-media-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

.collection-media-slot {
    border: 1px dashed var(--bs-border-color);
    border-radius: 0.75rem;
    padding: 1rem;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background-color: var(--bs-body-bg);
}

.collection-media-slot.collection-media-slot--filled {
    border-style: solid;
    border-color: rgba(var(--bs-primary-rgb), 0.45);
    box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.1);
}

.collection-media-placeholder button {
    width: 100%;
}

.collection-media-preview img {
    max-height: 220px;
    object-fit: contain;
    background-image: linear-gradient(45deg, #f8f9fa 25%, transparent 25%, transparent 75%, #f8f9fa 75%), linear-gradient(45deg, #f8f9fa 25%, transparent 25%, transparent 75%, #f8f9fa 75%);
    background-size: 20px 20px;
    background-position: 0 0, 10px 10px;
    border: 1px solid var(--bs-border-color);
    border-radius: 0.5rem;
}

.collection-card-thumb {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 0.5rem;
    border: 1px solid var(--bs-border-color);
    background-color: var(--bs-body-bg);
}


.sitemap-tree .sitemap-node {
    margin-bottom: 0.5rem;
}

.sitemap-tree .sitemap-node:last-child {
    margin-bottom: 0;
}

.sitemap-tree .sitemap-link,
.sitemap-tree .sitemap-label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.sitemap-tree .sitemap-label {
    color: var(--bs-body-color);
}

.sitemap-tree .sitemap-children {
    border-left: 1px solid var(--bs-border-color-translucent);
    margin-top: 0.5rem;
    padding-left: 1.25rem;
}

.sitemap-tree .sitemap-children .sitemap-node {
    margin-bottom: 0.35rem;
}

.sitemap-tree .sitemap-children .sitemap-node:last-child {
    margin-bottom: 0;
}

@media (max-width: 991.98px) {
    .form-stack .row {
        flex-direction: column;
    }

    .form-stack .row > [class^="col-"],
    .form-stack .row > [class*=" col-"] {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .form-stack .row > [class^="col-"] + *,
    .form-stack .row > [class*=" col-"] + * {
        margin-left: 0;
    }
}

.designer-suggestions {
    max-height: 16rem;
    overflow-y: auto;
    z-index: 1060;
}

.token-field {
    min-height: calc(1.5em + 0.75rem + 2px);
    padding: 0.375rem 0.75rem;
    cursor: text;
}

.token-field:focus-within {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.25);
}

.token-field__input {
    border: 0;
    outline: 0;
    min-width: 8rem;
    background: transparent;
    padding: 0;
    margin: 0;
}

.token-field__input:focus {
    outline: 0;
    box-shadow: none;
}

.token-field__tag {
    padding: 0.25rem 0.5rem;
}


.listing-photo-manager {
    border-top: 1px solid rgba(var(--bs-body-color-rgb), 0.1);
    padding-top: 1.25rem;
}

.listing-photo-dropzone {
    border: 2px dashed rgba(var(--bs-primary-rgb), 0.35);
    border-radius: 0.75rem;
    padding: 1.5rem;
    text-align: center;
    transition: border-color 0.2s ease, background-color 0.2s ease, opacity 0.2s ease;
    background-color: rgba(var(--bs-body-bg-rgb), 0.9);
}

.listing-photo-dropzone__icon {
    margin-bottom: 0.5rem;
    color: rgba(var(--bs-primary-rgb), 0.65);
}

.listing-photo-dropzone--active {
    border-color: rgba(var(--bs-primary-rgb), 0.75);
    background-color: rgba(var(--bs-primary-rgb), 0.08);
}

.listing-photo-dropzone--disabled {
    opacity: 0.55;
    pointer-events: none;
}

.listing-submit-actions,
.listing-submit-actions > .btn {
    pointer-events: auto !important;
}

.inline-validation-message {
    display: block;
    margin-top: 0.5rem;
    color: #f4b400;
}

.listing-photo-list {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.listing-photo-item {
    list-style: none;
}

.listing-photo-frame {
    border: 1px solid rgba(var(--bs-body-color-rgb), 0.15);
    border-radius: 0.75rem;
    overflow: hidden;
    background-color: rgba(var(--bs-body-bg-rgb), 1);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.listing-photo-preview {
    position: relative;
    padding-top: 66.6667%;
    background-color: rgba(var(--bs-secondary-rgb), 0.08);
}

.listing-photo-preview img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.listing-photo-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(var(--bs-body-color-rgb), 0.35);
    background-image: radial-gradient(circle at center, rgba(var(--bs-primary-rgb), 0.08), transparent 65%);
}

.listing-photo-actions {
    padding: 0.75rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    border-top: 1px solid rgba(var(--bs-body-color-rgb), 0.08);
    background-color: rgba(var(--bs-body-bg-rgb), 0.95);
}

.listing-photo-actions .btn-group {
    flex-wrap: wrap;
}

.listing-photo-actions .btn-group .btn {
    min-width: 2.5rem;
}

.listing-photo-item .form-text {
    padding: 0.5rem 0.75rem 0.75rem;
    margin-bottom: 0;
}

@media (max-width: 576px) {
    .listing-photo-list {
        grid-template-columns: 1fr;
    }
}

/* Select/option dark mode fix - legördülő listák olvashatósága */
[data-bs-theme='dark'] select.form-select,
[data-bs-theme='dark'] select.form-control {
    background-color: #1e293b;
    color: #f1f5f9;
    border-color: rgba(148, 163, 184, 0.4);
}

[data-bs-theme='dark'] select.form-select option,
[data-bs-theme='dark'] select.form-control option {
    background-color: #1e293b;
    color: #f1f5f9;
}

[data-bs-theme='dark'] select.form-select:focus,
[data-bs-theme='dark'] select.form-control:focus {
    background-color: #1e293b;
    color: #f1f5f9;
    border-color: rgba(255, 193, 7, 0.5);
    box-shadow: 0 0 0 0.25rem rgba(255, 193, 7, 0.25);
}

/* Módváltó kártyák (Aukció/Fixáras/Gyűjtemény) */
/* #625: Egységes border - ne változzon a méret */
.add-type-card {
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    border-width: 2px;
    position: relative;
}

.add-type-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.add-type-card:focus {
    outline: none;
    box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.25);
}

.add-type-card.selected {
    border-width: 2px; /* #625: marad 2px, box-shadow-val jelezzük */
    box-shadow: 0 0 0 2px rgba(255, 193, 7, 0.5), 0 0.5rem 1rem rgba(0, 0, 0, 0.2);
}

.add-type-card.selected::after {
    content: '\f26b';
    font-family: 'bootstrap-icons';
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    font-size: 1.25rem;
}

.add-type-card.border-warning.selected {
    background-color: rgba(255, 193, 7, 0.1);
}

.add-type-card.border-secondary.selected {
    background-color: rgba(108, 117, 125, 0.1);
}

.add-type-card.border-primary.selected {
    background-color: rgba(13, 110, 253, 0.1);
}

.add-type-card.selected::after {
    color: inherit;
}

.add-type-card.border-warning.selected::after {
    color: var(--bs-warning);
}

.add-type-card.border-secondary.selected::after {
    color: var(--bs-secondary);
}

.add-type-card.border-primary.selected::after {
    color: var(--bs-primary);
}

/* #245: Táblázat fokusz stílusok */
.table-stack:focus-within {
    outline: 2px solid var(--brand-yellow);
    outline-offset: 2px;
    border-radius: var(--bs-border-radius);
}

.table-stack .table tbody tr:focus-within {
    outline: 2px solid var(--brand-yellow);
    outline-offset: -2px;
}

.table-stack .table tbody td:focus-within {
    background-color: rgba(255, 193, 7, 0.08) !important;
}

.table-stack .table tbody tr:focus-within td {
    background-color: transparent;
}

/* #246: Rendelés figyelmeztető címsor sor */
.order-alert-row td {
    background-color: var(--brand-yellow) !important;
    color: #1f1300 !important;
    font-weight: 600;
    padding: 0.5rem 0.75rem !important;
    border-bottom: none !important;
}

.order-alert-row + tr td {
    border-top: none !important;
}

/* #401: Home listing card styles moved from listing_card.php */
@media (max-width: 575.98px) {
    .home-listing-card-actions {
        width: 100%;
        justify-content: stretch;
    }

    .home-listing-card-actions .btn,
    .home-listing-card-actions form {
        flex: 1 1 auto;
    }
}

.card.home-listing-card {
    border-radius: var(--bs-border-radius-lg);
    border: 1px solid var(--bs-border-color-translucent);
    overflow: hidden !important;
}

[data-bs-theme="dark"] .card.home-listing-card {
    border-color: rgba(255, 255, 255, 0.12);
}

.home-listing-media {
    aspect-ratio: 4 / 3;
    overflow: hidden !important;
    border-top-left-radius: var(--bs-border-radius-lg);
    border-top-right-radius: var(--bs-border-radius-lg);
}

.home-listing-media .ratio {
    height: 100%;
    background-color: var(--bs-secondary-bg);
}

.home-listing-media img {
    object-fit: cover;
    width: 100%;
    height: 100%;
}

/* Override images side by side */
.home-listing-override-images {
    display: flex;
    gap: 4px;
    padding: 4px;
    background-color: var(--bs-secondary-bg);
    border-top-left-radius: var(--bs-border-radius-lg);
    border-top-right-radius: var(--bs-border-radius-lg);
    height: 100%;
}

.home-listing-override-images .override-image-btn {
    flex: 1 1 50%;
    height: 100%;
    border: none;
    padding: 0;
    background: transparent;
    cursor: pointer;
    overflow: hidden;
    border-radius: var(--bs-border-radius);
    transition: opacity 0.15s ease;
}

.home-listing-override-images .override-image-btn:hover {
    opacity: 0.85;
}

.home-listing-override-images .override-image-btn img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background-color: var(--bs-body-bg);
}

.home-listing-card .card-body {
    display: flex;
    flex-direction: column;
}

.home-listing-card-footer {
    border-top: 1px solid var(--bs-border-color-translucent);
    margin-top: auto;
    padding-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.home-listing-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: flex-end;
}

.home-listing-card-actions .btn {
    white-space: nowrap;
}

.home-listing-card-title a {
    text-decoration: none;
    color: inherit;
}

.home-listing-card-title a:hover {
    text-decoration: underline;
}

.home-listing-no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    letter-spacing: normal;
    text-transform: none;
    text-align: center;
}

/* A11y: Skip to content link - visible on focus only */
.skip-to-content {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1050;
    padding: 0.75rem 1.5rem;
    background-color: var(--brand-yellow);
    color: #1f1300;
    font-weight: 600;
    text-decoration: none;
    border-radius: 0 0 0.5rem 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.skip-to-content:focus {
    outline: 3px solid #1f1300;
    outline-offset: 2px;
}

/* A11y: Password toggle button */
.password-toggle-btn {
    border-left: 0;
    background: transparent;
    color: var(--bs-secondary-color);
}

.password-toggle-btn:hover,
.password-toggle-btn:focus {
    color: var(--bs-body-color);
    background: transparent;
}

/* #50: Description expands on hover */
.listing-card-description {
    max-height: 4.5em;
    overflow: hidden;
    position: relative;
    transition: max-height 0.3s ease, z-index 0s;
}

.listing-card-description.expanded {
    max-height: none;
    overflow: visible;
    position: absolute;
    left: 0;
    right: 0;
    z-index: 100;
    background: var(--bs-body-bg);
    padding: 0.5rem;
    border-radius: var(--bs-border-radius);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

