:root {
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  color: #303838;
  background: #f3f6f6;
  font-synthesis: none;
  --brand: #2a8b7f;
  --brand-dark: #176a61;
  --brand-soft: #e5f5f2;
  --line: #dbe3e2;
  --muted: #84908f;
  --page: #f4f6f7;
  --danger: #d85c5c;
}

* { box-sizing: border-box; }

html, body, #app { margin: 0; min-width: 1180px; min-height: 100%; }
body { min-height: 100vh; overflow-x: auto; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.login-screen {
  min-height: 100vh;
  background-color: #dceeed;
  background-image: url("/assets/login-bg.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 14vw;
}
.login-panel { width: 540px; transform: translateY(-8px); }
.login-heading { text-align: center; margin-bottom: 42px; }
.login-kicker { color: #26887d; font-size: 36px; font-weight: 800; letter-spacing: 2px; }
.login-kicker span { margin-left: 18px; color: #394645; }
.login-heading p { color: #51706d; font-size: 17px; margin: 18px 0 0; letter-spacing: 2px; }
.login-card { background: rgba(255,255,255,.96); padding: 46px 56px 52px; border-radius: 14px; box-shadow: 0 24px 70px rgba(35,86,80,.16); }
.login-card h1 { font-size: 27px; text-align: center; margin: 0 0 34px; color: #263332; }
.login-field { height: 58px; border: 1px solid #d6dddd; border-radius: 7px; display: flex; align-items: center; gap: 14px; padding: 0 18px; margin-bottom: 18px; color: #67a79f; background: #fff; transition: border-color .2s, box-shadow .2s; }
.login-field:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(42,139,127,.12); }
.login-field input { flex: 1; border: 0; outline: 0; font-size: 16px; color: #33403f; min-width: 0; }
.captcha-row { display: grid; grid-template-columns: 1fr 122px; gap: 14px; }
.captcha { height: 58px; border: 0; border-radius: 7px; background: #dcefed; color: #21786e; font-size: 24px; font-weight: 800; letter-spacing: 4px; }
.login-button, .primary-button { color: #fff; border: 1px solid var(--brand); background: var(--brand); border-radius: 7px; font-weight: 600; }
.login-button { width: 100%; height: 58px; font-size: 18px; margin-top: 10px; }
.login-button:hover, .primary-button:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.login-button:disabled { opacity: .7; cursor: wait; }
.primary-button:disabled { opacity: .48; cursor: not-allowed; background: #7fa7a2; border-color: #7fa7a2; }

.app-shell { min-height: 100vh; display: flex; background: var(--page); }
.sidebar { position: fixed; z-index: 30; inset: 0 auto 0 0; width: 234px; background: #fff; border-right: 1px solid #e7eceb; padding: 0 18px; display: flex; flex-direction: column; }
.brand { height: 70px; display: flex; align-items: center; gap: 11px; font-size: 22px; color: #151b1b; border-bottom: 1px solid #eef1f1; }
.brand svg { color: var(--brand); font-size: 32px; }
.brand strong { white-space: nowrap; }
.main-nav { padding: 16px 0; flex: 1; }
.nav-block { margin-bottom: 7px; }
.nav-item { width: 100%; height: 54px; border: 0; border-radius: 8px; background: transparent; display: grid; grid-template-columns: 25px 1fr 16px; align-items: center; text-align: left; gap: 8px; padding: 0 13px; color: #2f3636; font-size: 16px; font-weight: 600; }
.nav-item > svg:first-child { font-size: 20px; color: #5c6968; }
.nav-item:hover { background: #f0f7f6; }
.nav-item.active { background: var(--brand); color: #fff; }
.nav-item.active > svg { color: #fff; }
.nav-arrow { font-size: 12px; justify-self: end; }
.nav-arrow.expanded { transform: rotate(180deg); }
.sub-nav { margin: 4px 0 6px 23px; border-left: 1px solid #d9e0df; padding-left: 12px; }
.sub-nav button { width: 100%; height: 42px; border: 0; background: transparent; color: #5f6968; text-align: left; font-size: 14px; }
.sub-nav button:hover, .sub-nav button.active { color: var(--brand); font-weight: 700; }
.sidebar-foot { padding: 18px 0; color: #a6afae; font-size: 12px; text-align: center; }

.app-main { width: calc(100% - 234px); margin-left: 234px; min-height: 100vh; }
.topbar { height: 70px; position: sticky; top: 0; z-index: 20; background: #e4f4f2; display: flex; align-items: center; padding: 0 27px; gap: 12px; border-bottom: 1px solid #d4e9e6; }
.topbar-spacer { flex: 1; }
.icon-button { width: 36px; height: 36px; border: 0; border-radius: 50%; color: #33897f; background: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 18px; }
.icon-button.ghost { background: transparent; color: #6b7a78; }
.clock { text-align: right; color: #273130; line-height: 1.15; min-width: 130px; }
.clock span { display: block; font-size: 14px; }
.clock strong { display: block; font-size: 15px; margin-top: 4px; letter-spacing: 1px; }
.divider { height: 34px; width: 1px; background: #b9d2cf; margin: 0 2px; }
.role-switcher { position: relative; }
.role-button { border: 0; background: transparent; min-width: 138px; text-align: right; color: #273130; display: grid; grid-template-columns: 1fr auto 13px; column-gap: 5px; align-items: end; }
.role-button span { grid-column: 1 / 3; font-size: 12px; }
.role-button strong { grid-row: 2; grid-column: 1 / 3; font-size: 14px; }
.role-button svg { grid-row: 2; grid-column: 3; font-size: 10px; align-self: center; }
.role-menu, .notice-popover { position: absolute; top: 58px; right: 68px; background: #fff; box-shadow: 0 14px 40px rgba(28,61,58,.18); border: 1px solid #e1e7e6; border-radius: 9px; padding: 8px; z-index: 50; }
.role-menu { right: 0; width: 190px; }
.role-menu button { width: 100%; height: 38px; border: 0; background: #fff; text-align: left; padding: 0 12px; border-radius: 5px; color: #465150; }
.role-menu button:hover, .role-menu button.active { background: var(--brand-soft); color: var(--brand); }
.role-menu .logout { border-top: 1px solid #edf0f0; color: #b25050; margin-top: 4px; padding-top: 4px; }
.notice-button { position: relative; }
.notice-button i { position: absolute; width: 7px; height: 7px; border-radius: 50%; background: #e63232; right: 3px; top: 2px; }
.notice-popover { width: 270px; right: 62px; top: 62px; padding: 18px; }
.notice-popover strong { font-size: 16px; }
.notice-popover p { margin: 12px 0 0; color: #6b7675; font-size: 13px; }

.workspace { padding: 18px 20px 32px; }
.page-card { min-height: calc(100vh - 120px); background: #fff; border-radius: 10px; border: 1px solid #edf0f0; overflow: hidden; }
.page-heading { min-height: 62px; padding: 0 22px; display: flex; align-items: center; border-bottom: 1px solid #e8ecec; }
.page-heading h1 { margin: 0; font-size: 19px; color: #252e2d; padding-left: 14px; position: relative; }
.page-heading h1::before { content: ""; width: 5px; height: 23px; border-radius: 3px; background: var(--brand); position: absolute; left: 0; top: 0; }
.page-heading .outline-button { margin-left: auto; }
.section-title { margin: 20px 20px 14px; font-weight: 700; font-size: 16px; color: #35403f; display: flex; align-items: center; gap: 8px; }
.section-title::before { content: ""; width: 7px; height: 7px; background: var(--brand); border-radius: 50%; }
.result-count { color: #87918f; font-size: 13px; font-weight: 400; margin-left: auto; }

.primary-button, .outline-button { min-width: 104px; height: 40px; padding: 0 19px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.outline-button { color: var(--brand); background: #fff; border: 1px solid var(--brand); border-radius: 7px; font-weight: 600; }
.outline-button:hover { background: #f0f8f7; }
.text-button, .link-button, .action-button { border: 0; background: transparent; color: var(--brand); }
.text-button { margin-left: auto; display: inline-flex; gap: 5px; align-items: center; }
.button-row { display: flex; justify-content: center; gap: 18px; padding: 28px 0 10px; }

.filter-panel { margin: 20px; padding: 20px; background: #f8faf9; border: 1px solid #e8edec; border-radius: 8px; display: flex; gap: 22px; }
.filter-grid { flex: 1; display: grid; grid-template-columns: repeat(3, minmax(210px, 1fr)); gap: 16px 20px; }
.filter-grid label { display: grid; grid-template-columns: 96px 1fr; align-items: center; gap: 8px; color: #596361; font-size: 14px; }
.filter-grid input, .filter-grid select, .field { width: 100%; height: 40px; padding: 0 12px; border: 1px solid #cfd7d6; border-radius: 5px; background: #fff; color: #394442; outline: none; }
.filter-grid input:focus, .filter-grid select:focus, .field:focus { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(42,139,127,.1); }
.field[readonly], textarea.field[readonly] { background: #f1f8f7; color: #596663; }
.filter-actions { align-self: end; display: flex; gap: 10px; }

.summary-grid { display: flex; padding: 20px; gap: 15px; overflow-x: auto; }
.summary-grid button { min-width: 160px; flex: 1; height: 88px; border: 1px solid #d9e5e3; border-radius: 8px; background: #fff; padding: 13px 16px; text-align: left; position: relative; transition: transform .2s, border-color .2s; display: flex; align-items: center; gap: 14px; }
.summary-grid button:hover { transform: translateY(-2px); border-color: var(--brand); }
.summary-grid button.active { background: var(--brand-soft); border-color: var(--brand); }
.summary-grid span { display: block; color: #687371; }
.summary-grid .summary-icon { flex: 0 0 48px; width: 48px; height: 48px; border-radius: 7px; display: grid; place-items: center; color: #fff; background: linear-gradient(145deg, #65c6ba, #168b7e); box-shadow: 0 4px 10px rgba(22,139,126,.16); }
.summary-grid .summary-icon svg { font-size: 23px; }
.summary-grid .summary-copy > span { margin-bottom: 5px; white-space: nowrap; }
.summary-grid strong { color: var(--brand); font-size: 25px; }
.summary-grid em { margin-left: 4px; font-style: normal; font-size: 12px; color: #86908f; }

.table-wrap { margin: 0 20px 18px; overflow-x: auto; }
.data-table { width: 100%; min-width: 1180px; border-collapse: collapse; font-size: 13px; }
.data-table th { height: 48px; background: #dcefed; color: #273332; font-weight: 700; white-space: nowrap; border-bottom: 2px solid #72b8b0; padding: 0 12px; }
.data-table td { height: 52px; text-align: center; padding: 8px 12px; color: #45504e; border-bottom: 1px solid #edf1f0; }
.data-table tbody tr:nth-child(even) { background: #f2f9f8; }
.data-table tbody tr:hover { background: #eaf5f3; }
.data-table .address { min-width: 170px; }
.data-table.compact { min-width: 700px; }
.data-table.compact td { height: 46px; }
.link-button { text-decoration: underline; text-underline-offset: 3px; }
.action-button { padding: 5px 10px; border: 1px solid #8ec7c0; border-radius: 4px; }
.status { padding: 4px 9px; border-radius: 12px; font-size: 12px; }
.status.pending { background: #fff1d9; color: #a76a08; }
.status.progress { background: #e1f1ff; color: #3474a8; }
.status.done { background: #e3f5e9; color: #368051; }
.empty-cell { height: 150px !important; color: #929c9a !important; }
.pagination { display: flex; justify-content: flex-end; align-items: center; gap: 6px; padding-top: 16px; color: #7c8785; }
.pagination button { min-width: 30px; height: 30px; border: 1px solid #d6dddc; background: #fff; border-radius: 4px; color: #596462; }
.pagination button.active { background: var(--brand); color: #fff; border-color: var(--brand); }

.import-layout { display: grid; grid-template-columns: 1.1fr 1fr; gap: 24px; padding: 0 20px; }
.import-box, .batch-panel, .preview-panel, .sla-card, .rule-card, .chart-grid section { border: 1px solid #e1e8e7; border-radius: 8px; background: #fff; }
.import-box { padding: 0 20px 20px; }
.import-main { width: min(1500px, calc(100% - 40px)); margin: 22px auto; border: 0; }
.import-main > .form-row { width: min(1160px, 100%); margin-left: auto; margin-right: auto; }
.import-main .file-drop { margin: 42px 0 4px; min-height: 360px; }
.batch-panel { overflow: hidden; }
.batch-panel .table-wrap, .preview-panel .table-wrap { margin-bottom: 20px; }
.file-drop { position: relative; min-height: 92px; border: 1px dashed #79bcb4; border-radius: 7px; flex: 1; display: flex; align-items: center; justify-content: center; gap: 15px; color: var(--brand); background: #f5fbfa; }
.file-drop > svg { font-size: 30px; }
.file-drop div { display: flex; flex-direction: column; gap: 7px; }
.file-drop span { color: #8a9492; font-size: 12px; }
.file-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.preview-panel { margin: 22px 20px; }

.detail-section { margin: 0 20px 22px; }
.info-grid { border: 1px solid #8fc6bf; background: #f0f9f8; border-radius: 8px; padding: 23px 28px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px 34px; }
.info-grid div { display: grid; grid-template-columns: 130px 1fr; gap: 10px; align-items: center; }
.info-grid span { color: #85908f; text-align: right; }
.info-grid strong { color: #37413f; }
.service-title { margin-left: 0; margin-right: 0; }
.detail-section .table-wrap { margin: 0; }
.service-table th:nth-child(3), .service-table th:nth-child(8) { min-width: 220px; }
.audio-button { border: 0; background: transparent; color: #67b2aa; display: inline-flex; flex-direction: column; gap: 2px; align-items: center; }
.audio-button svg { font-size: 23px; }
.audio-button span { font-size: 11px; color: #899290; }

.form-section { border-top: 1px solid #eef1f0; padding-top: 2px; }
.wide-form { width: min(1060px, 86%); margin: 0 auto; }
.form-row { display: flex; align-items: flex-start; gap: 20px; margin: 18px 0; }
.form-row > label:first-child { width: 150px; text-align: right; padding-top: 10px; color: #414b49; flex: none; }
.form-row .field { flex: 1; }
textarea.field { min-height: 78px; resize: vertical; padding: 11px 12px; line-height: 1.6; }
textarea.field.large { min-height: 130px; }
.radio-group { min-height: 40px; display: flex; align-items: center; gap: 34px; }
.radio-group label, .checkbox-select label { display: inline-flex; align-items: center; gap: 7px; color: #4d5856; }
input[type="radio"], input[type="checkbox"] { accent-color: var(--brand); width: 16px; height: 16px; }
.checkbox-select { flex: 1; min-height: 42px; border: 1px solid #d4dcdb; border-radius: 6px; padding: 10px 15px; display: flex; flex-wrap: wrap; gap: 12px 28px; }
.long-label > label:first-child { width: 360px; line-height: 1.6; padding-top: 0; }
.tip, .branch-tip, .flow-tip { background: #eff8f7; border: 1px solid #cce6e2; border-radius: 6px; color: #47716c; padding: 12px 15px; display: flex; align-items: center; gap: 9px; font-size: 13px; }
.branch-tip { margin: 18px 0; }
.flow-tip { margin: 4px 0 18px 142px; line-height: 1.65; }
.static-value { color: #253833; line-height: 38px; }
.required-files { margin: 20px 0; }
.review-actions { margin-top: 20px; border-top: 1px solid #edf1f0; padding-top: 2px; }
.upload-list { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin: 20px 0; }
.upload-list > div { display: grid; gap: 10px; }
.upload-slot { min-height: 110px; border: 1px dashed #78b9b1; background: #f6fbfa; color: var(--brand); border-radius: 7px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 8px; }
.upload-slot svg { font-size: 26px; }
.upload-slot.uploaded { border-style: solid; background: #eaf7f4; }
.upload-file-row { min-height: 118px; display: grid; grid-template-columns: 190px 92px minmax(0, 1fr); align-items: center; gap: 22px; }
.upload-file-row > strong { text-align: right; }
.upload-square { width: 92px; height: 92px; border: 1px solid #c7d2d0; border-radius: 7px; background: #fff; color: #8c9795; display: grid; place-items: center; font-size: 30px; }
.upload-square.uploaded { color: var(--brand); border-color: var(--brand); background: #eff8f7; }
.upload-file-name { justify-self: start; border: 0; border-bottom: 1px solid #8d9997; background: transparent; color: #74817f; padding: 4px 0; }
.upload-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 16px; }
.upload-grid button { min-height: 116px; border: 1px dashed #78b9b1; background: #f6fbfa; color: var(--brand); border-radius: 7px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px; }
.upload-grid button > svg { font-size: 26px; }
.upload-grid button span { font-size: 12px; color: #8a9492; }
.report-editor { max-width: 1120px; }
.deliverable-list { display: grid; gap: 12px; margin-bottom: 18px; }
.deliverable-list article { min-height: 70px; border: 1px solid #dce5e3; background: #fff; border-radius: 7px; display: flex; align-items: center; gap: 14px; padding: 12px 16px; }
.deliverable-list article > svg { color: var(--brand); font-size: 26px; }
.deliverable-list article div { display: flex; flex-direction: column; gap: 5px; flex: 1; }
.deliverable-list article span { color: #8b9493; font-size: 12px; }
.add-deliverable { min-height: 76px; border: 1px dashed #76b6ae; background: #f6fbfa; color: var(--brand); border-radius: 7px; display: flex; align-items: center; justify-content: center; gap: 9px; }

.rules-layout { display: grid; grid-template-columns: 1.15fr .85fr; gap: 24px; padding: 20px; }
.rules-layout.single { grid-template-columns: 1fr; max-width: 980px; margin: 0 auto; }
.prototype-blank { min-height: calc(100vh - 185px); }
.sla-card, .rule-card { padding: 0 20px 22px; }
.total-limit { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-radius: 7px; background: #f2f8f7; }
.total-limit input { width: 120px; height: 42px; border: 1px solid #b9cfcc; border-radius: 5px; padding: 0 10px; color: var(--brand); font-weight: 700; font-size: 20px; }
.total-limit em, .sla-grid span { color: #8b9593; font-style: normal; }
.sla-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px 22px; margin-top: 22px; }
.sla-grid label { display: grid; grid-template-columns: 110px 1fr 42px; align-items: center; gap: 8px; color: #4d5755; }
.sla-grid input { height: 40px; border: 1px solid #ced7d5; border-radius: 5px; padding: 0 10px; }
.rule-empty { min-height: 380px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #82908d; text-align: center; }
.rule-empty > svg { font-size: 52px; color: #83bfb8; }
.rule-empty strong { color: #394542; font-size: 19px; margin-top: 16px; }
.rule-empty p { max-width: 320px; line-height: 1.7; }

.analytics-grid { padding: 20px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.analytics-grid article { border: 1px solid #e1e9e7; border-radius: 8px; padding: 22px; box-shadow: 0 5px 18px rgba(37,91,84,.05); }
.analytics-grid article span { color: #74807e; }
.analytics-grid article strong { display: block; color: var(--brand); font-size: 30px; margin: 14px 0 8px; }
.analytics-grid article em { color: #5f8f74; font-size: 12px; font-style: normal; }
.chart-grid { padding: 0 20px 22px; display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; }
.bar-chart { height: 310px; padding: 30px 30px 20px; display: flex; align-items: flex-end; justify-content: space-around; border-top: 1px solid #eef1f0; }
.bar-chart > div { height: 240px; width: 9%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 9px; }
.bar-chart span { width: 100%; background: #76bdb4; border-radius: 5px 5px 0 0; }
.bar-chart em { color: #899391; font-size: 11px; font-style: normal; white-space: nowrap; }
.donut-wrap { height: 310px; border-top: 1px solid #eef1f0; display: flex; align-items: center; justify-content: center; gap: 42px; }
.donut { width: 160px; height: 160px; border: 30px solid #68b4ab; border-right-color: #a2d0cb; border-bottom-color: #d3e9e6; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.donut strong { font-size: 23px; }
.donut span { color: #8b9492; font-size: 12px; }
.donut-wrap ul { list-style: none; margin: 0; padding: 0; }
.donut-wrap li { margin: 13px 0; color: #66716f; font-size: 13px; }
.donut-wrap li i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #68b4ab; margin-right: 8px; }
.donut-wrap li i.c2 { background: #86c3bc; }.donut-wrap li i.c3 { background: #a2d0cb; }.donut-wrap li i.c4 { background: #d3e9e6; }

.modal-mask { position: fixed; z-index: 100; inset: 0; background: rgba(24,35,34,.52); display: flex; align-items: center; justify-content: center; padding: 30px; }
.modal { width: min(760px, 90vw); background: #f4fbfa; border-radius: 18px; padding: 30px 40px 34px; box-shadow: 0 20px 80px rgba(0,0,0,.22); position: relative; }
.small-modal { width: min(1080px, 90vw); }
.assignment-modal { width: min(1080px, 90vw); }
.review-modal-v2 { width: min(1080px, 90vw); }
.modal-inner-panel { min-height: 265px; background: #fff; border: 1px solid #d5dfdd; border-radius: 8px; padding: 25px 42px 30px; }
.modal-inner-panel .section-title { margin-left: 0; }
.modal-inner-panel .form-row { max-width: 760px; }
.review-reason { min-height: 120px; resize: vertical; }
.inline-callback-files { margin-left: 170px; padding: 8px 0 12px; }
.modal h2 { margin: 0 0 25px; font-size: 25px; }
.modal-close { position: absolute; right: 24px; top: 22px; border: 0; background: transparent; color: #879390; font-size: 22px; }
.modal .section-title { margin-left: 0; }
.review-order { background: #fff; border: 1px solid #d6e3e1; border-radius: 7px; display: grid; grid-template-columns: 130px 1fr 100px 1fr 100px 1fr; padding: 16px; gap: 8px; font-size: 13px; }
.review-order span { color: #86908e; }.review-order strong { color: #3d4846; }

.toast { position: fixed; z-index: 200; left: 50%; top: 95px; transform: translateX(-50%); background: #234f49; color: #fff; padding: 13px 20px; border-radius: 7px; box-shadow: 0 10px 35px rgba(0,0,0,.2); display: flex; gap: 9px; align-items: center; }
.toast-enter-active, .toast-leave-active { transition: opacity .2s, transform .2s; }
.toast-enter-from, .toast-leave-to { opacity: 0; transform: translate(-50%,-10px); }

@media (max-width: 1360px) {
  .filter-grid { grid-template-columns: repeat(2, minmax(210px, 1fr)); }
  .info-grid { grid-template-columns: repeat(3, 1fr); }
  .info-grid div { grid-template-columns: 110px 1fr; }
  .summary-grid button { min-width: 145px; }
}

@media (max-width: 900px) {
  html, body, #app { min-width: 0; }
  body { overflow-x: hidden; }
  .sidebar { display: none; }
  .app-shell, .app-main, .workspace, .page-card { min-width: 0; }
  .app-main { width: 100%; margin-left: 0; }
  .topbar { padding: 0 12px; gap: 8px; }
  .clock, .divider { display: none; }
  .workspace { padding: 10px 8px 24px; }
  .page-heading { padding: 0 14px; }
  .page-heading h1 { font-size: 17px; }
  .summary-grid { padding: 12px; gap: 10px; }
  .summary-grid button { flex: 0 0 178px; }
  .filter-panel { margin: 12px; padding: 14px; flex-direction: column; }
  .filter-grid { grid-template-columns: 1fr; gap: 12px; }
  .filter-grid label { grid-template-columns: 82px minmax(0, 1fr); }
  .filter-actions { align-self: stretch; justify-content: flex-end; }
  .table-wrap { margin: 0 12px 14px; max-width: calc(100vw - 42px); }
  .detail-section { margin: 0 12px 18px; }
  .info-grid { grid-template-columns: 1fr; gap: 12px; padding: 16px; }
  .info-grid div { grid-template-columns: 112px minmax(0, 1fr); }
  .info-grid span { text-align: left; }
  .import-layout, .rules-layout, .chart-grid { grid-template-columns: 1fr; padding: 0 12px; }
  .analytics-grid { grid-template-columns: repeat(2, 1fr); padding: 12px; }
  .wide-form { width: 100%; }
  .form-row { flex-direction: column; gap: 7px; margin: 14px 0; }
  .form-row > label:first-child, .long-label > label:first-child { width: auto; text-align: left; padding-top: 0; }
  .form-row .field, .checkbox-select { width: 100%; }
  .flow-tip { margin: 4px 0 16px; }
  .upload-grid { grid-template-columns: 1fr; }
  .upload-list { grid-template-columns: 1fr; }
  .upload-file-row { grid-template-columns: 1fr; gap: 8px; padding: 12px 0; }
  .upload-file-row > strong { text-align: left; }
  .upload-square { width: 100%; height: 72px; }
  .review-order { grid-template-columns: 110px 1fr; }
  .modal-mask { padding: 12px; }
  .modal { width: 100%; max-height: 92vh; overflow-y: auto; padding: 25px 20px 28px; }
}

@media (max-width: 520px) {
  .topbar > .icon-button:not(.ghost) { display: none; }
  .role-button { min-width: 132px; }
  .login-screen { justify-content: center; padding: 24px 16px; background-position: 38% center; }
  .login-panel { width: 100%; transform: none; }
  .login-heading { margin-bottom: 24px; }
  .login-kicker { font-size: 25px; }
  .login-kicker span { display: block; margin: 8px 0 0; }
  .login-heading p { font-size: 13px; }
  .login-card { padding: 30px 22px 34px; }
  .login-card h1 { font-size: 21px; }
  .captcha-row { grid-template-columns: minmax(0, 1fr) 96px; }
  .captcha-row .login-field { min-width: 0; }
  .analytics-grid, .sla-grid { grid-template-columns: 1fr; }
  .donut-wrap { flex-direction: column; height: auto; padding: 28px 0; }
  .button-row { flex-wrap: wrap; padding-left: 8px; padding-right: 8px; }
}
