:root {
    --page-bg: #f4f6f3;
    --sidebar-bg: #e7f0ea;
    --panel-bg: #ffffff;
    --panel-soft: #f8faf8;
    --text: #213029;
    --muted: #65746b;
    --line: #d8e2db;
    --primary: #328e60;
    --primary-deep: #226746;
    --sky: #397fae;
    --rose: #bd6070;
    --amber: #ad7629;
    --shadow: 0 14px 34px rgba(32, 48, 41, 0.08);
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    background: var(--page-bg);
    color: var(--text);
    font-family: "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;
    letter-spacing: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
}

.app-shell {
    display: grid;
    grid-template-columns: 208px minmax(0, 1fr);
    min-height: 100vh;
}

.app-shell.has-function-menu {
    grid-template-columns: 38px 208px minmax(0, 1fr);
}

.app-shell.has-function-menu.is-sidebar-peeking {
    grid-template-columns: 38px 208px minmax(0, 1fr);
}

.sidebar {
    position: sticky;
    top: 0;
    z-index: 10;
    width: 208px;
    height: 100vh;
    padding: 16px 12px;
    background: var(--sidebar-bg);
    border-right: 1px solid rgba(59, 88, 72, 0.12);
    overflow: hidden;
    transition: width 0.2s ease, padding 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.has-function-menu .sidebar {
    display: grid;
    place-items: center;
    width: 38px;
    padding: 0;
    background: rgba(231, 240, 234, 0.58);
    backdrop-filter: blur(10px);
}

.has-function-menu.is-sidebar-peeking .sidebar {
    display: block;
    width: 208px;
    padding: 16px 12px;
    background: var(--sidebar-bg);
    backdrop-filter: none;
    box-shadow: 18px 0 32px rgba(32, 48, 41, 0.12);
}

.brand {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    min-height: 86px;
    padding: 10px 8px;
    border-radius: 8px;
    transition: min-height 0.24s ease, padding 0.24s ease;
}

.brand:hover,
.brand:focus-visible {
    background: #dcece3;
    outline: none;
}

.brand-icon {
    width: 58px;
    height: 58px;
    border-radius: 9px;
}

.brand strong {
    display: block;
    font-size: 22px;
    line-height: 1.25;
}

.has-function-menu .brand {
    display: none;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
}

.has-function-menu .brand-icon {
    width: 58px;
    height: 58px;
    border-radius: 9px;
}

.has-function-menu .brand strong {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    white-space: normal;
}

.has-function-menu.is-sidebar-peeking .brand {
    display: grid;
    pointer-events: auto;
    opacity: 1;
    visibility: visible;
}

.category-nav {
    display: grid;
    gap: 9px;
    margin-top: 12px;
}

.category-link {
    display: grid;
    grid-template-columns: 8px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    min-height: 50px;
    padding: 10px 12px;
    border: 1px solid #cfded3;
    border-radius: 8px;
    background: #f2f7f4;
    transition: border-color 0.18s ease, background 0.18s ease, padding 0.24s ease;
}

.category-link:hover,
.category-link:focus-visible,
.category-link.is-active {
    border-color: #a9cbb6;
    background: #dcece3;
    outline: none;
}

.category-link strong {
    font-size: 15px;
    line-height: 1.3;
}

.has-function-menu .category-nav {
    display: none;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-8px);
    transition: opacity 0.18s ease, transform 0.24s ease, visibility 0.18s ease;
}

.has-function-menu.is-sidebar-peeking .category-nav {
    display: grid;
    pointer-events: auto;
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.category-mark {
    width: 8px;
    height: 30px;
    border-radius: 999px;
    background: var(--primary);
    transition: width 0.24s ease, height 0.24s ease, opacity 0.18s ease;
}

.category-mark.operation {
    background: var(--primary);
}

.category-mark.logistics {
    background: var(--amber);
}

.category-mark.data {
    background: var(--sky);
}

.category-mark.daily {
    background: var(--rose);
}

.category-mark.experience {
    background: #6f7d3a;
}

.sidebar-expand-hint {
    position: absolute;
    top: 50%;
    left: 50%;
    display: none;
    width: 28px;
    height: 66px;
    align-items: center;
    justify-content: center;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(50, 103, 70, 0.14);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.42);
    color: rgba(34, 103, 70, 0.76);
    font-size: 24px;
    font-weight: 900;
    line-height: 1;
    box-shadow: 0 12px 28px rgba(32, 48, 41, 0.08);
}

.has-function-menu .sidebar-expand-hint {
    display: flex;
}

.has-function-menu.is-sidebar-peeking .sidebar-expand-hint {
    display: none;
}

.ai-entry-button {
    position: absolute;
    left: 12px;
    bottom: 16px;
    z-index: 3;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(34, 103, 70, 0.20);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.78);
    color: var(--primary-deep);
    cursor: pointer;
    font-size: 14px;
    font-weight: 900;
    box-shadow: 0 12px 28px rgba(32, 48, 41, 0.12);
}

.ai-entry-button:hover,
.ai-entry-button:focus-visible,
.ai-entry-button.is-active {
    border-color: #98c7aa;
    background: var(--primary);
    color: #fff;
    outline: none;
}

.ai-client-dot {
    position: absolute;
    left: 50px;
    bottom: 18px;
    z-index: 4;
    width: 10px;
    height: 10px;
    border: 2px solid rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    background: #c92f2f;
    box-shadow: 0 0 0 3px rgba(201, 47, 47, 0.12);
}

.ai-client-dot.is-online {
    background: #1f9d55;
    box-shadow: 0 0 0 3px rgba(31, 157, 85, 0.14);
}

.ai-client-dot.is-offline {
    background: #c92f2f;
    box-shadow: 0 0 0 3px rgba(201, 47, 47, 0.12);
}

.has-function-menu .ai-entry-button {
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 30px;
    font-size: 11px;
}

.has-function-menu.is-sidebar-peeking .ai-entry-button {
    left: 12px;
    transform: none;
    width: 46px;
    height: 46px;
    font-size: 14px;
}

.has-function-menu .ai-client-dot {
    left: 24px;
    bottom: 14px;
}

.has-function-menu.is-sidebar-peeking .ai-client-dot {
    left: 50px;
    bottom: 18px;
}

.function-panel {
    position: sticky;
    top: 0;
    z-index: 1;
    display: none;
    height: 100vh;
    padding: 12px;
    overflow-y: auto;
    border-right: 1px solid rgba(59, 88, 72, 0.12);
    background: #f2f7f4;
}

.has-function-menu .function-panel {
    display: block;
}

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

.function-link {
    display: grid;
    width: 100%;
    min-height: 58px;
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel-bg);
    color: var(--text);
    cursor: pointer;
    text-align: left;
}

.function-link:hover,
.function-link:focus-visible,
.function-link.is-active {
    border-color: #a9cbb6;
    background: #eaf4ee;
    outline: none;
}

.function-link strong {
    font-size: 14px;
    line-height: 1.35;
}

.function-link span {
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.5;
}

.workspace {
    width: 100%;
    padding: 24px 32px 36px;
}

.content-view {
    display: none;
}

.content-view.is-current {
    display: block;
}

.home-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 190px;
    gap: 16px;
    align-items: stretch;
    margin-bottom: 16px;
}

.person-card,
.location-card,
.weather-panel,
.encourage-panel,
.news-panel,
.page-panel {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel-bg);
    box-shadow: var(--shadow);
}

.person-card {
    min-height: 178px;
    padding: 28px 30px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(248, 252, 249, 0.92)),
        linear-gradient(135deg, rgba(50, 142, 96, 0.16), rgba(57, 127, 174, 0.10));
}

.label {
    display: block;
    margin-bottom: 8px;
    color: var(--primary);
    font-size: 13px;
    font-weight: 800;
}

h1,
h2,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 12px;
    font-size: 36px;
    line-height: 1.22;
}

#agentName {
    font-family: KaiTi, STKaiti, "KaiTi_GB2312", serif;
    font-weight: 700;
}

h2 {
    margin-bottom: 8px;
    font-size: 22px;
    line-height: 1.35;
}

p {
    margin-bottom: 0;
    color: var(--muted);
    line-height: 1.75;
}

.workspace {
    position: relative;
}

.loading-screen {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 14px;
    min-height: 100vh;
    padding: 24px;
    border: 0;
    border-radius: 0;
    background:
        linear-gradient(135deg, rgba(244, 248, 245, 0.98), rgba(232, 242, 236, 0.98)),
        #f4f6f3;
    box-shadow: none;
}

.loading-screen img {
    width: 92px;
    height: 92px;
    border-radius: 14px;
}

.loading-screen strong {
    font-size: 28px;
    line-height: 1.25;
    text-align: center;
}

.loading-screen span {
    color: var(--muted);
    font-size: 15px;
    line-height: 1.5;
    text-align: center;
}

.progress-track {
    width: min(360px, 82vw);
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: #e1ebe5;
}

.progress-bar {
    width: 18%;
    height: 100%;
    border-radius: inherit;
    background: var(--primary);
    transition: width 0.45s ease;
}

.is-ready .loading-screen {
    display: none;
}

.is-loading > .content-view {
    visibility: hidden;
}

.location-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 178px;
    padding: 18px;
}

.logout-button {
    width: 72px;
    min-height: 32px;
    margin-top: 16px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--panel-soft);
    color: var(--primary-deep);
    cursor: pointer;
    font-size: 13px;
    font-weight: 800;
}

.logout-button:hover,
.logout-button:focus-visible {
    border-color: #a9cbb6;
    background: #eaf4ee;
    outline: none;
}

.location-card span,
.weather-meta span,
.forecast-row small,
.news-row span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.location-card strong {
    margin-top: 8px;
    color: var(--primary-deep);
    font-size: 16px;
    line-height: 1.45;
}

.home-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.75fr);
    gap: 16px;
    margin-bottom: 16px;
}

.weather-panel,
.encourage-panel,
.news-panel {
    padding: 22px;
}

.panel-head {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    margin-bottom: 14px;
}

.temperature {
    color: var(--primary-deep);
    font-size: 34px;
    line-height: 1;
}

.weather-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.weather-meta span,
.forecast-row,
.note-card,
.news-row {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel-soft);
}

.weather-meta span {
    min-height: 42px;
    display: flex;
    align-items: center;
    padding: 9px 11px;
}

.forecast-list,
.news-list {
    display: grid;
    gap: 10px;
}

.news-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    align-items: start;
}

.forecast-row {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr) 88px;
    gap: 12px;
    align-items: center;
    min-height: 50px;
    padding: 10px 12px;
}

.forecast-row strong {
    font-size: 15px;
}

.forecast-row span {
    color: var(--text);
    font-weight: 800;
}

.forecast-row small {
    text-align: right;
}

.encourage-panel {
    min-height: 100%;
}

.note-list {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.note-card {
    min-height: 74px;
    padding: 12px 13px;
}

.note-card strong {
    display: block;
    margin-bottom: 5px;
    color: var(--primary-deep);
    font-size: 13px;
}

.note-card p {
    font-size: 13px;
    line-height: 1.65;
}

.refresh-button {
    min-width: 72px;
    min-height: 36px;
    border: 0;
    border-radius: 7px;
    background: var(--primary);
    color: #fff;
    cursor: pointer;
    font-size: 13px;
    font-weight: 800;
}

.refresh-button:hover,
.refresh-button:focus-visible {
    background: var(--primary-deep);
    outline: none;
}

.news-row {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    min-height: 48px;
    padding: 10px 12px;
}

.news-row:hover,
.news-row:focus-visible {
    border-color: #a9cbb6;
    box-shadow: 0 10px 22px rgba(32, 48, 41, 0.07);
    outline: none;
}

.news-row strong {
    font-size: 14px;
    line-height: 1.45;
}

.page-panel {
    padding: 24px;
}

.tool-detail-panel {
    display: grid;
    gap: 22px;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel-bg);
    box-shadow: var(--shadow);
}

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

.tool-placeholder-card {
    min-height: 128px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel-soft);
}

.tool-placeholder-card strong {
    display: block;
    margin-bottom: 8px;
    color: var(--primary-deep);
    font-size: 15px;
}

.tool-placeholder-card p {
    font-size: 13px;
}

.ads-adjustment-tool {
    display: grid;
    align-content: start;
    gap: 12px;
    min-height: calc(100vh - 60px);
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel-bg);
    box-shadow: var(--shadow);
}

.ads-load-row {
    display: grid;
    grid-template-columns: 118px minmax(240px, 360px) auto auto;
    gap: 10px;
    align-items: end;
    justify-content: start;
}

.ads-field,
.ads-mini-field {
    display: grid;
    gap: 6px;
}

.ads-field span,
.ads-mini-field span {
    color: var(--primary-deep);
    font-size: 12px;
    font-weight: 900;
}

.ads-file-path,
.ads-search,
.ads-field input,
.ads-field select,
.ads-mini-field input,
.ads-adjust-card select {
    min-height: 38px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fff;
    color: var(--text);
    font: inherit;
    font-size: 13px;
}

.ads-file-path:focus,
.ads-search:focus,
.ads-field input:focus,
.ads-field select:focus,
.ads-mini-field input:focus,
.ads-adjust-card select:focus {
    border-color: #98c7aa;
    outline: 2px solid rgba(50, 142, 96, 0.14);
}

.ads-choose,
.ads-load,
.ads-download,
.ads-select-all,
.ads-clear,
.ads-reset-filters,
.ads-stage-cpc,
.ads-stage-strategy,
.ads-export,
.ads-batch-row button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 12px;
    border: 0;
    border-radius: 7px;
    background: var(--primary);
    color: #fff;
    cursor: pointer;
    font-size: 13px;
    font-weight: 900;
}

.ads-choose:hover,
.ads-choose:focus-visible,
.ads-load:hover,
.ads-load:focus-visible,
.ads-download:hover,
.ads-download:focus-visible,
.ads-select-all:hover,
.ads-select-all:focus-visible,
.ads-clear:hover,
.ads-clear:focus-visible,
.ads-reset-filters:hover,
.ads-reset-filters:focus-visible,
.ads-stage-cpc:hover,
.ads-stage-cpc:focus-visible,
.ads-stage-strategy:hover,
.ads-stage-strategy:focus-visible,
.ads-export:hover,
.ads-export:focus-visible,
.ads-batch-row button:hover,
.ads-batch-row button:focus-visible {
    background: var(--primary-deep);
    outline: none;
}

.ads-adjustment-tool button:disabled,
.ads-adjustment-tool input:disabled,
.ads-adjustment-tool select:disabled {
    cursor: wait;
    opacity: 0.68;
}

.ads-status,
.ads-summary {
    min-height: 38px;
    display: flex;
    align-items: center;
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel-soft);
    color: var(--primary-deep);
    font-size: 13px;
    font-weight: 900;
}

.ads-summary:empty {
    display: none;
}

.ads-filter-bar {
    display: grid;
    grid-template-columns: minmax(230px, 1.6fr) repeat(5, minmax(118px, 1fr)) minmax(124px, 0.78fr) 124px auto;
    gap: 8px;
    align-items: stretch;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfa;
}

.ads-match-filter {
    min-height: 88px;
}

.ads-main-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 292px;
    gap: 12px;
    align-items: start;
}

.ads-table-zone {
    display: grid;
    gap: 10px;
    min-width: 0;
}

.ads-table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.ads-check {
    display: flex;
    align-items: center;
    min-height: 38px;
    color: var(--primary-deep);
    font-size: 12px;
    font-weight: 900;
}

.ads-side-panel,
.ads-adjust-card {
    display: grid;
    gap: 10px;
}

.ads-adjust-card {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfa;
}

.ads-adjust-card > strong {
    color: var(--primary-deep);
    font-size: 14px;
    font-weight: 900;
}

.ads-adjust-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.ads-adjust-grid .ads-mini-field {
    min-width: 0;
}

.ads-adjust-grid .ads-mini-field:first-of-type {
    grid-column: 1 / -1;
}

.ads-batches {
    display: grid;
    gap: 8px;
    min-height: 86px;
}

.ads-batch-empty {
    display: grid;
    place-items: center;
    min-height: 72px;
    border: 1px dashed var(--line);
    border-radius: 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.ads-batch-row {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 34px auto;
    gap: 8px;
    align-items: center;
    padding: 9px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel-soft);
}

.ads-batch-row span,
.ads-batch-row small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
}

.ads-batch-row strong {
    overflow: hidden;
    color: var(--text);
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
}

.ads-batch-row button {
    min-height: 28px;
    padding: 0 9px;
    font-size: 12px;
}

.ads-table-wrap {
    max-height: calc(100vh - 255px);
    min-height: 560px;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.ads-table {
    width: 100%;
    min-width: 1580px;
    border-collapse: collapse;
    font-size: 12px;
}

.ads-table th,
.ads-table td {
    padding: 9px 10px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
    white-space: nowrap;
}

.ads-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #eaf4ee;
    color: var(--primary-deep);
    font-weight: 900;
}

.ads-table td {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ads-table tr:hover td {
    background: #f5faf7;
}

.ads-table tr.is-muted td {
    color: var(--muted);
    background: #fafbfa;
}

.ads-table tr.is-staged td {
    background: #f0f7f3;
}

.link-download-tool {
    display: grid;
    align-content: start;
    gap: 12px;
    min-height: calc(100vh - 60px);
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel-bg);
    box-shadow: var(--shadow);
}

.link-download-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.link-download-run,
.link-download-file {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 14px;
    border: 0;
    border-radius: 7px;
    background: var(--primary);
    color: #fff;
    cursor: pointer;
    font-size: 13px;
    font-weight: 900;
}

.link-download-run:hover,
.link-download-run:focus-visible,
.link-download-file:hover,
.link-download-file:focus-visible {
    background: var(--primary-deep);
    outline: none;
}

.link-download-run:disabled {
    cursor: wait;
    opacity: 0.68;
}

.link-download-input {
    width: 100%;
    min-height: 180px;
    resize: vertical;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    font: inherit;
    font-size: 14px;
    line-height: 1.7;
}

.link-download-input:focus {
    border-color: #98c7aa;
    outline: 2px solid rgba(50, 142, 96, 0.14);
}

.link-download-status {
    min-height: 42px;
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel-soft);
    color: var(--primary-deep);
    font-size: 13px;
    font-weight: 900;
}

.link-download-results {
    display: grid;
    align-content: start;
    gap: 8px;
    min-height: 220px;
    max-height: calc(100vh - 390px);
    overflow: auto;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.link-download-results:empty::before {
    color: var(--muted);
    content: "下载列表";
    font-size: 13px;
    font-weight: 800;
}

.link-download-row {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) minmax(92px, auto) 58px;
    gap: 10px;
    align-items: center;
    min-height: 40px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--panel-soft);
}

.link-download-row span,
.link-download-row small,
.link-download-row em {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
    font-weight: 900;
}

.link-download-row strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
}

.link-download-row em {
    color: var(--primary-deep);
}

.link-download-row.is-failed em,
.link-download-row.is-failed small {
    color: var(--rose);
}

.quote-tool {
    display: grid;
    align-content: start;
    gap: 12px;
    min-height: calc(100vh - 60px);
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow);
}

.quote-head,
.quote-settings,
.quote-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.quote-head {
    display: grid;
    grid-template-columns: auto minmax(240px, 1fr) auto minmax(180px, auto);
}

.quote-settings {
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel-soft);
}

.quote-settings label {
    display: grid;
    gap: 5px;
    min-width: 150px;
}

.quote-settings span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
}

.quote-head input,
.quote-settings input,
.quote-settings select,
.quote-table input,
.quote-table select {
    min-height: 38px;
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fff;
    color: var(--text);
    font-size: 13px;
}

.quote-head input,
.quote-settings input,
.quote-settings select {
    padding: 0 10px;
}

.quote-file-button,
.quote-reload-button,
.quote-actions button {
    min-height: 38px;
    padding: 0 14px;
    border: 0;
    border-radius: 7px;
    background: var(--primary);
    color: #fff;
    cursor: pointer;
    font-size: 13px;
    font-weight: 900;
}

.quote-file-button:hover,
.quote-file-button:focus-visible,
.quote-reload-button:hover,
.quote-reload-button:focus-visible,
.quote-actions button:hover,
.quote-actions button:focus-visible {
    background: var(--primary-deep);
    outline: none;
}

.quote-file-button:disabled,
.quote-reload-button:disabled,
.quote-actions button:disabled {
    cursor: wait;
    opacity: 0.68;
}

.quote-status {
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    color: var(--primary-deep);
    font-size: 13px;
    font-weight: 900;
}

.quote-main {
    display: grid;
    grid-template-columns: minmax(360px, 1.25fr) minmax(260px, 0.75fr);
    gap: 12px;
}

.quote-paste {
    display: grid;
    gap: 10px;
}

.quote-input {
    min-height: 190px;
    resize: vertical;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    font-size: 13px;
    line-height: 1.65;
}

.quote-input:focus,
.quote-head input:focus,
.quote-settings input:focus,
.quote-settings select:focus,
.quote-table input:focus,
.quote-table select:focus {
    border-color: #98c7aa;
    outline: 2px solid rgba(50, 142, 96, 0.14);
}

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

.quote-summary div {
    display: grid;
    align-content: center;
    gap: 8px;
    min-height: 88px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel-soft);
}

.quote-summary span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
}

.quote-summary strong {
    color: var(--primary-deep);
    font-size: 22px;
}

.quote-table-wrap {
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.quote-table {
    width: 100%;
    min-width: 1120px;
    border-collapse: collapse;
    font-size: 12px;
}

.quote-table th,
.quote-table td {
    padding: 8px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
}

.quote-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #eaf4ee;
    color: var(--primary-deep);
    font-weight: 900;
}

.quote-table td {
    white-space: nowrap;
}

.quote-table input,
.quote-table select {
    min-width: 86px;
    padding: 0 8px;
}

.quote-empty {
    height: 110px;
    color: var(--muted);
    text-align: center !important;
    font-weight: 900;
}

.quote-ok {
    color: var(--primary-deep);
    font-weight: 900;
}

.quote-bad,
.quote-compare-table em {
    color: var(--rose);
    font-style: normal;
    font-weight: 900;
}

.quote-section-title {
    margin: 4px 0 8px;
    color: var(--primary-deep);
    font-size: 14px;
    font-weight: 900;
}

.quote-compare-table td small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
}

.invoice-tool {
    display: grid;
    align-content: start;
    gap: 14px;
    min-height: calc(100vh - 60px);
}

.invoice-topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(140px, auto) auto auto auto;
    gap: 10px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow);
}

.invoice-upload-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
}

.invoice-upload-button,
.invoice-template-toggle,
.invoice-template-choose,
.invoice-template-save,
.invoice-generate,
.invoice-download,
.invoice-image-button,
.invoice-profile-open,
.invoice-profile-load,
.invoice-profile-new,
.invoice-product-back,
.invoice-profile-save,
.invoice-profile-delete {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    max-width: 180px;
    overflow: hidden;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--panel-soft);
    color: var(--primary-deep);
    cursor: pointer;
    font-size: 13px;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.invoice-generate,
.invoice-download,
.invoice-template-save,
.invoice-profile-save {
    border-color: transparent;
    background: var(--primary);
    color: #fff;
}

.invoice-generate:hover,
.invoice-generate:focus-visible,
.invoice-download:hover,
.invoice-download:focus-visible,
.invoice-profile-save:hover,
.invoice-profile-save:focus-visible {
    background: var(--primary-deep);
    outline: none;
}

.invoice-profile-delete {
    background: #fff7f7;
    color: var(--rose);
}

.invoice-generate:disabled {
    cursor: wait;
    opacity: 0.68;
}

.invoice-template-name {
    min-width: 0;
    overflow: hidden;
    color: var(--text);
    font-size: 14px;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.invoice-template-panel {
    display: none;
    grid-template-columns: minmax(190px, 260px) auto minmax(220px, 1fr) auto minmax(92px, auto);
    gap: 10px;
    align-items: end;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow);
}

.invoice-template-panel.is-open {
    display: grid;
}

.invoice-template-key-field {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.invoice-template-key-field span {
    color: var(--primary-deep);
    font-size: 12px;
    font-weight: 900;
}

.invoice-template-key,
.invoice-template-drop {
    width: 100%;
    min-height: 36px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fff;
    color: var(--text);
    font: inherit;
    font-size: 13px;
}

.invoice-template-drop {
    display: flex;
    align-items: center;
    overflow: hidden;
    color: var(--muted);
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
}

.invoice-template-drop.is-dragging,
.invoice-template-drop:focus-visible,
.invoice-template-key:focus {
    border-color: #98c7aa;
    outline: 2px solid rgba(50, 142, 96, 0.14);
}

.invoice-template-status {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    overflow: hidden;
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.invoice-layout {
    display: grid;
    grid-template-columns: minmax(320px, 0.9fr) minmax(360px, 1.1fr);
    gap: 14px;
}

.invoice-paste-panel,
.invoice-preview-panel,
.invoice-config-panel,
.invoice-select-panel,
.invoice-form-panel {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow);
}

.invoice-paste-panel {
    min-height: 420px;
    overflow: hidden;
}

.invoice-paste-input {
    width: 100%;
    height: 100%;
    min-height: 420px;
    resize: vertical;
    padding: 16px;
    border: 0;
    background: #fff;
    color: var(--text);
    font: inherit;
    font-size: 14px;
    line-height: 1.7;
}

.invoice-paste-input:focus,
.invoice-field input:focus,
.invoice-field select:focus {
    outline: 2px solid rgba(50, 142, 96, 0.16);
    outline-offset: -2px;
}

.invoice-preview-panel {
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    min-height: 420px;
    overflow: hidden;
}

.invoice-preview-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    min-height: 48px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    background: var(--panel-soft);
}

.invoice-preview-head strong {
    color: var(--primary-deep);
    font-size: 14px;
}

.invoice-status,
.invoice-config-status,
.invoice-check-status {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
}

.invoice-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
}

.invoice-summary span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    border-radius: 7px;
    background: #eef6f2;
    color: var(--primary-deep);
    font-size: 12px;
    font-weight: 900;
}

.invoice-cell-preview {
    display: grid;
    align-content: start;
    gap: 8px;
    max-height: 420px;
    overflow: auto;
    padding: 12px;
}

.invoice-preview-row {
    display: grid;
    grid-template-columns: 90px 150px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    min-height: 38px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fbfcfb;
}

.invoice-preview-row span,
.invoice-preview-row em {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
    font-weight: 900;
}

.invoice-preview-row strong,
.invoice-preview-row em {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.invoice-preview-row strong {
    color: var(--text);
    font-size: 12px;
}

.invoice-preview-row.is-missing {
    border-color: #efc7c7;
    background: #fff8f8;
}

.invoice-preview-row.is-missing em {
    color: var(--rose);
}

.invoice-form-panel {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 14px;
}

.invoice-config-panel {
    display: grid;
    gap: 12px;
    padding: 14px;
    background: #fff;
}

.invoice-product-page {
    display: grid;
    align-content: start;
    min-height: calc(100vh - 60px);
}

.invoice-product-manager {
    display: grid;
    gap: 14px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow);
}

.invoice-product-toolbar,
.invoice-profile-picker {
    display: grid;
    grid-template-columns: auto minmax(180px, 260px) auto auto auto minmax(120px, 1fr);
    gap: 10px;
    align-items: center;
}

.invoice-profile-picker {
    grid-template-columns: minmax(180px, 260px) auto;
    margin-bottom: 10px;
}

.invoice-profile-row {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto auto;
    gap: 10px;
    align-items: center;
}

.invoice-select-panel {
    padding: 12px;
    background: #f9fbfa;
}

.invoice-form-block {
    display: grid;
    align-content: start;
    gap: 10px;
    min-width: 0;
}

.invoice-form-title {
    color: var(--primary-deep);
    font-size: 13px;
    font-weight: 900;
}

.invoice-product-grid,
.invoice-select-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(150px, 1fr));
    gap: 10px;
}

.invoice-select-grid {
    grid-template-columns: repeat(6, minmax(130px, 1fr));
}

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

.invoice-field span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
}

.invoice-field input,
.invoice-field select {
    width: 100%;
    min-height: 36px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fff;
    color: var(--text);
    font: inherit;
    font-size: 13px;
}

.invoice-image-field {
    gap: 8px;
}

.invoice-image-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 8px;
    align-items: center;
}

.invoice-image-button {
    max-width: none;
    background: var(--panel-soft);
    color: var(--primary-deep);
}

.invoice-image-preview {
    width: 100%;
    max-width: 220px;
    aspect-ratio: 4 / 3;
    object-fit: contain;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #f8faf9;
}

.invoice-profile-select,
.invoice-profile-name,
.invoice-template-select {
    width: 100%;
    min-height: 36px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fff;
    color: var(--text);
    font: inherit;
    font-size: 13px;
}

.invoice-product-manager .invoice-product-grid {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
}

.invoice-product-check-panel {
    min-height: 360px;
}

@media (max-width: 1180px) {
    .invoice-topbar,
    .invoice-template-panel,
    .invoice-layout,
    .invoice-profile-row,
    .invoice-product-toolbar,
    .invoice-profile-picker,
    .invoice-form-panel {
        grid-template-columns: 1fr;
    }

    .invoice-select-grid {
        grid-template-columns: repeat(3, minmax(140px, 1fr));
    }
}

@media (max-width: 720px) {
    .invoice-product-grid,
    .invoice-select-grid {
        grid-template-columns: 1fr;
    }

    .invoice-preview-row {
        grid-template-columns: 78px minmax(80px, 120px) minmax(0, 1fr);
    }
}

.description-editor {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    min-height: calc(100vh - 60px);
}

.description-pane {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    min-height: calc(100vh - 60px);
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel-bg);
    box-shadow: var(--shadow);
}

.description-pane-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    min-height: 52px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    background: var(--panel-soft);
}

.description-pane-head span {
    color: var(--primary-deep);
    font-size: 13px;
    font-weight: 900;
}

.description-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.description-icon-button,
.description-copy-button {
    min-height: 32px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fff;
    color: var(--primary-deep);
    cursor: pointer;
    font-weight: 900;
}

.description-icon-button {
    width: 34px;
    font-size: 15px;
}

.description-copy-button {
    min-width: 58px;
    padding: 0 10px;
    font-size: 12px;
}

.description-icon-button:hover,
.description-icon-button:focus-visible,
.description-copy-button:hover,
.description-copy-button:focus-visible {
    border-color: #98c7aa;
    background: #eaf4ee;
    outline: none;
}

.description-source-input,
.description-html-input {
    width: 100%;
    min-height: 0;
    padding: 16px;
    overflow: auto;
    border: 0;
    background: #fff;
    color: var(--text);
    font: inherit;
    font-size: 15px;
    line-height: 1.75;
}

.description-source-input {
    outline: none;
    white-space: pre-wrap;
}

.description-source-input:empty::before {
    color: #9aa69f;
    content: attr(data-placeholder);
}

.description-html-input {
    resize: none;
    outline: none;
}

.description-source-input:focus,
.description-html-input:focus {
    box-shadow: inset 0 0 0 2px rgba(50, 142, 96, 0.14);
}

.amz-label-cropper {
    display: grid;
    align-content: start;
    gap: 14px;
    min-height: calc(100vh - 60px);
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel-bg);
    box-shadow: var(--shadow);
}

.amz-crop-top {
    display: grid;
    grid-template-columns: 126px minmax(240px, 360px) minmax(220px, 320px) auto auto;
    gap: 10px;
    align-items: end;
    justify-content: start;
}

.amz-crop-field,
.amz-crop-field span {
    display: grid;
    gap: 6px;
    color: var(--primary-deep);
    font-size: 13px;
    font-weight: 900;
}

.amz-crop-field input {
    width: 100%;
    min-height: 42px;
    padding: 9px 11px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fff;
    color: var(--text);
    font: inherit;
}

.amz-crop-field input:focus {
    border-color: #98c7aa;
    outline: 2px solid rgba(50, 142, 96, 0.14);
}

.amz-crop-choose,
.amz-crop-run,
.amz-crop-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 14px;
    border: 0;
    border-radius: 7px;
    background: var(--primary);
    color: #fff;
    cursor: pointer;
    font-size: 13px;
    font-weight: 900;
}

.amz-crop-choose:hover,
.amz-crop-choose:focus-visible,
.amz-crop-run:hover,
.amz-crop-run:focus-visible,
.amz-crop-download:hover,
.amz-crop-download:focus-visible {
    background: var(--primary-deep);
    outline: none;
}

.amz-crop-choose:disabled,
.amz-crop-run:disabled {
    cursor: wait;
    opacity: 0.68;
}

.amz-crop-status {
    min-height: 42px;
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel-soft);
    color: var(--primary-deep);
    font-size: 13px;
    font-weight: 900;
}

.amz-crop-files {
    display: grid;
    align-content: start;
    gap: 8px;
    min-height: 260px;
    max-height: calc(100vh - 280px);
    overflow: auto;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.amz-crop-files:empty::before {
    color: var(--muted);
    content: "PDF 列表";
    font-size: 13px;
    font-weight: 800;
}

.amz-crop-file {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    min-height: 38px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--panel-soft);
}

.amz-crop-file span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
}

.amz-crop-file strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
}

.image-folder-tool {
    display: grid;
    align-content: start;
    gap: 14px;
    min-height: calc(100vh - 60px);
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel-bg);
    box-shadow: var(--shadow);
}

.image-tool-grid {
    display: grid;
    grid-template-columns: 126px minmax(240px, 360px) minmax(220px, 320px);
    gap: 10px;
    align-items: end;
    justify-content: start;
}

.image-tool-grid.single {
    grid-template-columns: 126px minmax(240px, 360px);
}

.image-tool-field {
    display: grid;
    gap: 7px;
}

.image-tool-field span {
    color: var(--primary-deep);
    font-size: 13px;
    font-weight: 900;
}

.image-tool-field input {
    width: 100%;
    min-height: 42px;
    padding: 9px 11px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fff;
    color: var(--text);
    font: inherit;
}

.image-tool-field input:focus {
    border-color: #98c7aa;
    outline: 2px solid rgba(50, 142, 96, 0.14);
}

.image-tool-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.image-tool-choose,
.image-tool-actions button,
.image-tool-download,
.image-link-copy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 12px;
    border: 0;
    border-radius: 7px;
    background: var(--primary);
    color: #fff;
    cursor: pointer;
    font-size: 13px;
    font-weight: 900;
}

.image-tool-choose:hover,
.image-tool-choose:focus-visible,
.image-tool-actions button:hover,
.image-tool-actions button:focus-visible,
.image-tool-download:hover,
.image-tool-download:focus-visible,
.image-link-copy:hover,
.image-link-copy:focus-visible {
    background: var(--primary-deep);
    outline: none;
}

.image-tool-choose:disabled,
.image-tool-actions button:disabled {
    cursor: wait;
    opacity: 0.68;
}

.image-tool-status {
    min-height: 42px;
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel-soft);
    color: var(--primary-deep);
    font-size: 13px;
    font-weight: 900;
}

.image-tool-output {
    display: grid;
    align-content: start;
    gap: 8px;
    min-height: 260px;
    max-height: calc(100vh - 260px);
    overflow: auto;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.image-tool-output:empty::before {
    color: var(--muted);
    content: "图片列表";
    font-size: 13px;
    font-weight: 800;
}

.image-tool-row {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    min-height: 38px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--panel-soft);
}

.image-tool-row.result {
    grid-template-columns: 48px minmax(0, 1fr) 74px minmax(120px, 0.8fr);
}

.image-tool-row.link-result {
    grid-template-columns: 48px minmax(0, 0.8fr) 58px minmax(0, 1.2fr);
}

.image-tool-row span,
.image-tool-row small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
}

.image-tool-row strong,
.image-tool-row a {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
}

.image-tool-row a {
    color: var(--primary-deep);
    font-weight: 800;
}

.image-tool-row em {
    color: var(--primary-deep);
    font-size: 12px;
    font-style: normal;
    font-weight: 900;
}

.external-tool-panel {
    min-height: calc(100vh - 60px);
    display: grid;
    align-content: center;
    justify-items: start;
    gap: 22px;
    padding: 62px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 252, 249, 0.94)),
        linear-gradient(135deg, rgba(173, 118, 41, 0.12), rgba(50, 142, 96, 0.09));
    box-shadow: var(--shadow);
}

.external-tool-copy {
    max-width: 620px;
}

.external-tool-copy h1 {
    margin-bottom: 12px;
    font-size: 52px;
    line-height: 1.12;
}

.external-tool-copy p {
    max-width: 560px;
    font-size: 16px;
}

.external-tool-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border: 0;
    border-radius: 7px;
    background: var(--primary);
    color: #fff;
    font-weight: 900;
}

.external-tool-button:hover,
.external-tool-button:focus-visible {
    background: var(--primary-deep);
    outline: none;
}

.freight-tool {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 16px;
    min-height: calc(100vh - 60px);
    padding: 18px;
    overflow: hidden;
    border: 1px solid rgba(173, 118, 41, 0.22);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.97), rgba(249, 252, 250, 0.95)),
        linear-gradient(135deg, rgba(173, 118, 41, 0.16), rgba(57, 127, 174, 0.12));
    box-shadow: var(--shadow);
}

.freight-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 380px);
    gap: 16px;
    align-items: stretch;
}

.freight-hero-copy {
    min-width: 0;
    padding: 8px 2px 4px;
}

.freight-hero-copy h1 {
    margin-bottom: 8px;
    font-size: 34px;
    line-height: 1.18;
}

.freight-hero-copy p {
    max-width: 680px;
    color: #53645a;
    font-size: 15px;
}

.freight-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    align-content: stretch;
}

.freight-stats span {
    display: grid;
    align-content: center;
    min-height: 76px;
    padding: 12px;
    border: 1px solid rgba(173, 118, 41, 0.20);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.78);
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
}

.freight-stats strong {
    display: block;
    margin-bottom: 3px;
    color: #2b6f73;
    font-size: 22px;
    line-height: 1;
}

.freight-layout {
    display: grid;
    grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
    gap: 16px;
    min-height: 0;
}

.freight-directory,
.freight-browser {
    min-height: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.86);
}

.freight-directory {
    display: grid;
    grid-template-rows: auto minmax(0, 0.8fr) minmax(0, 1fr);
    gap: 12px;
    padding: 14px;
    overflow: hidden;
}

.freight-search-input {
    width: 100%;
    min-height: 40px;
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #ffffff;
    color: var(--text);
    font: inherit;
    font-size: 13px;
}

.freight-search-input:focus {
    border-color: #7fb0a5;
    outline: 2px solid rgba(43, 111, 115, 0.14);
}

.freight-block {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    min-height: 0;
}

.freight-block-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    min-height: 30px;
    margin-bottom: 8px;
}

.freight-block-head strong {
    color: #2b6f73;
    font-size: 13px;
    font-weight: 900;
}

.freight-block-head span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.freight-card-list,
.freight-section-list {
    display: grid;
    align-content: start;
    gap: 8px;
    min-height: 0;
    overflow: auto;
    padding-right: 4px;
}

.freight-card,
.freight-section {
    width: 100%;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfa;
    color: var(--text);
    cursor: pointer;
    text-align: left;
}

.freight-card {
    display: grid;
    gap: 4px;
    min-height: 62px;
    padding: 11px 12px;
}

.freight-card:hover,
.freight-card:focus-visible,
.freight-card.is-active,
.freight-section:hover,
.freight-section:focus-visible,
.freight-section.is-active {
    border-color: rgba(43, 111, 115, 0.42);
    background: #eef7f5;
    outline: none;
}

.freight-card strong,
.freight-section span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 900;
}

.freight-card span,
.freight-section small {
    overflow: hidden;
    color: var(--muted);
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    font-weight: 800;
}

.freight-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    min-height: 42px;
    padding: 9px 11px;
}

.freight-browser {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    overflow: hidden;
}

.freight-browser-head {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    min-height: 70px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
    background: #fbfcfa;
}

.freight-current-label,
.freight-current-note {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.freight-current-title {
    display: block;
    margin: 2px 0;
    color: var(--text);
    font-size: 17px;
    line-height: 1.3;
}

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

.freight-refresh,
.freight-open {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 13px;
    border: 1px solid rgba(43, 111, 115, 0.24);
    border-radius: 7px;
    background: #ffffff;
    color: #2b6f73;
    cursor: pointer;
    font-size: 13px;
    font-weight: 900;
}

.freight-open {
    border-color: transparent;
    background: #2b6f73;
    color: #fff;
}

.freight-refresh:hover,
.freight-refresh:focus-visible {
    border-color: rgba(43, 111, 115, 0.45);
    background: #eef7f5;
    outline: none;
}

.freight-open:hover,
.freight-open:focus-visible {
    background: #245d61;
    outline: none;
}

.freight-frame-wrap {
    position: relative;
    min-height: 0;
    background: #eef2f3;
}

.freight-frame {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 560px;
    border: 0;
    background: #ffffff;
}

.freight-frame-note {
    position: absolute;
    right: 14px;
    bottom: 14px;
    display: grid;
    gap: 2px;
    max-width: 340px;
    padding: 10px 12px;
    border: 1px solid rgba(43, 111, 115, 0.16);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 12px 26px rgba(32, 48, 41, 0.10);
}

.freight-frame-note strong {
    color: #2b6f73;
    font-size: 12px;
    font-weight: 900;
}

.freight-frame-note span {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

.ai-chat-view.is-current {
    display: grid;
    min-height: calc(100vh - 60px);
}

.ai-chat-shell {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto auto;
    min-height: calc(100vh - 60px);
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.ai-chat-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    padding: 18px 22px;
    border-bottom: 1px solid var(--line);
    background: rgba(248, 250, 248, 0.92);
}

.ai-chat-head h1 {
    margin-bottom: 2px;
    font-size: 22px;
    line-height: 1.3;
}

.ai-chat-head span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.ai-clear-button {
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fff;
    color: var(--muted);
    cursor: pointer;
    font-size: 12px;
    font-weight: 800;
}

.ai-clear-button:hover,
.ai-clear-button:focus-visible {
    border-color: #a9cbb6;
    color: var(--primary-deep);
    outline: none;
}

.ai-message-list {
    display: grid;
    align-content: start;
    gap: 18px;
    min-height: 0;
    padding: 26px max(22px, 12vw);
    overflow-y: auto;
    background: #ffffff;
}

.ai-message-list:empty::before {
    content: "";
}

.ai-message {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
}

.ai-message.user {
    grid-template-columns: minmax(0, 1fr) 34px;
}

.ai-message.user .ai-avatar {
    grid-column: 2;
}

.ai-message.user .ai-bubble {
    grid-column: 1;
    grid-row: 1;
    justify-self: end;
    background: var(--primary);
    color: #fff;
}

.ai-avatar {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #eaf4ee;
    color: var(--primary-deep);
    font-size: 11px;
    font-weight: 900;
}

.ai-message.user .ai-avatar {
    background: #eef2f6;
    color: var(--text);
}

.ai-bubble {
    max-width: 760px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel-soft);
    color: var(--text);
    line-height: 1.7;
    white-space: pre-wrap;
}

.ai-bubble:empty {
    display: none;
}

.ai-bubble img {
    display: block;
    max-width: min(420px, 100%);
    border-radius: 8px;
}

.ai-compose {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) 72px;
    gap: 10px;
    padding: 10px max(22px, 12vw) 18px;
    border-top: 1px solid var(--line);
    background: rgba(248, 250, 248, 0.96);
}

.ai-tool-button {
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--primary-deep);
    cursor: pointer;
    font-weight: 900;
}

.ai-tool-button:hover,
.ai-tool-button:focus-visible,
.ai-tool-button.is-active {
    border-color: #98c7aa;
    background: #eaf4ee;
    outline: none;
}

.ai-compose textarea {
    width: 100%;
    max-height: 160px;
    min-height: 46px;
    resize: vertical;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    font: inherit;
    line-height: 1.5;
}

.ai-compose textarea:focus {
    border-color: #98c7aa;
    outline: 2px solid rgba(50, 142, 96, 0.14);
}

.ai-compose button[type="submit"] {
    min-height: 46px;
    border: 0;
    border-radius: 8px;
    background: var(--primary);
    color: #fff;
    cursor: pointer;
    font-weight: 900;
}

.ai-compose button[type="submit"]:hover,
.ai-compose button[type="submit"]:focus-visible {
    background: var(--primary-deep);
    outline: none;
}

.ai-compose button:disabled {
    cursor: wait;
    opacity: 0.7;
}

.ai-file-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 0;
    padding: 0 max(22px, 12vw) 12px;
    background: rgba(248, 250, 248, 0.96);
}

.ai-file-chip {
    max-width: 240px;
    overflow: hidden;
    padding: 6px 9px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--muted);
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    font-weight: 800;
}

.note-view.is-current {
    display: grid;
    min-height: calc(100vh - 60px);
}

.note-shell {
    display: grid;
    grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
    min-height: calc(100vh - 60px);
    overflow: hidden;
    border: 1px solid rgba(57, 127, 174, 0.20);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.note-sidebar {
    display: grid;
    grid-template-rows: auto auto auto auto minmax(0, 1fr);
    gap: 10px;
    min-height: 0;
    padding: 16px;
    border-right: 1px solid var(--line);
    background:
        linear-gradient(180deg, rgba(244, 249, 252, 0.95), rgba(248, 250, 248, 0.98)),
        #f8faf8;
}

.note-sidebar-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}

.note-sidebar-head h1 {
    margin-bottom: 0;
    font-size: 24px;
    line-height: 1.25;
}

.note-new-button,
.note-create-row button,
.note-delete-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 12px;
    border: 0;
    border-radius: 7px;
    background: #397fae;
    color: #ffffff;
    cursor: pointer;
    font-size: 13px;
    font-weight: 900;
}

.note-new-button:hover,
.note-new-button:focus-visible,
.note-create-row button:hover,
.note-create-row button:focus-visible {
    background: #2e6b94;
    outline: none;
}

.note-create-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 58px;
    gap: 8px;
}

.note-create-row input,
.note-search input,
.note-title-input,
.note-meta-row input,
.note-meta-row select {
    width: 100%;
    min-height: 38px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #ffffff;
    color: var(--text);
    font: inherit;
    font-size: 14px;
}

.note-create-row input:focus,
.note-search input:focus,
.note-title-input:focus,
.note-meta-row input:focus,
.note-meta-row select:focus,
.note-pane textarea:focus {
    border-color: #8ab2ca;
    outline: 2px solid rgba(57, 127, 174, 0.15);
}

.note-search {
    display: grid;
    gap: 6px;
}

.note-search span,
.note-meta-row span,
.note-pane > span {
    color: #2e6b94;
    font-size: 13px;
    font-weight: 900;
}

.note-directory {
    display: grid;
    align-content: start;
    gap: 12px;
    min-height: 0;
    overflow: auto;
    padding-right: 4px;
}

.note-folder-group {
    display: grid;
    gap: 8px;
}

.note-folder-group > strong {
    color: var(--text);
    font-size: 14px;
    line-height: 1.35;
}

.note-date-group {
    display: grid;
    gap: 7px;
}

.note-date-group > span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
}

.note-list-item {
    display: grid;
    gap: 4px;
    width: 100%;
    min-height: 58px;
    padding: 10px 11px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--text);
    cursor: pointer;
    text-align: left;
}

.note-list-item:hover,
.note-list-item:focus-visible,
.note-list-item.is-active {
    border-color: rgba(57, 127, 174, 0.42);
    background: #eef6fb;
    outline: none;
}

.note-list-item strong,
.note-list-item small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.note-list-item strong {
    font-size: 14px;
    line-height: 1.35;
}

.note-list-item small,
.note-empty {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.note-empty {
    padding: 18px 12px;
    border: 1px dashed var(--line);
    border-radius: 8px;
    text-align: center;
}

.note-workspace {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    min-width: 0;
    min-height: 0;
    background: #ffffff;
}

.note-topbar {
    display: grid;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.96);
}

.note-title-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
}

.note-name-field {
    display: grid;
    gap: 4px;
}

.note-name-field > span {
    color: #9aa49e;
    font-size: 12px;
    font-weight: 900;
}

.note-title-input {
    min-height: 42px;
    border-color: transparent;
    background: #f6f9fb;
    font-size: 22px;
    font-weight: 900;
}

.note-title-wrap span {
    color: var(--muted);
    white-space: nowrap;
    font-size: 13px;
    font-weight: 900;
}

.note-meta-row {
    display: grid;
    grid-template-columns: minmax(140px, 0.7fr) minmax(150px, 1fr) minmax(150px, 1fr) auto;
    gap: 10px;
    align-items: end;
}

.note-meta-row label {
    display: grid;
    gap: 6px;
}

.note-delete-button {
    border: 1px solid rgba(189, 96, 112, 0.26);
    background: #fff7f7;
    color: var(--rose);
}

.note-delete-button:hover,
.note-delete-button:focus-visible {
    border-color: rgba(189, 96, 112, 0.45);
    background: #fdebed;
    outline: none;
}

.note-write-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    min-height: 0;
    padding: 16px;
    background:
        linear-gradient(90deg, rgba(57, 127, 174, 0.06), transparent 45%, rgba(50, 142, 96, 0.05)),
        #fbfcfd;
}

.note-pane {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 8px;
    min-height: 0;
}

.note-pane textarea {
    width: 100%;
    min-height: 520px;
    height: 100%;
    resize: none;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--text);
    font: inherit;
    font-size: 16px;
    line-height: 1.8;
}

.note-pane.compare textarea {
    background: #fbfcfa;
}

.note-shell {
    grid-template-columns: minmax(0, 1fr) 252px;
    border-color: #e2e7e2;
    background: #fffdf9;
    box-shadow: 0 10px 30px rgba(32, 48, 41, 0.06);
    font-family: "Times New Roman", FangSong, 仿宋, STFangsong, "FangSong_GB2312", serif;
}

.note-workspace {
    order: 1;
    background: #fffdf9;
}

.note-sidebar {
    order: 2;
    grid-template-rows: auto auto auto minmax(0, 1fr);
    gap: 12px;
    padding: 14px 12px;
    border-right: 0;
    border-left: 1px solid #e8ece7;
    background: #f8faf7;
}

.note-sidebar-head h1 {
    color: #314039;
    font-size: 18px;
    font-weight: 900;
}

.note-new-button {
    width: 34px;
    min-height: 34px;
    padding: 0;
    border: 1px solid #d8e2db;
    border-radius: 50%;
    background: #ffffff;
    color: #314039;
    font-size: 20px;
    line-height: 1;
}

.note-new-button:hover,
.note-new-button:focus-visible {
    border-color: #b8cbc0;
    background: #eef5f0;
    color: var(--primary-deep);
}

.note-drawer,
.note-settings {
    border: 0;
}

.note-drawer summary,
.note-settings summary {
    cursor: pointer;
    color: #7a877f;
    list-style: none;
    font-size: 13px;
    font-weight: 900;
}

.note-drawer summary::-webkit-details-marker,
.note-settings summary::-webkit-details-marker {
    display: none;
}

.note-drawer summary::after,
.note-settings summary::after {
    content: "＋";
    margin-left: 6px;
    color: #9ca7a0;
}

.note-drawer[open] summary::after,
.note-settings[open] summary::after {
    content: "－";
}

.note-drawer[open] {
    display: grid;
    gap: 8px;
}

.note-create-row {
    grid-template-columns: minmax(0, 1fr) 48px;
    margin-top: 8px;
}

.note-create-row input,
.note-search input,
.note-meta-row input,
.note-meta-row select {
    min-height: 34px;
    border-color: #e0e7e1;
    background: #ffffff;
    font-size: 13px;
}

.note-create-row button {
    min-height: 34px;
    padding: 0 8px;
    background: #eaf2ec;
    color: var(--primary-deep);
}

.note-search span {
    display: none;
}

.note-directory {
    gap: 10px;
}

.note-folder-group {
    gap: 6px;
}

.note-folder-group > strong {
    color: #7a877f;
    font-size: 12px;
}

.note-date-group {
    gap: 5px;
}

.note-date-group > span {
    color: #9aa49e;
    font-size: 12px;
}

.note-list-item {
    min-height: 46px;
    padding: 8px 9px;
    border-color: transparent;
    background: transparent;
}

.note-list-item:hover,
.note-list-item:focus-visible,
.note-list-item.is-active {
    border-color: #dce7df;
    background: #ffffff;
    box-shadow: 0 6px 18px rgba(32, 48, 41, 0.05);
}

.note-list-item strong {
    font-size: 13px;
}

.note-list-item small {
    color: #8d9992;
    font-size: 12px;
}

.note-topbar {
    gap: 8px;
    padding: 18px 22px 12px;
    border-bottom: 0;
    background: #fffdf9;
}

.note-title-wrap {
    grid-template-columns: minmax(0, 1fr) auto;
}

.note-name-field {
    gap: 3px;
}

.note-title-input {
    padding: 0;
    border: 0;
    background: transparent;
    font-family: "Times New Roman", FangSong, 仿宋, STFangsong, "FangSong_GB2312", serif;
    font-size: 24px;
    line-height: 1.25;
}

.note-title-input:focus {
    outline: none;
}

.note-title-wrap span {
    color: #9aa49e;
    font-size: 12px;
}

.note-settings {
    justify-self: start;
}

.note-meta-row {
    grid-template-columns: 150px 150px 150px auto;
    margin-top: 10px;
}

.note-meta-row span {
    color: #7a877f;
    font-size: 12px;
}

.note-delete-button {
    min-height: 34px;
    padding: 0 10px;
    font-size: 12px;
}

.note-write-grid {
    gap: 0;
    padding: 0 22px 22px;
    background: #fffdf9;
}

.note-pane {
    gap: 6px;
}

.note-pane > span {
    color: #9aa49e;
    font-size: 13px;
    font-weight: 900;
}

.note-pane textarea {
    min-height: calc(100vh - 198px);
    padding: 18px 22px;
    border-color: #ebe5da;
    border-radius: 0;
    background-color: #fffdf9;
    background-image: linear-gradient(to bottom, transparent 31px, #d8cdbb 31px, #d8cdbb 32px);
    background-size: 100% 32px;
    background-position: 0 18px;
    color: #2c332f;
    font-family: "Times New Roman", FangSong, 仿宋, STFangsong, "FangSong_GB2312", serif;
    font-size: 18px;
    line-height: 32px;
    letter-spacing: 0;
    background:
        linear-gradient(to bottom, transparent 31px, #d8cdbb 31px, #d8cdbb 32px) 0 18px / 100% 32px,
        #fffdf9;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.64);
}

.note-pane:first-child textarea {
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

.note-pane.compare textarea {
    border-left: 0;
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
    background-color: #fbfcf8;
    background-image: linear-gradient(to bottom, transparent 31px, #d3dbcd 31px, #d3dbcd 32px);
    background-size: 100% 32px;
    background-position: 0 18px;
    background:
        linear-gradient(to bottom, transparent 31px, #d3dbcd 31px, #d3dbcd 32px) 0 18px / 100% 32px,
        #fbfcf8;
}

.login-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 22px;
    background:
        radial-gradient(circle at 28% 12%, rgba(50, 142, 96, 0.16), transparent 34%),
        linear-gradient(135deg, #f5f7f4 0%, #eaf3ee 100%);
}

.login-shell {
    width: min(420px, 100%);
}

.login-card {
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel-bg);
    box-shadow: var(--shadow);
}

.login-brand {
    display: grid;
    grid-template-columns: 62px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    margin-bottom: 24px;
}

.login-brand img {
    width: 62px;
    height: 62px;
    border-radius: 10px;
}

.login-brand strong {
    font-size: 26px;
}

.login-form {
    display: grid;
    gap: 14px;
}

.login-form label {
    display: grid;
    gap: 7px;
    color: var(--text);
    font-size: 14px;
    font-weight: 800;
}

.login-form input {
    width: 100%;
    min-height: 44px;
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--panel-soft);
    color: var(--text);
    font: inherit;
}

.login-form input:focus {
    border-color: #98c7aa;
    outline: 2px solid rgba(50, 142, 96, 0.14);
}

.login-form button {
    min-height: 44px;
    border: 0;
    border-radius: 7px;
    background: var(--primary);
    color: #fff;
    cursor: pointer;
    font-size: 15px;
    font-weight: 900;
}

.login-form button:hover,
.login-form button:focus-visible {
    background: var(--primary-deep);
    outline: none;
}

.login-message {
    min-height: 22px;
    color: var(--rose);
    font-size: 13px;
}

.tool-list {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.tool-row {
    display: grid;
    grid-template-columns: minmax(150px, 0.45fr) minmax(0, 1fr) 76px;
    gap: 14px;
    align-items: center;
    min-height: 64px;
    padding: 13px 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel-soft);
}

.tool-row span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.status-pill {
    justify-self: end;
    padding: 6px 10px;
    border-radius: 999px;
    background: #eaf4ee;
    color: var(--primary-deep);
    text-align: center;
    font-size: 12px;
    font-weight: 900;
}

@media (max-width: 920px) {
    .app-shell,
    .app-shell.has-function-menu,
    .app-shell.has-function-menu.is-sidebar-peeking {
        grid-template-columns: 1fr;
    }

    .sidebar,
    .function-panel {
        position: static;
        width: 100%;
        height: auto;
    }

    .app-shell.has-function-menu .sidebar {
        display: grid;
        grid-template-columns: 42px minmax(0, 1fr);
        gap: 10px;
        width: 100%;
        padding: 12px;
        background: var(--sidebar-bg);
        backdrop-filter: none;
    }

    .has-function-menu .brand {
        display: grid;
        pointer-events: auto;
        opacity: 1;
        visibility: visible;
        min-height: 42px;
    }

    .has-function-menu .category-nav {
        display: grid;
        pointer-events: auto;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        margin-top: 0;
        opacity: 1;
        visibility: visible;
        transform: none;
    }

    .has-function-menu .category-link {
        width: 100%;
        min-height: 42px;
    }

    .has-function-menu .category-mark {
        width: 30px;
        height: 6px;
    }

    .has-function-menu .sidebar-expand-hint {
        display: none;
    }

    .ai-entry-button,
    .has-function-menu .ai-entry-button,
    .has-function-menu.is-sidebar-peeking .ai-entry-button {
        position: static;
        transform: none;
        width: 42px;
        height: 42px;
        font-size: 12px;
    }

    .ai-client-dot,
    .has-function-menu .ai-client-dot,
    .has-function-menu.is-sidebar-peeking .ai-client-dot {
        position: static;
        align-self: center;
        justify-self: center;
    }

    .function-panel {
        border-right: 0;
        border-bottom: 1px solid rgba(59, 88, 72, 0.12);
    }

    .function-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .workspace {
        padding: 20px 16px 28px;
    }

    .home-hero,
    .home-grid,
    .news-columns,
    .tool-placeholder-grid,
    .freight-hero,
    .freight-layout,
    .note-shell,
    .note-title-wrap,
    .note-meta-row,
    .note-write-grid,
    .quote-head,
    .quote-main,
    .ads-load-row,
    .ads-filter-bar,
    .ads-main-grid,
    .ads-adjust-grid,
    .description-editor,
    .amz-crop-top,
    .image-tool-grid,
    .image-tool-grid.single,
    .image-tool-row.result,
    .image-tool-row.link-result {
        grid-template-columns: 1fr;
    }

    .description-editor,
    .description-pane,
    .quote-tool,
    .ads-adjustment-tool,
    .amz-label-cropper,
    .image-folder-tool,
    .freight-tool,
    .note-view.is-current,
    .note-shell {
        min-height: 520px;
    }

    .note-shell {
        overflow: visible;
    }

    .note-sidebar {
        grid-template-rows: auto auto auto auto auto;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .note-directory {
        max-height: 360px;
    }

    .note-workspace,
    .note-write-grid {
        min-height: auto;
    }

    .freight-tool {
        overflow: visible;
    }

    .freight-directory {
        grid-template-rows: auto auto auto;
        overflow: visible;
    }

    .freight-card-list,
    .freight-section-list {
        max-height: none;
        overflow: visible;
    }

    .freight-frame {
        height: 620px;
    }

    .external-tool-panel {
        min-height: auto;
        padding: 30px 22px;
    }

    .external-tool-copy h1 {
        font-size: 34px;
    }

    .ai-chat-shell,
    .ai-chat-view.is-current {
        min-height: calc(100vh - 40px);
    }

    .ai-chat-head,
    .ai-compose,
    .ai-file-list {
        padding-left: 16px;
        padding-right: 16px;
    }

    .ai-message-list {
        padding: 20px 16px;
    }

    .location-card {
        min-height: 86px;
    }
}

@media (max-width: 560px) {
    .brand {
        grid-template-columns: 52px minmax(0, 1fr);
    }

    .brand-icon {
        width: 52px;
        height: 52px;
    }

    .weather-meta,
    .forecast-row,
    .tool-row,
    .function-list,
    .ai-compose,
    .freight-stats,
    .freight-browser-head,
    .freight-section,
    .note-create-row {
        grid-template-columns: 1fr;
    }

    .note-title-input {
        font-size: 20px;
    }

    .note-pane textarea {
        min-height: 360px;
    }

    .freight-browser-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .freight-browser-actions {
        justify-content: flex-start;
    }

    .freight-frame {
        height: 520px;
        min-height: 520px;
    }

    .freight-frame-note {
        position: static;
        max-width: none;
        border-right: 0;
        border-bottom: 0;
        border-left: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .forecast-row small,
    .status-pill {
        justify-self: start;
        text-align: left;
    }

    h1 {
        font-size: 30px;
    }
}

.quote-head { flex-wrap: wrap; }
.quote-library-select { max-width: 420px; min-width: 180px; padding: 8px; border: 1px solid #ddd; border-radius: 8px; background: white; color: inherit; }

/* 报价工作台：分区、清晰的操作层级及窄屏布局 */
.quote-tool { padding: 24px; gap: 20px; background: #f6f8f7; border: 0; box-shadow: none; border-radius: 16px; min-width: 0; }
.quote-tool * { box-sizing: border-box; }
.quote-page-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:2px 2px 4px; }
.quote-eyebrow { color:var(--primary-deep); font-size:11px; letter-spacing:2px; font-weight:700; }
.quote-page-heading h2 { margin:6px 0; font-size:26px; letter-spacing:-.6px; color:var(--text); }
.quote-page-heading p,.quote-block-heading p { margin:6px 0 0; color:var(--muted); font-size:12px; line-height:1.6; }
.quote-heading-badge { padding:7px 12px; border:1px solid #dbe8df; border-radius:24px; font-size:12px; color:var(--primary-deep); white-space:nowrap; background:#edf5f0; }
.quote-source-card,.quote-input-card,.quote-results-card,.quote-compare:not(:empty) { padding:20px; border:1px solid #e3e9e5; border-radius:14px; background:white; min-width:0; box-shadow:0 3px 12px #203d2c04; }
.quote-tool .quote-head { display:flex; flex-wrap:nowrap; align-items:flex-end; gap:12px; }
.quote-source-field { display:grid; gap:8px; flex:1; min-width:0; }
.quote-source-field>span,.quote-field-label,.quote-paste-label { font-size:12px; font-weight:600; color:#53665b; }
.quote-tool .quote-library-select { width:100%; max-width:none; min-width:0; height:42px; padding:0 12px; background:#fafcfb; border:1px solid #dce5df; border-radius:8px; font-size:13px; color:var(--text); text-overflow:ellipsis; }
.quote-tool button { min-height:38px; padding:9px 14px; border:1px solid #dce5df; border-radius:8px; background:#fff; color:var(--primary-deep); font:inherit; font-size:12px; font-weight:600; cursor:pointer; transition:background .15s,border-color .15s; }
.quote-tool button:hover { background:#edf5ef; border-color:#aac8b5; }
.quote-tool button:focus-visible,.quote-tool summary:focus-visible { outline:3px solid #8fbd9e; outline-offset:3px; }
.quote-tool button:disabled { opacity:.5; cursor:wait; }
.quote-tool .quote-calc-button,.quote-tool .quote-save-button { background:var(--primary); border-color:var(--primary); color:#fff; }
.quote-tool .quote-calc-button:hover,.quote-tool .quote-save-button:hover { background:var(--primary-deep); }
.quote-tool .quote-clear-button { border-color:transparent; color:var(--muted); margin-left:auto; background:transparent; }
.quote-tool .quote-status { justify-content:flex-start; min-height:0; margin:10px 0 0; font-size:12px; font-weight:400; color:var(--muted); overflow-wrap:anywhere; }
.quote-manage { margin-top:16px; border-top:1px solid #edf0ee; }
.quote-manage>summary { padding:14px 0 0; color:var(--primary-deep); font-size:12px; font-weight:600; cursor:pointer; }
.quote-manage>summary span { font-weight:400; color:var(--muted); margin-left:12px; }
.quote-manage-body { margin-top:14px; padding:16px; background:#f8faf9; border-radius:10px; }
.quote-manage-body>p { margin:0 0 16px; font-size:12px; line-height:1.7; color:var(--muted); }
.quote-upload-grid { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.quote-upload-grid>div { display:grid; gap:8px; min-width:0; }
.quote-upload-grid button { text-align:left; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.quote-upload-grid small { color:var(--muted); font-size:11px; }
.quote-path-details { margin-top:16px; color:var(--muted); font-size:12px; }
.quote-path-details summary { cursor:pointer; }
.quote-tool .quote-path { width:100%; min-height:40px; margin-top:10px; border:1px solid #dce5df; border-radius:8px; padding:10px; font:inherit; }
.quote-manage-actions { display:flex; gap:10px; margin-top:18px; }
.quote-block-heading { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px; margin-bottom:18px; }
.quote-block-heading h3 { margin:0; color:var(--text); font-size:15px; font-weight:650; }
.quote-block-heading h3 span { display:inline-flex; align-items:center; justify-content:center; width:25px; height:25px; margin-right:7px; color:var(--primary-deep); background:#edf5ef; border-radius:7px; font-size:11px; }
.quote-tool .quote-settings { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); padding:0 0 20px; border:0; border-bottom:1px solid #edf0ee; border-radius:0; background:transparent; gap:16px; }
.quote-tool .quote-settings label { min-width:0; gap:8px; }
.quote-settings span { font-weight:500; }
.quote-settings input,.quote-settings select { height:40px; }
.quote-tool .quote-main { margin-top:20px; grid-template-columns:minmax(0,1.2fr) minmax(0,1fr); gap:22px; }
.quote-paste { min-width:0; gap:8px; }
.quote-input { min-height:148px; width:100%; background:#fcfdfc; font:inherit; font-size:13px; }
.quote-input::placeholder { color:#99a59d; }
.quote-actions { gap:8px; margin-top:4px; }
.quote-summary { gap:12px; align-self:stretch; }
.quote-summary div { min-height:94px; padding:18px; border:1px solid #e8eeea; background:#fafcfb; border-radius:10px; }
.quote-summary div:first-child { background:#eaf4ee; border-color:#d8e9df; }
.quote-summary span { font-weight:500; }
.quote-summary strong { font-size:25px; font-weight:650; letter-spacing:-.6px; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.quote-summary div:first-child strong { font-size:29px; }
.quote-table-wrap { border-color:#e7ece8; border-radius:10px; max-height:560px; }
.quote-table th { background:#f3f7f4; padding:12px 10px; font-weight:600; font-size:11px; white-space:nowrap; }
.quote-table td { padding:10px; border-bottom-color:#edf1ee; font-variant-numeric:tabular-nums; }
.quote-table tbody tr:last-child td { border-bottom:0; }
.quote-table tbody tr:hover { background:#fafcfb; }
.quote-table input,.quote-table select { min-height:34px; border-color:#e7ece8; }
.quote-empty { height:130px; font-weight:400; }
.quote-tool .quote-compare:empty { display:none; }
.quote-compare-table th button { min-height:26px; padding:4px 8px; font-size:11px; margin-left:5px; }
.quote-compare-table td small { margin-top:6px; }
@media(max-width:1100px) { .quote-tool .quote-main { grid-template-columns:1fr; } .quote-summary { grid-template-columns:repeat(4,minmax(0,1fr)); } .quote-summary div { padding:12px; } .quote-summary strong,.quote-summary div:first-child strong { font-size:21px; } }
@media(max-width:700px) { .quote-tool { padding:12px; gap:14px; } .quote-source-card,.quote-input-card,.quote-results-card,.quote-compare:not(:empty) { padding:14px; } .quote-tool .quote-settings,.quote-summary,.quote-upload-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } .quote-page-heading h2 { font-size:22px; } .quote-heading-badge { display:none; } .quote-manage-actions { flex-wrap:wrap; } .quote-manage>summary span { display:none; } }

/* Site registration footer */
.site-footer {
    padding: 16px 22px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
    text-align: center;
}

.site-footer a:hover {
    color: var(--primary-deep);
    text-decoration: underline;
}

.site-footer a:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 4px;
}

.login-body {
    grid-template-rows: 1fr auto;
    padding-bottom: 0;
}
