:root {
  --ink: #101828;
  --muted: #667085;
  --line: #e6eaf0;
  --paper: #ffffff;
  --canvas: #f4f6f9;
  --navy: #07152b;
  --navy-2: #0b2344;
  --blue: #2864ff;
  --cyan: #33c7e8;
  --green: #16a673;
  --amber: #e9a23b;
  --red: #e05252;
  --violet: #7757d9;
  --shadow: 0 18px 45px rgba(20, 34, 56, .09);
}

* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; color: var(--ink); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input { font: inherit; }
a { color: inherit; text-decoration: none; }
.eyebrow { margin: 0 0 10px; color: #718096; font-size: 11px; font-weight: 800; letter-spacing: .16em; }

.brand { display: flex; align-items: center; gap: 11px; font-size: 17px; font-weight: 750; letter-spacing: -.02em; }
.brand-light { color: white; }
.brand-logo { display: block; width: 34px; height: 34px; object-fit: contain; border-radius: 50%; }

/* Login */
.login-body { background: var(--paper); }
.login-shell { display: grid; grid-template-columns: minmax(420px, 46%) 1fr; min-height: 100vh; }
.login-story { position: relative; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; padding: 48px 56px; color: white; background: radial-gradient(circle at 85% 15%, rgba(48, 171, 220, .24), transparent 36%), linear-gradient(145deg, #061329 0%, #0b2447 62%, #0a3153 100%); }
.login-story::after { content: ""; position: absolute; right: -160px; bottom: -180px; width: 520px; height: 520px; border: 1px solid rgba(75, 194, 235, .15); border-radius: 50%; box-shadow: 0 0 0 80px rgba(75,194,235,.03), 0 0 0 160px rgba(75,194,235,.02); }
.story-copy { position: relative; z-index: 2; max-width: 520px; margin-top: auto; margin-bottom: auto; }
.story-copy .eyebrow { color: #5ed1ed; }
.story-copy h1 { margin: 0 0 24px; font-size: clamp(44px, 5vw, 72px); line-height: .98; letter-spacing: -.055em; }
.story-copy > p:last-child { max-width: 450px; margin: 0; color: #aebdd0; font-size: 17px; line-height: 1.7; }
.signal-grid { position: absolute; z-index: 1; top: 20%; right: 5%; display: grid; grid-template-columns: repeat(3, 74px); gap: 18px; opacity: .6; transform: rotate(-7deg); }
.signal-grid span { height: 74px; border: 1px solid rgba(80, 206, 235, .22); border-radius: 16px; background: linear-gradient(145deg, rgba(43,153,195,.08), rgba(255,255,255,.01)); }
.signal-grid span:nth-child(2), .signal-grid span:nth-child(6) { transform: translateY(30px); }
.signal-grid span:nth-child(4) { transform: translateY(-15px); }
.trust-line { position: relative; z-index: 2; display: flex; align-items: center; gap: 10px; color: #a8bacd; font-size: 12px; }
.pulse-dot, .live-ring { width: 8px; height: 8px; border-radius: 50%; background: #35d49a; box-shadow: 0 0 0 5px rgba(53,212,154,.12); }
.login-panel { display: grid; place-items: center; padding: 48px; background: #fbfcfe; }
.login-card { width: min(430px, 100%); }
.mobile-brand { display: none; }
.login-heading { margin-bottom: 32px; }
.login-heading h2 { margin: 0 0 10px; font-size: 38px; letter-spacing: -.04em; }
.login-heading > p:last-child { margin: 0; color: var(--muted); }
.alert { display: flex; align-items: flex-start; gap: 11px; margin-bottom: 22px; padding: 13px 14px; color: #9f2f2f; border: 1px solid #f4cccc; border-radius: 10px; background: #fff4f4; font-size: 13px; }
.alert > span { display: grid; flex: 0 0 20px; place-items: center; height: 20px; color: white; border-radius: 50%; background: var(--red); font-weight: 800; }
.alert p { margin: 1px 0 0; line-height: 1.45; }
.notice { display: flex; align-items: flex-start; gap: 11px; margin-bottom: 22px; padding: 13px 14px; color: #17684d; border: 1px solid #bfe9d8; border-radius: 10px; background: #effaf6; font-size: 13px; }
.notice > span { display: grid; flex: 0 0 20px; place-items: center; height: 20px; color: white; border-radius: 50%; background: var(--green); font-weight: 800; }
.notice p { margin: 1px 0 0; line-height: 1.45; }
.login-form { display: grid; gap: 19px; }
.login-form label > span { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 700; }
.login-form input { width: 100%; height: 50px; padding: 0 15px; color: var(--ink); border: 1px solid #d5dce7; border-radius: 9px; outline: none; background: white; transition: border .2s, box-shadow .2s; }
.login-form input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(40,100,255,.1); }
.primary-button { display: flex; align-items: center; justify-content: space-between; height: 52px; margin-top: 4px; padding: 0 18px; color: white; border: 0; border-radius: 9px; background: linear-gradient(135deg, #265be8, #3478ff); box-shadow: 0 12px 24px rgba(40,100,255,.22); cursor: pointer; font-weight: 750; }
.primary-button:hover { filter: brightness(1.06); }
.access-note { display: flex; gap: 13px; margin-top: 28px; padding: 17px; border: 1px solid #e2e8f0; border-radius: 10px; background: white; }
.lock-icon { position: relative; flex: 0 0 28px; height: 24px; margin-top: 4px; border: 2px solid #7f94b1; border-radius: 5px; }
.lock-icon::before { content: ""; position: absolute; top: -10px; left: 6px; width: 12px; height: 11px; border: 2px solid #7f94b1; border-bottom: 0; border-radius: 8px 8px 0 0; }
.access-note strong { font-size: 13px; }
.access-note p { margin: 4px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.api-target { margin-top: 22px; color: #98a2b3; font-size: 11px; text-align: center; word-break: break-all; }
.api-target strong { color: #667085; }

/* Dashboard */
.dashboard-body { background: var(--canvas); }
.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 10; display: flex; width: 244px; flex-direction: column; padding: 28px 20px 22px; color: #b5c2d4; background: linear-gradient(180deg, #07162c 0%, #071326 100%); }
.sidebar > .brand { padding: 0 8px 30px; border-bottom: 1px solid rgba(255,255,255,.08); }
.nav-list { display: flex; flex-direction: column; gap: 5px; margin-top: 24px; }
.nav-list a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 8px; font-size: 13px; font-weight: 650; }
.nav-list a:hover { color: white; background: rgba(255,255,255,.05); }
.nav-list a.active { color: white; background: linear-gradient(90deg, rgba(50,105,255,.28), rgba(50,105,255,.08)); box-shadow: inset 3px 0 #4b7eff; }
.nav-icon { display: grid; width: 20px; place-items: center; color: #6d8cc2; font-size: 18px; }
.nav-label { margin: 23px 12px 8px; color: #566981; font-size: 9px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.sidebar-foot { margin-top: auto; }
.permission-card { display: flex; align-items: center; gap: 11px; margin-bottom: 12px; padding: 12px; border: 1px solid rgba(255,255,255,.08); border-radius: 9px; background: rgba(255,255,255,.035); }
.permission-card strong, .permission-card small { display: block; }
.permission-card strong { color: white; font-size: 12px; }
.permission-card small { margin-top: 2px; color: #72859f; font-size: 10px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #758296; }
.status-dot.online { background: #2ecb91; box-shadow: 0 0 0 4px rgba(46,203,145,.1); }
.status-dot.readonly { background: #6da8ff; box-shadow: 0 0 0 4px rgba(109,168,255,.1); }
.status-dot.offline { background: var(--red); }
.logout-button { width: 100%; padding: 10px 12px; color: #ffb4b4; border: 1px solid rgba(239,83,80,.38); border-radius: 8px; background: rgba(224,82,82,.12); cursor: pointer; text-align: center; font-size: 12px; font-weight: 750; }
.logout-button:hover { color: white; border-color: #e05252; background: #c94343; }
.main-content { min-height: 100vh; margin-left: 244px; padding: 0 34px 38px; }
.topbar { display: flex; align-items: center; justify-content: space-between; min-height: 105px; margin: 0 -34px 30px; padding: 0 34px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.86); backdrop-filter: blur(14px); }
.topbar h1 { margin: 0; font-size: 27px; letter-spacing: -.035em; }
.topbar .eyebrow { margin-bottom: 5px; color: #2e65d7; }
.topbar-actions { display: flex; align-items: center; gap: 25px; }
.refresh-state { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 11px; }
.live-ring { width: 7px; height: 7px; }
.user-chip { display: flex; align-items: center; gap: 10px; padding-left: 23px; border-left: 1px solid var(--line); }
.user-chip > span { display: grid; width: 36px; height: 36px; place-items: center; color: white; border-radius: 9px; background: linear-gradient(135deg, #234f9f, #3178e7); font-size: 13px; font-weight: 800; }
.user-chip strong, .user-chip small { display: block; }
.user-chip strong { font-size: 12px; }
.user-chip small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.dashboard-alert { max-width: 850px; margin-bottom: 24px; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(170px, 1fr)); gap: 17px; }
.metric-grid-compact { grid-template-columns: repeat(3, minmax(220px, 1fr)); }
.metric-card { position: relative; overflow: hidden; min-height: 154px; padding: 20px 21px; border: 1px solid var(--line); border-radius: 12px; background: white; box-shadow: 0 5px 15px rgba(20,34,56,.025); }
.metric-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--blue); }
.metric-card.accent-green::before { background: var(--green); }
.metric-card.accent-amber::before { background: var(--amber); }
.metric-card.accent-violet::before { background: var(--violet); }
.metric-top { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.metric-top i { display: grid; width: 30px; height: 30px; place-items: center; color: var(--blue); border-radius: 8px; background: #eef3ff; font-style: normal; font-size: 17px; }
.accent-green .metric-top i { color: var(--green); background: #eaf8f3; }
.accent-amber .metric-top i { color: #c77d13; background: #fff6e6; }
.accent-violet .metric-top i { color: var(--violet); background: #f3efff; }
.metric-card > strong { display: block; margin-top: 12px; font-size: 34px; line-height: 1; letter-spacing: -.04em; }
.metric-card > p { margin: 11px 0 0; color: #8a94a3; font-size: 11px; }
.mini-dot { display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; }
.mini-dot.good { background: var(--green); }
.content-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, .7fr); gap: 17px; margin-top: 17px; }
.panel { margin-top: 17px; padding: 22px; border: 1px solid var(--line); border-radius: 12px; background: white; box-shadow: 0 5px 15px rgba(20,34,56,.025); }
.content-grid .panel { margin-top: 0; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.panel-heading .eyebrow { margin-bottom: 5px; color: #8390a2; font-size: 9px; }
.panel-heading h2 { margin: 0; font-size: 18px; letter-spacing: -.025em; }
.heading-actions { display: flex; align-items: center; gap: 9px; }
.panel-intro { max-width: 720px; margin: -8px 0 20px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.route-list { display: grid; gap: 14px; }
.route-editor { padding: 18px; border: 1px solid #e3e8ef; border-radius: 11px; background: #fbfcfe; }
.saved-route { background: white; }
.route-editor.is-editing { border-color: #b9ccf3; box-shadow: 0 0 0 3px rgba(40,100,255,.05); }
.edit-fieldset { display: contents; margin: 0; padding: 0; border: 0; }
[hidden] { display: none !important; }
.route-fields, .channel-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.route-fields-single { grid-template-columns: minmax(240px, 520px); }
.settings-form { display: contents; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.field-wide { grid-column: 1 / -1; }
.status-word { font-size: 24px !important; letter-spacing: .03em !important; }
.channel-grid { margin-top: 14px; }
.field > span { display: block; margin-bottom: 7px; color: #344054; font-size: 11px; font-weight: 750; }
.field input, .field select { width: 100%; height: 44px; padding: 0 12px; color: var(--ink); border: 1px solid #d5dce7; border-radius: 8px; outline: none; background: white; font-size: 12px; transition: border .2s, box-shadow .2s; }
.field input:focus, .field select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(40,100,255,.09); }
.field input:disabled, .field select:disabled { color: #778397; background: #f1f4f8; cursor: not-allowed; }
.channel-card { padding: 15px; border: 1px solid #e1e7ef; border-radius: 9px; background: white; }
.toggle-line { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 13px; cursor: pointer; }
.toggle-line input { width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--blue); }
.toggle-line strong, .toggle-line small { display: block; }
.toggle-line strong { font-size: 12px; }
.toggle-line small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.recipient-channel[aria-disabled="true"] { opacity: .68; }
.recipient-label { display: block; margin-bottom: 7px; color: #344054; font-size: 11px; font-weight: 750; }
.delivery-time-field { max-width: 220px; margin-bottom: 13px; }
.recipient-list { display: grid; gap: 7px; }
.recipient-row { display: grid; grid-template-columns: minmax(0, 1fr) 38px; gap: 7px; }
.recipient-row input { width: 100%; height: 42px; padding: 0 12px; color: var(--ink); border: 1px solid #d5dce7; border-radius: 8px; outline: none; background: white; font-size: 12px; }
.recipient-row input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(40,100,255,.09); }
.recipient-row input:disabled { color: #778397; background: #f1f4f8; cursor: not-allowed; }
.recipient-remove { width: 38px; height: 42px; color: #9a4b4b; border: 1px solid #ebcdcd; border-radius: 8px; background: #fff8f8; cursor: pointer; font-size: 18px; }
.recipient-add { display: inline-flex; align-items: center; gap: 6px; margin-top: 9px; padding: 7px 9px; color: #2b61bd; border: 1px solid #c9d7ef; border-radius: 7px; background: #f7faff; cursor: pointer; font-size: 10px; font-weight: 750; }
.recipient-add span { font-size: 15px; line-height: 1; }
.recipient-remove:disabled, .recipient-add:disabled { opacity: .55; cursor: not-allowed; }
.route-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 14px; }
.compact-button { width: auto; min-width: 220px; padding: 0 16px; }
.secondary-button, .danger-button { min-height: 38px; padding: 0 14px; border-radius: 8px; background: white; cursor: pointer; font-size: 11px; font-weight: 750; }
.secondary-button { color: #2859b8; border: 1px solid #bfcfee; }
.button-link { display: inline-flex; align-items: center; justify-content: center; }
.danger-button { color: #a43d3d; border: 1px solid #efc7c7; }
.secondary-button:hover { background: #f3f7ff; }
.danger-button:hover { background: #fff3f3; }
.readonly-banner { display: flex; align-items: center; gap: 10px; padding: 15px; color: #667085; border: 1px solid #dfe5ec; border-radius: 9px; background: #f8fafc; font-size: 11px; }
.updated-time, .count-badge { color: #8893a2; font-size: 10px; }
.count-badge { padding: 5px 9px; border: 1px solid #dfe5ec; border-radius: 20px; background: #f8fafc; }
.log-subject { min-width: 260px; max-width: 460px; }
.log-subject strong, .log-subject small { display: block; }
.log-subject strong { overflow-wrap: anywhere; font-size: 11px; }
.log-subject small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.log-recipients { min-width: 180px; max-width: 300px; overflow-wrap: anywhere; color: #667085; font-size: 10px; }
.log-error { max-width: 360px; margin-top: 5px; color: #a43d3d; font-size: 9px; line-height: 1.45; overflow-wrap: anywhere; }
.component-list { display: grid; }
.component-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) 65px 80px; align-items: center; gap: 12px; padding: 13px 0; border-top: 1px solid #edf0f4; }
.component-row:first-child { border-top: 0; }
.component-icon { display: grid; width: 36px; height: 36px; place-items: center; color: #3765b7; border-radius: 9px; background: #eef4ff; font-size: 10px; font-weight: 800; }
.component-name strong, .component-name small { display: block; }
.component-name strong { font-size: 12px; }
.component-name small { overflow: hidden; margin-top: 3px; color: #939dab; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.latency { color: #7d8795; font-size: 10px; text-align: right; }
.health-pill { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 70px; padding: 5px 8px; color: #187a58; border: 1px solid #bfe9d8; border-radius: 20px; background: #effaf6; font-size: 9px; font-weight: 750; text-transform: capitalize; }
.health-pill i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.health-pill.degraded { color: #a56b16; border-color: #f1ddb5; background: #fff8eb; }
.health-pill.offline { color: #aa3d3d; border-color: #efc7c7; background: #fff3f3; }
.posture-panel { text-align: center; }
.posture-panel .panel-heading { text-align: left; }
.posture-orbit { display: grid; width: 128px; height: 128px; margin: 8px auto 17px; place-items: center; border: 1px solid #c8dafd; border-radius: 50%; background: radial-gradient(circle, #fff 48%, #edf4ff 49%, #edf4ff 56%, #fff 57%); box-shadow: 0 0 0 9px #f7faff; }
.posture-orbit.viewer { border-color: #d7ddec; background: radial-gradient(circle, #fff 48%, #f0f2f7 49%, #f0f2f7 56%, #fff 57%); }
.posture-orbit strong, .posture-orbit small { display: block; }
.posture-orbit strong { color: #3268cc; font-size: 20px; letter-spacing: .08em; }
.posture-orbit.viewer strong { color: #65758d; }
.posture-orbit small { margin-top: 3px; color: #8c97a6; font-size: 9px; }
.posture-copy { max-width: 260px; margin: 0 auto 15px; color: #7d8796; font-size: 11px; line-height: 1.55; }
.role-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; }
.role-tags span { padding: 4px 7px; color: #64748b; border-radius: 5px; background: #f1f4f8; font-size: 8px; }
.table-wrap { overflow-x: auto; margin: 0 -22px -22px; }
table { width: 100%; border-collapse: collapse; }
th { padding: 10px 22px; color: #8a95a5; background: #fafbfc; font-size: 9px; font-weight: 800; letter-spacing: .08em; text-align: left; text-transform: uppercase; }
td { padding: 14px 22px; border-top: 1px solid #edf0f4; color: #596577; font-size: 11px; }
td code { color: #556274; font-family: "SFMono-Regular", Consolas, monospace; font-size: 10px; }
.server-name { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.server-name > span { display: grid; width: 28px; height: 28px; place-items: center; color: #3e6dbf; border-radius: 7px; background: #eff4fd; font-size: 14px; }
.server-name strong, .server-name small { display: block; }
.server-name small { margin-top: 2px; color: #9aa3af; font-size: 8px; }
.empty-cell, .empty-state { padding: 28px; color: #8b96a5; text-align: center; font-size: 11px; }
.service-groups { display: grid; gap: 22px; }
.service-group h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 12px; }
.service-group h3 span { color: #3f70c7; }
.service-grid { display: grid; grid-template-columns: repeat(4, minmax(160px, 1fr)); gap: 8px; }
.service-item { display: grid; grid-template-columns: 10px minmax(0, 1fr); column-gap: 8px; align-items: center; padding: 10px 11px; border: 1px solid #e8ecf1; border-radius: 8px; background: #fbfcfd; }
.service-item .status-dot { grid-row: 1 / 3; }
.service-item strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.service-item small { color: #939daa; font-size: 8px; text-transform: capitalize; }
.service-item em, .microservice-row em { padding: 2px 5px; color: #86621e; border: 1px solid #ecd7a9; border-radius: 9px; background: #fff9ea; font-size: 7px; font-style: normal; font-weight: 800; text-transform: uppercase; }
.service-item em { grid-column: 2; justify-self: start; }
.optional-service { border-color: #eadfc7; background: #fffdf8; }
.page-footer { padding: 26px 0 0; color: #98a2b3; font-size: 9px; text-align: center; }

/* Server management */
.management-banner { margin-bottom: 17px; }
.capability-warning, .capability-note { margin-bottom: 18px; padding: 14px 16px; border: 1px solid #f0d8a7; border-radius: 9px; background: #fff9ed; }
.capability-note { border-color: #cfdcf3; background: #f5f8ff; }
.capability-warning strong, .capability-note strong { display: block; color: #8a5a12; font-size: 11px; }
.capability-note strong { color: #315b9d; }
.capability-warning p, .capability-note p { margin: 4px 0 0; color: #7b6a50; font-size: 10px; line-height: 1.55; }
.capability-note p { color: #62718a; }
.management-card-grid { display: grid; grid-template-columns: repeat(3, minmax(230px, 1fr)); gap: 12px; }
.management-card, .manager-control-card { padding: 16px; border: 1px solid #e2e7ee; border-radius: 10px; background: #fbfcfe; }
.management-card-head { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.management-card-head > div > strong, .management-card-head > div > small { display: block; }
.management-card-head > div > strong { font-size: 12px; }
.management-card-head > div > small { margin-top: 3px; color: #8b96a5; font-size: 9px; }
.management-icon { display: grid; width: 38px; height: 38px; place-items: center; color: #2f62ba; border-radius: 9px; background: #eaf1ff; font-size: 10px; font-weight: 850; }
.management-detail { min-height: 31px; margin: 12px 0; color: #7d8795; font-size: 9px; line-height: 1.5; }
.resource-intro { margin-bottom: 17px; }
.resource-card { display: flex; min-height: 345px; flex-direction: column; }
.resource-metric-list { display: grid; gap: 8px; margin-top: 15px; }
.resource-metric { min-width: 0; padding: 11px 12px; border: 1px solid #e7ebf1; border-radius: 8px; background: #fff; }
.resource-metric > span, .resource-metric > strong, .resource-metric > small { display: block; }
.resource-metric > span { color: #7e8998; font-size: 8px; font-weight: 850; letter-spacing: .07em; text-transform: uppercase; }
.resource-metric > strong { margin-top: 5px; color: #16243b; font-size: 13px; }
.resource-metric > small { margin-top: 4px; overflow: hidden; color: #8792a2; font-size: 8px; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.resource-metric > small.resource-usage-value { margin-top: 7px; color: #3267c7; font-weight: 800; }
.resource-metric meter { display: block; width: 100%; height: 7px; margin-top: 8px; border: 0; border-radius: 5px; background: #e9edf3; }
.resource-metric meter::-webkit-meter-bar { border: 0; border-radius: 5px; background: #e9edf3; }
.resource-metric meter::-webkit-meter-optimum-value { border-radius: 5px; background: #3478f6; }
.resource-metric meter::-moz-meter-bar { border-radius: 5px; background: #3478f6; }
.resource-detail { min-height: 0; margin-top: auto; margin-bottom: 0; padding-top: 12px; }
.control-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 13px; }
.control-actions form { flex: 1 1 72px; }
.control-button { width: 100%; min-height: 35px; padding: 0 10px; border-radius: 7px; cursor: pointer; font-size: 10px; font-weight: 800; }
.control-button.start { color: #147150; border: 1px solid #a9ddca; background: #eefaf5; }
.control-button.restart { color: #9a6411; border: 1px solid #ebd09f; background: #fff8e9; }
.control-button.stop { color: #a23d3d; border: 1px solid #edc0c0; background: #fff2f2; }
.control-button:hover:not(:disabled) { filter: brightness(.97); box-shadow: 0 3px 9px rgba(20,34,56,.06); }
.control-button:disabled { color: #9aa3af; border-color: #e1e5ea; background: #f1f3f6; cursor: not-allowed; }
.manager-control-list { display: grid; gap: 13px; }
.manager-control-card { background: white; }
.manager-actions { max-width: 380px; margin: 14px 0; }
.control-warning { margin: -3px 0 14px; color: #a06b1f; font-size: 9px; }
.microservice-grid { display: grid; grid-template-columns: repeat(4, minmax(140px, 1fr)); gap: 7px; padding-top: 14px; border-top: 1px solid #edf0f4; }
.microservice-row { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 8px 9px; border: 1px solid #e8ecf1; border-radius: 7px; background: #fbfcfd; }
.microservice-row > div { min-width: 0; }
.microservice-row em { flex: 0 0 auto; margin-left: auto; }
.microservice-row strong, .microservice-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.microservice-row strong { font-size: 9px; }
.microservice-row small { margin-top: 2px; color: #929ca9; font-size: 7px; }
.audit-detail { min-width: 220px; max-width: 420px; overflow-wrap: anywhere; font-size: 9px; }

@media (max-width: 1100px) {
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .content-grid { grid-template-columns: 1fr; }
  .service-grid { grid-template-columns: repeat(3, 1fr); }
  .metric-grid-compact { grid-template-columns: repeat(3, 1fr); }
  .management-card-grid { grid-template-columns: repeat(2, 1fr); }
  .microservice-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 760px) {
  .login-shell { display: block; }
  .login-story { display: none; }
  .login-panel { min-height: 100vh; padding: 28px 22px; }
  .mobile-brand { display: flex; position: absolute; top: 28px; left: 24px; }
  .login-card { padding-top: 75px; }
  .sidebar { position: static; width: 100%; padding: 18px 20px; }
  .sidebar > .brand { padding: 0; border: 0; }
  .nav-list, .sidebar-foot { display: none; }
  .main-content { margin-left: 0; padding: 0 16px 28px; }
  .topbar { align-items: flex-start; min-height: auto; margin: 0 -16px 20px; padding: 22px 16px; }
  .topbar-actions { gap: 10px; }
  .refresh-state { display: none; }
  .user-chip { padding-left: 0; border-left: 0; }
  .user-chip div { display: none; }
  .metric-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .metric-grid-compact { grid-template-columns: 1fr 1fr; }
  .route-fields, .channel-grid { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .field-wide { grid-column: auto; }
  .metric-card { min-height: 135px; padding: 17px; }
  .metric-card > strong { font-size: 29px; }
  .component-row { grid-template-columns: 38px minmax(0, 1fr) 76px; }
  .latency { display: none; }
  .service-grid { grid-template-columns: 1fr 1fr; }
  .management-card-grid { grid-template-columns: 1fr; }
  .microservice-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .metric-grid { grid-template-columns: 1fr; }
  .metric-grid-compact { grid-template-columns: 1fr; }
  .route-actions { flex-direction: column; }
  .compact-button, .secondary-button, .danger-button { width: 100%; }
  .service-grid { grid-template-columns: 1fr; }
  .microservice-grid { grid-template-columns: 1fr; }
  .component-row { grid-template-columns: 36px minmax(0, 1fr); }
  .component-row .health-pill { grid-column: 2; justify-self: start; }
}
