:root {
  color-scheme: light;
  --ink: #1d241f;
  --muted: #70766f;
  --line: #dde1d9;
  --paper: #f5f6f1;
  --white: #ffffff;
  --green: #244b3a;
  --green-dark: #17392b;
  --amber: #e9a23b;
  --amber-soft: #fff2d8;
  --shadow: 0 16px 44px rgba(28, 45, 36, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--paper); color: var(--ink); font-family: "Segoe UI", "Microsoft YaHei UI", "PingFang SC", system-ui, sans-serif; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
svg { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.shell { min-height: 100vh; display: flex; flex-direction: column; }
.topbar { height: 72px; padding: 0 max(24px, calc((100% - 1520px) / 2)); display: flex; align-items: center; justify-content: space-between; background: rgba(245, 246, 241, 0.94); border-bottom: 1px solid rgba(36, 75, 58, 0.1); position: sticky; top: 0; z-index: 10; backdrop-filter: blur(12px); }
.brand { color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: 11px; font-size: 18px; font-weight: 700; letter-spacing: -.02em; }
.brand-mark { width: 36px; height: 36px; display: grid; place-items: center; color: white; background: var(--green); border-radius: 11px; }
.top-actions { display: flex; align-items: center; gap: 24px; }
.header-action { display: inline-flex; align-items: center; gap: 7px; color: var(--green); text-decoration: none; font-size: 13px; font-weight: 700; }
.header-action svg { width: 17px; height: 17px; }
.status-dot { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.status-dot i { width: 7px; height: 7px; border-radius: 50%; background: #5aaa78; box-shadow: 0 0 0 4px #dcecdf; }
.avatar { width: 44px; height: 44px; border-radius: 50%; border: 0; background: #e3e7df; color: var(--green); font-weight: 700; cursor: pointer; display: grid; place-items: center; text-decoration: none; }
.avatar img { width: 100%; height: 100%; border-radius: inherit; display: block; object-fit: cover; }
.logout-button { padding: 6px 0; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 12px; }
main { width: min(1520px, calc(100% - 48px)); margin: 0 auto; flex: 1; }
footer { text-align: center; padding: 30px 20px; color: #959a94; font-size: 12px; }
.hero { padding: 88px 0 70px; border-bottom: 1px solid var(--line); position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; right: 4%; top: 22px; width: 240px; height: 240px; border-radius: 50%; border: 1px solid rgba(36,75,58,.08); box-shadow: 0 0 0 42px rgba(36,75,58,.025), 0 0 0 84px rgba(36,75,58,.018); }
.eyebrow { margin: 0 0 15px; color: var(--amber); font-size: 11px; font-weight: 700; letter-spacing: .18em; }
.hero h1, .tool-header h1 { margin: 0; font-size: clamp(34px, 5vw, 54px); line-height: 1.12; letter-spacing: -.045em; }
.hero > p:last-child, .tool-header > div > p:last-child { margin: 17px 0 0; color: var(--muted); font-size: 16px; }
.tool-section { padding: 52px 0 72px; }
.section-heading { margin-bottom: 26px; display: flex; align-items: end; justify-content: space-between; }
.section-kicker { color: var(--muted); font-size: 12px; }
.section-heading h2 { margin: 4px 0 0; font-size: 24px; letter-spacing: -.03em; }
.tool-count { color: var(--muted); font-size: 13px; }
.tool-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.tool-card { min-height: 220px; padding: 28px; border: 1px solid var(--line); border-radius: 20px; background: var(--white); color: var(--ink); text-decoration: none; display: grid; grid-template-columns: auto 1fr auto; gap: 22px; align-items: start; box-shadow: 0 1px 0 rgba(30,45,37,.03); transition: transform .2s, box-shadow .2s, border-color .2s; }
.tool-card:hover { transform: translateY(-3px); border-color: #c8cfc5; box-shadow: var(--shadow); }
.tool-icon, .tool-title-icon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 15px; }
.tool-icon svg, .tool-title-icon svg { width: 25px; height: 25px; }
.amber { background: var(--amber-soft); color: #aa6812; }
.tag { display: inline-block; margin-bottom: 14px; padding: 5px 9px; border-radius: 6px; background: #edf1eb; color: var(--green); font-size: 11px; font-weight: 600; }
.tool-copy h3 { margin: 0 0 9px; font-size: 20px; }
.tool-copy p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.7; }
.card-arrow { align-self: end; color: var(--green); }
.coming-card { min-height: 220px; border: 1px dashed #ccd1c9; border-radius: 20px; display: grid; place-content: center; justify-items: center; color: #9ba099; }
.coming-card span { font-size: 30px; font-weight: 300; }
.coming-card p { margin: 10px 0 0; font-size: 13px; }
.crumb { width: min(1520px, calc(100% - 48px)); margin: 24px auto 0; display: flex; gap: 10px; align-items: center; color: #9a9e98; font-size: 13px; }
.crumb a { display: flex; align-items: center; gap: 4px; color: var(--muted); text-decoration: none; }
.crumb svg { width: 16px; }
.crumb strong { color: var(--ink); font-weight: 500; }
.tool-header { display: flex; gap: 20px; align-items: center; padding: 42px 0 34px; }
.tool-header > div:last-child { min-width: 0; }
.tool-title-icon { width: 64px; height: 64px; flex: 0 0 auto; background: var(--amber-soft); color: #a96713; }
.tool-header h1 { font-size: clamp(30px, 4vw, 42px); }
.calculator-panel { border: 1px solid var(--line); border-radius: 22px; background: var(--white); overflow: hidden; box-shadow: var(--shadow); }
.panel-actions { min-height: 66px; padding: 0 28px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.panel-actions > div { display: flex; gap: 16px; }
.panel-actions svg { width: 15px; vertical-align: -3px; }
.quote-form { padding: 36px 42px 20px; }
.quote-grid { display: grid; grid-template-columns: 1fr; gap: 18px; }
.quote-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tax-options { margin: 4px 0 18px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; display: flex; flex-wrap: wrap; gap: 15px 28px; }
.tax-options legend { padding: 0 7px; font-size: 13px; font-weight: 600; }
.tax-options label { font-size: 13px; }
.quote-form > .primary-button { width: 100%; }
.quote-results { padding: 28px 42px 38px; background: #fafbf8; border-top: 1px solid var(--line); }
.quote-summary { margin-bottom: 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.quote-summary span { padding: 6px 10px; border-radius: 20px; background: #edf1eb; color: var(--green); font-size: 11px; }
.quote-result-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.quote-result-card { padding: 24px; border: 1px solid var(--line); border-radius: 15px; background: white; }
.quote-result-card h3 { margin: 0 0 12px; }
.carrier-rule { margin-left: 5px; color: var(--muted); font-size: 11px; font-weight: 400; }
.quote-total { display: block; color: var(--green); font-size: 34px; }
.quote-caption { color: var(--muted); font-size: 11px; }
.quote-result-card dl { margin-top: 20px; }
.manual-hint { color: var(--muted); }
.copy-image-button { width: 100%; margin-top: 18px; min-height: 48px; border: 1px solid var(--green); border-radius: 11px; background: white; color: var(--green); font-weight: 700; cursor: pointer; }
.copy-image-button:hover { background: #edf1eb; }
.tabs { min-height: 66px; padding: 0 26px; border-bottom: 1px solid var(--line); display: flex; gap: 30px; align-items: stretch; }
.tab { padding: 0 2px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted); cursor: pointer; font-weight: 600; display: flex; gap: 7px; align-items: center; }
.tab.active { color: var(--green); border-bottom-color: var(--green); }
.tab:nth-last-child(2) { margin-left: auto; }
.tab svg { width: 16px; }
.calc-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr); min-height: 510px; }
.calc-form { padding: 42px; border-right: 1px solid var(--line); }
.carrier-heading, .settings-card-title { display: flex; align-items: center; gap: 14px; margin-bottom: 34px; }
.carrier-heading h2, .settings-card-title h3 { margin: 0 0 4px; font-size: 21px; }
.carrier-heading p, .settings-card-title p { margin: 0; color: var(--muted); font-size: 13px; }
.carrier-badge { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 13px; color: white; font-size: 18px; font-weight: 700; }
.carrier-badge.yto { background: #e54f4b; }
.carrier-badge.ane { background: #2767a8; }
.field, .setting-field { display: block; margin-bottom: 22px; }
.field > span, .setting-field > span { display: block; margin-bottom: 9px; color: #464c47; font-size: 13px; font-weight: 600; }
.input-unit { display: flex; align-items: center; border: 1px solid #d7dbd4; border-radius: 11px; background: white; transition: border .2s, box-shadow .2s; }
.input-unit:focus-within { border-color: var(--green); box-shadow: 0 0 0 3px rgba(36,75,58,.08); }
.input-unit input { width: 100%; height: 50px; padding: 0 15px; border: 0; outline: 0; background: transparent; }
.input-unit b { padding: 0 15px; color: var(--muted); font-size: 13px; font-weight: 500; }
select { width: 100%; height: 52px; padding: 0 42px 0 15px; border: 1px solid #d7dbd4; border-radius: 11px; background: white; color: var(--ink); outline: none; }
select:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(36,75,58,.08); }
.rate-summary { margin: 3px 0 18px; padding: 16px 18px; border-radius: 12px; background: #f5f7f3; display: flex; align-items: center; gap: 24px; }
.rate-summary div { flex: 1; }
.rate-summary span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 11px; }
.rate-summary strong { color: var(--green); font-size: 15px; }
.rate-summary i { height: 34px; width: 1px; background: var(--line); }
.note { margin: 14px 0 24px; padding-left: 19px; color: var(--muted); font-size: 12px; line-height: 1.6; position: relative; }
.note::before { content: "i"; position: absolute; left: 0; top: 1px; width: 13px; height: 13px; border: 1px solid #a7aca6; border-radius: 50%; display: grid; place-items: center; font-size: 9px; font-style: italic; }
.primary-button { min-height: 50px; padding: 0 22px; border: 0; border-radius: 11px; background: var(--green); color: white; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 10px; transition: background .2s, transform .1s; }
.primary-button:hover { background: var(--green-dark); }
.primary-button:active { transform: translateY(1px); }
.calc-form > .primary-button { width: 100%; }
.result-card { padding: 42px; background: #fafbf8; display: grid; place-items: center; }
.result-empty { text-align: center; color: #a3a8a1; font-size: 13px; line-height: 1.7; }
.result-empty span { width: 54px; height: 54px; margin: 0 auto 14px; border-radius: 50%; background: #edf0ea; display: grid; place-items: center; }
.result-content, .manual-result { width: 100%; }
.result-label { margin: 0 0 5px; color: var(--muted); font-size: 12px; }
.result-content h3 { margin: 0; color: var(--green); font-size: clamp(38px, 6vw, 54px); letter-spacing: -.05em; }
.result-carrier { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; }
.result-content dl { margin: 30px 0 0; border-top: 1px solid var(--line); }
.result-content dl div { padding: 13px 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 20px; font-size: 13px; }
.result-content dt { color: var(--muted); }
.result-content dd { margin: 0; font-weight: 600; }
.estimate-note { margin: 18px 0 0; color: #999e98; font-size: 11px; line-height: 1.6; }
.reference-quote { margin-top: 22px; padding: 16px 18px; border: 1px solid #f0d8b2; border-radius: 12px; background: var(--amber-soft); text-align: left; }
.reference-quote > div { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.reference-quote span { color: #895819; font-size: 12px; font-weight: 700; }
.reference-quote strong { color: #895819; font-size: 22px; }
.reference-quote p { margin: 6px 0 0; color: #9a7545; font-size: 11px; }
.manual-result { text-align: center; }
.manual-result span { display: inline-block; padding: 5px 10px; border-radius: 20px; background: var(--amber-soft); color: #9b6117; font-size: 11px; }
.manual-result h3 { margin: 15px 0 8px; font-size: 28px; }
.manual-result p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.error-result span { background: #fde8e4; color: #a43f31; }
.rate-details { border-top: 1px solid var(--line); }
.rate-details summary { padding: 19px 42px; cursor: pointer; color: var(--green); font-size: 13px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; }
.rate-details summary::-webkit-details-marker { display: none; }
.rate-details[open] summary span { font-size: 0; }
.rate-details[open] summary span::after { content: "收起"; font-size: 13px; }
.table-scroll, .setting-table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th, td { padding: 12px 14px; border: 1px solid var(--line); text-align: center; white-space: nowrap; }
th { background: #f2f4ef; color: #59605a; }
td:first-child, th:first-child { text-align: left; }
.settings-form { padding: 36px 42px 42px; background: #f9faf7; }
.settings-intro { display: flex; justify-content: space-between; gap: 20px; align-items: start; margin-bottom: 28px; }
.settings-intro h2 { margin: 0 0 6px; }
.settings-intro p { margin: 0; color: var(--muted); font-size: 13px; }
.text-button { border: 0; background: none; color: #a45c3a; cursor: pointer; font-size: 13px; }
.settings-card { margin-top: 16px; padding: 24px; border: 1px solid var(--line); border-radius: 16px; background: white; }
.settings-card-title { margin-bottom: 22px; }
.setting-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.setting-table-wrap { margin-top: 8px; }
.setting-table input { width: 72px; padding: 8px; border: 1px solid var(--line); border-radius: 7px; text-align: center; }
.muted-cell { color: var(--muted); background: #fafafa; }
.settings-actions { padding-top: 24px; display: flex; justify-content: flex-end; }
.toast { position: fixed; left: 50%; bottom: 28px; z-index: 30; padding: 11px 18px; border-radius: 9px; background: var(--ink); color: white; font-size: 13px; opacity: 0; transform: translate(-50%, 12px); pointer-events: none; transition: .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.records-panel { padding: 36px 42px 42px; background: #f9faf7; }
.record-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.record-columns section { min-width: 0; }
.record-columns h3 { margin: 0 0 12px; font-size: 15px; }
.record-list { display: grid; gap: 10px; }
.record-item { padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.record-item > div { display: flex; justify-content: space-between; gap: 12px; }
.record-item strong { font-size: 13px; }
.record-item span, .record-item time, .record-item p, .record-item code { color: var(--muted); font-size: 11px; }
.record-item time { display: block; margin-top: 5px; }
.record-item p { margin: 10px 0 5px; }
.record-item code { display: block; overflow: hidden; text-overflow: ellipsis; }
.loading-text { padding: 24px; border: 1px dashed var(--line); border-radius: 12px; color: var(--muted); text-align: center; font-size: 12px; }

.login-shell { min-height: 100vh; padding: 36px 20px; display: grid; place-items: center; background: radial-gradient(circle at 20% 10%, #fff7e7 0, transparent 34%), radial-gradient(circle at 90% 80%, #e7f0e9 0, transparent 32%), var(--paper); }
.login-card { width: min(100%, 460px); padding: 38px; border: 1px solid rgba(36,75,58,.12); border-radius: 28px; background: rgba(255,255,255,.96); box-shadow: 0 30px 80px rgba(28,45,36,.13); text-align: center; }
.login-brand { display: flex; align-items: center; justify-content: center; gap: 11px; font-size: 18px; font-weight: 800; }
.login-tabs { margin: 26px auto 0; padding: 4px; border-radius: 12px; background: #f0f2ed; display: grid; grid-template-columns: 1fr 1fr; }
.login-tabs button { min-height: 38px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; font-weight: 700; }
.login-tabs button.active { background: white; color: var(--green); box-shadow: 0 3px 12px rgba(36,75,58,.1); }
.login-copy { margin: 34px 0 22px; }
.login-copy h1 { margin: 0; font-size: 30px; letter-spacing: -.04em; }
.login-copy > p:last-child { margin: 14px auto 0; max-width: 350px; color: var(--muted); font-size: 13px; line-height: 1.75; }
.feishu-qr { width: 282px; min-height: 282px; margin: 0 auto; border: 1px solid var(--line); border-radius: 18px; display: grid; place-items: center; overflow: hidden; background: #fafbf8; color: var(--muted); font-size: 13px; }
.feishu-qr iframe { display: block; border: 0 !important; }
.login-fallback { display: inline-block; margin-top: 20px; color: var(--green); font-size: 13px; font-weight: 700; }
.login-security { margin: 22px 0 0; color: #949a94; font-size: 11px; line-height: 1.6; }
.login-error { padding: 24px; }
.login-error strong { color: #9f4538; }
.login-error p { margin: 8px 0 0; line-height: 1.6; }
.superadmin-login-form { display: grid; gap: 14px; text-align: left; }
.superadmin-login-form label { display: grid; gap: 7px; color: var(--muted); font-size: 12px; }
.superadmin-login-form input, .inline-password-form input { min-height: 46px; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px; background: white; color: var(--ink); font: inherit; }
.superadmin-login-form .primary-button { width: 100%; margin-top: 4px; }
.superadmin-login-form .login-error { margin: 0; padding: 8px 0 0; color: #9f4538; text-align: center; font-size: 12px; }

.account-page { padding: 54px 0 80px; }
.account-heading h1 { margin: 6px 0 8px; font-size: clamp(34px, 4vw, 52px); letter-spacing: -.05em; }
.account-heading > p:last-child, .account-note, .binding-heading p { color: var(--muted); line-height: 1.7; }
.account-card { margin-top: 24px; padding: 30px; border: 1px solid var(--line); border-radius: 20px; background: white; box-shadow: var(--shadow); }
.account-profile { display: flex; align-items: center; gap: 18px; }
.account-avatar { width: 74px; height: 74px; border-radius: 50%; background: #e3e7df; color: var(--green); display: grid; place-items: center; overflow: hidden; font-size: 25px; font-weight: 800; }
.account-avatar img { width: 100%; height: 100%; object-fit: cover; }
.account-profile h2, .binding-heading h2 { margin: 0 0 5px; }
.account-profile p, .binding-heading p { margin: 0; color: var(--muted); font-size: 13px; }
.avatar-form { margin-top: 24px; display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.avatar-form input[type="file"] { flex: 1 1 260px; padding: 11px; border: 1px solid var(--line); border-radius: 10px; }
.account-note { margin: 14px 0 0; font-size: 12px; }
.binding-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.binding-state { flex: 0 0 auto; padding: 6px 10px; border-radius: 999px; background: #f2eee5; color: #8a6331; font-size: 11px; font-weight: 800; }
.binding-state.bound { background: #e7f1e9; color: var(--green); }
.binding-id { margin: 20px 0 0; color: var(--muted); font-family: ui-monospace, monospace; font-size: 12px; }
.inline-password-form { margin-top: 20px; display: grid; grid-template-columns: minmax(220px, 1fr) auto; gap: 12px; }
.danger-button { min-height: 46px; padding: 0 18px; border: 1px solid #c96354; border-radius: 10px; background: white; color: #a94336; cursor: pointer; font-weight: 700; }
.binding-qr { margin-top: 20px; padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: #fafbf8; text-align: center; }
.binding-qr > p { color: var(--muted); font-size: 12px; }

.access-header { padding-bottom: 26px; }
.access-icon { background: #e8efe9; color: var(--green); }
.access-panel { margin-bottom: 72px; border: 1px solid var(--line); border-radius: 22px; background: white; box-shadow: var(--shadow); overflow: hidden; }
.access-summary { padding: 22px 28px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: repeat(4, minmax(110px, 1fr)) auto; gap: 18px; align-items: center; }
.access-summary > div { display: flex; flex-direction: column; gap: 3px; }
.access-summary span { color: var(--muted); font-size: 11px; }
.access-summary strong { font-size: 24px; }
.secondary-button { min-height: 42px; padding: 0 18px; border: 1px solid var(--green); border-radius: 10px; background: white; color: var(--green); cursor: pointer; font-weight: 700; }
.secondary-button:disabled { opacity: .55; cursor: wait; }
.sync-note { margin: 0; padding: 11px 28px; border-bottom: 1px solid var(--line); background: #fafbf8; color: var(--muted); font-size: 11px; }
.access-columns { display: grid; grid-template-columns: minmax(320px, .85fr) minmax(420px, 1.4fr); }
.access-form, .grant-list-section { padding: 30px; }
.access-form { border-right: 1px solid var(--line); background: #fafbf8; }
.access-section-heading { min-height: 54px; margin-bottom: 20px; display: flex; align-items: start; justify-content: space-between; gap: 20px; }
.access-section-heading h2 { margin: 4px 0 0; font-size: 21px; }
.access-section-heading > span { color: var(--muted); font-size: 12px; }
.access-type { margin: 0 0 18px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 11px; display: flex; gap: 24px; }
.access-type legend { padding: 0 6px; color: var(--muted); font-size: 12px; }
.access-type label, .access-check { font-size: 13px; }
.access-check { margin: -4px 0 20px; display: flex; align-items: center; gap: 8px; }
.access-form .primary-button { width: 100%; }
.grant-list { display: grid; gap: 10px; }
.grant-item { padding: 17px 18px; border: 1px solid var(--line); border-radius: 13px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.grant-item strong { display: block; margin-top: 5px; font-size: 14px; }
.grant-item p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.grant-kind { padding: 3px 7px; border-radius: 5px; background: #edf1eb; color: var(--green); font-size: 10px; }
.access-empty { padding: 34px; border: 1px dashed var(--line); border-radius: 13px; color: var(--muted); text-align: center; }
.access-empty p { margin: 7px 0 0; font-size: 12px; line-height: 1.7; }
.ai-access-section { padding: 30px; border-top: 1px solid var(--line); background: linear-gradient(135deg, #fbfaff 0%, #f7f8ff 100%); }
.ai-access-description { max-width: 900px; margin: -8px 0 22px; color: var(--muted); font-size: 13px; line-height: 1.75; }
.ai-access-grid { display: grid; grid-template-columns: minmax(280px, .75fr) minmax(420px, 1.4fr); gap: 24px; }
.ai-access-form { padding: 20px; border: 1px solid #e4defc; border-radius: 16px; background: rgba(255,255,255,.82); }
.ai-access-form .primary-button { width: 100%; }
.ai-access-list { display: grid; gap: 10px; align-content: start; }
.ai-access-item.protected { border-color: #d8cef9; background: rgba(245,242,255,.9); }
.ai-access-person { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ai-access-person img, .ai-access-avatar { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 50%; object-fit: cover; }
.ai-access-avatar { display: grid; place-items: center; background: #6750d7; color: white; font-weight: 700; }
.protected-badge { flex: 0 0 auto; padding: 6px 10px; border-radius: 999px; background: #ebe6ff; color: #5540b8; font-size: 11px; font-weight: 700; }

@media (max-width: 760px) {
  .topbar { height: 62px; padding: 0 16px; }
  .status-dot, .header-action span, .logout-button { display: none; }
  .top-actions { gap: 12px; }
  main, .crumb { width: min(100% - 28px, 1520px); }
  .hero { padding: 58px 0 48px; }
  .hero::after { opacity: .5; right: -100px; }
  .tool-section { padding-top: 38px; }
  .tool-grid { grid-template-columns: 1fr; }
  .tool-card { min-height: 190px; padding: 22px; grid-template-columns: auto 1fr; }
  .card-arrow { display: none; }
  .coming-card { min-height: 130px; }
  .crumb { margin-top: 16px; }
  .tool-header { padding: 30px 2px 24px; align-items: flex-start; }
  .tool-title-icon { width: 52px; height: 52px; }
  .tool-header .eyebrow { display: none; }
  .calculator-panel { border-radius: 16px; }
  .panel-actions { padding: 0 16px; }
  .quote-form, .quote-results { padding: 24px 18px; }
  .quote-grid.two, .quote-result-grid { grid-template-columns: 1fr; }
  .tabs { min-height: 58px; padding: 0 15px; gap: 18px; overflow-x: auto; }
  .tab { white-space: nowrap; font-size: 13px; }
  .tab:last-child { margin-left: 0; }
  .calc-layout { grid-template-columns: 1fr; }
  .calc-form { padding: 26px 20px; border-right: 0; }
  .result-card { min-height: 330px; padding: 28px 20px; border-top: 1px solid var(--line); }
  .rate-details summary { padding: 18px 20px; }
  .settings-form { padding: 24px 14px 28px; }
  .records-panel { padding: 24px 14px 28px; }
  .record-columns { grid-template-columns: 1fr; }
  .settings-card { padding: 18px 14px; }
  .setting-grid { grid-template-columns: 1fr; gap: 0; }
  .settings-intro { align-items: center; }
  .settings-intro p { max-width: 230px; line-height: 1.5; }
  .settings-actions .primary-button { width: 100%; }
  .login-card { padding: 30px 18px; border-radius: 22px; }
  .login-copy h1 { font-size: 26px; }
  .feishu-qr { width: 280px; max-width: 100%; }
  .account-page { padding: 34px 0 56px; }
  .account-card { padding: 22px 16px; }
  .inline-password-form { grid-template-columns: 1fr; }
  .access-summary { padding: 18px; grid-template-columns: repeat(2, 1fr); }
  .access-summary .secondary-button { grid-column: 1 / -1; }
  .sync-note { padding: 10px 18px; }
  .access-columns { grid-template-columns: 1fr; }
  .access-form, .grant-list-section { padding: 22px 16px; }
  .access-form { border-right: 0; border-bottom: 1px solid var(--line); }
  .ai-access-section { padding: 22px 16px; }
  .ai-access-grid { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
  .brand span:last-child { font-size: 16px; }
  .tool-card { grid-template-columns: 1fr; }
  .tool-icon { width: 46px; height: 46px; }
  .rate-summary { gap: 14px; }
  .tool-header > div:last-child > p:last-child { font-size: 13px; line-height: 1.5; }
  .settings-intro { align-items: flex-start; flex-direction: column; }
  .settings-intro .text-button { padding: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
