:root {
    --ink: #10211b;
    --muted: #78908a;
    --muted-blue: #8aa0bd;
    --page: #f5f7f3;
    --surface: #fffefb;
    --line: #dfe5dd;
    --deep: #0b281e;
    --deep-2: #184f40;
    --green: #1f6b58;
    --green-soft: #e8f4ef;
    --mint: #dff2e8;
    --amber: #d99119;
    --amber-soft: #fff3df;
    --coral: #d65f4a;
    --coral-soft: #ffebe7;
    --shadow: 0 12px 30px rgba(26, 45, 36, .045);
    font-family: "Microsoft YaHei UI", "PingFang SC", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--page); color: var(--ink); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
.button { text-decoration: none; }
.icon { width: 20px; height: 20px; flex: 0 0 auto; }

.app-shell { display: grid; grid-template-columns: 258px 1fr; min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: var(--deep); color: #b9ccc5; border-right: 1px solid rgba(255,255,255,.05); }
.brand { height: 72px; display: flex; align-items: center; gap: 13px; padding: 0 16px; border-bottom: 1px solid rgba(255,255,255,.07); }
.brand-mark { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: #a9edc8; color: #174c3d; font-size: 24px; font-weight: 700; }
.brand strong { display: block; color: #f2faf6; font-size: 18px; letter-spacing: .02em; }
.brand span { display: block; margin-top: 5px; font-size: 12px; color: #6f9487; }
.side-nav { flex: 1; min-height: 0; padding: 13px 8px; overflow: auto; scrollbar-width: thin; scrollbar-color: rgba(169,237,200,.28) transparent; }
.side-nav::-webkit-scrollbar { width: 6px; }
.side-nav::-webkit-scrollbar-track { background: transparent; }
.side-nav::-webkit-scrollbar-thumb { border-radius: 99px; background: rgba(169,237,200,.2); }
.side-nav:hover::-webkit-scrollbar-thumb { background: rgba(169,237,200,.38); }
.nav-group { margin-bottom: 15px; }
.nav-label { padding: 6px 11px; color: #557b6d; font-size: 12px; }
.nav-item { display: flex; align-items: center; gap: 13px; min-height: 44px; margin: 2px 0; padding: 0 12px; border-radius: 9px; color: #a5b9b1; text-decoration: none; font-size: 15px; font-weight: 600; }
.nav-item:hover { color: #eaf5ef; background: rgba(255,255,255,.04); }
.nav-item.active { background: #dff2e8; color: #194e3e; }
.collapse-button { flex: 0 0 52px; margin-top: auto; height: 52px; border: 0; border-top: 1px solid rgba(255,255,255,.07); background: transparent; color: #75978b; font-size: 27px; }
.collapse-button:hover { background: rgba(255,255,255,.04); color: #b9d9cc; }
.collapse-closed { display: none; }

.main-content { min-width: 0; }
.topbar { height: 72px; padding: 0 32px; display: flex; align-items: center; justify-content: space-between; background: rgba(255,255,255,.78); border-bottom: 1px solid #e4e8e1; backdrop-filter: blur(10px); }
.topbar-leading { min-width: 0; display: flex; align-items: center; gap: 12px; }
.topbar-leading > div { min-width: 0; }
.topbar h1 { margin: 0; font-size: 20px; }
.topbar p { margin: 4px 0 0; color: var(--muted-blue); font-size: 13px; }
.user-panel { display: flex; align-items: center; gap: 14px; text-align: right; }
.user-panel strong, .user-panel span { display: block; }
.user-panel strong { font-size: 14px; }
.user-panel span { margin-top: 4px; color: var(--muted-blue); font-size: 12px; }
.avatar { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: #e2f2e9; color: #326b59; font-weight: 700; }
.page-body { padding: 34px 32px 42px; }
.mobile-menu-button, .mobile-nav-close, .mobile-nav-overlay { display: none; }

.hero-card { min-height: 184px; display: flex; align-items: center; justify-content: space-between; gap: 30px; padding: 32px; background: linear-gradient(135deg, #e8f4ef, #edf6f1); border: 1px solid #d4e7de; border-radius: 26px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border: 1px solid #d2e3db; border-radius: 999px; background: rgba(255,255,255,.68); color: #467567; font-size: 13px; font-weight: 700; }
.eyebrow i { width: 7px; height: 7px; border-radius: 50%; background: #39ad7d; }
.hero-card h2 { margin: 20px 0 8px; font-size: clamp(25px, 2.1vw, 32px); letter-spacing: -.03em; }
.hero-card p { margin: 0; color: #67847b; font-size: 15px; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 0 18px; border-radius: 8px; border: 1px solid #d9e1dc; background: #fff; color: #27342f; font-weight: 700; }
.button .icon { width: 18px; height: 18px; }
.button:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(34,63,50,.08); }
.button-primary { background: #1e654f; border-color: #1e654f; color: white; }
.button-ghost { background: rgba(255,255,255,.42); }

.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-top: 24px; }
.kpi-card { min-height: 158px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 24px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); box-shadow: var(--shadow); text-decoration: none; }
.kpi-card:hover { border-color: #acd0c0; transform: translateY(-2px); }
.kpi-label { display: flex; align-items: center; gap: 10px; color: #6b809c; font-size: 14px; font-weight: 700; }
.kpi-label::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #40af83; }
.kpi-label.amber-dot::before { background: #e6aa3c; }
.kpi-label.coral-dot::before { background: #e87863; }
.kpi-card strong { display: block; margin: 17px 0 9px; font-size: 35px; line-height: 1; }
.kpi-card small { color: #91a2ba; font-size: 13px; }
.kpi-icon { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 15px; color: #28785f; }
.kpi-icon.mint { background: var(--green-soft); }
.kpi-icon.amber { background: var(--amber-soft); color: #bf7613; }
.kpi-icon.coral { background: var(--coral-soft); color: #cf5945; }
.kpi-icon .icon { width: 30px; height: 30px; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(600px, .95fr); gap: 22px; margin-top: 24px; align-items: stretch; }
.operation-cards { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.card { border: 1px solid var(--line); border-radius: 25px; background: var(--surface); box-shadow: var(--shadow); }
.workbench { padding: 28px; min-height: 455px; }
.section-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.section-heading h2 { margin: 0; font-size: 25px; letter-spacing: -.02em; }
.section-heading p { margin: 5px 0 0; color: #8596ab; font-size: 13px; }
.count-pill { padding: 6px 12px; border-radius: 7px; background: #f1f3f4; color: #536069; font-size: 12px; font-weight: 700; }
.filters { display: flex; gap: 12px; margin: 34px 0 14px; }
.filters button { width: 230px; height: 44px; display: flex; align-items: center; justify-content: space-between; padding: 0 14px; background: white; border: 1px solid #dce3e6; border-radius: 7px; color: #39443f; }
.filters span { color: #a2adb3; }
.empty-state { min-height: 270px; display: grid; place-content: center; justify-items: center; text-align: center; border: 1px dashed #d7e3dd; border-radius: 18px; }
.empty-icon { width: 68px; height: 68px; display: grid; place-items: center; margin-bottom: 13px; border-radius: 50%; background: #eef8f3; color: #399276; box-shadow: 0 0 0 10px rgba(235,247,241,.6); }
.empty-icon .icon { width: 30px; height: 30px; }
.empty-state strong { font-size: 18px; }
.empty-state p { margin: 9px 0 20px; color: #92a4be; font-size: 13px; }
.empty-state .button { min-height: 40px; }

.month-card { min-height: 455px; padding: 28px; border-radius: 25px; background: #194f40; color: #f4faf7; box-shadow: 0 18px 36px rgba(16,61,47,.16); }
.today-card { background: #255f4f; }
.section-heading.light h2 { color: white; }
.live-pill { padding: 6px 13px; border-radius: 999px; background: rgba(255,255,255,.1); color: #afc7bd; font-size: 12px; }
.revenue-panel { position: relative; margin-top: 26px; min-height: 176px; display: flex; flex-direction: column; justify-content: center; padding: 25px; border: 1px solid rgba(255,255,255,.13); border-radius: 18px; background: rgba(255,255,255,.08); }
.money-icon { position: absolute; top: 22px; left: 24px; color: #9ac3b4; }
.revenue-panel small { margin-top: 28px; color: #a9c2b8; font-size: 14px; }
.revenue-panel strong { margin-top: 9px; font-size: 39px; }
.month-mini-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.month-mini-grid div { padding: 18px; border-radius: 16px; background: rgba(255,255,255,.07); }
.month-mini-grid small { color: #aac3b9; }
.month-mini-grid strong { display: block; margin-top: 13px; font-size: 24px; }
.month-mini-grid em { font-size: 12px; font-style: normal; color: #aac3b9; }
.month-footer { display: flex; justify-content: space-between; margin-top: 22px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.12); color: #a7c0b7; }
.month-footer strong { color: #fff; }

.inline-form { display: inline; margin: 0; }
.text-button { border: 0; background: transparent; color: #7c918a; font-size: 12px; padding: 5px; }
.flash { margin: 0 0 18px; padding: 12px 16px; border-radius: 10px; font-size: 14px; border: 1px solid; }
.flash-success { background: #e7f6ef; color: #1c6c51; border-color: #cce9dc; }
.flash-error { background: #fff0ed; color: #a94332; border-color: #f1d0ca; }
.error-page { min-height: 100vh; display: grid; place-items: center; background: var(--page); text-align: center; }
.error-page span { color: #c8d7d0; font-size: 90px; font-weight: 800; }
.error-page h1 { margin: -16px 0 8px; }
.error-page p { color: var(--muted); margin-bottom: 24px; }

.page-actions { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.filter-bar { display: flex; align-items: center; gap: 10px; flex: 1; }
.search-box { display: flex; align-items: center; gap: 9px; width: min(410px, 100%); height: 44px; padding: 0 13px; border: 1px solid #dce3df; border-radius: 9px; background: white; color: #81938d; }
.search-box input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; }
.filter-bar select, .tabs { height: 44px; border: 1px solid #dce3df; border-radius: 9px; background: white; padding: 0 14px; color: #40524b; }

.table-card { overflow: hidden; border: 1px solid var(--line); border-radius: 19px; background: var(--surface); box-shadow: var(--shadow); }
.table-head { display: flex; align-items: center; justify-content: space-between; padding: 22px 24px; border-bottom: 1px solid #e9ece8; }
.table-head h2 { margin: 0; font-size: 19px; }
.table-head p { margin: 5px 0 0; color: #92a09b; font-size: 12px; }
.table-head > span { padding: 5px 10px; border-radius: 7px; background: #f1f4f2; color: #77847f; font-size: 12px; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; }
.mobile-cell-value { display: contents; }
th { padding: 13px 16px; background: #f6f8f6; color: #758680; font-size: 12px; font-weight: 700; text-align: left; }
.sort-link { display: inline-flex; align-items: center; gap: 3px; color: inherit; text-decoration: none; }
.sort-link:hover, .sort-link.active { color: #1f6b58; }
.sort-link span { color: #a7b2ad; font-size: 10px; }
td { padding: 15px 16px; border-top: 1px solid #edf0ec; color: #33443d; font-size: 13px; vertical-align: middle; }
td a { color: #1d6a54; font-weight: 700; text-decoration: none; }
td small { display: block; margin-top: 4px; color: #94a19d; }
th.number, td.number { text-align: right; font-variant-numeric: tabular-nums; }
td.profit { color: #1e7359; font-weight: 800; }
td.negative { color: #c25543; }
.status-dot { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: #3caf82; }
.badge { display: inline-flex; align-items: center; padding: 5px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.badge-green { background: #e5f4ed; color: #26775d; }
.badge-amber { background: #fff1d9; color: #a46610; }
.table-empty, .empty-panel { padding: 55px 20px; text-align: center; color: #8fa099; }
.small-button { padding: 7px 11px; border: 1px solid #cfe0d8; border-radius: 7px; background: #edf7f2; color: #276e57; font-size: 12px; font-weight: 700; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 16px 20px; border-top: 1px solid #edf0ed; color: #778780; font-size: 12px; }
.pagination form, .pagination nav { display: flex; align-items: center; gap: 6px; margin: 0; }
.pagination select { height: 34px; padding: 0 9px; border: 1px solid #d9e1dc; border-radius: 7px; background: white; color: #40524b; }
.pagination nav { margin-left: auto; }
.pagination nav a { min-width: 32px; height: 32px; display: grid; place-items: center; padding: 0 8px; border: 1px solid #dce4df; border-radius: 7px; background: white; color: #557068; text-decoration: none; }
.pagination nav a.active { border-color: #276e57; background: #276e57; color: white; }
.row-action-group { display: flex; align-items: center; gap: 6px; }
.module-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.module-heading b { color: #276d57; }
.inline-dialog-form { display: grid; gap: 16px; }
.hot-badge { display: inline-flex; margin-left: 7px; padding: 3px 7px; border-radius: 99px; background: #fff0cf; color: #a76d0b; font-size: 10px; font-weight: 800; }
.hot-badge[hidden] { display: none; }
.product-type-badge { display: inline-flex; margin-left: 7px; padding: 3px 7px; border-radius: 99px; background: #e9f2ee; color: #487064; font-size: 10px; font-weight: 800; }

.task-list { margin-top: 25px; }
.task-row { display: grid; grid-template-columns: 55px 1fr auto; align-items: center; gap: 15px; padding: 15px 7px; border-bottom: 1px solid #edf0ed; text-decoration: none; }
.task-row:hover { background: #f8faf8; }
.task-date { display: grid; place-items: center; height: 40px; border-radius: 9px; background: #edf7f2; color: #2b755d; font-size: 12px; font-weight: 700; }
.task-row strong, .task-row small { display: block; }
.task-row small { margin-top: 5px; color: #91a099; font-size: 12px; }
.task-row em { padding: 5px 9px; border-radius: 99px; background: #fff0dd; color: #a66b19; font-size: 11px; font-style: normal; }
.task-row em.renewal-due-today { background: #ffe7df; color: #b74f3e; }
.task-row em.renewal-due-future { background: #e9f6f0; color: #26725a; }
.task-row em.renewal-due-none { background: #eef1ef; color: #75817b; }
.view-all { display: inline-flex; align-items: center; gap: 5px; margin-top: 18px; color: #286c58; font-size: 13px; font-weight: 700; text-decoration: none; }
.view-all .icon { width: 16px; }

.form-layout { display: grid; gap: 18px; padding-bottom: 80px; }
.form-card { padding: 25px; border: 1px solid var(--line); border-radius: 19px; background: var(--surface); box-shadow: var(--shadow); }
.form-card.compact { align-self: start; }
.form-card h2 { margin: 0 0 20px; font-size: 19px; }
.form-section-title { display: flex; align-items: flex-start; gap: 13px; margin-bottom: 24px; padding-bottom: 19px; border-bottom: 1px solid #edf0ec; }
.form-section-title > span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: #e4f3ec; color: #2a735c; font-size: 12px; font-weight: 800; }
.form-section-title h2 { margin: 0; }
.form-section-title p { margin: 5px 0 0; color: #91a099; font-size: 12px; }
.form-grid { display: grid; gap: 17px; }
.form-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field > span { color: #61736c; font-size: 12px; font-weight: 700; }
.field input, .field select { width: 100%; height: 43px; padding: 0 12px; border: 1px solid #d9e1dc; border-radius: 8px; background: #fff; color: #263a32; outline: none; }
.field textarea { width: 100%; min-height: 92px; padding: 11px 12px; resize: vertical; border: 1px solid #d9e1dc; border-radius: 8px; background: #fff; color: #263a32; outline: none; line-height: 1.55; }
.field input:focus, .field select:focus { border-color: #4a9c7f; box-shadow: 0 0 0 3px rgba(69,151,122,.1); }
.field textarea:focus { border-color: #4a9c7f; box-shadow: 0 0 0 3px rgba(69,151,122,.1); }
.field-help { color: #91a19a; font-size: 11px; line-height: 1.45; }
.output-field output { height: 43px; display: flex; align-items: center; padding: 0 12px; border-radius: 8px; background: #f1f6f3; color: #2a6d57; font-weight: 800; }
.profit-output output { background: #e7f5ee; font-size: 18px; }
.sticky-submit { position: sticky; bottom: 16px; z-index: 4; display: flex; justify-content: flex-end; gap: 10px; padding: 13px; border: 1px solid #dbe4df; border-radius: 14px; background: rgba(255,255,255,.9); box-shadow: 0 12px 30px rgba(19,46,35,.12); backdrop-filter: blur(12px); }
.form-submit, .dialog-footer { margin-top: 24px; }
.full { width: 100%; }

.customer-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.customer-card { position: relative; display: block; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: white; box-shadow: var(--shadow); }
.customer-card:hover { border-color: #acd0c0; transform: translateY(-1px); }
.customer-card-link { display: grid; grid-template-columns: 50px 1fr 22px; align-items: center; gap: 15px; min-height: 154px; padding: 20px 54px 20px 20px; text-decoration: none; }
.customer-avatar, .profile-avatar { display: grid; place-items: center; border-radius: 14px; background: #e1f2ea; color: #286e58; font-weight: 800; }
.customer-avatar { width: 50px; height: 50px; }
.customer-main > div { display: flex; align-items: center; gap: 8px; }
.customer-main strong { font-size: 15px; }
.customer-main > div span { color: #91a09a; font-size: 11px; }
.customer-main p { margin: 6px 0 12px; color: #778881; font-size: 12px; }
.customer-metrics { display: flex; flex-wrap: wrap; gap: 15px; color: #81918b; font-size: 11px; }
.customer-metrics b { color: #364941; }
.customer-card-link > .icon { color: #95a59f; }
.attention-quick-form { position: absolute; z-index: 2; top: 14px; right: 14px; margin: 0; }
.attention-star { width: 34px; height: 34px; padding: 0; border: 1px solid #e3e8e4; border-radius: 10px; background: rgba(255,255,255,.92); color: #a9b5b0; font-size: 25px; line-height: 1; box-shadow: 0 4px 13px rgba(30,60,48,.07); }
.attention-star:hover, .attention-star.active { border-color: #e7c76a; background: #fff8dc; color: #d39a13; }
.attention-corner { padding: 3px 7px; border-radius: 99px; background: #fff2cb; color: #94640d; font-size: 10px; font-style: normal; font-weight: 800; }
.profile-tags { display: flex; flex-wrap: wrap; gap: 6px !important; margin: 0 0 13px; }
.profile-tags span { max-width: 180px; padding: 4px 7px; overflow: hidden; border-radius: 6px; background: #f0f5f2; color: #61766d !important; text-overflow: ellipsis; white-space: nowrap; }
.profile-tags .intensity-tag { background: #e8f4ef; color: #276f58 !important; }
.profile-card { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; padding: 24px; border: 1px solid var(--line); border-radius: 19px; background: white; }
.profile-avatar { width: 68px; height: 68px; font-size: 24px; }
.profile-card h2 { margin: 7px 0 4px; }
.profile-card p { margin: 0; color: #82928c; font-size: 13px; }
.profile-card .button { margin-left: auto; }
.profile-name-line { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.profile-name-line h2 { margin-right: 3px; }
.profile-attention-form { margin-left: auto; }
.profile-attention-form .attention-star { width: 42px; height: 42px; }
.split-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(290px, .8fr); gap: 18px; align-items: start; }
.split-grid.wide-main { grid-template-columns: minmax(0, 2fr) 360px; }
.side-stack { display: grid; gap: 16px; }
.info-card { padding: 22px; border: 1px solid var(--line); border-radius: 17px; background: white; }
.info-card h3 { margin: 0 0 15px; font-size: 16px; }
.info-row { display: flex; justify-content: space-between; gap: 10px; padding: 12px 0; border-top: 1px solid #edf0ed; font-size: 13px; }
.info-row small { display: block; margin-top: 5px; color: #91a19a; }
.info-row b { color: #28725b; font-size: 11px; }
.muted { color: #91a19b; }

.filter-wrap { flex-wrap: wrap; }
.filter-input { height: 44px; min-width: 135px; padding: 0 12px; border: 1px solid #dce3df; border-radius: 9px; background: white; color: #40524b; outline: none; }
.range-separator { color: #8c9a95; font-size: 12px; }
.orders-actions { align-items: flex-start; }
.summary-strip { display: flex; align-items: baseline; gap: 12px; margin-bottom: 18px; padding: 16px 20px; border: 1px solid #d5e6de; border-radius: 14px; background: #eaf5ef; }
.summary-strip span { color: #667b72; font-size: 13px; }
.summary-strip strong { color: #1e6d54; font-size: 25px; }
.summary-strip small { margin-left: auto; color: #81938c; }
.last-order-distance { display: grid; grid-template-columns: auto auto; align-items: baseline; gap: 3px 9px; margin-left: 12px; padding-left: 20px; border-left: 1px solid #c9ded4; }
.summary-strip .last-order-distance strong { font-size: 18px; white-space: nowrap; }
.summary-strip .last-order-distance small { grid-column: 1 / -1; margin-left: 0; font-size: 11px; }
.profit-target-progress { margin-bottom: 18px; padding: 20px; border: 1px solid #cfe2d8; border-radius: 16px; background: white; box-shadow: 0 8px 24px rgba(24,75,57,.045); }
.profit-target-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.profit-target-heading span { display: block; color: #72857c; font-size: 12px; }
.profit-target-heading strong { display: block; margin-top: 6px; color: #1f684f; font-size: 22px; }
.profit-target-heading > b { color: #247257; font-size: 26px; }
.profit-target-bar,.target-list-progress { height: 9px; overflow: hidden; border-radius: 999px; background: #e6efea; }
.profit-target-bar { margin: 16px 0; }
.profit-target-bar span,.target-list-progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#2f9b72,#63bd91); }
.profit-target-metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
.profit-target-metrics > span { padding: 11px 13px; border-radius: 10px; background: #f5f8f6; color: #75877f; font-size: 12px; }
.profit-target-metrics strong { display: block; margin-top: 5px; color: #344f43; font-size: 15px; }
.profit-target-empty { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; padding: 14px 18px; border: 1px dashed #c7d9d0; border-radius: 13px; background: #f6faf8; color: #6e8279; font-size: 13px; }
.target-list-progress { width: 120px; margin-bottom: 5px; }
.memo-content { max-width: 420px; white-space: normal; }
.negative { color: #c45140 !important; }
.ellipsis, .details-cell, .preview-cell { max-width: 310px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-muted { opacity: .58; }
.button-danger { border-color: #edc7c0; background: #fff0ed; color: #ad4737; }
.row-actions { position: relative; }
.row-actions > summary, .order-preview > summary { cursor: pointer; color: #1d6a54; font-weight: 700; list-style: none; }
.row-actions[open] { min-width: 330px; }
.inline-edit-form { display: grid; gap: 8px; margin: 12px 0 8px; padding: 12px; border: 1px solid #dfe7e2; border-radius: 10px; background: #f8faf8; }
.inline-edit-form input, .inline-edit-form textarea { width: 100%; padding: 8px 10px; border: 1px solid #d8e1dc; border-radius: 7px; }
.inline-edit-form textarea { min-height: 70px; resize: vertical; }
.mini-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.mini-grid label { color: #71847c; font-size: 11px; }
.mini-grid input { display: block; margin-top: 4px; }

.order-preview[open]::before { content: ""; position: fixed; inset: 0; z-index: 20; background: rgba(7,31,23,.44); backdrop-filter: blur(3px); }
.order-preview .preview-grid { display: none; }
.order-preview[open] .preview-grid { position: fixed; z-index: 21; top: 50%; left: 50%; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: min(900px, calc(100vw - 40px)); max-height: 76vh; padding: 22px; overflow: auto; transform: translate(-50%,-50%); border-radius: 18px; background: #f7f9f7; box-shadow: 0 30px 80px rgba(4,28,20,.25); white-space: normal; }
.order-detail-dialog { width: min(940px, calc(100vw - 32px)); }
.order-detail-dialog .preview-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-height: 65vh; overflow: auto; white-space: normal; }
.preview-grid article { padding: 18px; border: 1px solid #e0e7e3; border-radius: 13px; background: white; }
.preview-grid article b { color: #276d57; }
.preview-grid p { margin: 9px 0 0; line-height: 1.55; }
.preview-grid pre { max-height: 150px; padding: 10px; overflow: auto; border-radius: 8px; background: #f1f5f2; white-space: pre-wrap; }

.expiry-chip { display: inline-flex; padding: 4px 8px; border-radius: 999px; font-size: 11px; font-weight: 800; }
.expiry-later .expiry-chip, .expiry-chip.expiry-later { background: #e5f4ed; color: #26775d; }
.expiry-15 .expiry-chip, .expiry-chip.expiry-15 { background: #fff5dd; color: #9c711c; }
.expiry-7 .expiry-chip, .expiry-chip.expiry-7 { background: #ffead3; color: #b45e14; }
.expiry-3 .expiry-chip, .expiry-chip.expiry-3 { background: #ffe1d8; color: #be4e38; }
.expiry-expired .expiry-chip, .expiry-chip.expiry-expired { background: #f4e1e1; color: #a43b3b; }
.expiry-none .expiry-chip, .expiry-chip.expiry-none { background: #edf0ef; color: #76827e; }
.customer-card.expiry-15 { border-color: #efd8a6; }
.customer-card.expiry-7 { border-color: #ebb983; background: #fffdfa; }
.customer-card.expiry-3, .customer-card.expiry-expired { border-color: #e7aea2; background: #fffafa; }
.attention-mark { display: inline-flex; padding: 4px 8px; border-radius: 99px; background: #fff1d4; color: #a36d12; font-size: 10px; font-style: normal; font-weight: 800; }
.profile-summary { min-width: 0; }
.profile-expiry { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 10px; color: #70827a; font-size: 12px; }
.check-line { display: flex; align-items: center; gap: 7px; margin-bottom: 16px; color: #566a61; font-size: 13px; font-weight: 700; }
.needs-field { margin: 16px 0; padding: 0; border: 0; }
.needs-field legend { margin-bottom: 9px; color: #61736c; font-size: 12px; font-weight: 700; }
.tag-options { display: flex; flex-wrap: wrap; gap: 7px; }
.tag-options label { display: inline-flex; align-items: center; gap: 5px; padding: 6px 8px; border: 1px solid #dce4df; border-radius: 7px; background: #fafcfa; color: #607269; font-size: 11px; }
.note-form { display: flex; gap: 6px; }
.note-form input { min-width: 210px; height: 34px; padding: 0 9px; border: 1px solid #dce4df; border-radius: 7px; }
.small-button.is-complete { border-color: #e2d6c2; background: #fff7e8; color: #946618; }

.code-preview { display: block; max-width: 330px; padding: 0; overflow: hidden; border: 0; background: transparent; color: #1d6a54; font-family: ui-monospace, Consolas, monospace; font-weight: 700; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.content-dialog { width: min(680px, calc(100vw - 32px)); padding: 22px; border: 0; border-radius: 18px; color: var(--ink); box-shadow: 0 30px 90px rgba(4,28,20,.3); }
.content-dialog::backdrop { background: rgba(7,31,23,.48); backdrop-filter: blur(3px); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 15px; }
.dialog-head strong { font-size: 18px; }
.dialog-head button { border: 0; background: transparent; color: #7c8d86; font-size: 28px; }
.content-dialog pre { max-height: 55vh; padding: 16px; overflow: auto; border-radius: 10px; background: #f1f5f2; white-space: pre-wrap; word-break: break-all; }
.asset-history-dialog { width: min(1120px, calc(100vw - 32px)); }
.asset-account-groups { display: grid; gap: 16px; max-height: 72vh; overflow: auto; padding: 2px 4px 4px 0; }
.asset-account-card { overflow: hidden; border: 1px solid #dfe9e3; border-radius: 14px; background: #fbfdfb; }
.asset-account-head { display: grid; grid-template-columns: minmax(240px,1fr) minmax(240px,1fr) auto; align-items: center; gap: 18px; padding: 14px 16px; background: #edf6f1; }
.asset-account-head div span, .asset-account-head div strong { display: block; }
.asset-account-head div span { margin-bottom: 5px; color: #82928b; font-size: 11px; }
.asset-account-head div strong { font-size: 13px; }
.compact-table { min-width: 900px; }
.compact-table th, .compact-table td { padding: 11px 13px; }
.content-dialog pre.inline-code-value { max-width: 310px; max-height: 92px; margin: 3px 0; padding: 8px 10px; font-size: 11px; }
.product-table th:first-child, .product-table td:first-child { width: 1%; }
.product-quick-controls { display: grid; width: max-content; max-width: 100%; min-width: 0; gap: 7px; }
.hot-toggle { display: inline-flex; align-items: center; gap: 5px; padding: 0; border: 0; background: transparent; color: #8d9a94; cursor: pointer; font-weight: 700; }
.hot-toggle:first-letter { font-size: 18px; }
.hot-toggle.active { color: #d28a13; }
.hot-toggle span { font-size: 11px; }
.status-toggle { display: inline-flex; align-items: center; gap: 7px; min-width: 78px; padding: 6px 10px; border: 1px solid #d5dfda; border-radius: 999px; background: #f5f7f6; color: #6e7e77; cursor: pointer; font-size: 12px; font-weight: 800; transition: border-color .15s ease,background .15s ease,color .15s ease; }
.status-toggle:hover { border-color: #94aa9f; }
.status-toggle-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px rgba(110,126,119,.12); }
.status-toggle.active { border-color: #b8decf; background: #eaf7f1; color: #237257; }
.status-toggle.inactive { border-color: #e5c8c2; background: #fff2ef; color: #a84f42; }
.status-toggle.pending { border-color: #ead9b7; background: #fff8e9; color: #a56d15; }
.inline-sort-form { display: flex; width: fit-content; align-items: center; gap: 6px; }
.inline-sort-form input { width: 78px; height: 32px; padding: 0 8px; border: 1px solid var(--line); border-radius: 7px; }
.product-quick-controls form.is-saving { opacity: .55; pointer-events: none; }
.async-toast { position: fixed; z-index: 1200; right: 28px; bottom: 28px; max-width: min(360px,calc(100vw - 32px)); padding: 12px 16px; border-radius: 10px; background: #1f6b52; color: white; box-shadow: 0 14px 38px rgba(13,56,43,.24); font-size: 13px; font-weight: 700; opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .18s ease,transform .18s ease; }
.async-toast.visible { opacity: 1; transform: translateY(0); }
.async-toast.error { background: #a84a3f; }
.note-form.is-saving, form[data-renewal-async].is-saving, form[data-memo-async].is-saving, form[data-reminder-feedback-async].is-saving { opacity: .58; pointer-events: none; }
tr[data-renewal-row], tr[data-memo-row] { transition: opacity .18s ease, transform .18s ease; }
tr.is-removing { opacity: 0; transform: translateY(-6px); }
.memo-reminded { opacity: .76; }
.dialog-head > div { display: grid; gap: 4px; }
.dialog-head small { color: #8a9a94; font-size: 12px; }
.dialog-footer { display: flex; justify-content: flex-end; gap: 10px; padding-top: 18px; border-top: 1px solid #edf0ed; }
.product-editor-dialog { width: min(760px, calc(100vw - 32px)); }
.table-actions { display: flex; align-items: center; gap: 7px; }
.danger-link { border-color: #efd0ca; background: #fff3f0; color: #ad4b3b; }
.pending-value { color: #b77b1b; font-weight: 700; }
.static-output { min-height: 43px; display: flex; align-items: center; padding: 0 12px; border: 1px solid #dce4df; border-radius: 8px; background: #f2f6f3; color: #245f4c; font-weight: 800; }
.customer-mode-panel { padding: 16px; border: 1px solid #e0e8e3; border-radius: 13px; background: #f8faf8; }
.renewal-context { padding: 9px 11px; border-radius: 8px; background: #edf6f1; color: #587068; font-size: 12px; }
.search-combobox { position: relative; }
.search-combobox-input { height: 43px; display: flex; align-items: center; gap: 8px; padding: 0 11px; border: 1px solid #d9e1dc; border-radius: 8px; background: #fff; color: #81938d; }
.search-combobox-input:focus-within { border-color: #4a9c7f; box-shadow: 0 0 0 3px rgba(69,151,122,.1); }
.search-combobox-input .icon { width: 17px; height: 17px; }
.search-combobox-input input { height: auto; min-width: 0; padding: 0; border: 0; border-radius: 0; outline: 0; box-shadow: none !important; }
.search-combobox-menu { position: absolute; z-index: 12; top: calc(100% + 6px); left: 0; right: 0; max-height: 310px; padding: 6px; overflow: auto; border: 1px solid #dbe4df; border-radius: 11px; background: #fff; box-shadow: 0 16px 35px rgba(20,50,38,.14); }
.search-combobox-menu[hidden], .search-combobox-menu button[hidden] { display: none !important; }
.search-combobox-menu button { width: 100%; display: grid; gap: 5px; padding: 11px 12px; border: 0; border-radius: 8px; background: transparent; color: #2b4037; text-align: left; }
.search-combobox-menu button:hover, .search-combobox-menu button:focus { background: #edf6f1; outline: 0; }
.search-combobox-menu strong, .search-combobox-menu small { display: block; }
.search-combobox-menu small { overflow: hidden; color: #7d8e87; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.native-hidden-select { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0 !important; }
.has-datalist { position: relative; }
.datalist-suggestions { position: absolute; z-index: 40; top: calc(100% + 6px); left: 0; right: 0; max-height: min(320px, 48vh); padding: 6px; overflow: auto; border: 1px solid #dbe4df; border-radius: 11px; background: white; box-shadow: 0 16px 35px rgba(20,50,38,.16); }
.datalist-suggestions[hidden] { display: none !important; }
.datalist-suggestions button { width: 100%; min-height: 44px; padding: 10px 12px; border: 0; border-radius: 8px; background: transparent; color: #2b4037; text-align: left; line-height: 1.45; }
.datalist-suggestions button:hover, .datalist-suggestions button.active { background: #e9f5ef; color: #1d654f; }
.datalist-suggestions p { margin: 0; padding: 13px; color: #8a9993; text-align: center; font-size: 13px; }
.nav-tooltip { position: fixed; z-index: 100; padding: 7px 10px; border-radius: 7px; background: #173f33; color: #eff8f4; font-size: 12px; font-weight: 700; opacity: 0; visibility: hidden; transform: translateY(-50%) translateX(-4px); transition: opacity .14s ease, transform .14s ease; pointer-events: none; box-shadow: 0 8px 22px rgba(4,26,19,.24); }
.nav-tooltip.visible { opacity: 1; visibility: visible; transform: translateY(-50%) translateX(0); }
.form-card form > button[type="submit"]:last-child { margin-top: 24px; }

.reminder-table tr.reminder-urgent td { background: #fff8ed; }
.reminder-table tr.reminder-overdue td { background: #fff3f1; }
.reminder-countdown { display: inline-flex; padding: 6px 10px; border-radius: 999px; background: #edf4f0; color: #536d62; font-size: 12px; font-weight: 800; }
.reminder-countdown.reminder-urgent { background: #ffe7c3; color: #9c5d0a; box-shadow: 0 0 0 3px rgba(223,151,45,.09); }
.reminder-countdown.reminder-overdue { background: #ffe0dc; color: #ad4435; box-shadow: 0 0 0 3px rgba(203,80,61,.08); }
.reminder-countdown.reminder-completed { background: #e4f2eb; color: #2b745c; }
.reminder-note { min-width: 220px; max-width: 380px; white-space: normal; line-height: 1.55; }
.reminder-actions { display: flex; align-items: center; gap: 6px; }
.reminder-actions form { margin: 0; }
.postpone-form { display: flex; align-items: center; gap: 5px; }
.postpone-form input { width: 138px; height: 32px; padding: 0 7px; border: 1px solid #d8e1dc; border-radius: 7px; background: white; font-size: 11px; }

.followup-section { margin: 20px 0; }
.followup-timeline { display: grid; gap: 0; padding: 8px 24px 22px; }
.followup-item { position: relative; display: grid; grid-template-columns: 20px minmax(0,1fr); gap: 12px; padding-top: 18px; }
.followup-item:not(:last-child)::before { content: ""; position: absolute; top: 30px; bottom: -18px; left: 6px; width: 1px; background: #d7e6de; }
.followup-marker { z-index: 1; width: 13px; height: 13px; margin-top: 5px; border: 3px solid #dff2e8; border-radius: 50%; background: #309070; }
.followup-body { padding: 15px 17px; border: 1px solid #e0e8e3; border-radius: 13px; background: #fbfdfb; }
.followup-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.followup-head strong,.followup-head small { display: block; }
.followup-head small { margin-top: 4px; color: #8b9b94; font-size: 11px; }
.followup-body p { margin: 12px 0 0; color: #50645b; line-height: 1.7; white-space: normal; }

.referral-card .card-heading p { margin: -8px 0 15px; color: #82938c; font-size: 11px; }
.referral-reward { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 13px; border-radius: 11px; background: #edf6f1; color: #4f695e; font-size: 12px; }
.referral-reward b { color: #1e6b53; font-size: 18px; }
.referral-reward small { grid-column: 1 / -1; color: #7b8d85; }
.referral-reward-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
.referral-reward-grid span { display: grid; gap: 3px; }
.referral-tracking-form { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-top: 12px; }
.referral-tracking-form .button { grid-column: 1 / -1; width: 100%; }
.referrer-current { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; padding: 12px 0; border-bottom: 1px solid #edf0ed; font-size: 12px; }
.referrer-current span { color: #82928c; }
.referrer-current a { color: #1d6a54; font-weight: 800; text-decoration: none; }
.referrer-form { display: grid; gap: 10px; margin-top: 14px; }
.referrer-form .button { min-height: 38px; padding: 0 13px; font-size: 12px; }
.referred-list { margin-top: 19px; }
.referred-list h4 { margin: 0 0 7px; font-size: 13px; }
.referred-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 0; border-top: 1px solid #edf0ed; }
.referred-row a { min-width: 0; color: #31453c; text-decoration: none; }
.referred-row strong,.referred-row small { display: block; }
.referred-row small { margin-top: 4px; color: #8b9b94; font-size: 10px; }
.referred-row form { flex: 0 0 auto; margin: 0; }

.button-group { display: flex; align-items: center; gap: 10px; }
.button-group form { margin: 0; }
.import-guide { margin: 18px 0; padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: white; }
.guide-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.guide-head strong { font-size: 18px; }
.guide-head p { margin: 5px 0 0; color: #84958e; font-size: 12px; }
.process-menu { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; margin-top: 18px; }
.process-menu article { position: relative; padding: 17px; border-radius: 13px; background: #f4f8f5; }
.process-menu span { display: grid; place-items: center; width: 26px; height: 26px; margin-bottom: 11px; border-radius: 8px; background: #dff1e8; color: #257056; font-size: 11px; font-weight: 800; }
.process-menu b { font-size: 13px; }
.process-menu p { margin: 7px 0 0; color: #74867e; font-size: 11px; line-height: 1.55; }
.import-status-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 13px; margin-bottom: 18px; }
.import-status-grid article { padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: white; }
.import-status-grid span { color: #7b8c85; font-size: 12px; }
.import-status-grid strong { display: block; margin-top: 9px; font-size: 22px; }
.mapping-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 1px; padding: 1px; background: #edf0ed; }
.mapping-grid div { display: flex; justify-content: space-between; gap: 12px; padding: 12px 15px; background: white; font-size: 12px; }
.mapping-grid span { color: #72847c; }
.mapping-grid b { color: #29483d; text-align: right; }
.import-side { margin: 0; }
.import-side p { margin: 12px 0 0; color: #6f8279; font-size: 12px; line-height: 1.7; }
.import-preview { margin-top: 18px; }
.error-list { padding: 18px 24px; }
.error-list p { display: flex; gap: 12px; margin: 0; padding: 10px 0; border-bottom: 1px solid #edf0ed; color: #a64a3a; font-size: 12px; }
.success-panel { padding: 32px; color: #267057; text-align: center; }

@media (max-width: 900px) {
    .process-menu, .import-status-grid { grid-template-columns: 1fr 1fr; }
    .mapping-grid, .order-preview[open] .preview-grid, .order-detail-dialog .preview-grid { grid-template-columns: 1fr; }
    .button-group, .guide-head { align-items: stretch; flex-direction: column; }
}

@media (max-width: 560px) {
    .process-menu, .import-status-grid { grid-template-columns: 1fr; }
    .mini-grid { grid-template-columns: 1fr; }
    .summary-strip { align-items: flex-start; flex-direction: column; }
    .summary-strip small { margin-left: 0; }
    .last-order-distance { width: 100%; margin: 4px 0 0; padding: 13px 0 0; border-top: 1px solid #c9ded4; border-left: 0; }
}

.tabs { display: flex; align-items: center; padding: 4px; }
.tabs a { padding: 8px 16px; border-radius: 6px; color: #74847e; text-decoration: none; font-size: 13px; }
.tabs a.active { background: #e5f3ec; color: #216a52; font-weight: 700; }
.finance-kpis { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 13px; margin-bottom: 18px; }
.finance-kpis.four { grid-template-columns: repeat(4, minmax(0,1fr)); }
.finance-kpis article { padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: white; }
.finance-kpis span { color: #7e8f88; font-size: 12px; }
.finance-kpis strong { display: block; margin-top: 12px; font-size: 23px; }
.finance-kpis .positive strong { color: #237157; }
.finance-kpis .deep { background: #194f40; color: white; border-color: #194f40; }
.finance-kpis .deep span { color: #b3cabf; }

.import-hero { display: flex; align-items: center; gap: 18px; padding: 26px; border: 1px solid #d4e7de; border-radius: 20px; background: #eaf5ef; }
.mobile-filter-toggle { display: none; }
.knowledge-upload-card { display: flex; align-items: center; gap: 28px; margin-bottom: 20px; padding: 26px; border: 1px solid #d4e7de; border-radius: 20px; background: linear-gradient(135deg,#eaf5ef,#f8fbf9); }
.knowledge-upload-copy { min-width: 0; flex: 1; }
.knowledge-upload-copy h2 { margin: 12px 0 6px; font-size: 21px; }
.knowledge-upload-copy p { margin: 0; color: #71847c; font-size: 13px; line-height: 1.7; }
.knowledge-upload-copy code { padding: 2px 6px; border-radius: 5px; background: rgba(36,108,83,.08); color: #246c53; }
.knowledge-upload-card form { display: flex; align-items: center; gap: 10px; }
.knowledge-file-picker { min-width: 220px; }
.knowledge-file-selected { display: block; max-width: 300px; margin-top: 8px; overflow: hidden; color: #93a099; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.knowledge-file-selected.has-file { color: #287258; font-weight: 700; }
.knowledge-section { overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: white; }
.knowledge-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; padding: 20px; }
.knowledge-card-wrap { position: relative; min-width: 0; }
.knowledge-card { min-width: 0; display: flex; align-items: center; gap: 13px; padding: 18px; border: 1px solid #e0e8e3; border-radius: 14px; color: #263d34; text-decoration: none; transition: border-color .18s ease,transform .18s ease,box-shadow .18s ease; }
.knowledge-card:hover { border-color: #9ac7b4; transform: translateY(-2px); box-shadow: 0 10px 24px rgba(24,75,57,.08); }
.knowledge-card-icon { display: grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; border-radius: 12px; background: #eaf5ef; color: #2b765b; }
.knowledge-card-icon .icon { width: 22px; height: 22px; }
.knowledge-card-content { min-width: 0; flex: 1; }
.knowledge-card-content strong,.knowledge-card-content small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.knowledge-card-content small { margin-top: 7px; color: #8b9b94; font-size: 11px; }
.knowledge-card-arrow { color: #7fa08f; font-size: 25px; }
.knowledge-card-wrap > form { position: absolute; z-index: 2; top: 8px; right: 8px; }
.knowledge-delete-button { min-height: 32px; padding: 0 10px; border: 1px solid #f0d6d0; border-radius: 8px; background: rgba(255,250,249,.96); color: #bd5a49; font-size: 11px; cursor: pointer; }
.knowledge-delete-button:hover { border-color: #dc9588; background: #fff1ee; }
.knowledge-card-wrap.can-delete .knowledge-card { padding-right: 68px; }
.knowledge-empty { grid-column: 1/-1; display: grid; justify-items: center; padding: 58px 20px; color: #90a098; text-align: center; }
.knowledge-empty > span { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: #eef5f1; color: #579078; }
.knowledge-empty strong { margin-top: 15px; color: #50645b; }
.knowledge-empty p { margin: 8px 0 0; font-size: 12px; }
.knowledge-view-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; color: #87968f; font-size: 12px; }
.knowledge-frame-shell { height: calc(100vh - 155px); min-height: 560px; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: white; box-shadow: var(--shadow); }
.knowledge-frame { width: 100%; height: 100%; border: 0; background: white; }
.import-icon { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 15px; background: white; color: #257156; }
.import-icon .icon { width: 28px; height: 28px; }
.import-hero h2 { margin: 0; font-size: 20px; }
.import-hero p { margin: 6px 0 0; color: #6e857b; font-size: 12px; }
.import-hero form { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.file-button { height: 43px; display: flex; align-items: center; padding: 0 14px; border: 1px dashed #83b7a3; border-radius: 8px; background: white; color: #2b725a; font-size: 12px; font-weight: 700; cursor: pointer; }
.file-button input { display: none; }
.notice-card { margin: 16px 0; padding: 18px 22px; border: 1px solid #e5e9e4; border-radius: 14px; background: white; }
.notice-card strong { display: block; margin-bottom: 12px; }
.notice-card div { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; color: #778780; font-size: 12px; }
.notice-card span { display: inline-grid; place-items: center; width: 23px; height: 23px; border-radius: 50%; background: #e5f2ec; color: #236e55; font-weight: 800; }
.notice-card i { color: #b0bbb6; font-style: normal; }
.audit-card { max-height: 580px; overflow: auto; }
.audit-row { display: flex; justify-content: space-between; gap: 10px; padding: 12px 0; border-top: 1px solid #edf0ed; font-size: 12px; }
.audit-row small { display: block; margin-top: 4px; color: #98a59f; }
.audit-row time { color: #8fa09a; white-space: nowrap; }
.mono { font-family: Consolas, "SFMono-Regular", monospace; letter-spacing: .06em; }

.auth-body { min-height: 100vh; background: #f4f7f4; }
.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(480px, .85fr); }
.login-brand { position: relative; display: grid; place-items: center; overflow: hidden; padding: 50px; background: radial-gradient(circle at 16% 18%, rgba(112,190,155,.24), transparent 31%), linear-gradient(145deg, #0a281d, #164c3c); color: white; }
.login-brand::after { content: ""; position: absolute; width: 460px; height: 460px; right: -190px; bottom: -160px; border: 1px solid rgba(255,255,255,.1); border-radius: 50%; box-shadow: 0 0 0 70px rgba(255,255,255,.025), 0 0 0 140px rgba(255,255,255,.018); }
.login-brand-content { position: relative; z-index: 1; max-width: 590px; }
.brand-mark.large { width: 58px; height: 58px; margin-bottom: 35px; border-radius: 18px; font-size: 30px; }
.eyebrow.dark { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.11); color: #b8d4c8; }
.login-brand h1 { margin: 24px 0 18px; font-size: clamp(42px, 4vw, 66px); line-height: 1.12; letter-spacing: -.055em; }
.login-brand p { max-width: 510px; color: #a7c3b8; font-size: 16px; line-height: 1.8; }
.login-stats { display: flex; gap: 10px; margin-top: 50px; }
.login-stats div { min-width: 135px; padding: 15px; border: 1px solid rgba(255,255,255,.09); border-radius: 13px; background: rgba(255,255,255,.05); }
.login-stats strong, .login-stats span { display: block; }
.login-stats strong { font-size: 13px; }
.login-stats span { margin-top: 7px; color: #8eafa2; font-size: 11px; }
.login-panel { display: grid; place-items: center; padding: 40px; }
.login-card { width: min(400px, 100%); padding: 34px; border: 1px solid #dfe6e1; border-radius: 22px; background: white; box-shadow: 0 22px 60px rgba(25,55,43,.08); }
.login-title small { color: #3c8b6d; font-weight: 800; }
.login-title h2 { margin: 8px 0 6px; font-size: 28px; }
.login-title p { margin: 0 0 25px; color: #8d9b95; font-size: 13px; }
.login-card .field { margin-top: 16px; }
.login-button { width: 100%; margin-top: 24px; }
.login-tip { margin: 16px 0 0; color: #98a49f; text-align: center; font-size: 11px; }

.sidebar-collapsed .app-shell { grid-template-columns: 78px 1fr; }
.sidebar-collapsed .brand { justify-content: center; padding: 0; }
.sidebar-collapsed .brand > div:last-child, .sidebar-collapsed .nav-label, .sidebar-collapsed .nav-item span { display: none; }
.sidebar-collapsed .nav-item { justify-content: center; padding: 0; }
.sidebar-collapsed .collapse-open { display: none; }
.sidebar-collapsed .collapse-closed { display: inline; }

@media (max-width: 1280px) {
    .app-shell { grid-template-columns: 228px 1fr; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .hero-card { align-items: flex-start; }
    .hero-actions { max-width: 430px; }
}

@media (max-width: 1024px) {
    .app-shell { grid-template-columns: 78px 1fr; }
    .brand { justify-content: center; padding: 0; }
    .brand > div:last-child, .nav-label, .nav-item span { display: none; }
    .nav-item { justify-content: center; padding: 0; }
    .kpi-grid { grid-template-columns: repeat(2, 1fr); }
    .dashboard-grid { grid-template-columns: 1fr; }
    .hero-card { flex-direction: column; }
    .hero-actions { justify-content: flex-start; max-width: none; }
    .form-grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
    .finance-kpis { grid-template-columns: repeat(2, 1fr); }
    .split-grid, .split-grid.wide-main { grid-template-columns: 1fr; }
    .knowledge-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 700px) {
    .app-shell { display: block; }
    body.mobile-nav-open { overflow: hidden; }
    .sidebar { position: fixed; z-index: 1000; inset: 0 auto 0 0; width: min(84vw, 320px); height: 100vh; height: 100dvh; padding-bottom: env(safe-area-inset-bottom); transform: translateX(-105%); transition: transform .22s ease; box-shadow: 18px 0 48px rgba(3,25,18,.28); }
    body.mobile-nav-open .sidebar { transform: translateX(0); }
    .sidebar .brand { min-height: calc(72px + env(safe-area-inset-top)); height: auto; justify-content: flex-start; padding: env(safe-area-inset-top) 14px 0; }
    .sidebar .brand > div:last-child, body.sidebar-collapsed .sidebar .brand > div:last-child { display: block; }
    .sidebar .nav-label, .sidebar .nav-item span, body.sidebar-collapsed .sidebar .nav-label, body.sidebar-collapsed .sidebar .nav-item span { display: block; }
    .sidebar .nav-item, body.sidebar-collapsed .sidebar .nav-item { justify-content: flex-start; padding: 0 14px; }
    .side-nav { display: block; padding: 13px 10px; }
    .collapse-button { display: none; }
    .mobile-nav-close { display: grid; place-items: center; flex: 0 0 auto; width: 44px; height: 44px; margin-left: auto; padding: 0; border: 0; border-radius: 11px; background: rgba(255,255,255,.07); color: #d9ebe3; font-size: 28px; }
    .mobile-nav-overlay { position: fixed; z-index: 999; inset: 0; display: block; width: 100%; height: 100%; padding: 0; border: 0; background: rgba(4,26,19,.54); opacity: 0; visibility: hidden; transition: opacity .2s ease, visibility .2s ease; }
    body.mobile-nav-open .mobile-nav-overlay { opacity: 1; visibility: visible; }
    .mobile-menu-button { display: grid; place-content: center; flex: 0 0 auto; width: 44px; height: 44px; padding: 0; border: 1px solid #dbe5df; border-radius: 11px; background: #f6faf7; color: #245f4c; }
    .mobile-menu-button span { display: block; width: 20px; height: 2px; margin: 2px 0; border-radius: 3px; background: currentColor; }
    .topbar { position: sticky; z-index: 50; top: 0; min-height: calc(68px + env(safe-area-inset-top)); height: auto; padding: env(safe-area-inset-top) 12px 0; }
    .topbar-leading { min-width: 0; }
    .topbar-leading h1 { overflow: hidden; font-size: 17px; text-overflow: ellipsis; white-space: nowrap; }
    .topbar-leading p { max-width: 49vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .user-panel div:first-child { display: none; }
    .user-panel { gap: 7px; }
    .user-panel .avatar { width: 38px; height: 38px; }
    .text-button { min-width: 44px; min-height: 44px; font-size: 13px; }
    .page-body { padding: 18px max(12px, env(safe-area-inset-right)) calc(30px + env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); }
    .hero-card { padding: 22px; border-radius: 20px; }
    .hero-actions { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
    .kpi-grid { grid-template-columns: 1fr; gap: 12px; }
    .kpi-card { min-height: 128px; }
    .workbench, .month-card { padding: 20px; border-radius: 20px; }
    .filters { flex-direction: column; }
    .filters button { width: 100%; }
    .page-actions, .filter-bar, .import-hero, .import-hero form { align-items: stretch; flex-direction: column; }
    .page-actions > .tabs { width: 100%; overflow-x: auto; overscroll-behavior-x: contain; }
    .page-actions > .tabs a { flex: 0 0 auto; }
    .page-actions.has-mobile-filter { display: grid; grid-template-columns: 1fr; }
    .mobile-filter-toggle { min-height: 48px; display: flex; align-items: center; gap: 10px; width: 100%; padding: 0 14px; border: 1px solid #dce5df; border-radius: 11px; background: white; color: #345a4c; font: inherit; font-weight: 700; text-align: left; }
    .mobile-filter-toggle span { flex: 1; }
    .mobile-filter-toggle small { color: #87978f; font-size: 12px; font-weight: 500; }
    .mobile-filter-toggle i { font-size: 18px; font-style: normal; transition: transform .18s ease; }
    .mobile-filter-toggle[aria-expanded="true"] i { transform: rotate(180deg); }
    .page-actions.has-mobile-filter:not(.mobile-filters-open) > .filter-bar { display: none; }
    .page-actions.has-mobile-filter > .filter-bar { padding: 14px; border: 1px solid #e0e7e3; border-radius: 12px; background: #f9fbfa; }
    .page-actions > .button, .filter-bar > .button, .filter-bar > .small-button { width: 100%; }
    .filter-bar select, .filter-input, .search-box { width: 100%; min-width: 0; height: 48px; font-size: 16px; }
    .customer-grid { grid-template-columns: 1fr; }
    .customer-card-link { grid-template-columns: 44px minmax(0,1fr); gap: 12px; min-height: 0; padding: 18px 48px 18px 16px; }
    .customer-card-link > .icon { display: none; }
    .customer-avatar { width: 44px; height: 44px; }
    .customer-metrics { gap: 9px 13px; }
    .profile-card { align-items: flex-start; flex-direction: column; padding: 19px; }
    .profile-card .button-group { width: 100%; }
    .profile-card .button { width: 100%; margin-left: 0; }
    .form-grid.cols-2, .form-grid.cols-3, .form-grid.cols-4 { grid-template-columns: 1fr; }
    .span-2, .span-3 { grid-column: span 1; }
    .form-card, .info-card { padding: 19px 16px; border-radius: 15px; }
    .form-section-title { margin-bottom: 19px; }
    .field > span { font-size: 14px; }
    .field input, .field select, .filter-input { height: 48px; font-size: 16px; }
    .field textarea { min-height: 110px; font-size: 16px; }
    .field-help { font-size: 12px; }
    input[type="checkbox"] { width: 22px; height: 22px; }
    .button, .small-button, .status-toggle, .tabs a, .file-button { min-height: 44px; }
    .small-button { display: inline-flex; align-items: center; justify-content: center; padding: 9px 13px; font-size: 13px; }
    .attention-star { width: 44px; height: 44px; }
    .sticky-submit { bottom: calc(10px + env(safe-area-inset-bottom)); align-items: stretch; flex-direction: column; }
    .sticky-submit .button { width: 100%; }
    .finance-kpis { grid-template-columns: 1fr; }
    .login-shell { grid-template-columns: 1fr; }
    .login-brand { display: none; }
    .login-panel { min-height: 100vh; min-height: 100dvh; padding: calc(20px + env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) calc(20px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }
    .login-card { padding: 27px 21px; }
    .operation-cards { grid-template-columns: 1fr; }
    .pagination { align-items: flex-start; flex-direction: column; }
    .pagination form { width: 100%; }
    .pagination select { width: 100%; height: 44px; font-size: 16px; }
    .pagination nav { width: 100%; margin-left: 0; flex-wrap: wrap; }
    .pagination nav a { min-width: 44px; height: 44px; }
    .table-card { overflow: visible; border: 0; background: transparent; box-shadow: none; }
    .table-head { padding: 17px 16px; border: 1px solid var(--line); border-radius: 15px; background: white; }
    .table-wrap { overflow: visible; }
    .table-wrap table, .table-wrap tbody { display: block; width: 100%; min-width: 0; white-space: normal; }
    .table-wrap thead { display: none; }
    .table-wrap tbody { padding: 10px 0; }
    .table-wrap tr { display: block; margin-bottom: 12px; overflow: hidden; border: 1px solid #dfe6e1; border-radius: 14px; background: white; box-shadow: 0 7px 20px rgba(26,45,36,.045); }
    .table-wrap td { min-height: 48px; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 12px 14px; border-top: 1px solid #edf0ec; background: transparent; white-space: normal; text-align: left; }
    .table-wrap td:first-child { border-top: 0; }
    .table-wrap td::before { content: attr(data-label); flex: 0 0 34%; max-width: 130px; color: #788a82; font-size: 12px; font-weight: 700; line-height: 1.55; }
    .table-wrap td.number { text-align: left; }
    .mobile-cell-value { min-width: 0; flex: 1 1 auto; display: block; overflow-wrap: anywhere; text-align: right; line-height: 1.55; }
    .mobile-cell-value small { white-space: normal; }
    .mobile-cell-value .ellipsis, .mobile-cell-value .details-cell, .mobile-cell-value .preview-cell { max-width: none; white-space: normal; }
    .table-wrap td.mobile-full-cell { display: block; padding: 0; border: 0; }
    .table-wrap td.mobile-full-cell::before { display: none; }
    .table-wrap td.mobile-full-cell .table-empty { padding: 40px 15px; }
    .row-action-group, .table-actions, .reminder-actions { justify-content: flex-end; flex-wrap: wrap; }
    .note-form { align-items: stretch; flex-direction: column; }
    .note-form input { width: 100%; min-width: 0; height: 46px; font-size: 16px; }
    .postpone-form { justify-content: flex-end; flex-wrap: wrap; }
    .postpone-form input { width: 150px; height: 44px; font-size: 14px; }
    .compact-table { min-width: 0; }
    .asset-account-head { grid-template-columns: 1fr; gap: 10px; }
    .content-dialog, .product-editor-dialog, .order-detail-dialog, .asset-history-dialog { width: 100vw; max-width: none; height: 100vh; height: 100dvh; max-height: none; margin: 0; padding: calc(16px + env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) calc(16px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); overflow: auto; border-radius: 0; overscroll-behavior: contain; }
    .dialog-head { min-height: 48px; align-items: flex-start; }
    .dialog-head button { flex: 0 0 44px; width: 44px; height: 44px; padding: 0; border-radius: 10px; background: #f0f5f2; }
    .dialog-footer { position: sticky; z-index: 3; bottom: calc(-16px - env(safe-area-inset-bottom)); align-items: stretch; flex-direction: column-reverse; margin-left: -16px; margin-right: -16px; padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.96); box-shadow: 0 -8px 22px rgba(22,51,39,.07); }
    .dialog-footer .button { width: 100%; min-height: 48px; }
    .order-detail-dialog .preview-grid, .asset-account-groups { max-height: none; overflow: visible; }
    .search-combobox-input { min-height: 48px; }
    .search-combobox-input input { font-size: 16px; }
    .search-combobox-menu, .datalist-suggestions { max-height: min(46vh, 360px); }
    .search-combobox-menu button, .datalist-suggestions button { min-height: 48px; padding: 12px; font-size: 14px; }
    .followup-head, .referred-row { align-items: stretch; flex-direction: column; }
    .followup-head .table-actions, .referred-row form { align-self: flex-end; }
    .referral-tracking-form { grid-template-columns: 1fr; }
    .referral-tracking-form .button { grid-column: auto; }
    .knowledge-upload-card,.knowledge-upload-card form,.knowledge-view-head { align-items: stretch; flex-direction: column; }
    .knowledge-upload-card { padding: 20px 16px; }
    .knowledge-upload-card .file-button,.knowledge-upload-card .button,.knowledge-file-picker { width: 100%; justify-content: center; }
    .knowledge-file-selected { max-width: 100%; text-align: center; }
    .knowledge-grid { grid-template-columns: 1fr; padding: 14px; }
    .knowledge-card { min-height: 74px; }
    .knowledge-view-head span { display: none; }
    .knowledge-view-head .button { width: 100%; }
    .knowledge-frame-shell { height: calc(100dvh - 154px - env(safe-area-inset-top)); min-height: 460px; border-radius: 13px; }
    .profit-target-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .profit-target-empty { align-items: stretch; flex-direction: column; }
    .profit-target-empty .small-button { width: 100%; }
    .target-list-progress { width: min(150px,100%); margin-left: auto; }
}

@media (max-width: 430px) {
    .hero-actions { grid-template-columns: 1fr; }
    .topbar-leading p { max-width: 42vw; }
    .user-panel .avatar { display: none; }
    .table-wrap td { gap: 12px; }
    .table-wrap td::before { flex-basis: 31%; }
}

@media (hover: none) {
    .button:hover, .customer-card:hover, .kpi-card:hover { transform: none; box-shadow: var(--shadow); }
}
