﻿:root {
  color-scheme: light;
  font-family: Inter, "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "Segoe UI", Arial, sans-serif;
  background: #edf1f5;
  color: #171d27;
  font-size: 15px;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.shell { min-height: 100vh; display: grid; grid-template-columns: 232px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; min-width: 0; overflow-y: auto; background: #171d27; color: #d7dde7; padding: 24px 16px; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 28px; }
.brand-mark { width: 36px; height: 36px; display: grid; place-items: center; background: #30a79a; color: #072b29; font-weight: 800; border-radius: 6px; }
.brand strong { display: block; color: #ffffff; font-size: 17px; }
.brand small { display: block; margin-top: 2px; color: #9ca8b9; font-size: 11px; }
nav { display: grid; gap: 4px; }
.nav-link { color: #adb8c8; text-decoration: none; padding: 10px 12px; border-radius: 5px; }
.nav-link:hover, .nav-link.active { background: #273242; color: #ffffff; }
.sidebar-footer { display: grid; gap: 9px; margin-top: auto; padding: 12px 8px; color: #aab6c6; font-size: 12px; }
.worker-status { display: flex; align-items: center; }
.status-dot { width: 8px; height: 8px; background: #50c878; display: inline-block; border-radius: 50%; margin-right: 7px; }
.tool-service-status { display: grid; gap: 6px; padding-left: 15px; }
.tool-service-state { display: inline-flex; align-items: center; gap: 6px; color: #aab6c6; font-size: 11px; }
.tool-service-state i { width: 7px; height: 7px; display: inline-block; border-radius: 50%; background: #cf5a5a; }
.tool-service-state.is-online { color: #c4ead5; }
.tool-service-state.is-online i { background: #50c878; }

.content { min-width: 0; width: 100%; max-width: none; margin: 0; padding: 30px clamp(24px, 2.4vw, 52px) 52px; }
[data-page][hidden] { display: none; }
.page-heading { margin-bottom: 22px; }
.overview-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.overview-heading .field-help { margin: 8px 0 0; min-height: 0; }
.overview-log-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.maintenance-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 14px; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 28px; }
.eyebrow { margin: 0 0 6px; color: #647184; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .7px; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: 28px; line-height: 1.2; }
h2 { margin-bottom: 0; font-size: 17px; line-height: 1.25; }

.metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 14px; }
.metric, .panel { background: #ffffff; border: 1px solid #dce2ea; border-radius: 6px; }
.metric { padding: 17px; min-height: 103px; display: flex; flex-direction: column; justify-content: space-between; }
.metric span { color: #687587; font-size: 13px; }
.metric strong { font-size: 31px; line-height: 1; }
.metric small { color: #687587; font-size: 12px; line-height: 1.35; }
.metric-runtime { border-top: 3px solid #168c83; }
.metric-state { font-size: 23px !important; }
.overview-runtime-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.overview-runtime-panel .form-actions { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid #e5eaf0; }
.workspace-grid, .data-grid { display: grid; grid-template-columns: minmax(320px, .9fr) minmax(380px, 1.1fr); gap: 14px; margin-bottom: 14px; }
.maintenance-migration-grid { display: block; margin-bottom: 14px; }
.panel { padding: 20px; min-width: 0; }
.panel-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 18px; }
.migration-composer { overflow: hidden; padding: 0; }
.migration-card-heading { align-items: center; margin: 0; padding: 18px 20px; border-bottom: 1px solid #e5eaf0; background: linear-gradient(135deg, #ffffff 0%, #f4faf9 100%); }
.migration-card-heading .field-help { min-height: 0; margin: 6px 0 0; }
.migration-layout { display: grid; grid-template-columns: minmax(220px, .42fr) minmax(0, 1fr); gap: 0; }
.migration-guide { padding: 20px; border-right: 1px solid #e5eaf0; background: #fbfcfd; color: #536276; font-size: 12px; line-height: 1.55; }
.migration-guide strong { display: block; margin-bottom: 10px; color: #253344; font-size: 13px; }
.migration-guide ul { margin: 0; padding-left: 18px; }
.migration-guide li + li { margin-top: 8px; }
.migration-form { padding: 20px; }
.migration-field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px 14px; align-items: stretch; }
.migration-field-grid .field-wide { grid-column: 1 / -1; }
.migration-field-grid > label {
  min-width: 0;
  min-height: 94px;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 12px;
  border: 1px solid #e1e7ee;
  border-radius: 5px;
  background: #fbfcfd;
}
.migration-field-grid > label > span { margin-top: auto; }
.migration-options { display: flex; flex-wrap: wrap; gap: 10px 18px; padding: 11px 12px; border: 1px solid #e1e7ee; border-radius: 4px; background: #fbfcfd; }
.migration-options label { display: inline-flex; align-items: center; gap: 7px; color: #394556; }
.migration-footer { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 16px; }
.migration-footer .field-help { min-height: 0; margin: 0; }
.migration-bundle-card { margin-top: 14px; }
.migration-bundle-panel { display: grid; gap: 16px; }
.migration-bundle-section { display: grid; gap: 12px; padding: 0; }
.section-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.section-title-row h3 { margin: 0 0 5px; font-size: 16px; }
.migration-checkbox-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.migration-checkbox-grid label { align-items: flex-start; padding: 10px; border: 1px solid #e1e7ee; border-radius: 6px; background: #fff; }
.migration-checkbox-grid label:has(input:disabled) { opacity: .56; background: #f6f8fa; }
.migration-checkbox-grid span { display: grid; gap: 3px; }
.migration-checkbox-grid small, .migration-bundle-item small, .migration-bundle-item span span, .migration-result-card span { color: #6c7a8c; font-size: 12px; font-weight: 400; }
.migration-bundle-list { display: grid; gap: 8px; max-height: 220px; overflow: auto; padding-right: 2px; }
.migration-bundle-item { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; padding: 11px 12px; border: 1px solid #e1e7ee; border-radius: 7px; background: #fff; cursor: pointer; }
.migration-bundle-item.active { border-color: #168c83; box-shadow: 0 0 0 3px rgba(22, 140, 131, .12); }
.migration-bundle-item > span { display: grid; gap: 4px; min-width: 0; }
.migration-result { padding: 11px 12px; border: 1px dashed #cfd9e4; border-radius: 6px; background: #fbfcfd; }
.migration-result-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.migration-result-card div { display: grid; gap: 4px; min-width: 0; }
.inline-check { display: inline-flex; align-items: center; gap: 8px; color: #394556; }
.badge { display: inline-flex; align-items: center; min-height: 24px; padding: 4px 8px; color: #15655f; background: #def2ee; border-radius: 4px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.badge.neutral { color: #5f6b7a; background: #edf1f5; }
.muted { color: #8591a1; font-size: 12px; }

form { display: grid; gap: 13px; }
label { display: grid; gap: 6px; color: #394556; font-size: 12px; font-weight: 700; }
input, select, textarea { width: 100%; border: 1px solid #cbd4df; border-radius: 4px; padding: 9px 10px; color: #171d27; background: #ffffff; outline: none; }
textarea { resize: vertical; min-height: 74px; }
input[type="checkbox"] { width: 15px; height: 15px; padding: 0; accent-color: #168c83; }
input:focus, select:focus, textarea:focus { border-color: #168c83; box-shadow: 0 0 0 3px #d9f0ed; }
.inline-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: stretch; }
.toggle-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 3px 0; align-items: stretch; }
.toggle-row label { display: inline-flex; align-items: center; min-height: 58px; gap: 7px; padding: 12px; border: 1px solid #e1e7ee; border-radius: 5px; background: #fbfcfd; }
.check-label { display: inline-flex; align-items: center; gap: 7px; }
.service-list { display: grid; gap: 10px; }
.service-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid #e5eaf0; }
.service-item:last-child { border-bottom: 0; }
.service-item strong { display: block; font-size: 13px; }
.service-item span { color: #687587; font-size: 12px; }
.runtime-actions { display: grid; gap: 11px; margin-top: 18px; padding-top: 16px; border-top: 1px solid #e5eaf0; }
.runtime-actions label { max-width: 100%; }
.runtime-actions > label,
#digitalplat-config-form > label,
#digitalplat-config-form > .check-label,
#profile-form > label {
  min-width: 0;
  min-height: 92px;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 12px;
  border: 1px solid #e1e7ee;
  border-radius: 5px;
  background: #fbfcfd;
}
.runtime-actions > label > span,
#digitalplat-config-form > label > span,
#profile-form > label > span { margin-top: auto; }
#digitalplat-config-form > .check-label { flex-direction: row; align-items: center; justify-content: flex-start; min-height: 92px; }
.proxy-refresh-options { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; }
.proxy-refresh-options .check-label { color: #526174; font-size: 12px; font-weight: 700; }
.proxy-refresh-options input { flex: 0 0 auto; }
.inline-fields > label,
.inline-fields > .check-label {
  min-width: 0;
  min-height: 92px;
  height: 100%;
  padding: 12px;
  border: 1px solid #e1e7ee;
  border-radius: 5px;
  background: #fbfcfd;
}
.inline-fields > label { display: flex; flex-direction: column; gap: 7px; }
.inline-fields > label > span { margin-top: auto; }
.inline-fields > .check-label { display: flex; align-items: center; align-self: stretch; }
.settings-section-heading { margin: 16px 0 10px; padding-top: 14px; border-top: 1px solid #e7ecf3; }
.settings-section-heading h3 { margin: 0 0 4px; color: #263546; font-size: 13px; }
.settings-section-heading .field-help { margin: 0; }
.digitalplat-log-panel { margin-bottom: 14px; }
.proxy-node-list { display: grid; align-content: start; max-height: 410px; overflow: auto; }
.proxy-node { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; min-height: clamp(52px, 7vh, 68px); padding: 9px 10px; border-bottom: 1px solid #e5eaf0; border-left: 3px solid transparent; }
.proxy-node:last-child { border-bottom: 0; }
.proxy-node strong { display: block; font-size: 13px; overflow-wrap: anywhere; }
.proxy-node span { color: #687587; font-size: 12px; overflow-wrap: anywhere; }
.proxy-node.selected { border-left-color: #168c83; box-shadow: inset 0 0 0 1px #9ed8d0; }
.proxy-node.pool-member { border-left-color: #4b8fd8; box-shadow: inset 0 0 0 1px rgba(75, 143, 216, .28); }
.proxy-node.pool-member.selected { border-left-color: #168c83; box-shadow: inset 0 0 0 1px #9ed8d0, inset 3px 0 0 #4b8fd8; }
.proxy-node.manual-pool-member { background: #f2f7ff; }
.proxy-node.health-ok { background: #f1faf5; }
.proxy-node.health-ok .proxy-node-health { color: #147a4e; font-weight: 700; }
.proxy-node.health-failed { background: #fff4f4; }
.proxy-node.health-failed .proxy-node-health { color: #b03a3a; font-weight: 700; }
.proxy-node.health-checking { background: #f2f8fb; }
.proxy-node.health-checking .proxy-node-health { color: #176f88; font-weight: 700; }
.proxy-nodes-heading { align-items: center; margin-bottom: 12px; }
.proxy-node-tools { flex-wrap: wrap; justify-content: flex-start; }
.proxy-node-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.proxy-node-pagination { flex: 0 0 auto; flex-wrap: wrap; }
.proxy-node-pagination .proxy-node-tools { flex: 1 1 360px; }
.proxy-node-pagination #proxy-node-page-summary { flex: 0 0 auto; }
.api-doc-link { display: inline-block; margin-top: 8px; color: #168c83; font-size: 12px; font-weight: 700; text-decoration: none; }
.search { max-width: 220px; min-width: 160px; }
.field-help { min-height: 34px; margin: -1px 0 0; color: #687587; font-size: 12px; line-height: 1.45; }
.digitalplat-settings { display: grid; gap: 14px; }
.settings-page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.settings-page-heading .field-help { margin: 8px 0 0; min-height: 0; }
.settings-tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; }
.config-api-doc { margin-left: auto; }
.settings-tab { border: 1px solid #cbd4df; border-radius: 4px; background: #ffffff; color: #526174; padding: 8px 11px; font-size: 12px; font-weight: 700; }
.settings-tab:hover { border-color: #8fa0b3; background: #f5f7fa; }
.settings-tab.active { border-color: #168c83; background: #168c83; color: #ffffff; }
.settings-pane { margin: 0; }
.settings-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 15px 18px; align-items: stretch; }
.settings-fields label { min-width: 0; min-height: 104px; height: 100%; padding: 12px; border: 1px solid #e1e7ee; background: #fbfcfd; border-radius: 5px; }
.settings-fields label:not(.toggle-field) { display: flex; flex-direction: column; gap: 7px; }
.settings-fields label.field-wide { grid-column: 1 / -1; }
.settings-fields label > span { color: #687587; font-size: 11px; font-weight: 400; line-height: 1.4; }
.settings-fields label > code { font-size: 11px; }
.settings-fields .toggle-field { display: grid; grid-template-columns: 16px minmax(0, 1fr); align-content: center; column-gap: 8px; row-gap: 6px; }
.settings-fields .toggle-field input { grid-column: 1; grid-row: 1 / span 2; margin-top: 2px; }
.settings-fields .toggle-field > span { grid-column: 2; }
.settings-fields label:not(.toggle-field) > span { margin-top: auto; }
.debug-config-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.debug-config-card { padding: 14px; border: 1px solid #dce4ec; border-radius: 4px; background: #ffffff; }
.debug-config-card h3 { margin: 0 0 12px; color: #1d2b3a; font-size: 15px; }
.debug-config-card .settings-fields { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.debug-config-card .settings-fields label { background: #fbfcfd; }
.api-doc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin-top: 16px; }
.api-doc-card { display: grid; gap: 8px; padding: 14px; border: 1px solid #dce4ec; border-radius: 4px; background: #ffffff; }
.api-doc-card h3 { margin: 0; color: #1d2b3a; font-size: 15px; }
.api-doc-card code { display: block; overflow-wrap: anywhere; border: 1px solid #e1e7ee; border-radius: 4px; background: #f6f8fb; padding: 8px; color: #2f4054; font-size: 12px; }
.api-doc-card p { margin: 0; color: #687587; font-size: 12px; line-height: 1.5; }
.settings-savebar { position: sticky; bottom: 12px; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; border: 1px solid #cbd4df; border-radius: 4px; background: #ffffff; box-shadow: 0 8px 22px #2634441c; }
.tools-page { display: grid; gap: 14px; }
.tools-settings-form { display: grid; gap: 14px; }
.tools-settings-form .settings-savebar[hidden] { display: none; }
.tool-pane { min-height: 360px; }
.tool-pane[hidden] { display: none; }
.tool-pane .runtime-actions { margin: -2px 0 18px; }
.tool-proxy-pane { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); min-height: 0; margin: 0; }
.tool-proxy-pane > .panel { min-height: 0; }
.tool-proxy-pane > .proxy-nodes-panel { display: flex; flex-direction: column; }
.tool-proxy-pane .proxy-node-list { flex: 1; min-height: 0; max-height: min(54vh, 620px); }
.tool-advanced-settings { margin-top: 18px; border-top: 1px solid #e5eaf0; }
.tool-advanced-settings summary { padding: 13px 0; color: #394556; cursor: pointer; font-size: 12px; font-weight: 700; }
.tool-advanced-settings .settings-fields { padding: 2px 0 4px; }
[data-proxy-custom-for][hidden] { display: none; }
.local-store { display: grid; gap: 14px; }
.repository-tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; }
.repository-tab { border: 1px solid #cbd4df; border-radius: 4px; background: #ffffff; color: #526174; padding: 8px 11px; font-size: 12px; font-weight: 700; }
.repository-tab:hover { border-color: #8fa0b3; background: #f5f7fa; }
.repository-tab.active { border-color: #168c83; background: #168c83; color: #ffffff; }
.repository-heading { align-items: center; }
.repository-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px; }
.repository-tools { display: flex; align-items: center; gap: 10px; }
.repository-tools .search { margin: 0; }
.bulk-actions { display: flex; align-items: center; gap: 6px; }
.bulk-actions[hidden] { display: none !important; }
.outlook-maintenance-actions { flex-wrap: wrap; justify-content: flex-end; }
.outlook-repository-heading { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; }
.outlook-repository-heading .repository-actions { width: 100%; justify-content: space-between; }
.outlook-repository-heading .outlook-maintenance-actions { order: 3; width: 100%; justify-content: flex-start; padding-top: 2px; }
.protocol-states { display: flex; flex-wrap: wrap; gap: 4px; min-width: 230px; }
.protocol-state { display: inline-flex; align-items: center; justify-content: center; min-width: 72px; height: 24px; padding: 0 6px; border: 1px solid #d5d9de; background: #f4f5f6; color: #6c737b; font-size: 11px; white-space: nowrap; }
.protocol-state.is-ok { border-color: #a7d7b8; background: #e3f4ea; color: #207441; }
.protocol-state.is-fail { border-color: #e6b8b4; background: #fff4f2; color: #9b3b34; }
.protocol-state.is-untested { border-style: dashed; color: #747d86; }
.timestamp-pair { display: grid; gap: 3px; min-width: 150px; font-size: 12px; color: #5f6871; }
.outlook-maintenance-jobs { display: grid; align-content: start; max-height: min(620px, 70vh); overflow-y: auto; padding: 0 16px 8px; border-top: 1px solid #e3e6e8; scrollbar-gutter: stable; }
.outlook-maintenance-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; border-top: 1px solid #e3e6e8; color: #49545f; font-size: 13px; font-weight: 600; }
.outlook-maintenance-jobs[hidden] { display: none; }
.maintenance-job-row { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(120px, 260px) auto; align-items: center; gap: 12px; min-height: 68px; padding: 10px 8px; border-bottom: 1px solid #e3e7ea; }
.maintenance-job-row:nth-child(even) { background: #fafbfc; }
.maintenance-job-row:last-child { border-bottom: 0; }
.maintenance-job-row.is-finished { grid-template-columns: minmax(180px, 1fr) auto; }
.maintenance-job-row > div:first-child { display: grid; gap: 3px; }
.maintenance-job-row > div:first-child strong { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.maintenance-job-row > div:first-child span { color: #69727b; font-size: 12px; }
.maintenance-job-row > div:first-child .maintenance-job-reason { max-width: 680px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #a13d35; }
.maintenance-job-badge { display: inline-flex; align-items: center; min-height: 20px; padding: 0 7px; border: 1px solid #d8dee4; border-radius: 999px; background: #f7f9fa; color: #53606b; font-size: 12px; font-weight: 600; }
.maintenance-job-progress { height: 6px; overflow: hidden; background: #e7e9eb; }
.maintenance-job-progress i { display: block; height: 100%; background: #278a52; transition: width .2s ease; }
.account-dialog { width: min(880px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 20px; border: 1px solid #d9dde0; background: #fff; color: #20252a; }
.account-dialog::backdrop { background: rgba(20, 25, 30, .45); }
.pay153-preset-dialog { width: min(420px, calc(100vw - 32px)); }
.pay153-preset-dialog .panel-heading { margin-bottom: 4px; }
.account-health-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 14px 0 20px; }
.account-health-grid > div { display: grid; gap: 4px; padding: 10px; border: 1px solid #e1e4e6; }
.account-health-grid span { color: #69727b; font-size: 12px; }
.account-history { display: grid; gap: 8px; max-height: 360px; overflow: auto; }
.account-history > div { display: grid; grid-template-columns: 150px minmax(140px, 220px) 1fr; gap: 10px; padding: 9px 0; border-bottom: 1px solid #eceeef; font-size: 13px; }
.account-history p { margin: 0; overflow-wrap: anywhere; }
.account-mail-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.account-mail-actions [data-outlook-mail-cache-meta] { margin-left: auto; font-size: 12px; }
.account-mail-compose { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 12px; margin: 0 0 16px; border: 1px solid #e1e4e6; background: #fbfcfd; }
.account-mail-compose label { display: grid; gap: 5px; margin: 0; font-size: 12px; }
.account-mail-compose .mail-compose-wide { grid-column: 1 / -1; }
.account-mail-messages { display: grid; gap: 8px; max-height: 420px; overflow: auto; }
.account-mail-message { display: grid; gap: 9px; padding: 12px; border: 1px solid #e1e4e6; background: #fbfcfd; }
.account-mail-message > summary { cursor: pointer; list-style-position: outside; color: #53606b; }
.account-mail-message > summary::marker { color: #168c83; }
.mail-message-summary { display: inline-grid; width: calc(100% - 16px); gap: 7px; vertical-align: top; }
.account-mail-message header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; font-size: 12px; color: #687587; }
.mail-message-sender, .mail-message-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 5px 8px; min-width: 0; }
.mail-message-sender { display: grid; }
.mail-message-sender strong { color: #273242; overflow-wrap: anywhere; }
.mail-message-sender span { overflow-wrap: anywhere; }
.mail-message-meta { justify-content: flex-end; }
.mail-message-badge { display: inline-flex; align-items: center; min-height: 20px; padding: 0 6px; border: 1px solid #d8dee4; background: #fff; color: #59636e; font-size: 11px; font-weight: 700; }
.mail-message-badge.unread { border-color: #9fc8be; background: #edf8f5; color: #17695f; }
.mail-message-badge.important { border-color: #e6b8b4; background: #fff4f2; color: #9b3b34; }
.mail-count-state { display: grid; gap: 4px; min-width: 72px; color: #69727b; font-size: 12px; }
.account-mail-message h4 { margin: 0; color: #1f2933; font-size: 14px; line-height: 1.4; }
.account-mail-message-body { max-height: 340px; padding-top: 10px; border-top: 1px solid #e6e9ec; overflow: auto; color: #3f4a55; font-size: 13px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.maintenance-job-detail { display: grid; gap: 8px; padding: 12px 0; border-bottom: 1px solid #eceeef; }
.maintenance-job-detail > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.maintenance-job-detail p { margin: 0; color: #a13d35; overflow-wrap: anywhere; }
.maintenance-job-detail ul { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; color: #59636e; font-size: 12px; }
.maintenance-job-detail li { padding-left: 12px; position: relative; overflow-wrap: anywhere; }
.maintenance-job-detail li::before { content: ""; position: absolute; left: 0; top: .65em; width: 4px; height: 4px; border-radius: 50%; background: #9aa4ad; }
.maintenance-job-detail pre { max-height: 320px; margin: 0; padding: 12px; overflow: auto; background: #171b1f; color: #e8ecef; font: 12px/1.55 Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.selection-column { width: 34px; padding-right: 4px; text-align: center; }
.selection-column input[type="checkbox"] { display: block; margin: 0 auto; }
.page-size { display: flex; width: auto; align-items: center; gap: 6px; color: #687587; font-size: 12px; white-space: nowrap; }
.page-size select { width: 78px; padding: 7px 8px; }
.repository-pagination { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 12px; padding-top: 12px; border-top: 1px solid #e5eaf0; }
.button:disabled { cursor: not-allowed; color: #9ca8b9; border-color: #e1e7ee; background: #f5f7fa; }
.form-actions { display: flex; justify-content: flex-end; padding-top: 2px; }
.button { border: 1px solid #c7d1dc; padding: 8px 12px; border-radius: 4px; background: #ffffff; color: #273242; font-weight: 700; font-size: 13px; }
.button:hover { border-color: #8fa0b3; background: #f5f7fa; }
.button.primary { background: #168c83; border-color: #168c83; color: #ffffff; }
.button.primary:hover { background: #0d756d; border-color: #0d756d; }
.button.subtle { background: #f7f9fb; }
.button.danger { color: #a53232; border-color: #e7c7c7; }
.button.small { padding: 5px 8px; font-size: 12px; }
.config-save-float { position: fixed; right: 24px; bottom: 24px; z-index: 120; min-width: 104px; box-shadow: 0 7px 18px rgba(23, 29, 39, .18); }
.config-save-float.button:not(.primary) { background: #168c83; border-color: #168c83; color: #ffffff; }
.config-save-float.button:not(.primary):hover { background: #0d756d; border-color: #0d756d; }
@media (max-width: 640px) { .config-save-float { right: 16px; bottom: 16px; min-width: 96px; } }

.log-panel { display: flex; flex-direction: column; }
.log-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.overview-log { margin-bottom: 14px; }
.overview-log .event-log { min-height: 280px; max-height: 440px; }
.event-log { min-height: 238px; max-height: 320px; overflow: auto; background: #171d27; border: 1px solid #273242; border-radius: 4px; padding: 10px; }
.event-log .empty-state { color: #aab6c6; }
.event { display: grid; grid-template-columns: 148px 64px minmax(0, 1fr); gap: 8px; padding: 7px 4px; color: #d6deea; border-bottom: 1px solid #293444; font-family: Consolas, "Courier New", monospace; font-size: 12px; line-height: 1.45; }
.event:last-child { border-bottom: 0; }
.event-task { color: #ffffff; font-weight: 700; }
.event-time { color: #8f9eb2; }
.event-level { color: #64d4c7; text-transform: uppercase; }
.event-message { min-width: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.event.warning .event-level { color: #f5ca70; }
.event.error .event-level { color: #ff8d8d; }
.runtime-event { grid-template-columns: 148px minmax(92px, 116px) minmax(0, 1fr); align-items: start; padding: 8px 7px; border-left: 3px solid transparent; }
.runtime-event .event-level { display: inline-flex; align-items: center; width: fit-content; min-height: 18px; padding: 1px 6px; border: 1px solid #315c64; border-radius: 3px; color: #7cdbd0; background: #1c303a; font-family: system-ui, sans-serif; font-size: 11px; font-weight: 700; letter-spacing: 0; text-transform: none; }
.runtime-event .event-message { color: #e3e9f1; font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.runtime-event.warning { border-left-color: #c99236; background: #2b261b; }
.runtime-event.warning .event-level { border-color: #6d572a; color: #f5ca70; background: #372e1c; }
.runtime-event.error { border-left-color: #b65656; background: #302025; }
.runtime-event.error .event-level { border-color: #704143; color: #ff9b9b; background: #3b242a; }
.artifact-list { display: grid; gap: 6px; padding-top: 12px; }
.artifact-item { display: grid; gap: 2px; padding: 8px 9px; border: 1px solid #e1e7ee; border-radius: 4px; }
.artifact-item strong { font-size: 12px; text-transform: uppercase; color: #496172; }
.artifact-item span { overflow: hidden; color: #687587; font-family: Consolas, "Courier New", monospace; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.result-json { min-height: 96px; max-height: 220px; overflow: auto; margin: 12px 0 0; padding: 10px; background: #f7f9fb; border: 1px solid #e1e7ee; border-radius: 4px; color: #344153; font-family: Consolas, "Courier New", monospace; font-size: 11px; line-height: 1.45; white-space: pre-wrap; }

.hme-workspace { display: grid; gap: 14px; }
.pay153-workspace { display: grid; gap: 14px; }
.pay153-native-pane [hidden] { display: none !important; }
.pay153-native-tabs, .pay153-choice-group, .pay153-option-row, .pay153-batch-import, .pay153-native-status > div, .pay153-native-status .pay153-progress { display: flex; align-items: center; gap: 8px; }
.pay153-native-options { display: grid; gap: 12px; padding: 14px 20px; }
.pay153-option-row > span { width: 78px; flex: 0 0 auto; color: #687587; font-size: 12px; font-weight: 700; }
.pay153-choice-group { flex-wrap: wrap; }
.pay153-choice-group .button { min-width: 68px; }
.pay153-native-pane { min-width: 0; }
.pay153-inline-check { display: inline-flex !important; grid-template-columns: auto 1fr; align-items: center; gap: 8px; color: #394556; font-size: 13px !important; }
.pay153-inline-check input[type="checkbox"] { appearance: auto; -webkit-appearance: checkbox; box-sizing: border-box; width: 16px !important; min-width: 16px; height: 16px; min-height: 16px; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; accent-color: #168c83; }
.pay153-native-status { display: grid; gap: 9px; padding: 13px; border: 1px solid #dce2ea; border-radius: 4px; background: #f8fafc; }
.pay153-token-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pay153-token-heading b { color: #394556; font-size: 12px; }
.pay153-token-heading .button { flex: 0 0 auto; }
.pay153-token-heading-actions { display: inline-flex; align-items: center; justify-content: flex-end; gap: 8px; flex: 0 0 auto; }
.pay153-token-actions { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.pay153-preflight-result { display: grid; gap: 10px; margin-top: 10px; padding: 12px; border: 1px solid #d9e5ea; border-radius: 4px; background: #f7fbfa; }
.pay153-preflight-result textarea { min-height: 72px; font-family: Consolas, "Courier New", monospace; font-size: 11px; }
.badge.success { color: #207441; background: #e3f4ea; }
.badge.danger { color: #a53232; background: #fdecec; }
.pay153-promo-campaign-field, .pay153-promo-toggle { margin-top: 2px; }
.pay153-native-status > div { justify-content: space-between; color: #687587; font-size: 12px; }
.pay153-native-status b { color: #253344; }
.pay153-progress { height: 8px; overflow: hidden; border-radius: 3px; background: #dce5eb; }
.pay153-progress i { display: block; width: 0; height: 100%; background: #168c83; transition: width .2s ease; }
.pay153-native-status pre { max-height: 180px; overflow: auto; margin: 0; padding-top: 9px; border-top: 1px solid #e1e7ee; color: #536276; font: 11px/1.5 Consolas, "Courier New", monospace; white-space: pre-wrap; }
.pay153-batch-import { display: grid; grid-template-columns: minmax(0, 1fr) minmax(210px, 260px); align-items: stretch; gap: 12px; margin-bottom: 14px; }
.pay153-batch-import-actions { display: flex; min-width: 0; flex-direction: column; align-items: stretch; justify-content: space-between; gap: 10px; }
.pay153-batch-import-actions .button { align-self: stretch; }
.pay153-batch-import-actions input[type="file"] { min-width: 0; max-width: 100%; font-size: 12px; }
.pay153-batch-import label, .pay153-batch-config label { display: grid; gap: 6px; color: #394556; font-size: 12px; font-weight: 700; }
.pay153-batch-config { margin-top: 16px; padding-top: 16px; border-top: 1px solid #e5eaf0; }
.pay153-batch-config .pay153-config-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.pay153-batch-config textarea { min-height: 96px; }
.pay153-batch-config .pay153-inline-check { display: inline-flex; }
.pay153-batch-row-actions { display: flex; align-items: center; gap: 8px; }
.pay153-batch-row-actions .button { flex: 0 0 auto; }
.pay153-batch-actions-head { width: 96px; }
.pay153-batch-actions-head,
.pay153-batch-actions-cell { white-space: nowrap; }
.pay153-batch-actions-head { display: flex; align-items: center; gap: 8px; }
.pay153-batch-actions-cell { display: flex; align-items: center; gap: 8px; min-height: 38px; }
.pay153-batch-actions-cell input { flex: 0 0 auto; }
.pay153-batch-actions-cell .button { flex: 0 0 auto; min-width: 44px; padding-inline: 8px; }
.pay153-batch-detail-row > td { padding: 0 8px 12px; background: #f4f7fa; }
.pay153-batch-detail { display: grid; gap: 10px; padding: 12px; border: 1px solid #d9e5ea; border-top: 0; background: #f8fbfc; }
.pay153-batch-detail-empty { color: #718094; font-size: 12px; }
.pay153-batch-detail-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.pay153-batch-detail-grid div { display: grid; gap: 4px; min-width: 0; }
.pay153-batch-detail-grid span { color: #718094; font-size: 11px; }
.pay153-batch-detail-grid b { overflow: hidden; color: #253344; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.pay153-batch-detail-json { margin: 0; max-height: 180px; overflow: auto; padding: 10px; border: 1px solid #e1e7ee; border-radius: 4px; background: #fff; color: #536276; font: 11px/1.5 Consolas, "Courier New", monospace; white-space: pre-wrap; }
.pay153-batch-table { width: 100%; table-layout: fixed; }
.pay153-batch-col-actions { width: 9%; }
.pay153-batch-col-account { width: 20%; }
.pay153-batch-col-eligibility { width: 9%; }
.pay153-batch-col-expiry { width: 7%; }
.pay153-batch-col-status { width: 8%; }
.pay153-batch-col-result { width: 35%; }
.pay153-batch-col-updated { width: 12%; }
.pay153-account-cell { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; min-width: 0; max-width: 200px; }
.pay153-account-cell strong { min-width: 0; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pay153-account-cell + small { display: block; max-width: 200px; overflow: hidden; color: #7a8797; text-overflow: ellipsis; white-space: nowrap; }
.pay153-batch-badge-cell { min-width: 72px; white-space: nowrap; }
.pay153-batch-status-cell { min-width: 74px; color: #536276; font: 11px Consolas, "Courier New", monospace; white-space: nowrap; }
.pay153-batch-status-cell .status { min-width: 72px; font-family: inherit; text-transform: none; }
.status.ready { background: #f1f4f6; color: #647386; }
.pay153-batch-result { min-width: 0; max-width: none; color: #607084; font: 11px Consolas, "Courier New", monospace; overflow-wrap: anywhere; white-space: normal; }
.pay153-batch-summary { display: block; max-width: none; overflow-wrap: anywhere; white-space: normal; }
.pay153-batch-result-actions { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.pay153-batch-open-result,
.pay153-batch-copy-result { padding: 4px 8px; }
.pay153-batch-result small { display: block; margin-top: 4px; color: #7a8797; font-size: 10px; line-height: 1.35; }
.pay153-batch-detail-section { display: grid; gap: 8px; }
.pay153-batch-detail-section h4 { margin: 0; color: #496172; font-size: 12px; }
.pay153-batch-table-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 14px 0 8px; color: #536276; font-size: 12px; }
.pay153-batch-selection-actions { display: flex; align-items: end; flex-wrap: wrap; gap: 8px; }
.pay153-batch-selection-actions label { display: grid; gap: 4px; color: #687587; font-size: 11px; font-weight: 700; }
.pay153-batch-selection-actions input { width: 68px; height: 30px; padding: 5px 7px; }
@media (max-width: 780px) { .pay153-option-row { align-items: flex-start; flex-direction: column; gap: 6px; } .pay153-batch-import { grid-template-columns: 1fr; } .pay153-batch-import .button { width: 100%; } .pay153-batch-config .pay153-config-grid { grid-template-columns: 1fr; } .pay153-batch-table { min-width: 820px; } }
.hme-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.hme-config-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid { display: grid; gap: 11px; }
.form-grid label { display: grid; gap: 6px; color: #394556; font-size: 12px; font-weight: 700; }
.form-grid input, .form-grid select, .form-grid textarea, .inline-form input, .inline-form select { width: 100%; min-width: 0; height: 34px; border: 1px solid #cfd9e4; border-radius: 3px; padding: 6px 8px; background: #ffffff; color: #263546; font: inherit; font-size: 13px; }
.form-grid textarea { height: auto; min-height: 68px; resize: vertical; }
.form-grid label.pay153-inline-check, .pay153-batch-config label.pay153-inline-check { display: inline-flex !important; align-items: center; justify-self: start; width: auto; gap: 8px; padding: 7px 0; color: #394556; font-size: 12px; font-weight: 700; }
.form-grid label.pay153-inline-check input, .pay153-batch-config label.pay153-inline-check input { flex: 0 0 auto; width: 15px; margin: 0; }
.pay153-batch-config > label { min-width: 0; }
.pay153-batch-config > label > span { color: #718094; font-size: 11px; font-weight: 400; }
.pay153-batch-config textarea { min-height: 76px; }
.pay153-field-note { margin: -4px 0 0; color: #718094; font-size: 11px; line-height: 1.45; }
.pay153-proxy-section { display: grid; gap: 10px; padding: 14px; border: 1px solid #e1e7ee; border-radius: 5px; background: #fbfcfd; }
.pay153-preset-toolbar { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid #e1e7ee; }
.pay153-preset-toolbar label { display: grid; flex: 1; gap: 5px; color: #394556; font-size: 12px; font-weight: 700; }
.pay153-preset-toolbar select { width: 100%; height: 32px; border: 1px solid #cfd9e4; border-radius: 3px; padding: 4px 7px; background: #fff; color: #263546; font: inherit; font-size: 12px; }
.pay153-subheading, .pay153-proxy-actions, .pay153-log-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pay153-subheading { color: #344153; font-size: 13px; }
.pay153-subheading > div { display: grid; gap: 3px; }
.pay153-proxy-recommendation { color: #718094; font-size: 11px; font-weight: 400; }
.pay153-proxy-grid.single-pool { grid-template-columns: minmax(0, 1fr); }
.pay153-proxy-grid,
.pay153-batch-config .pay153-proxy-grid { display: grid; grid-template-columns: minmax(0, 1fr); }
.pay153-proxy-actions { justify-content: flex-start; }
.pay153-proxy-actions .pay153-inline-check { margin-right: auto; }
.pay153-check-proxy { flex: 0 0 auto; }
.pay153-proxy-check-status { color: #718094; font-size: 11px; white-space: nowrap; }
.pay153-proxy-check-status.ok { color: #168c83; }
.pay153-proxy-check-status.failed { color: #b33b3b; }
.pay153-full-field { grid-column: 1 / -1; }
.pay153-native-result { display: grid; gap: 12px; padding: 14px; border: 1px solid #c7d8d6; border-radius: 5px; background: #f4fbfa; }
.pay153-result-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.pay153-result-grid div { display: grid; gap: 4px; min-width: 0; }
.pay153-result-grid span { color: #718094; font-size: 11px; }
.pay153-result-grid b { overflow: hidden; color: #253344; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.pay153-native-result .form-actions { justify-content: flex-start; gap: 8px; }
.pay153-native-result textarea { min-height: 56px; font-family: Consolas, "Courier New", monospace; font-size: 11px; }
.pay153-result-qr { display: grid; place-items: center; min-height: 150px; padding: 10px; border: 1px solid #e1e7ee; border-radius: 4px; background: #fff; }
.pay153-result-qr img { width: min(220px, 100%); max-height: 220px; object-fit: contain; }
.pay153-batch-result code { color: #536276; font: 10px Consolas, "Courier New", monospace; }
.pay153-batch-log { display: grid; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid #e5eaf0; }
.pay153-batch-log pre { min-height: 58px; max-height: 180px; overflow: auto; margin: 0; padding: 10px; border: 1px solid #e1e7ee; border-radius: 4px; background: #f8fafc; color: #536276; font: 11px/1.5 Consolas, "Courier New", monospace; white-space: pre-wrap; }
.pay153-batch-heading-actions { display: flex; align-items: end; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.pay153-batch-heading-actions label { display: grid; gap: 4px; color: #687587; font-size: 11px; font-weight: 700; }
.pay153-batch-heading-actions input { width: 68px; height: 30px; padding: 5px 7px; }
.inline-form { display: grid; grid-template-columns: minmax(170px, .8fr) minmax(210px, 1fr) minmax(130px, .7fr) auto; gap: 8px; margin: 0 0 12px; padding: 10px; border: 1px solid #e1e7ee; border-radius: 4px; background: #f8fafc; }
.compact-list { display: grid; gap: 7px; margin-top: 13px; }
.hme-provider-status { margin-top: 15px; }
.hme-session-editor { margin-top: 12px; padding-top: 12px; border-top: 1px solid #e5eaf0; }
.compact-list-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 9px; padding: 8px 9px; border-top: 1px solid #e5eaf0; color: #687587; font-size: 12px; }
.compact-list-item:first-child { border-top: 0; }
.compact-list-item strong { color: #344153; }
.compact-list-item small { grid-column: 1 / -1; color: #a53232; }
.message-list { display: grid; gap: 8px; min-height: 110px; }
.message-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px 12px; padding: 11px; border: 1px solid #e1e7ee; border-radius: 4px; background: #fbfcfd; }
.message-item strong, .message-item span { display: block; }
.message-item span, .message-item small { color: #718094; font-size: 12px; }
.message-item code { align-self: start; padding: 4px 6px; border: 1px solid #c7d8d6; border-radius: 3px; color: #126e67; background: #edf8f6; font-weight: 700; }
.message-item p { grid-column: 1 / -1; margin: 0; color: #4c5a6a; font-size: 13px; line-height: 1.45; white-space: pre-wrap; }
.message-item small { grid-column: 1 / -1; }

.table-panel { padding-bottom: 10px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }

.task-detail-row > td { padding: 0 0 12px; background: #f4f7fa; }
.task-inline-detail { display: grid; gap: 12px; padding: 16px; border: 1px solid #d7e1ea; border-top: 0; background: #f8fafc; }
.task-inline-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.task-inline-heading h3, .task-inline-detail h4 { margin: 0; }
.task-inline-heading h3 { font-size: 16px; }
.task-inline-detail h4 { padding-bottom: 7px; color: #496172; font-size: 12px; }
.task-inline-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(220px, 0.6fr); gap: 14px; }
.task-inline-log { min-height: 130px; max-height: 260px; }
.task-inline-artifacts { min-height: 130px; max-height: 260px; overflow: auto; padding-top: 0; }
.task-inline-result { min-height: 80px; max-height: 200px; margin-top: 0; }
th { color: #697687; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; }
th, td { padding: 11px 8px; border-bottom: 1px solid #e5eaf0; vertical-align: middle; }
td { color: #384454; font-size: 13px; }
tbody tr:last-child td { border-bottom: 0; }
.mini-table td { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-name { color: #171d27; font-weight: 700; }
.task-plugin { color: #6d798a; font-size: 12px; }
.actions { display: flex; justify-content: flex-end; gap: 6px; }
.empty-cell, .empty-state { color: #718094; font-size: 13px; }
.status { display: inline-flex; min-width: 70px; justify-content: center; padding: 4px 7px; border-radius: 4px; font-size: 11px; font-weight: 700; text-transform: capitalize; }
.status.queued { background: #eceef7; color: #57628b; }
.status.running { background: #e1f1fa; color: #176d99; }
.status.succeeded, .status.synced, .status.ok { background: #e3f4ea; color: #207441; }
.status.failed, .status.error { background: #fbe7e7; color: #ae3434; }
.status.cancelled, .status.used { background: #f1f1f1; color: #697586; }
.status.imported, .status.registered { background: #fff4d7; color: #86630e; }
.profile-grid { grid-template-columns: minmax(320px, .8fr) minmax(380px, 1.2fr); }
.profile-list, .secret-list { display: grid; gap: 8px; }
.profile-item, .secret-item { padding: 11px; border: 1px solid #e1e7ee; border-radius: 4px; }
.profile-item strong, .secret-item strong { display: block; margin-bottom: 3px; overflow-wrap: anywhere; }
.profile-item span, .secret-item span { color: #677488; font-size: 12px; overflow-wrap: anywhere; }
.toast { position: fixed; right: 22px; bottom: 78px; z-index: 130; max-width: min(360px, calc(100vw - 32px)); opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .2s, transform .2s; background: #171d27; color: #ffffff; padding: 10px 13px; border-radius: 4px; font-size: 13px; }
.toast.visible { opacity: 1; transform: translateY(0); }

.login-body { min-height: 100vh; background: #edf1f5; color: #171d27; }
.login-shell { min-height: 100vh; display: grid; grid-template-columns: 232px minmax(0, 1fr); }
.login-sidebar { position: relative; height: auto; min-height: 100vh; overflow: hidden; }
.login-sidebar-copy { display: grid; gap: 12px; margin-top: 30px; padding: 0 8px; }
.login-sidebar-copy h1 { max-width: 150px; color: #ffffff; font-size: 24px; line-height: 1.15; }
.login-sidebar-copy p:not(.eyebrow) { margin: 0; color: #aeb9c9; font-size: 13px; line-height: 1.55; }
.login-main { display: grid; place-items: center; min-width: 0; padding: 34px; background: linear-gradient(135deg, #f7f9fb 0%, #edf1f5 62%, #e7eef3 100%); }
.login-panel { width: min(430px, 100%); padding: 28px; border-color: #d5dde7; box-shadow: 0 18px 42px #2634441c; }
.login-panel h1 { margin-bottom: 8px; font-size: 25px; }
.login-help { margin: 0 0 20px; color: #687587; font-size: 13px; line-height: 1.5; }
.login-panel .error { margin: 0 0 14px; padding: 10px 12px; color: #a53232; background: #fff4f4; border: 1px solid #e7c7c7; border-radius: 4px; font-size: 13px; }
.login-panel form { gap: 15px; }
.login-panel input { min-height: 42px; }
.login-button { width: 100%; justify-content: center; padding: 11px 12px; }

@media (max-width: 760px) {
  .maintenance-job-row { grid-template-columns: 1fr; }
  .account-health-grid { grid-template-columns: 1fr 1fr; }
  .account-history > div { grid-template-columns: 1fr; gap: 3px; }
  .login-shell { grid-template-columns: 1fr; }
  .login-sidebar { min-height: auto; padding: 18px 16px; }
  .login-sidebar .brand { padding-bottom: 0; }
  .login-sidebar-copy { display: none; }
  .login-sidebar .sidebar-footer { display: none; }
  .login-main { padding: 22px 16px; align-items: start; }
}

/* Workspace pages keep the application frame fixed and scroll only their data surface. */
.content[data-active-page="proxy"],
.content[data-active-page="digitalplat-config"],
.content[data-active-page="outlook"],
.content[data-active-page="local-store"] {
  width: 100%;
  max-width: none;
  height: 100vh;
  margin: 0;
  overflow: hidden;
}

.content[data-active-page="proxy"] > #proxy,
.content[data-active-page="digitalplat-config"] > #digitalplat-config,
.content[data-active-page="local-store"] > #local-store,
.content[data-active-page="outlook"] > #outlook,
.content[data-active-page="outlook"] > .log-panel[data-page="outlook"] {
  min-height: 0;
  margin: 0;
}

.content[data-active-page="proxy"] {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  gap: 0;
}

.content[data-active-page="proxy"] > #proxy {
  height: 100%;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
}

.content[data-active-page="proxy"] > #proxy > .panel {
  min-height: 0;
  overflow: hidden;
}

.content[data-active-page="proxy"] > #proxy > .proxy-nodes-panel {
  display: flex;
  flex-direction: column;
}

.content[data-active-page="proxy"] > #proxy > .proxy-control-panel {
  overflow: auto;
}

.proxy-config-tabs { margin: 0 0 12px; }
.proxy-config-form { display: grid; gap: 12px; min-height: 0; }
.proxy-config-pane { display: flex; min-height: 0; flex-direction: column; gap: 12px; }
.proxy-config-pane[hidden] { display: none; }
.proxy-table-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.proxy-table-heading h3, .proxy-table-heading h4 { margin: 0; color: #1d2b3a; font-size: 14px; }
.proxy-table-heading .field-help { min-height: 0; margin: 4px 0 0; }
.proxy-config-table-wrap { min-height: 0; overflow: auto; border: 1px solid #e0e7ee; border-radius: 4px; }
.proxy-config-table { min-width: 840px; }
.proxy-config-table th { position: sticky; top: 0; z-index: 1; background: #f8fafc; }
.proxy-config-table th, .proxy-config-table td { padding: 7px 8px; }
.proxy-config-table input:not([type="checkbox"]) { width: 100%; min-width: 0; height: 32px; padding: 6px 8px; border: 1px solid #cfd9e4; border-radius: 3px; background: #ffffff; color: #263546; font: inherit; font-size: 12px; }
.proxy-config-table input:not([type="checkbox"]):focus { border-color: #168c83; outline: 2px solid rgba(22, 140, 131, .14); }
.proxy-config-table .boolean-cell { width: 74px; text-align: center; }
.proxy-config-table .boolean-cell input { width: 15px; height: 15px; accent-color: #168c83; }
.proxy-config-table .table-action-column { width: 52px; text-align: center; }
.proxy-config-table .row-index { width: 48px; color: #718094; text-align: center; }
.icon-button { display: inline-grid; width: 28px; height: 28px; place-items: center; border: 1px solid #d4dde7; border-radius: 3px; background: #ffffff; color: #657386; font-size: 18px; line-height: 1; }
.icon-button:hover { border-color: #aebccc; background: #f6f8fb; }
.icon-button.danger { color: #a53232; border-color: #e7c7c7; }
.proxy-config-savebar { display: flex; justify-content: flex-end; padding: 12px 0 0; }
.proxy-settings-sources { margin-top: 24px; padding-top: 22px; border-top: 1px solid #dce4ec; }
.proxy-settings-sources > .panel-heading { margin-bottom: 14px; }
.proxy-settings-sources h3 { margin: 0; color: #1d2b3a; font-size: 15px; }
.proxy-settings-sources .proxy-config-table-wrap { max-height: min(52vh, 640px); }

.content[data-active-page="proxy"] .proxy-node-list {
  flex: 1;
  min-height: 0;
  max-height: none;
}

.content[data-active-page="digitalplat-config"] {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  gap: 0;
}

.content[data-active-page="digitalplat-config"] > #digitalplat-config {
  height: 100%;
  grid-template-rows: auto auto minmax(0, 1fr);
}

.content[data-active-page="digitalplat-config"] #digitalplat-settings-form {
  min-height: 0;
  grid-template-rows: minmax(0, 1fr) auto;
  overflow: hidden;
}

.content[data-active-page="digitalplat-config"] .settings-pane {
  min-height: 0;
  overflow: auto;
}

.content[data-active-page="digitalplat-config"] .settings-savebar {
  position: static;
  margin: 0;
}

.content[data-active-page="outlook"] {
  display: grid;
  grid-template-rows: minmax(290px, .92fr) minmax(280px, 1.08fr);
  gap: 14px;
}

.content[data-active-page="outlook"] > #outlook {
  height: 100%;
}

.content[data-active-page="outlook"] > #outlook > .panel {
  min-height: 0;
  overflow: auto;
}

.content[data-active-page="outlook"] > #outlook {
  grid-template-columns: minmax(280px, .55fr) minmax(520px, 1.45fr);
}

.outlook-config-form { gap: 0; }
.outlook-config-section { display: grid; gap: 12px; padding: 16px 0; border-top: 1px solid #e5eaf0; }
.outlook-config-section:first-child { padding-top: 0; border-top: 0; }
.outlook-config-section-heading h3 { margin: 0; color: #263546; font-size: 13px; }
.outlook-field-grid, .outlook-protocol-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; align-items: stretch; }
.outlook-field-grid label, .outlook-protocol-fields label { min-width: 0; min-height: 94px; height: 100%; padding: 12px; border: 1px solid #e1e7ee; border-radius: 5px; background: #fbfcfd; }
.outlook-field-grid label:not(.outlook-toggle-field), .outlook-protocol-fields label:not(.outlook-toggle-field) { display: flex; flex-direction: column; gap: 7px; }
.outlook-field-grid label > span { color: #687587; font-size: 11px; font-weight: 400; line-height: 1.4; }
.outlook-field-wide { grid-column: 1 / -1; }
.outlook-field-grid label:not(.outlook-toggle-field) > span,
.outlook-protocol-fields label:not(.outlook-toggle-field) > span { margin-top: auto; }
.outlook-toggle-field { display: flex !important; align-items: center; align-self: stretch; min-height: 94px; gap: 8px; padding-bottom: 12px; }
.outlook-toggle-field input { flex: 0 0 auto; }
.outlook-toggle-row { display: flex; flex-wrap: wrap; gap: 10px 18px; }
.outlook-toggle-row label { display: inline-flex; align-items: center; gap: 7px; color: #394556; font-size: 12px; font-weight: 700; }
.outlook-protocol-settings { margin-top: 16px; border-top: 1px solid #e5eaf0; border-bottom: 1px solid #e5eaf0; }
.outlook-protocol-settings summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 0; color: #394556; cursor: pointer; font-size: 13px; font-weight: 700; }
.outlook-protocol-settings summary::marker { color: #718094; }
.outlook-protocol-settings summary small { color: #a06e18; background: #fff3d7; padding: 3px 6px; border-radius: 3px; font-size: 10px; font-weight: 700; }
.outlook-protocol-settings[open] summary { border-bottom: 1px solid #e5eaf0; }
.outlook-protocol-fields { padding: 14px 0; }
.outlook-config-form .form-actions { padding-top: 16px; }

.content[data-active-page="outlook"] > .log-panel[data-page="outlook"] {
  display: flex;
  min-height: 0;
}

.content[data-active-page="outlook"] > .log-panel[data-page="outlook"] .event-log {
  flex: 1;
  min-height: 0;
  max-height: none;
}

.content[data-active-page="local-store"] {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  gap: 0;
}

.content[data-active-page="local-store"] > #local-store {
  height: 100%;
  grid-template-rows: auto auto minmax(0, 1fr);
}

.content[data-active-page="local-store"] .table-panel[data-local-store-pane] {
  display: grid;
  min-height: 0;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
}

.content[data-active-page="local-store"] .table-panel[data-local-store-pane][hidden] { display: none; }

.content[data-active-page="local-store"] .table-panel[data-local-store-pane] .table-wrap {
  min-height: 0;
  overflow: auto;
}

.content[data-active-page="local-store"] .table-panel[data-local-store-pane] th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #ffffff;
}

@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: static; height: auto; min-height: auto; overflow-y: visible; padding: 16px 18px; }
  .brand { padding-bottom: 12px; }
  .sidebar nav { grid-template-columns: repeat(5, minmax(0, 1fr)); min-width: 0; }
  .nav-link { min-width: 0; overflow-wrap: anywhere; text-align: center; padding: 9px 6px; }
  .sidebar-footer { display: none; }
  .content { padding: 24px 18px 40px; }
  .content[data-active-page="proxy"],
  .content[data-active-page="digitalplat-config"],
  .content[data-active-page="outlook"],
  .content[data-active-page="local-store"] {
    display: block;
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }
  .content[data-active-page="proxy"] > #proxy,
  .content[data-active-page="digitalplat-config"] > #digitalplat-config,
  .content[data-active-page="local-store"] > #local-store,
  .content[data-active-page="outlook"] > #outlook {
    height: auto;
  }
  .content[data-active-page="proxy"] > #proxy > .panel,
  .content[data-active-page="outlook"] > #outlook > .panel,
  .content[data-active-page="digitalplat-config"] .settings-pane {
    overflow: visible;
  }
  .content[data-active-page="proxy"] .proxy-node-list { max-height: min(58vh, 680px); }
  .tool-proxy-pane .proxy-node-list { max-height: min(58vh, 680px); }
  .proxy-config-form { overflow: visible; }
  .proxy-config-table-wrap { max-height: 52vh; }
  .content[data-active-page="outlook"] > .log-panel[data-page="outlook"] .event-log { max-height: 52vh; }
  .content[data-active-page="digitalplat-config"] #digitalplat-settings-form { overflow: visible; }
  .content[data-active-page="local-store"] .table-panel[data-local-store-pane] { display: block; overflow: visible; }
  .content[data-active-page="local-store"] .table-panel[data-local-store-pane] .table-wrap { max-height: 58vh; overflow: auto; }
  .workspace-grid, .profile-grid, .data-grid { grid-template-columns: minmax(0, 1fr); }
  .hme-config-grid, .hme-metrics { grid-template-columns: minmax(0, 1fr); }
  .inline-form { grid-template-columns: minmax(0, 1fr); }
  .content[data-active-page="outlook"] > #outlook { grid-template-columns: minmax(0, 1fr); }
  .migration-layout { grid-template-columns: minmax(0, 1fr); }
  .migration-guide { border-right: 0; border-bottom: 1px solid #e5eaf0; }
  .overview-runtime-grid { grid-template-columns: minmax(0, 1fr); }
  .topbar { align-items: flex-start; }
}

@media (max-width: 520px) {
  .topbar { flex-direction: column; }
  .topbar .button { width: 100%; }
  .metric-grid { gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric { min-height: 82px; padding: 13px; }
  .metric strong { font-size: 25px; }
  .panel { padding: 15px; }
  .panel-heading { flex-direction: column; }
  .settings-page-heading { flex-direction: column; }
  .config-api-doc { margin-left: 0; }
  .overview-heading { flex-direction: column; }
  .maintenance-heading { flex-direction: column; }
  .settings-savebar { bottom: 8px; }
  .tools-settings-form .settings-savebar { position: static; }
  .migration-card-heading { align-items: flex-start; }
  .migration-field-grid, .migration-footer, .migration-checkbox-grid { grid-template-columns: minmax(0, 1fr); }
  .section-title-row, .migration-result-card { flex-direction: column; align-items: stretch; }
  .migration-footer .form-actions, .migration-footer .button { width: 100%; }
  .repository-heading { align-items: flex-start; }
  .repository-actions, .repository-tools { width: 100%; }
  .repository-tools .search { flex: 1; }
  .search { max-width: none; }
  .inline-fields { grid-template-columns: minmax(0, 1fr); }
  .toggle-row { grid-template-columns: minmax(0, 1fr); }
  .outlook-field-grid, .outlook-protocol-fields { grid-template-columns: minmax(0, 1fr); }
  .outlook-field-wide { grid-column: auto; }
  .outlook-toggle-row { align-items: flex-start; flex-direction: column; gap: 9px; }
  .event { grid-template-columns: 1fr; gap: 2px; }
  .actions { justify-content: flex-start; }
  .repository-actions, .repository-tools, .repository-pagination { align-items: stretch; flex-direction: column; }
  .bulk-actions { justify-content: flex-end; }
  .page-size { justify-content: space-between; }
  .page-size select { width: 100%; }
}
.status-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
