@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@600&display=swap');
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600&family=Sora:wght@500;600&display=swap');

/* General Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Japanese-inspired global theme overrides */
:root {
    --jp-ink: #1c1b1a;
    --jp-muted: #5c5f68;
    --jp-indigo: #1f2a44;
    --jp-vermillion: #c94f3d;
    --jp-gold: #d7a44b;
    --jp-paper: #f7f1e7;
    --jp-paper-2: #fff9f2;
    --jp-border: #e4d7c9;
    --jp-shadow: 0 12px 30px rgba(29, 27, 24, 0.12);
    --font-body: 'IBM Plex Sans', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    --font-display: 'Sora', 'IBM Plex Sans', 'Segoe UI', sans-serif;
    --content-max-width: 1200px;
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--jp-ink);
    background-color: var(--jp-paper);
    background-image: linear-gradient(140deg, rgba(255, 255, 255, 0.75), rgba(247, 241, 231, 0.9));
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
.header-content h1 {
    font-family: var(--font-display);
    letter-spacing: 0.2px;
}

button,
input,
select,
textarea {
    font: inherit;
}

.nav-menu a:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--jp-gold);
}

.nav-menu a.nav-link-active {
    box-shadow: inset 0 -2px 0 var(--jp-vermillion);
}

.nav-menu a:focus-visible {
    box-shadow: 0 0 0 2px rgba(201, 79, 61, 0.35);
}

.search-container h2 {
    color: var(--jp-ink);
}

.search-container p {
    color: var(--jp-muted);
}

.search-input:focus {
    border-color: var(--jp-indigo);
    box-shadow: 0 0 0 2px rgba(31, 42, 68, 0.12);
}

.order-items-table thead th,
.orders-table thead th,
.search-results-table thead th,
.catalog-table thead th {
    background: #efe4d6;
    color: #3b3a35;
}

.order-items-table tbody td,
.orders-table tbody td,
.search-results-table tbody td,
.catalog-table tbody td {
    border-top: 1px solid #eadfce;
}

.auth-form,
.users-filters,
.filters-card,
.orders-container,
.favorites-container,
.cart-container,
.notifications-container,
.upload-card,
.profile-card {
    background: var(--jp-paper-2);
    border: 1px solid var(--jp-border);
    box-shadow: var(--jp-shadow);
}

.tagline {
    color: rgba(255, 255, 255, 0.7);
}

.favorite-empty,
.catalog-empty,
.notif-empty {
    color: var(--jp-muted);
}

.form-group input,
.form-group select,
.form-group textarea {
    border-color: #d9cfc3;
}

/* Header Styles */
.header {
    background: linear-gradient(135deg, #141b2b 0%, #252f45 55%, #1b2438 100%);
    color: white;
    padding: 20px 0;
    box-shadow: 0 10px 24px rgba(20, 27, 43, 0.28);
    position: relative;
    overflow: visible;
}

.header::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(0deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 48px 48px;
    opacity: 0.6;
    pointer-events: none;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    gap: 30px;
    position: relative;
    z-index: 1;
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    flex: 0 1 420px;
}

.header-search-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.header-search-input {
    flex: 1 1 auto;
    min-width: 160px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.88);
    color: #fff;
    font-size: 0.92rem;
}

.header-search-input::placeholder {
    color: rgba(0, 0, 0, 0.45);
}

.header-search-input {
    color: #1c1b1a;
}

.header-search-input:focus {
    outline: none;
    border-color: rgba(201, 79, 61, 0.6);
    box-shadow: 0 0 0 2px rgba(201, 79, 61, 0.25);
}

.header-search-button {
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.header-search-button:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.35);
}

.header-logout {
    margin-left: 6px;
}

.header-logout-button {
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(201, 79, 61, 0.18);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.header-logout-button:hover {
    background: rgba(201, 79, 61, 0.3);
    border-color: rgba(255, 255, 255, 0.45);
}

.logo {
    flex-shrink: 0;
}

.logo img {
    width: 92px;
    height: 92px;
    object-fit: contain;
    filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.25));
}

.header-content {
    text-align: center;
}

.header-title-row {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.header-content h1 {
    font-size: 2.6em;
    font-weight: bold;
    margin-bottom: 0;
    letter-spacing: 0.02em;
}

.env-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 1;
    white-space: nowrap;
}

.env-indicator--localhost {
    color: #e0f2fe;
    border: 1px solid rgba(125, 211, 252, 0.65);
    background: rgba(14, 116, 144, 0.28);
}

.env-indicator--test {
    color: #fef3c7;
    border: 1px solid rgba(245, 158, 11, 0.6);
    background: rgba(146, 64, 14, 0.3);
}

.test-environment-banner {
    padding: 8px 14px;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #7c2d12;
    background: #ffedd5;
    border-top: 1px solid #fdba74;
}

.tagline {
    font-size: 1.05em;
    color: rgba(255, 255, 255, 0.72);
    font-weight: 300;
}

/* Navigation Menu */
.navbar {
    background-color: #141b2b;
    padding: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}


.nav-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    margin-left: auto;
}

.nav-menu {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0;
    margin: 0;
    flex: 1 1 auto;
}

.nav-toggle {
    display: none;
    align-items: center;
    gap: 10px;
    background: #2d2d2d;
    color: #fff;
    border: 1px solid #3a3a3a;
    border-radius: 8px;
    padding: 10px 14px;
    font-weight: 600;
    cursor: pointer;
}

.nav-toggle-label {
    font-size: 14px;
    line-height: 1;
}

.nav-toggle-icon {
    position: relative;
    width: 18px;
    height: 2px;
    background: #fff;
    display: inline-block;
}

.nav-toggle-icon::before,
.nav-toggle-icon::after {
    content: '';
    position: absolute;
    left: 0;
    width: 18px;
    height: 2px;
    background: #fff;
}

.nav-toggle-icon::before {
    top: -6px;
}

.nav-toggle-icon::after {
    top: 6px;
}

.nav-menu li {
    flex: 0 0 auto;
    text-align: center;
}

.nav-menu a {
    display: block;
    padding: 12px 16px;
    color: white;
    text-decoration: none;
    font-weight: 600;
    white-space: nowrap;
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
    border-bottom: 0;
    border-radius: 999px;
}

.nav-menu a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--jp-gold);
    box-shadow: inset 0 0 0 1px rgba(215, 164, 75, 0.35);
}

.nav-menu .logout-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 12px;
    font-size: 0.95em;
    font-weight: 700;
    line-height: 1.1;
    border-radius: 8px;
    border: 1px solid #d9a21a;
    background-color: #f0b90b;
    color: #2d2d2d;
    cursor: pointer;
    white-space: nowrap;
    font-family: inherit;
}

.nav-menu .logout-button:hover {
    background-color: #f5c116;
}

.nav-menu .logout-button:focus-visible {
    outline: 2px solid rgba(240, 185, 11, 0.6);
    outline-offset: 2px;
}

.nav-menu a.nav-link-active {
    background-color: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    font-weight: 700;
    box-shadow: inset 0 0 0 1px rgba(201, 79, 61, 0.7), 0 0 0 1px rgba(201, 79, 61, 0.22);
}

.nav-menu a.nav-link-active:hover {
    color: #ffffff;
}

.nav-menu a:focus-visible {
    background-color: #2f2f2f;
    color: #9be9b0;
    outline: none;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.35);
}

.nav-notifications {
    position: relative;
    display: flex;
    align-items: center;
}

.notif-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #1f2937;
    color: #fff;
    border: 1px solid #2f2f2f;
    border-radius: 10px;
    padding: 8px 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}

.notif-trigger:hover {
    background: #2f2f2f;
}

.notif-trigger.nav-link-active {
    border-color: rgba(201, 79, 61, 0.7);
    box-shadow: inset 0 0 0 1px rgba(201, 79, 61, 0.6), 0 0 0 2px rgba(201, 79, 61, 0.25);
}

.notif-trigger:focus-visible {
    outline: 2px solid rgba(76, 175, 80, 0.35);
    outline-offset: 2px;
}

.notif-label {
    font-size: 0.95em;
}

.notif-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: #ef4444;
    color: #fff;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.notif-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    width: 420px;
    max-width: 90vw;
    background: #fff;
    color: #111;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
    display: none;
    z-index: 200;
}

.notif-panel.is-open {
    display: block;
}

.notif-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    flex-wrap: wrap;
}

.notif-panel__heading {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.notif-panel__title {
    font-weight: 700;
    color: #111827;
    white-space: nowrap;
}

.notif-panel__count {
    font-size: 12px;
    color: #6b7280;
    white-space: nowrap;
}

.notif-panel__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.notif-panel__mark-all-form {
    margin: 0;
}

.notif-panel__button {
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    border-radius: 8px;
    color: #3730a3;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    padding: 6px 10px;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
}

.notif-panel__button:hover {
    background: #e0e7ff;
}

.notif-panel__button:focus-visible {
    outline: 2px solid rgba(37, 99, 235, 0.35);
    outline-offset: 1px;
}

.notif-panel__list {
    max-height: 420px;
    overflow: auto;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #f8fafc;
}

.notif-panel__section-divider {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 2px 0 4px;
}

.notif-panel__section-divider::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    border-top: 1px solid #d7deea;
}

.notif-panel__section-label {
    position: relative;
    z-index: 1;
    padding: 0 10px;
    background: #ffffff;
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.notif-empty {
    padding: 12px;
    font-size: 13px;
    color: #6b7280;
}

.notif-panel__footer {
    padding: 10px 12px 12px;
    border-top: 1px solid #e5e7eb;
    background: linear-gradient(180deg, rgba(249, 250, 251, 0.7) 0%, #ffffff 100%);
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

.notif-panel__primary-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    width: 100%;
    border-radius: 10px;
    background: #111827;
    color: #ffffff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.01em;
    box-shadow: 0 8px 18px rgba(17, 24, 39, 0.12);
}

.notif-panel__primary-link:hover {
    background: #1f2937;
}

.notif-panel__primary-link:focus-visible {
    outline: 2px solid rgba(37, 99, 235, 0.35);
    outline-offset: 2px;
}

.notif-item {
    border: 1px solid #d6dde8;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, background-color 0.16s ease, opacity 0.16s ease;
}

.notif-item.is-read {
    border-color: #d6dde8;
    background: #ffffff;
    opacity: 0.92;
}

.notif-item.is-unread {
    border-color: #b9cbe3;
    border-left: 4px solid #5f84b8;
    background: #f8fbff;
    box-shadow: 0 4px 12px rgba(71, 85, 105, 0.08);
}

.notif-item__link {
    display: block;
    width: 100%;
    text-align: left;
    background: transparent;
    border: 0;
    padding: 14px 16px;
    cursor: pointer;
    font-family: inherit;
}

.notif-item:hover,
.notif-item:focus-within {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.notif-item.is-read:hover,
.notif-item.is-read:focus-within {
    opacity: 0.95;
    border-color: #bfc7d4;
    background: #ffffff;
}

.notif-item__eyebrow {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.notif-item__unread-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    background: #e7eef8;
    color: #355070;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.notif-item__title {
    font-weight: 600;
    color: #111827;
    font-size: 15px;
    line-height: 1.3;
    margin-bottom: 8px;
}

.notif-item.is-read .notif-item__title {
    color: #1f2937;
}

.notif-item.is-unread .notif-item__title {
    font-weight: 800;
    color: #0f172a;
}

.notif-item__summary {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.35;
    margin-bottom: 6px;
}

.notif-item.is-unread .notif-item__summary {
    color: #0f172a;
}

.notif-item__detail {
    font-size: 13px;
    color: #4b5563;
    line-height: 1.4;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notif-item.is-read .notif-item__summary,
.notif-item.is-read .notif-item__detail,
.notif-item.is-read .notif-item__meta {
    color: #6b7280;
}

.notif-item__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.notif-item__badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 999px;
    border: 1px solid #d1d5db;
    background: #f9fafb;
    color: #374151;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
}

.notif-item__meta {
    font-size: 12px;
    color: #6b7280;
}

.notif-item.is-unread .notif-item__meta {
    color: #52637a;
    font-weight: 700;
}

.notif-item.is-unread:hover,
.notif-item.is-unread:focus-within {
    border-color: #9fb7d7;
    border-left-color: #4c74ad;
    background: #f2f7fd;
    box-shadow: 0 10px 20px rgba(71, 85, 105, 0.1);
}

.notif-item__link:focus-visible {
    outline: 2px solid rgba(37, 99, 235, 0.35);
    outline-offset: -1px;
    border-radius: 10px;
}

@media (min-width: 901px) {
    .nav-inner {
        align-items: center;
        padding: 0 20px;
    }

    .nav-menu {
        justify-content: flex-start;
        gap: 6px 14px;
        padding: 6px 0;
    }

    .nav-menu a {
        padding: 10px 12px;
        font-size: 0.95em;
    }

    .nav-cart {
        align-self: center;
        margin-left: 0;
    }

    .nav-cart a {
        padding: 8px 14px;
        border-radius: 10px;
        box-shadow: none;
    }
}

.notification-center {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.notification-card {
    padding: 14px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.notification-card.is-unread {
    border-color: #c7d2fe;
    background: #f8faff;
}

.notification-card__header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
}

.notification-card__title {
    font-weight: 700;
    color: #111827;
}

.notification-card__meta {
    font-size: 12px;
    color: #6b7280;
    margin-top: 2px;
}

.notification-card__body {
    margin-top: 8px;
    color: #374151;
    white-space: pre-line;
}

.notification-card__details {
    margin-top: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #f9fafb;
    padding: 10px;
}

.notification-card__details-title {
    color: #4b5563;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 8px;
}

.notification-card__details-summary {
    color: #111827;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
}

.notification-card__details-context {
    color: #4b5563;
    font-size: 12px;
    margin-bottom: 8px;
}

.notification-card__table-wrap {
    overflow-x: auto;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #ffffff;
}

.notification-card__table {
    width: 100%;
    min-width: 540px;
    border-collapse: collapse;
    font-size: 12px;
}

.notification-card__table th,
.notification-card__table td {
    padding: 8px;
    border-top: 1px solid #e5e7eb;
    vertical-align: top;
}

.notification-card__table thead th {
    border-top: 0;
    background: #f3f4f6;
    color: #4b5563;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    text-align: left;
}

.notification-card__table td {
    color: #374151;
}

.notification-card__table .is-center {
    text-align: center;
}

.notification-card__table .is-right {
    text-align: right;
    white-space: nowrap;
}

.notification-card__table .is-strong {
    color: #111827;
    font-weight: 700;
}

.notification-card__table .is-muted {
    color: #6b7280;
}

.notification-card__actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.notification-card__button {
    background: #111827;
    color: #fff;
    border: 0;
    border-radius: 8px;
    padding: 6px 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 12px;
}

.notification-card__status {
    font-size: 12px;
    color: #6b7280;
    font-weight: 600;
}

@media (max-width: 900px) {
    .nav-notifications {
        width: 100%;
    }

    .notif-trigger {
        width: 100%;
        justify-content: space-between;
    }

    .notif-panel {
        position: static;
        width: 100%;
        max-width: none;
        margin-top: 8px;
        box-shadow: none;
    }
}

@media (max-width: 900px) {
    .header {
        padding: 8px 0;
    }

    .nav-inner {
        flex-wrap: wrap;
        justify-content: space-between;
        padding: 10px 16px;
        gap: 10px;
    }

    .nav-toggle {
        display: inline-flex;
        margin: 0;
    }

    .logo img {
        width: 56px;
        height: 56px;
    }

    .header-content h1 {
        font-size: 1.6em;
        margin-bottom: 0;
    }

    .header-container {
        display: grid;
        grid-template-columns: 56px 1fr auto;
        grid-template-areas:
            "logo title logout"
            "search search search";
        column-gap: 12px;
        row-gap: 6px;
        justify-items: start;
        align-items: center;
        text-align: left;
        gap: unset;
    }

    .logo {
        grid-area: logo;
    }

    .header-content {
        grid-area: title;
        text-align: left;
        padding-left: 4px;
    }

    .header-title-row {
        justify-content: flex-start;
        margin-bottom: 8px;
    }

    .tagline {
        margin-top: 0;
    }

    .nav-cart {
        order: 2;
        margin-left: auto;
    }

    .nav-cart a {
        padding: 10px 16px;
        border-radius: 999px;
        font-weight: 700;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
    }

    .nav-menu {
        order: 3;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
        width: 100%;
        max-width: none;
        padding: 10px 0 8px;
        border-top: 1px solid #2d2d2d;
    }

    .nav-menu li {
        width: 100%;
    }

    .nav-menu a {
        text-align: left;
        padding: 12px 14px;
        border-bottom: 0;
    }

    .nav-menu a:hover {
        border-bottom-color: transparent;
    }

    .header-search {
        grid-area: search;
        width: 100%;
        max-width: none;
        margin-top: 0;
        margin-left: 0;
        margin-right: 0;
    }

    .header-search-input {
        padding: 6px 10px;
        font-size: 0.85rem;
    }

    .header-search-button {
        padding: 6px 10px;
        font-size: 0.85rem;
    }

    .header-logout {
        grid-area: logout;
        width: auto;
        margin-top: 0;
        margin-left: 0;
        margin-bottom: 0;
        justify-self: end;
    }

    .header-logout-button {
        width: auto;
        padding: 6px 10px;
        font-size: 0.85rem;
    }

    .nav-menu .logout-button {
        width: 100%;
        justify-content: flex-start;
        padding: 12px 14px;
    }

    .nav-open .nav-menu {
        display: flex;
    }

    .nav-right {
        width: 100%;
        align-items: stretch;
        order: 4;
    }

    .auth-link-logout {
        display: none;
    }

    .nav-right .notif-trigger {
        width: 100%;
        justify-content: space-between;
    }

    .nav-right .nav-cart {
        width: 100%;
        margin-left: 0;
    }

    .nav-right .nav-cart a {
        width: 100%;
        text-align: left;
    }
}

@media (max-width: 520px) {
    .header-container {
        column-gap: 12px;
    }

    .header-content h1 {
        line-height: 1.1;
    }

    .tagline {
        display: none;
    }

    .header-search,
    .header-logout {
        margin-top: 2px;
    }

    .header-search-input,
    .header-search-button,
    .header-logout-button {
        padding: 6px 8px;
        font-size: 0.82rem;
    }
}

/* Main Content */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Search Page */
.search-container {
    text-align: center;
}

.search-container h2 {
    font-size: 2em;
    margin-bottom: 10px;
    color: #1a1a1a;
}

.search-container p {
    font-size: 1.1em;
    color: #666;
    margin-bottom: 30px;
}

.search-container > div[style*="justify-content:space-between"] {
    display: grid !important;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 20px;
    width: 100%;
    text-align: center;
}

.search-container > div[style*="justify-content:space-between"] > div:only-child {
    grid-column: 2;
    justify-self: center;
    text-align: center;
}

.search-container > div[style*="justify-content:space-between"] > div:first-child:not(:only-child) {
    grid-column: 2;
    text-align: center;
}

.search-container > div[style*="justify-content:space-between"] > div:last-child:not(:only-child) {
    grid-column: 3;
    justify-self: end;
}

/* Users page header + filters */
.users-page.search-container {
    text-align: left;
}

.users-page.search-container h2 {
    font-size: 1.9em;
    margin-bottom: 6px;
}

.users-page.search-container p {
    margin-bottom: 16px;
    color: #64748b;
}

.users-hero {
    padding: 20px 24px;
    display: grid;
    gap: 16px;
    margin-bottom: 18px;
}

.users-hero__main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.users-hero__badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.users-hero__copy {
    min-width: 0;
}

.users-hero__spotlight {
    width: min(100%, 360px);
    gap: 4px;
    padding: 12px 14px;
    align-self: flex-start;
}

.users-hero__spotlight .documents-hero__spotlight-label {
    font-size: 11px;
}

.users-hero__spotlight .documents-hero__spotlight-value {
    font-size: clamp(1.2rem, 2vw, 1.5rem);
}

.users-hero__spotlight p {
    font-size: 0.95rem;
    line-height: 1.45;
    margin-bottom: 0;
}

.users-hero__spotlight .public-inline-button {
    min-height: 42px;
    padding: 0 18px;
}

.users-hero__stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
}

.users-filters,
.filters-card {
    margin-top: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    align-items: start;
    justify-content: start;
    justify-items: stretch;
    width: 100%;
    text-align: left;
    padding: 18px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.users-filters--panel {
    grid-template-columns: 1fr;
    gap: 16px;
}

.users-filters__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.users-filters__header h3 {
    margin: 0 0 4px 0;
}

.users-filters__header p {
    margin: 0;
    color: #6b7280;
    font-size: 0.9em;
}

.users-filters__summary {
    display: grid;
    gap: 4px;
    font-size: 12px;
    color: #6b7280;
    text-align: right;
}

.users-filters__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.users-filters .form-group,
.filters-card .form-group {
    gap: 6px;
}

.users-filters .form-group label,
.filters-card .form-group label {
    font-size: 0.72em;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b;
}

.users-filters .form-group input,
.users-filters .form-group select,
.filters-card .form-group input,
.filters-card .form-group select {
    border: 1px solid #d5dbe3;
    background-color: #fff;
    width: 100%;
}

.users-filters .form-group .filter-field-active,
.filters-card .form-group .filter-field-active {
    border-color: #1b7bc8;
    background-color: #eaf4ff;
    color: #0b4a78;
    font-weight: 600;
    box-shadow: 0 0 0 2px rgba(27, 123, 200, 0.14);
}

.users-filters .form-group .filter-field-active:focus,
.filters-card .form-group .filter-field-active:focus {
    border-color: #1b7bc8;
    box-shadow: 0 0 0 3px rgba(27, 123, 200, 0.22);
}

.catalog-search .catalog-filter-group .filter-field-active {
    border-color: #1b7bc8;
    background-color: #eaf4ff;
    color: #0b4a78;
    font-weight: 600;
    box-shadow: 0 0 0 2px rgba(27, 123, 200, 0.14);
}

.catalog-search .catalog-filter-group .filter-field-active:focus {
    border-color: #1b7bc8;
    box-shadow: 0 0 0 3px rgba(27, 123, 200, 0.22);
}

.users-filters__actions,
.filters-actions {
    grid-column: 1 / -1;
    align-self: end;
    justify-self: end;
}

.users-filters__actions-row,
.filters-actions-row {
    display: flex;
    gap: 8px;
    width: auto;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.users-filters__actions-row .search-button,
.filters-actions-row .search-button {
    min-width: 140px;
}

.search-form {
    margin: 40px 0;
}

.search-input-row,
.offcatalog-header-row {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
    max-width: 960px;
    margin: 0 auto 12px;
}

.search-input-row .search-input.large {
    flex: 1 1 auto;
    min-width: 280px;
    width: 100%;
    padding: 14px 16px;
    font-size: 16px;
    border-radius: 10px;
    border: 1px solid #ccc;
}

.offcatalog-header-row {
    align-items: center;
    justify-content: space-between;
    max-width: 100%;
    margin-bottom: 0;
    gap: 18px 24px;
}

.offcatalog-header-copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-width: 640px;
    text-align: left;
}

.offcatalog-header-title {
    margin: 0;
    color: #2f2a25;
    font-size: 1.2rem;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.offcatalog-header-title[data-offcatalog-trigger] {
    cursor: pointer;
    border-radius: 8px;
}

.offcatalog-header-title[data-offcatalog-trigger]:focus-visible {
    outline: 3px solid rgba(97, 115, 143, 0.28);
    outline-offset: 4px;
}

.offcatalog-header-text {
    margin: 0;
    font-size: 0.96rem;
    line-height: 1.45;
    color: #667085;
}

.search-button.offcatalog-toggle-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 190px;
    min-height: 46px;
    padding: 0 20px;
    background: #fffdfb;
    color: #3f352d;
    border: 1px solid #d8cec4;
    border-radius: 999px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    font-size: 0.98rem;
    font-weight: 650;
}

.offcatalog-toggle-button__label {
    white-space: nowrap;
}

.offcatalog-toggle-button__chevron {
    width: 9px;
    height: 9px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
    transition: transform 0.18s ease;
}

.search-button.offcatalog-toggle-button[aria-expanded="true"] .offcatalog-toggle-button__chevron {
    transform: translateY(2px) rotate(-135deg);
}

.search-button.offcatalog-toggle-button:hover {
    background: #f7f0e8;
    color: #2f2a25;
}

.search-input-row__submit,
.search-input-row__reset {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 24px;
    height: 52px;
    width: auto;
    font-size: 16px;
    border-radius: 10px;
    margin: 0;
    white-space: nowrap;
}

.search-input-row__submit {
    min-width: 140px;
}

.search-input-row__reset {
    min-width: 120px;
    text-decoration: none;
}

.search-results.search-disclaimer {
    margin: 10px auto 0;
    max-width: 960px;
    padding: 10px 12px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
}

.search-results.search-disclaimer p {
    margin: 0;
    font-size: 13px;
}

.search-results.search-panel {
    position: relative;
    overflow: hidden;
    margin-top: 16px;
    padding: 16px;
}

.search-results.search-panel--themed {
    --panel-accent: #94a3b8;
    --panel-accent-soft: rgba(148, 163, 184, 0.12);
    --panel-accent-faint: rgba(148, 163, 184, 0.05);
    background:
        linear-gradient(90deg, var(--panel-accent-faint) 0%, rgba(255, 255, 255, 0) 46%),
        var(--jp-paper-2);
}

.search-results.search-panel--themed::before {
    content: "";
    position: absolute;
    top: 14px;
    bottom: 14px;
    left: 0;
    width: 4px;
    border-radius: 0 999px 999px 0;
    background: var(--panel-accent);
    opacity: 0.72;
}

.search-results.search-panel--compact {
    padding: 12px;
}

.search-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    text-align: left;
}

.search-results .search-panel__title,
.search-results .search-panel__empty,
.search-results .search-panel__hint {
    margin: 0;
}

.search-results .search-panel__title {
    display: inline-flex;
    align-items: center;
    gap: 9px;
}

.search-results.search-panel--themed .search-panel__title::before {
    content: "";
    width: 26px;
    height: 26px;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--panel-accent) 34%, #ffffff);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.54)),
        var(--panel-accent-soft);
    color: var(--panel-accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 26px;
    font-size: 14px;
    line-height: 1;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.search-results.search-panel--estimate {
    --panel-accent: #7c6f64;
    --panel-accent-soft: rgba(124, 111, 100, 0.13);
    --panel-accent-faint: rgba(124, 111, 100, 0.055);
}

.search-results.search-panel--estimate .search-panel__title::before {
    content: "$";
    font-size: 13px;
    font-weight: 800;
}

.search-results.search-panel--manual {
    --panel-accent: #61738f;
    --panel-accent-soft: rgba(97, 115, 143, 0.13);
    --panel-accent-faint: rgba(97, 115, 143, 0.055);
}

.search-results.search-panel--manual .search-panel__title::before {
    content: "+";
    font-size: 18px;
    font-weight: 500;
}

.search-results.search-panel--preorder-matches,
.search-results.search-panel--latest-preorders {
    --panel-accent: #b7791f;
    --panel-accent-soft: rgba(183, 121, 31, 0.13);
    --panel-accent-faint: rgba(183, 121, 31, 0.055);
}

.search-results.search-panel--preorder-matches .search-panel__title::before,
.search-results.search-panel--latest-preorders .search-panel__title::before {
    content: "◷";
    font-size: 15px;
}

.search-results.search-panel--subscriptions {
    --panel-accent: #25806f;
    --panel-accent-soft: rgba(37, 128, 111, 0.12);
    --panel-accent-faint: rgba(37, 128, 111, 0.05);
}

.search-results.search-panel--subscriptions .search-panel__title::before {
    content: "↻";
    font-size: 15px;
}

.search-results.search-panel--favorites {
    --panel-accent: #b75d7a;
    --panel-accent-soft: rgba(183, 93, 122, 0.12);
    --panel-accent-faint: rgba(183, 93, 122, 0.05);
}

.search-results.search-panel--favorites .search-panel__title::before {
    content: "★";
    font-size: 12px;
}

.search-results.search-panel--recently-viewed {
    --panel-accent: #667085;
    --panel-accent-soft: rgba(102, 112, 133, 0.12);
    --panel-accent-faint: rgba(102, 112, 133, 0.05);
}

.search-results.search-panel--recently-viewed .search-panel__title::before {
    content: "◉";
    font-size: 11px;
}

.search-results.search-panel--most-ordered {
    --panel-accent: #4f7f45;
    --panel-accent-soft: rgba(79, 127, 69, 0.12);
    --panel-accent-faint: rgba(79, 127, 69, 0.05);
}

.search-results.search-panel--most-ordered .search-panel__title::before {
    content: "#";
    font-size: 13px;
    font-weight: 800;
}

.search-panel__meta {
    font-size: 12px;
    color: #64748b;
}

.search-panel__actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.search-panel__button-small {
    width: auto;
    padding: 6px 12px;
    font-size: 12px;
}

.search-panel__empty--hidden {
    display: none;
}

.search-panel__form {
    display: flex;
    align-items: center;
    column-gap: 14px;
    row-gap: 10px;
    flex-wrap: wrap;
}

.search-panel__label {
    font-size: 12px;
    color: #64748b;
}

.search-panel__label--inline {
    flex: 0 0 auto;
}

.search-panel__choice-group {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.search-panel__choice-list {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.search-panel__choice {
    position: relative;
    cursor: pointer;
}

.search-panel__choice-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.search-panel__choice-text {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 14px;
    border: 1px solid #c7d2e1;
    border-radius: 999px;
    background: #ffffff;
    color: #3f4f67;
    font-size: 13px;
    font-weight: 500;
    transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.search-panel__choice:hover .search-panel__choice-text {
    border-color: #aebbcf;
    background: #f4f7fb;
}

.search-panel__choice-input:focus-visible + .search-panel__choice-text {
    outline: none;
    box-shadow: 0 0 0 3px rgba(100, 116, 139, 0.16);
}

.search-panel__choice-input:checked + .search-panel__choice-text {
    border-color: #ccb9a6;
    background: #e9dccf;
    color: #4b3a2d;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75), 0 4px 10px rgba(92, 70, 48, 0.08);
}

.search-panel__select {
    padding: 6px 10px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 12px;
}

.search-panel__scope {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 14px;
    padding-left: 18px;
    border-left: 1px solid #d7dee9;
    font-size: 13px;
    color: #64748b;
}

.search-panel__scope-option {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

@media (max-width: 960px) {
    .search-panel__scope {
        margin-left: 0;
        padding-left: 0;
        border-left: 0;
    }
}

.search-panel__hint {
    color: #555;
}

.search-button--auto {
    width: auto;
}

.form.offcatalog-form--hidden {
    display: none;
    margin-top: 12px;
}

.offcatalog-form {
    display: block;
    width: 100%;
    margin-top: 18px;
}

.offcatalog-card {
    padding: 22px 24px;
    border: 1px solid #e7ddd2;
    border-radius: 20px;
    background: linear-gradient(180deg, #fffdfa 0%, #fbf6f0 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.offcatalog-card__details {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.offcatalog-card__intro {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.offcatalog-card__title {
    margin: 0;
    font-size: 1.45rem;
    font-weight: 700;
    color: #2f2a25;
}

.offcatalog-card__badge {
    white-space: nowrap;
}

.offcatalog-form__details-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.offcatalog-card__side {
    flex-basis: 340px;
}

.offcatalog-form__field {
    min-width: 0;
}

.offcatalog-form .form-group {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 6px;
}

.offcatalog-form .form-group label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #667085;
    text-align: left;
}

.offcatalog-form .form-group input {
    min-height: 52px;
    padding: 14px 16px;
    border: 1px solid #d9d2ca;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.03);
}

.offcatalog-form__field--title input {
    font-size: 1.12rem;
    font-weight: 600;
}

.offcatalog-form .form-group input:focus {
    outline: none;
    border-color: #b89f84;
    box-shadow: 0 0 0 3px rgba(184, 159, 132, 0.12);
}

.offcatalog-purchase-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.offcatalog-price-block {
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e9eef5;
}

.offcatalog-form__actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding-top: 2px;
}

.offcatalog-submit-button {
    width: 100%;
    min-width: 0;
    border-radius: 12px;
}

.form-input-readonly {
    background: #f3f3f3;
    color: #777;
    cursor: not-allowed;
}

.offcatalog-message {
    display: none;
    margin-left: 0;
    text-align: left;
    color: #4CAF50;
    font-weight: bold;
}

.form-group {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.search-input {
    padding: 12px 20px;
    font-size: 1em;
    border: 2px solid #ddd;
    border-radius: 5px;
    width: 300px;
    transition: border-color 0.3s ease;
}

.search-input.large {
    width: 600px;
    padding: 18px 25px;
    font-size: 1.1em;
}

.search-input:focus {
    outline: none;
    border-color: #4CAF50;
}

.date-input {
    color: #6c757d;
}
.date-input.has-value {
    color: #333;
}
.date-input::-webkit-datetime-edit {
    color: inherit;
}

.search-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 30px;
    font-size: 1em;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    text-decoration: none;
    line-height: 1.2;
    transition: background-color 0.3s ease;
}

.search-button:hover {
    background-color: #45a049;
    text-decoration: none;
}
.search-button.secondary {
    background-color: #f1f3f5;
    color: #333;
    border: 1px solid #c4c9ce;
}
.search-button.secondary:hover {
    background-color: #e2e8f0;
}
.search-button--compact {
    min-height: 34px;
    padding: 8px 12px;
    font-size: 0.86rem;
}
.search-button.info {
    background-color: #e7f1ff;
    color: #084298;
    border: 1px solid #b6d4fe;
}
.search-button.info:hover {
    background-color: #dbeafe;
}
.search-button.danger {
    background-color: #fdecea;
    color: #8a1c1c;
    border: 1px solid #f5c2c7;
}
.search-button.danger:hover {
    background-color: #fbdede;
}
.search-button:disabled,
.search-button[disabled] {
    opacity: 0.55;
    cursor: not-allowed;
    box-shadow: none;
}
.search-button:disabled:hover,
.search-button[disabled]:hover {
    background-color: inherit;
}

.ref-search-cell {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.ref-search-value {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
    line-height: 1.1;
}

.ref-search-link,
.oi-reference-search {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    margin-top: 2px;
    padding: 4px 11px;
    border-radius: 999px;
    border: 1px solid #b7cce6;
    background: linear-gradient(180deg, #f5faff 0%, #edf4fc 100%);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    color: #0c4a8a;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.ref-search-link:hover,
.oi-reference-search:hover {
    background: linear-gradient(180deg, #e8f3ff 0%, #dcecff 100%);
    border-color: #7fa6d2;
    color: #0a3767;
    text-decoration: none;
    transform: translateY(-1px);
}

.ref-search-link:active,
.oi-reference-search:active {
    transform: translateY(0);
}

.ref-search-link:focus-visible,
.oi-reference-search:focus-visible {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.28);
}

.line-item-summary {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.line-item-summary__title {
    font-weight: 600;
    color: #18212f;
    line-height: 1.35;
}

.line-item-summary__meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.line-item-summary__label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
}

.line-item-summary__meta .ref-search-cell {
    align-items: flex-start;
}

.search-results {
    margin-top: 40px;
    padding: 20px;
    background-color: var(--jp-paper-2);
    border-radius: 12px;
    border: 1px solid var(--jp-border);
    box-shadow: var(--jp-shadow);
}

.text-panel {
    background-color: #ffffff;
    border: 1px solid #e8e1d8;
    border-radius: 12px;
    box-shadow: 0 10px 22px rgba(28, 27, 26, 0.08);
}

.shipment-table-panel {
    margin-top: 16px;
    padding: 12px;
}

.shipment-table-title {
    margin: 0 0 10px 0;
    text-align: center;
    letter-spacing: 0.01em;
}

.shipment-table-empty {
    margin: 0;
    color: #5b6472;
}

.search-results .shipment-table-empty {
    margin: 0;
}

.shipment-table-wrap {
    overflow-x: auto;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.shipment-table-wrap--compact {
    width: fit-content;
    max-width: 100%;
    margin: 0 auto;
}

.shipment-table-wrap--cartons {
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    border-color: #e2e8f0;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.shipment-table {
    width: 100%;
    min-width: 620px;
    border-collapse: separate;
    border-spacing: 0;
    text-align: left;
}

.shipment-table--wide {
    min-width: 980px;
}

.shipment-table--compact {
    width: auto;
    min-width: 420px;
    table-layout: auto;
}

.shipment-table--cartons {
    width: 100%;
    min-width: 0;
}

.shipment-table--cartons th,
.shipment-table--cartons td {
    padding: 10px 12px;
}

.shipment-table--fedex th,
.shipment-table--fedex td {
    font-size: 12px;
}

.shipment-table--fedex th:first-child,
.shipment-table--fedex td:first-child {
    width: 260px;
    max-width: 260px;
}

.shipment-table--fedex td:first-child {
    overflow-wrap: anywhere;
}

.shipment-table--compact th:first-child,
.shipment-table--compact td:first-child {
    min-width: 220px;
}

.shipment-table--compact th:last-child,
.shipment-table--compact td:last-child {
    width: 180px;
}

.shipment-table th,
.shipment-table td {
    padding: 10px 12px;
    border-right: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: top;
}

.shipment-table th:last-child,
.shipment-table td:last-child {
    border-right: none;
}

.shipment-table tbody tr:last-child td {
    border-bottom: none;
}

.shipment-table th {
    font-size: 13px;
    font-weight: 600;
    color: #3b4a5a;
    background: #f8fafc;
    white-space: nowrap;
}

.shipment-table thead th {
    background: #efe4d6;
    color: #3b3a35;
}

.shipment-table tbody td {
    border-top: 1px solid #eadfce;
}

.shipment-table tbody tr:nth-child(even) {
    background: #fbfcfe;
}

.shipment-table tbody tr:hover,
.shipment-table tbody tr:nth-child(even):hover {
    background: #f1f5f9;
}

.shipment-table .is-numeric {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.shipment-table .is-center {
    text-align: center;
}

.shipment-table td .pf-copy-btn,
.shipment-table td .ci-copy-btn {
    margin-left: 8px;
    border: 1px solid #c6d6e8;
    background: #f0f6fd;
    color: #214f7f;
    border-radius: 7px;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.25;
}

.shipment-table td .pf-copy-btn:hover,
.shipment-table td .ci-copy-btn:hover {
    background: #e4effc;
}

@media (max-width: 768px) {
    .shipment-table-panel {
        padding: 10px;
    }

    .shipment-table-title {
        text-align: left;
        margin-bottom: 8px;
    }

    .shipment-table th,
    .shipment-table td {
        padding: 8px 9px;
        font-size: 12px;
    }

    .shipment-table--wide {
        min-width: 900px;
    }

    .shipment-table--compact {
        min-width: 360px;
    }

    .shipment-table-wrap--cartons {
        max-width: 100%;
    }
}

.profile-page {
    display: grid;
    gap: 20px;
}

.profile-hero {
    padding: 20px 24px;
    display: grid;
    gap: 18px;
}

.profile-hero__main {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.profile-hero__main h2 {
    margin: 0 0 6px 0;
}

.profile-hero__main p {
    margin: 0 0 10px 0;
    color: var(--jp-muted);
}

.profile-avatar {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    background: linear-gradient(140deg, #2b354a 0%, #4b5366 100%);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    box-shadow: 0 10px 18px rgba(31, 42, 68, 0.25);
}

.profile-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.profile-badge {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid #d8d2c8;
    background: #f6f1ea;
    color: #2a2a2a;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.profile-hero__stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
}

.profile-stat {
    background: #fbf9f5;
    border: 1px solid #eee4d9;
    border-radius: 12px;
    padding: 12px;
    display: grid;
    gap: 6px;
}

.profile-stat__label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #7b7f88;
}

.profile-stat__value {
    font-size: 18px;
    font-weight: 600;
    color: var(--jp-ink);
}

.profile-stat__meta {
    font-size: 12px;
    color: #6b7280;
}

.profile-hero__actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.profile-link-button {
    width: auto;
    text-decoration: none;
}

.profile-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.profile-section {
    padding: 18px;
}

.profile-section__header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 12px;
}

.profile-section__header h3 {
    margin: 0;
}

.profile-section__header > div {
    display: grid;
    gap: 4px;
}

.profile-section__hint {
    font-size: 12px;
    color: #7b7f88;
}

.profile-section--wide {
    grid-column: 1 / -1;
}

.profile-fields {
    display: grid;
    gap: 8px;
}

.profile-field {
    display: grid;
    grid-template-columns: minmax(120px, 1fr) minmax(0, 2fr) auto;
    gap: 12px;
    align-items: center;
    padding-bottom: 8px;
    border-bottom: 1px dashed #ece5da;
}

.profile-field:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.profile-field__label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #7b7f88;
    font-weight: 600;
}

.profile-field__value {
    font-weight: 600;
    color: #2b2b2b;
    word-break: break-word;
}

.profile-field__value.is-empty {
    color: #9aa0a6;
    font-weight: 500;
}

.profile-field--form .profile-field__value {
    grid-column: 2 / -1;
}

.profile-inline-form {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.profile-inline-form select {
    min-width: 180px;
    padding: 8px 10px;
    border: 1px solid #d9cfc3;
    border-radius: 10px;
    background: #fff;
    font-size: 14px;
}

.profile-inline-form .search-button {
    width: auto;
}

.profile-inline-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.profile-copy {
    border: 1px solid #d6d2ca;
    background: #f6f3ee;
    color: #2e2e2e;
    border-radius: 999px;
    font-size: 12px;
    padding: 4px 10px;
    cursor: pointer;
}

.profile-copy:hover {
    background: #efe9e1;
}

.profile-address-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.profile-address {
    background: #fbfaf7;
    border: 1px solid #ede3d7;
    border-radius: 12px;
    padding: 12px;
}

.profile-address__label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #7b7f88;
    margin-bottom: 8px;
    display: block;
}

.profile-address__value p {
    margin: 0 0 4px 0;
}

.profile-security .form-group {
    margin-bottom: 16px;
}

.profile-password {
    display: flex;
    gap: 8px;
    align-items: center;
}

.profile-toggle {
    border: 1px solid #d6d2ca;
    background: #f6f3ee;
    color: #2e2e2e;
    border-radius: 10px;
    font-size: 12px;
    padding: 6px 10px;
    cursor: pointer;
    flex: 0 0 auto;
}

.profile-toggle:hover {
    background: #efe9e1;
}

.profile-orders-board {
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.9fr);
}

.profile-orders-chart {
    background: linear-gradient(180deg, #fcfaf6 0%, #f6efe5 100%);
    border: 1px solid #eadfce;
    border-radius: 16px;
    padding: 16px;
}

.profile-orders-chart__summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.profile-orders-chart__metric {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid #ede0d0;
    border-radius: 12px;
    padding: 12px;
    display: grid;
    gap: 4px;
}

.profile-orders-chart__label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #7b7f88;
}

.profile-orders-chart__metric strong {
    font-size: 22px;
    color: var(--jp-ink);
}

.profile-orders-chart__bars {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
    gap: 12px;
    align-items: end;
}

.profile-chart-item {
    display: grid;
    gap: 8px;
}

.profile-chart-item--link {
    text-decoration: none;
}

.profile-chart-item__amount {
    font-size: 12px;
    color: #5d6470;
    font-weight: 600;
}

.profile-chart-item__bar-wrap {
    min-height: 140px;
    display: flex;
    align-items: flex-end;
}

.profile-chart-item__bar {
    width: 100%;
    border-radius: 14px 14px 6px 6px;
    background: linear-gradient(180deg, #8b5e3c 0%, #3f4f68 100%);
    box-shadow: 0 10px 20px rgba(47, 60, 80, 0.18);
}

.profile-chart-item__label {
    font-size: 12px;
    font-weight: 700;
    color: #2f3640;
    word-break: break-word;
}

.profile-chart-item__meta {
    font-size: 11px;
    color: #7b7f88;
}

.profile-chart-item--link:hover .profile-chart-item__bar,
.profile-chart-item--link:focus-visible .profile-chart-item__bar {
    filter: brightness(1.05);
    transform: translateY(-2px);
}

.profile-chart-item--link:focus-visible {
    outline: 2px solid #32465f;
    outline-offset: 4px;
    border-radius: 10px;
}

.profile-orders-feed {
    display: grid;
    gap: 12px;
}

.profile-orders-feed h4 {
    margin: 0;
}

.profile-order-list {
    display: grid;
    gap: 10px;
}

.profile-order-row {
    background: #fbfaf7;
    border: 1px solid #ece2d5;
    border-radius: 14px;
    padding: 14px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
}

.profile-order-row--link {
    text-decoration: none;
    color: inherit;
    transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.profile-order-row--link:hover,
.profile-order-row--link:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 12px 20px rgba(47, 60, 80, 0.08);
    border-color: #d7c8b6;
}

.profile-order-row--link:focus-visible {
    outline: 2px solid #32465f;
    outline-offset: 2px;
}

.profile-order-row__main {
    display: grid;
    gap: 6px;
}

.profile-order-row__top {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.profile-order-row__top h5 {
    margin: 0;
    font-size: 15px;
}

.profile-order-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: #eef3f8;
    border: 1px solid #d3ddea;
    color: #32465f;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.profile-order-row__meta,
.profile-order-row__stats {
    margin: 0;
    color: #66707d;
    font-size: 13px;
}

.profile-order-row__aside {
    display: grid;
    gap: 8px;
    justify-items: end;
}

.profile-order-row__aside strong {
    color: var(--jp-ink);
    font-size: 18px;
}

.profile-order-row__link {
    color: #32465f;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.profile-order-row__link:hover {
    text-decoration: underline;
}

.profile-empty-state {
    margin: 0;
    color: #666;
}

.profile-orders .order-card {
    background: #fbfaf7;
}

.profile-alert {
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 13px;
    margin-bottom: 12px;
}

.profile-alert--success {
    background: #eef7f0;
    border: 1px solid #cfe7d5;
    color: #1b5e3a;
}

.profile-alert--error {
    background: #fdf1ed;
    border: 1px solid #f1c6ba;
    color: #8b2f23;
}

@media (max-width: 900px) {
    .profile-orders-board {
        grid-template-columns: 1fr;
    }

    .profile-orders-chart__summary {
        grid-template-columns: 1fr;
    }

    .profile-field {
        grid-template-columns: 1fr;
        align-items: flex-start;
    }

    .profile-field--form .profile-field__value {
        grid-column: auto;
    }

    .profile-copy {
        justify-self: flex-start;
    }

    .profile-order-row {
        grid-template-columns: 1fr;
    }

    .profile-order-row__aside {
        justify-items: flex-start;
    }
}

@media (min-width: 1100px) {
    .profile-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .profile-security .form-group {
        display: grid;
        grid-template-columns: minmax(180px, 220px) 1fr;
        align-items: center;
        gap: 16px;
    }

    .profile-security .form-group label {
        margin-bottom: 0;
        text-align: left;
    }
}


.page-banner {
    margin-top: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.page-banner__meta {
    font-size: 12px;
    color: #555;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.page-banner__actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}
.page-banner__actions .search-button {
    width: auto;
    text-decoration: none;
}
.page-banner__note {
    font-size: 12px;
    color: #b42318;
}

.order-view-title-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.order-view-title {
    text-align: center;
    margin: 0;
}

.search-results p {
    margin: 10px 0;
    text-align: left;
}

    .search-results.success {
        border-color: #d9e0ea;
        background: linear-gradient(180deg, #f8fafc 0%, #f4f6fb 100%);
        box-shadow: 0 20px 44px rgba(15, 23, 42, 0.08);
    }

    .search-results.success h3 {
        color: var(--jp-ink);
        margin-bottom: 15px;
    }

    .search-results.error {
        border-color: #e9bdb2;
        background-color: #fdf4f1;
    }

    .search-results.error p {
        color: #8f2f24;
    }

    .llm-enrich.is-loading {
        background: #eef5ff !important;
        border-color: #80a8ff !important;
        box-shadow: 0 0 0 3px rgba(44, 75, 255, 0.12);
    }

    .llm-enrich-btn.is-loading {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        opacity: 0.9;
        cursor: wait !important;
    }

    .llm-enrich-btn.is-loading::before {
        content: "";
        width: 16px;
        height: 16px;
        border: 2px solid rgba(255, 255, 255, 0.55);
        border-top-color: #ffffff;
        border-radius: 50%;
        flex: 0 0 auto;
        animation: llm-enrich-spin 0.8s linear infinite;
    }

    .llm-enrich-output {
        color: #2343b8;
        font-weight: 600;
    }

    .llm-enrich.is-loading .llm-enrich-output {
        display: flex !important;
        align-items: center;
        gap: 10px;
        min-height: 30px;
        padding: 8px 10px;
        border-radius: 6px;
        background: #ffffff;
        border: 1px solid #c9d8ff;
    }

    .llm-enrich-spinner {
        width: 16px;
        height: 16px;
        border: 2px solid #c9d8ff;
        border-top-color: #2c4bff;
        border-radius: 50%;
        flex: 0 0 auto;
        animation: llm-enrich-spin 0.8s linear infinite;
    }

    @keyframes llm-enrich-spin {
        to {
            transform: rotate(360deg);
        }
    }

	/* Price display */
	.book-price {
    margin-top: 12px;
    font-size: 1.1em;
}

/* Book cover display */
.book-result-container {
    display: flex !important;
    gap: 26px;
    align-items: flex-start;
    flex-direction: row;
    flex-wrap: nowrap;
}

.book-details {
    flex: 1 1 auto;
    min-width: 0;
    order: 1;
}

.book-side {
    flex: 0 0 320px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
    order: 2;
    min-width: 0;
    max-width: 100%;
}

.search-results.success .book-details {
    padding-right: 4px;
}

.search-results.success .book-side {
    padding-left: 0;
    border-left: none;
}


.preorder-cover-upload-card {
    border: 1px solid #d6d6d6;
    background: #f7f7f7;
    border-radius: 8px;
    padding: 10px;
}

.preorder-cover-upload {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
}

.preorder-cover-upload-field label {
    font-size: 12px;
    color: #555;
    font-weight: 600;
    display: block;
    margin-bottom: 4px;
}

.preorder-cover-upload-field input[type="file"] {
    width: 100%;
}

.preorder-cover-upload .cover-paste-zone {
    border: 1px dashed #bbb;
    border-radius: 6px;
    padding: 8px 10px;
    text-align: center;
    font-size: 12px;
    color: #666;
    background: #fff;
    min-height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preorder-cover-upload .cover-paste-preview {
    display: none;
    max-height: 60px;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 2px;
    background: #fff;
    align-self: flex-start;
}

.preorder-cover-upload .search-button.secondary {
    width: 100%;
}

.book-cover {
    text-align: center;
    width: 100%;
    max-width: 214px;
    height: 292px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    padding: 8px;
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #f7f9fc 100%);
    border: 1px solid #e4ebf3;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.book-purchase-panel {
    padding: 14px 16px 16px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e4ebf3;
    border-radius: 18px;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.07);
}

.book-price-block {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
}

.book-cover img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    display: block;
}

.book-price-block .book-price {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 1em;
    white-space: normal;
}

.book-price-block .book-price strong {
    color: #667085;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.book-price-block .book-price [data-price-value] {
    color: #1f2937;
    font-weight: 700;
}

.book-price-block[data-price-estimated="1"] {
    padding: 10px;
    border: 1px solid #d8a419;
    border-radius: 8px;
    background: #fffaf0;
}

.book-price-block[data-price-estimated="1"] [data-price-role="list_price"] {
    padding: 8px 10px;
    border-radius: 6px;
    background: #ffffff;
    border: 1px solid #ead28a;
}

.book-price-block[data-price-estimated="1"] [data-price-role="list_price"] strong {
    color: #6f4f00;
}

.book-price-block[data-price-estimated="1"] [data-price-role="list_price"] [data-price-value] {
    color: #6f4f00;
    text-decoration-color: #9b7a1f;
}

.book-price-value-wrap {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.book-price-estimate-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 6px;
    border-radius: 6px;
    background: #f4d35e;
    color: #3d2f00;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.07);
}

.book-price-block [data-price-role="discount"] {
    align-self: flex-start;
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    border-radius: 999px;
    background: #fff3e0;
    border: 1px solid #f0d7b4;
    color: #9a5a12;
}

.book-price-block [data-price-role="discount"] strong,
.book-price-block [data-price-role="discount"] [data-price-value] {
    color: inherit;
    font-size: 0.84rem;
    letter-spacing: 0;
    text-transform: none;
}

.book-price-block [data-price-role="discount"] [data-price-value] {
    font-weight: 800;
}

.book-price-block [data-price-role="discounted_price"] {
    padding-bottom: 10px;
    border-bottom: 1px solid #e9eef5;
}

.book-price-block [data-price-role="discounted_price"] strong {
    color: #344054;
    font-size: 0.82rem;
}

.book-price-block [data-price-role="discounted_price"] [data-price-value] {
    color: #111827;
    font-size: 1.68rem;
    font-weight: 800;
    line-height: 1.02;
}

.book-price-block [data-price-role="list_price"] [data-price-value] {
    color: #475467;
    font-size: 1rem;
}

.book-price-block:has([data-price-role="discounted_price"]:not([style*="display:none"])) [data-price-role="list_price"] [data-price-value] {
    text-decoration: line-through;
    text-decoration-thickness: 1.5px;
    text-decoration-color: #98a2b3;
}

.book-price-block:not(:has([data-price-role="discounted_price"]:not([style*="display:none"]))) [data-price-role="list_price"] [data-price-value] {
    color: #111827;
    font-size: 1.58rem;
    line-height: 1.05;
}

.book-wise-price {
    margin-top: 2px;
    padding: 8px 10px;
    border-radius: 12px;
    background: #eef7f1;
    border: 1px solid #d5e8db;
}

.book-wise-price__label {
    color: #576074;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.book-wise-price__value {
    margin-top: 2px;
    color: #153b22;
    font-size: 1.02rem;
    font-weight: 800;
    line-height: 1.25;
}

.book-wise-price__note {
    margin-top: 2px;
    color: #5f6b7a;
    font-size: 0.72rem;
    line-height: 1.35;
}

.result-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 10px;
    border-radius: 999px;
    background: #eef2ff;
    color: #2336a6;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid #d7def6;
}

.result-badge--preorder {
    background: #fff7e8;
    color: #9a5a12;
    border-color: #f0d7b4;
}

.result-badge--internal {
    background: #eef6ff;
    color: #21508d;
    border-color: #d5e3f6;
}

.result-badge--api {
    background: #f1f5f9;
    color: #435064;
    border-color: #d6e0ea;
}

.result-badge--priority {
    padding: 3px 12px;
    font-weight: 700;
    letter-spacing: 0.01em;
    box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.45);
}

.result-badge--priority-high {
    background: #fee2e2;
    color: #9f1239;
    border-color: #fca5a5;
}

.result-badge--priority-mid {
    background: #fff4d6;
    color: #9a6500;
    border-color: #f3cd7f;
}

.result-badge--priority-pick {
    background: #ecfeff;
    color: #0f766e;
    border-color: #99f6e4;
}

.book-details,
.book-fields,
.book-field,
.book-desc-body,
.book-price-block,
.book-price {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.book-desc {
    background: #ffffff !important;
    margin-top: 18px;
    padding: 16px 18px;
    border: 1px solid #dfe8f1;
    border-radius: 16px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.note-alert {
    color: #b42318;
    font-weight: 600;
}

.book-desc__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.book-desc__title {
    color: #1f2937;
    font-size: 1rem;
    font-weight: 700;
}

.book-desc-body {
    max-width: 74ch;
    color: #374151;
    font-size: 0.98rem;
    line-height: 1.6;
    text-align: left;
}

.book-desc-body p,
.book-desc-body div,
.book-desc-body li,
.book-desc-body blockquote {
    text-align: left !important;
}

.desc-lang-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.desc-lang-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid #d1d5db;
    color: #374151;
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
    background: #f8fafc;
    line-height: 1.2;
    position: relative;
}

.desc-lang-btn:hover {
    border-color: #9ca3af;
}

.desc-lang-btn.is-active {
    background: #1b7a3d;
    border-color: #145c2d;
    color: #fff;
    box-shadow: 0 0 0 2px rgba(27, 122, 61, 0.18);
}

.desc-lang-btn.is-active::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: #fff;
    margin-right: 6px;
    display: inline-block;
}

.preorder-edit-panel {
    margin-top: 14px;
    border: 1px solid #d8deea;
    border-radius: 12px;
    background: linear-gradient(180deg, #f8faff 0%, #f2f5fb 100%);
    overflow: hidden;
}

.preorder-edit-summary {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    cursor: pointer;
    font-weight: 700;
    font-size: 1rem;
    color: #1f2a44;
    user-select: none;
}

.preorder-edit-summary::-webkit-details-marker {
    display: none;
}

.preorder-edit-summary::before {
    content: '▸';
    font-size: 14px;
    color: #44567a;
    transition: transform 0.2s ease;
}

.preorder-edit-panel[open] .preorder-edit-summary {
    border-bottom: 1px solid #d8deea;
    background: rgba(255, 255, 255, 0.75);
}

.preorder-edit-panel[open] .preorder-edit-summary::before {
    transform: rotate(90deg);
}

.preorder-edit-form {
    display: grid;
    gap: 12px;
    padding: 12px;
}

.preorder-edit-hint {
    margin: 0;
    font-size: 12px;
    color: #55607a;
}

.preorder-edit-group {
    border: 1px solid #dfe5f1;
    border-radius: 10px;
    background: #ffffff;
    padding: 12px;
    display: grid;
    gap: 10px;
}

.preorder-edit-group-title {
    margin: 0;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #5b6479;
}

.preorder-edit-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px 12px;
}

.preorder-edit-field {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.preorder-edit-field-full {
    grid-column: 1 / -1;
}

.preorder-edit-label {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    color: #36415a;
    line-height: 1.2;
}

.preorder-edit-input,
.preorder-edit-textarea {
    width: 100%;
    min-width: 0;
    border: 1px solid #ccd5e4;
    border-radius: 8px;
    background: #fcfdff;
    color: #1f2937;
    padding: 9px 10px;
    font-size: 14px;
    line-height: 1.35;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.preorder-edit-input:focus,
.preorder-edit-textarea:focus {
    outline: none;
    border-color: #6a87b8;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.14);
}

.preorder-edit-textarea {
    resize: vertical;
    min-height: 96px;
}

.preorder-edit-meta {
    font-size: 12px;
    color: #5b6479;
}

.preorder-edit-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.preorder-edit-actions .search-button {
    min-width: 220px;
}

.book-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px 10px;
}

.book-fields .book-field {
    margin: 0;
    padding: 10px 12px;
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: wrap;
    line-height: 1.35;
    border: 1px solid #e3e9f2;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.book-fields .book-field > strong:first-child {
    color: #667085;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    text-transform: none;
}

.book-fields .book-field [data-field-value] {
    color: #1f2937;
    font-size: 0.96rem;
    line-height: 1.35;
}

.book-fields .book-field[data-field-key="isbn_label"] {
    grid-column: 1 / -1;
    background: linear-gradient(180deg, #ffffff 0%, #f5f8fc 100%);
}

.book-fields .book-field[data-field-key="isbn_label"] [data-field-value] {
    font-size: 1.08rem;
    font-weight: 800;
}

.book-title-header {
    margin: 0 0 16px;
    padding: 2px 0 0;
    text-align: left;
}

.book-title-header__main {
    margin: 0;
    color: #1f2937;
    font-size: 1.65rem;
    line-height: 1.12;
    font-weight: 760;
    letter-spacing: 0.005em;
}

.book-title-header__secondary {
    margin-top: 5px;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px 10px;
}

.book-title-header__secondary-item {
    margin: 0;
    display: inline-flex;
    align-items: baseline;
    color: #4b5563;
    font-size: 12px;
    line-height: 1.35;
}

.book-title-header__secondary-sep {
    color: #c0c7d1;
    line-height: 1;
}

.book-title-header__secondary-value {
    font-weight: 500;
}

.book-title-header__rule {
    margin-top: 10px;
    height: 1px;
    background: linear-gradient(90deg, #d7dee8 0%, rgba(215, 222, 232, 0.25) 100%);
}

.book-fields .book-field[data-field-key="title"],
.book-fields .book-field[data-field-key="title_original"],
.book-fields .book-field[data-field-key="title_en"] {
    display: none;
}

.favorite-toggle {
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #334155;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.favorite-toggle.is-favorite {
    background: #fff7ed;
    border-color: #fdba74;
    color: #9a3412;
}

.favorite-icon {
    font-size: 14px;
    line-height: 1;
}

.favorite-label {
    font-size: 12px;
    font-weight: 600;
}

.favorite-toggle:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.favorites-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.favorite-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    min-width: 0;
}

@media (max-width: 900px) {
    .favorites-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .favorites-list {
        grid-template-columns: 1fr;
    }

    .favorite-item {
        align-items: flex-start;
    }

    .favorite-item__title {
        white-space: normal;
    }
}

.favorite-item__link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    flex: 1 1 auto;
    min-width: 0;
}

.favorite-item__cover {
    width: 52px;
    height: 72px;
    border-radius: 6px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex: 0 0 52px;
}

.favorite-item__cover img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.favorite-item__cover--empty {
    background: #e2e8f0;
}

.favorite-item__info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: 72px;
    flex: 1 1 auto;
    min-width: 0;
}

.favorite-item__title {
    font-weight: 600;
    font-size: 14px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    text-align: center;
}

.favorite-item__meta {
    font-size: 12px;
    color: #64748b;
    width: 100%;
    text-align: center;
}

.favorite-item__actions {
    display: flex;
    gap: 6px;
    align-items: center;
}

.favorite-remove-btn {
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #475569;
    border-radius: 999px;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
}

.favorite-remove-btn:hover {
    background: #fee2e2;
    border-color: #fecaca;
    color: #b91c1c;
}

.favorite-empty {
    font-size: 12px;
    color: #64748b;
}

.legal.terms {
    max-width: 980px;
    margin: 0 auto;
    text-align: left;
    line-height: 1.7;
    color: #2f3a45;
}

.legal.terms h1 {
    margin: 0 0 6px 0;
    font-size: 28px;
    letter-spacing: 0.2px;
    color: #2f3a45;
    text-align: center;
}

.legal.terms h2 {
    margin: 20px 0 6px 0;
    font-size: 18px;
    color: #2f3a45;
}

.legal.terms p {
    margin: 8px 0;
    font-size: 14px;
    color: #2f3a45;
}

.legal.terms ul {
    margin: 8px 0 12px 0;
    padding-left: 20px;
}

.legal.terms li {
    margin: 6px 0;
    font-size: 14px;
    color: #2f3a45;
}

.legal.terms a {
    color: #0f5cc0;
    text-decoration: underline;
}

.legal.terms strong {
    color: inherit;
    font-weight: 500;
}

.legal.terms li::marker {
    color: #2f3a45;
}

.legal.terms .legal-meta {
    margin-top: 6px;
    font-size: 12px;
    color: #64748b;
}

.workflow-progress {
    margin-top: 12px;
    padding: 12px;
}

.workflow-progress__title {
    margin: 0 0 8px 0;
}

.workflow-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.workflow-step {
    position: relative;
    flex: 1 1 160px;
    min-width: 160px;
    padding: 8px 10px 8px 40px;
    border-radius: 8px;
    border: 1px solid #e2e6ea;
    background: #f8f9fa;
    color: #6b7280;
}

.workflow-step::before {
    content: attr(data-step);
    position: absolute;
    left: 12px;
    top: 10px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid currentColor;
    background: #fff;
}

.workflow-step__label {
    font-size: 13px;
    font-weight: 600;
}

.workflow-step__status {
    margin-top: 2px;
    font-size: 12px;
    opacity: 0.85;
}

.workflow-step--done {
    border-width: 1px;
}

.workflow-step--current {
    border-width: 2px;
}

.workflow-step--pending {
    border-width: 1px;
}

.workflow-step--blocked {
    border-width: 1px;
}

.processing-indicator {
    margin-top: 12px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #eef5ff;
    color: #1f3b64;
    font-size: 13px;
    font-weight: 600;
}

.processing-indicator[hidden] {
    display: none;
}

.processing-indicator__spinner {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(31, 59, 100, 0.2);
    border-top-color: #1f3b64;
    animation: processing-spin 0.9s linear infinite;
}

@keyframes processing-spin {
    to {
        transform: rotate(360deg);
    }
}

.workflow-step--cancelled {
    border-width: 1px;
}

.workflow-step--status-draft {
    border-color: #d7dde3;
    background: #eef2f6;
    color: #1f2933;
}

.workflow-step--status-sent {
    border-color: #b6d4fe;
    background: #e7f1ff;
    color: #084298;
}

.workflow-step--status-cancelled {
    border-color: #f5c2c7;
    background: #fdecea;
    color: #8a1c1c;
}

.workflow-step--status-confirmed {
    border-color: #b7e0c2;
    background: #e6f4ea;
    color: #1b7a3d;
}

.workflow-step--status-blocked {
    border-color: #fcd34d;
    background: #fffbeb;
    color: #92400e;
}

@media (max-width: 1100px) {
    .preorder-edit-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Responsive - stack on small screens */
@media (max-width: 768px) {
    .book-result-container {
        flex-direction: column;
        gap: 16px;
    }

    .book-title-header {
        padding: 0;
    }

    .book-title-header__main {
        font-size: 1.2rem;
    }

    .book-title-header__secondary {
        gap: 5px 10px;
    }
    
    .book-details {
        order: 1;
    }
    
    .book-side {
        order: 2;
        flex: 0 0 auto;
        width: 100%;
        max-width: 100%;
    }

    .book-cover {
        max-width: 180px;
        height: 240px;
        margin: 0 auto;
    }

    .book-purchase-panel {
        padding: 18px;
    }

    .book-fields {
        grid-template-columns: 1fr;
    }

    .book-fields .book-field[data-field-key="isbn_label"] {
        grid-column: auto;
    }

    .book-price-block .book-price {
        white-space: normal;
    }

    .preorder-edit-form {
        padding: 10px;
        gap: 10px;
    }

    .preorder-edit-group {
        padding: 10px;
    }

    .preorder-edit-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .preorder-edit-actions .search-button {
        width: 100%;
        min-width: 0;
    }

}

/* Responsive */
@media (max-width: 768px) {
    .header-container {
        display: grid;
    }

    .header-content h1 {
        font-size: 1.6em;
    }

    .tagline {
        font-size: 0.95em;
    }

    .logo img {
        width: 56px;
        height: 56px;
    }
}

@media (max-width: 768px) {
    .search-input-row {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        justify-content: flex-start;
    }

    .search-input-row .search-button {
        width: 100%;
    }

    .search-input-row .search-input {
        min-width: 0;
        width: 100%;
    }

    .offcatalog-header-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        justify-content: flex-start;
    }

    .offcatalog-header-row .search-button {
        width: 100%;
    }

    .offcatalog-form .form-group {
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
    }

    .offcatalog-form {
        margin-top: 14px;
    }

    .offcatalog-card {
        padding: 18px;
    }

    .offcatalog-form__details-grid {
        grid-template-columns: 1fr;
    }

    .offcatalog-form .form-group label {
        text-align: left;
    }

    .offcatalog-form .form-group input,
    .offcatalog-form .form-group select {
        width: 100%;
    }

    .cart-controls {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .manual-list-price-input-wrap,
    .ai-list-price-input-wrap {
        flex-direction: column;
        align-items: stretch;
        margin-right: 0;
        width: 100%;
    }

    .manual-list-price-input,
    .ai-list-price-input {
        width: 100% !important;
        max-width: none;
    }

.quantity-input,
.add-to-cart-btn,
.add-to-estimate-btn,
.add-to-estimate-btn.search-button.secondary,
#offcatalog-estimate-button {
    width: 100%;
}
}

/* Cart Controls Styles */
.add-to-cart-form {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #e7ecf2;
}

.cart-controls {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 8px 10px;
}

.cart-controls label {
    font-weight: 700;
    color: #344054;
    margin: 0;
}

.quantity-input {
    padding: 8px 12px;
    font-size: 1.1rem;
    border: 1px solid #d0d5dd;
    border-radius: 10px;
    width: 96px;
    min-height: 44px;
    text-align: center;
    transition: border-color 0.3s ease;
    background: #fff;
}

.quantity-input:focus {
    outline: none;
    border-color: #36935d;
    box-shadow: 0 0 0 4px rgba(54, 147, 93, 0.12);
}

.add-to-cart-btn {
    min-height: 48px;
    padding: 10px 20px;
    font-size: 1rem;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    font-weight: 800;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 14px 24px rgba(76, 175, 80, 0.22);
}

.add-to-cart-btn:hover {
    background-color: #45a049;
    transform: translateY(-1px);
    box-shadow: 0 18px 30px rgba(69, 160, 73, 0.26);
}
.add-to-cart-btn:disabled,
.add-to-cart-btn[disabled] {
    opacity: 0.55;
    cursor: not-allowed;
    background-color: #7fbf80;
}
.add-to-cart-btn:disabled:hover,
.add-to-cart-btn[disabled]:hover {
    background-color: #7fbf80;
}

.add-to-cart-message {
    margin-left: 0 !important;
}

.add-to-estimate-btn,
.add-to-estimate-btn.search-button.secondary,
#offcatalog-estimate-button {
    min-height: 48px;
    padding: 10px 20px;
    font-size: 1rem;
    width: 100%;
    border-radius: 14px;
    cursor: pointer;
    font-weight: 800;
    letter-spacing: 0.01em;
    color: #7a4a10;
    border: 1px solid #d9bd90;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.72) 0%, rgba(255, 255, 255, 0.18) 100%),
        linear-gradient(135deg, #fffaf0 0%, #f5e8cf 52%, #ead5b0 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.85),
        0 10px 20px rgba(180, 134, 61, 0.16);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, filter 0.2s ease;
    position: relative;
    overflow: hidden;
}

.add-to-estimate-btn::before,
#offcatalog-estimate-button::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.45) 35%, transparent 72%);
    transform: translateX(-130%);
    transition: transform 0.45s ease;
    pointer-events: none;
}

.add-to-estimate-btn:hover,
.add-to-estimate-btn.search-button.secondary:hover,
#offcatalog-estimate-button:hover {
    transform: translateY(-1px);
    border-color: #c89c59;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.92),
        0 14px 26px rgba(180, 134, 61, 0.22);
    filter: saturate(1.03);
}

.add-to-estimate-btn:hover::before,
#offcatalog-estimate-button:hover::before {
    transform: translateX(130%);
}

.add-to-estimate-btn:focus-visible,
.add-to-estimate-btn.search-button.secondary:focus-visible,
#offcatalog-estimate-button:focus-visible {
    outline: none;
    box-shadow:
        0 0 0 4px rgba(200, 156, 89, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.92),
        0 14px 26px rgba(180, 134, 61, 0.22);
}

.add-to-estimate-btn:disabled,
.add-to-estimate-btn[disabled],
.add-to-estimate-btn.search-button.secondary:disabled,
.add-to-estimate-btn.search-button.secondary[disabled],
#offcatalog-estimate-button:disabled,
#offcatalog-estimate-button[disabled] {
    opacity: 0.58;
    cursor: not-allowed;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.add-to-estimate-btn:disabled:hover,
.add-to-estimate-btn[disabled]:hover,
.add-to-estimate-btn.search-button.secondary:disabled:hover,
.add-to-estimate-btn.search-button.secondary[disabled]:hover,
#offcatalog-estimate-button:disabled:hover,
#offcatalog-estimate-button[disabled]:hover {
    transform: none;
    border-color: #d9bd90;
    filter: none;
}

.cart-controls .add-to-cart-btn,
.cart-controls .add-to-estimate-btn,
.cart-controls .tooltip-inline,
.cart-controls .add-to-cart-message,
.cart-controls .add-to-estimate-message,
.cart-controls .manual-list-price-input-wrap,
.cart-controls .ai-list-price-input-wrap {
    grid-column: 1 / -1;
}

.cart-controls .tooltip-inline {
    display: grid;
    gap: 8px;
    width: 100%;
}

.cart-controls .tooltip-inline .add-to-cart-btn,
.cart-controls .tooltip-inline .add-to-estimate-btn {
    width: 100%;
}

/* Cart Page Styles */
.cart-table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-top: 18px;
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
    background-color: var(--jp-paper-2);
    box-shadow: var(--jp-shadow);
    border-radius: 12px;
    overflow: hidden;
}

.cart-table th {
    background-color: #efe4d6;
    color: #3b3a35;
    padding: 15px;
    text-align: left;
    font-weight: bold;
}

.cart-table td {
    padding: 15px;
    border-bottom: 1px solid #eadfce;
}

.cart-table tbody tr:hover {
    background-color: #f5f5f5;
}

.cart-qty-form {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.cart-qty-input {
    width: 72px;
    padding: 6px 8px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
}

.cart-remove-form {
    display: inline;
    margin: 0;
}

.remove-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    background: transparent;
    color: #d32f2f;
    text-decoration: none;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.remove-btn:hover {
    color: #b71c1c;
}

@media (max-width: 960px) {
    .cart-table {
        border: 0;
        box-shadow: none;
        background: transparent;
    }

    .cart-table thead {
        display: none;
    }

    .cart-table tbody,
    .cart-table tr,
    .cart-table td {
        display: block;
        width: 100%;
    }

    .cart-table tr {
        margin-bottom: 12px;
        border: 1px solid #e2e8f0;
        border-radius: 8px;
        overflow: hidden;
        background: #fff;
    }

    .cart-table td {
        padding: 10px 12px;
        border: 0;
        border-bottom: 1px solid #f1f5f9;
        display: grid;
        grid-template-columns: minmax(140px, 45%) 1fr;
        gap: 8px;
        align-items: start;
        font-size: 13px;
        overflow-wrap: anywhere;
    }

    .cart-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #475569;
    }

    .cart-table td:last-child {
        border-bottom: 0;
    }

    .cart-table tbody tr:hover {
        background-color: #fff;
    }

    .responsive-table {
        border: 0;
        box-shadow: none;
        background: transparent;
        width: 100%;
    }

    .responsive-table thead {
        display: none;
    }

    .responsive-table tbody,
    .responsive-table tr,
    .responsive-table td {
        display: block;
        width: 100%;
    }

    .responsive-table tr {
        margin-bottom: 12px;
        border: 1px solid #e2e8f0;
        border-radius: 8px;
        overflow: hidden;
        background: #fff;
    }

    .responsive-table td {
        padding: 10px 12px;
        border: 0;
        border-bottom: 1px solid #f1f5f9;
        display: grid;
        grid-template-columns: minmax(140px, 45%) 1fr;
        gap: 8px;
        align-items: start;
        font-size: 13px;
        overflow-wrap: anywhere;
    }

    .responsive-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #475569;
    }

    .responsive-table td:last-child {
        border-bottom: 0;
    }

    .responsive-table tbody tr:hover {
        background-color: #fff;
    }

    .responsive-table tr.order-line-closed-full {
        background-color: #fdecea;
    }

    .responsive-table tr.order-line-closed-partial {
        background-color: #fff4e5;
    }
}

.cart-page h2 {
    margin-bottom: 6px;
}

.cart-context-card {
    margin-top: 12px;
    padding: 14px 18px;
}

.cart-context-card__title {
    margin: 0 0 10px;
    color: #243040;
    font-size: 1.15rem;
}

.cart-context-form {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
    margin: 0;
}

.cart-context-field {
    min-width: 280px;
    flex: 1 1 360px;
}

.cart-context-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
    color: #243040;
}

.cart-context-apply {
    min-width: 120px;
}

.cart-context-status {
    margin: 10px 0 0;
    color: #5b6472;
    font-size: 12px;
}

.cart-discount-banner {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    padding: 7px 12px;
    border-radius: 999px;
    background: #eef6ff;
    border: 1px solid #d7e4f7;
    color: #24456f;
}

.cart-discount-banner__label {
    font-size: 13px;
    font-weight: 600;
}

.cart-discount-banner__value {
    font-size: 14px;
    font-weight: 800;
    color: #14345d;
}

.cart-summary {
    margin: 24px 0;
    padding: 18px 20px;
    border-radius: 14px;
    border: 1px solid #dde6f0;
    background: linear-gradient(180deg, #fbfdff 0%, #f3f7fb 100%);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
}

.cart-summary__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.cart-summary__eyebrow {
    margin: 0 0 4px;
    color: #5f6b7a;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.cart-summary__title {
    margin: 0;
    color: #1f2937;
    font-size: 1.15rem;
    line-height: 1.2;
}

.cart-summary__items {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    background: #eaf2ff;
    color: #1f4f9c;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.cart-summary__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
    gap: 16px;
    align-items: start;
}

.cart-summary__totals,
.cart-summary__checkout {
    min-width: 0;
}

.cart-summary__totals {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cart-summary__row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid #e2e8f0;
    color: #334155;
}

.cart-summary__row span {
    font-size: 13px;
    line-height: 1.4;
}

.cart-summary__row strong {
    flex: 0 0 auto;
    color: #0f172a;
    font-size: 1rem;
    font-weight: 700;
}

.cart-summary__row--grand {
    background: linear-gradient(180deg, #f6f9ff 0%, #edf4ff 100%);
    border-color: #cfe0ff;
}

.cart-summary__row--grand strong {
    font-size: 1.25rem;
    color: var(--jp-indigo);
}

.cart-summary__row--wise {
    display: block;
    background: #f4faf5;
    border-color: #cfe6d4;
}

.cart-summary__wise-main {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
}

.cart-summary__wise-label {
    display: block;
    color: #334155;
    font-size: 13px;
    line-height: 1.4;
}

.cart-total {
    margin: 0;
    color: var(--jp-indigo);
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1.1;
}

.cart-total--wise {
    color: #153b22;
    text-align: right;
    white-space: nowrap;
    font-size: 1.05rem;
}

.cart-summary__row--wise .cart-total-note {
    margin: 2px 0 0;
    color: #6b7280;
    font-size: 11px !important;
    line-height: 1.3;
    text-align: left;
    max-width: 360px;
}

.cart-summary__checkout {
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid #e2e8f0;
    align-self: start;
}

.cart-checkout-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0;
}

.cart-terms {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: start;
    column-gap: 10px;
    color: #46515f;
    font-size: 12px;
    line-height: 1.45;
}

.cart-terms input {
    margin-top: 2px;
    flex: 0 0 auto;
}

.cart-terms__copy {
    display: block;
}

.cart-terms__copy a {
    white-space: nowrap;
}

.cart-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.cart-actions .continue-shopping,
.cart-actions .checkout-btn {
    margin: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95em;
    line-height: 1.2;
    min-height: 42px;
}

.cart-actions .continue-shopping {
    padding: 10px 16px;
}

.cart-actions .checkout-btn {
    padding: 10px 22px;
}

.continue-shopping {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 8px 10px;
    padding: 12px 22px;
    background-color: #f2ebe1;
    color: #2f2b26;
    text-decoration: none;
    border-radius: 999px;
    border: 1px solid #d6c9bb;
    font-weight: 600;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.continue-shopping:hover {
    background-color: #e8ded3;
    border-color: #cdbdae;
    color: #1f1c17;
}

.checkout-btn {
    padding: 14px 36px;
    font-size: 1.05em;
    background-color: var(--jp-indigo);
    color: white;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 700;
    margin: 8px 10px;
    box-shadow: 0 10px 22px rgba(31, 42, 68, 0.28);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.checkout-btn:hover {
    background-color: #2a3a5a;
    transform: translateY(-1px);
    box-shadow: 0 12px 26px rgba(31, 42, 68, 0.32);
}

@media (max-width: 640px) {
    .cart-summary {
        padding: 16px;
    }

    .cart-summary__top {
        flex-direction: column;
        align-items: stretch;
    }

    .cart-summary__row {
        flex-direction: column;
        align-items: flex-start;
    }

    .cart-summary__wise-main {
        flex-direction: column;
        align-items: flex-start;
    }

    .cart-total--wise {
        text-align: left;
    }

    .cart-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .cart-actions .continue-shopping,
    .cart-actions .checkout-btn {
        width: 100%;
    }
}

@media (max-width: 900px) {
    .cart-summary__grid {
        grid-template-columns: 1fr;
    }
}

.cart-link {
    margin-left: auto;
}

.cart-link a {
    position: relative;
    background-color: #22c55e;
    color: #fff;
    padding: 10px 18px;
    border-radius: 999px;
    border: 1px solid #1aa34b;
    transition: transform 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 700;
    text-decoration: none;
    line-height: 1.1;
    white-space: nowrap;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25);
}
.cart-link a .cart-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    font-size: 16px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.75), 0 2px 4px rgba(0, 0, 0, 0.25);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.cart-link a .cart-label {
    letter-spacing: 0.2px;
}

.cart-link a:hover {
    background-color: #1fb056;
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.3);
}
.cart-link a.nav-link-active {
    border-color: #bbf7d0;
    box-shadow: 0 0 0 2px rgba(134, 239, 172, 0.45), 0 6px 14px rgba(0, 0, 0, 0.25);
}
.cart-link a:hover .cart-icon {
    transform: translateY(-1px);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.85), 0 3px 6px rgba(0, 0, 0, 0.3);
}

.cart-link a:focus-visible {
    outline: 2px solid #86efac;
    outline-offset: 2px;
}

.cart-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: -8px;
    right: -6px;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: #e53935;
    color: #fff;
    font-weight: 800;
    font-size: 0.75em;
    line-height: 1;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85), 0 2px 6px rgba(0, 0, 0, 0.35);
}

.estimate-flow-links {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.estimate-draft-link {
    position: relative;
    background-color: #22c55e;
    color: #fff;
    padding: 10px 18px;
    padding-right: 48px;
    border-radius: 999px;
    border: 1px solid #1aa34b;
    transition: transform 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 700;
    text-decoration: none;
    line-height: 1.1;
    white-space: nowrap;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25);
}

.estimate-draft-link:hover {
    background-color: #1fb056;
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.3);
    color: #fff;
}

.estimate-draft-link:focus-visible {
    outline: 2px solid #86efac;
    outline-offset: 2px;
}

.estimate-draft-link__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 28px;
    padding: 0 8px;
    border-radius: 999px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.75), 0 2px 4px rgba(0, 0, 0, 0.25);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.estimate-draft-link:hover .estimate-draft-link__icon {
    transform: translateY(-1px);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.85), 0 3px 6px rgba(0, 0, 0, 0.3);
}

.estimate-draft-link__label {
    letter-spacing: 0.2px;
}

.estimate-draft-link__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: -8px;
    right: -6px;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: #e53935;
    color: #fff;
    font-weight: 800;
    font-size: 0.75em;
    line-height: 1;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85), 0 2px 6px rgba(0, 0, 0, 0.35);
}

.estimate-editor {
    display: grid;
    gap: 18px;
}

.estimate-section {
    padding: 18px 22px;
}

.estimate-section > h3 {
    margin: 0 0 14px 0;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 800;
    color: #2f2a25;
}

.estimate-fields-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 18px;
}

.estimate-field.form-group,
.estimate-editor .estimate-field.form-group {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
    justify-content: stretch;
    gap: 6px;
    margin: 0;
}

.estimate-field--full {
    grid-column: 1 / -1;
}

.estimate-editor .estimate-field label,
.estimates-form .estimate-field label,
.estimate-field label {
    margin: 0;
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #667085;
}

.estimate-editor .estimate-field input,
.estimate-editor .estimate-field select,
.estimate-editor .estimate-field textarea {
    width: 100%;
    min-width: 0;
    min-height: 52px;
    margin: 0;
    padding: 14px 16px;
    border: 1px solid #d9d2ca;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.03);
}

.estimate-editor .estimate-field select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 44px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 20 20'%3E%3Cpath fill='%23667085' d='M5.5 7.5L10 12l4.5-4.5 1.5 1.5L10 15 4 9z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 14px 14px;
}

.estimate-editor .estimate-field textarea {
    min-height: 132px;
    resize: vertical;
}

.estimate-editor .estimate-field input:focus,
.estimate-editor .estimate-field select:focus,
.estimate-editor .estimate-field textarea:focus {
    outline: none;
    border-color: #b89f84;
    box-shadow: 0 0 0 3px rgba(184, 159, 132, 0.12);
}

.estimate-actions-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.estimate-actions-row .search-button {
    min-width: 180px;
}

@media (max-width: 720px) {
    .estimate-fields-grid {
        grid-template-columns: 1fr;
    }

    .estimate-section {
        padding: 16px 14px;
    }

    .estimate-actions-row {
        flex-direction: column;
    }

    .estimate-actions-row .search-button {
        width: 100%;
        min-width: 0;
    }
}

/* Orders Page Styles */
.orders-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin: 30px 0;
}
.orders-container.narrow {
    width: 100%;
    max-width: var(--content-max-width);
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
    padding: 0 8px;
}

.order-card {
    background-color: #fff;
    border: 1px solid var(--jp-border);
    border-radius: 8px;
    padding: 20px;
    box-shadow: var(--jp-shadow);
}

.order-card--order {
    border-left: 4px solid #9fb6d6;
    background-image: linear-gradient(180deg, rgba(47, 79, 126, 0.025), rgba(255, 255, 255, 0));
}

.order-card--preorder {
    border-left: 4px solid #94c7c2;
    background-image: linear-gradient(180deg, rgba(47, 126, 120, 0.03), rgba(255, 255, 255, 0));
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.order-header__main {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.order-kind-chip,
.order-kind-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    white-space: nowrap;
}

.order-kind-chip--order,
.order-kind-pill--order {
    background: #f4f8ff;
    color: #3d5f8a;
    border-color: #d6e3f5;
}

.order-kind-chip--preorder,
.order-kind-pill--preorder {
    background: #f2fbfa;
    color: #2d6a65;
    border-color: #d1ebe7;
}

.order-view-shell--order .page-banner,
.order-view-shell--order .order-summary-panel {
    border-left: 3px solid #9fb6d6;
    background-image: linear-gradient(120deg, rgba(47, 79, 126, 0.03), rgba(255, 255, 255, 0));
}

.order-view-shell--preorder .page-banner,
.order-view-shell--preorder .order-summary-panel {
    border-left: 3px solid #94c7c2;
    background-image: linear-gradient(120deg, rgba(47, 126, 120, 0.035), rgba(255, 255, 255, 0));
}

.order-header h3 {
    color: #333;
    font-size: 1.3em;
    margin: 0;
    overflow-wrap: anywhere;
}

.order-header h4 {
    color: #333;
    font-size: 1.1em;
    margin: 0;
    overflow-wrap: anywhere;
}

.order-status {
    background-color: #4CAF50;
    color: white;
    padding: 8px 15px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.9em;
}

.order-info {
    margin-bottom: 15px;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 4px;
    text-align: left;
}

.order-info p {
    margin: 5px 0;
    color: #666;
    overflow-wrap: anywhere;
}

.order-info--grid {
    display: grid;
    gap: 12px;
}

.order-info--grid .order-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px 18px;
}

.order-info--grid .order-meta__row {
    display: grid;
    gap: 6px;
}

.order-info--grid .order-meta__label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: #6b7280;
}

.order-info--grid .order-meta__value {
    color: #1f2933;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.order-info--grid .order-meta__summary {
    padding: 10px 12px;
    background: #fff;
    border: 1px dashed #d5dbe3;
    border-radius: 6px;
    color: #334155;
    font-weight: 600;
}

.order-info--grid .order-meta__row--total {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 12px 14px;
    background: #eef6ff;
    border: 1px solid #dbeafe;
    border-radius: 8px;
}

.order-info--grid .order-meta__value--money {
    font-size: 1.1em;
    font-weight: 800;
    color: #0f172a;
}

.documents-hub {
    text-align: left;
    display: grid;
    gap: 28px;
}

.documents-breadcrumb {
    width: 100%;
    max-width: var(--content-max-width);
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    color: var(--jp-muted);
    font-size: 13px;
    text-align: left;
}

.documents-breadcrumb a {
    color: var(--jp-indigo);
    text-decoration: none;
    font-weight: 700;
}

.documents-breadcrumb a:hover,
.documents-breadcrumb a:focus-visible {
    text-decoration: underline;
}

.documents-breadcrumb strong {
    color: var(--jp-ink);
    font-weight: 700;
}

.documents-hero {
    width: 100%;
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: 20px 22px;
    border: 1px solid var(--jp-border);
    border-radius: 20px;
    background:
        radial-gradient(circle at top right, rgba(215, 164, 75, 0.08), transparent 34%),
        linear-gradient(180deg, rgba(255, 251, 246, 0.98), rgba(248, 242, 234, 0.98));
    box-shadow: var(--jp-shadow);
    color: var(--jp-ink);
}

.documents-hero__main {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(260px, 0.9fr);
    gap: 14px;
    align-items: start;
    margin-bottom: 14px;
}

.documents-hero__copy {
    display: grid;
    gap: 10px;
    min-width: 0;
}

.documents-hero__eyebrow {
    display: inline-flex;
    width: fit-content;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(31, 42, 68, 0.06);
    color: #5e6470;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.documents-hero h2 {
    margin: 0;
    color: var(--jp-ink);
    font-size: clamp(1.55rem, 2vw, 2.15rem);
    line-height: 1.1;
}

.documents-hero p {
    margin: 0;
    max-width: 680px;
    color: var(--jp-muted);
    font-size: 0.98rem;
}

.documents-hero__badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.documents-hero__badges .profile-badge {
    border-color: #ddd2c4;
    background: rgba(255, 255, 255, 0.72);
    color: #454c57;
}

.documents-hero__spotlight {
    display: grid;
    gap: 6px;
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid #e1d6c8;
    min-width: 0;
}

.documents-hero__spotlight-label {
    color: #6a6f7a;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.documents-hero__spotlight-value {
    font-family: 'Sora', 'IBM Plex Sans', sans-serif;
    color: var(--jp-indigo);
    font-size: clamp(1.6rem, 2.4vw, 2.15rem);
    line-height: 1;
}

.documents-hero__summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
}

.documents-hero-summary__item {
    display: grid;
    gap: 2px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.62);
    border: 1px solid #e4d8cb;
}

.documents-hero-summary__label {
    color: #6a6f7a;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.documents-hero-summary__value {
    color: var(--jp-indigo);
    font-size: 1.2rem;
    line-height: 1.1;
}

.documents-shortcuts {
    width: 100%;
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: 24px;
    border: 1px solid var(--jp-border);
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(255, 249, 242, 0.98), rgba(255, 255, 255, 0.94));
    box-shadow: var(--jp-shadow);
    text-align: left;
}

.documents-shortcuts__header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-end;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.documents-shortcuts__header > * {
    min-width: 0;
}

.documents-shortcuts__header h2,
.documents-shortcuts__header h3 {
    margin: 0 0 6px;
    color: var(--jp-ink);
}

.documents-shortcuts__header p {
    margin: 0;
    max-width: 760px;
    color: var(--jp-muted);
}

.documents-shortcuts__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
}

.documents-shortcuts__item {
    position: relative;
    display: grid;
    gap: 10px;
    min-height: 100%;
    padding: 22px 20px 20px;
    border: 1px solid #eadfce;
    border-radius: 18px;
    overflow: hidden;
    text-decoration: none;
    color: var(--jp-ink);
    background: #ffffff;
    box-shadow: 0 12px 24px rgba(29, 27, 24, 0.07);
    transition: transform 160ms ease, border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.documents-shortcuts__item::before {
    content: '';
    position: absolute;
    top: 1px;
    left: 1px;
    right: 1px;
    height: 4px;
    border-radius: 17px 17px 0 0;
    background: linear-gradient(90deg, var(--jp-vermillion), var(--jp-gold));
}

.documents-shortcuts__item:hover,
.documents-shortcuts__item:focus-visible {
    transform: translateY(-3px);
    border-color: #d8c8b3;
    background: #fffdf8;
    box-shadow: 0 18px 28px rgba(29, 27, 24, 0.11);
}

.documents-shortcuts__item--disabled,
.documents-shortcuts__item--disabled:hover,
.documents-shortcuts__item--disabled:focus-visible {
    transform: none;
    cursor: default;
    background: #fbf8f3;
    box-shadow: 0 12px 24px rgba(29, 27, 24, 0.05);
}

.documents-shortcuts__item--active {
    border-color: #c6d7ea;
    background: #f7fbff;
    box-shadow: 0 0 0 2px rgba(27, 123, 200, 0.12), 0 12px 24px rgba(29, 27, 24, 0.08);
}

.documents-shortcuts__item--active::before {
    background: linear-gradient(90deg, #1b7bc8, #79aee0);
}

.documents-shortcuts__item strong {
    font-size: 1.05rem;
    line-height: 1.35;
}

.documents-shortcuts__summary {
    color: #5b5e68;
    line-height: 1.5;
}

.documents-shortcuts__eyebrow {
    color: #7a5c31;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.documents-shortcuts__cta {
    margin-top: auto;
    color: var(--jp-indigo);
    font-size: 13px;
    font-weight: 700;
}

.documents-shortcuts__item--active .documents-shortcuts__cta {
    color: #0b4a78;
}

@media (min-width: 1180px) {
    .documents-shortcuts__grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .documents-shortcuts__item {
        gap: 8px;
        padding: 20px 16px 18px;
    }

    .documents-shortcuts__item strong {
        font-size: 1rem;
    }

    .documents-shortcuts__summary {
        font-size: 0.95rem;
        line-height: 1.4;
    }
}

.documents-chain-section {
    width: 100%;
    max-width: var(--content-max-width);
    margin: 0 auto 32px;
    padding: 24px;
    border: 1px solid var(--jp-border);
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(255, 249, 242, 0.96), rgba(255, 255, 255, 0.96));
    box-shadow: var(--jp-shadow);
    text-align: left;
}

.documents-chain-section__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.documents-chain-section__header > * {
    min-width: 0;
}

.documents-chain-section__header h3 {
    margin: 0 0 6px;
    color: var(--jp-ink);
}

.documents-chain-section__header p {
    margin: 0;
    color: var(--jp-muted);
}

.documents-chain-section__meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    color: var(--jp-muted);
    font-size: 12px;
    font-weight: 600;
}

.documents-chain-filters {
    margin: 0 0 24px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 246, 240, 0.95));
}

.documents-chain-filters__intro {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    flex-wrap: wrap;
}

.documents-chain-filters__intro > * {
    min-width: 0;
}

.documents-chain-filters__intro h4 {
    margin: 0 0 4px;
    color: var(--jp-ink);
}

.documents-chain-filters__intro p {
    margin: 0;
    color: var(--jp-muted);
}

.documents-chain-filters__summary {
    display: grid;
    gap: 2px;
    min-width: 120px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid #eadfce;
    background: rgba(255, 255, 255, 0.86);
    text-align: right;
}

.documents-chain-filters__summary span {
    color: var(--jp-muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.documents-chain-filters__summary strong {
    color: var(--jp-ink);
    font-size: 1.5rem;
    line-height: 1;
}

.documents-chain-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.documents-chain-toolbar strong {
    display: block;
    color: var(--jp-ink);
}

.documents-chain-toolbar p {
    margin: 2px 0 0;
    color: var(--jp-muted);
    font-size: 0.92rem;
}

.documents-chain-state {
    margin-top: 20px;
    padding: 18px 20px;
    border-radius: 16px;
    border: 1px dashed #d7c7b3;
    background: rgba(255, 255, 255, 0.8);
}

.documents-chain-table-wrap {
    overflow-x: auto;
    padding-bottom: 4px;
}

.documents-chain-table {
    width: 100%;
    min-width: 980px;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid #e4d7c9;
    border-radius: 18px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.documents-chain-table th,
.documents-chain-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #eadfce;
    vertical-align: top;
    text-align: left;
}

.documents-chain-table thead th {
    background: #efe4d6;
    color: #5f5448;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.documents-chain-table tbody tr:nth-child(even) td {
    background: rgba(255, 252, 248, 0.96);
}

.documents-chain-table tbody tr:hover td {
    background: #fff8ef;
}

.documents-chain-table tbody tr:last-child td {
    border-bottom: none;
}

.documents-chain-table__main {
    color: var(--jp-ink);
    font-weight: 600;
    line-height: 1.55;
}

.documents-chain-table__meta {
    margin-top: 8px;
    color: var(--jp-muted);
    font-size: 12px;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.documents-chain-access {
    display: grid;
    gap: 8px;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid #e6dbcf;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.72);
    text-decoration: none;
    transition: transform 160ms ease, border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.documents-chain-access--interactive:hover,
.documents-chain-access--interactive:focus-visible {
    border-color: #d2c0aa;
    background: #fffdfa;
    box-shadow: 0 8px 16px rgba(29, 27, 24, 0.06);
    text-decoration: none;
}

.documents-chain-access--locked {
    background: rgba(248, 245, 240, 0.84);
}

.documents-chain-access--empty {
    background: rgba(247, 241, 234, 0.82);
}

.documents-chain-access__chip {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    max-width: 100%;
    min-width: 0;
    width: fit-content;
    min-height: 28px;
    padding: 4px 9px;
    border: 1px solid #d7c6b3;
    border-radius: 999px;
    background: rgba(255, 253, 250, 0.92);
    color: #6a4c1f;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
}

.documents-chain-access__reference {
    min-width: 0;
    overflow-wrap: anywhere;
}

.documents-chain-access__chip--sent {
    background: #e7f1ff;
    border-color: #b6d4fe;
    color: #084298;
}

.documents-chain-access__chip--cancelled {
    background: #fdecea;
    border-color: #f5c2c7;
    color: #8a1c1c;
}

.documents-chain-access__chip--confirmed {
    background: #e6f4ea;
    border-color: #b7e0c2;
    color: #1b7a3d;
}

.documents-chain-access__chip--draft {
    background: #eef2f6;
    border-color: #d7dde3;
    color: #1f2933;
}

.documents-chain-access__badge.list-status-link {
    flex: 0 0 auto;
    min-height: 17px;
    padding: 2px 5px 2px 13px;
    border-radius: 6px;
    font-size: 9px;
    font-weight: 700;
    line-height: 1;
}

.documents-chain-access__badge.list-status-link::before {
    left: 5px;
    width: 4px;
    height: 4px;
}

.documents-chain-access--compound {
    gap: 10px;
}

.documents-chain-access--compound:hover,
.documents-chain-access--compound:focus-within {
    border-color: #d2c0aa;
    background: #fffdfa;
    box-shadow: 0 8px 16px rgba(29, 27, 24, 0.06);
}

.documents-chain-access__primary {
    display: grid;
    gap: 8px;
    min-width: 0;
    color: inherit;
    text-decoration: none;
}

.documents-chain-access__primary--interactive:hover,
.documents-chain-access__primary--interactive:focus-visible {
    text-decoration: none;
}

.documents-chain-receipts {
    display: grid;
    gap: 6px;
    padding-top: 8px;
    border-top: 1px solid rgba(210, 192, 170, 0.7);
}

.documents-chain-receipts__label {
    color: #8a7763;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1.2;
    text-transform: uppercase;
}

.documents-chain-receipts__links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.documents-chain-receipts__link {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    max-width: 100%;
    min-height: 26px;
    padding: 4px 9px;
    border: 1px solid #d7c6b3;
    border-radius: 999px;
    background: rgba(255, 253, 250, 0.92);
    color: #6a4c1f;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
}

.documents-chain-receipts__number {
    min-width: 0;
    overflow-wrap: anywhere;
}

.documents-chain-receipts__status.list-status-link {
    flex: 0 0 auto;
    min-height: 16px;
    padding: 2px 5px 2px 13px;
    border-radius: 6px;
    font-size: 9px;
    font-weight: 700;
    line-height: 1;
}

.documents-chain-receipts__status.list-status-link::before {
    left: 5px;
    width: 4px;
    height: 4px;
}

.documents-chain-receipts__link:hover,
.documents-chain-receipts__link:focus-visible {
    border-color: #c5a36c;
    background: #fff8ef;
    color: #52360d;
    text-decoration: none;
}

.documents-chain-table__empty {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    background: #f6f1ea;
    border: 1px solid #e2d5c6;
    color: #7b807f;
    font-weight: 600;
}

.documents-chain-table td a,
.documents-chain-table__main,
.documents-shortcuts__summary,
.documents-hero p {
    overflow-wrap: anywhere;
}

.documents-chain-table .list-status-link {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
}

.documents-chain-table__locked {
    cursor: default;
}

.documents-chain-progress {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

.documents-chain-progress__label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.documents-chain-progress--complete .documents-chain-progress__label {
    color: #1f6c60;
}

.documents-chain-progress--complete .documents-chain-progress__bar {
    background: #d9ece7;
}

.documents-chain-progress--partial .documents-chain-progress__label {
    color: #a14639;
}

.documents-chain-progress--partial .documents-chain-progress__bar {
    background: #e7d8ca;
}

.documents-chain-progress__bar {
    position: relative;
    display: block;
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: #eadfce;
    overflow: hidden;
}

.documents-chain-progress__bar::after {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: var(--documents-flow-progress, 0%);
    border-radius: inherit;
    background: linear-gradient(90deg, var(--jp-vermillion), var(--jp-gold));
}

.documents-chain-progress--complete .documents-chain-progress__bar::after {
    background: linear-gradient(90deg, #1f6c60, #4aa38b);
}

.documents-chain-progress--partial .documents-chain-progress__bar::after {
    background: linear-gradient(90deg, var(--jp-vermillion), var(--jp-gold));
}

.documents-chain-pagination {
    margin-top: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.documents-chain-pagination__summary {
    display: grid;
    gap: 2px;
}

.documents-chain-pagination__summary strong {
    color: var(--jp-ink);
}

.documents-chain-pagination__summary span {
    color: var(--jp-muted);
    font-size: 13px;
}

.documents-chain-pagination__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.documents-chain-pagination__button {
    width: auto;
    padding: 8px 14px;
}

.documents-chain-pagination__disabled {
    padding: 8px 14px;
    border-radius: 999px;
    background: #ece4d8;
    color: #8b8d90;
    font-weight: 600;
}

.packing-lists-section {
    gap: 0;
}

.packing-lists-feedback {
    margin-bottom: 18px;
}

.packing-lists-upload {
    margin: 0 0 24px;
    padding: 18px;
    border: 1px solid #e5d9cc;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(249, 244, 237, 0.94));
}

.packing-lists-upload__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    flex-wrap: wrap;
}

.packing-lists-upload__header h4 {
    margin: 0 0 4px;
    color: var(--jp-ink);
}

.packing-lists-upload__header p {
    margin: 0;
    color: var(--jp-muted);
}

.form.filters-card.packing-lists-upload__form {
    max-width: none;
    margin-top: 16px;
    margin-bottom: 0;
}

.form.filters-card.packing-lists-upload__form .filters-actions {
    align-self: end;
}

.packing-lists-upload__note {
    margin: 12px 0 0;
    color: var(--jp-muted);
    font-size: 12px;
}

.packing-lists-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
}

.packing-list-card {
    display: grid;
    gap: 18px;
    padding: 22px;
    border: 1px solid #e6dacd;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(253, 250, 246, 0.96));
    box-shadow: 0 14px 28px rgba(29, 27, 24, 0.07);
}

.packing-list-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.packing-list-card__title-block {
    min-width: 0;
}

.packing-list-card__eyebrow {
    display: inline-flex;
    margin-bottom: 8px;
    color: #7a5c31;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.packing-list-card__title-block h4 {
    margin: 0;
    color: var(--jp-ink);
    font-size: 1.08rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.packing-list-card__meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
    gap: 12px;
}

.packing-list-card__body {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.95fr);
    gap: 18px;
    align-items: start;
}

.packing-list-card__meta-item {
    display: grid;
    gap: 3px;
    padding: 12px 13px;
    border: 1px solid #ece0d4;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.8);
}

.packing-list-card__meta-label {
    color: var(--jp-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.packing-list-card__meta-value {
    color: var(--jp-ink);
    font-size: 0.98rem;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.packing-list-card__documents {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.packing-list-card__document {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.packing-list-card__document-label {
    color: var(--jp-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.packing-list-card__document .list-status-link {
    width: 100%;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
}

.packing-list-card__document-empty {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 8px 10px;
    border: 1px dashed #dccfbf;
    border-radius: 12px;
    background: #f8f2eb;
    color: #7b807f;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
}

.packing-list-card__footer {
    display: flex;
    justify-content: flex-end;
}

.packing-list-card__view {
    width: auto;
}

.commercial-invoices-section {
    gap: 0;
}

.commercial-invoice-list {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
}

.commercial-invoice-card {
    display: grid;
    gap: 18px;
    padding: 22px;
    border: 1px solid #e6dacd;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(253, 250, 246, 0.96));
    box-shadow: 0 14px 28px rgba(29, 27, 24, 0.07);
}

.commercial-invoice-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.commercial-invoice-card__title-wrap {
    min-width: 0;
}

.commercial-invoice-card__eyebrow {
    display: inline-flex;
    margin-bottom: 8px;
    color: #7a5c31;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.commercial-invoice-card__title-wrap h4 {
    margin: 0;
    color: var(--jp-ink);
    font-size: 1.08rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.commercial-invoice-card__body {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.95fr);
    gap: 18px;
    align-items: start;
}

.commercial-invoice-card__meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
}

.commercial-invoice-card__meta-item {
    display: grid;
    gap: 3px;
    padding: 12px 13px;
    border: 1px solid #ece0d4;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.8);
}

.commercial-invoice-card__meta-label {
    color: var(--jp-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.commercial-invoice-card__meta-value {
    color: var(--jp-ink);
    font-size: 0.98rem;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.commercial-invoice-card__documents {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.commercial-invoice-card__document {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.commercial-invoice-card__document-label {
    color: var(--jp-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.commercial-invoice-card__document .list-status-link {
    width: 100%;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
}

.commercial-invoice-card__document-empty {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 8px 10px;
    border: 1px dashed #dccfbf;
    border-radius: 12px;
    background: #f8f2eb;
    color: #7b807f;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
}

.commercial-invoice-card__footer {
    display: flex;
    justify-content: flex-end;
}

.commercial-invoice-card__view {
    width: auto;
}

.invoices-section {
    gap: 0;
}

.invoice-list {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
}

.invoice-card {
    display: grid;
    gap: 18px;
    padding: 22px;
    border: 1px solid #e6dacd;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(253, 250, 246, 0.96));
    box-shadow: 0 14px 28px rgba(29, 27, 24, 0.07);
}

.invoice-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.invoice-card__title-wrap {
    min-width: 0;
}

.invoice-card__eyebrow {
    display: inline-flex;
    margin-bottom: 8px;
    color: #7a5c31;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.invoice-card__title-wrap h4 {
    margin: 0;
    color: var(--jp-ink);
    font-size: 1.08rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.invoice-card__body {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.95fr);
    gap: 18px;
    align-items: start;
}

.invoice-card__summary {
    display: grid;
    gap: 14px;
}

.invoice-card__meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
}

.invoice-card__meta-item {
    display: grid;
    gap: 3px;
    padding: 12px 13px;
    border: 1px solid #ece0d4;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.8);
}

.invoice-card__meta-label {
    color: var(--jp-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.invoice-card__meta-value {
    color: var(--jp-ink);
    font-size: 0.98rem;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.invoice-card__amounts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
}

.invoice-card__amount {
    display: grid;
    gap: 4px;
    padding: 13px 14px;
    border: 1px solid #e7d7c7;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(252, 248, 242, 0.92), rgba(255, 255, 255, 0.96));
}

.invoice-card__amount--total {
    background: linear-gradient(180deg, rgba(247, 239, 227, 0.98), rgba(255, 250, 245, 0.96));
    border-color: #dcc7ad;
}

.invoice-card__amount--due {
    background: linear-gradient(180deg, rgba(233, 244, 255, 0.96), rgba(246, 251, 255, 0.98));
    border-color: #b8d4ee;
}

.invoice-card__amount-label {
    color: var(--jp-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.invoice-card__amount-value {
    color: var(--jp-ink);
    font-size: 1.02rem;
    line-height: 1.35;
}

.invoice-card__documents {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.invoice-card__document {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.invoice-card__document-label {
    color: var(--jp-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.invoice-card__document .list-status-link {
    width: 100%;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
}

.invoice-card__document-empty {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 8px 10px;
    border: 1px dashed #dccfbf;
    border-radius: 12px;
    background: #f8f2eb;
    color: #7b807f;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
}

.invoice-card__footer {
    display: flex;
    justify-content: flex-end;
}

.invoice-card__view {
    width: auto;
}

.proformas-section {
    gap: 0;
}

.proforma-list {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
}

.proforma-card {
    display: grid;
    gap: 18px;
    padding: 22px;
    border: 1px solid #e6dacd;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(253, 250, 246, 0.96));
    box-shadow: 0 14px 28px rgba(29, 27, 24, 0.07);
}

.proforma-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.proforma-card__title-wrap {
    min-width: 0;
}

.proforma-card__eyebrow {
    display: inline-flex;
    margin-bottom: 8px;
    color: #7a5c31;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.proforma-card__title-wrap h4 {
    margin: 0;
    color: var(--jp-ink);
    font-size: 1.08rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.proforma-card__body {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.95fr);
    gap: 18px;
    align-items: start;
}

.proforma-card__meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
}

.proforma-card__meta-item {
    display: grid;
    gap: 3px;
    padding: 12px 13px;
    border: 1px solid #ece0d4;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.8);
}

.proforma-card__meta-label {
    color: var(--jp-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.proforma-card__meta-value {
    color: var(--jp-ink);
    font-size: 0.98rem;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.proforma-card__documents {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.proforma-card__document {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.proforma-card__document-label {
    color: var(--jp-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.proforma-card__document .list-status-link {
    width: 100%;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
}

.proforma-card__document-empty {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 8px 10px;
    border: 1px dashed #dccfbf;
    border-radius: 12px;
    background: #f8f2eb;
    color: #7b807f;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
}

.proforma-card__footer {
    display: flex;
    justify-content: flex-end;
}

.proforma-card__view {
    width: auto;
}

.estimates-page .estimate-list {
    gap: 14px;
}

.estimates-page .estimate-card {
    gap: 12px;
    padding: 16px 18px;
    border-radius: 16px;
}

.estimates-page .proforma-card__header {
    gap: 10px;
    align-items: center;
}

.estimates-page .proforma-card__title-wrap {
    display: grid;
    gap: 5px;
}

.estimates-page .proforma-card__eyebrow {
    margin-bottom: 0;
}

.estimates-page .proforma-card__title-wrap h4 {
    font-size: 1.02rem;
    line-height: 1.25;
}

.estimates-page .proforma-card__body {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
}

.estimates-page .proforma-card__meta-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.estimates-page .proforma-card__meta-item {
    padding: 9px 11px;
    border-radius: 12px;
}

.estimates-page .proforma-card__meta-value {
    font-size: 0.95rem;
    line-height: 1.3;
}

.estimates-page .proforma-card__footer {
    margin-top: 0;
}

.estimates-page .proforma-card__view {
    min-height: 38px;
    padding: 8px 16px;
}

.receipts-section {
    gap: 0;
}

.receipt-list {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
}

.receipt-card {
    display: grid;
    gap: 18px;
    padding: 22px;
    border: 1px solid #e6dacd;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(253, 250, 246, 0.96));
    box-shadow: 0 14px 28px rgba(29, 27, 24, 0.07);
}

.receipt-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.receipt-card__title-wrap {
    min-width: 0;
}

.receipt-card__eyebrow {
    display: inline-flex;
    margin-bottom: 8px;
    color: #7a5c31;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.receipt-card__title-wrap h4 {
    margin: 0;
    color: var(--jp-ink);
    font-size: 1.08rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.receipt-card__header .list-status-link {
    flex-shrink: 0;
}

.receipt-card__body {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.95fr);
    gap: 18px;
    align-items: start;
}

.receipt-card__meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

.receipt-card__meta-item {
    display: grid;
    gap: 3px;
    padding: 12px 13px;
    border: 1px solid #ece0d4;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.8);
}

.receipt-card__meta-label {
    color: var(--jp-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.receipt-card__meta-value {
    color: var(--jp-ink);
    font-size: 0.98rem;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.receipt-card__documents {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.receipt-card__document {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.receipt-card__document-label {
    color: var(--jp-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.receipt-card__document-links {
    display: grid;
    gap: 10px;
}

.receipt-card__document-link {
    display: grid;
    gap: 4px;
    padding: 12px 13px;
    border: 1px solid #e2d4c5;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(252, 248, 242, 0.96), rgba(255, 255, 255, 0.98));
    color: var(--jp-ink);
    text-decoration: none;
    transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.receipt-card__document-link:hover,
.receipt-card__document-link:focus-visible {
    transform: translateY(-1px);
    border-color: #d2b89a;
    box-shadow: 0 10px 20px rgba(29, 27, 24, 0.08);
    text-decoration: none;
}

.receipt-card__document-link-type {
    color: #7a5c31;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.receipt-card__document-link-ref {
    color: var(--jp-ink);
    font-size: 0.96rem;
    font-weight: 600;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.receipt-card__document-value,
.receipt-card__document-empty {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 8px 10px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.receipt-card__document-value {
    border: 1px solid #ece0d4;
    background: rgba(255, 255, 255, 0.84);
    color: var(--jp-ink);
}

.receipt-card__document-empty {
    border: 1px dashed #dccfbf;
    background: #f8f2eb;
    color: #7b807f;
}

.receipt-card__footer {
    display: flex;
    justify-content: flex-end;
}

.receipt-card__view {
    width: auto;
}

.orders-page {
    gap: 24px;
}

.orders-section {
    gap: 0;
}

.orders-filters {
    margin-bottom: 24px;
}

.orders-status-filter {
    grid-column: 1 / -1;
    display: grid;
    gap: 10px;
    padding: 14px 16px;
    border: 1px solid #e7d9cb;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(255, 252, 248, 0.96), rgba(255, 255, 255, 0.92));
}

.orders-status-filter__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.orders-status-filter__label {
    margin: 0;
    color: var(--jp-ink);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.orders-status-filter__actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.orders-status-filter .status-filter-box.compact {
    margin-top: 0;
    padding: 8px;
    border-radius: 14px;
    border-color: #e0d4c7;
    background: rgba(255, 255, 255, 0.94);
}

.orders-status-filter .status-filter-grid.compact {
    gap: 6px;
}

.orders-status-filter .status-option.compact {
    min-height: 38px;
    padding: 4px 10px 4px 6px;
    border-radius: 999px;
}

.order-list {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
}

.order-list-card {
    display: grid;
    gap: 14px;
    padding: 18px;
    border: 1px solid #e6dacd;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(253, 250, 246, 0.96));
    box-shadow: 0 14px 28px rgba(29, 27, 24, 0.07);
}

.order-list-card--order {
    border-left: 4px solid #9fb6d6;
}

.order-list-card--preorder {
    border-left: 4px solid #94c7c2;
}

.order-list-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.order-list-card__title-wrap {
    min-width: 0;
    display: grid;
    gap: 6px;
}

.order-list-card__title-wrap h4 {
    margin: 0;
    color: var(--jp-ink);
    font-size: 1.02rem;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.order-list-card__chips {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.order-list-card__header .list-status-link {
    flex-shrink: 0;
}

.order-list-card__body {
    display: grid;
    gap: 12px;
    align-items: start;
}

.order-list-card__summary {
    display: grid;
    gap: 14px;
}

.order-list-card__note {
    padding: 10px 12px;
    border: 1px dashed #d9ccbc;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.82);
    color: #45505e;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.4;
}

.order-list-card__meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.order-list-card__meta-item {
    display: grid;
    gap: 3px;
    padding: 10px 12px;
    border: 1px solid #ece0d4;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.8);
}

.order-list-card__meta-item--total {
    background: linear-gradient(180deg, rgba(233, 244, 255, 0.92), rgba(246, 251, 255, 0.98));
    border-color: #b8d4ee;
}

.order-list-card__meta-label {
    color: var(--jp-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.order-list-card__meta-value {
    color: var(--jp-ink);
    font-size: 0.96rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.order-list-card__inline-action {
    margin-top: 8px;
}

.order-list-card__inline-action .search-button {
    width: 100%;
}

.order-list-card__amounts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 12px;
}

.order-list-card__amount {
    display: grid;
    gap: 4px;
    padding: 14px 15px;
    border: 1px solid #e7d7c7;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(252, 248, 242, 0.92), rgba(255, 255, 255, 0.96));
}

.order-list-card__amount--total {
    background: linear-gradient(180deg, rgba(233, 244, 255, 0.96), rgba(246, 251, 255, 0.98));
    border-color: #b8d4ee;
}

.order-list-card__amount-label {
    color: var(--jp-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.order-list-card__amount-value {
    color: var(--jp-ink);
    font-size: 1.08rem;
    line-height: 1.35;
}

.order-list-card__panels {
    display: grid;
    gap: 12px;
}

.order-list-card__panel {
    display: grid;
    gap: 6px;
    padding: 14px;
    border: 1px solid #e4d7c8;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.86);
}

.order-list-card__panel-label {
    color: var(--jp-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.order-list-card__panel-value {
    color: var(--jp-ink);
    font-size: 1rem;
    line-height: 1.35;
}

.order-list-card__panel-text {
    margin: 0;
    color: #586170;
    font-size: 0.92rem;
    line-height: 1.5;
}

.order-list-card__footer {
    display: flex;
    justify-content: flex-end;
}

.order-list-card__view {
    width: auto;
}

.accounting-entries-page {
    gap: 24px;
}

.accounting-entries-section {
    gap: 0;
}

.accounting-entries-feedback {
    margin-top: 0;
    margin-bottom: 18px;
}

.accounting-entries-filters {
    margin-bottom: 24px;
}

.accounting-entries-grid {
    display: grid;
    gap: 18px;
}

.accounting-panel {
    display: grid;
    gap: 16px;
    padding: 20px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(253, 250, 246, 0.96));
}

.accounting-panel__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    flex-wrap: wrap;
}

.accounting-panel__header--stacked {
    justify-content: flex-start;
}

.accounting-panel__header-main {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.accounting-panel__header h4 {
    margin: 0;
    color: var(--jp-ink);
    font-size: 1.08rem;
}

.accounting-panel__stats {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    color: var(--jp-muted);
    font-size: 13px;
    line-height: 1.4;
}

.accounting-panel__status-note,
.accounting-panel__instructions {
    margin: 0;
    color: #586170;
    font-size: 13px;
    line-height: 1.5;
}

.accounting-panel__actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.accounting-panel__actions .search-button {
    width: auto;
}

.accounting-panel__table-wrap {
    overflow-x: auto;
    border: 1px solid #ddd1c3;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.92);
}

.accounting-table {
    width: 100%;
    min-width: 720px;
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.accounting-table__col-line {
    width: 72px;
}

.accounting-table__col-status,
.accounting-table__col-date {
    width: 120px;
}

.accounting-table__col-amount {
    width: 140px;
    text-align: right !important;
}

.accounting-table__amount {
    text-align: right;
    white-space: nowrap;
}

.accounting-table__empty {
    padding: 14px 12px !important;
    color: var(--jp-muted);
}

.accounting-line-row {
    cursor: pointer;
}

.order-items-table tbody tr.accounting-line-row.is-selected,
.order-items-table tbody tr.accounting-line-row.is-selected td,
.order-items-table tbody tr.accounting-line-row.is-selected:hover,
.order-items-table tbody tr.accounting-line-row.is-selected:hover td {
    background-color: #e8f2ff !important;
}

.accounting-line-status--integrated {
    color: #2f855a;
    font-weight: 700;
}

.accounting-line-status--pending {
    color: #92400e;
    font-weight: 700;
}

.accounting-hidden-form {
    display: none;
}

.accounting-entries-textarea {
    width: 100%;
    min-height: 360px;
    padding: 14px 16px;
    border: 1px solid #ddd1c3;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--jp-ink);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace;
    font-size: 13px;
    line-height: 1.45;
    white-space: pre;
    tab-size: 4;
    resize: vertical;
    box-sizing: border-box;
}

/* Public landing and auth pages */
.public-shell {
    width: 100%;
    max-width: var(--content-max-width);
    margin: 0 auto;
    display: grid;
    gap: 18px;
    text-align: left;
}

.public-shell p {
    margin: 0;
    color: var(--jp-muted);
    font-size: 0.98rem;
    line-height: 1.6;
}

.public-shell h3,
.public-shell h4 {
    color: var(--jp-ink);
}

.public-shell ul,
.public-shell ol {
    margin: 0;
    padding-left: 18px;
}

.public-shell--narrow {
    max-width: 960px;
}

.public-shell a {
    overflow-wrap: anywhere;
}

.public-shell a:not(.search-button) {
    color: var(--jp-indigo);
    text-decoration-color: rgba(31, 42, 68, 0.35);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.18em;
}

.public-shell a:not(.search-button):hover,
.public-shell a:not(.search-button):focus-visible {
    text-decoration-color: currentColor;
}

.public-shell .search-results {
    width: 100%;
    max-width: var(--content-max-width);
    margin: 0 auto;
    text-align: left;
}

.public-hero {
    margin-bottom: 0;
}

.public-hero__main {
    grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.95fr);
    gap: 18px;
}

.public-hero__lead {
    max-width: 720px;
    color: #505866 !important;
    font-size: 1.08rem !important;
    font-weight: 600;
    line-height: 1.55 !important;
}

.public-hero .documents-hero__spotlight-value {
    font-size: clamp(1.3rem, 2vw, 1.9rem);
}

.public-hero .documents-hero-summary__value {
    font-size: 1rem;
    line-height: 1.35;
}

.contact-hero .documents-hero__main {
    grid-template-columns: minmax(0, 1fr) max-content;
    align-items: center;
    margin-bottom: 0;
}

.contact-hero .documents-hero__spotlight {
    width: fit-content;
    max-width: 100%;
    justify-self: end;
}

.contact-hero__email {
    display: inline-block;
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: normal;
    font-size: clamp(1.1rem, 1.7vw, 1.65rem);
    line-height: 1.08;
}

.public-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.public-inline-button {
    width: auto;
    min-height: 48px;
    padding: 0 20px;
    border-radius: 999px;
}

.public-note {
    color: #6a6f7a !important;
    font-size: 0.92rem !important;
}

.public-list {
    display: grid;
    gap: 10px;
    color: var(--jp-muted);
}

.public-list--compact {
    gap: 8px;
}

.public-list li {
    color: var(--jp-muted);
    padding-left: 4px;
}

.public-surface {
    display: grid;
    gap: 14px;
    min-width: 0;
    padding: 18px;
    border: 1px solid #e1d6c8;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.84);
}

.public-surface h3,
.public-surface h4 {
    margin: 0;
}

.public-surface--form {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(253, 250, 246, 0.94));
}

.public-surface__eyebrow {
    display: inline-flex;
    width: fit-content;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(31, 42, 68, 0.05);
    color: #7a5c31;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.public-login-card {
    align-self: stretch;
}

.public-login-card .form,
.public-login-card .public-form {
    gap: 12px;
}

.public-login-card .search-button {
    width: 100%;
}

.public-spotlight-card {
    align-content: start;
}

.public-spotlight-card .public-inline-button {
    margin-top: 6px;
}

.public-feature-card {
    position: relative;
    display: grid;
    gap: 10px;
    min-height: 100%;
    padding: 22px 20px 20px;
    border: 1px solid #eadfce;
    border-radius: 18px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 12px 24px rgba(29, 27, 24, 0.07);
}

.public-feature-card::before {
    content: '';
    position: absolute;
    top: 1px;
    left: 1px;
    right: 1px;
    height: 4px;
    border-radius: 17px 17px 0 0;
    background: linear-gradient(90deg, var(--jp-vermillion), var(--jp-gold));
}

.public-feature-card strong {
    color: var(--jp-ink);
    font-size: 1.05rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.public-feature-card .documents-shortcuts__summary {
    margin: 0;
}

.public-section {
    margin-bottom: 0;
}

.public-section-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.public-section-grid > .documents-chain-section {
    margin-bottom: 0;
}

.public-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
}

.public-step {
    position: relative;
    padding-top: 52px;
}

.public-step__index {
    position: absolute;
    top: 16px;
    right: 18px;
    color: rgba(27, 123, 200, 0.25);
    font-family: 'Sora', 'IBM Plex Sans', sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1;
}

.public-auth-grid,
.public-request-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.18fr) minmax(280px, 0.82fr);
    gap: 18px;
    align-items: start;
}

.public-auth-help,
.public-request-aside {
    display: grid;
    gap: 14px;
}

.public-form {
    gap: 14px;
}

.public-form .form-group {
    gap: 6px;
}

.public-form .form-group label {
    color: var(--jp-ink);
    font-weight: 700;
}

.public-form .form-group input,
.public-form .form-group select,
.public-form .form-group textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    border: 1px solid #d9cfc3;
    border-radius: 12px;
    background: #fffefb;
    color: var(--jp-ink);
    transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.public-form .form-group textarea {
    min-height: 150px;
    resize: vertical;
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.5;
}

.public-form .form-group input:focus,
.public-form .form-group select:focus,
.public-form .form-group textarea:focus {
    outline: none;
    border-color: var(--jp-indigo);
    box-shadow: 0 0 0 3px rgba(27, 123, 200, 0.12);
    background: #ffffff;
}

.public-form .cf-turnstile {
    max-width: 100%;
}

.public-form__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.public-form__actions .search-button {
    min-width: 160px;
    border-radius: 999px;
}

.public-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.public-form-grid__full {
    grid-column: 1 / -1;
}

.hp-field-wrap {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.public-faq {
    display: grid;
    gap: 10px;
}

.public-faq details {
    border: 1px solid #eadfce;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.86);
    padding: 14px 16px;
}

.public-faq summary {
    cursor: pointer;
    color: var(--jp-ink);
    font-weight: 700;
}

.public-faq details p {
    margin-top: 10px;
}

.site-footer {
    margin-top: 36px;
    padding: 18px 0 24px;
    border-top: 1px solid #e4d8cb;
    background: linear-gradient(180deg, rgba(250, 246, 240, 0.82), rgba(255, 255, 255, 0.96));
}

.site-footer__inner {
    width: 100%;
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    color: var(--jp-muted);
    font-size: 13px;
}

.site-footer__brand {
    color: var(--jp-muted);
}

.site-footer__links {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.site-footer__link {
    color: var(--jp-muted);
    font-weight: 600;
    text-decoration: none;
}

.site-footer__link:hover,
.site-footer__link:focus-visible {
    color: var(--jp-indigo);
    text-decoration: underline;
}

@media (max-width: 980px) {
    .documents-hero__main {
        grid-template-columns: 1fr;
    }

    .documents-chain-toolbar {
        align-items: flex-start;
    }

    .invoice-card__body,
    .commercial-invoice-card__body,
    .packing-list-card__body,
    .proforma-card__body,
    .receipt-card__body,
    .order-list-card__body {
        grid-template-columns: 1fr;
    }

    .public-hero__main,
    .public-section-grid,
    .public-auth-grid,
    .public-request-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 920px) {
    .documents-chain-section__header {
        align-items: flex-start;
    }

    .documents-shortcuts__header {
        align-items: flex-start;
    }

    .packing-lists-upload__header,
    .invoice-card__header,
    .commercial-invoice-card__header,
    .packing-list-card__header,
    .proforma-card__header,
    .receipt-card__header,
    .order-list-card__header,
    .orders-status-filter__header,
    .accounting-panel__header {
        flex-direction: column;
        align-items: flex-start;
    }

}

@media (max-width: 640px) {
    .documents-hub {
        gap: 16px;
    }

    .documents-hero,
    .documents-shortcuts,
    .documents-chain-section {
        padding: 14px;
        border-radius: 14px;
    }

    .documents-hero__summary {
        grid-template-columns: 1fr;
    }

    .documents-shortcuts__header,
    .documents-chain-section__header,
    .documents-chain-filters__intro {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .documents-shortcuts__header p {
        max-width: none;
    }

    .documents-shortcuts__grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .documents-shortcuts__item {
        padding: 18px 16px 16px;
        border-radius: 14px;
    }

    .documents-hero__spotlight,
    .documents-chain-filters__summary {
        padding: 12px;
    }

    .documents-chain-filters__summary {
        width: 100%;
        text-align: left;
    }

    .documents-chain-pagination__summary {
        width: 100%;
    }

    .documents-chain-pagination__actions {
        width: 100%;
    }

    .documents-chain-pagination__button,
    .documents-chain-pagination__disabled {
        flex: 1 1 0;
        justify-content: center;
        text-align: center;
    }

    .accounting-panel {
        padding: 16px;
        border-radius: 14px;
    }

    .accounting-panel__actions {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .accounting-panel__actions .search-button {
        width: 100%;
    }

    .accounting-entries-textarea {
        min-height: 280px;
        padding: 12px 14px;
        border-radius: 14px;
    }

    .public-shell {
        gap: 16px;
    }

    .public-surface,
    .public-feature-card {
        padding: 16px;
        border-radius: 14px;
    }

    .public-actions,
    .public-form__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .public-actions .search-button,
    .public-inline-button,
    .public-form__actions .search-button {
        width: 100%;
    }

    .public-form-grid {
        grid-template-columns: 1fr;
    }

    .public-step {
        padding-top: 46px;
    }

    .public-step__index {
        right: 16px;
    }

    .site-footer__inner {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 980px) {
    .documents-chain-filters {
        grid-template-columns: 1fr;
    }

    .documents-chain-toolbar {
        margin-bottom: 18px;
    }

    .documents-chain-table-wrap {
        overflow: visible;
    }

    .documents-chain-table {
        min-width: 0;
        border: none;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    .documents-chain-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .documents-chain-table,
    .documents-chain-table tbody,
    .documents-chain-table tr,
    .documents-chain-table td {
        display: block;
        width: 100%;
    }

    .documents-chain-table tbody {
        display: grid;
        gap: 14px;
    }

    .documents-chain-table tbody tr {
        padding: 16px;
        border: 1px solid #e4d7c9;
        border-radius: 18px;
        background: rgba(255, 255, 255, 0.94);
        box-shadow: 0 10px 24px rgba(29, 27, 24, 0.07);
    }

    .documents-chain-table tbody tr:nth-child(even) td,
    .documents-chain-table tbody tr:hover td {
        background: transparent;
    }

    .documents-chain-table td {
        display: grid;
        grid-template-columns: minmax(108px, 120px) minmax(0, 1fr);
        gap: 10px;
        padding: 0;
        border-bottom: none;
        align-items: start;
    }

    .documents-chain-table td + td {
        margin-top: 12px;
        padding-top: 12px;
        border-top: 1px solid #efe2d3;
    }

    .documents-chain-table td::before {
        content: attr(data-label);
        color: #7a6c5c;
        font-size: 11px;
        font-weight: 700;
        letter-spacing: 0.08em;
        line-height: 1.4;
        text-transform: uppercase;
    }

    .documents-chain-table td > * {
        min-width: 0;
    }

    .documents-chain-access {
        padding: 10px;
        border-radius: 12px;
    }
}

@media (max-width: 640px) {
    .documents-chain-table tbody tr {
        padding: 14px;
        border-radius: 16px;
    }

    .documents-chain-table td {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .documents-chain-table td::before {
        margin-bottom: 2px;
    }

    .documents-chain-table td + td {
        margin-top: 10px;
        padding-top: 10px;
    }
}

.credit-breakdown {
    display: grid;
    gap: 14px;
}

.credit-breakdown__section {
    display: grid;
    gap: 6px;
    padding-top: 8px;
    border-top: 1px solid #e2e8f0;
}

.credit-breakdown__section:first-child {
    border-top: none;
    padding-top: 0;
}

.credit-breakdown__title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: #64748b;
}

.credit-breakdown__row {
    display: grid;
    grid-template-columns: minmax(160px, 1fr) auto;
    gap: 12px;
    align-items: baseline;
}

.credit-breakdown__label {
    font-weight: 600;
    color: #475569;
}

.credit-breakdown__value {
    font-weight: 700;
    color: #0f172a;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.credit-breakdown__total .credit-breakdown__label {
    color: #1f2933;
}

.credit-breakdown__total {
    padding-top: 0;
    border-top: none;
}

.credit-breakdown__total .credit-breakdown__value {
    display: inline-flex;
    align-items: center;
    justify-self: end;
    width: fit-content;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #1f2933;
}

.credit-breakdown__total .credit-breakdown__value--pos {
    border-color: #bbf7d0;
    background: #ecfdf3;
    color: #166534;
}

.credit-breakdown__total .credit-breakdown__value--neg {
    border-color: #fecaca;
    background: #fef2f2;
    color: #b91c1c;
}

.credit-breakdown__total .credit-breakdown__value--zero {
    border-color: #e2e8f0;
    background: #f8fafc;
    color: #475569;
}

@media (max-width: 720px) {
    .credit-breakdown__row {
        grid-template-columns: 1fr;
    }

    .credit-breakdown__value {
        text-align: left;
    }

    .credit-breakdown__total .credit-breakdown__value {
        justify-self: start;
    }
}

.order-action-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.credit-details {
    margin-top: 18px;
    border-top: 1px solid #e2e8f0;
    padding-top: 12px;
}

.credit-details > summary {
    list-style: none;
    cursor: pointer;
    font-weight: 700;
    color: #1f2933;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
    transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.credit-details > summary::-webkit-details-marker {
    display: none;
}

.credit-details > summary::before {
    content: "▸";
    font-size: 14px;
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: #dbeafe;
    color: #1d4ed8;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.credit-details[open] > summary::before {
    transform: rotate(90deg);
    background: #bfdbfe;
}

.credit-details > summary:hover {
    background: #e0e7ff;
    box-shadow: 0 3px 8px rgba(15, 23, 42, 0.12);
    transform: translateY(-1px);
}

.credit-details > summary:focus-visible {
    outline: 2px solid #93c5fd;
    outline-offset: 3px;
}

.credit-details__content {
    margin-top: 12px;
    display: grid;
    gap: 16px;
}

.credit-detail-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 16px;
    display: grid;
    gap: 12px;
}

.credit-detail-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.credit-detail-card__meta-group {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.credit-detail-card__header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
}

.credit-detail-card__meta {
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    padding: 2px 8px;
    border-radius: 999px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    white-space: nowrap;
}

.credit-detail-empty {
    margin: 0;
    padding: 12px;
    border-radius: 10px;
    border: 1px dashed #e2e8f0;
    background: #ffffff;
    color: #64748b;
    font-size: 13px;
}

.credit-table-wrap {
    width: 100%;
    max-height: 320px;
    overflow: auto;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    -webkit-overflow-scrolling: touch;
}

.credit-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 520px;
    font-size: 14px;
}

.credit-table th,
.credit-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
}

.credit-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f8fafc;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #64748b;
}

.credit-table tbody tr:nth-child(even) {
    background: #f8fafc;
}

.credit-table tbody tr:hover,
.credit-table tbody tr:nth-child(even):hover {
    background: #eef2f7;
}

.credit-table tbody tr:last-child td {
    border-bottom: none;
}

.credit-table tfoot td {
    background: #eaf2ff;
    color: #0f172a;
    font-weight: 700;
    border-bottom: none;
    border-top: 1px solid #cbd5e1;
}

.credit-table .credit-table__total-row td:first-child {
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 12px;
    color: #334155;
}

.credit-table__link {
    color: #1d4ed8;
    font-weight: 600;
    text-decoration: none;
}

.credit-table__link:hover {
    text-decoration: underline;
}

.credit-table .credit-table__number {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

@media (max-width: 720px) {
    .credit-table th,
    .credit-table td {
        white-space: nowrap;
    }

    .credit-table-wrap {
        max-height: 260px;
    }
}


@media (max-width: 720px) {
    .order-card {
        padding: 16px;
    }

    .order-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .order-info {
        padding: 12px;
    }

    .order-card .continue-shopping {
        width: 100%;
        text-align: center;
    }

    .order-action-row {
        flex-direction: column;
        align-items: stretch;
    }

    .order-action-row a {
        width: 100%;
        justify-content: center;
    }
}

.list-tooltip-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid #c4c9ce;
    background: #f1f3f5;
    color: #333;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
}
.list-tooltip-trigger:hover {
    background: #e9ecef;
}
.list-tooltip-trigger:focus {
    outline: none;
    border-color: #2196F3;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.16);
}

.tooltip-inline {
    display: inline-flex;
    align-items: center;
}

.list-tooltip {
    position: fixed;
    z-index: 9999;
    max-width: 420px;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(17, 24, 39, 0.95);
    color: #fff;
    font-size: 12px;
    line-height: 1.35;
    white-space: pre-line;
    pointer-events: none;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.08s ease, transform 0.08s ease;
}
.list-tooltip.list-tooltip-visible {
    opacity: 1;
    transform: translateY(0);
}

.list-status-link {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px 5px 18px;
    border-radius: 8px;
    background: #eef2f6;
    border: 1px solid #d7dde3;
    font-size: 12px;
    font-weight: 600;
    color: #1f2933;
    text-decoration: none;
    position: relative;
    line-height: 1.2;
}
.list-status-link::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 50%;
    width: 6px;
    height: 6px;
    border-radius: 999px;
    transform: translateY(-50%);
    background: #9aa3ad;
}
.list-status-link-draft::before {
    background: #6c757d;
}
.list-status-link-sent::before {
    background: #2563eb;
}
.list-status-link-cancelled::before {
    background: #b91c1c;
}
.list-status-link-confirmed::before {
    background: #2f9e44;
}
.list-status-link-sent {
    background: #e7f1ff;
    border-color: #b6d4fe;
    color: #084298;
}
.list-status-link-cancelled {
    background: #fdecea;
    border-color: #f5c2c7;
    color: #8a1c1c;
}
.list-status-link-confirmed {
    background: #e6f4ea;
    border-color: #b7e0c2;
    color: #1b7a3d;
}
.list-status-link:hover {
    background: #e2e8f0;
    border-color: #c2c9d0;
    text-decoration: none;
}

.oi-proforma-cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 220px;
}
.oi-proforma-wrap {
    white-space: normal;
}
.oi-proforma-label {
    font-size: 12px;
    font-weight: 600;
    color: #555;
}
.oi-proforma-status {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px 5px 18px;
    border-radius: 8px;
    border: 1px solid #d7dde3;
    font-size: 12px;
    font-weight: 600;
    width: fit-content;
    background: #eef2f6;
    color: #1f2933;
    position: relative;
    line-height: 1.2;
}
.oi-proforma-status::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 50%;
    width: 6px;
    height: 6px;
    border-radius: 999px;
    transform: translateY(-50%);
    background: #9aa3ad;
}
.oi-proforma-status-none {
    background: #f1f3f5;
    border-color: #d7dde3;
    color: #6c757d;
}
.oi-proforma-status-partial {
    background: #fff1d6;
    border-color: #f3d19b;
    color: #925b00;
}
.oi-proforma-status-partial::before {
    background: #f59e0b;
}
.oi-proforma-status-full {
    background: #e6f4ea;
    border-color: #b7e0c2;
    color: #1b7a3d;
}
.oi-proforma-status-full::before {
    background: #2f9e44;
}
.oi-proforma-status-closed {
    background: #f1f3f5;
    border-color: #d7dde3;
    color: #4b5563;
}
.oi-proforma-metrics {
    font-size: 11px;
    color: #556;
}
.oi-proforma-links {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.oi-proforma-chip {
    display: inline-flex;
    align-items: center;
    padding: 3px 6px 3px 16px;
    border-radius: 8px;
    background: #eef2f6;
    border: 1px solid #d7dde3;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.1;
    color: #1f2933;
    text-decoration: none;
    position: relative;
}
.oi-proforma-chip::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 50%;
    width: 6px;
    height: 6px;
    border-radius: 999px;
    transform: translateY(-50%);
    background: #9aa3ad;
}
.oi-proforma-chip-draft::before {
    background: #6c757d;
}
.oi-proforma-chip-sent::before {
    background: #2563eb;
}
.oi-proforma-chip-cancelled::before {
    background: #b91c1c;
}
.oi-proforma-chip-sent {
    background: #e7f1ff;
    border-color: #b6d4fe;
    color: #084298;
}
.oi-proforma-chip-cancelled {
    background: #fdecea;
    border-color: #f5c2c7;
    color: #8a1c1c;
}

.order-items-table {
    width: 100%;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    margin: 12px 0;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.order-items-table th {
    background-color: #f8fafc;
    color: #3b4a5a;
    padding: 10px 12px !important;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    border: 0 !important;
    border-right: 1px solid #e2e8f0 !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

.order-items-table td {
    padding: 10px 12px !important;
    border: 0 !important;
    border-right: 1px solid #e2e8f0 !important;
    border-bottom: 1px solid #e2e8f0 !important;
    color: #243040;
    vertical-align: top;
    background: transparent;
}

.line-cover {
    width: 64px;
    text-align: center;
}

.line-cover img {
    width: 48px;
    max-height: 68px;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    object-fit: cover;
}

.line-cover__empty {
    font-size: 12px;
    color: #94a3b8;
}

.pf-item-cell {
    min-width: 0;
}

.pf-item-title {
    font-weight: 600;
    line-height: 1.35;
    color: #1f2937;
}

.pf-item-meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.pf-item-meta-text {
    font-size: 12px;
    line-height: 1.35;
    color: #6b7280;
    font-variant-numeric: tabular-nums;
}

.pf-item-search-link {
    margin-top: 0;
}

.pf-weight-input {
    width: 90px;
    padding: 8px 10px;
    font-size: 1em;
    border: 2px solid #ddd;
    border-radius: 4px;
    transition: border-color 0.3s ease;
    background-color: #fff;
}

.pf-weight-input:focus {
    outline: none;
    border-color: #4CAF50;
}

.pf-readonly-inline {
    display: inline-block;
    min-width: 48px;
    font-variant-numeric: tabular-nums;
}

.fedex-quote-panel {
    margin-top: 12px;
    padding: 16px;
    border: 1px solid #d6e0ea;
    border-radius: 10px;
    background: linear-gradient(180deg, #f7fbff 0%, #ffffff 100%);
    text-align: left !important;
}

.fedex-quote-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.fedex-quote-title {
    margin: 0;
    font-size: 18px;
}

.fedex-quote-badges {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.fedex-chip {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    border: 1px solid #c8d9ea;
    background: #edf5ff;
    color: #1d4f8c;
    font-size: 12px;
    font-weight: 600;
}

.fedex-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 10px;
}

.fedex-grid-compact {
    margin-top: 4px;
}

.fedex-metric {
    padding: 10px;
    border: 1px solid #e3e8ef;
    border-radius: 8px;
    background: #fff;
}

.fedex-metric-quoted {
    border-color: #8eb5da;
    background: linear-gradient(180deg, #eef7ff 0%, #ffffff 100%);
    box-shadow: inset 0 0 0 1px rgba(142, 181, 218, 0.2);
}

.fedex-metric-label {
    display: block;
    margin-bottom: 4px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #6b7280;
}

.fedex-metric-value {
    color: #1f2937;
    font-weight: 600;
}

.fedex-metric-value-strong {
    color: #0b3e6e;
    font-size: 24px;
    line-height: 1.1;
    letter-spacing: 0.02em;
}

.fedex-quoted-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.fedex-amount-copy-btn {
    border: 1px solid #b6cee5;
    background: #ffffff;
    color: #0f4d83;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 12px;
    line-height: 1.2;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.fedex-amount-copy-btn:hover {
    background: #e9f3ff;
}

.fedex-amount-copy-btn:disabled {
    opacity: 0.75;
    cursor: default;
}

.fedex-section {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e4e9f0;
}

.fedex-section-title {
    margin: 0 0 8px 0;
    font-size: 14px;
}

.fedex-section-sub {
    margin-top: 8px;
}

.fedex-section-subtitle {
    margin: 0 0 6px 0;
    font-size: 13px;
}

.fedex-note-list {
    margin: 0;
    padding: 0;
    list-style: none;
    text-align: left !important;
}

.fedex-note-item {
    position: relative;
    margin: 0 0 5px 0;
    padding-left: 12px;
    color: #1f2937;
    text-align: left !important;
}

.fedex-note-item::before {
    content: "\2022";
    position: absolute;
    left: 0;
    top: 0;
    color: #6b7280;
    font-weight: 700;
}

.fedex-note-type {
    color: #7a2e00;
    font-weight: 600;
}

.fedex-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
    font-size: 12px;
    color: #0f3d6f;
}

.fedex-table-wrap {
    overflow-x: auto;
}

.fedex-rate-table {
    width: 100%;
    border-collapse: collapse;
}

.fedex-rate-table th,
.fedex-rate-table td {
    padding: 7px 8px;
    border: 1px solid #dbe3ec;
    font-size: 13px;
}

.fedex-rate-table th {
    text-align: left;
    background: #f3f7fb;
}

.fedex-rate-table .is-numeric {
    text-align: right;
    white-space: nowrap;
}

.fedex-rate-table tbody tr:nth-child(even) {
    background: #fbfdff;
}

.fedex-rate-table tbody tr:hover,
.fedex-rate-table tbody tr:nth-child(even):hover {
    background: #eef6ff;
}

.order-items-table th:last-child,
.order-items-table td:last-child {
    border-right: 0 !important;
}

.order-items-table tbody tr:last-child td {
    border-bottom: 0 !important;
}

.order-items-table tbody tr:nth-child(even):not(.order-line-closed-full):not(.order-line-closed-partial) {
    background-color: #fbfcfe;
}

.order-items-table tbody tr:not(.order-line-closed-full):not(.order-line-closed-partial):hover,
.order-items-table tbody tr:nth-child(even):not(.order-line-closed-full):not(.order-line-closed-partial):hover {
    background-color: #f1f5f9;
}

.order-items-table tr.order-line-closed-full {
    background-color: #fdecea;
}

.order-items-table tr.order-line-closed-partial {
    background-color: #fff4e5;
}

.order-items-table tr.order-line-closed-full td {
    background-color: #fdecea;
}

.order-items-table tr.order-line-closed-partial td {
    background-color: #fff4e5;
}

.order-items-table tr.order-line-closed-full:hover {
    background-color: #fbdede;
}

.order-items-table tr.order-line-closed-partial:hover {
    background-color: #ffe9cc;
}

.order-items-table tr.order-line-closed-full:hover td {
    background-color: #fbdede;
}

.order-items-table tr.order-line-closed-partial:hover td {
    background-color: #ffe9cc;
}

.order-items-table a {
    color: #1f4f9c;
    text-decoration: none;
}

.order-items-table a:hover {
    text-decoration: underline;
}

.order-link-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.order-link-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 8px;
    border: 1px solid #bcd3ff;
    background: #eaf2ff;
    color: #1e4ea8;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.1;
    text-decoration: none;
}

.order-link-chip--static {
    cursor: default;
}

.order-link-chip--static:hover {
    background: #eaf2ff;
    border-color: #bcd3ff;
    color: #1e4ea8;
}

.order-link-stack {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.order-link-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.order-link-line {
    font-size: 11px;
    color: #64748b;
}

.order-link-chip::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 999px;
    background: #2563eb;
    flex: 0 0 auto;
}

.order-link-chip:hover {
    background: #dfe9ff;
    border-color: #9cb9ff;
    color: #1b3f8a;
    text-decoration: none;
}

.order-link-chip:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.order-link-empty {
    color: #94a3b8;
    font-size: 11px;
}

.order-items-table input[type="number"],
.order-items-table input[type="text"] {
    padding: 6px 8px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
}

.orders-container.oi-table-wrap .order-items-table {
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.order-items-table.oi-admin-table th,
.order-items-table.oi-admin-table td {
    padding: 6px 8px !important;
    font-size: 12px;
}

.order-total {
    text-align: right;
    padding-top: 15px;
    border-top: 2px solid #f0f0f0;
    margin-top: 15px;
}

.order-total-amount {
    font-size: 1.3em;
    color: #4CAF50;
    margin: 0;
}

.orders-actions {
    text-align: center;
    margin: 30px 0;
    padding: 20px;
}


.orders-actions .continue-shopping {
    font-size: 1.1em;
    padding: 15px 30px;
}

/* Modern action buttons (admin actions, downloads, etc.) */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 30px;
    font-size: 1em;
    font-weight: bold;
    border-radius: 5px;
    border: none;
    background: #f1f3f5;
    color: #333;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.12s ease;
}
.btn:hover {
    background: #e9ecef;
}
.btn:active {
    background: #dee2e6;
}
.btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(33,150,243,0.18);
}
.btn:disabled,
.btn[aria-disabled="true"] {
    opacity: 1;
    cursor: not-allowed;
    background: #e9ecef;
    color: #6c757d;
    box-shadow: none;
}
.btn svg {
    width: 16px !important;
    height: 16px !important;
    min-width: 16px;
    min-height: 16px;
    flex: 0 0 auto;
    display: block;
}

.btn-primary {
    background-color: #4CAF50;
    color: white;
}
.btn-primary:hover {
    background-color: #45a049;
}
.btn-success {
    background-color: #4CAF50;
    color: white;
}
.btn-success:hover {
    background-color: #45a049;
}
.btn-secondary {
    background: #f1f3f5;
    color: #333;
}
.btn-secondary:hover {
    background: #e9ecef;
}

/* Authentication Styles */
.auth-link a {
    background-color: #2196F3;
    color: white;
    padding: 8px 15px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.auth-link a:hover {
    background-color: #0b7dda;
}

.auth-container {
    display: flex;
    justify-content: center;
    margin: 30px 0;
}

.auth-form {
    background-color: white;
    border: 2px solid #4CAF50;
    border-radius: 8px;
    padding: 40px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.auth-form h3 {
    color: #333;
    margin-bottom: 30px;
    text-align: center;
}

.form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form.filters-card {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    align-items: start;
    justify-content: start;
    justify-items: stretch;
    width: 100%;
    max-width: var(--content-max-width);
    margin: 20px auto 0;
    box-sizing: border-box;
}

.form-actions-row {
    display: flex;
    gap: 8px;
    width: 100%;
}

#offcatalog-form {
    gap: 18px 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.form-group label {
    font-weight: bold;
    color: #333;
    margin-bottom: 2px;
}

.form-group input {
    padding: 12px;
    font-size: 1em;
    border: 2px solid #ddd;
    border-radius: 4px;
    transition: border-color 0.3s ease;
}

.form-group select {
    padding: 12px;
    font-size: 1em;
    border: 2px solid #ddd;
    border-radius: 4px;
    transition: border-color 0.3s ease;
    background-color: #fff;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 20 20'%3E%3Cpath fill='%23666' d='M5.5 7.5L10 12l4.5-4.5 1.5 1.5L10 15 4 9z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.form-group input:focus {
    outline: none;
    border-color: var(--jp-indigo);
}

.form-group select:focus {
    outline: none;
    border-color: var(--jp-indigo);
}

.users-page .users-filters.form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    align-items: start;
    justify-content: start;
    justify-items: stretch;
    width: 100%;
    text-align: left;
}

.users-page .users-filters .form-group {
    align-items: flex-start;
    justify-content: flex-start;
    width: 100%;
}

.users-page .users-filters .form-group label {
    text-align: left;
}

.users-page .users-filters .form-group input,
.users-page .users-filters .form-group select {
    width: 100%;
}

@media (max-width: 640px) {
    .form-actions-row {
        flex-direction: column;
        align-items: stretch;
    }

    .form-actions-row .search-button {
        width: 100%;
    }

    .users-filters__actions,
    .filters-actions {
        justify-self: stretch;
        width: 100%;
    }

    .users-filters__actions-row,
    .filters-actions-row {
        width: 100%;
    }

    .users-filters__actions-row .search-button,
    .filters-actions-row .search-button {
        flex: 1;
    }
}

@media (max-width: 980px) {
    .form.filters-card.documents-chain-filters {
        grid-template-columns: 1fr;
    }

    .form.filters-card.documents-chain-filters .filters-actions,
    .form.filters-card.documents-chain-filters .filters-actions-row,
    .form.filters-card.documents-chain-filters .search-button {
        width: 100%;
        justify-self: stretch;
    }
}

.form-actions-row--compact {
    justify-content: flex-start;
    flex-wrap: wrap;
}

.form-actions-row--compact .search-button {
    flex: 0 0 auto;
    min-width: 120px;
    padding: 10px 18px;
    font-size: 0.95em;
}

.credit-filter-form {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
    justify-content: center;
    max-width: 1040px;
    width: 100%;
    margin: 20px auto 0;
}

.credit-filter-form .form-group {
    flex: 1 1 360px;
    min-width: 260px;
}

.credit-filter-form__actions {
    flex: 0 0 auto;
}

@media (max-width: 720px) {
    .credit-filter-form {
        justify-content: stretch;
    }

    .credit-filter-form .form-group,
    .credit-filter-form__actions {
        flex: 1 1 100%;
    }
}

.order-status-filter {
    grid-column: 1 / -1;
}

.status-filter-box {
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 8px 10px;
    background: #f8fafb;
}

.status-filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 6px;
}

.status-option {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid #d7dde3;
    background: #fff;
    color: #2f3b4a;
    font-weight: 600;
    font-size: 0.82em;
    line-height: 1.2;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.filters-card .form-group .status-option {
    text-transform: none;
    letter-spacing: 0;
}

.status-option span {
    font-family: "Barlow Condensed", "Helvetica Neue", Helvetica, sans-serif;
    font-size: 1.18em;
}

.filters-card .form-group .status-option span {
    text-transform: none;
    letter-spacing: 0;
}

.status-filter-box.compact {
    margin-top: 3px;
    padding: 6px 6px;
    border-width: 1px;
    background: #fff;
}

.status-filter-grid.compact {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.status-option.compact {
    display: grid;
    grid-template-columns: 16px 1fr;
    align-items: center;
    column-gap: 4px;
    padding: 2px 8px 2px 4px;
    font-weight: 600;
    font-size: 0.78em;
    line-height: 2.75;
}

.status-option.compact.status-option--wide {
    min-width: 0;
    flex: 0 1 auto;
}

.status-option.compact input {
    justify-self: start;
}

.status-action-btn {
    border: 1px solid #cfd6dc;
    background: #f1f3f5;
    color: #333;
    border-radius: 999px;
    padding: 2px 10px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
}
.status-action-btn:hover {
    background: #e9ecef;
}

.status-option input {
    margin: 0;
    accent-color: #4CAF50;
}

.status-option input:checked + span {
    color: #1f6f3a;
}

.status-option:hover {
    border-color: #b5c0c8;
    background: #f4f8f4;
}

.status-filter-hint {
    margin-top: 8px;
    font-size: 12px;
    color: #6b7280;
}

@media (max-width: 720px) {
    .order-status-filter {
        grid-column: span 1;
    }
}

/* Compact two-column admin forms */
.auth-form.user-edit-panel,
.auth-form.user-create-panel,
.auth-form.catalog-item-panel {
    max-width: 760px;
    width: 100%;
    text-align: left;
}

.user-edit-form,
.user-create-form,
.catalog-item-form,
.estimates-form,
.user-edit-panel .form,
.user-create-panel .form,
.catalog-item-panel .form {
    display: grid;
    gap: 12px;
}

.user-edit-forms {
    display: grid;
    gap: 16px;
}

.user-edit-form .form-group,
.user-create-form .form-group,
.catalog-item-form .form-group,
.estimates-form .form-group,
.user-edit-panel .form-group,
.user-create-panel .form-group,
.catalog-item-panel .form-group {
    display: grid;
    grid-template-columns: 180px 1fr;
    align-items: center;
    gap: 12px;
}

.user-edit-form .form-group label,
.user-create-form .form-group label,
.catalog-item-form .form-group label,
.estimates-form .form-group label,
.user-edit-panel .form-group label,
.user-create-panel .form-group label,
.catalog-item-panel .form-group label {
    margin: 0;
    text-align: right;
}

.user-edit-form .form-group.is-empty-group label,
.user-create-form .form-group.is-empty-group label,
.user-edit-panel .form-group.is-empty-group label {
    color: #8f3b33;
}

.estimate-editor.estimates-form .estimate-field label,
.estimate-editor .estimate-field.form-group label,
.estimates-form .estimate-field.form-group label {
    text-align: left;
}

.user-edit-form .form-group input,
.user-create-form .form-group input,
.catalog-item-form .form-group input,
.user-edit-form .form-group select,
.user-create-form .form-group select,
.catalog-item-form .form-group select,
.user-edit-form .form-group textarea,
.user-create-form .form-group textarea,
.catalog-item-form .form-group textarea,
.estimates-form .form-group input,
.estimates-form .form-group select,
.estimates-form .form-group textarea,
.user-edit-panel .form-group input,
.user-create-panel .form-group input,
.catalog-item-panel .form-group input,
.user-edit-panel .form-group select,
.user-create-panel .form-group select,
.catalog-item-panel .form-group select,
.user-edit-panel .form-group textarea,
.user-create-panel .form-group textarea,
.catalog-item-panel .form-group textarea {
    width: 100%;
    margin: 0;
}

.user-edit-form .is-empty-field,
.user-create-form .is-empty-field,
.user-edit-panel .is-empty-field {
    border-color: #d18e83;
    background: #fff3f1;
    box-shadow: inset 0 0 0 1px rgba(209, 142, 131, 0.25);
}

.user-edit-form .form-group textarea,
.user-create-form .form-group textarea,
.catalog-item-form .form-group textarea,
.estimates-form .form-group textarea,
.user-edit-panel .form-group textarea,
.user-create-panel .form-group textarea,
.catalog-item-panel .form-group textarea {
    padding: 12px;
    font-size: 1em;
    border: 2px solid #ddd;
    border-radius: 4px;
    transition: border-color 0.3s ease;
    resize: vertical;
}

.user-edit-form .form-group textarea:focus,
.user-create-form .form-group textarea:focus,
.catalog-item-form .form-group textarea:focus,
.estimates-form .form-group textarea:focus,
.user-edit-panel .form-group textarea:focus,
.user-create-panel .form-group textarea:focus,
.catalog-item-panel .form-group textarea:focus {
    outline: none;
    border-color: #4CAF50;
}

.user-edit-form .form-group.is-textarea,
.user-create-form .form-group.is-textarea,
.catalog-item-form .form-group.is-textarea,
.estimates-form .form-group.is-textarea,
.user-edit-panel .form-group.is-textarea,
.user-create-panel .form-group.is-textarea,
.catalog-item-panel .form-group.is-textarea {
    align-items: start;
}

.user-edit-form .form-group.is-textarea label,
.user-create-form .form-group.is-textarea label,
.catalog-item-form .form-group.is-textarea label,
.estimates-form .form-group.is-textarea label,
.user-edit-panel .form-group.is-textarea label,
.user-create-panel .form-group.is-textarea label,
.catalog-item-panel .form-group.is-textarea label {
    padding-top: 10px;
}

.user-edit-form .form-group.is-checkbox,
.user-edit-panel .form-group.is-checkbox {
    grid-template-columns: 180px auto;
    align-items: center;
}

.user-edit-form .form-group.is-checkbox input,
.user-edit-panel .form-group.is-checkbox input {
    justify-self: start;
}

.user-edit-form .form-actions,
.user-create-form .form-actions,
.catalog-item-form .form-actions,
.estimates-form .form-actions,
.user-edit-panel .form-actions,
.user-create-panel .form-actions,
.catalog-item-panel .form-actions {
    grid-column: 1 / -1;
}

/* User card layout */
.order-card.user-card {
    background: #ffffff;
    border: 1px solid #e8e1d8;
    border-left: 6px solid #94a3b8;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 10px 22px rgba(28, 27, 26, 0.08);
}

.order-card.user-card.user-card--admin {
    border-left-color: #4CAF50;
}

.order-card.user-card.user-card--tohan {
    border-left-color: #2563eb;
}

.order-card.user-card.user-card--client {
    border-left-color: #94a3b8;
}

.user-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    border-bottom: 1px solid #eee4d9;
    padding-bottom: 12px;
}

.user-card__identity {
    display: flex;
    gap: 14px;
    align-items: center;
    min-width: 240px;
}

.user-card__avatar {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(140deg, #2b354a 0%, #4b5366 100%);
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    box-shadow: 0 8px 16px rgba(31, 42, 68, 0.2);
}

.user-card__title {
    display: grid;
    gap: 6px;
}

.user-card .user-card__email {
    font-size: 1.2em;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
    overflow-wrap: anywhere;
}

.user-card .user-card__subtitle {
    margin: 0;
    color: #6b7280;
    font-size: 0.95em;
}

.user-card__meta {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
    font-size: 12px;
    color: #7b7f88;
}

.user-card__meta-dot {
    color: #d1c7bb;
}

.user-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
}

.user-card__actions .search-button {
    width: auto;
}

.user-card__toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 104px;
    justify-content: center;
    border-color: #cbd5e1;
    background: #ffffff;
    color: #334155;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.user-card__toggle-icon {
    font-size: 13px;
    line-height: 1;
    min-width: 1em;
    text-align: center;
}

.user-card__toggle.is-open {
    background: #1f4f46;
    border-color: #1f4f46;
    color: #ffffff;
    box-shadow: 0 0 0 3px rgba(31, 79, 70, 0.16);
}

.user-copy {
    border: 1px solid #d6d2ca;
    background: #f6f3ee;
    color: #2e2e2e;
    border-radius: 999px;
    font-size: 12px;
    padding: 6px 12px;
    cursor: pointer;
}

.user-copy:hover {
    background: #efe9e1;
}

.user-card .order-status {
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 0.75em;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 700;
}

.user-role-badge {
    background: #e2e8f0;
    color: #334155;
}

.user-role-badge--admin {
    background: #4CAF50;
    color: #fff;
}

.user-role-badge--tohan {
    background: #2563eb;
    color: #fff;
}

.user-role-badge--client {
    background: #e2e8f0;
    color: #334155;
}

.user-status--active {
    background: #e8f5e9;
    color: #1b5e20;
    border: 1px solid #b7e1c0;
}

.user-status--disabled {
    background: #f3f4f6;
    color: #4b5563;
    border: 1px solid #e5e7eb;
}

.user-card__quick {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    margin: 14px 0;
}

.user-quick-item {
    background: #fbfaf7;
    border: 1px solid #ede3d7;
    border-radius: 10px;
    padding: 10px 12px;
}

.user-quick-item__label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #7b7f88;
    display: block;
}

.user-quick-item__value {
    display: block;
    margin-top: 4px;
    font-weight: 600;
    color: #2b2b2b;
}

.order-info.user-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
    padding: 18px;
    background: #fbfaf7;
    border: 1px solid #eee4d9;
    border-radius: 10px;
}

.user-info-section {
    background: #fff;
    border: 1px solid #e8e1d8;
    border-radius: 10px;
    padding: 14px 16px;
    display: grid;
    gap: 10px;
    box-shadow: 0 2px 8px rgba(28, 27, 26, 0.04);
}

.user-info-section h4 {
    margin: 0;
    font-size: 0.8em;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #475569;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 6px;
}

.user-info-list {
    margin: 0;
    display: grid;
    gap: 10px;
}

.user-info-list div {
    display: grid;
    grid-template-columns: minmax(120px, 150px) 1fr;
    gap: 10px;
    align-items: start;
}

.user-info-list dt {
    margin: 0;
    font-size: 0.8em;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
}

.user-info-list dd {
    margin: 0;
    color: #0f172a;
    font-weight: 600;
    min-width: 0;
    word-break: break-word;
    line-height: 1.4;
    font-variant-numeric: tabular-nums;
}

/* User form layout */
.user-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.user-edit-panel {
    margin-top: 16px;
    padding: 18px;
}

.user-edit-panel__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.user-edit-panel__header h4 {
    margin: 0;
}

.user-edit-panel__body {
    display: grid;
    gap: 16px;
}

.user-form-section {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 14px;
    display: grid;
    gap: 12px;
    align-content: start;
}

.user-form-section h4 {
    margin: 0;
    font-size: 0.95em;
    color: #333;
}

.user-form-section .form-group {
    grid-template-columns: 140px 1fr;
}

.user-form-section .form-group.is-checkbox {
    grid-template-columns: 140px auto;
    align-items: center;
}

.user-form-section .form-group.is-checkbox input {
    justify-self: start;
}

/* Profile Styles */
.profile-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

.profile-card {
    background: var(--jp-paper-2);
    border: 1px solid var(--jp-border);
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--jp-shadow);
}

.profile-card h3 {
    color: var(--jp-ink);
    margin-bottom: 20px;
    border-bottom: 1px solid var(--jp-border);
    padding-bottom: 10px;
}

.profile-info p {
    margin: 12px 0;
    color: var(--jp-muted);
    font-size: 1.05em;
    overflow-wrap: anywhere;
}

.profile-info strong {
    color: var(--jp-ink);
    font-weight: bold;
}

@media (max-width: 768px) {
    .auth-form {
        padding: 25px;
        max-width: 100%;
    }
    
    .profile-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .auth-form.user-edit-panel,
    .auth-form.user-create-panel,
    .auth-form.catalog-item-panel {
        max-width: 100%;
    }

    .user-edit-form .form-group,
    .user-create-form .form-group,
    .catalog-item-form .form-group,
    .estimates-form .form-group,
    .user-edit-form .form-group.is-checkbox,
    .user-edit-panel .form-group,
    .user-create-panel .form-group,
    .catalog-item-panel .form-group,
    .user-edit-panel .form-group.is-checkbox {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .user-edit-form .form-group label,
    .user-create-form .form-group label,
    .catalog-item-form .form-group label,
    .estimates-form .form-group label,
    .user-edit-panel .form-group label,
    .user-create-panel .form-group label,
    .catalog-item-panel .form-group label {
        text-align: left;
    }

    .user-edit-form .form-group.is-textarea label,
    .user-create-form .form-group.is-textarea label,
    .catalog-item-form .form-group.is-textarea label,
    .estimates-form .form-group.is-textarea label,
    .user-edit-panel .form-group.is-textarea label,
    .user-create-panel .form-group.is-textarea label,
    .catalog-item-panel .form-group.is-textarea label {
        padding-top: 0;
    }

    .order-info.user-info-grid {
        grid-template-columns: 1fr;
    }

    .user-card__header {
        flex-direction: column;
        align-items: flex-start;
    }

    .user-card__actions {
        justify-content: flex-start;
    }

    .user-info-list div {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .user-form-grid {
        grid-template-columns: 1fr;
    }

    .user-form-section .form-group {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .user-form-section .form-group.is-checkbox {
        grid-template-columns: 1fr;
    }
}

.book-order-history {
    margin-top: 14px;
    padding: 12px 14px;
    border: 1px solid #d9e8dc;
    border-radius: 10px;
    background: #f4faf5;
}

.book-order-history--cart {
    border-color: #d8e5ff;
    background: #f5f8ff;
}

.book-order-history--cart.is-updated {
    animation: cart-summary-flash 900ms ease;
}

.book-order-history__title {
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 700;
    color: #1f5f31;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.book-order-history--cart .book-order-history__title {
    color: #294f9b;
}

@keyframes cart-summary-flash {
    0% {
        transform: translateY(0);
        box-shadow: 0 0 0 rgba(59, 130, 246, 0);
        background: #f5f8ff;
    }
    35% {
        transform: translateY(-2px);
        box-shadow: 0 12px 28px rgba(59, 130, 246, 0.18);
        background: #e8f0ff;
    }
    100% {
        transform: translateY(0);
        box-shadow: 0 0 0 rgba(59, 130, 246, 0);
        background: #f5f8ff;
    }
}

.book-order-history__grid {
    display: grid;
    gap: 6px;
}

.book-order-history__row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 14px;
}

.book-order-history__label {
    color: #4d5c50;
    font-weight: 600;
}

.book-order-history__value {
    color: #132019;
    text-align: right;
}

@media (max-width: 720px) {
    .book-order-history__row {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }

    .book-order-history__value {
        text-align: left;
    }
}
