:root {
  color-scheme: light;
  --navy-950: #03162e;
  --navy-900: #062142;
  --navy-800: #0c315c;
  --ink: #0a1d3a;
  --muted: #66758d;
  --line: #dfe6ef;
  --surface: #ffffff;
  --canvas: #f4f7fb;
  --blue: #0967f2;
  --blue-600: #0759da;
  --blue-soft: #eaf2ff;
  --green: #13a538;
  --green-soft: #eaf8ed;
  --amber: #e99313;
  --amber-soft: #fff6e4;
  --red: #dc3545;
  --red-soft: #fff0f1;
  --shadow: 0 8px 28px rgba(19, 42, 76, .07);
  --radius: 14px;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--canvas); }
body { margin: 0; min-height: 100vh; color: var(--ink); background: var(--canvas); font-family: Inter, "Segoe UI", Arial, sans-serif; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
button { color: inherit; }
.app-shell.is-locked { height: 100vh; overflow: hidden; visibility: hidden; }
.login-screen { position: fixed; inset: 0; z-index: 100; display: grid; grid-template-columns: minmax(360px, .9fr) minmax(480px, 1.1fr); min-height: 100vh; background: #fff; }
.login-screen.hidden { display: none; }
.login-visual { position: relative; display: flex; flex-direction: column; overflow: hidden; padding: 46px 55px; color: #fff; background: radial-gradient(circle at 20% 15%, rgba(20,120,255,.35), transparent 33%), radial-gradient(circle at 85% 82%, rgba(4,98,224,.24), transparent 34%), linear-gradient(150deg, #082a55, #03162e 72%); }
.login-visual::before, .login-visual::after { content: ""; position: absolute; border: 1px solid rgba(101,173,255,.12); border-radius: 50%; }
.login-visual::before { width: 420px; height: 420px; right: -235px; top: 14%; }
.login-visual::after { width: 620px; height: 620px; right: -330px; top: 4%; }
.login-glow { position: absolute; width: 170px; height: 170px; right: 13%; top: 30%; border-radius: 50%; background: #0870f8; filter: blur(90px); opacity: .17; }
.login-brand { position: relative; z-index: 1; display: flex; align-items: center; gap: 13px; font-size: 23px; font-weight: 750; letter-spacing: -.4px; }
.login-brand svg { width: 43px; height: 43px; fill: none; stroke: #2488ff; stroke-width: 2.8; stroke-linecap: round; }
.login-message { position: relative; z-index: 1; max-width: 470px; margin: auto 0; }
.login-message > span { color: #62a8fa; font-size: 11px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.login-message h2 { max-width: 440px; margin-top: 15px; color: #fff; font-size: clamp(34px, 4.1vw, 55px); line-height: 1.06; letter-spacing: -1.8px; }
.login-message p { max-width: 380px; margin: 22px 0 0; color: #9db4cf; font-size: 14px; line-height: 1.65; }
.login-pulse { position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; color: #99aec7; font-size: 11px; }
.login-pulse i { width: 9px; height: 9px; border-radius: 50%; background: #31c758; box-shadow: 0 0 0 5px rgba(49,199,88,.12); }
.login-form-side { display: grid; place-items: center; padding: 45px; background: radial-gradient(circle at 80% 15%, #f2f7ff, transparent 35%), #fff; }
.login-card { width: min(390px, 100%); }
.login-lock { width: 56px; height: 56px; display: grid; place-items: center; margin-bottom: 28px; border-radius: 15px; color: #075adb; background: var(--blue-soft); }
.login-lock .icon { width: 29px; height: 29px; stroke-width: 2; }
.login-card h1 { margin-top: 7px; font-size: 31px; letter-spacing: -1px; }
.login-card > p:not(.eyebrow) { margin: 12px 0 30px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.login-card > label, .form-field > label { display: block; margin-bottom: 8px; color: #304660; font-size: 11px; font-weight: 750; }
.password-field { height: 48px; display: flex; align-items: center; border: 1px solid #ccd7e5; border-radius: 10px; background: #fff; transition: .2s; }
.password-field:focus-within { border-color: #6aa5f5; box-shadow: 0 0 0 4px rgba(9,103,242,.08); }
.password-field > .icon { width: 19px; height: 19px; margin-left: 14px; color: #8090a6; }
.password-field input { min-width: 0; height: 100%; flex: 1; padding: 0 10px; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 13px; }
.password-field button { width: 43px; height: 100%; display: grid; place-items: center; border: 0; color: #8090a6; background: transparent; cursor: pointer; }
.password-field button .icon { width: 18px; height: 18px; }
.login-error { min-height: 32px; padding-top: 8px; color: var(--red); font-size: 11px; }
.login-button { width: 100%; height: 48px; display: flex; align-items: center; justify-content: center; gap: 12px; border: 0; border-radius: 10px; color: #fff; background: linear-gradient(120deg, #0872fa, #0758e5); box-shadow: 0 10px 24px rgba(9,103,242,.22); cursor: pointer; font-size: 12px; font-weight: 750; transition: .2s; }
.login-button:hover { transform: translateY(-1px); box-shadow: 0 13px 28px rgba(9,103,242,.28); }
.login-button:disabled { cursor: wait; opacity: .72; transform: none; }
.login-card > small { display: block; margin-top: 16px; color: #96a3b5; font-size: 10px; text-align: center; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 264px minmax(0, 1fr); }

.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 30; width: 264px; display: flex; flex-direction: column; padding: 26px 16px 18px; color: #eaf2ff; background: radial-gradient(circle at 10% 0, #093c71 0, transparent 35%), linear-gradient(180deg, #061e3d 0%, #02162f 100%); box-shadow: 6px 0 30px rgba(2, 22, 47, .1); }
.brand { display: flex; align-items: center; gap: 13px; height: 50px; margin: 0 10px 28px; }
.brand-mark { width: 42px; height: 42px; flex: 0 0 auto; fill: none; stroke: #1883ff; stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; }
.brand strong { display: block; color: #fff; font-size: 22px; letter-spacing: -.4px; }
.brand span { display: block; margin-top: 2px; color: #8fa7c3; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.nav { display: grid; gap: 6px; }
.nav-item { width: 100%; height: 52px; display: flex; align-items: center; gap: 14px; padding: 0 15px; border: 0; border-radius: 10px; color: #d7e2f1; background: transparent; cursor: pointer; text-align: left; font-size: 15px; transition: .2s ease; }
.nav-item:hover { color: #fff; background: rgba(255,255,255,.065); }
.nav-item.active { color: #fff; background: linear-gradient(120deg, #0872fa, #0758ec); box-shadow: 0 8px 20px rgba(0, 95, 255, .27); }
.nav-item > span:first-child { width: 23px; height: 23px; display: grid; place-items: center; }
.icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.environment-card { margin-top: auto; padding: 16px; border: 1px solid rgba(162, 194, 228, .25); border-radius: 12px; background: rgba(255,255,255,.035); }
.environment-line { min-width: 0; display: flex; align-items: center; gap: 10px; margin: 2px 0 13px; font-size: 12px; color: #dce8f8; }
.environment-line:last-child { margin-bottom: 1px; }
.environment-line span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.environment-line .icon { width: 17px; height: 17px; color: #a9bdd5; }
.environment-line.small { padding-top: 11px; border-top: 1px solid rgba(162,194,228,.13); color: #8fa7c3; font-size: 10px; }

.status-dot { display: inline-block; width: 11px; height: 11px; flex: 0 0 auto; border: 2px solid rgba(255,255,255,.72); border-radius: 50%; background: #9aa7b8; box-shadow: 0 0 0 3px rgba(154,167,184,.13); }
.status-dot.online { background: var(--green); box-shadow: 0 0 0 3px rgba(19,165,56,.12); }
.status-dot.offline { background: var(--red); box-shadow: 0 0 0 3px rgba(220,53,69,.12); }
.status-dot.checking, .status-dot.aguardando, .status-dot.ocioso { background: var(--amber); box-shadow: 0 0 0 3px rgba(233,147,19,.12); }

.main { grid-column: 2; min-width: 0; padding: 0 30px 38px; }
.topbar { height: 88px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.topbar-title { display: flex; align-items: center; gap: 10px; }
.eyebrow { margin: 0 0 4px; color: #73839a; font-size: 10px; font-weight: 700; line-height: 1; letter-spacing: .12em; text-transform: uppercase; }
h1 { margin: 0; color: var(--ink); font-size: 26px; letter-spacing: -.6px; }
h2 { margin: 0; color: var(--ink); font-size: 18px; letter-spacing: -.2px; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.last-update { color: var(--muted); font-size: 11px; }
.service-pill { height: 34px; display: inline-flex; align-items: center; gap: 8px; padding: 0 13px; border: 1px solid #caead3; border-radius: 999px; color: #117b2c; background: #f1fbf4; font-size: 12px; font-weight: 700; }
.service-pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.service-pill.degraded, .service-pill.checking { color: #98600c; border-color: #f1ddb6; background: #fff9ed; }
.service-pill.degraded i, .service-pill.checking i { background: var(--amber); }
.service-pill.offline { color: #ad2532; border-color: #efc9ce; background: #fff4f5; }
.service-pill.offline i { background: var(--red); }
.icon-button, .menu-button { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 9px; color: #29415f; background: #fff; cursor: pointer; transition: .2s; }
.icon-button:hover { color: var(--blue); border-color: #b9cff3; transform: rotate(15deg); }
.logout-button:hover { color: var(--red); border-color: #efc9ce; transform: none; }
.icon-button.loading .icon { animation: spin .8s linear infinite; }
.menu-button { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

.connection-banner { display: none; align-items: center; gap: 13px; margin: 0 0 18px; padding: 13px 16px; border: 1px solid #f1c5ca; border-radius: 10px; color: #a2212e; background: var(--red-soft); }
.connection-banner.visible { display: flex; }
.connection-banner > .icon { flex: 0 0 auto; }
.connection-banner strong, .connection-banner span { display: block; }
.connection-banner span { margin-top: 2px; font-size: 12px; opacity: .78; }
.view { display: none; animation: enter .22s ease-out; }
.view.active { display: block; }
@keyframes enter { from { opacity: 0; transform: translateY(4px); } }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.metric-card { position: relative; min-width: 0; min-height: 146px; display: grid; grid-template-columns: 62px minmax(0,1fr); gap: 14px; align-items: start; padding: 24px 20px 18px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.metric-icon { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 15px; }
.metric-icon .icon { width: 30px; height: 30px; stroke-width: 2; }
.metric-icon.primary { color: #0754bf; background: var(--blue-soft); }
.metric-icon.success { color: #0e932d; background: var(--green-soft); }
.metric-icon.danger { color: var(--red); background: var(--red-soft); }
.metric-copy { min-width: 0; }
.metric-copy > span { display: block; overflow: hidden; color: #283c59; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.metric-copy strong { display: block; margin: 5px 0 2px; color: var(--blue); font-size: clamp(23px, 2vw, 29px); line-height: 1.08; letter-spacing: -.7px; }
.metric-copy strong.success-text { color: var(--green); }
.metric-copy strong.danger-text { color: var(--red); }
.metric-copy small { color: #8b98aa; font-size: 9px; white-space: nowrap; }
.sparkline { position: absolute; right: 17px; bottom: 13px; left: 98px; height: 27px; opacity: .78; }
.sparkline svg { display: block; width: 100%; height: 100%; overflow: visible; }

.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.panel-hint { color: #8794a7; font-size: 10px; }
.integrations-panel { margin-top: 20px; padding: 20px 22px 24px; }
.integration-flow { min-height: 242px; display: grid; grid-template-columns: minmax(195px, 1fr) minmax(70px, .55fr) minmax(180px, .9fr) minmax(70px, .55fr) minmax(210px, 1.1fr); align-items: center; padding: 16px 30px 0; }
.integration-node { position: relative; min-width: 0; display: flex; align-items: center; gap: 14px; padding: 16px; border: 1px solid #ced8e5; border-radius: 12px; background: #fff; box-shadow: 0 7px 18px rgba(21,49,85,.05); }
.integration-node .status-dot { position: absolute; right: 13px; bottom: 11px; }
.node-icon { width: 50px; height: 50px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 13px; color: #0754bf; background: var(--blue-soft); }
.node-icon .icon { width: 28px; height: 28px; }
.node-copy { min-width: 0; padding-right: 10px; }
.node-copy strong, .node-copy span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.node-copy strong { color: var(--ink); font-size: 14px; }
.node-copy span { margin-top: 6px; color: var(--muted); font-size: 9px; }
.api-node { min-height: 170px; z-index: 2; flex-direction: column; justify-content: center; padding: 16px; border: 2px solid var(--blue); box-shadow: 0 10px 26px rgba(9,103,242,.11); }
.api-node strong { color: var(--blue); font-size: 17px; }
.api-node > span { color: var(--muted); font-size: 9px; }
.api-node .status-dot { right: auto; bottom: 10px; }
.api-logo { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 14px; color: #fff; background: linear-gradient(145deg, #0875ff, #074edc); box-shadow: 0 9px 18px rgba(7,85,223,.22); }
.api-logo svg { width: 39px; height: 39px; fill: none; stroke: currentColor; stroke-width: 2.7; stroke-linecap: round; }
.module-stack { display: grid; gap: 18px; }
.small-node { min-height: 82px; }
.flow-connector { position: relative; height: 100px; overflow: hidden; }
.flow-connector::before, .flow-connector::after { content: ""; position: absolute; top: 42%; width: 100%; height: 2px; background: var(--blue); }
.flow-connector::after { top: 58%; }
.flow-connector span::before, .flow-connector span::after { content: ""; position: absolute; z-index: 1; width: 0; height: 0; border-top: 5px solid transparent; border-bottom: 5px solid transparent; }
.connector-left span::before { top: calc(42% - 4px); right: 0; border-left: 8px solid var(--blue); }
.connector-left span::after { top: calc(58% - 4px); left: 0; border-right: 8px solid var(--blue); }
.connector-right span::before { top: calc(42% - 4px); right: 0; border-left: 8px solid var(--blue); }
.connector-right span::after { top: calc(58% - 4px); left: 0; border-right: 8px solid var(--blue); }

.overview-bottom { display: grid; grid-template-columns: 1.08fr .92fr; gap: 20px; margin-top: 20px; }
.chart-panel, .activity-panel { min-height: 315px; padding: 20px 22px; }
.chart-total { color: var(--blue); font-size: 11px; font-weight: 700; }
.chart-wrap { height: 230px; margin-top: 15px; }
.chart-wrap svg { display: block; width: 100%; height: 100%; overflow: visible; }
.chart-grid { stroke: #e9eef5; stroke-width: 1; }
.chart-area { fill: url(#areaGradient); }
.chart-line { fill: none; stroke: var(--blue); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.chart-label { fill: #8090a6; font-size: 9px; }
.chart-dot { fill: #fff; stroke: var(--blue); stroke-width: 2; }
.text-button { padding: 6px; border: 0; color: var(--blue); background: transparent; cursor: pointer; font-size: 11px; font-weight: 700; }
.activity-list { margin-top: 8px; }
.activity-item { display: grid; grid-template-columns: 34px minmax(0,1fr) auto; gap: 10px; align-items: center; min-height: 52px; border-bottom: 1px solid #edf1f6; }
.activity-item:last-child { border-bottom: 0; }
.activity-icon { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 8px; color: var(--blue); background: var(--blue-soft); }
.activity-icon .icon { width: 16px; height: 16px; }
.activity-icon.error { color: var(--red); background: var(--red-soft); }
.activity-copy { min-width: 0; }
.activity-copy strong, .activity-copy span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.activity-copy strong { font-size: 11px; }
.activity-copy span { margin-top: 3px; color: var(--muted); font-size: 9px; }
.activity-time { color: #7c8ba0; font-size: 9px; }
.empty-state { min-height: 130px; display: grid; place-items: center; color: #8b98aa; font-size: 12px; text-align: center; }

.section-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: 5px 0 22px; }
.section-intro h2 { font-size: 22px; }
.section-intro p:not(.eyebrow) { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.detail-card-grid, .system-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.detail-card, .system-card { position: relative; min-height: 205px; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.detail-card-top { display: flex; align-items: center; justify-content: space-between; }
.detail-card .node-icon { width: 56px; height: 56px; }
.detail-card h3 { margin: 20px 0 5px; font-size: 17px; }
.detail-card p { min-height: 31px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.detail-meta { display: flex; justify-content: space-between; gap: 10px; margin-top: 20px; padding-top: 14px; border-top: 1px solid #edf1f6; color: var(--muted); font-size: 10px; }
.state-label { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 700; text-transform: capitalize; }
.state-label.online { color: var(--green); }
.state-label.offline { color: var(--red); }
.state-label.checking, .state-label.aguardando, .state-label.ocioso { color: var(--amber); }

.table-panel { overflow: hidden; }
.table-heading { padding: 21px 22px; border-bottom: 1px solid var(--line); }
.filters { display: flex; gap: 8px; }
.filters input, .filters select { height: 35px; padding: 0 11px; border: 1px solid var(--line); border-radius: 8px; outline: none; color: #334762; background: #fff; font-size: 11px; }
.filters input { width: 210px; }
.filters input:focus, .filters select:focus { border-color: #8cb7f5; box-shadow: 0 0 0 3px rgba(9,103,242,.08); }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { height: 49px; padding: 0 17px; border-bottom: 1px solid #edf1f6; text-align: left; font-size: 11px; white-space: nowrap; }
th { height: 39px; color: #728198; background: #f8fafc; font-size: 9px; letter-spacing: .05em; text-transform: uppercase; }
td.route-cell { max-width: 430px; overflow: hidden; color: #304865; font-family: Consolas, monospace; text-overflow: ellipsis; }
.method-badge, .status-badge { display: inline-flex; align-items: center; justify-content: center; padding: 4px 7px; border-radius: 5px; font-size: 9px; font-weight: 800; }
.method-badge { color: #0757c9; background: var(--blue-soft); }
.method-badge.POST, .method-badge.PUT, .method-badge.PATCH { color: #8b5a0c; background: var(--amber-soft); }
.method-badge.DELETE { color: #b62937; background: var(--red-soft); }
.status-badge.success { color: #0d8528; background: var(--green-soft); }
.status-badge.error { color: #b62937; background: var(--red-soft); }

.event-panel { padding: 22px; }
.event-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 20px 0 24px; }
.summary-chip { padding: 15px; border: 1px solid var(--line); border-radius: 10px; background: #f9fbfd; }
.summary-chip span, .summary-chip strong { display: block; }
.summary-chip span { color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .06em; }
.summary-chip strong { margin-top: 5px; font-size: 20px; }
.timeline { position: relative; padding-left: 26px; }
.timeline::before { content: ""; position: absolute; top: 8px; bottom: 8px; left: 7px; width: 1px; background: #d9e2ee; }
.timeline-item { position: relative; display: flex; justify-content: space-between; gap: 20px; padding: 0 0 20px; }
.timeline-item::before { content: ""; position: absolute; top: 4px; left: -23px; width: 9px; height: 9px; border: 3px solid #dceaff; border-radius: 50%; background: var(--blue); }
.timeline-item.error::before { border-color: #f8dce0; background: var(--red); }
.timeline-item strong { display: block; font-size: 11px; }
.timeline-item span { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; }

.system-card { min-height: 178px; }
.system-card .metric-icon { width: 50px; height: 50px; }
.system-card small { display: block; margin-top: 18px; color: var(--muted); font-size: 10px; }
.system-card strong { display: block; margin-top: 5px; color: var(--blue); font-size: 25px; }
.system-card span { display: block; margin-top: 3px; color: #8996a8; font-size: 9px; }
.uptime-panel { min-height: 100px; display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 18px; padding: 20px 24px; }
.uptime-panel > div { display: flex; align-items: center; gap: 14px; }
.uptime-panel > div > .icon { width: 29px; height: 29px; color: var(--blue); }
.uptime-panel small, .uptime-panel strong { display: block; }
.uptime-panel small { color: var(--muted); font-size: 10px; }
.uptime-panel strong { margin-top: 3px; font-size: 18px; }
.uptime-panel > span { color: var(--muted); font-size: 11px; }

.settings-intro { align-items: center; }
.primary-button { height: 39px; display: flex; align-items: center; gap: 8px; padding: 0 15px; border: 0; border-radius: 9px; color: #fff; background: var(--blue); cursor: pointer; font-size: 11px; font-weight: 700; box-shadow: 0 7px 16px rgba(9,103,242,.2); }
.primary-button:hover { background: var(--blue-600); }
.primary-button .icon { width: 17px; height: 17px; }
.settings-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(330px, .65fr); gap: 18px; align-items: start; }
.database-form { padding: 24px; }
.configuration-heading { display: flex; align-items: center; gap: 14px; padding-bottom: 20px; border-bottom: 1px solid #edf1f6; }
.configuration-heading > div:last-child { min-width: 0; }
.configuration-heading p:not(.eyebrow) { margin: 6px 0 0; color: var(--muted); font-size: 10px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 22px; }
.form-field.full { grid-column: 1 / -1; }
.form-field input:not(.configuration-password input) { width: 100%; height: 42px; padding: 0 12px; border: 1px solid #ccd7e5; border-radius: 9px; outline: 0; color: var(--ink); background: #fff; font-size: 12px; transition: .2s; }
.form-field input:not(.configuration-password input):focus { border-color: #6aa5f5; box-shadow: 0 0 0 4px rgba(9,103,242,.08); }
.form-field > small { display: block; margin-top: 6px; color: #8b98aa; font-size: 9px; }
.configuration-password { height: 42px; border-radius: 9px; }
.configuration-result { display: none; margin-top: 17px; padding: 11px 13px; border: 1px solid; border-radius: 8px; font-size: 10px; line-height: 1.45; }
.configuration-result.visible { display: block; }
.configuration-result.success { color: #0d7c28; border-color: #bfe4c8; background: #f0faf3; }
.configuration-result.error { color: #a82431; border-color: #edc3c8; background: #fff3f4; }
.configuration-result.checking { color: #8c5a0e; border-color: #efdbb4; background: #fff9ed; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; padding-top: 18px; border-top: 1px solid #edf1f6; }
.secondary-button { height: 39px; display: flex; align-items: center; gap: 8px; padding: 0 15px; border: 1px solid #bfcde0; border-radius: 9px; color: #2e496c; background: #fff; cursor: pointer; font-size: 11px; font-weight: 700; }
.secondary-button:hover { color: var(--blue); border-color: #8fb7ee; background: #f8fbff; }
.secondary-button:disabled, .primary-button:disabled { cursor: wait; opacity: .62; }
.secondary-button .icon { width: 16px; height: 16px; }
.settings-panel { overflow: hidden; }
.settings-panel-heading { padding: 22px; border-bottom: 1px solid #edf1f6; }
.settings-panel-heading h2 { font-size: 16px; }
.setting-row { min-height: 66px; display: grid; grid-template-columns: 190px minmax(0, 1fr) auto; gap: 20px; align-items: center; padding: 12px 22px; border-bottom: 1px solid #edf1f6; }
.setting-row:last-child { border-bottom: 0; }
.setting-row label { color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.setting-row strong { min-width: 0; overflow: hidden; color: #2a405c; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.copy-button { padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; color: var(--blue); background: #fff; cursor: pointer; font-size: 9px; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 50; padding: 11px 16px; border-radius: 8px; color: #fff; background: #102c51; box-shadow: 0 10px 30px rgba(3,22,46,.22); font-size: 11px; opacity: 0; pointer-events: none; transform: translateY(10px); transition: .25s; }
.toast.visible { opacity: 1; transform: translateY(0); }
.sidebar-overlay { display: none; }

@media (max-width: 1180px) {
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .integration-flow { grid-template-columns: minmax(170px,1fr) 55px minmax(150px,.8fr) 55px minmax(180px,1fr); padding-inline: 4px; }
  .overview-bottom { grid-template-columns: 1fr; }
  .settings-layout { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .login-screen { grid-template-columns: 1fr; }
  .login-visual { display: none; }
  .login-form-side { padding: 30px; }
  .app-shell { display: block; }
  .sidebar { transform: translateX(-102%); transition: transform .25s ease; }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay { position: fixed; inset: 0; z-index: 20; background: rgba(3,22,46,.42); }
  .sidebar-overlay.visible { display: block; }
  .main { padding: 0 18px 28px; }
  .menu-button { display: grid; }
  .last-update { display: none; }
  .integration-flow { grid-template-columns: 1fr; gap: 14px; padding: 20px 0 0; }
  .flow-connector { width: 2px; height: 35px; margin: -8px auto; background: var(--blue); }
  .flow-connector::before, .flow-connector::after, .flow-connector span { display: none; }
  .module-stack { grid-template-columns: 1fr 1fr; }
  .detail-card-grid, .system-grid { grid-template-columns: 1fr; }
}

@media (max-width: 580px) {
  .login-form-side { padding: 24px; }
  .login-card h1 { font-size: 27px; }
  .main { padding-inline: 12px; }
  .topbar { height: 76px; }
  h1 { font-size: 20px; }
  .topbar .eyebrow, .icon-button { display: none; }
  .service-pill { padding-inline: 10px; }
  .metric-grid { grid-template-columns: 1fr; gap: 12px; }
  .metric-card { min-height: 132px; }
  .integrations-panel, .chart-panel, .activity-panel, .event-panel { padding: 17px; }
  .module-stack { grid-template-columns: 1fr; }
  .panel-hint, .chart-total { display: none; }
  .filters { width: 100%; margin-top: 12px; }
  .filters input { min-width: 0; width: 100%; }
  .table-heading { align-items: stretch; flex-direction: column; }
  .event-summary { grid-template-columns: 1fr; }
  .settings-intro { align-items: stretch; flex-direction: column; }
  .form-grid { grid-template-columns: 1fr; }
  .form-field.full { grid-column: auto; }
  .form-actions { align-items: stretch; flex-direction: column-reverse; }
  .form-actions button { width: 100%; justify-content: center; }
  .setting-row { grid-template-columns: 1fr auto; gap: 7px; }
  .setting-row label { grid-column: 1 / -1; }
  .uptime-panel { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
