:root { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: #24352c; background: #f6f8f7; font-size: 14px; }
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
button, input { font: inherit; }
button { cursor: pointer; border: 1px solid #d6ded9; background: #fff; color: inherit; padding: 8px 12px; }
button:hover { background: #eef3ef; }
button:disabled { opacity: .5; cursor: wait; }
button:focus-visible, a:focus-visible, .graph-node:focus-visible { outline: 2px solid #24765a; outline-offset: 3px; }
.app-bar { height: 64px; padding: 0 28px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #dce3de; background: #fff; gap: 16px; }
.brand { font-size: 18px; font-weight: 600; color: inherit; text-decoration: none; white-space: nowrap; }
.brand span { font-size: 12px; color: #819087; font-weight: 400; margin-left: 9px; }
.actions { display: flex; align-items: center; gap: 10px; }
#updated { font-size: 11px; color: #7c8981; margin-right: 8px; }
.graph-main { padding: 28px; max-width: 1600px; margin: 0 auto; }
.topology-scroll { overflow-x: auto; }
.topology-scroll svg { display: block; width: 100%; min-width: 940px; }
.graph-heading { fill: #7c8981; font-size: 11px; letter-spacing: 1px; }
.graph-node { cursor: pointer; }
.graph-node rect { fill: #fff; stroke: #d4dcd6; }
.graph-node:hover rect, .graph-node:focus rect, .graph-node.selected rect { stroke: #24765a; stroke-width: 2; }
.graph-title { fill: #24352c; font-size: 13px; font-weight: 600; }
.graph-detail { fill: #738078; font-size: 11px; }
.graph-edge { fill: none; stroke: #bac4be; stroke-width: 1.5; }
.graph-edge.fallback { stroke-dasharray: 5 5; }
.graph-edge.active { stroke: #24765a; stroke-width: 2.5; }
.legend { display: flex; gap: 22px; color: #7c8981; font-size: 11px; margin: 18px 15px 0; }
.legend span::before { content: ''; display: inline-block; width: 20px; border-top: 1.5px solid #bac4be; vertical-align: middle; margin-right: 7px; }
.legend .fallback::before { border-top-style: dashed; }
.legend .active::before { border-color: #24765a; }
.details { position: fixed; right: 0; top: 64px; bottom: 0; width: 370px; max-width: 100%; background: #fff; border-left: 1px solid #d4dcd6; box-shadow: -10px 0 30px #24352c0a; padding: 24px; overflow-y: auto; }
.details header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.details h1 { font-size: 18px; font-weight: 600; margin: 5px 0 22px; overflow-wrap: anywhere; }
.details h2 { font-size: 12px; font-weight: 600; margin: 26px 0 12px; }
.details dl { margin: 0; }
.detail-row { padding: 12px 0; border-bottom: 1px solid #edf0ee; }
.detail-row dt { font-size: 11px; color: #7c8981; margin-bottom: 5px; }
.detail-row dd { font-size: 13px; margin: 0; overflow-wrap: anywhere; }
.detail-link { display: block; width: 100%; text-align: left; margin: 6px 0; }
.note { font-size: 11px; line-height: 1.6; color: #7c8981; }
#error { font-size: 12px; color: #a04432; padding: 12px 15px; }
.loading { color: #7c8981; font-size: 12px; }
.eyebrow { font-size: 10px; letter-spacing: 1px; color: #74857a; }
h1 { font-size: 30px; font-weight: 500; }
.intro { color: #74857a; }
@media(max-width:600px) { .app-bar { padding: 0 16px; } #updated { display: none; } .graph-main { padding: 20px 12px; } .details { width: min(370px, 100%); } }
.login-page { min-height: 100vh; background: #edf1ee; }
.login-main { max-width: 430px; margin: 0 auto; padding: 64px 24px 32px; }
.login-brand { display: block; text-align: center; font-size: 32px; font-weight: 600; letter-spacing: -1px; color: #244134; text-decoration: none; }
.login-brand span { display: block; font-size: 11px; font-weight: 400; letter-spacing: 1px; margin-top: 4px; color: #74857a; }
.login-panel { margin-top: 36px; padding: 32px; background: #fff; border: 1px solid #dce3dd; }
.login-panel h1 { font-size: 30px; margin: 14px 0 10px; }
.login-panel .intro { font-size: 13px; line-height: 1.6; }
.login-panel form { display: grid; margin-top: 26px; gap: 9px; }
.login-panel label { font-size: 12px; color: #52675a; }
.login-panel input { width: 100%; min-width: 0; font: inherit; padding: 11px 12px; border: 1px solid #cad5cd; background: #fafcfb; margin-bottom: 10px; border-radius: 0; }
.login-panel input:focus { outline: 2px solid #4d8061; outline-offset: 1px; }
.login-panel button { margin-top: 5px; width: 100%; background: #244e39; color: #fff; border-color: #244e39; padding: 12px; }
.login-panel button:hover { background: #193d2b; }
.login-note,.login-footer { font-size: 11px; color: #7d8c81; text-align: center; line-height: 1.6; }
.login-note { margin: 22px 0 0; }
.login-footer { margin-top: 24px; }
#login-error { margin: 0 0 8px; color: #a04432; font-size: 12px; line-height: 1.5; }
@media (max-width: 760px) { .login-main { margin: 0 auto; padding: 40px 20px 24px; } .login-panel { padding: 26px; } }

@media(min-width:901px) { .details-open .graph-main { margin-right: 370px; } }

.graph-edge.highlight { stroke: #3266a8; stroke-width: 2.5; }
.graph-node.connected rect { stroke: #3266a8; }
.graph-node.selected rect { stroke: #3266a8; stroke-width: 2.5; }
.graph-node.dimmed { opacity: .3; }
.graph-edge.dimmed { opacity: .12; }

.graph-priority { fill: #3266a8; font-size: 11px; paint-order: stroke; stroke: #f6f8f7; stroke-width: 5px; stroke-linejoin: round; pointer-events: none; }
