: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: 500px; transform: translateY(2px); }
.login-heading { text-align: center; margin-bottom: 75px; }
.login-kicker { color: #111d38; font-size: 52px; font-weight: 800; letter-spacing: 1px; white-space: nowrap; }
.login-kicker span { margin-left: 10px; color: #26887d; }
.login-heading p { color: #51706d; font-size: 24px; margin: 18px 0 0; letter-spacing: 2px; white-space: nowrap; }
.login-card { background: rgba(255,255,255,.96); padding: 46px 42px 71px; border-radius: 14px; box-shadow: 0 24px 70px rgba(35,86,80,.16); }
.login-card h1 { font-size: 34px; text-align: center; margin: 0 0 39px; color: #111d38; }
.login-field { height: 58px; border: 1px solid #4ca69c; border-radius: 4px; display: flex; align-items: center; gap: 14px; padding: 0 18px; margin-bottom: 32px; 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 160px; gap: 20px; }
.captcha { height: 58px; border: 0; border-radius: 4px; background: #64aaa2; color: #fff; font-size: 24px; font-weight: 800; font-style: italic; letter-spacing: 5px; }
.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: 0; border-radius: 4px; }
.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; }

.portal-shell { min-height: 100vh; background: #f7f9f9; color: #111d38; display: flex; flex-direction: column; }
.portal-header { height: 92px; padding: 0 32px; background: #fff; border-bottom: 1px solid #dfe7e6; display: flex; align-items: center; gap: 14px; position: relative; z-index: 20; }
.portal-brand { display: flex; align-items: center; gap: 15px; font-size: 26px; }
.portal-brand svg { color: var(--brand); font-size: 42px; }
.portal-brand strong { white-space: nowrap; }
.portal-header-spacer { flex: 1; }
.portal-header .role-button { min-width: 154px; }
.portal-role-menu { top: 61px; }
.portal-notice { top: 76px; right: 54px; }
.portal-content { width: min(1328px, calc(100% - 80px)); margin: 0 auto; padding: 62px 0 64px; flex: 1; }
.portal-intro { display: flex; align-items: center; justify-content: space-between; gap: 60px; margin-bottom: 58px; }
.portal-intro h1 { margin: 0; font-size: 40px; line-height: 1.3; letter-spacing: .5px; }
.portal-intro p { margin: 16px 0 0; color: #6d7776; font-size: 18px; }
.portal-search { width: 440px; height: 54px; flex: 0 0 440px; background: #fff; border: 1px solid #bfcfcd; border-radius: 6px; display: flex; align-items: center; gap: 13px; padding: 0 18px; color: #697573; }
.portal-search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(42,139,127,.1); }
.portal-search input { flex: 1; min-width: 0; border: 0; outline: 0; color: #273332; background: transparent; font-size: 16px; }
.portal-section { margin-top: 0; }
.portal-section + .portal-section { margin-top: 42px; }
.portal-section h2 { margin: 0 0 20px; font-size: 20px; color: #18243e; }
.recent-app { width: 100%; height: 148px; padding: 0 28px; background: #fff; border: 1px solid #ccd9d7; border-radius: 8px; display: flex; align-items: center; text-align: left; color: inherit; transition: border-color .18s, box-shadow .18s, transform .18s; }
.recent-app:hover { border-color: var(--brand); box-shadow: 0 10px 28px rgba(31,85,78,.08); transform: translateY(-1px); }
.portal-app-icon { width: 78px; height: 78px; flex: 0 0 78px; border-radius: 10px; background: var(--brand); color: #fff; display: grid; place-items: center; }
.portal-app-icon svg { font-size: 40px; }
.recent-copy { margin-left: 30px; min-width: 0; display: flex; flex-direction: column; gap: 13px; flex: 1; }
.recent-copy strong { font-size: 24px; }
.recent-copy em, .micro-app-copy em { color: #6d7776; font-style: normal; line-height: 1.65; }
.recent-todo { width: 210px; min-height: 82px; padding-left: 30px; border-left: 1px solid #d9e2e1; display: flex; flex-direction: column; justify-content: center; gap: 6px; }
.recent-todo em { color: #6d7776; font-style: normal; }
.recent-todo strong { color: var(--brand); font-size: 31px; }
.portal-enter { min-width: 124px; height: 48px; margin-left: 18px; border: 1px solid var(--brand); border-radius: 6px; color: var(--brand); font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.recent-arrow { margin-left: 26px; color: var(--brand); font-size: 18px; }
.micro-app-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.micro-app-card { min-height: 276px; padding: 30px 26px 26px; border: 1px solid #ccd9d7; border-radius: 8px; background: #fff; color: inherit; text-align: left; display: grid; grid-template-columns: 72px minmax(0, 1fr); grid-template-rows: 1fr auto; gap: 0 22px; transition: border-color .18s, box-shadow .18s, transform .18s; }
.micro-app-card:hover:not(.disabled) { border-color: var(--brand); box-shadow: 0 10px 28px rgba(31,85,78,.08); transform: translateY(-2px); }
.micro-app-card .portal-app-icon { width: 72px; height: 72px; flex-basis: 72px; }
.micro-app-card .portal-app-icon svg { font-size: 36px; }
.micro-app-card.disabled { cursor: default; }
.micro-app-card.disabled .portal-app-icon { background: #64aaa2; }
.micro-app-copy { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.micro-app-copy > span { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.micro-app-copy strong { font-size: 22px; white-space: nowrap; }
.micro-app-copy i { padding: 5px 12px; border-radius: 16px; background: #f0f1f2; color: #7e8585; font-style: normal; font-size: 13px; white-space: nowrap; }
.micro-app-copy i.available { color: #278778; background: #e3f5ef; }
.micro-app-action { grid-column: 1 / 3; align-self: end; color: #6f7776; font-weight: 700; display: inline-flex; align-items: center; gap: 8px; }
.micro-app-card:not(.disabled) .micro-app-action { color: var(--brand); }
.portal-empty { height: 160px; border: 1px dashed #ccd8d6; border-radius: 8px; background: #fff; color: #8a9492; display: grid; place-items: center; }
.portal-footer { min-height: 88px; padding: 18px 32px; border-top: 1px solid #dfe7e6; background: #fff; color: #53605e; display: flex; align-items: center; justify-content: center; gap: 12px; }
.portal-footer > svg { color: #34465f; font-size: 20px; }
.portal-footer i { width: 1px; height: 26px; background: #d7dfde; margin: 0 14px; }
.portal-footer button { border: 0; background: transparent; color: var(--brand); font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }

.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; }
.app-home-return { width: 100%; padding: 0; background: transparent; border: 0; text-align: left; }
.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); transform: translateY(-100px); }
.review-modal-v2 { width: min(1080px, 90vw); transform: translateY(-30px); }
.modal-inner-panel { min-height: 265px; background: #fff; border: 1px solid #d5dfdd; border-radius: 8px; padding: 32px 40px 36px; }
.review-modal-v2 .modal-inner-panel { min-height: 504px; }
.modal-inner-panel .section-title { margin-left: 0; }
.modal-inner-panel .form-row { max-width: 520px; margin: 22px 0; }
.modal-inner-panel .form-row > label:first-child { width: 75px; }
.modal-inner-panel .form-row .field { height: 58px; }
.modal-inner-panel .section-title { font-size: 18px; margin-top: 24px; margin-bottom: 16px; }
.modal-inner-panel .section-title:first-child { margin-top: 0; }
.modal-inner-panel textarea.review-reason { min-height: 112px; resize: vertical; }
.inline-callback-files { margin-left: 170px; padding: 8px 0 12px; }
.modal h2 { margin: 0 0 28px; font-size: 28px; }
.modal-close { position: absolute; right: 24px; top: 22px; border: 0; background: transparent; color: #879390; font-size: 22px; }
.modal .section-title { margin-left: 0; }
.modal > .button-row { gap: 20px; padding-top: 30px; }
.modal > .button-row .primary-button, .modal > .button-row .outline-button { min-width: 168px; height: 58px; font-size: 17px; }
.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) {
  .portal-content { width: calc(100% - 48px); }
  .portal-intro { margin-bottom: 44px; }
  .micro-app-copy strong { font-size: 19px; }
  .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; }
  .portal-header { height: 70px; padding: 0 16px; }
  .portal-brand { font-size: 20px; }
  .portal-brand svg { font-size: 32px; }
  .portal-header .clock, .portal-header .divider { display: none; }
  .portal-content { width: calc(100% - 32px); padding: 34px 0 42px; }
  .portal-intro { align-items: stretch; flex-direction: column; gap: 26px; margin-bottom: 36px; }
  .portal-intro h1 { font-size: 30px; }
  .portal-search { width: 100%; flex-basis: 52px; }
  .recent-app { height: auto; min-height: 190px; padding: 24px; flex-wrap: wrap; }
  .recent-copy { flex-basis: calc(100% - 110px); }
  .recent-todo { width: auto; min-height: 64px; margin: 20px 0 0 100px; padding: 0 22px 0 0; border-left: 0; }
  .portal-enter { margin-top: 20px; }
  .micro-app-grid { grid-template-columns: 1fr; }
  .micro-app-card { min-height: 210px; }
  .portal-footer { text-align: center; }
  .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; }
  .review-modal-v2 { transform: none; }
  .assignment-modal { transform: none; }
}

@media (max-width: 520px) {
  .portal-header > .icon-button, .portal-header .role-switcher { display: none; }
  .portal-brand { font-size: 18px; }
  .portal-content { width: calc(100% - 24px); }
  .portal-intro h1 { font-size: 26px; }
  .portal-intro p { font-size: 15px; }
  .recent-app { display: grid; grid-template-columns: 66px 1fr; gap: 16px; }
  .recent-app .portal-app-icon { width: 66px; height: 66px; flex-basis: 66px; }
  .recent-copy { margin-left: 0; }
  .recent-copy strong { font-size: 20px; }
  .recent-todo { margin: 14px 0 0; padding: 0; }
  .portal-enter { min-width: 112px; margin: 14px 0 0; }
  .recent-arrow { display: none; }
  .micro-app-card { grid-template-columns: 60px minmax(0, 1fr); padding: 22px 18px; gap: 0 16px; }
  .micro-app-card .portal-app-icon { width: 60px; height: 60px; }
  .micro-app-copy strong { white-space: normal; }
  .portal-footer i, .portal-footer button { display: none; }
  .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; }
}
