.sa-shell { color: var(--text); padding: 20px 24px 36px; max-width: 1800px; margin: auto; }
.sa-header { display: flex; justify-content: space-between; gap: 24px; align-items: center; margin-bottom: 22px; }
.sa-header h2 { font-size: clamp(24px, 2.3vw, 34px); letter-spacing: .02em; margin: 5px 0 9px; }
.sa-header p, .sa-section-head p, .sa-hint { color: var(--muted); line-height: 1.5; font-size: 12px; margin: 0; }
.sa-kicker { color: #7fd5c9; letter-spacing: .19em; font-size: 11px; font-weight: 700; }
.sa-layout { display: grid; grid-template-columns: 250px minmax(400px, 1fr) 290px; align-items: start; gap: 16px; }
.sa-card, .sa-stat { border: 1px solid rgba(127, 213, 201, .16); background: linear-gradient(145deg, rgba(17, 39, 52, .94), rgba(9, 24, 35, .96)); box-shadow: 0 14px 38px rgba(0,0,0,.16); border-radius: 12px; }
.sa-card { padding: 17px; }
.sa-card h3 { font-size: 15px; margin: 0 0 14px; letter-spacing: .025em; }
.sa-card h3 small { float: right; color: #8eaaae; font-weight: 400; font-size: 11px; }
.sa-roster, .sa-controls { display: grid; gap: 15px; }
.sa-card label { display: grid; gap: 6px; font-size: 12px; color: var(--muted); margin: 11px 0; }
.sa-card select, .sa-card input[type="number"] { width: 100%; background: #0a1c29; color: var(--text); border: 1px solid rgba(127,213,201,.22); border-radius: 7px; padding: 9px 10px; font: inherit; }
.sa-card select:focus, .sa-card input:focus { outline: 2px solid rgba(127,213,201,.45); outline-offset: 1px; }
.sa-button { border: 1px solid rgba(127,213,201,.35); background: linear-gradient(135deg, #15605e, #0d383e); color: #f2fffa; border-radius: 7px; padding: 9px 13px; font: inherit; font-size: 12px; font-weight: 650; cursor: pointer; }
.sa-button:hover:not(:disabled) { filter: brightness(1.17); }
.sa-button.danger { border-color: rgba(255,179,71,.42); background: linear-gradient(135deg, #84452c, #573621); }
.sa-button:disabled { opacity: .42; cursor: not-allowed; }
.sa-gw-list { display: grid; gap: 7px; max-height: 380px; overflow: auto; }
.sa-gw { display: grid; gap: 4px; text-align: left; color: var(--text); border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.035); border-radius: 8px; padding: 10px; cursor: pointer; }
.sa-gw.selected { border-color: #68cdbd; background: rgba(74,174,165,.13); }
.sa-gw span { color: var(--muted); font-size: 11px; }
.sa-roster > .sa-button { width: 100%; }
.sa-main, .sa-controls { min-width: 0; }
.sa-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 11px; margin-bottom: 16px; }
.sa-stat { padding: 17px 18px; display: grid; gap: 7px; }
.sa-stat span { color: var(--muted); font-size: 12px; }
.sa-stat strong { font-size: 29px; line-height: 1; font-variant-numeric: tabular-nums; }
.sa-stat.occupied strong { color: #ffb47a; }.sa-stat.free strong { color: #66dfaf; }.sa-stat.unknown strong { color: #97aeb2; }
.sa-map { min-height: 540px; }.sa-section-head { display: flex; align-items: start; justify-content: space-between; gap: 12px; }.sa-section-head h3 { margin-bottom: 4px; }
.sa-legend { display: flex; gap: 17px; color: var(--muted); font-size: 11px; padding: 16px 0 12px; }
.sa-legend span { display: flex; align-items: center; gap: 6px; }.sa-legend i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.sa-legend i.free { background: #36ca90; }.sa-legend i.occupied { background: #f89c59; }.sa-legend i.unknown { background: #65818b; }
.sa-grid-wrap { max-height: 585px; overflow: auto; padding-right: 5px; }
.sa-line { display: flex; align-items: center; gap: 7px; padding: 5px 2px; border-top: 1px solid rgba(255,255,255,.045); }
.sa-line-label { width: 28px; flex: none; color: #6c8994; font-size: 11px; font-variant-numeric: tabular-nums; }
.sa-space { min-width: 96px; padding: 8px 9px; text-align: left; display: grid; gap: 3px; border-radius: 7px; border: 1px solid transparent; color: #e9f6ef; cursor: pointer; background: #273c46; }
.sa-space b { font-size: 11px; font-variant-numeric: tabular-nums; }.sa-space small { font-size: 10px; opacity: .8; }
.sa-space .sa-space-baseline { font-variant-numeric: tabular-nums; color: #cfe9de; }
.sa-space .sa-space-baseline.missing { color: #9fb4b8; font-style: italic; }
.sa-space .sa-space-xyz { color: #b7d3ff; font-variant-numeric: tabular-nums; }
.sa-space.free { background: rgba(38,151,105,.26); border-color: rgba(64,203,143,.3); }.sa-space.occupied { background: rgba(184,101,45,.37); border-color: rgba(255,178,110,.4); }
.sa-space.unknown { color: #a6bdc1; }.sa-space.selected { outline: 2px solid #e7dbc0; outline-offset: 1px; }
.sa-controls > .sa-card { display: grid; }.sa-controls .sa-button { width: 100%; margin-top: 8px; }
.sa-divider { height: 1px; background: var(--line); margin: 17px 0 7px; }
.sa-point-detail { border-radius: 7px; background: rgba(127,213,201,.08); color: #b1d8d0; padding: 9px; font-size: 11px; line-height: 1.5; }
.sa-point-detail > div + div { margin-top: 3px; }
#saConfigEditor { display: grid; gap: 4px; }
#saConfigEditor .sa-hint { color: var(--muted); }
.sa-controls details { margin-top: 13px; color: var(--muted); font-size: 11px; }.sa-controls details pre { max-height: 260px; overflow: auto; font-size: 10px; color: #bfd9d3; }
.sa-batch-list { max-height: 140px; overflow: auto; }.sa-batch-list label { display: flex; align-items: center; gap: 6px; margin: 6px 0; color: var(--text); }.sa-batch-list small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.sa-history { margin-top: 17px; }.sa-history-list { display: grid; margin-top: 8px; max-height: 250px; overflow: auto; }
.sa-history-list > div:not(.sa-empty) { display: grid; grid-template-columns: 160px 110px minmax(120px,1fr) 110px 140px; gap: 12px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line); font-size: 11px; }
.sa-history-list code { color: #89cfc3; }.sa-history-list time, .sa-history-list small { color: var(--muted); }.sa-command-status.applied { color: #63daa0; }.sa-command-status.refused, .sa-command-status.transport_failed, .sa-command-status.no_reply { color: #ff9181; }.sa-command-status.delivered { color: #ffc47b; }
.sa-feedback { border-left: 3px solid #69c8b6; background: rgba(72,170,157,.1); padding: 10px; font-size: 12px; }.sa-empty { color: var(--muted); font-size: 12px; padding: 18px 4px; }
.sa-receive-head { margin-top: 22px; }
.sa-received-list { max-height: 420px; overflow: auto; }
.sa-received-item { padding: 10px 0; border-top: 1px solid var(--line); font-size: 11px; }
.sa-received-item header { display: flex; gap: 12px; flex-wrap: wrap; }
.sa-received-item code { color: #89cfc3; }.sa-received-item time { color: var(--muted); }
.sa-received-item header span { color: #63daa0; }
.sa-received-payload { grid-column: 1 / -1; min-width: 0; margin-top: 7px; }
.sa-received-payload summary { cursor: pointer; color: #89cfc3; }
.sa-received-payload pre { max-height: 240px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 11px; }
@media (max-width: 1250px) { .sa-layout { grid-template-columns: 220px minmax(0, 1fr); }.sa-controls { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 780px) { .sa-shell { padding: 15px; }.sa-layout, .sa-controls { display: block; }.sa-roster, .sa-main, .sa-controls > .sa-card { margin-bottom: 14px; }.sa-stats { grid-template-columns: repeat(2, 1fr); }.sa-history-list > div:not(.sa-empty) { grid-template-columns: 1fr 1fr; } }
