.reference-workspace {
    --ink: #1f2a3d;
    --muted: #64768d;
    --line: #e0e6ef;
    --paper: #fff;
    --panel: #f5f7fa;
    --canvas: #fff;
    --accent: #a32343;
    --accent-hover: #801731;
    --accent-light: #faedf1;
    --accent-gradient: linear-gradient(115deg,#a72544,#951e3b);
    --radius: 16px;
    --shadow: none;
    --reference-header-height: 76px;
    display: grid;
    grid-template-columns: 218px minmax(0,1fr);
    grid-template-rows: auto 1fr;
    min-height: 100vh;
    background: #fff;
    color: var(--ink);
    font-size: 14px;
}
.reference-header {
    position: sticky; top: 0; z-index: 10; grid-column: 1 / -1;
    display: flex; justify-content: space-between; align-items: center; gap: 18px;
    min-height: var(--reference-header-height); padding: 0 30px;
    color: var(--ink); background: #fff; border-bottom: 1px solid var(--line);
}
.reference-brand-row, .reference-brand, .reference-header-tools, .reference-operator {
    display: flex; align-items: center; gap: 12px; min-width: 0;
}
.reference-brand { color: var(--ink); white-space: nowrap; }
.reference-brand strong { font-size: 21px; letter-spacing: -.04em; }
.reference-brand small { margin-left: 12px; font-size: 12px; color: var(--muted); }
.reference-logo { width: 40px; height: 40px; border: 1px solid #ebd8df; border-radius: 7px; overflow: hidden; }
.reference-logo img { width: 100%; height: 100%; display: block; object-fit: contain; }
.reference-header-tools { justify-content: end; gap: 12px; }
.reference-header-tools form { margin: 0; }
.reference-ai-entry {
    display: inline-flex; align-items: center; gap: 6px; min-height: 42px; padding: 2px 11px 2px 8px;
    color: var(--accent-hover); background: #fbf0f3; border: 1px solid #f2dce5; border-radius: 12px;
    font-size: 13px; white-space: nowrap;
}
.reference-ai-entry img { display: block; object-fit: contain; }
.reference-search {
    display: flex; align-items: center; gap: 6px; width: min(270px,24vw); min-height: 49px;
    padding: 4px 8px; border: 1px solid #e9eef4; background: #f6f8fb; border-radius: 13px;
}
.reference-search svg, .reference-icon svg { width: 17px; height: 17px; flex: 0 0 auto; }
.reference-search input {
    min-width: 0; width: 100%; background: #fff; border: 1px solid #dce4ee; border-radius: 10px;
    padding: 9px; outline-offset: 1px; font-size: 12px; min-height: 38px;
}
.reference-search button, .reference-icon {
    display: inline-flex; justify-content: center; align-items: center; padding: 0 5px; min-height: 38px;
    color: var(--accent-hover); background: transparent; border: 0; border-radius: 9px; white-space: nowrap; font-size: 12px;
}
.reference-icon { width: 34px; color: var(--muted); }
.reference-icon:hover, .reference-search button:hover { background: var(--panel); }
.reference-date, .reference-operator { font-size: 12px; white-space: nowrap; color: var(--muted); }
.reference-avatar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #f8edf1; color: var(--accent); }
.reference-menu { display: none; }
.reference-rail {
    align-self: start; position: sticky; top: var(--reference-header-height); height: calc(100dvh - var(--reference-header-height));
    overflow: auto; scrollbar-width: thin; scrollbar-color: #db8c9e transparent; padding: 20px 14px;
    background: linear-gradient(171deg,#a72543 0%,#a32242 56%,#98203c 100%);
    border-right: 1px solid #991f3c; color: #fff;
}
.reference-group + .reference-group { margin-top: 24px; }
.reference-group-label { padding: 13px 15px 11px 22px; font-size: 12px; }
.reference-group a {
    display: flex; align-items: center; gap: 10px; min-height: 46px; margin: 3px 0;
    padding: 7px 12px; border-radius: 11px; color: #fff; font-size: 13px; line-height: 1.45;
}
.reference-group a span { width: 24px; text-align: center; font-size: 17px; flex: 0 0 auto; }
.reference-group a:hover { text-decoration: none; background: rgb(255 255 255 / .12); }
.reference-group a[aria-current=page] { background: #faedf1; color: #8b1534; font-weight: 700; }
.reference-rail-foot { display: grid; gap: 3px; padding: 18px 15px 0; margin-top: 22px; border-top: 1px solid rgb(255 255 255 / .23); }
.reference-rail-foot small { color: #ffe0e7; }
.reference-shade { display: none; }
.reference-main { min-width: 0; background: #fff; }
.reference-content { display: grid; gap: 12px; min-width: 0; max-width: 1770px; margin: 0 auto; padding: 27px 32px 16px; }
.reference-breadcrumb { display: flex; flex-wrap: wrap; gap: 4px; color: var(--muted); font-size: 12px; margin-bottom: 2px; overflow-wrap: anywhere; }
.reference-breadcrumb a { color: inherit; }
.reference-content > .heading { min-height: 40px; }
.reference-content h1 { font-size: clamp(25px,2.5vw,29px); letter-spacing: -.035em; }
.reference-content .heading p { color: var(--muted); }
.reference-content .panel, .reference-content .metric { border-color: var(--line); box-shadow: none; }
.reference-content .button { min-height: 40px; padding-inline: 13px; border-radius: 10px; }
.reference-content .button.secondary, .reference-content .field > :is(input,select,textarea) { border-color: #dce4ef; color: var(--ink); }
.reference-content :is([id],details) { scroll-margin-top: calc(var(--reference-header-height) + 10px); }
.reference-content .tabs {
    align-items: center; gap: 8px; padding: 6px; min-height: 47px; margin-bottom: 4px;
    border-radius: 13px; background: #edf1f6;
}
.reference-content .tabs a { background: transparent; color: var(--muted); padding: 8px 12px; text-align: center; }
.reference-content .tabs a[aria-current=page] { color: #8b1534; background: #fff; }
.reference-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 11px; padding: 10px 0 0; }
.reference-refresh { width: 38px; min-height: 38px; border: 1px solid var(--line); background: #fff; }

.reference-assistant {
    display: grid; grid-template-columns: 116px minmax(0,1fr); gap: 13px; min-width: 0;
    padding: 16px 14px; border: 1px solid #ecd6dd; border-radius: 20px;
    background: linear-gradient(110deg,#f6e6eb,#fcf6f7 81%,#faf0f2);
}
.reference-assistant-person { display: grid; justify-items: center; align-content: center; gap: 3px; }
.reference-assistant-person img { object-fit: contain; width: 56px; height: 72px; }
.reference-assistant-person h2 { font-size: 17px; color: #742b40; }
.reference-assistant-person .button { min-height: 33px; padding: 4px 9px; margin-top: 2px; font-size: 12px; }
.reference-assistant-form { display: grid; align-self: stretch; gap: 8px; min-width: 0; padding: 10px 13px; background: #fffafa; border: 1px solid #ecd6dd; border-radius: 17px; }
.reference-assistant-form textarea { width: 100%; min-height: 57px; padding: 3px 0; border: 0; background: transparent; resize: vertical; }
.reference-compose-actions { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 7px 12px; }
.reference-compose-actions .button { margin-left: auto; }
.reference-prompt { min-height: 38px; color: #8b1534; background: none; border: 0; padding: 0; font-size: 13px; }
.reference-prompt:hover { text-decoration: underline; }
.reference-order-shortcuts { margin-top: 10px; }
.reference-content .reference-card { padding: 0; }
.reference-card > header { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.reference-card > header h2 { font-size: 17px; }
.reference-card-body { padding: 14px 22px; }
.reference-card-body .linked-list:empty { display: none; }
.reference-card-body > .muted { font-size: 13px; padding: 5px 0; }
.reference-priority .result-links a { min-height: 42px; padding-block: 7px; }
.reference-priority .result-links a > span:first-child { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; }
.reference-priority .result-links a small { margin: 0; }
.reference-stats { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(165px,100%),1fr)); gap: 12px; }
.reference-stat {
    display: grid; align-content: center; gap: 2px; min-height: 98px; padding: 12px 19px; border: 1px solid var(--line);
    border-radius: 16px; background: #fff; color: var(--ink);
}
.reference-stat:hover { text-decoration: none; border-color: #cb9aa9; }
.reference-stat[aria-current=page] { border-color: #cb9aa9; background: #fdf6f8; }
.reference-stat span { color: var(--muted); font-size: 12px; }
.reference-stat strong { font-size: 29px; font-variant-numeric: tabular-nums; line-height: 1.3; }
.reference-desk-tabs { margin: 0 0 10px; }
.reference-assistant-form:has(textarea:placeholder-shown) .button.primary { opacity: .72; }
.shipment-overview { padding: 12px 14px; }
.shipment-overview h2 { margin-bottom: 7px; font-size: 15px; }
.reference-status-row { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(140px,100%),1fr)); gap: 6px; margin-top: 8px; }
.reference-status-row a {
    display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 43px;
    padding: 5px 10px; border: 1px solid var(--line); border-radius: 7px; font-size: 12px; color: var(--ink);
}
.reference-status-row a strong { font-size: 18px; font-variant-numeric: tabular-nums; }
.reference-status-row a[aria-current=page] { background: #faedf1; color: var(--accent-hover); border-color: #e6bdcb; }
.reference-card-body .filter > .field:first-child { flex-basis: 240px; max-width: 380px; }
.reference-gate { background: #fff; }
.reference-gate .authentication { min-height: 100vh; align-items: start; padding: 70px 16px 24px; }
.reference-gate .auth-content { width: min(100%,662px); }
.reference-login {
    display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); min-height: 450px; color: #1f2a3d;
    border: 1px solid #e0e6ef; border-radius: 14px; overflow: hidden; background: #fff;
}
.reference-login-brand {
    display: flex; flex-direction: column; justify-content: space-between; gap: 16px; padding: 38px;
    background: linear-gradient(140deg,#fbf5f7,#f6eaee);
}
.reference-login-brand p, .reference-login small { color: #65748a; }
.reference-login-brand h2 { font-size: 25px; }
.reference-login-card { padding: 68px 44px 38px; }
.reference-login-card h1 { font-size: 25px; margin: 0 0 24px; }
.reference-login-card form { gap: 17px; }
.reference-login-card input { min-height: 41px; border-color: #dce4ef; border-radius: 10px; }
.reference-login-card .button { min-height: 42px; border-radius: 10px; }

@media (max-width: 1200px) {
    .reference-date { display: none; }
    .reference-header { padding-inline: 20px; }
}
@media (max-width: 970px) {
    .reference-brand small { display: none; }
    .reference-header-tools { gap: 7px; }
    .reference-content { padding-inline: 22px; }
}
@media (max-width: 760px) {
    .reference-workspace { --reference-header-height: 112px; grid-template-columns: minmax(0,1fr); }
    .reference-header { display: grid; grid-template-columns: minmax(0,1fr) auto; padding: 7px 12px 55px; gap: 8px; }
    .reference-brand strong { font-size: 17px; }
    .reference-brand-row { gap: 6px; }
    .reference-brand { gap: 6px; }
    .reference-logo { width: 34px; height: 34px; }
    .reference-menu { display: inline-flex; width: 40px; height: 44px; font-size: 20px; }
    .reference-search { position: absolute; inset: auto 12px 7px; width: auto; min-height: 46px; }
    .reference-search button { min-width: 44px; }
    .reference-ai-entry { min-height: 44px; padding-inline: 6px; }
    .reference-header-tools { gap: 5px; }
    .reference-bell, .reference-operator { display: none; }
    .reference-header-tools form .reference-icon { width: 44px; min-height: 44px; }
    .reference-rail {
        display: none; position: fixed; inset: var(--reference-header-height) auto 0 0; z-index: 9;
        width: min(252px,86vw); height: auto; overscroll-behavior: contain;
    }
    .reference-menu-open .reference-rail { display: block; }
    .reference-menu-open .reference-shade { display: block; position: fixed; inset: var(--reference-header-height) 0 0; z-index: 8; background: rgb(31 42 61 / .32); }
    .reference-content { padding: 16px 14px; }
    .reference-content .button, .reference-content .tabs a { min-height: 44px; }
    .reference-assistant { grid-template-columns: 75px minmax(0,1fr); gap: 8px; padding: 10px 8px; }
    .reference-assistant-person img { width: 44px; height: 56px; }
    .reference-assistant-person .button { font-size: 11px; padding-inline: 4px; min-height: 38px; }
    .reference-assistant-form { padding: 8px 10px; }
    .reference-compose-actions { gap: 4px; }
    .reference-prompt { min-height: 44px; font-size: 12px; }
    .reference-card > header, .reference-card-body { padding: 13px; }
    .reference-stats { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
    .reference-stat { min-height: 83px; padding: 8px 12px; }
    .reference-status-row { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .reference-gate .authentication { padding-top: 30px; }
    .reference-login { display: block; min-height: 0; }
    .reference-login-brand { padding: 16px 22px; }
    .reference-login-brand > div:nth-child(2), .reference-login-brand > small { display: none; }
    .reference-login-card { padding: 24px 22px; }
}
@media (max-width: 350px) {
    .reference-logo { display: none; }
}
