body {
    font-family: system-ui, sans-serif;
    max-width: 960px;
    margin: 2rem auto;
    padding: 0 1rem;
    color: #1a1a1a;
}

body.busy, body.busy * {
    cursor: wait !important;
}

body.busy a, body.busy button, body.busy input, body.busy select, body.busy textarea {
    pointer-events: none;
}

.site-footer {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #ddd;
    color: #777;
    font-size: 0.85em;
    text-align: center;
}

.auth-status {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-size: 0.85em;
    color: #555;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.h1-like {
    font-size: 2em;
    font-weight: bold;
    margin: 0.67em 0;
}

.heading-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    text-align: left;
    padding: 0.5rem;
    border-bottom: 1px solid #ddd;
    white-space: nowrap;
}

.row-thumbnail {
    display: inline-block;
    height: 2.5rem;
    width: auto;
    margin-right: 0.25rem;
}

.row-has-estimated-value {
    background-color: #f2f2f2;
}

.cell-consecutive-serial {
    background-color: lightblue;
}

.cell-special-serial {
    font-style: italic;
    font-weight: bold;
    text-decoration: underline;
}

.catalog-group-separator {
    padding: 0;
    border-bottom: 2px solid #1a1a1a;
}

dl {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.25rem 1rem;
}

dt {
    font-weight: 600;
}

form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}

.inline-form {
    display: inline-block;
    max-width: none;
    margin: 0 0.25rem;
}

.danger-action {
    margin-left: 1.25rem;
}

.icon-button {
    display: inline-block;
    padding: 0;
    border: none;
    background: none;
    color: inherit;
    font-size: 1.1em;
    line-height: 1;
    cursor: pointer;
}

.icon {
    width: 1.1em;
    height: 1.1em;
    vertical-align: middle;
    fill: currentColor;
}

.wishlist-toggle-button .icon-star-filled,
.wishlist-toggle-button .icon-star-outline {
    display: none;
}

.wishlist-toggle-button[data-wishlisted="true"] .icon-star-filled,
.wishlist-toggle-button[data-wishlisted="false"] .icon-star-outline {
    display: inline-block;
}

.button, button {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: 1px solid #1a1a1a;
    border-radius: 4px;
    background: #1a1a1a;
    color: #fff;
    text-decoration: none;
    cursor: pointer;
    width: fit-content;
}

.button:disabled, button:disabled {
    border-color: #aaa;
    background: #ccc;
    color: #777;
    cursor: not-allowed;
}

.panel {
    margin-bottom: 1.5rem;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.panel h2 {
    margin-top: 0;
}

nav {
    display: flex;
    gap: 0.75rem;
}

.status-dot {
    display: inline-block;
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 50%;
    margin-right: 0.4rem;
}

.status-up {
    background: #2e7d32;
}

.status-down {
    background: #c62828;
}

.error {
    padding: 0.75rem 1rem;
    border: 1px solid #c62828;
    border-radius: 4px;
    background: #fdecea;
    color: #c62828;
}

.success {
    padding: 0.75rem 1rem;
    border: 1px solid #2e7d32;
    border-radius: 4px;
    background: #e8f5e9;
    color: #2e7d32;
}

.hint {
    color: #555;
    font-style: italic;
}

.wide-form {
    max-width: 1000px;
}

.form-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.form-row .form-field {
    flex: 1;
    min-width: 140px;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.inline-group {
    display: flex;
    gap: 0.5rem;
}

.inline-group input {
    flex: 1;
    height: 2.4rem;
    box-sizing: border-box;
}

.inline-group a.button,
.inline-group button {
    white-space: nowrap;
    flex-shrink: 0;
    height: 2.4rem;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    padding: 0 1rem;
}

.readonly-field {
    border: none;
    background: transparent;
    padding: 0;
}

.form-field-checkbox {
    flex: 0 0 auto;
    justify-content: flex-end;
}

.banknote-image {
    display: inline-block;
    margin: 0 1rem 1rem 0;
    text-align: center;
}

.banknote-image img {
    max-width: 200px;
    max-height: 200px;
    display: block;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: zoom-in;
}

.detail-table {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.field-row {
    margin: 0;
    padding: 0.6rem 1rem;
    border-bottom: 1px solid #ddd;
}

.field-row:last-child {
    border-bottom: none;
}

.field {
    margin-right: 2rem;
    display: inline-block;
}

.delete-button {
    margin-top: 0.5rem;
    background: #c62828;
    border-color: #c62828;
}

.lightbox-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 1000;
    flex-direction: column;
}

.lightbox-overlay.open {
    display: flex;
}

.lightbox-toolbar {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 0.75rem;
    flex: none;
}

.lightbox-toolbar button {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #fff;
    width: 2.5rem;
    font-size: 1.1rem;
    line-height: 1;
    margin-top: 0;
}

.lightbox-toolbar button:hover {
    background: rgba(255, 255, 255, 0.3);
}

.osd-viewport {
    flex: 1;
    width: 100%;
}

.lightbox-nav-prev,
.lightbox-nav-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1001;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #fff;
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1.1rem;
    line-height: 1;
}

.lightbox-nav-prev:hover,
.lightbox-nav-next:hover {
    background: rgba(255, 255, 255, 0.3);
}

.lightbox-nav-prev {
    left: 0.75rem;
}

.lightbox-nav-next {
    right: 0.75rem;
}

.row-exists {
    background: #e6f4ea;
}
