:root {
  font-family: "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: #59616d;
  background: #f5f7fa;
  font-synthesis: none;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; }
button, input { font: inherit; }
button { border: 0; background: none; color: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }

.app-shell { display: flex; width: 100%; height: 100vh; min-width: 1180px; background: #fff; }
.primary-sidebar { flex: 0 0 218px; height: 100%; background: #2f465b; color: #b9c7d4; box-shadow: 2px 0 7px rgba(15, 31, 46, .18); z-index: 5; }
.brand { height: 58px; display: flex; align-items: center; justify-content: center; color: white; font-weight: 650; font-size: 17px; }
.primary-nav { padding-top: 7px; }
.nav-item, .subnav-item { height: 49px; display: flex; align-items: center; gap: 14px; padding: 0 20px; font-size: 14px; }
.nav-item .icon, .subnav-item .icon { width: 18px; text-align: center; font-size: 16px; color: #c7d5e1; }
.nav-item .chevron { margin-left: auto; font-size: 14px; color: #8296a8; }
.nav-item.expanded { background: #344e66; color: #ecf3f8; }
.subnav { background: #203348; padding: 6px 0; }
.subnav-item { padding-left: 36px; }
.subnav-item.active { color: #3d9eff; }
.subnav-item.active .icon { color: #3d9eff; }

.workspace { flex: 1; min-width: 0; display: flex; flex-direction: column; background: #f7f8fa; }
.topbar { height: 46px; display: flex; align-items: center; gap: 18px; padding: 0 14px; background: #fff; border-bottom: 1px solid #edf0f3; }
.menu-button { font-size: 21px; color: #20262c; line-height: 1; }
.breadcrumbs { display: flex; align-items: center; gap: 11px; font-size: 14px; color: #a2b4c9; }
.breadcrumbs b { color: #4b5158; font-weight: 500; }
.profile { margin-left: auto; display: flex; align-items: center; gap: 9px; font-size: 12px; }
.avatar { width: 35px; height: 35px; border-radius: 50%; display: grid; place-items: center; color: #805b2d; background: radial-gradient(circle at 35% 28%, #fff 0 13%, #e6d6c0 14% 36%, #aa7e49 37% 54%, #f0e8dc 55% 100%); border: 2px solid #f2eee8; font-size: 11px; font-weight: 700; }

.tab-strip { height: 33px; display: flex; align-items: flex-end; gap: 4px; padding: 4px 8px 0; overflow: hidden; white-space: nowrap; background: #fff; border-bottom: 1px solid #dfe4ea; }
.tab-strip button { flex: 0 0 auto; height: 28px; padding: 0 10px; border: 1px solid #e3e7ec; border-bottom: 0; background: #fff; font-size: 12px; }
.tab-strip button span { margin-left: 6px; color: #9ca6b0; }
.tab-strip button.active { color: white; background: #409eff; border-color: #409eff; }
.tab-strip button i { display: inline-block; width: 7px; height: 7px; margin-right: 6px; background: white; border-radius: 50%; }

.body-layout { flex: 1; min-height: 0; display: flex; margin-top: 4px; background: white; }
.secondary-sidebar { flex: 0 0 176px; min-width: 176px; position: relative; border-right: 1px solid #f0f1f2; background: #fff; }
.secondary-scroll { position: absolute; inset: 0; overflow-y: auto; padding: 12px 0 20px; scrollbar-color: #cfcfcf transparent; scrollbar-width: thin; }
.secondary-scroll a { min-height: 46px; padding: 0 20px 0 47px; display: flex; align-items: center; color: #333b43; font-size: 14px; white-space: nowrap; }
.secondary-scroll a.section-title { padding-left: 31px; justify-content: space-between; padding-right: 18px; }
.secondary-scroll a.current { color: #2796f3; }

.content { flex: 1; min-width: 0; padding: 18px 18px 0; overflow: hidden; background: #fff; }
#lineListPage { height: 100%; }
.content.detail-mode { padding: 0; background: #f4f6f9; }
.line-tabs { height: 39px; display: flex; gap: 0; border-bottom: 2px solid #e8edf2; }
.line-tabs button { min-width: 76px; padding: 0 13px 13px; font-weight: 600; font-size: 14px; color: #333a42; position: relative; }
.line-tabs button.active { color: #2797f4; }
.line-tabs button.active::after { content: ""; position: absolute; height: 2px; left: 12px; right: 12px; bottom: -2px; background: #2797f4; }
.line-tabs button[data-pane="customerLinePane"] { min-width: 104px; }
.tab-pane { min-width: 0; }
.filters { height: 61px; display: flex; align-items: center; gap: 10px; font-size: 14px; }
.filters label { color: #505862; font-weight: 600; }
.filters input { width: 219px; height: 30px; padding: 0 10px; border: 1px solid #dfe4ea; border-radius: 4px; outline: none; }
.filters input:focus { border-color: #409eff; box-shadow: 0 0 0 2px rgba(64, 158, 255, .1); }
.primary-button { height: 30px; min-width: 51px; border-radius: 3px; color: white; background: #2698f5; }
.primary-button:hover { background: #168bed; }
.secondary-button { height: 30px; min-width: 58px; border: 1px solid #d8dee6; border-radius: 3px; background: #fff; color: #5d6570; }
.status-filter { display: flex; height: 30px; margin-bottom: 15px; }
.status-filter button { width: 61px; border: 1px solid #e0e5eb; background: #fff; font-size: 13px; }
.status-filter button + button { border-left: 0; }
.status-filter button:first-child { border-radius: 4px 0 0 4px; }
.status-filter button:last-child { border-radius: 0 4px 4px 0; }
.status-filter button.active { color: #fff; background: #2698f5; border-color: #2698f5; }

.table-wrap { height: calc(100vh - 247px); overflow: auto; border: 1px solid #e6ebf0; position: relative; }
table { width: 100%; min-width: 1080px; border-collapse: collapse; table-layout: fixed; font-size: 13px; }
thead { position: sticky; top: 0; z-index: 2; background: #f7f8fa; }
th { height: 41px; color: #596273; font-weight: 650; }
th, td { border-right: 1px solid #e7ecf0; border-bottom: 1px solid #e7ecf0; text-align: center; padding: 9px 10px; }
th:nth-child(1) { width: 142px; }
th:nth-child(2) { width: 138px; }
th:nth-child(3) { width: 138px; }
th:nth-child(4) { width: 136px; }
th:nth-child(5) { width: 138px; }
th:nth-child(6) { width: 138px; }
th:nth-child(7) { width: 138px; }
th:nth-child(8) { width: 138px; }
td { height: 61px; line-height: 20px; color: #5f666c; word-break: break-all; }
td.actions { white-space: nowrap; }
.actions button { color: #2797f4; margin: 0 5px; font-size: 13px; }
.customer-filters { gap: 6px; white-space: nowrap; }
.customer-filters label:not(:first-child) { margin-left: 2px; }
.customer-filters > input { width: 130px; }
.customer-filters select { width: 76px; height: 30px; padding: 0 21px 0 8px; border: 1px solid #dfe4ea; border-radius: 4px; color: #59616d; background: #fff; outline: none; }
.customer-filters #updateStatusFilter { width: 88px; }
.customer-filters select:focus { border-color: #409eff; box-shadow: 0 0 0 2px rgba(64, 158, 255, .1); }
.date-range { display: flex; align-items: center; gap: 6px; }
.customer-filters .date-input { width: 110px; color: #59616d; }
.date-range span { color: #8a929b; }
.global-fee-button { min-width: 88px; margin-left: auto; }
.customer-table-wrap { height: calc(100vh - 202px); }
.customer-table { min-width: 1280px; }
.customer-table th:nth-child(1) { width: 190px; }
.customer-table th:nth-child(2) { width: 120px; }
.customer-table th:nth-child(3) { width: 95px; }
.customer-table th:nth-child(4) { width: 140px; }
.customer-table th:nth-child(5) { width: 125px; }
.customer-table th:nth-child(6) { width: 125px; }
.customer-table th:nth-child(7) { width: 125px; }
.customer-table th:nth-child(8) { width: 178px; }
.customer-table th:nth-child(9) { width: 240px; }
.customer-table td.actions { padding-left: 16px; text-align: left; }
.customer-actions { display: flex; align-items: center; justify-content: flex-start; gap: 16px; white-space: nowrap; }
.customer-table .customer-actions button { flex: 0 0 auto; margin: 0; }
.update-status-tag { display: inline-flex; align-items: center; justify-content: center; min-width: 54px; height: 24px; padding: 0 9px; border-radius: 3px; font-size: 12px; line-height: 1; }
.update-status-tag.has-update { color: #20a66a; background: #e9f8f1; border: 1px solid #bdebd5; }
.update-status-tag.no-update { color: #8b949f; background: #f1f3f5; border: 1px solid #e1e5e9; }
.empty-state { padding: 80px 0; text-align: center; color: #a3adb8; }
.toast { position: fixed; top: 78px; right: 28px; background: rgba(31, 45, 61, .88); color: #fff; border-radius: 4px; padding: 10px 15px; font-size: 13px; z-index: 20; animation: toast-in .18s ease-out; }
@keyframes toast-in { from { transform: translateY(-8px); opacity: 0; } }

.overlay { position: fixed; inset: 0; background: rgba(18, 29, 42, .42); z-index: 30; }
.drawer-mask { background: rgba(18, 29, 42, .28); }
.detail-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 420px; z-index: 31; background: #fff; box-shadow: -4px 0 14px rgba(26, 43, 61, .18); transform: translateX(105%); transition: transform .22s ease; }
.detail-drawer.open { transform: translateX(0); }
.drawer-header, .modal-header { height: 52px; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; border-bottom: 1px solid #e6ebf0; }
.drawer-header h2, .modal-header h2 { margin: 0; color: #323a43; font-size: 16px; font-weight: 600; }
.close-button { padding: 4px 7px; color: #8a949f; font-size: 23px; line-height: 1; }
.drawer-body { padding: 12px 24px; overflow-y: auto; height: calc(100% - 52px); }
.detail-row { display: grid; grid-template-columns: 120px minmax(0, 1fr); min-height: 50px; align-items: center; border-bottom: 1px solid #edf0f3; font-size: 14px; }
.detail-row dt { color: #89929d; }
.detail-row dd { margin: 0; color: #48515b; word-break: break-all; }

.line-detail-page { width: 100%; height: 100%; min-width: 0; overflow-y: auto; color: #202631; background: #f4f6f9; }
.line-detail-header { height: 72px; display: flex; align-items: center; gap: 14px; padding: 0 32px; background: #fff; border-bottom: 1px solid #eef1f4; }
.detail-back-button { height: 42px; padding: 0 18px; border-radius: 22px; color: #1677ff; background: #eaf3ff; font-size: 16px; }
.detail-back-button span { margin-right: 6px; font-size: 21px; vertical-align: -1px; }
.line-detail-header h1 { margin: 0 0 0 3px; color: #202631; font-size: 21px; line-height: 1; font-weight: 700; }
.detail-status-tag, .detail-type-tag { display: inline-flex; align-items: center; height: 32px; padding: 0 13px; border-radius: 16px; font-size: 14px; }
.detail-status-tag { color: #16a66a; background: #eaf8f2; }
.detail-type-tag { color: #536ee8; background: #eef0ff; }
.line-detail-tabs { height: 68px; display: flex; align-items: flex-end; gap: 36px; padding: 0 32px; background: #f4f6f9; }
.line-detail-tabs button { height: 50px; padding: 0 0 18px; position: relative; color: #4d535c; font-size: 16px; }
.line-detail-tabs button.active { color: #1677ff; }
.line-detail-tabs button.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; border-radius: 2px; background: #1677ff; }
.line-detail-content { margin: 0 24px 24px; padding: 22px 30px 36px; min-height: calc(100% - 164px); border-radius: 10px; background: #fff; box-shadow: 0 3px 16px rgba(36, 52, 72, .025); }
.detail-info-section h2 { margin: 0; padding-bottom: 16px; border-bottom: 1px solid #e7ebef; color: #202631; font-size: 18px; line-height: 1.5; font-weight: 700; }
.detail-info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 15px 0 24px; }
.detail-info-grid > div { min-height: 47px; display: grid; grid-template-columns: 190px minmax(0, 1fr); align-items: start; padding: 8px 0; font-size: 14px; line-height: 1.65; }
.detail-info-grid dt { color: #818b9b; }
.detail-info-grid dd { margin: 0; color: #2d3138; word-break: break-word; }
.detail-info-grid .detail-placeholder { display: block; }
.detail-number-grid { margin-bottom: 22px; }
.detail-number-grid dd { display: flex; align-items: center; gap: 12px; }
.detail-update-tag { display: inline-flex; align-items: center; height: 25px; padding: 0 9px; border: 1px solid #a9e4c9; border-radius: 3px; color: #18a969; background: #eaf8f2; font-size: 13px; line-height: 1; white-space: nowrap; }
.detail-other-section .detail-info-grid { margin-bottom: 0; }

.update-modal { width: 520px; }
.update-modal-body { min-height: 128px; display: flex; align-items: flex-start; gap: 15px; padding: 28px 32px 24px; color: #4f5863; font-size: 14px; line-height: 1.75; }
.update-modal-body p { margin: 0; }
.update-warning-icon { flex: 0 0 24px; width: 24px; height: 24px; margin-top: 1px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: #f5a623; font-weight: 700; line-height: 1; }
.update-confirm-button { min-width: 82px !important; }

.modal-mask { display: grid; place-items: center; }
.fee-modal { width: 430px; background: #fff; border-radius: 3px; box-shadow: 0 6px 24px rgba(18, 29, 42, .22); }
.modal-body { position: relative; min-height: 112px; display: flex; align-items: center; justify-content: center; padding: 22px 25px 34px; color: #4f5863; font-size: 14px; }
.modal-body input { width: 190px; height: 32px; margin: 0 9px 0 2px; padding: 0 9px; border: 1px solid #d9dfe6; border-radius: 3px; outline: none; }
.modal-body input:focus { border-color: #409eff; box-shadow: 0 0 0 2px rgba(64, 158, 255, .1); }
.field-error { position: absolute; left: 105px; bottom: 10px; margin: 0; color: #ef5656; font-size: 12px; }
.modal-footer { height: 55px; display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 0 20px; border-top: 1px solid #e6ebf0; }
.modal-footer .primary-button { min-width: 58px; }
.line-fee-modal { width: min(780px, calc(100vw - 48px)); height: min(620px, calc(100vh - 80px)); display: flex; flex-direction: column; }
.line-fee-modal .modal-header, .line-fee-modal .modal-footer { flex: 0 0 auto; }
.line-fee-body { min-height: 0; flex: 1; display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; padding: 22px 34px 20px; overflow-y: auto; }
.line-fee-description { flex: 0 0 auto; margin: 0 0 20px; color: #69727d; line-height: 22px; }
.line-fee-field { display: flex; align-items: center; justify-content: flex-start; }
.line-fee-body .line-fee-field input { width: 230px; }
.line-fee-error { position: static; flex: 0 0 auto; margin: 6px 0 0 64px; }
.line-fee-body .operation-records { min-height: 220px; }
.global-fee-modal { width: 700px; height: min(620px, calc(100vh - 80px)); display: flex; flex-direction: column; }
.global-fee-modal .modal-header, .global-fee-modal .modal-footer { flex: 0 0 auto; }
.global-fee-body { min-height: 0; flex: 1; display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; padding: 22px 34px 20px; overflow: hidden; }
.global-fee-description { flex: 0 0 auto; margin: 0 0 20px; color: #69727d; line-height: 22px; }
.global-fee-field { display: flex; align-items: center; justify-content: flex-start; }
.global-fee-body .global-fee-field input { width: 190px; }
.global-fee-error { position: static; flex: 0 0 auto; margin: 6px 0 0 64px; }
.operation-records { min-height: 0; flex: 1; display: flex; flex-direction: column; margin-top: 18px; }
.operation-records h3 { flex: 0 0 auto; margin: 0 0 10px; color: #3f4751; font-size: 14px; font-weight: 600; }
.operation-table-wrap { min-height: 120px; flex: 1; overflow-y: auto; border: 1px solid #e2e7ec; }
.operation-table { min-width: 0; width: 100%; table-layout: fixed; font-size: 13px; }
.operation-table thead { position: sticky; top: 0; z-index: 1; background: #f7f8fa; }
.operation-table th { height: 40px; color: #596273; background: #f7f8fa; }
.operation-table td { height: 46px; padding: 8px; color: #5f666c; background: #fff; }
.operation-table th:nth-child(1), .operation-table th:nth-child(2) { width: 22%; }
.operation-table th:nth-child(3) { width: 20%; }
.operation-table th:nth-child(4) { width: 36%; }
.operation-table th:last-child, .operation-table td:last-child { border-right: 0; }
.operation-empty { height: 118px !important; color: #a3adb8 !important; }

.system-ip-content { padding: 25px 28px 34px; overflow-y: auto; background: #f5f7fa; }
.system-ip-header h1 { margin: 0; color: #20252d; font-size: 25px; line-height: 1.4; font-weight: 700; }
.system-ip-header p { margin: 16px 0 30px; color: #666d76; font-size: 16px; line-height: 1.8; }
.ip-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: stretch; }
.ip-column { min-height: calc(100vh - 214px); padding: 28px 30px 34px; border-radius: 12px; background: #fff; box-shadow: 0 4px 18px rgba(40, 52, 68, .05); }
.ip-column > h2 { margin: 0; color: #20252d; font-size: 23px; line-height: 1.4; font-weight: 700; }
.ip-column-description { min-height: 27px; margin: 17px 0 25px; color: #666d76; font-size: 16px; line-height: 1.7; }
.ip-card { padding: 24px 25px 25px; border: 1px solid #e6e9ed; border-radius: 10px; background: #f7f8fa; }
.ip-card + .ip-card { margin-top: 20px; }
.ip-card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.ip-card-heading h3 { margin: 0; color: #252a32; font-size: 21px; line-height: 1.4; font-weight: 700; }
.ip-card-heading p { min-height: 25px; margin: 12px 0 25px; color: #666d76; font-size: 16px; line-height: 1.6; }
.ip-link-button { flex: 0 0 auto; padding: 2px 0; color: #1268ff; font-size: 16px; line-height: 1.5; }
.ip-link-button:hover { color: #0054e6; }
.ip-list-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; color: #666d76; font-size: 16px; font-weight: 600; }
.ip-list { display: block; width: 100%; height: 132px; resize: none; padding: 15px 16px; border: 1px solid #dde2e8; border-radius: 8px; outline: none; overflow-y: auto; color: #242a33; background: #fff; font: 18px/2.05 "PingFang SC", "Microsoft YaHei", Arial, sans-serif; }
.ip-list:not([readonly]) { border-color: #409eff; box-shadow: 0 0 0 2px rgba(64, 158, 255, .1); }
.secondary-scroll a.current { color: #2796f3; }

@media (max-width: 1280px) {
  .system-ip-content { padding-left: 20px; padding-right: 20px; }
  .ip-columns { gap: 18px; }
  .ip-column { padding-left: 22px; padding-right: 22px; }
  .ip-card { padding-left: 20px; padding-right: 20px; }
}

@media (max-width: 1350px) {
  .primary-sidebar { flex-basis: 196px; }
  .secondary-sidebar { flex-basis: 170px; min-width: 170px; }
  .content { padding-left: 15px; padding-right: 15px; }
}
