:root {
  color-scheme: light;
  --ink: #10233f;
  --muted: #71819a;
  --blue: #1673e6;
  --blue-dark: #0d5ec5;
  --blue-wash: #eaf3ff;
  --line: #e3eaf3;
  --paper: #ffffff;
  --canvas: #f4f7fb;
  --mint: #d9f2e9;
  --amber: #ffcb6a;
  --shadow: 0 18px 50px rgba(23, 52, 91, .08);
  font-family: 'Aptos', 'Segoe UI', 'Microsoft YaHei', sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--canvas); color: var(--ink); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid #83b8ff; outline-offset: 2px; }
.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(360px, 1.05fr) minmax(360px, .95fr); background: #f8fafc; }
.login-art { min-height: 100vh; padding: clamp(36px, 7vw, 94px); display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; color: white; background: radial-gradient(circle at 85% 15%, rgba(76, 159, 255, .7), transparent 25%), linear-gradient(148deg, #0b2d5c 0%, #0d5cae 55%, #167ce6 100%); position: relative; }
.login-art::after { content: ''; position: absolute; width: 560px; height: 560px; right: -180px; bottom: -210px; border: 1px solid rgba(255,255,255,.22); border-radius: 50%; box-shadow: 0 0 0 42px rgba(255,255,255,.045), 0 0 0 95px rgba(255,255,255,.035); }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; letter-spacing: -.04em; font-family: Manrope, sans-serif; }
.brand-mark { width: 48px; height: 48px; flex: 0 0 48px; display: block; overflow: hidden; border-radius: 14px; background: #fff; box-shadow: 0 2px 9px rgba(17,48,86,.13); }
.brand-mark img { display: block; width: 100%; height: 100%; object-fit: contain; }
.login-art .brand-mark { background: white; }
.brand span:last-child { font-size: 19px; }
.art-copy { position: relative; z-index: 1; max-width: 620px; }
.eyebrow { text-transform: uppercase; letter-spacing: .16em; font-size: 11px; font-weight: 700; opacity: .75; }
.art-copy h1 { max-width: 560px; margin: 18px 0; font: 800 clamp(40px, 5vw, 70px)/1.02 Manrope, 'Microsoft YaHei', sans-serif; letter-spacing: -.055em; }
.art-copy p { max-width: 450px; color: rgba(255,255,255,.78); font-size: 16px; line-height: 1.8; }
.art-foot { color: rgba(255,255,255,.64); font-size: 12px; position: relative; z-index: 1; }
.login-panel { display: grid; place-items: center; padding: 38px; }
.login-card { width: min(100%, 430px); padding: 44px; border: 1px solid var(--line); border-radius: 24px; background: var(--paper); box-shadow: var(--shadow); }
.login-card h2 { margin: 30px 0 8px; font: 800 30px Manrope, sans-serif; letter-spacing: -.04em; }
.login-card > p { margin: 0 0 28px; color: var(--muted); line-height: 1.6; }
.field { display: grid; gap: 7px; margin-bottom: 17px; }
.field label { color: #4c5d74; font-size: 12px; font-weight: 700; }
.field input, .field select, .field textarea { min-width: 0; width: 100%; padding: 12px 13px; color: var(--ink); border: 1px solid #d8e2ed; border-radius: 10px; background: #fff; }
.field textarea { min-height: 92px; resize: vertical; }
.hint { color: var(--muted); font-size: 12px; line-height: 1.55; }
.primary, .secondary, .quiet, .danger { border: 0; border-radius: 10px; padding: 11px 16px; font-weight: 700; transition: transform .15s, background .15s, box-shadow .15s; }
.primary { color: white; background: var(--blue); box-shadow: 0 8px 18px rgba(22,115,230,.2); }
.primary:hover { background: var(--blue-dark); transform: translateY(-1px); }
.secondary { background: var(--blue-wash); color: var(--blue-dark); }
.secondary:hover { background: #d8eaff; }
.quiet { color: var(--muted); background: transparent; }
.quiet:hover { background: #f1f5fa; color: var(--ink); }
.danger { color: #c34f52; background: #fff0f0; }
.full { width: 100%; }
.preview-note { margin-top: 18px; padding: 12px; border-radius: 10px; color: #51667e; background: #f4f7fa; font-size: 11px; line-height: 1.6; }
.demo-accounts { display: flex; gap: 8px; margin: 0 0 20px; }
.demo-accounts button { border: 1px solid var(--line); padding: 7px 9px; border-radius: 99px; color: var(--muted); background: white; font-size: 11px; }
.shell { min-height: 100vh; display: grid; grid-template-columns: 252px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 25px 16px; display: flex; flex-direction: column; background: #fff; border-right: 1px solid var(--line); }
.sidebar .brand { padding: 0 10px 31px; }
.workspace-label { margin: 0 10px 12px; color: #9aa7b7; font-size: 10px; letter-spacing: .14em; font-weight: 700; text-transform: uppercase; }
.nav { display: grid; gap: 4px; }
.nav button { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; padding: 11px 12px; border-radius: 10px; color: #687991; text-align: left; background: transparent; font-size: 13px; font-weight: 600; }
.nav button:hover { color: var(--ink); background: #f4f7fa; }
.nav button.active { color: var(--blue-dark); background: var(--blue-wash); }
.nav-icon { display: block; width: 20px; height: 20px; flex: 0 0 20px; }
.sidebar-bottom { margin-top: auto; }
.account-chip { display: flex; align-items: center; gap: 10px; padding: 12px 8px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.account-chip-button { width: 100%; border: 0; text-align: left; background: transparent; cursor: pointer; }
.account-chip-button:hover { border-radius: 10px; background: #f3f7fc; }
.account-chip-button > span:nth-child(2) { flex: 1; min-width: 0; }
.account-login-label { display: block; margin-top: 2px; color: var(--blue); font-size: 10px; font-weight: 700; }
.account-arrow { color: #90a2b7; font-size: 19px; }
.sidebar-logout { border-top: 1px solid var(--line); border-radius: 0; text-align: left; }
.avatar { display: grid; place-items: center; flex: 0 0 32px; height: 32px; border-radius: 50%; color: #fff; background: #153966; font-weight: 700; }
.account-chip strong { display: block; color: var(--ink); font-size: 11px; }
.main { min-width: 0; }
.topbar { position: sticky; z-index: 20; top: 0; display: flex; flex-direction: column; align-items: stretch; gap: 0; padding: 7px clamp(20px, 4vw, 56px) 8px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.96); backdrop-filter: blur(12px); }
.topbar-main { height: 0; display: flex; flex: 0 0 0; justify-content: flex-end; align-items: center; gap: 20px; }
.topbar-main:has(.top-actions) { height: 34px; flex-basis: 34px; }
.crumb { color: var(--muted); font-size: 12px; }
.top-actions { display: flex; align-items: center; gap: 13px; }
.demo-badge { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border-radius: 99px; color: #946018; background: #fff4d8; font-size: 10px; font-weight: 700; }
.demo-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #e7a42d; }
.mobile-brand { display: none; }
.content { width: min(100%, 1440px); margin: auto; padding: 34px clamp(20px, 4vw, 56px) 70px; }
.page-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 26px; }
.page-heading h1 { margin: 0; font: 800 30px Manrope, sans-serif; letter-spacing: -.045em; }
.page-heading p { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.heading-actions { display: flex; gap: 8px; }
.content:has(.records-page) { padding-top: 20px; }
.records-page .page-heading { align-items: center; gap: 12px; margin-bottom: 14px; }
.records-page .page-heading h1 { font-size: 22px; letter-spacing: -.035em; }
.records-page .page-heading p { display: none; }
.records-page .heading-actions { flex: 0 0 auto; gap: 6px; }
.records-page .heading-actions button { padding: 8px 11px; border-radius: 8px; font-size: 12px; line-height: 1.2; box-shadow: none; }
.records-page .toolbar { margin-bottom: 10px; }
.records-page .toolbar input,
.records-page .toolbar select { min-height: 34px; padding: 7px 9px; font-size: 12px; }
.content:has(.category-toolbar) .toolbar-left #search { width: min(100%, 380px); min-width: 0; }
.records-page .category-toolbar { margin-bottom: 10px; }
.hero { overflow: hidden; position: relative; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(210px, .85fr); gap: 24px; padding: clamp(24px, 4vw, 42px); border-radius: 22px; color: white; background: linear-gradient(115deg, #0c376d 0%, #1267c6 60%, #2c91f2 100%); box-shadow: var(--shadow); }
.hero::after { content: ''; position: absolute; width: 320px; height: 320px; right: 10%; top: -210px; border-radius: 50%; border: 1px solid rgba(255,255,255,.22); box-shadow: 0 0 0 35px rgba(255,255,255,.05), 0 0 0 72px rgba(255,255,255,.04); }
.hero-copy, .hero-aside { position: relative; z-index: 1; }
.hero .eyebrow { color: rgba(255,255,255,.7); }
.hero h2 { max-width: 520px; margin: 13px 0 12px; font: 800 clamp(28px, 4vw, 46px)/1.1 Manrope, 'Microsoft YaHei', sans-serif; letter-spacing: -.055em; }
.hero p { max-width: 500px; color: rgba(255,255,255,.75); line-height: 1.75; font-size: 13px; }
.hero-cta { margin-top: 16px; color: #124274; background: #fff; box-shadow: none; }
.hero-aside { display: flex; align-items: flex-end; justify-content: flex-end; }
.metric-card { min-width: 180px; padding: 18px; border: 1px solid rgba(255,255,255,.3); border-radius: 16px; background: rgba(255,255,255,.13); backdrop-filter: blur(8px); }
.metric-card span { display: block; color: rgba(255,255,255,.74); font-size: 11px; }
.metric-card strong { display: block; margin: 8px 0 2px; font: 700 26px Manrope, sans-serif; }
.metric-card small { color: rgba(255,255,255,.7); }
.overview-hero { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 22px; padding: 22px clamp(20px, 3vw, 34px); border-radius: 18px; color: #fff; background: linear-gradient(112deg, #0c376d 0%, #1267c6 66%, #2c91f2 100%); box-shadow: var(--shadow); }
.overview-hero .eyebrow { color: rgba(255,255,255,.72); }
.overview-hero h2 { margin: 8px 0 5px; font: 800 clamp(21px, 2.3vw, 29px)/1.2 Manrope, 'Microsoft YaHei', sans-serif; letter-spacing: -.04em; }
.overview-hero p { margin: 0; color: rgba(255,255,255,.8); font-size: 12px; line-height: 1.6; }
.overview-hero .primary { flex: 0 0 auto; color: var(--blue-dark); background: #fff; box-shadow: none; }
.archive-section { margin-bottom: 25px; }
.archive-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.archive-card { display: grid; grid-template-columns: 40px minmax(0, 1fr); align-items: start; gap: 12px; min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.archive-card .feature-icon { width: 38px; height: 38px; }
.archive-card h3 { margin: 1px 0 4px; font-size: 13px; }
.archive-card strong { display: block; margin-bottom: 5px; color: var(--blue-dark); font-size: 18px; line-height: 1.2; }
.archive-card p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.card-grid.overview-workflow { display: flex; flex-wrap: nowrap; overflow-x: auto; }
.card-grid.overview-workflow .feature-card { min-width: 0; flex: 1 0 0; }
.overview-workflow .feature-card { padding: 16px; }
.overview-workflow .feature-card h3 { margin-top: 10px; }
.how-it-works { margin-top: 26px; }
.steps-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.step-card { padding: 17px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.step-number { display: inline-grid; width: 30px; height: 30px; place-items: center; border-radius: 9px; color: var(--blue-dark); background: var(--blue-wash); font-size: 10px; font-weight: 800; }
.step-card h3 { margin: 11px 0 6px; font-size: 13px; }
.step-card p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 13px; margin: 18px 0 28px; }
.stat { padding: 17px; border: 1px solid var(--line); border-radius: 14px; background: white; }
.stat span { color: var(--muted); font-size: 11px; }
.stat strong { display: block; margin-top: 8px; font: 700 24px Manrope,sans-serif; }
.section-title { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 28px 0 14px; }
.section-title h2 { margin: 0; font: 700 17px Manrope, sans-serif; letter-spacing: -.03em; }
.section-title p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.feature-card, .panel, .record-card, .tool-card { border: 1px solid var(--line); border-radius: 15px; background: white; box-shadow: 0 3px 14px rgba(23,52,91,.025); }
.feature-card { padding: 20px; cursor: pointer; transition: transform .15s, box-shadow .15s; }
.feature-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.feature-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; color: var(--blue); background: var(--blue-wash); }
.feature-icon .icon { width: 22px; height: 22px; }
.feature-card h3 { margin: 15px 0 6px; font-size: 14px; }
.feature-card p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.panel { padding: 21px; }
.panel + .panel { margin-top: 16px; }
.panel-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 16px; }
.panel-heading h2 { margin: 0; font: 700 16px Manrope, sans-serif; }
.panel-heading p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 14px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.results { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin: 8px 0 18px; }
.result-cell { padding: 13px; border-radius: 11px; background: #f3f7fc; }
.result-cell span { display: block; color: var(--muted); font-size: 10px; }
.result-cell strong { display: block; margin-top: 7px; font-size: 16px; }
.content:has(.quote-editor) { padding: 15px 24px 20px; }
.content:has(.quote-editor) > .legal-foot { display: none; }
.quote-page-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 12px; }
.quote-page-head h1 { margin: 0; font: 800 24px Manrope, 'Microsoft YaHei', sans-serif; letter-spacing: -.04em; }
.quote-page-head p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.quote-type-picker { display: flex; flex: 0 0 auto; align-items: center; gap: 9px; color: var(--muted); font-size: 11px; font-weight: 700; }
.quote-type-picker select { min-width: 190px; max-width: min(34vw, 260px); min-height: 38px; padding: 7px 30px 7px 10px; border: 1px solid #cdddf2; border-radius: 9px; color: var(--blue-dark); background: #fff; font-size: 12px; font-weight: 700; }
.quote-editor { display: flex; min-width: 0; min-height: 0; flex: 1 1 auto; flex-direction: column; }
.quote-layout { display: grid; min-height: 0; flex: 1 1 auto; grid-template-columns: minmax(0, 1fr) minmax(290px, 35%); align-items: stretch; gap: 12px; overflow: hidden; }
.quote-main { display: grid; min-width: 0; min-height: 0; align-content: start; gap: 10px; overflow-y: auto; overscroll-behavior: contain; padding: 0 5px 14px 0; scrollbar-gutter: stable; }
.quote-panel, .quote-summary { min-width: 0; padding: 12px; }
.quote-section-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 9px; }
.quote-section-head h2 { margin: 0; font-size: 13px; }
.quote-section-head > span:not(.pill) { color: var(--muted); font-size: 10px; }
.quote-info-groups { display: grid; gap: 8px; }
.quote-info-group { min-width: 0; padding: 9px 10px 3px; border: 1px solid var(--line); border-radius: 10px; background: #fbfdff; }
.quote-info-title { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.quote-info-index { display: grid; width: 22px; height: 22px; flex: 0 0 22px; place-items: center; border-radius: 7px; color: var(--blue-dark); background: var(--blue-wash); font-size: 9px; font-weight: 800; }
.quote-info-title strong, .quote-info-title small { display: block; }
.quote-info-title strong { font-size: 11px; line-height: 1.3; }
.quote-info-title small { margin-top: 2px; color: var(--muted); font-size: 9px; line-height: 1.3; }
.quote-group-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 9px; }
.quote-terms-fields { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.quote-group-fields .span-two { grid-column: span 2; }
.quote-editor .field { min-width: 0; gap: 4px; margin-bottom: 7px; }
.quote-editor .field > span { overflow: hidden; color: var(--muted); font-size: 10px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.quote-editor .field input, .quote-editor .field select, .quote-editor .field textarea { min-height: 33px; padding: 7px 9px; border-radius: 8px; font-size: 11px; }
.quote-item-list { display: grid; max-height: max(170px, calc(100vh - 510px)); min-height: 128px; gap: 7px; overflow: auto; padding-right: 3px; }
.quote-item { min-width: 0; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: #fbfdff; }
.quote-item-primary { display: grid; grid-template-columns: 72px minmax(0, 1fr) 28px; align-items: start; gap: 8px; }
.quote-product-image { width: 42px; height: 42px; object-fit: cover; border-radius: 8px; background: var(--blue-wash); }
.quote-product-placeholder { display: grid; place-items: center; color: var(--blue); }
.quote-product-placeholder .icon { width: 22px; height: 22px; }
.quote-image-picker { display: grid; width: 72px; justify-items: center; }
.quote-image-button { position: relative; display: grid; width: 72px; min-height: 0; justify-items: center; gap: 3px; padding: 0; border: 0; color: var(--blue); background: transparent; cursor: pointer; }
.quote-image-button > span:last-child { font-size: 9px; line-height: 1.2; }
.quote-image-button:hover .quote-product-image { outline: 2px solid var(--blue); outline-offset: 1px; }
.quote-image-input { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.quote-item-product { min-width: 0; }
.quote-item-product > .field, .quote-product-archive-button { max-width: 300px; }
.quote-product-archive-button { width: 100%; min-height: 31px; margin-bottom: 7px; padding: 6px 9px; border: 1px solid #d7e5f7; border-radius: 8px; color: var(--blue-dark); background: #f7faff; font-size: 10px; font-weight: 700; text-align: left; cursor: pointer; }
.quote-product-archive-button:hover { border-color: #9fc3f2; background: #eff6ff; }
.quote-product-fields { display: grid; grid-template-columns: minmax(100px, .72fr) minmax(120px, 1fr); gap: 8px; }
.quote-remove { width: 28px; height: 28px; border: 0; border-radius: 7px; color: #a2afbf; background: transparent; font-size: 19px; }
.quote-remove:hover { color: #bd4e53; background: #fff0f0; }
.quote-item-details { display: grid; grid-template-columns: minmax(120px, 1.5fr) minmax(60px, .55fr) minmax(64px, .55fr) minmax(95px, .8fr) minmax(100px, .8fr); align-items: end; gap: 8px; margin-top: 6px; }
.quote-item-actions { display: flex; grid-column: 1 / -1; align-items: center; gap: 7px; min-height: 26px; margin-top: 1px; }
.quote-item-actions button { padding: 5px 8px; font-size: 10px; }
.quote-item-actions > span { color: var(--muted); font-size: 10px; }
.quote-archive-field { display: flex; min-width: 0; align-items: flex-end; gap: 7px; }
.quote-archive-field > .field { flex: 1 1 auto; min-width: 0; margin-bottom: 7px; }
.quote-archive-field > button { flex: 0 0 auto; margin-bottom: 7px; padding: 7px 9px; font-size: 10px; white-space: nowrap; }
.quote-archive-saved { flex: 0 0 auto; margin: 0 0 15px; color: #5b789b; font-size: 10px; white-space: nowrap; }
.quote-packaging-note { grid-column: 1 / -1; margin: 0; padding: 7px 9px; border-radius: 8px; color: #526780; background: #f3f7fc; font-size: 10px; }
.quote-line-total { min-width: 0; padding: 0 2px 12px; text-align: right; }
.quote-line-total span { display: block; margin-bottom: 3px; color: var(--muted); font-size: 9px; }
.quote-line-total strong { overflow: hidden; display: block; text-overflow: ellipsis; font-size: 11px; }
.quote-add { padding: 7px 10px; font-size: 10px; }
.quote-products-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 9px; }
.quote-products-actions button { min-height: 34px; padding: 7px 11px; font-size: 11px; }
.quote-summary { display: flex; min-height: 0; flex-direction: column; overflow: hidden; }
.quote-summary .quote-section-head .pill { flex: 0 0 auto; }
.quote-summary-line { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid #edf1f6; color: var(--muted); font-size: 10px; }
.quote-summary-line strong { color: var(--ink); }
.quote-grand-total { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 10px 0 8px; }
.quote-grand-total span { font-size: 11px; font-weight: 700; }
.quote-grand-total strong { overflow: hidden; color: var(--blue-dark); font-size: 21px; text-overflow: ellipsis; }
.quote-notes-field { grid-column: 1 / -1; }
.quote-notes-field textarea { min-height: 48px !important; resize: vertical; }
.quote-document-name { margin: 10px 0 5px; }
.quote-document-name input { min-height: 36px !important; }
.quote-save { margin-bottom: 2px; padding: 8px 12px; font-size: 11px; }
.quote-summary > .full { margin-top: 7px; }
.quote-summary > .quiet { padding: 7px; font-size: 10px; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.toolbar input, .toolbar select { min-width: 160px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: white; }
.toolbar-left, .toolbar-right { display: flex; flex-wrap: wrap; gap: 8px; }
.record-list { display: grid; gap: 9px; }
.record-card { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 14px; padding: 15px; align-items: center; }
.record-card-selected { border-color: #8ebaf2; background: #f7faff; }
.record-main { display: flex; align-items: center; gap: 13px; min-width: 0; }
.record-thumb { width: 52px; height: 52px; flex: 0 0 52px; object-fit: cover; border-radius: 11px; background: var(--blue-wash); }
.record-image-wrap { position: relative; display: block; width: 52px; height: 52px; flex: 0 0 52px; }
.record-image-wrap .record-thumb { position: absolute; inset: 0; }
.thumb-fallback { display: grid; place-items: center; color: var(--blue); font-weight: 700; }
.thumb-fallback[hidden] { display: none !important; }
.thumb-fallback .icon { width: 23px; height: 23px; }
.product-record-thumb { width: 72px; height: 72px; flex-basis: 72px; object-fit: contain; border: 1px solid #e3ebf5; border-radius: 12px; background: #f7faff; }
.record-image-wrap.product-record-image { width: 72px; height: 72px; flex-basis: 72px; }
.thumb-fallback.product-record-thumb { align-content: center; gap: 3px; padding: 5px; color: #8094ae; font-weight: 500; }
.thumb-fallback.product-record-thumb small { font-size: 9px; }
.product-selection-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 10px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.product-selection-summary, .product-bulk-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.product-selection-summary > span { color: var(--muted); font-size: 10px; }
.product-selection-summary button { padding: 6px 9px; border-radius: 8px; font-size: 10px; line-height: 1.2; }
.product-bulk-actions .field { margin: 0; }
.product-bulk-actions select { min-width: 150px; min-height: 34px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); font-size: 11px; }
.product-bulk-actions button { padding: 7px 11px; font-size: 11px; }
.product-select-control { display: grid; place-items: center; width: 25px; height: 36px; flex: 0 0 25px; cursor: pointer; }
.product-select-control input { width: 17px; height: 17px; margin: 0; accent-color: var(--blue); cursor: pointer; }
.record-main h3 { overflow: hidden; margin: 0 0 4px; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.record-main p { overflow: hidden; margin: 0; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.record-meta { margin-top: 5px; color: #9ba7b5; font-size: 10px; }
.record-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 5px; }
.record-actions button { padding: 7px 9px; font-size: 10px; }
.category-toolbar { margin: 0 0 13px; }
.category-filters { display: flex; flex-wrap: wrap; gap: 5px; }
.category-filter { display: inline-flex; min-height: 30px; align-items: center; gap: 6px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: #fff; font-size: 10px; }
.category-filter.active { border-color: #9fc4f5; color: var(--blue-dark); background: var(--blue-wash); }
.category-filter small { color: #8b99aa; font-size: 9px; }
.category-dot { display: inline-block; width: 9px; height: 9px; flex: 0 0 9px; border-radius: 50%; background: var(--category-color, #8795a8); }
.record-category-dot { margin-right: 7px; vertical-align: 1px; }
.category-groups { display: grid; gap: 12px; }
.category-group { min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.76); }
.category-group-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0 2px 10px; }
.category-group-heading strong { color: var(--ink); font-size: 12px; }
.category-group-heading small { margin-right: auto; color: var(--muted); font-size: 10px; }
.category-group-heading button { padding: 5px 8px; font-size: 10px; }
.category-group .empty { padding: 16px; }
.document-view-switch { display: flex; gap: 6px; margin: 0 0 10px; }
.document-view-switch button { min-height: 32px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); background: #fff; font-size: 11px; }
.document-view-switch button.active { border-color: #a9c9f2; color: var(--blue-dark); background: var(--blue-wash); font-weight: 700; }
.document-view-switch small { margin-left: 3px; color: var(--muted); }
.document-customer-groups, .document-folder-groups { display: grid; gap: 9px; }
.document-customer-group, .document-folder-group { min-width: 0; padding: 0 12px 10px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.78); }
.document-customer-group > summary, .document-folder-group > summary { display: flex; min-height: 43px; align-items: center; gap: 8px; cursor: pointer; list-style: none; }
.document-customer-group > summary::-webkit-details-marker, .document-folder-group > summary::-webkit-details-marker { display: none; }
.document-customer-group > summary::before, .document-folder-group > summary::before { content: '›'; color: var(--blue); font-size: 18px; transition: transform .16s ease; }
.document-customer-group[open] > summary::before, .document-folder-group[open] > summary::before { transform: rotate(90deg); }
.document-customer-group > summary strong, .document-folder-group > summary strong { color: var(--ink); font-size: 12px; }
.document-customer-group > summary small, .document-folder-group > summary small { margin-left: auto; color: var(--muted); font-size: 10px; }
.document-type-groups { display: grid; gap: 6px; margin: 0 0 2px 16px; }
.document-type-group { min-width: 0; padding: 0 9px 8px; border: 1px solid #e7edf5; border-radius: 9px; background: #fff; }
.document-type-group > summary { display: flex; min-height: 34px; align-items: center; gap: 8px; cursor: pointer; list-style: none; }
.document-type-group > summary::-webkit-details-marker { display: none; }
.document-type-group > summary::before { content: '+'; width: 15px; color: var(--blue); font-weight: 700; }
.document-type-group[open] > summary::before { content: '−'; }
.document-type-group > summary strong { color: #344860; font-size: 11px; }
.document-type-group > summary span { margin-left: auto; color: var(--muted); font-size: 10px; }
.document-folder-group > summary { min-width: 0; }
.document-folder-heading-actions { display: flex; justify-content: flex-end; gap: 5px; margin: 0 0 6px 23px; }
.document-folder-heading-actions button { padding: 5px 7px; font-size: 10px; }
.document-empty-hint { margin: 0 0 3px 23px; color: var(--muted); font-size: 10px; }
.document-folder-control { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 9px; }
.document-folder-control select { width: auto; min-width: 100px; max-width: 145px; min-height: 28px; padding: 4px 20px 4px 7px; border-radius: 7px; color: var(--ink); font-size: 10px; }
.empty { padding: 44px 18px; text-align: center; border: 1px dashed #d4dfea; border-radius: 13px; color: var(--muted); background: rgba(255,255,255,.6); }
.empty strong { display: block; margin-bottom: 6px; color: var(--ink); font-size: 13px; }
.toolbar select { color: var(--ink); }
.pill { display: inline-flex; padding: 5px 8px; border-radius: 99px; color: #476384; background: #eff4fa; font-size: 10px; font-weight: 700; }
.split { display: grid; grid-template-columns: minmax(0,1.25fr) minmax(250px,.75fr); gap: 15px; }
.subscription-card { padding: clamp(22px,4vw,36px); border-radius: 20px; color: white; background: linear-gradient(130deg, #112f57, #1268c9 70%, #3194f4); box-shadow: var(--shadow); }
.subscription-card h2 { margin: 13px 0 9px; font: 800 28px Manrope, sans-serif; letter-spacing: -.04em; }
.subscription-card > p { max-width: 620px; color: rgba(255,255,255,.76); font-size: 13px; line-height: 1.7; }
.plans { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin: 22px 0; }
.plan { padding: 17px; border: 1px solid rgba(255,255,255,.28); border-radius: 13px; background: rgba(255,255,255,.1); }
.plan small { color: rgba(255,255,255,.72); }
.plan strong { display: block; margin: 7px 0; font: 700 23px Manrope,sans-serif; }
.plan p { margin: 0; color: rgba(255,255,255,.68); font-size: 10px; }
.subscription-card .primary { color: #164879; background: white; }
.subscription-note { margin-top: 15px; padding: 12px; border: 1px solid rgba(255,255,255,.22); border-radius: 10px; color: rgba(255,255,255,.72); font-size: 10px; line-height: 1.65; }
.side-note { padding: 19px; border-radius: 14px; background: #fff; border: 1px solid var(--line); }
.side-note h3 { margin: 0 0 10px; font-size: 13px; }
.side-note p, .side-note li { color: var(--muted); font-size: 11px; line-height: 1.7; }
.side-note ul { padding-left: 18px; }
.membership-benefits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-top: 15px; }
.membership-benefits > div { display: grid; gap: 5px; padding: 12px; border: 1px solid rgba(255,255,255,.24); border-radius: 11px; background: rgba(255,255,255,.1); }
.membership-benefits strong { color: #fff; font-size: 12px; }
.membership-benefits span { color: rgba(255,255,255,.76); font-size: 10px; line-height: 1.55; }
.app-promo { margin-top: 15px; padding: 20px 22px; border: 1px solid #dce8f6; border-radius: 16px; background: linear-gradient(110deg, #fff 0%, #f5f9ff 100%); box-shadow: 0 12px 30px rgba(23,52,91,.05); }
.app-promo-brand { display: flex; align-items: center; gap: 12px; }
.app-promo-brand .brand-mark { width: 42px; height: 42px; flex-basis: 42px; border: 1px solid #e4edf8; border-radius: 12px; }
.app-promo-brand .eyebrow { color: var(--blue); font-size: 9px; }
.app-promo h2 { margin: 2px 0 0; font-size: 17px; }
.app-promo > p { max-width: 850px; margin: 12px 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.app-promo-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 12px; }
.app-promo-tags span { padding: 6px 9px; color: #41618b; border: 1px solid #dfebf8; border-radius: 99px; background: #fff; font-size: 10px; }
.app-store-link { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.app-promo > small { margin-left: 12px; color: #8b98a9; font-size: 10px; }
.content:has(.membership-page) { padding-top: 20px; }
.content:has(.membership-page) .page-heading { align-items: center; margin-bottom: 14px; }
.content:has(.membership-page) .page-heading h1 { font-size: 25px; }
.content:has(.membership-page) .page-heading p { margin-top: 4px; font-size: 11px; }
.membership-page { display: grid; grid-template-columns: minmax(0,1.45fr) minmax(270px,.8fr); gap: 12px; align-items: stretch; }
.membership-plan-card { display: flex; min-width: 0; flex-direction: column; padding: 20px; border: 1px solid var(--line); border-radius: 15px; background: #fff; box-shadow: 0 10px 28px rgba(23,52,91,.05); }
.membership-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.membership-title .eyebrow { color: var(--blue); font-size: 9px; }
.membership-title h2 { margin: 3px 0 0; font-size: 21px; }
.membership-highlight { padding: 6px 9px; color: #2163ae; border-radius: 99px; background: #edf5ff; font-size: 9px; white-space: nowrap; }
.membership-benefits { margin-top: 12px; }
.membership-benefits > div { padding: 9px 10px; border-color: #e3edf9; background: #f6f9fe; }
.membership-benefits strong { color: #245b9a; font-size: 10px; }
.membership-benefits span { color: #6e8098; font-size: 9px; }
.membership-preview-note { margin: 9px 0 0; color: #8392a5; font-size: 9px; line-height: 1.55; }
.account-link-panel { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; padding: 11px 12px; border: 1px solid #dce8f7; border-radius: 12px; background: #f7faff; }
.account-link-panel > div:first-child { display: grid; gap: 4px; }
.account-link-panel strong { color: #18385f; font-size: 10px; }
.account-link-panel small { color: #70819a; font-size: 9px; line-height: 1.5; }
.account-link-entry { display: grid; justify-items: end; gap: 6px; }
.account-link-error { max-width: 280px; color: #a53f45 !important; }
.account-link-status { display: grid; gap: 4px; }
.account-link-status strong { color: #216b50; }
.account-link-retry { padding: 0; color: var(--blue); border: 0; background: transparent; font: inherit; font-size: 9px; cursor: pointer; }
.account-link-form { display: flex; flex: 0 0 270px; gap: 6px; }
.account-link-form input { min-width: 0; width: 135px; padding: 7px 9px; border: 1px solid #cfdbeb; border-radius: 8px; color: #16345a; background: #fff; font: inherit; font-size: 10px; letter-spacing: .08em; }
.account-link-form .secondary { white-space: nowrap; padding: 7px 9px; font-size: 10px; }
.membership-page .app-promo { display: flex; flex-direction: column; justify-content: center; margin: 0; padding: 18px; }
.membership-page .app-promo-brand { gap: 9px; }
.membership-page .app-promo-brand .brand-mark { width: 36px; height: 36px; flex-basis: 36px; border-radius: 10px; }
.membership-page .app-promo h2 { font-size: 14px; }
.membership-page .app-promo > p { margin: 9px 0; font-size: 10px; }
.membership-page .app-promo > small { margin: 8px 0 0; font-size: 8px; }
.tools-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px; }
.tool-card { padding: 18px; }
.tool-card h3 { margin: 0 0 6px; font-size: 14px; }
.tool-heading { display: flex; align-items: center; gap: 10px; margin-bottom: 7px; }
.tool-heading .icon { width: 21px; height: 21px; color: var(--blue); }
.tool-heading h3 { margin: 0; }
.tool-card p { margin: 0 0 13px; color: var(--muted); font-size: 10px; line-height: 1.6; }
.resource-nav { display: flex; flex-wrap: wrap; gap: 7px; margin: -8px 0 13px; }
.resource-nav a { padding: 7px 10px; color: #35689e; border: 1px solid #dfeaf7; border-radius: 99px; background: #fff; font-size: 10px; text-decoration: none; }
.resource-nav a:hover { color: var(--blue-dark); border-color: #b9d4f5; background: #f2f7ff; }
.resource-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 11px; }
.resource-group { min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 13px; background: #fff; box-shadow: 0 8px 20px rgba(23,52,91,.035); scroll-margin-top: 150px; }
.resource-group-heading { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.resource-group-heading .feature-icon { width: 32px; height: 32px; flex: 0 0 32px; }
.resource-group-heading .feature-icon svg { width: 17px; height: 17px; }
.resource-group-heading h2 { margin: 0; font-size: 13px; }
.resource-group-heading p { margin: 3px 0 0; color: var(--muted); font-size: 9px; }
.resource-links { display: grid; gap: 5px; }
.resource-link { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 8px; border: 1px solid #edf1f7; border-radius: 8px; background: #fbfcfe; text-decoration: none; transition: border-color .15s, background .15s; }
.resource-link:hover { border-color: #cfe0f5; background: #f4f8fe; }
.resource-link > span:first-child { display: grid; min-width: 0; gap: 3px; }
.resource-link strong { overflow: hidden; color: #25496f; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.resource-link small { overflow: hidden; color: #8795a8; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.resource-external { flex: 0 0 auto; color: #8ca5c3; font-size: 12px; }
.resource-disclaimer { margin: 11px 0 0; color: #8a98aa; font-size: 9px; line-height: 1.6; }
.resource-disclaimer a { color: #527ba8; }
.inline-form { display: flex; gap: 7px; }
.inline-form input, .inline-form select { min-width: 0; flex: 1; width: 100%; padding: 9px 10px; border: 1px solid var(--line); border-radius: 9px; }
.tool-result { min-height: 18px; margin-top: 10px; color: var(--blue-dark); font-size: 11px; font-weight: 700; }
.modal-backdrop { position: fixed; z-index: 20; inset: 0; display: grid; place-items: center; padding: 18px; background: rgba(8,23,42,.5); backdrop-filter: blur(3px); }
.modal { width: min(100%, 620px); max-height: min(88vh, 850px); overflow: auto; padding: 22px; border-radius: 18px; background: white; box-shadow: 0 24px 80px rgba(0,0,0,.22); }
.auth-backdrop { z-index: 50; overflow: hidden; padding: 12px; background: rgba(11,27,49,.54); backdrop-filter: blur(5px); }
.auth-modal { width: min(100%, 440px); max-height: calc(100dvh - 24px); overflow: hidden; padding: 24px 28px; border: 1px solid rgba(255,255,255,.75); border-radius: 22px; }
.auth-modal-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.auth-modal-heading .auth-brand { margin-bottom: 14px; }
.auth-close { display: grid; width: 36px; height: 36px; flex: 0 0 auto; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); background: white; font-size: 24px; line-height: 1; cursor: pointer; }
.auth-close:hover { color: var(--ink); background: #f4f7fb; }
.auth-brand { margin-bottom: 14px; }
.auth-brand .brand-mark { width: 40px; height: 40px; flex-basis: 40px; border-radius: 12px; }
.auth-brand span:last-child { font: 800 20px 'Microsoft YaHei', sans-serif; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; padding: 5px; border-radius: 12px; background: #f1f5fa; }
.auth-tabs button { min-height: 38px; border: 0; border-radius: 9px; color: var(--muted); background: transparent; font-weight: 700; }
.auth-tabs button.active { color: var(--blue-dark); background: white; box-shadow: 0 2px 8px rgba(16,35,63,.08); }
.auth-back, .auth-link { border: 0; padding: 0; color: var(--blue-dark); background: transparent; font-size: 12px; font-weight: 700; }
.auth-back { margin: 4px 0 2px; }
.auth-link { display: block; margin: 13px 0 0 auto; }
.auth-message { margin: 15px 0 0; padding: 12px 13px; border: 1px solid #c5e6d5; border-radius: 10px; color: #236747; background: #f0faf4; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.auth-modal h2 { margin: 14px 0 4px; font: 800 23px 'Microsoft YaHei', sans-serif; letter-spacing: -.03em; }
.auth-intro { margin: 0 0 13px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.auth-modal .field { gap: 5px; margin-bottom: 9px; }
.auth-modal .field label { font-size: 11px; }
.auth-modal .field input { min-height: 42px; padding: 10px 12px; }
.auth-submit { min-height: 44px; margin-top: 2px; }
.auth-link { margin-top: 8px; }
.auth-message { margin-top: 9px; padding: 9px 11px; }
.auth-disclosure { margin: 11px 0 0; padding-top: 9px; border-top: 1px solid var(--line); color: #8491a2; font-size: 10px; line-height: 1.45; }
.plan-badge { padding: 7px 10px; border-radius: 99px; color: #247253; background: #e8f6ef; font-size: 11px; font-weight: 700; }
.demo-entry { margin-top: 12px; padding: 12px; border: 1px solid #d8e7fa; border-radius: 12px; background: #f6f9fe; }
.demo-entry p { margin: 8px 0 0; color: #6c7d92; font-size: 10px; line-height: 1.55; }
.demo-badge { color: #205f9d; background: #eaf3ff; }
.demo-banner { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; padding: 12px 15px; border: 1px solid #cfe2fb; border-radius: 12px; color: #34516f; background: #f2f8ff; font-size: 11px; line-height: 1.5; }
.demo-banner strong { flex: 0 0 auto; color: #1765bd; }
body:has(.auth-backdrop) { overflow: hidden; }
.modal-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 17px; }
.modal-header h2 { margin: 0; font: 700 19px Manrope,sans-serif; }
.modal-header p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.modal-close { border: 0; color: var(--muted); background: transparent; font-size: 22px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.product-modal { width: min(1120px, 96vw); max-height: min(92vh, 940px); }
.product-editor { display: grid; grid-template-columns: 148px minmax(0,1fr); gap: 18px; align-items: start; }
.product-image-editor { display: grid; justify-items: start; gap: 9px; }
.product-image-preview { display: grid; place-items: center; width: 132px; height: 132px; overflow: hidden; border: 1px dashed #b9d2f5; border-radius: 15px; background: #f4f8ff; color: var(--blue); }
.product-image-preview img { width: 100%; height: 100%; object-fit: contain; }
.product-image-preview .icon { width: 36px; height: 36px; }
.product-image-pick { position: relative; overflow: hidden; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--blue); cursor: pointer; font-size: 12px; font-weight: 700; }
.product-image-editor small { max-width: 145px; color: var(--muted); font-size: 10px; }
.product-details { display: grid; gap: 11px; min-width: 0; }
.product-form-section { padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.product-form-section > header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.product-form-section > header strong { color: var(--ink); font-size: 13px; }
.product-form-section > header small, .product-form-section .field label small { color: var(--muted); font-size: 10px; font-weight: 400; }
.product-form-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 0 10px; }
.product-form-grid .field { min-width: 0; margin-bottom: 8px; }
.product-form-grid .field.span-2 { grid-column: 1 / -1; }
.product-form-grid .field label { margin-bottom: 5px; color: #596c83; font-size: 10px; }
.product-form-grid .field input, .product-form-grid .field select { min-height: 36px; padding: 8px 9px; font-size: 11px; }
.product-metrics { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin-top: 2px; }
.product-metrics > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; padding: 9px 10px; border-radius: 9px; background: #f3f7fc; }
.product-metrics small, .product-price-result small { color: var(--muted); font-size: 10px; }
.product-metrics strong { color: var(--blue-dark); font-size: 11px; text-align: right; }
.product-price-result { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; margin-top: 7px; }
.product-price-result > div { display: grid; gap: 4px; min-width: 0; padding: 10px; border: 1px solid #dbe8f8; border-radius: 9px; background: #f6f9fe; }
.product-price-result strong { overflow-wrap: anywhere; color: var(--blue-dark); font-size: 14px; }
.product-price-result p { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.product-price-result .product-calculation-error { color: #b42332; }
.product-form-note { margin: 7px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.import-modal { width: min(100%, 850px); }
.quote-picker-backdrop { padding: 12px; }
.quote-product-picker { display: flex; width: min(1080px, 96vw); height: min(82vh, 780px); max-height: 92vh; flex-direction: column; overflow: hidden; padding: 18px; }
.quote-product-picker .modal-header { flex: 0 0 auto; margin-bottom: 12px; }
.quote-product-picker .modal-header h2 { font-family: 'Microsoft YaHei', sans-serif; }
.quote-picker-toolbar { display: grid; grid-template-columns: minmax(220px,1fr) minmax(150px,220px) auto; align-items: end; gap: 10px; flex: 0 0 auto; margin-bottom: 12px; }
.quote-picker-toolbar label { display: grid; min-width: 0; gap: 5px; }
.quote-picker-toolbar label > span { color: var(--muted); font-size: 10px; font-weight: 700; }
.quote-picker-toolbar input, .quote-picker-toolbar select { width: 100%; min-width: 0; min-height: 38px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; background: #fff; font-size: 12px; }
.quote-picker-select-visible { min-height: 38px; padding: 7px 10px; white-space: nowrap; font-size: 10px; }
.quote-picker-body { display: grid; min-height: 0; flex: 1 1 auto; grid-template-columns: minmax(0,1fr) 260px; gap: 12px; }
.quote-picker-list-panel, .quote-picker-selection { display: flex; min-width: 0; min-height: 0; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.quote-picker-list-heading, .quote-picker-selection > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex: 0 0 auto; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.quote-picker-list-heading strong, .quote-picker-selection > div:first-child strong { font-size: 11px; }
.quote-picker-list-heading span, .quote-picker-selection > div:first-child span { color: var(--muted); font-size: 10px; }
.quote-picker-results { min-height: 0; flex: 1 1 auto; overflow: auto; overscroll-behavior: contain; padding: 6px; }
.quote-picker-row { display: grid; grid-template-columns: 22px 48px minmax(0,1fr) minmax(100px,auto); align-items: center; gap: 10px; min-width: 0; min-height: 68px; padding: 8px 9px; border: 1px solid transparent; border-bottom-color: #edf1f6; border-radius: 9px; cursor: pointer; }
.quote-picker-row:hover { background: #f7faff; }
.quote-picker-row.is-selected { border-color: #b8d5fa; background: #f1f7ff; }
.quote-picker-row > input { width: 17px; height: 17px; margin: 0; accent-color: var(--blue); }
.quote-picker-image { position: relative; display: grid; width: 46px; height: 46px; place-items: center; overflow: hidden; border: 1px solid #e3ebf5; border-radius: 8px; background: #f7faff; }
.quote-picker-image img, .quote-picker-image-fallback { display: grid; width: 100%; height: 100%; place-items: center; object-fit: contain; color: var(--blue); }
.quote-picker-image-fallback[hidden] { display: none; }
.quote-picker-image .icon, .quote-picker-image-fallback .icon { width: 22px; height: 22px; }
.quote-picker-product { display: grid; min-width: 0; gap: 4px; }
.quote-picker-product strong { overflow: hidden; color: var(--ink); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.quote-picker-product small { overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.quote-picker-price { display: grid; justify-items: end; gap: 4px; }
.quote-picker-price strong { color: var(--blue-dark); font-size: 11px; white-space: nowrap; }
.quote-picker-price small { color: var(--muted); font-size: 9px; white-space: nowrap; }
.quote-picker-load-more { width: 100%; margin-top: 6px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--blue-dark); background: #f7faff; font-size: 10px; font-weight: 700; cursor: pointer; }
.quote-picker-empty { display: grid; justify-items: center; gap: 7px; padding: 48px 20px; color: var(--muted); text-align: center; }
.quote-picker-empty strong { color: var(--ink); font-size: 12px; }
.quote-picker-empty span, .quote-picker-selected-empty { font-size: 10px; }
.quote-picker-selection { background: #fbfdff; }
.quote-picker-selected-list { display: grid; align-content: start; gap: 5px; overflow: auto; padding: 7px; }
.quote-picker-selected-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; padding: 7px 8px; border: 1px solid #e6edf6; border-radius: 8px; background: #fff; }
.quote-picker-selected-item > span { display: grid; min-width: 0; gap: 3px; overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.quote-picker-selected-item small { color: var(--muted); font-size: 9px; }
.quote-picker-selected-item button { width: 25px; height: 25px; flex: 0 0 auto; border: 0; border-radius: 6px; color: var(--muted); background: transparent; font-size: 17px; cursor: pointer; }
.quote-picker-selected-item button:hover { color: #b42332; background: #fff0f0; }
.quote-picker-selected-empty { margin: 0; padding: 12px 8px; color: var(--muted); }
.quote-picker-actions { flex: 0 0 auto; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.quote-picker-actions button { min-height: 36px; padding: 7px 13px; font-size: 11px; }
.quote-picker-actions button:disabled { opacity: .5; cursor: not-allowed; }
.import-file { margin-top: 12px; }
.import-status { margin: 10px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.import-preview { max-height: 310px; overflow: auto; margin-top: 12px; border: 1px solid var(--line); border-radius: 12px; }
.import-empty { margin: 0; padding: 13px; color: var(--muted); font-size: 12px; }
.import-summary { margin: 10px 0 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #f5f8fc; color: var(--text); font-size: 12px; line-height: 1.55; }
.import-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.import-table th, .import-table td { padding: 9px; border-bottom: 1px solid var(--line); text-align: left; }
.import-table th { position: sticky; top: 0; background: #f5f8fc; }
.import-preview-image { display: block; width: 44px; height: 44px; object-fit: contain; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.import-warning td:last-child { color: #9a5b00; }
.import-invalid td:last-child { color: #b42332; }
.doc-preview { padding: 22px; border: 1px solid #ddd; border-radius: 10px; background: white; color: #222; font-family: Georgia, 'Microsoft YaHei', serif; }
.doc-preview h2 { text-align: center; letter-spacing: .06em; }
.doc-preview table { width: 100%; border-collapse: collapse; font-size: 11px; }
.doc-preview td, .doc-preview th { border: 1px solid #aaa; padding: 7px; text-align: left; }
.quotation-preview-table { margin-top: 14px; font-family: 'Aptos', 'Segoe UI', 'Microsoft YaHei', sans-serif; }
.quotation-preview-table th { background: #f1f1f1; white-space: nowrap; }
.quotation-preview-table td { vertical-align: middle; }
.quotation-preview-table small { display: block; margin-top: 3px; color: #71819a; }
.quotation-preview-image { width: 38px; height: 38px; object-fit: cover; border-radius: 6px; }
.quotation-preview-total { display: flex; justify-content: flex-end; align-items: baseline; gap: 12px; margin-top: 12px; padding: 10px 0; border-top: 2px solid #222; font-weight: 700; }
.quotation-preview-total strong { font-size: 17px; color: #171717; }
.quotation-modal { width: min(1180px, 96vw); max-height: 92vh; overflow: auto; }
.quotation-modal-header h2 small { margin-left: 8px; color: var(--muted); font-size: 12px; font-weight: 500; }
.quotation-preview-layout { display: grid; grid-template-columns: minmax(0,1fr) 220px; align-items: start; gap: 16px; }
.quotation-sheet { min-width: 0; min-height: 660px; padding: 32px; border-color: #ddd; border-radius: 4px; box-shadow: 0 3px 12px rgba(0,0,0,.07); font-family: Arial, 'Microsoft YaHei', sans-serif; }
.quotation-sheet-header { display: flex; justify-content: space-between; gap: 24px; padding-bottom: 17px; border-bottom: 1px solid #9299a1; }
.quotation-seller-brand { display: grid; align-content: start; gap: 5px; max-width: 58%; color: #171717; }
.quotation-seller-brand strong { font-size: 19px; letter-spacing: .025em; }
.quotation-seller-brand small { color: #777; font-size: 10px; line-height: 1.55; white-space: pre-line; }
.quotation-sheet-title { flex: 0 0 auto; text-align: right; }
.quotation-sheet-title h1 { margin: 0 0 9px; color: #171717; font-size: 22px; letter-spacing: .08em; }
.quotation-sheet-title dl { display: grid; gap: 3px; margin: 0; }
.quotation-sheet-title dl div { display: grid; grid-template-columns: auto auto; gap: 10px; font-size: 9px; }
.quotation-sheet-title dt { color: #777; }
.quotation-sheet-title dd { margin: 0; color: #333; font-weight: 700; }
.quotation-party-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; padding: 17px 0 13px; }
.quotation-party-grid section { min-width: 0; }
.quotation-party-grid h2 { margin: 0 0 6px; color: #222; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
.quotation-party-grid strong { display: block; color: #222; font-size: 11px; }
.quotation-party-grid p { margin: 4px 0 0; color: #777; font-size: 9px; line-height: 1.55; white-space: pre-line; }
.quotation-terms-band { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 18px; margin: 2px 0 12px; padding: 9px 11px; background: #f1f1f1; color: #404040; font-size: 9px; }
.quotation-terms-band b { margin-right: 5px; color: #222; }
.quotation-sheet .quotation-preview-table { margin: 0; table-layout: fixed; font-size: 9px; }
.quotation-sheet .quotation-preview-table th { padding: 8px 6px; border-color: #d0d4d9; color: #30343a; background: #f1f1f1; font-size: 8px; letter-spacing: .04em; text-align: left; }
.quotation-sheet .quotation-preview-table td { padding: 8px 6px; border-color: #ddd; color: #333; vertical-align: top; overflow-wrap: anywhere; }
.quotation-sheet[dir="rtl"] { text-align: right; font-family: Arial, Tahoma, sans-serif; }
.quotation-sheet[dir="rtl"] .quotation-sheet-title { text-align: left; }
.quotation-sheet[dir="rtl"] .quotation-party-grid,
.quotation-sheet[dir="rtl"] .quotation-terms-band,
.quotation-sheet[dir="rtl"] .quotation-signatures { direction: rtl; }
.quotation-sheet[dir="rtl"] .quotation-preview-table th,
.quotation-sheet[dir="rtl"] .quotation-preview-table td { text-align: right; }
.quotation-sheet[dir="rtl"] .quotation-totals { margin-right: 0; margin-left: auto; }
.quotation-sheet[dir="rtl"] .quotation-totals > div { flex-direction: row; }
.quotation-sheet[dir="rtl"] .quotation-sheet-footer { text-align: left; }
.quotation-sheet .quotation-preview-table th:nth-child(1), .quotation-sheet .quotation-preview-table td:nth-child(1) { width: 5%; }
.quotation-sheet .quotation-preview-table th:nth-child(2), .quotation-sheet .quotation-preview-table td:nth-child(2) { width: 13%; }
.quotation-sheet .quotation-preview-table th:nth-child(3), .quotation-sheet .quotation-preview-table td:nth-child(3) { width: 32%; }
.quotation-sheet .quotation-preview-table th:nth-child(4), .quotation-sheet .quotation-preview-table td:nth-child(4) { width: 8%; }
.quotation-sheet .quotation-preview-table th:nth-child(5), .quotation-sheet .quotation-preview-table td:nth-child(5) { width: 9%; }
.quotation-sheet .quotation-preview-table th:nth-child(6), .quotation-sheet .quotation-preview-table td:nth-child(6) { width: 16%; }
.quotation-sheet .quotation-preview-table th:nth-child(7), .quotation-sheet .quotation-preview-table td:nth-child(7) { width: 17%; }
.quotation-sheet .quotation-preview-table small { color: #777; font-size: 8px; line-height: 1.45; }
.quotation-totals { display: grid; justify-content: end; gap: 5px; margin: 11px 0 0 auto; width: min(230px, 100%); color: #777; font-size: 9px; }
.quotation-totals > div { display: flex; justify-content: space-between; gap: 16px; }
.quotation-totals strong { color: #444; font-weight: 500; }
.quotation-totals .quotation-grand-total { padding-top: 5px; border-top: 1px solid #777; color: #171717; font-size: 10px; font-weight: 700; }
.quotation-totals .quotation-grand-total strong { color: #171717; font-size: 12px; font-weight: 800; }
.quotation-notes { margin-top: 20px; color: #555; font-size: 9px; line-height: 1.55; }
.quotation-notes h2 { margin: 0 0 5px; color: #222; font-size: 9px; letter-spacing: .05em; text-transform: uppercase; }
.quotation-notes p { margin: 3px 0; white-space: pre-line; }
.quotation-signatures { display: grid; grid-template-columns: 1fr 58px 1fr; align-items: end; gap: 18px; margin-top: 68px; color: #222; }
.quotation-signatures > div:not(.quotation-seal) { display: grid; gap: 7px; font-size: 7px; }
.quotation-signatures span { height: 24px; border-bottom: 1px solid #aab4c0; }
.quotation-signatures small { color: #777; font-size: 7px; }
.quotation-seal { display: grid; width: 52px; height: 52px; place-items: center; border: 1px solid #777; border-radius: 50%; color: #555; font-size: 6px; text-align: center; overflow-wrap: anywhere; }
.quotation-sheet-footer { margin-top: 14px; color: #888; font-size: 7px; }
.packing-preview-table { font-size: 7px !important; }
.packing-preview-table th, .packing-preview-table td { padding: 6px 4px !important; }
.shipping-marks-block { margin: 24px 0; padding: 20px; border: 1px solid #ccc; color: #222; text-align: center; }
.shipping-marks-block h2 { margin: 0 0 16px; color: #222; font-size: 12px; letter-spacing: .08em; }
.shipping-marks-block pre { min-height: 150px; margin: 0; font: 700 14px/1.8 Arial, 'Microsoft YaHei', sans-serif; white-space: pre-wrap; overflow-wrap: anywhere; }
.quotation-export-panel { display: grid; gap: 11px; padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.quotation-export-panel h3 { margin: 0; font-size: 13px; }
.quotation-export-panel .field { margin: 0; }
.quotation-export-panel .field span { font-size: 10px; }
.quotation-export-panel select { min-height: 34px; }
.preview-check { display: flex; align-items: center; gap: 7px; color: #526780; font-size: 10px; }
.preview-check input { accent-color: var(--blue); }
.quotation-export-panel p { margin: 0; color: #8794a5; font-size: 9px; line-height: 1.55; }
@media (max-width: 760px) {
  .quotation-preview-layout { grid-template-columns: 1fr; }
  .quotation-export-panel { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .quotation-export-panel h3, .quotation-export-panel p, .quotation-export-panel > button { grid-column: 1 / -1; }
  .quotation-sheet { min-height: 0; padding: 20px 14px; }
  .quotation-sheet .quotation-preview-table { min-width: 650px; }
  .quotation-sheet { overflow-x: auto; }
  .quotation-signatures { margin-top: 42px; }
}
@media (max-width: 700px) {
  .quote-type-options { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .quote-type-option { padding: 9px 8px; }
  .quote-type-option strong { font-size: 10px; }
  .quote-item:has([name$="[cartonRange]"]) .quote-item-details { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .quote-item:has([name$="[cartonRange]"]) .quote-description { grid-column: 1 / -1; }
  .document-folder-heading-actions { justify-content: flex-start; }
  .document-folder-control { width: 100%; }
  .document-folder-control select { flex: 1; }
}
@page { size: A4 portrait; margin: 10mm; }
@media print {
  html, body { min-height: 0 !important; margin: 0 !important; background: #fff !important; overflow: visible !important; }
  body * { visibility: hidden !important; }
  .quotation-backdrop, .quotation-backdrop * { visibility: visible !important; }
  .quotation-backdrop { position: static !important; display: block !important; padding: 0 !important; background: #fff !important; backdrop-filter: none !important; }
  .quotation-modal { position: static !important; width: 100% !important; max-width: none !important; max-height: none !important; overflow: visible !important; margin: 0 !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; }
  .quotation-modal-header, .quotation-export-panel, .quotation-modal > .modal-actions { display: none !important; }
  .quotation-preview-layout { display: block !important; }
  .quotation-sheet { width: 100% !important; min-height: 0 !important; overflow: visible !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; }
  .quotation-sheet .quotation-preview-table { min-width: 0 !important; }
  .quotation-sheet .quotation-preview-table thead { display: table-header-group; }
  .quotation-sheet .quotation-preview-table tr { break-inside: avoid; page-break-inside: avoid; }
  .quotation-sheet .quotation-preview-table th { color: #30343a !important; background: #f1f1f1 !important; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .quotation-terms-band { background: #f1f1f1 !important; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .quotation-signatures { break-inside: avoid; }
}
.toast { position: fixed; z-index: 30; right: 22px; bottom: 22px; max-width: min(400px, calc(100% - 44px)); padding: 13px 16px; border-radius: 11px; color: white; background: #153966; box-shadow: var(--shadow); font-size: 12px; animation: rise .2s ease-out; }
@keyframes rise { from { transform: translateY(8px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.mobile-nav { display: none; }
.legal-foot { margin-top: 28px; color: #99a7b5; font-size: 10px; }

@media (min-width: 1024px) {
  .shell:has(.quote-editor) { height: 100dvh; min-height: 0; grid-template-rows: minmax(0, 1fr); overflow: hidden; }
  .main:has(.quote-editor) { display: flex; height: 100dvh; min-height: 0; flex-direction: column; overflow: hidden; }
  .main:has(.quote-editor) > .topbar { flex: 0 0 auto; }
  .content:has(.quote-editor) { display: flex; width: 100%; max-width: none; min-height: 0; flex: 1 1 auto; flex-direction: column; margin: 0; padding: 12px 20px 14px; overflow: hidden; }
  .quote-page-head { flex: 0 0 auto; margin-bottom: 10px; }
  .quote-layout { grid-template-columns: minmax(0, 1fr) minmax(320px, 36%); }
  .quote-main { scrollbar-color: #c9d7e9 transparent; }
}

@media (min-width: 701px) and (max-width: 1023px) {
  .quote-editor { display: block; min-height: 0; }
  .quote-layout { min-height: auto; overflow: visible; }
  .quote-main { min-height: auto; overflow: visible; padding-right: 0; }
  .quote-summary { position: sticky; top: 12px; min-height: auto; }
}

@media (max-width: 960px) {
  .shell { grid-template-columns: 215px minmax(0,1fr); }
  .card-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .stat-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .card-grid.overview-workflow .feature-card { flex-basis: 145px; }
  .archive-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .quote-layout { grid-template-columns: minmax(0, 1fr) 250px; }
  .quote-item-details { grid-template-columns: minmax(110px, 1.4fr) minmax(55px, .55fr) minmax(55px, .55fr) minmax(85px, .8fr) minmax(85px, .8fr); gap: 6px; }
  .content:has(.quote-editor) { padding: 15px 18px 20px; }
}
@media (max-width: 700px) {
  .login-shell { display: block; }
  .login-art { min-height: 260px; padding: 24px; }
  .art-copy h1 { max-width: 420px; font-size: 38px; }
  .art-copy p { font-size: 12px; }
  .art-foot { display: none; }
  .login-panel { padding: 20px; }
  .login-card { padding: 26px; }
  .shell { display: block; padding-bottom: 72px; }
  .sidebar { display: none; }
  .topbar { padding: 6px 12px 6px; }
  .topbar-main { height: 52px; flex-basis: 52px; justify-content: space-between; gap: 10px; }
  .mobile-brand { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 13px; }
  .mobile-brand .brand-mark { width: 36px; height: 36px; flex-basis: 36px; border-radius: 10px; }
  .crumb { display: none; }
  .demo-badge { padding: 6px 8px; font-size: 9px; }
  .auth-modal { width: min(100%, 440px); max-height: calc(100dvh - 20px); padding: 20px 22px; }
  .content { padding: 22px 15px 34px; }
  .content:has(.quote-editor) { padding: 18px 15px 34px; }
  .quote-editor { display: block; min-height: 0; }
  .quote-layout { grid-template-columns: 1fr; }
  .quote-main { min-height: auto; overflow: visible; padding-right: 0; }
  .quote-summary { position: static; min-height: auto; max-height: none; overflow: visible; }
  .quote-terms-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quote-item-list { max-height: 420px; }
  .quote-picker-backdrop { padding: 8px; }
  .quote-product-picker { width: 100%; height: calc(100dvh - 16px); max-height: none; padding: 13px; border-radius: 14px; }
  .quote-product-picker .modal-header { gap: 8px; margin-bottom: 10px; }
  .quote-product-picker .modal-header h2 { font-size: 16px; }
  .quote-product-picker .modal-header p { max-width: 290px; font-size: 10px; line-height: 1.45; }
  .quote-picker-toolbar { grid-template-columns: minmax(0,1fr) minmax(110px,.6fr); gap: 7px; margin-bottom: 8px; }
  .quote-picker-select-visible { grid-column: 1 / -1; justify-self: start; min-height: 30px; }
  .quote-picker-toolbar input, .quote-picker-toolbar select { min-height: 35px; padding: 7px 8px; font-size: 11px; }
  .quote-picker-body { grid-template-columns: 1fr; grid-template-rows: minmax(0,1fr) minmax(76px,22%); gap: 7px; }
  .quote-picker-row { grid-template-columns: 20px 40px minmax(0,1fr) auto; gap: 7px; min-height: 58px; padding: 6px; }
  .quote-picker-image { width: 38px; height: 38px; }
  .quote-picker-product strong { font-size: 10px; }
  .quote-picker-product small { font-size: 8px; }
  .quote-picker-price strong { font-size: 9px; }
  .quote-picker-price small { font-size: 8px; }
  .quote-picker-selection > div:first-child { padding: 6px 9px; }
  .quote-picker-selected-list { grid-template-columns: repeat(2,minmax(0,1fr)); align-content: start; }
  .quote-picker-selected-item { padding: 5px; }
  .quote-picker-actions { margin-top: 8px; padding-top: 8px; }
  .content:has(.quote-editor) { padding: 18px 15px 34px; }
  .page-heading { align-items: flex-start; flex-direction: column; margin-bottom: 20px; }
  .page-heading h1 { font-size: 25px; }
  .page-heading p { font-size: 11px; }
  .heading-actions { width: 100%; }
  .content:has(.records-page) { padding-top: 14px; }
  .records-page .page-heading { align-items: center; flex-direction: row; flex-wrap: wrap; gap: 8px; margin-bottom: 11px; }
  .records-page .page-heading > div:first-child { flex: 1 1 auto; }
  .records-page .page-heading h1 { font-size: 19px; }
  .records-page .heading-actions { width: auto; flex-wrap: wrap; gap: 5px; }
  .records-page .heading-actions button { padding: 7px 10px; font-size: 11px; }
  .records-page .toolbar { gap: 8px; margin-bottom: 8px; }
  .records-page .toolbar-left { display: flex; flex: 1 1 auto; flex-wrap: wrap; gap: 7px; }
  .records-page .toolbar-right { display: flex; justify-content: flex-end; }
  .records-page .toolbar-left input,
  .records-page .toolbar-left select { flex: 1 1 135px; }
  .content:has(.category-toolbar) .toolbar { align-items: center; flex-direction: row; }
  .content:has(.category-toolbar) .toolbar-left { min-width: 0; }
  .content:has(.category-toolbar) .toolbar-left #search { flex: 1 1 150px; width: 100%; max-width: 300px; }
  .content:has(.category-toolbar) .toolbar-right { flex: 0 0 auto; }
  .records-page .category-toolbar { margin-bottom: 8px; }
  .overview-hero { align-items: flex-start; flex-direction: column; gap: 14px; padding: 19px; }
  .overview-hero .primary { align-self: flex-start; }
  .archive-card { padding: 14px; }
  .archive-grid { grid-template-columns: 1fr; }
  .overview-workflow { scroll-snap-type: x mandatory; }
  .card-grid.overview-workflow .feature-card { flex: 0 0 min(78vw, 280px); scroll-snap-align: start; }
  .steps-grid { grid-template-columns: 1fr; }
  .hero { grid-template-columns: 1fr; gap: 10px; padding: 23px; border-radius: 17px; }
  .hero h2 { font-size: 31px; }
  .hero-aside { justify-content: flex-start; }
  .metric-card { width: 100%; }
  .stat-grid { gap: 8px; margin: 12px 0 22px; }
  .stat { padding: 12px; }
  .stat strong { font-size: 20px; }
  .card-grid, .tools-grid, .split { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: auto; }
  .results { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .quote-item-details { grid-template-columns: minmax(0, 1fr) minmax(60px, .45fr) minmax(70px, .65fr); }
  .quote-description { grid-column: 1 / -1; }
  .quote-line-total { padding-bottom: 12px; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .toolbar input, .toolbar select { min-width: 0; }
  .toolbar-left, .toolbar-right { display: grid; grid-template-columns: 1fr 1fr; }
  .record-card { grid-template-columns: 1fr; }
  .record-actions { justify-content: flex-start; padding-left: 65px; }
  .plans { grid-template-columns: 1fr; }
  .membership-page { grid-template-columns: 1fr; gap: 8px; }
  .membership-plan-card { padding: 14px; }
  .membership-title h2 { font-size: 18px; }
  .membership-benefits { margin-top: 8px; }
  .membership-benefits > div { padding: 7px 8px; }
  .account-link-panel { align-items: stretch; flex-direction: column; gap: 8px; }
  .account-link-entry { justify-items: stretch; }
  .account-link-form { flex-basis: auto; }
  .account-link-form input { flex: 1; width: auto; }
  .membership-page .app-promo { padding: 11px 13px; }
  .membership-page .app-promo > p { display: -webkit-box; overflow: hidden; margin: 5px 0; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  .membership-page .app-promo .app-store-link { align-self: flex-start; padding: 7px 10px; font-size: 10px; }
  .panel { padding: 16px; }
  .mobile-nav { position: fixed; z-index: 10; right: 0; bottom: 0; left: 0; display: grid; grid-template-columns: repeat(8,minmax(0,1fr)); padding: 7px 4px calc(7px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: rgba(255,255,255,.96); backdrop-filter: blur(12px); }
  .mobile-nav button { display: grid; place-items: center; gap: 3px; padding: 4px 1px; color: #8390a1; border: 0; background: transparent; font-size: 9px; }
  .mobile-nav button.active { color: var(--blue); font-weight: 700; }
  .mobile-nav-icon { width: 19px; height: 19px; }
  .legal-foot { margin-top: 19px; }
}
@media (max-height: 680px) {
  .auth-backdrop { padding: 8px; }
  .auth-modal { max-height: calc(100dvh - 16px); padding: 16px 20px; }
  .auth-modal-heading .auth-brand { margin-bottom: 9px; }
  .auth-brand .brand-mark { width: 34px; height: 34px; flex-basis: 34px; border-radius: 10px; }
  .auth-brand span:last-child { font-size: 18px; }
  .auth-close { width: 32px; height: 32px; }
  .auth-tabs button { min-height: 34px; }
  .auth-modal h2 { margin-top: 10px; font-size: 21px; }
  .auth-intro { margin-bottom: 9px; font-size: 11px; }
  .auth-modal .field { gap: 3px; margin-bottom: 6px; }
  .auth-modal .field input { min-height: 38px; padding: 8px 10px; }
  .auth-submit { min-height: 40px; }
  .auth-disclosure { margin-top: 7px; padding-top: 6px; }
  .demo-entry { margin-top: 8px; padding: 9px; }
  .auth-link { margin-top: 5px; }
}
@media (max-height: 520px) {
  .auth-backdrop { padding: 6px; }
  .auth-modal { max-height: calc(100dvh - 12px); padding: 12px 16px; border-radius: 16px; }
  .auth-modal-heading .auth-brand { margin-bottom: 5px; }
  .auth-brand .brand-mark { width: 30px; height: 30px; flex-basis: 30px; border-radius: 9px; }
  .auth-brand span:last-child { font-size: 16px; }
  .auth-close { width: 28px; height: 28px; font-size: 20px; }
  .auth-tabs { padding: 3px; }
  .auth-tabs button { min-height: 30px; }
  .auth-modal h2 { margin: 7px 0 3px; font-size: 19px; }
  .auth-intro { margin-bottom: 6px; line-height: 1.35; }
  .auth-modal .field { gap: 2px; margin-bottom: 4px; }
  .auth-modal .field label { font-size: 10px; }
  .auth-modal .field input { min-height: 34px; padding: 6px 9px; }
  .auth-submit { min-height: 36px; }
  .auth-link { margin-top: 4px; }
  .auth-message { margin-top: 5px; padding: 6px 8px; font-size: 10px; }
  .auth-disclosure { display: none; }
}
:root { --market-bg: #ffffff; --market-card: #f6f9ff; --market-line: #dfe9f7; --market-muted: #7a8ca6; }
.overview-market-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 14px; margin: 0 0 26px; }
.market-panel { min-width: 0; padding: 19px; color: var(--ink); background: var(--market-bg); border: 1px solid #dfe9f7; border-radius: 13px; box-shadow: 0 12px 28px rgba(35, 81, 142, .06); }
.market-heading { display: flex; align-items: center; gap: 10px; min-height: 44px; margin-bottom: 12px; }
.market-heading > div { display: grid; gap: 2px; }
.market-heading h2 { margin: 0; color: var(--ink); font-size: 16px; }
.market-heading small, .market-note { color: var(--market-muted); font-size: 11px; }
.market-icon { display: grid; width: 38px; height: 38px; place-items: center; color: var(--blue); border: 1px solid #dce9fb; border-radius: 8px; background: #edf5ff; }
.market-icon svg { width: 20px; height: 20px; }
.market-cards { display: grid; overflow: hidden; border: 1px solid var(--market-line); border-radius: 8px; background: var(--market-card); }
.clock-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.fx-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.market-card { display: flex; min-width: 0; flex-direction: column; justify-content: center; gap: 5px; padding: 13px 12px; }
.market-card + .market-card { border-left: 1px solid var(--market-line); }
.market-card select { width: 100%; min-width: 0; overflow: hidden; padding: 0 14px 0 0; color: #52708f; border: 0; outline: 0; background: transparent; font: inherit; font-size: 12px; font-weight: 650; text-overflow: ellipsis; cursor: pointer; }
.market-card select option { color: #21352f; background: #fff; }
.market-card strong { color: var(--ink); font-size: clamp(17px, 1.5vw, 23px); font-variant-numeric: tabular-nums; line-height: 1.15; }
.market-card small { min-height: 14px; overflow: hidden; color: #8192a9; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.clock-card { position: relative; }
.clock-card .market-status { position: absolute; top: 12px; right: 10px; color: #91a0b4; font-size: 9px; }
.clock-card .market-status.is-open { color: #1d9b64; }
.market-rate-date { flex: 1; margin-left: auto; color: var(--market-muted); font-size: 11px; text-align: right; }
.market-refresh { width: 34px; height: 34px; color: var(--blue); border: 1px solid #d6e5fa; border-radius: 8px; background: #f3f8ff; font-size: 22px; line-height: 1; cursor: pointer; }
.market-refresh:hover { color: var(--blue-dark); background: #e8f2ff; }
.market-note { margin: 9px 0 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.market-dock { min-width: 0; border: 0; border-radius: 0; background: transparent; }
.market-summary { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr) auto; align-items: center; gap: 12px; min-height: 42px; padding: 4px 8px; }
.market-summary-group { display: grid; min-width: 0; grid-template-columns: auto minmax(0,1fr); align-items: center; gap: 9px; }
.market-summary-title { flex: 0 0 auto; color: #59708d; font-size: 10px; font-weight: 700; }
.market-summary-title small { display: block; margin-top: 2px; color: #8797ab; font-size: 9px; font-weight: 500; }
.market-chip-list { display: grid; min-width: 0; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 4px; overflow: hidden; }
.market-chip { display: grid; min-width: 0; align-content: center; gap: 2px; overflow: hidden; padding: 4px 6px; color: #7386a0; border: 1px solid #e4edf8; border-radius: 6px; background: #fff; font-size: 9px; white-space: nowrap; }
.market-chip > span { overflow: hidden; text-overflow: ellipsis; }
.market-chip strong { color: #1f395a; font-size: 11px; font-variant-numeric: tabular-nums; }
.market-chip small { color: #92a1b4; font-size: 8px; }
.market-toggle { display: inline-flex; align-items: center; gap: 4px; padding: 6px 8px; color: var(--blue-dark); border: 1px solid #dce9f8; border-radius: 7px; background: white; font-size: 10px; font-weight: 700; white-space: nowrap; }
.market-settings { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 12px; padding: 8px 10px 10px; border-top: 1px solid #e4edf8; }
.market-settings-group { min-width: 0; }
.market-settings-group h2 { display: flex; align-items: center; gap: 6px; margin: 0 0 6px; color: #536b88; font-size: 10px; }
.market-settings-group h2 svg { width: 15px; height: 15px; color: var(--blue); }
.market-settings-heading { display: flex; align-items: center; gap: 8px; }
.market-settings-heading h2 { flex: 0 0 auto; }
.market-settings-heading .market-rate-date { font-size: 9px; }
.market-settings-heading .market-refresh { width: 24px; height: 24px; font-size: 16px; }
.market-controls { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 6px; }
.market-control { display: grid; min-width: 0; gap: 3px; color: #8596ac; font-size: 8px; }
.market-control select { min-width: 0; width: 100%; padding: 5px 18px 5px 6px; color: #365373; border: 1px solid #dfe8f4; border-radius: 6px; background-color: #fff; font-size: 9px; }
.target-control { grid-column: 1 / -1; grid-template-columns: auto minmax(130px, .55fr); align-items: center; }
.market-settings .market-note { margin: 5px 0 0; font-size: 8px; }
@media (max-width: 1120px) { .overview-market-grid { grid-template-columns: 1fr; } }
@media (max-width: 620px) {
  .market-summary { grid-template-columns: minmax(0,1fr) auto; gap: 5px; padding: 5px; }
  .market-summary-group { display: block; }
  .market-summary-group:first-child { grid-column: 1; grid-row: 1; }
  .market-summary-group:nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
  .market-toggle { grid-column: 2; grid-row: 1; }
  .market-summary-title { display: block; margin: 0 0 3px 2px; font-size: 8px; }
  .market-summary-title small { display: inline; margin: 0 0 0 3px; }
  .market-chip-list { gap: 3px; overflow: hidden; }
  .market-chip { justify-content: space-between; gap: 3px; padding: 4px 5px; font-size: 8px; }
  .market-chip strong { font-size: 9px; }
  .clock-chip { flex-wrap: wrap; }
  .clock-chip small { display: none; }
  .market-toggle { padding: 6px; font-size: 9px; }
  .market-settings { grid-template-columns: 1fr; gap: 8px; max-height: min(52vh, 330px); overflow-y: auto; }
  .market-settings-group h2 { margin-bottom: 4px; }
  .market-controls { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .target-control { grid-column: auto; grid-template-columns: 1fr; }
  .market-panel { padding: 13px; }
  .market-heading { gap: 8px; }
  .market-icon { width: 33px; height: 33px; }
  .market-heading h2 { font-size: 14px; }
  .market-heading small, .market-rate-date { font-size: 9px; }
  .market-rate-date { max-width: 115px; }
  .clock-cards, .fx-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .market-card:nth-child(3) { border-left: 0; }
  .market-card:nth-child(n+3) { border-top: 1px solid var(--market-line); }
  .market-card { min-height: 77px; padding: 11px 10px; }
  .market-card strong { font-size: 19px; }
  .clock-card .market-status { top: auto; right: 9px; bottom: 11px; }
}
.shell { grid-template-columns: 218px minmax(0, 1fr); }
.sidebar { padding: 20px 12px; }
.sidebar .brand { gap: 9px; padding: 0 6px 24px; }
.sidebar .brand-mark { width: 40px; height: 40px; flex-basis: 40px; border-radius: 12px; }
.sidebar .brand span:last-child { font-size: 17px; }
.nav button { gap: 10px; padding: 10px 9px; font-size: 12px; }
.content:has(.overview-dashboard) { width: 100%; padding: 14px 24px 24px; }
.content:has(.overview-dashboard) > .legal-foot { display: none; }
.overview-welcome { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 42px; margin-bottom: 12px; color: #526780; font-size: 12px; }
.overview-welcome .primary { flex: 0 0 auto; padding: 8px 13px; font-size: 12px; }
.overview-market-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; margin-bottom: 12px; }
.market-panel { padding: 12px; border-radius: 12px; }
.market-heading { min-height: 32px; gap: 8px; margin-bottom: 8px; }
.market-icon { width: 30px; height: 30px; border-radius: 7px; }
.market-icon svg { width: 17px; height: 17px; }
.market-heading h2 { font-size: 13px; }
.market-heading small { font-size: 9px; }
.market-rate-date { font-size: 9px; }
.market-refresh { width: 28px; height: 28px; font-size: 18px; }
.market-card { gap: 3px; min-height: 66px; padding: 8px; }
.market-card select { font-size: 10px; }
.market-card strong { font-size: 17px; }
.market-card small { min-height: 12px; font-size: 9px; }
.clock-card .market-status { top: 8px; right: 7px; font-size: 8px; }
.market-note { margin-top: 6px; font-size: 9px; }
.archive-section { margin-bottom: 12px; }
.archive-section .section-title, .overview-workflow-section .section-title { margin: 12px 0 8px; }
.archive-section .section-title h2, .overview-workflow-section .section-title h2 { margin: 0; font-size: 14px; }
.archive-section .section-title p, .overview-workflow-section .section-title p { margin: 3px 0 0; font-size: 10px; }
.archive-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.archive-card { grid-template-columns: 30px minmax(0, 1fr); gap: 8px; padding: 10px; border-radius: 11px; }
.archive-card .feature-icon { width: 30px; height: 30px; }
.archive-card h3 { margin: 1px 0 3px; font-size: 11px; }
.archive-card strong { margin-bottom: 3px; font-size: 15px; }
.archive-card p { font-size: 9px; line-height: 1.4; }
.card-grid.overview-workflow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; overflow: visible; }
.card-grid.overview-workflow .feature-card { min-width: 0; padding: 11px; border-radius: 11px; }
.overview-workflow .feature-card .feature-icon { width: 30px; height: 30px; }
.overview-workflow .feature-card h3 { margin: 7px 0 4px; font-size: 11px; }
.overview-workflow .feature-card p { margin: 0; font-size: 9px; line-height: 1.4; }
@media (max-width: 960px) {
  .overview-market-grid { grid-template-columns: 1fr; }
  .archive-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-grid.overview-workflow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .content:has(.overview-dashboard) { padding: 18px 20px 38px; }
}
@media (max-width: 620px) {
  .content:has(.overview-dashboard) { padding: 15px 13px 32px; }
  .overview-welcome { align-items: flex-start; font-size: 10px; }
  .overview-welcome .primary { padding: 7px 9px; font-size: 10px; }
  .archive-card { grid-template-columns: 1fr; }
  .archive-card .feature-icon { width: 28px; height: 28px; }
}
.market-select-wrap { display: inline-flex; align-items: center; gap: 2px; width: max-content; max-width: 100%; color: #52708f; }
.market-select-wrap { position: relative; cursor: pointer; }
.market-select-value { min-width: 0; color: #52708f; font-size: 12px; font-weight: 650; line-height: 1.2; overflow-wrap: anywhere; }
.market-select-wrap .market-select { position: absolute; z-index: 1; inset: 0; width: 100%; height: 100%; max-width: none; flex: none; opacity: 0; border: 0; padding: 0; background: transparent; appearance: none; -webkit-appearance: none; cursor: pointer; }
.market-chevron { flex: 0 0 auto; margin-top: -3px; color: #91a5bd; font-size: 13px; line-height: 1; pointer-events: none; }
.market-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 6px; }
.market-footer .market-note { margin: 0; }
.market-target { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; color: #7387a0; font-size: 10px; }
.market-target .market-select-value { font-size: 10px; }
@media (max-width: 1050px) { .resource-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 620px) {
  .resource-nav { gap: 5px; margin-top: -10px; }
  .resource-nav a { padding: 6px 8px; font-size: 9px; }
  .resource-grid { grid-template-columns: 1fr; gap: 8px; }
  .resource-group { padding: 12px; }
  .resource-group-heading { margin-bottom: 7px; }
  .resource-link { padding: 7px; }
}
@media (max-width: 620px) {
  .market-footer { align-items: flex-start; flex-direction: column; }
  .market-target { align-self: flex-end; }
  .product-editor { grid-template-columns: 1fr; }
  .product-image-editor { grid-template-columns: 72px minmax(0,1fr); align-items: center; }
  .product-image-preview { grid-row: span 3; width: 64px; height: 64px; }
  .product-image-editor small { max-width: none; }
  .product-details { gap: 8px; }
  .product-form-section { padding: 10px; }
  .product-form-section > header { align-items: flex-start; flex-direction: column; gap: 3px; }
  .product-form-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 8px; }
  .product-metrics { grid-template-columns: 1fr; }
  .product-price-result { grid-template-columns: 1fr; }
  .product-price-result p { grid-column: 1; }
}
