:root {
    --ink: #263b39;
    --muted: #687774;
    --line: #dce5e1;
    --paper: #fff;
    --canvas: #f4f6f5;
    --teal: #136b5d;
    --soft: #edf6f1;
    --amber: #92651a;
    --danger: #ac3737;
}
* { box-sizing: border-box; letter-spacing: 0; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--ink); background: var(--canvas); font: 14px/1.6 "Segoe UI","Microsoft YaHei",Arial,sans-serif; }
button,input,textarea,select { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .55; cursor: not-allowed; }
input,textarea,select { width: 100%; min-width: 0; padding: 8px 10px; border: 1px solid #c3d1ca; border-radius: 4px; background: #fff; color: var(--ink); }
input[type="checkbox"],input[type="radio"] { width: 16px; height: 16px; flex: 0 0 16px; accent-color: var(--teal); }
textarea { resize: vertical; }
button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }
h1,h2,h3,p { margin: 0; }
h1 { font-size: 24px; line-height: 1.4; }
h2 { font-size: 16px; font-weight: 700; }
h3 { font-size: 14px; font-weight: 700; }
small { font-size: 12px; }
.muted,.scope-note { color: var(--muted); font-size: 12px; }
.scope-note { margin-top: 12px; }
.eyebrow { font-size: 11px; color: var(--muted); margin-bottom: 3px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 12px; border: 1px solid transparent; border-radius: 4px; font-size: 13px; font-weight: 600; min-height: 36px; }
.button-primary { background: var(--teal); border-color: var(--teal); color: #fff; }
.button-primary:hover { background: #0e594d; }
.button-quiet { background: #f3f6f4; border-color: var(--line); color: var(--ink); }
.button-outline { background: #fff; border-color: #c1d5ca; color: var(--teal); }
.button-outline:hover,.button-quiet:hover { background: var(--soft); }
.button-small { min-height: 30px; padding: 4px 10px; font-size: 12px; }
.text-button { display: inline-flex; align-items: center; gap: 4px; border: 0; padding: 3px 5px; background: transparent; color: var(--teal); font-size: 12px; }
.lucide { width: 15px; height: 15px; flex: 0 0 15px; }
.text-button:hover { text-decoration: underline; }
.danger-text { color: var(--danger); }
.brand-lockup { display: flex; align-items: center; gap: 11px; min-width: 0; }
.brand-lockup strong { display: block; font-size: 15px; }
.brand-lockup small { display: block; color: var(--muted); }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; flex: 0 0 36px; background: var(--teal); color: #fff; font-weight: 700; border-radius: 5px; }
.topbar { min-height: 78px; padding: 14px 26px; display: flex; gap: 18px; align-items: center; justify-content: space-between; background: #fff; border-bottom: 1px solid var(--line); }
.top-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 7px; }
.user-actions { margin-left: 8px; display: flex; align-items: center; gap: 3px; }
.user-actions > span { color: var(--muted); font-size: 12px; }
.page-shell { max-width: 1840px; margin: 0 auto; padding: 24px 26px 40px; }
.layout-grid { display: grid; grid-template-columns: 176px minmax(0,1fr) 310px; gap: 22px; align-items: start; }
.left-rail { min-width: 0; }
.rail-heading { font-size: 12px; color: var(--muted); margin: 6px 0 14px; }
.product-tabs { display: grid; gap: 8px; }
.product-tab { width: 100%; border: 1px solid transparent; background: transparent; padding: 13px 12px; text-align: left; border-radius: 4px; color: var(--muted); }
.product-tab strong { display: block; font-size: 15px; }
.product-tab small { display: block; margin-top: 4px; color: var(--muted); }
.product-tab[aria-current="true"] { color: var(--teal); background: #e6f0e9; border-color: #bed3c5; }
.rail-scope { margin-top: 36px; padding: 16px 10px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.rail-scope strong { display: block; margin-bottom: 8px; }
.rail-scope p { margin-top: 5px; }
.workspace { min-width: 0; background: #fff; }
.product-intro { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 22px 22px 18px; border-bottom: 1px solid var(--line); }
.version-label { padding: 3px 8px; border: 1px solid #c9dbd0; color: var(--teal); background: var(--soft); border-radius: 3px; font-size: 11px; white-space: nowrap; }
.panel { padding: 21px 22px; border-bottom: 1px solid var(--line); min-width: 0; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.heading-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span,.field > label { font-size: 12px; font-weight: 600; }
.customer-grid,.service-inputs { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px; }
.package-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.package-card { display: flex; flex-direction: column; align-items: flex-start; min-height: 138px; padding: 17px; text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 5px; color: var(--ink); }
.package-card[aria-pressed="true"] { background: #eff7f1; border-color: #6d9c82; box-shadow: inset 0 3px var(--teal); }
.package-name { font-weight: 700; font-size: 15px; }
.package-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; font-size: 28px; line-height: 1.35; color: var(--teal); margin: 9px 0 5px; }
.package-price small { color: var(--muted); font-weight: 400; font-size: 11px; }
.package-detail { display: block; font-size: 12px; color: var(--muted); }
.mode-row { display: flex; align-items: center; gap: 12px; justify-content: space-between; flex-wrap: wrap; margin-top: 16px; font-size: 12px; }
.segmented { display: inline-flex; background: #f0f3f1; padding: 3px; border: 1px solid var(--line); border-radius: 4px; }
.segmented button { border: 0; color: var(--muted); background: transparent; padding: 6px 13px; font-size: 12px; border-radius: 3px; }
.segmented button[aria-pressed="true"] { background: #fff; color: var(--teal); box-shadow: 0 1px 3px #273a3020; font-weight: 700; }
.deployment-grid { display: flex; flex-wrap: wrap; gap: 24px; }
.deployment-grid label { display: flex; align-items: center; gap: 7px; font-size: 13px; }
.module-sections { display: grid; gap: 22px; }
.module-sections.two-columns { grid-template-columns: repeat(2,minmax(0,1fr)); }
.module-section { min-width: 0; }
.module-section-title { display: flex; flex-direction: column; gap: 3px; margin-bottom: 10px; }
.module-section-title strong { font-size: 13px; }
.module-section-title span { font-size: 10px; color: var(--muted); overflow-wrap: anywhere; }
.module-scroll { max-height: 400px; overflow-y: auto; scrollbar-width: thin; scrollbar-gutter: stable; }
.module-item { border-bottom: 1px solid var(--line); }
.module-item:first-child { border-top: 1px solid var(--line); }
.module-item summary { display: flex; align-items: center; gap: 8px; padding: 11px 4px; list-style: none; cursor: pointer; }
.module-item summary::-webkit-details-marker { display: none; }
.module-item summary::after { content: "+"; font-size: 16px; color: var(--muted); width: 14px; text-align: center; flex: 0 0 14px; }
.module-item[open] summary::after { content: "-"; }
.module-name { flex: 1; min-width: 0; font-size: 12px; overflow-wrap: anywhere; }
.module-price { font-size: 11px; font-weight: 650; white-space: nowrap; color: var(--teal); }
.module-description { padding: 0 10px 12px; font-size: 12px; color: var(--muted); }
.module-description p { border-top: 1px dotted var(--line); padding: 10px 0; overflow-wrap: anywhere; }
.module-description strong,.module-description span,.module-description small { display: block; }
.module-description strong { color: var(--ink); margin-bottom: 4px; font-weight: 600; }
.module-description small { color: var(--amber); margin-top: 5px; font-size: 11px; }
.access-breakdown { display: flex; gap: 18px; flex-wrap: wrap; padding: 12px 0; border-bottom: 1px solid var(--line); margin-top: 10px; font-size: 12px; }
.access-breakdown strong { color: var(--teal); }
.subsection { padding-top: 19px; margin-top: 19px; border-top: 1px solid var(--line); }
.subsection h3 { margin-bottom: 12px; }
.platform-options { display: grid; gap: 12px; margin-top: 16px; }
.platform-options label { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; }
.platform-options small { display: block; color: var(--amber); margin-top: 4px; }
.custom-description { font-size: 14px; }
#customPanel .field { margin-top: 18px; }
.quote-rail { min-width: 0; }
.quote-sticky { position: sticky; top: 20px; }
.quote-summary { padding: 24px 21px; background: #173f36; color: #fff; }
.summary-label { font-size: 12px; color: #c9ddd2; }
.grand-total { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; overflow-wrap: anywhere; font-size: 34px; line-height: 1.3; font-weight: 750; margin: 6px 0 18px; }
.grand-total small { font-size: 12px; font-weight: 400; }
.summary-breakdown { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; border-top: 1px solid #ffffff30; padding-top: 14px; }
.summary-breakdown span { display: block; font-size: 10px; color: #d3e1d8; }
.summary-breakdown strong { display: block; margin-top: 3px; font-size: 13px; overflow-wrap: anywhere; }
.quote-lines { background: #fff; padding: 20px; max-height: 510px; overflow: auto; }
.quote-lines h2 { font-size: 13px; margin-bottom: 8px; }
.quote-lines h2 small { color: var(--muted); font-weight: 400; margin-left: 6px; }
.quote-line { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); padding: 12px 0; font-size: 12px; }
.quote-line > div { min-width: 0; }
.quote-line small { display: block; font-size: 10px; margin-top: 5px; color: var(--muted); }
.quote-line strong { white-space: nowrap; color: var(--teal); font-size: 12px; }
.quote-footnote { font-size: 11px; color: var(--muted); padding: 13px 18px; background: #edf1ee; }
.pending-note { padding: 12px 0 0; color: #875b16; font-size: 12px; }
.table-wrap { overflow: auto; width: 100%; border: 1px solid var(--line); }
table { border-collapse: collapse; width: 100%; font-size: 12px; }
th { text-align: left; color: var(--muted); background: #f2f5f3; font-weight: 600; }
th,td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
td small { display: block; color: var(--muted); margin-top: 4px; font-size: 11px; }
tr:last-child td { border-bottom: 0; }
#serverPanel table { min-width: 530px; }
.page-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; max-width: 1840px; margin: 0 auto; padding: 0 26px 25px; color: var(--muted); font-size: 11px; }
.local-file-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 20px; background: #edf3f0; border-bottom: 1px solid var(--line); font-size: 12px; }
.local-file-bar > span { flex: 1 1 230px; overflow-wrap: anywhere; }
.local-file-bar[data-failed="true"] > span { color: var(--danger); }
.local-file-bar .button { font-size: 12px; }
.local-file-bar:not([hidden]) + .login-screen { min-height: calc(100vh - 65px); }
.login-screen { min-height: 100vh; display: grid; place-items: center; padding: 28px 18px; border-top: 5px solid var(--teal); }
.login-panel { width: 100%; max-width: 430px; padding: 36px; border: 1px solid var(--line); border-radius: 6px; background: #fff; box-shadow: 0 12px 40px #2f49320a; }
.login-panel h1 { margin: 32px 0 24px; font-size: 22px; }
.login-form { display: grid; gap: 18px; }
.login-form input { height: 43px; }
.captcha-row { display: grid; grid-template-columns: minmax(0,1fr) 164px; align-items: center; gap: 10px; }
#captchaBtn { display: block; border: 1px solid var(--line); padding: 0; height: 50px; width: 164px; background: var(--soft); overflow: hidden; border-radius: 4px; }
#captchaImage { display: block; }
.login-submit { height: 43px; margin-top: 3px; }
.error-box { background: #fff1ef; color: #973d36; padding: 10px 12px; border: 1px solid #ecc4bf; border-radius: 4px; font-size: 12px; }
.notice { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); max-width: min(700px,calc(100% - 28px)); z-index: 100; background: #eaf5ed; color: #265b39; border: 1px solid #b8d7be; border-radius: 5px; box-shadow: 0 4px 16px #0001; padding: 12px 20px; font-size: 13px; }
.notice[data-state="error"] { background: #fff0eb; color: #923b2d; border-color: #e6bcb4; }
.admin-panel { background: #fff; padding: 26px; min-height: 600px; }
.admin-heading { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; margin-bottom: 22px; }
.admin-tabs { margin-bottom: 26px; }
.account-form { display: grid; grid-template-columns: minmax(160px,1fr) minmax(160px,1fr) auto; align-items: end; gap: 16px; max-width: 780px; margin-bottom: 26px; }
.account-form .button { height: 40px; }
.credential-notice { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; background: var(--soft); padding: 14px; margin-bottom: 20px; border: 1px solid var(--line); font-size: 13px; overflow-wrap: anywhere; }
.account-status { color: var(--teal); }
.account-status[data-enabled="false"] { color: var(--danger); }
.row-actions { display: flex; gap: 7px; flex-wrap: wrap; }
#accountList table { min-width: 680px; }
.log-search { display: flex; max-width: 600px; gap: 9px; margin-bottom: 18px; }
.log-search .button { flex-shrink: 0; }
.log-table { min-width: 1100px; table-layout: fixed; }
.log-table th:nth-child(1) { width: 155px; }
.log-table th:nth-child(2) { width: 85px; }
.log-table th:nth-child(3) { width: 120px; }
.log-table th:nth-child(4) { width: 55px; }
.log-table th:nth-child(5) { width: 120px; }
.log-table th:nth-child(6) { width: 220px; }
.log-table td { word-break: break-word; font-size: 11px; }
.pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.pagination span { margin-right: auto; font-size: 12px; color: var(--muted); }
.empty { text-align: center; color: var(--muted); padding: 28px; }
dialog { border: 1px solid var(--line); border-radius: 6px; padding: 28px; width: min(440px,calc(100% - 32px)); color: var(--ink); }
dialog::backdrop { background: #18352c55; }
dialog h2 { margin-bottom: 20px; font-size: 18px; }
dialog .field { margin-bottom: 15px; }
.dialog-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 22px; }
@media (min-width: 1600px) { .layout-grid { grid-template-columns: 200px minmax(0,1fr) 340px; gap: 28px; } }
@media (max-width: 1200px) {
    .topbar { align-items: flex-start; }
    .user-actions { width: 100%; justify-content: flex-end; }
    .layout-grid { grid-template-columns: 148px minmax(0,1fr) 270px; gap: 15px; }
    .module-sections.two-columns { grid-template-columns: 1fr; }
    .panel { padding: 20px 18px; }
}
@media (max-width: 1000px) {
    .layout-grid { grid-template-columns: 148px minmax(0,1fr); }
    .quote-rail { grid-column: 2; }
    .quote-sticky { position: static; display: grid; grid-template-columns: 1fr 1fr; }
    .quote-footnote { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
    .topbar { display: block; padding: 14px 16px; }
    .top-actions { justify-content: flex-start; margin-top: 14px; }
    .user-actions { margin-left: 0; justify-content: flex-start; flex-wrap: wrap; }
    .page-shell { padding: 18px 12px 28px; }
    .layout-grid { display: block; }
    .rail-heading,.rail-scope { display: none; }
    .product-tabs { grid-template-columns: repeat(2,minmax(0,1fr)); margin-bottom: 15px; }
    .product-tab { padding: 11px 12px; }
    .product-intro { padding: 20px 16px; }
    .panel { padding: 20px 16px; }
    .package-card { padding: 13px 11px; }
    .package-price { font-size: 26px; gap: 4px; }
    .package-price small { font-size: 10px; }
    .package-detail { font-size: 11px; }
    .customer-grid,.service-inputs { grid-template-columns: 1fr; }
    .quote-rail { margin-top: 18px; }
    .quote-sticky { display: block; }
    .quote-lines { max-height: none; }
    .mode-row { align-items: flex-start; }
    .access-breakdown { gap: 12px; }
    .admin-panel { padding: 18px 14px; }
    .account-form { grid-template-columns: 1fr; }
    .account-form .button { justify-self: start; }
    .login-panel { padding: 28px 22px; }
    .login-panel h1 { margin-top: 26px; }
    .page-footer { padding-left: 16px; padding-right: 16px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
