:root {
  --navy: #16385f;
  --navy-dark: #0e2a4b;
  --blue: #2167a7;
  --blue-soft: #e9f3fb;
  --border: #d7e0e8;
  --text: #1c2b38;
  --muted: #667786;
  --surface: #ffffff;
  --background: #f3f6f8;
  --shadow: 0 8px 24px rgba(18, 45, 71, .12);
  font-family: "Yu Gothic UI", "Meiryo", sans-serif;
  color: var(--text);
  background: var(--background);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--background); font-size: 14px; line-height: 1.55; }
/* Case basic information: distinguish white controls from the surrounding form. */
[data-panel="basic"] .form-grid, .document-settings-fields { padding: 18px; background: #f5f8fc; border: 1px solid var(--border); border-radius: 8px; }
[data-panel="basic"] .form-grid input,
[data-panel="basic"] .form-grid select,
[data-panel="basic"] .form-grid textarea { background: #fff; }
a { color: var(--blue); }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 3px; font-size: clamp(22px, 2.2vw, 30px); line-height: 1.3; }
h2 { font-size: 18px; }
.muted { color: var(--muted); }
.activity-filters { align-items: flex-end; }
.activity-filters .activity-user-filter { flex: 1 1 230px; max-width: 380px; }
.activity-quick-dates { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; width: 100%; }
.activity-scope { margin: 14px 0 22px; color: var(--muted); }
.activity-scope summary { cursor: pointer; color: var(--blue); }
.activity-scope p { margin: 10px 0; line-height: 1.8; }
.activity-section { margin-bottom: 22px; scroll-margin-top: 95px; }
.activity-section-heading { flex-wrap: wrap; }
.activity-section-heading .status-counts { margin: 0; }
.activity-summary-table { min-width: 1000px; }
.activity-history-table { min-width: 760px; table-layout: auto; }
.activity-history-table td:last-child { width: 50%; }
.activity-subtext { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; font-weight: 400; }
a.activity-subtext { color: var(--blue); }
.activity-description { overflow-wrap: anywhere; white-space: pre-line; }
.activity-kind { font-size: 12px; font-weight: 700; }
.activity-failure { color: #a02929; }
.activity-table-note { margin: 10px 0 0; font-size: 12px; }
.activity-pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 16px; }
@media (max-width: 700px) {
  .activity-filters .field, .activity-filters .activity-user-filter { flex: 1 1 100%; max-width: none; }
}
.nowrap { white-space: nowrap; }
.is-hidden { display: none !important; }

.app-shell { min-height: 100vh; }
.topbar {
  position: sticky;
  z-index: 30;
  top: 0;
  display: flex;
  align-items: center;
  min-height: 68px;
  padding: 8px 22px;
  color: #fff;
  background: var(--navy);
  box-shadow: 0 2px 7px rgba(0, 0, 0, .15);
}
.brand { display: flex; flex-direction: column; color: #fff; text-decoration: none; }
.brand strong { font-size: 21px; letter-spacing: .05em; }
.brand span { font-size: 11px; opacity: .78; }
.user-area { display: flex; align-items: center; gap: 18px; margin-left: auto; }
.user-label { display: flex; flex-direction: column; text-align: right; }
.user-label span { font-size: 11px; opacity: .76; }
.account-password-link { color: #fff; font-size: 12px; font-weight: 700; white-space: nowrap; }
.nav-account-link { display: none; }
.app-body { display: flex; min-height: calc(100vh - 68px); }
.sidebar {
  position: sticky;
  top: 68px;
  flex: 0 0 206px;
  height: calc(100vh - 68px);
  padding: 18px 12px;
  background: #e8f1f8;
  border-right: 1px solid #cad9e5;
}
.nav-link {
  display: block;
  margin-bottom: 5px;
  padding: 11px 14px;
  color: #23435f;
  border-radius: 7px;
  font-weight: 700;
  text-decoration: none;
}
.nav-link:hover { background: rgba(255, 255, 255, .7); }
.nav-link.is-active { color: #fff; background: var(--blue); }
.nav-divider { height: 1px; margin: 14px 8px; background: #c7d5e0; }
.main-content { width: calc(100% - 206px); padding: 24px clamp(18px, 3vw, 38px) 50px; }
.mobile-menu-button { display: none; margin-right: 10px; color: #fff; }

.page-heading, .detail-header, .detail-title-row, .button-row, .detail-summary,
.filter-panel, .status-counts, .table-meta, .dialog-heading, .dialog-footer {
  display: flex;
  align-items: center;
}
.page-heading, .detail-header { justify-content: space-between; gap: 20px; margin-bottom: 19px; }
.detail-title-row { gap: 15px; }
.button-row { gap: 9px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 17px;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
}
.button-primary { color: #fff; background: var(--blue); border-color: var(--blue); }
.button-primary:hover { background: #19598f; }
.button:disabled { cursor: not-allowed; opacity: .55; }
.button-secondary { color: #274c6b; background: #fff; border-color: #b7c8d6; }
.button-light { min-height: 34px; padding: 6px 13px; color: var(--navy); background: #fff; border-color: #fff; }
.button-block { width: 100%; }
.icon-button { border: 0; cursor: pointer; background: transparent; font-size: 24px; line-height: 1; }

.filter-panel {
  flex-wrap: wrap;
  gap: 13px;
  margin-bottom: 15px;
  padding: 15px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 9px;
}
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.filter-panel .field { min-width: 150px; }
.field > span, .stack-form label > span { color: #455867; font-size: 12px; font-weight: 700; }
input, select, textarea {
  width: 100%;
  min-height: 39px;
  padding: 7px 10px;
  color: var(--text);
  background: #fff;
  border: 1px solid #b9c8d4;
  border-radius: 5px;
}
textarea { resize: vertical; }
input:focus, select:focus, button:focus-visible, a:focus-visible { outline: 3px solid rgba(33, 103, 167, .25); outline-offset: 1px; }
.compact-field { min-width: 165px; }
.filter-submit { align-self: flex-end; }
.period-switch { display: flex; align-self: flex-end; }
.period-button {
  min-width: 45px;
  min-height: 39px;
  color: #3d5365;
  background: #fff;
  border: 1px solid #b9c8d4;
  cursor: pointer;
}
.period-button + .period-button { border-left: 0; }
.period-button:first-child { border-radius: 5px 0 0 5px; }
.period-button:last-of-type { border-radius: 0 5px 5px 0; }
.period-button.is-selected { color: #fff; background: var(--navy); border-color: var(--navy); }
.status-counts { flex-wrap: wrap; gap: 7px; margin-bottom: 13px; }
.count-chip {
  padding: 6px 11px;
  color: #3b5163;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  text-decoration: none;
}
.count-chip.is-selected { color: #fff; background: var(--navy); border-color: var(--navy); }

.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--border); border-radius: 9px; box-shadow: 0 2px 8px rgba(23, 54, 83, .05); }
.data-table { width: 100%; min-width: 1060px; border-collapse: collapse; }
.data-table th { padding: 10px 12px; color: #435868; background: #edf3f7; border-bottom: 1px solid #cbd8e2; font-size: 12px; text-align: left; white-space: nowrap; }
.data-table td { padding: 13px 12px; border-bottom: 1px solid #e2e8ed; vertical-align: top; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr[data-open-url] { cursor: default; }
.data-table tbody tr[data-open-url]:hover { background: #f5faff; }
.case-link { color: #174e7e; font-weight: 700; text-decoration: none; }
.case-link:hover, .text-button:hover { text-decoration: underline; }
.shipment-route-cell { min-width: 260px; }
.shipment-product-names { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.status-change-button { cursor: pointer; white-space: nowrap; }
.status-change-button:hover { outline: 2px solid #9abbd8; }
.quick-status-dialog .field { margin-bottom: 14px; }
.quick-status-dialog [data-status-completion] { margin-top: 18px; padding: 14px; background: #f5f8fc; border-radius: 8px; }
.text-button { padding: 0; color: #174e7e; background: none; border: 0; cursor: pointer; text-align: left; }
.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 73px;
  padding: 4px 9px;
  border-radius: 999px;
  color: #23333f;
  border: 1px solid rgba(0, 0, 0, .13);
  font-size: 12px;
  font-weight: 800;
}
.status-received { background: #e3e8ec; }
.status-quoting { background: #c9eff7; }
.status-unarranged { background: #ffe184; }
.status-arranged { background: #bce6c8; }
.status-in-transit { background: #ffd09b; }
.status-delivered { color: #fff; background: #267045; }
.status-on-hold { color: #fff; background: #7e62a3; }
.status-cancelled { color: #fff; background: #b84a4a; }
.warning-text { display: block; margin-top: 5px; color: #ad3d2e; font-size: 11px; font-weight: 700; }
.no-results { height: 120px; color: var(--muted); text-align: center; vertical-align: middle !important; }
.table-meta { justify-content: space-between; gap: 10px; padding: 8px 3px; color: var(--muted); font-size: 12px; }

.alert { margin-bottom: 16px; padding: 11px 14px; border-radius: 7px; border: 1px solid; }
.alert-success { color: #245d37; background: #e9f6ed; border-color: #b8ddc2; }
.alert-warning { color: #6d5613; background: #fff8dc; border-color: #ead696; }
.alert-error { color: #7e2e2e; background: #fff0f0; border-color: #e3b6b6; }
.alert-info { color: #28516e; background: #eef7fd; border-color: #bcd8ec; }
.alert ul { margin: 0; padding-left: 20px; }
.edit-lock-alert { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.edit-lock-alert form { flex: 0 0 auto; }

.detail-summary { flex-wrap: wrap; gap: 10px 28px; margin-bottom: 16px; padding: 14px 17px; background: #fff; border: 1px solid var(--border); border-radius: 8px; }
.tabs { display: flex; gap: 3px; overflow-x: auto; border-bottom: 2px solid var(--navy); }
.tab-button { min-width: 112px; padding: 10px 14px; color: #3a5367; background: #e8eff4; border: 0; border-radius: 6px 6px 0 0; cursor: pointer; font-weight: 700; }
.tab-button.is-active { color: #fff; background: var(--navy); }
.tab-panel { padding-top: 16px; }
.section-panel { padding: 20px; background: #fff; border: 1px solid var(--border); border-radius: 8px; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 15px; }
.section-heading h2, .section-heading p { margin-bottom: 2px; }
.detail-grid { display: grid; grid-template-columns: 150px minmax(0, 1fr); margin: 0; border-top: 1px solid var(--border); }
.detail-grid dt, .detail-grid dd { margin: 0; padding: 12px; border-bottom: 1px solid var(--border); }
.detail-grid dt { color: #475c6c; background: #f2f6f8; font-weight: 700; }
.leg-row { display: flex; align-items: center; gap: 13px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.leg-number { display: grid; place-items: center; width: 30px; height: 30px; color: #fff; background: var(--navy); border-radius: 50%; font-weight: 800; }
.leg-row p { margin: 2px 0 0; }

.company-dialog { width: min(520px, calc(100% - 28px)); padding: 0; border: 0; border-radius: 10px; box-shadow: var(--shadow); }
.company-dialog::backdrop { background: rgba(12, 29, 44, .45); }
.dialog-heading { justify-content: space-between; padding: 16px 19px; border-bottom: 1px solid var(--border); }
.dialog-heading h2 { margin: 0; }
.dialog-body { max-height: 60vh; overflow: auto; padding: 17px 19px; }
.dialog-footer { justify-content: flex-end; padding: 13px 19px; background: #f4f7f9; border-radius: 0 0 10px 10px; }
.assignment-card + .assignment-card { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.assignment-card h3 { margin: 0 0 8px; font-size: 15px; }
.assignment-detail { display: grid; grid-template-columns: 110px 1fr; gap: 6px 12px; margin: 0; }
.assignment-detail dt { color: var(--muted); }
.assignment-detail dd { margin: 0; font-weight: 700; }

.auth-body { display: grid; min-height: 100vh; place-items: center; padding: 25px; background: linear-gradient(135deg, #e7f0f7, #f8fafb); }
.auth-panel { width: min(420px, 100%); padding: 32px; background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); }
.auth-panel-wide { width: min(480px, 100%); }
.auth-brand { display: flex; flex-direction: column; margin-bottom: 25px; color: var(--navy); }
.auth-brand strong { font-size: 24px; letter-spacing: .06em; }
.auth-brand span { color: var(--muted); font-size: 12px; }
.stack-form { display: grid; gap: 16px; }
.stack-form label { display: grid; gap: 5px; }
.create-form { max-width: 900px; }
.form-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(220px, 1fr); gap: 18px; }
.form-grid-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid-four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.field-span-two { grid-column: span 2; }
.field-span-three { grid-column: span 3; }
.field-span-four { grid-column: span 4; }
.field-wide { min-width: 0; }
.field em { color: #b53a32; font-size: 11px; font-style: normal; }
.subsection-title { margin: 25px 0 12px; padding-bottom: 7px; border-bottom: 1px solid var(--border); font-size: 16px; }
.copy-summary { margin-bottom: 22px; }
.registration-note { margin-top: 22px; padding: 15px 17px; color: #3c5263; background: #f2f7fb; border-left: 4px solid var(--blue); border-radius: 5px; }
.registration-note ul { margin: 7px 0 0; padding-left: 21px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; padding-top: 17px; border-top: 1px solid var(--border); }
.repeat-container { display: grid; grid-template-columns: minmax(0, 1fr); gap: 17px; }
.repeat-card { min-width: 0; padding: 17px; background: #fbfcfd; border: 1px solid #cdd9e2; border-radius: 8px; }
.repeat-card-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.repeat-card-heading h3 { margin: 0; color: var(--navy); font-size: 17px; }
.row-tools { display: flex; gap: 5px; }
.mini-button { min-width: 34px; min-height: 31px; padding: 4px 8px; color: #345066; background: #fff; border: 1px solid #b9c8d4; border-radius: 5px; cursor: pointer; }
.mini-button-danger { color: #a53232; }
.empty-repeat-message { padding: 22px; background: #f7f9fa; border: 1px dashed #bac8d3; border-radius: 7px; text-align: center; }
.route-fields { display: grid; grid-template-columns: minmax(0, 1fr) 36px minmax(0, 1fr); align-items: center; gap: 9px; margin: 15px 0; }
.route-fields fieldset { min-width: 0; margin: 0; padding: 13px; border: 1px solid #d4dfe7; border-radius: 7px; }
.route-fields legend { padding: 0 5px; color: #405a6e; font-weight: 800; }
.route-arrow { color: var(--blue); font-size: 26px; font-weight: 800; text-align: center; }
.allocation-panel { margin-top: 16px; padding: 13px; background: #edf5fb; border-radius: 7px; }
.allocation-panel h4 { margin: 0; color: #294e6c; }
.allocation-panel p { margin: 2px 0 10px; }
.allocation-grid { display: grid; gap: 8px; }
.allocation-row { display: grid; grid-template-columns: minmax(220px, 2fr) minmax(120px, 1fr) minmax(120px, 1fr); align-items: end; gap: 10px; padding: 10px; background: #fff; border: 1px solid #d4e1eb; border-radius: 6px; }
.allocation-check { display: flex; align-items: center; gap: 8px; min-height: 39px; font-weight: 700; }
.allocation-check input { min-height: auto; }
.allocation-note { margin: 14px 0 0; padding: 10px 12px; color: #526878; background: #f0f4f7; border-radius: 6px; }
.compact-table { min-width: 720px; }
.upload-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.request-document-card { margin-bottom: 16px; padding: 18px; background: linear-gradient(135deg, #eef7fd 0%, #f8fbfd 100%); border: 1px solid #b9d3e6; border-radius: 9px; }
.transport-document-card { background: linear-gradient(135deg, #effaf5 0%, #f9fcfb 100%); border-color: #b8ddca; }
.transport-document-card .request-document-mark { background: #27835b; }
.request-document-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.request-document-heading > div:first-child { min-width: 0; }
.request-document-heading h3 { display: inline; margin: 0 0 0 7px; color: var(--navy); font-size: 18px; }
.request-document-heading p { margin: 6px 0 0; }
.request-document-mark { display: inline-flex; padding: 3px 8px; color: #fff; background: var(--blue); border-radius: 999px; font-size: 11px; font-weight: 800; }
.request-document-actions { flex: 0 0 auto; }
.request-document-actions form { display: flex; }
.request-document-meta { display: flex; flex-wrap: wrap; gap: 7px 20px; margin-top: 13px; padding-top: 11px; border-top: 1px solid #cadae6; color: #425b6d; font-size: 12px; }
.request-document-meta small { flex: 1 1 100%; color: var(--muted); }
.upload-card { min-width: 0; padding: 17px; background: #f8fafb; border: 1px solid #d1dce4; border-radius: 8px; }
.upload-card h3 { margin: 0 0 4px; font-size: 17px; }
.upload-card p { min-height: 42px; margin: 0 0 13px; }
.file-picker { display: grid; gap: 8px; padding: 14px; color: #36566f; background: #fff; border: 1px dashed #8faabd; border-radius: 7px; cursor: pointer; font-weight: 700; }
.file-picker:hover { background: #f3f9fd; border-color: var(--blue); }
.file-picker input { min-height: auto; padding: 0; border: 0; border-radius: 0; }
.compact-actions { margin-top: 12px; padding-top: 0; border-top: 0; }
.mail-import-note { margin: 16px 0 0; }
.email-history { display: grid; gap: 12px; }
.email-card { padding: 16px; border: 1px solid #d3dee6; border-radius: 8px; }
.email-card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.email-card-heading strong { color: var(--navy); font-size: 16px; }
.email-card-heading p { margin: 3px 0 0; }
.email-meta { display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: 5px 12px; margin: 13px 0 0; font-size: 13px; }
.email-meta dt { color: var(--muted); }
.email-meta dd { min-width: 0; margin: 0; overflow-wrap: anywhere; }
.email-body-details { margin-top: 13px; }
.email-body-details summary { color: #174e7e; cursor: pointer; font-weight: 700; }
.email-body { max-height: 420px; margin: 10px 0 0; padding: 14px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; background: #f5f7f9; border-radius: 6px; font: inherit; }
.file-table { min-width: 860px; }
.file-actions { flex-wrap: nowrap; }
.file-actions .button { padding: 6px 9px; font-size: 12px; }
.deleted-label { display: inline-flex; padding: 4px 9px; color: #6c3a3a; background: #f6e8e8; border-radius: 999px; font-size: 12px; font-weight: 700; }
.finance-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; margin-bottom: 24px; }
.finance-summary-card { display: grid; gap: 5px; min-width: 0; padding: 16px; background: #f3f7fa; border: 1px solid #d3dee6; border-radius: 8px; }
.finance-summary-card > span { color: #4c6374; font-size: 13px; font-weight: 700; }
.finance-summary-card strong { color: var(--navy); font-size: 24px; overflow-wrap: anywhere; }
.finance-summary-card small { color: var(--muted); line-height: 1.6; }
.finance-profit { background: #edf7f0; border-color: #bad8c3; }
.finance-section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; margin: 24px 0 12px; padding-bottom: 9px; border-bottom: 1px solid var(--border); }
.finance-section-heading h3, .finance-section-heading p { margin: 0; }
.finance-line { padding: 14px; }
.finance-fields { gap: 12px; }
.mail-import-panel { max-width: 940px; }
.mail-import-form { display: grid; gap: 18px; }
.mail-dropzone {
  display: grid;
  place-items: center;
  min-height: 230px;
  padding: 34px 20px;
  color: #31536e;
  background: #f7fbfe;
  border: 2px dashed #82a6c1;
  border-radius: 11px;
  cursor: pointer;
  text-align: center;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.mail-dropzone:hover, .mail-dropzone.is-dragging { background: #eaf5fc; border-color: var(--blue); transform: translateY(-1px); }
.mail-dropzone.has-file { background: #eef8f1; border-color: #72aa82; }
.mail-dropzone input { position: absolute; width: 1px; height: 1px; min-height: 0; padding: 0; overflow: hidden; opacity: 0; }
.mail-dropzone strong { color: var(--navy); font-size: 20px; }
.mail-dropzone span { margin-top: 4px; color: #587083; }
.mail-dropzone small { margin-top: 15px; padding: 7px 12px; color: #38546a; background: #fff; border: 1px solid #c8d7e2; border-radius: 999px; overflow-wrap: anywhere; }
.mail-import-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.mail-import-steps > div { position: relative; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 0 10px; padding: 14px; background: #f4f7f9; border-radius: 8px; }
.mail-import-steps span { grid-row: span 2; display: grid; place-items: center; width: 30px; height: 30px; color: #fff; background: var(--blue); border-radius: 50%; font-weight: 800; }
.mail-import-steps strong { color: var(--navy); }
.mail-import-steps small { color: var(--muted); }
.mail-import-guidance { margin: 0; }
.mail-import-progress { margin: 0; padding: 12px 14px; color: #28516e; background: #eef7fd; border-radius: 7px; font-weight: 700; }
.mail-import-progress.is-error { color: #7e2e2e; background: #fff0f0; }
.mail-confirm-grid { display: grid; grid-template-columns: minmax(420px, .9fr) minmax(560px, 1.1fr); align-items: start; gap: 18px; }
.read-status-badge { padding: 5px 10px; color: #245d37; background: #e9f6ed; border: 1px solid #b8ddc2; border-radius: 999px; font-size: 12px; font-weight: 800; }
.mail-read-grid { display: grid; grid-template-columns: 82px minmax(0, 1fr); gap: 0; margin: 0; border-top: 1px solid var(--border); }
.mail-read-grid dt, .mail-read-grid dd { margin: 0; padding: 9px 10px; border-bottom: 1px solid var(--border); }
.mail-read-grid dt { color: #4a5e6d; background: #f2f6f8; font-weight: 700; }
.mail-read-grid dd { min-width: 0; overflow-wrap: anywhere; }
.pre-line { white-space: pre-line; }
.mail-attachment-table { min-width: 560px; }
.analysis-summary { margin-bottom: 15px; padding: 14px; color: #294f6b; background: #eef6fc; border: 1px solid #c4dceb; border-radius: 8px; }
.analysis-summary strong { display: block; color: var(--navy); font-size: 16px; }
.analysis-summary span { display: inline-block; margin-top: 3px; color: #4c6679; font-size: 12px; font-weight: 700; }
.analysis-summary p { margin: 8px 0 0; }
.destination-choice { display: flex; align-items: flex-start; gap: 10px; margin-top: 12px; padding: 13px; background: #f8fafb; border: 1px solid #cfdbe4; border-radius: 8px; cursor: pointer; }
.destination-choice.is-selected { background: #eef6fc; border-color: #6b9fc7; box-shadow: inset 0 0 0 1px #6b9fc7; }
.destination-choice:has(input:disabled) { cursor: not-allowed; opacity: .55; }
.destination-choice input, .candidate-card input { flex: 0 0 auto; width: auto; min-height: auto; margin-top: 4px; }
.destination-choice span { display: grid; }
.destination-choice strong { color: var(--navy); font-size: 15px; }
.destination-choice small { color: var(--muted); }
.candidate-list { display: grid; gap: 8px; margin: 10px 0 18px 22px; transition: opacity .15s ease; }
.candidate-list.is-disabled, .new-destination-fields.is-disabled { opacity: .48; }
.candidate-card { display: flex; align-items: flex-start; gap: 9px; padding: 12px; background: #fff; border: 1px solid #d5dfe7; border-radius: 7px; cursor: pointer; }
.candidate-card:has(input:checked), .candidate-card.is-recommended:has(input:checked) { border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); }
.candidate-main { display: grid; min-width: 0; }
.candidate-main strong { color: #174e7e; overflow-wrap: anywhere; }
.candidate-main small { color: var(--muted); }
.match-score { margin-left: auto; padding: 3px 7px; color: #315a76; background: #edf5fa; border-radius: 999px; font-size: 11px; font-weight: 800; white-space: nowrap; }
.empty-candidates { margin: 0; padding: 13px; color: var(--muted); background: #f5f7f9; border-radius: 7px; }
.new-destination-fields { margin: 10px 0 0 22px; transition: opacity .15s ease; }
.registration-destination-panel .new-destination-fields { grid-template-columns: 1fr; }
.mail-draft-panel { margin-top: 18px; padding: 16px; background: #f8fbfd; border: 1px solid #c8dbe9; border-radius: 9px; }
.mail-draft-title, .mail-draft-items-heading, .mail-draft-item-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.mail-draft-title h3, .mail-draft-title p, .mail-draft-items-heading h3, .mail-draft-items-heading p { margin: 0; }
.ai-candidate-badge { flex: 0 0 auto; padding: 4px 9px; color: #28516e; background: #e5f2fb; border: 1px solid #b9d8ed; border-radius: 999px; font-size: 11px; font-weight: 800; }
.mail-route-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.mail-route-card { min-width: 0; margin: 0; padding: 13px; background: #fff; border: 1px solid #cfdae3; border-radius: 8px; }
.mail-route-card legend { padding: 0 6px; color: var(--navy); font-weight: 800; }
.mail-route-card > .field { margin-bottom: 11px; }
.mail-route-card .form-grid, .mail-draft-subsection { gap: 11px; }
.mail-draft-subsection { margin-top: 15px; padding-top: 15px; border-top: 1px solid var(--border); }
.mail-draft-items { margin-top: 18px; padding-top: 17px; border-top: 2px solid #d2e1ec; }
.mail-draft-items-heading { align-items: center; margin-bottom: 12px; }
.mail-draft-items-heading .button { min-height: 34px; padding: 5px 10px; font-size: 12px; }
.mail-draft-item { padding: 13px; background: #fff; border: 1px solid #cfdae3; border-radius: 8px; }
.mail-draft-item + .mail-draft-item { margin-top: 11px; }
.mail-draft-item-heading { align-items: center; margin-bottom: 10px; }
.mail-draft-item-heading h4 { margin: 0; color: var(--navy); }
.danger-text { color: #9b2f2f; font-size: 12px; }
.email-card-actions { flex-wrap: wrap; justify-content: flex-end; }
.existing-ai-review-form { display: grid; gap: 17px; }
.existing-ai-section { min-width: 0; }
.existing-ai-add-choice { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; padding: 13px; background: #eef7fd; border: 1px solid #bcd8ec; border-radius: 8px; cursor: pointer; }
.existing-ai-add-choice > input, .existing-ai-check { flex: 0 0 18px; width: 18px; height: 18px; min-height: 18px; margin: 2px 0 0; }
.existing-ai-add-choice span { display: grid; }
.existing-ai-add-choice strong { color: var(--navy); }
.existing-ai-add-choice small { color: var(--muted); }
.existing-ai-diff-table { min-width: 720px; }
.existing-ai-diff-table th:first-child, .existing-ai-diff-table td:first-child { width: 76px; }
.existing-ai-candidate-input { min-width: 310px; }
.existing-ai-candidate-input input, .existing-ai-candidate-input select, .existing-ai-candidate-input textarea { min-width: 280px; }
.existing-ai-reference-input { flex: 1 1 420px; gap: 4px; }
.existing-ai-reference-input input { width: min(100%, 640px); }
.existing-ai-diff-table tr.is-fill-diff { background: #f3faf5; }
.existing-ai-diff-table tr.is-overwrite-diff { background: #fff8ed; }
.existing-ai-item-card { padding: 14px; background: #fbfcfd; border: 1px solid #d2dde5; border-radius: 8px; }
.existing-ai-item-card + .existing-ai-item-card { margin-top: 12px; }
.existing-ai-item-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 11px; }
.existing-ai-item-heading h3 { margin: 0; color: var(--navy); }
.existing-ai-submit-panel { position: sticky; z-index: 10; bottom: 12px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 18px; background: rgba(255, 255, 255, .97); border: 1px solid #bfcfdb; border-radius: 9px; box-shadow: 0 8px 24px rgba(18, 45, 71, .16); }
.existing-ai-submit-panel p { margin: 2px 0 0; }
.cancel-import-form { margin-top: 13px; text-align: right; }
.cancel-import-form .text-button { color: #8b3c3c; }
.sds-filter { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(180px, .7fr) minmax(150px, max-content) auto; align-items: end; }
.sds-inactive-check { display: flex; align-items: center; gap: 8px; min-height: 39px; white-space: nowrap; }
.sds-inactive-check input { flex: 0 0 18px; width: 18px; height: 18px; min-height: 18px; margin: 0; }
.sds-table { min-width: 960px; }
.status-active { color: #166534; background: #e7f6eb; border-color: #afd9bb; }
.status-inactive { color: #7a3c3c; background: #f7eaea; border-color: #dfbcbc; }
.sds-upload-panel { max-width: 900px; }
.sds-dropzone { position: relative; overflow: hidden; cursor: pointer; }
.sds-dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.sds-confirm-grid, .sds-detail-grid { display: grid; grid-template-columns: minmax(420px, 1fr) minmax(520px, 1fr); align-items: start; gap: 18px; }
.sds-pdf-panel { position: sticky; top: 18px; padding: 8px; }
.sds-pdf-panel iframe { display: block; width: 100%; height: min(78vh, 980px); min-height: 640px; border: 0; border-radius: 6px; background: #eef2f5; }
.sds-confirm-form { min-width: 0; }
.sds-law-grid { margin-top: 16px; }
.sds-detail-heading { margin-top: 24px; }
.sds-transport-row { padding: 14px; }
.sds-existing-select { margin: 12px 0 0 30px; }
.sds-similar-documents { display: grid; gap: 4px; }
.sds-similar-documents span { margin-left: 8px; }
.sds-similar-documents small { margin-top: 4px; }
.sds-transport-detail { margin-top: 14px; padding: 14px; border: 1px solid var(--border); border-radius: 8px; }
.sds-transport-detail > strong { display: block; margin-bottom: 9px; color: var(--navy); }
.sds-active-form { display: flex; justify-content: flex-end; margin-top: 18px; }
.button-danger-text { color: #9b2f2f; }
.archived-shipment-note { margin-bottom: 15px; }
.deleted-shipment-table { min-width: 1100px; }
.detail-header form { margin: 0; }
.export-form { display: grid; gap: 18px; }
.export-filter-panel, .export-columns-panel { padding: 22px; }
.export-filter-grid { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 16px; }
.export-sheet-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.export-sheet-card { min-width: 0; margin: 0; padding: 14px 16px 16px; border: 1px solid #cbd8e2; border-radius: 8px; background: #fbfcfd; }
.export-sheet-card legend { padding: 0 7px; color: var(--navy); font-size: 16px; font-weight: 800; }
.export-group-actions { display: flex; justify-content: flex-end; gap: 6px; margin: -3px 0 10px; color: var(--muted); font-size: 12px; }
.export-group-actions .text-button { font-size: 12px; }
.export-checkbox-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px 12px; }
.export-check { display: flex; align-items: flex-start; gap: 7px; min-width: 0; padding: 5px 0; cursor: pointer; }
.export-check input { flex: 0 0 17px; width: 17px; height: 17px; min-height: 17px; margin: 2px 0 0; }
.export-check span { min-width: 0; overflow-wrap: anywhere; }
.export-check small { color: #557184; font-size: 10px; font-weight: 700; }
.export-check.is-required { color: #38546a; cursor: default; }
.export-submit-panel { position: sticky; z-index: 10; bottom: 12px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 18px; background: rgba(255, 255, 255, .96); border: 1px solid #bfcfdb; border-radius: 9px; box-shadow: 0 8px 24px rgba(18, 45, 71, .16); backdrop-filter: blur(8px); }
.export-submit-panel p { margin: 2px 0 0; font-size: 12px; }
.master-type-grid { display: grid; grid-template-columns: repeat(8, minmax(130px, 1fr)); gap: 9px; margin-bottom: 18px; overflow-x: auto; }
.master-type-card { display: grid; align-content: start; min-width: 130px; padding: 13px; color: #355268; background: #fff; border: 1px solid var(--border); border-radius: 8px; text-decoration: none; }
.master-type-card strong { color: var(--navy); }
.master-type-card span { margin-top: 2px; color: var(--muted); font-size: 11px; }
.master-type-card small { justify-self: start; margin-top: 7px; padding: 2px 6px; color: #5d4b17; background: #fff7d8; border-radius: 999px; font-size: 10px; font-weight: 700; }
.master-type-card.is-selected { color: #fff; background: var(--navy); border-color: var(--navy); box-shadow: 0 5px 15px rgba(14, 42, 75, .18); }
.master-type-card.is-selected strong, .master-type-card.is-selected span { color: #fff; }
.master-layout { display: grid; grid-template-columns: minmax(420px, 1.05fr) minmax(430px, .95fr); align-items: start; gap: 18px; }
.master-list-panel, .master-edit-panel { min-width: 0; }
.master-edit-panel { position: sticky; top: 86px; }
.master-record-list { display: grid; gap: 9px; }
.master-record { display: flex; align-items: center; gap: 9px; padding: 10px 11px; background: #fbfcfd; border: 1px solid #d2dde5; border-radius: 7px; }
.master-record.is-selected { background: #eef6fc; border-color: #6e9fc4; box-shadow: inset 0 0 0 1px #6e9fc4; }
.master-record.is-inactive { opacity: .68; }
.master-record-main { display: grid; flex: 1 1 auto; min-width: 0; color: inherit; text-decoration: none; }
.master-record-main > span { display: flex; align-items: center; gap: 8px; }
.master-record-main strong { min-width: 0; color: #174e7e; overflow-wrap: anywhere; }
.master-record-main small { color: var(--muted); overflow-wrap: anywhere; }
.master-record-main .status-badge { min-width: 0; margin-left: auto; padding: 2px 7px; font-size: 10px; white-space: nowrap; }
.master-status-color { flex: 0 0 18px; width: 18px; height: 18px; border: 1px solid rgba(0, 0, 0, .16); border-radius: 50%; }
.master-status-locked { color: #687887; background: #eef2f5; cursor: default; }
.master-status-code { margin: -2px 0 4px; font-size: 12px; }
.master-edit-panel input[type="color"] { min-height: 52px; padding: 5px; cursor: pointer; }
.master-record-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 4px; }
.master-record-actions form { display: flex; }
.master-record-actions .mini-button { min-width: 30px; }
.master-form-actions { margin-top: 8px; }
.master-readonly-grid { margin-top: 14px; }
.master-checkbox-panel { margin: 0; padding: 12px; border: 1px solid #c9d6df; border-radius: 7px; }
.master-checkbox-panel legend { padding: 0 6px; color: #455867; font-size: 12px; font-weight: 700; }
.master-checkbox-grid { display: flex; flex-wrap: wrap; gap: 9px 16px; }
.master-checkbox-grid label { display: flex; align-items: center; gap: 7px; }
.master-checkbox-grid input { flex: 0 0 17px; width: 17px; height: 17px; min-height: 17px; margin: 0; }
.master-contact-panel { margin-top: 28px; padding-top: 22px; border-top: 2px solid var(--border); }
.master-contact-form { margin-bottom: 17px; padding: 14px; background: #f3f7fa; border-radius: 8px; }
.master-contact-list { display: grid; gap: 7px; }
.master-contact-list > article { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px; border: 1px solid #d6e0e7; border-radius: 7px; }
.master-contact-list > article > div:first-child { display: grid; min-width: 0; }
.master-contact-list small { color: var(--muted); }
.master-edit-link { display: inline-flex; align-items: center; justify-content: center; color: #345066; text-decoration: none; }
.user-management-layout { display: grid; grid-template-columns: minmax(410px, .9fr) minmax(460px, 1.1fr); align-items: start; gap: 18px; }
.user-list-panel, .user-edit-panel { min-width: 0; }
.user-edit-panel { position: sticky; top: 86px; }
.user-card-list { display: grid; gap: 8px; }
.user-card { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 11px; color: inherit; background: #fbfcfd; border: 1px solid #d2dde5; border-radius: 8px; text-decoration: none; }
.user-card:hover { background: #f4f9fc; }
.user-card.is-selected { background: #eef6fc; border-color: #6e9fc4; box-shadow: inset 0 0 0 1px #6e9fc4; }
.user-card.is-inactive { opacity: .68; }
.user-card-avatar { display: grid; place-items: center; width: 40px; height: 40px; color: #fff; background: var(--navy); border-radius: 50%; font-size: 17px; font-weight: 800; }
.user-card-main { display: grid; min-width: 0; }
.user-card-main > span { display: flex; align-items: center; gap: 7px; }
.user-card-main strong { color: #174e7e; overflow-wrap: anywhere; }
.user-card-main small { color: var(--muted); overflow-wrap: anywhere; }
.current-user-label { padding: 1px 6px; color: #31546e !important; background: #e6f2fa; border-radius: 999px; font-size: 10px; font-weight: 800; }
.user-card-status .status-badge { min-width: 0; white-space: nowrap; }
.user-status-locked { color: #6d5613; background: #fff5c8; border-color: #e1c85e; }
.role-guidance { display: grid; gap: 6px; padding: 12px; background: #f3f7fa; border-radius: 8px; }
.role-guidance p { display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: 8px; margin: 0; font-size: 12px; }
.role-guidance strong { color: var(--navy); }
.role-guidance span { color: var(--muted); }
.user-form-actions { margin-top: 8px; }
.user-account-meta { margin-top: 24px; padding: 13px; background: #f3f7fa; border-radius: 8px; }
.user-account-meta dl { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 5px 12px; margin: 0; }
.user-account-meta dt { color: var(--muted); }
.user-account-meta dd { margin: 0; font-weight: 700; }
.user-action-section { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); }
.user-action-section h3 { margin: 0 0 3px; color: var(--navy); font-size: 16px; }
.user-action-section p { margin-bottom: 12px; }
.user-action-section .stack-form { max-width: 620px; }
.user-danger-section { border-top-color: #dfc6c6; }
.account-password-panel { max-width: 620px; }
.system-storage-panel, .system-cleanup-panel, .system-preview-panel, .system-history-panel { margin-bottom: 18px; }
.system-storage-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; margin-bottom: 14px; }
.system-storage-total { display: grid; gap: 4px; padding: 16px; background: #f3f7fa; border: 1px solid #d3dee6; border-radius: 8px; }
.system-storage-total.is-warning { background: #fff8dc; border-color: #e0c965; }
.system-storage-total > span { color: #4c6374; font-size: 13px; font-weight: 700; }
.system-storage-total strong { color: var(--navy); font-size: 25px; }
.system-storage-total small { color: var(--muted); }
.system-usage-bar { height: 8px; margin-top: 7px; overflow: hidden; background: #dce5eb; border-radius: 999px; }
.system-usage-bar span { display: block; height: 100%; background: var(--blue); border-radius: inherit; }
.system-storage-total.is-warning .system-usage-bar span { background: #c08b22; }
.system-storage-breakdown { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.system-storage-breakdown article { display: grid; padding: 12px; background: #fbfcfd; border: 1px solid #d7e0e8; border-radius: 7px; }
.system-storage-breakdown span { color: #516877; font-size: 12px; font-weight: 700; }
.system-storage-breakdown strong { color: var(--navy); font-size: 17px; }
.system-storage-breakdown small { color: var(--muted); font-size: 11px; }
.system-exclusion-note { margin-bottom: 18px; }
.system-cleanup-filter-grid { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 14px; }
.system-format-panel { margin: 0; padding: 12px 14px 14px; border: 1px solid #c9d6df; border-radius: 7px; }
.system-format-panel legend { padding: 0 6px; color: #455867; font-size: 12px; font-weight: 700; }
.system-format-grid { display: flex; flex-wrap: wrap; gap: 9px 20px; }
.system-format-grid label, .system-delete-check { display: flex; align-items: flex-start; gap: 8px; cursor: pointer; }
.system-format-grid input, .system-delete-check input { flex: 0 0 18px; width: 18px; height: 18px; min-height: 18px; margin: 2px 0 0; }
.system-preview-action { margin-top: 0; }
.system-preview-table { min-width: 1100px; }
.system-filename-cell { max-width: 360px; overflow-wrap: anywhere; }
.system-delete-confirm-form { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 16px; padding: 16px; background: #fff2f2; border: 1px solid #dfbcbc; border-radius: 8px; }
.system-delete-check { color: #713333; font-weight: 700; }
.button-danger-solid { flex: 0 0 auto; color: #fff; background: #ae3737; border-color: #ae3737; }
.button-danger-solid:hover { background: #912d2d; }
.system-history-table { min-width: 760px; }
.empty-state { max-width: 620px; margin: 9vh auto; padding: 42px; background: #fff; border: 1px solid var(--border); border-radius: 12px; text-align: center; box-shadow: var(--shadow); }

@media (max-width: 1100px) {
  .mail-confirm-grid { grid-template-columns: 1fr; }
  .sds-confirm-grid, .sds-detail-grid { grid-template-columns: 1fr; }
  .sds-pdf-panel { position: static; }
  .export-filter-grid { grid-template-columns: repeat(2, minmax(150px, 1fr)); }
  .export-checkbox-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .master-layout { grid-template-columns: 1fr; }
  .master-edit-panel { position: static; }
  .user-management-layout { grid-template-columns: 1fr; }
  .user-edit-panel { position: static; }
}

@media (max-width: 820px) {
  .mobile-menu-button { display: block; }
  .sidebar { position: fixed; z-index: 25; top: 68px; bottom: 0; left: 0; height: auto; transform: translateX(-102%); transition: transform .2s ease; box-shadow: var(--shadow); }
  .sidebar.is-open { transform: translateX(0); }
  .main-content { width: 100%; padding: 20px 15px 45px; }
  .page-heading, .detail-header { align-items: flex-start; flex-direction: column; }
  .user-label { display: none; }
  .export-sheet-grid { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .topbar { padding: 8px 12px; }
  .brand strong { font-size: 18px; }
  .button-light { padding-inline: 9px; font-size: 12px; }
  .page-heading .button-row { width: 100%; }
  .page-heading .button-row .button { flex: 1; }
  .filter-panel { align-items: stretch; }
  .field, .compact-field { flex: 1 1 145px; }
  .filter-submit { flex: 1 1 100%; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-grid dt { border-bottom: 0; }
  .detail-summary { align-items: flex-start; flex-direction: column; }
  .edit-lock-alert { align-items: stretch; flex-direction: column; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid-two, .form-grid-three, .form-grid-four { grid-template-columns: 1fr; }
  .field-span-two, .field-span-three, .field-span-four { grid-column: span 1; }
  .section-heading { flex-direction: column; }
  .section-heading .button { width: 100%; }
  .route-fields { grid-template-columns: 1fr; }
  .route-arrow { transform: rotate(90deg); }
  .allocation-row { grid-template-columns: 1fr; }
  .allocation-check { grid-column: span 1; }
  .upload-card-grid, .finance-summary { grid-template-columns: 1fr; }
  .request-document-heading { align-items: stretch; flex-direction: column; }
  .request-document-actions { align-items: stretch; flex-direction: column; width: 100%; }
  .request-document-actions .button { width: 100%; }
  .mail-confirm-grid { grid-template-columns: 1fr; }
  .upload-card p { min-height: 0; }
  .email-card-heading, .finance-section-heading { align-items: stretch; flex-direction: column; }
  .email-card-heading .button, .finance-section-heading .button { width: 100%; }
  .email-card-actions { align-items: stretch; flex-direction: column; width: 100%; }
  .existing-ai-submit-panel { position: static; align-items: stretch; flex-direction: column; }
  .existing-ai-submit-panel .button { width: 100%; }
  .form-actions .button { flex: 1; }
  .table-meta span:last-child { display: none; }
  .auth-panel { padding: 24px 20px; }
  .mail-import-steps { grid-template-columns: 1fr; }
  .mail-dropzone { min-height: 190px; padding: 25px 15px; }
  .candidate-list, .new-destination-fields { margin-left: 0; }
  .mail-route-grid { grid-template-columns: 1fr; }
  .mail-draft-title, .mail-draft-items-heading { align-items: stretch; flex-direction: column; }
  .candidate-card { flex-wrap: wrap; }
  .match-score { margin-left: 30px; }
  .sds-filter { grid-template-columns: 1fr; }
  .sds-pdf-panel iframe { min-height: 500px; }
  .sds-existing-select { margin-left: 0; }
  .export-filter-panel, .export-columns-panel { padding: 17px; }
  .export-filter-grid, .export-checkbox-grid { grid-template-columns: 1fr; }
  .export-submit-panel { position: static; align-items: stretch; flex-direction: column; }
  .export-submit-panel .button { width: 100%; }
  .master-record { align-items: stretch; flex-direction: column; }
  .master-record-actions { align-self: flex-end; }
  .master-contact-list > article { align-items: stretch; flex-direction: column; }
  .master-contact-list .master-record-actions { align-self: flex-end; }
  .account-password-link { display: none; }
  .nav-account-link { display: block; }
  .user-card { grid-template-columns: 40px minmax(0, 1fr); }
  .user-card-status { grid-column: 2; }
  .role-guidance p { grid-template-columns: 1fr; gap: 0; }
  .system-storage-summary, .system-storage-breakdown, .system-cleanup-filter-grid { grid-template-columns: 1fr; }
  .system-delete-confirm-form { align-items: stretch; flex-direction: column; }
  .system-delete-confirm-form .button { width: 100%; }
}

.sales-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 20px 0; }
.sales-page .card { background: #fff; border: 1px solid var(--border); border-radius: 9px; padding: 20px; }
.sales-metrics .card, .sales-charts .card { margin: 0; min-width: 0; }
.sales-metrics h2 { font-size: 16px; }
.sales-number { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.sales-charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 20px 0; }
.sales-trend { width: 100%; min-width: 340px; height: auto; display: block; }
.sales-charts .card { overflow-x: auto; }
.sales-trend text { fill: #193b5d; font: 14px sans-serif; }
.sales-axis { stroke: #cbd9e6; stroke-width: 1; }
.sales-hit { fill: transparent; pointer-events: all; }
.sales-bar { fill: #9abbd8; }
.sales-bar-selected { fill: #246bae; }
.sales-track { fill: #ecf3f8; }
.sales-business { margin: 15px 0; }
.sales-business > div { display: flex; justify-content: space-between; gap: 12px; overflow-wrap: anywhere; }
.sales-business strong { white-space: nowrap; font-variant-numeric: tabular-nums; }
.sales-business-bar { width: 100%; height: 10px; display: block; margin-top: 6px; }
.sales-money { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sales-detail { margin-top: 20px; }
@media (max-width: 1100px) { .sales-charts { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .sales-metrics { grid-template-columns: 1fr; } }
