.device-proxy-summary { display: grid; min-width: 0; max-width: 100%; }
.device-proxy-open { justify-self: start; padding: 3px 0; min-height: 28px; color: var(--brand); font-weight: 400; font-size: 13px; font-variant-numeric: tabular-nums; }
.device-proxy-dialog { width: min(620px, calc(100vw - 32px)); max-width: none; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); padding: 0; border: 1px solid var(--border); border-radius: 14px; color: var(--text); background: var(--surface); box-shadow: 0 24px 70px rgba(17, 22, 35, .2); font: inherit; overflow: auto; }
.device-proxy-dialog::backdrop { background: rgba(17, 22, 35, .55); }
.device-proxy-dialog .modal-header > div { min-width: 0; }
.device-proxy-dialog .modal-header small { display: block; margin-top: 4px; overflow-wrap: anywhere; }
.device-proxy-dialog .modal-header button { flex: none; }
.device-proxy-dialog .modal-body > p { margin: 0 0 16px; font-size: .8rem; line-height: 1.6; }
.device-proxy-field { display: grid; gap: 7px; min-width: 0; margin-bottom: 17px; }
.device-proxy-field label { font-size: .85rem; font-weight: 500; }
.device-proxy-field textarea { display: block; width: 100%; min-width: 0; max-width: 100%; min-height: 80px; resize: vertical; font: inherit; font-size: .85rem; line-height: 1.5; overflow-wrap: anywhere; }
.device-proxy-field input { width: 100%; min-width: 0; font: inherit; font-size: .85rem; }
.device-proxy-field-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.device-proxy-dialog .device-proxy-status { margin: 0; color: var(--muted); overflow-wrap: anywhere; }
.device-proxy-dialog .modal-footer { flex-wrap: wrap; }
.device-proxy-dialog button { font-weight: 400; }
.device-proxy-dialog button[hidden] { display: none; }
@media (min-width: 781px) {
    #mainContent:has(#tab-runtime-center.active #runtimeRealtimeView:not([hidden])) { padding-inline: 24px; }
    #runtimeRealtimeView .toolbar { display: grid; grid-template-columns: minmax(210px, 1fr) 125px 125px max-content max-content max-content; gap: 12px; padding: 18px 18px 17px; background: var(--surface); align-items: end; }
    #runtimeRealtimeView .toolbar .field { min-width: 0; }
    #runtimeRealtimeView .toolbar label { font-size: 13px; color: #4b5565; }
    #runtimeRealtimeView .toolbar .form-control { height: 40px; min-width: 0; font-size: 14px; }
    #runtimeRealtimeView .runtime-layout { height: 40px; align-items: center; }
    #runtimeRealtimeView .runtime-layout button { padding: 7px 10px; }
    #runtimeRealtimeView #deviceAccountPurposeBatchButton, #runtimeRealtimeView #runtimeRefreshButton { justify-self: start; white-space: nowrap; }
    #runtimeRealtimeView .runtime-device-table { width: 100%; min-width: 940px; table-layout: fixed; }
    #runtimeRealtimeView .runtime-device-table th { padding: 14px 10px; font-size: 13px; color: #536174; font-weight: 500; letter-spacing: 0; }
    #runtimeRealtimeView .runtime-device-table th:nth-child(1) { width: 7%; }
    #runtimeRealtimeView .runtime-device-table th:nth-child(2) { width: 21%; }
    #runtimeRealtimeView .runtime-device-table th:nth-child(3) { width: 9%; }
    #runtimeRealtimeView .runtime-device-table th:nth-child(4) { width: 13%; }
    #runtimeRealtimeView .runtime-device-table th:nth-child(5) { width: 19%; }
    #runtimeRealtimeView .runtime-device-table th:nth-child(6) { width: 11%; }
    #runtimeRealtimeView .runtime-device-table th:nth-child(7) { width: 11%; }
    #runtimeRealtimeView .runtime-device-table th:nth-child(8) { width: 9%; }
    #runtimeRealtimeView .runtime-device-table td { padding: 15px 10px; background: var(--surface); font-size: 14px; color: #273345; }
    #runtimeRealtimeView .runtime-device-table td:first-child, #runtimeRealtimeView .runtime-device-table th:first-child { padding-left: 18px; }
    #runtimeRealtimeView .runtime-device-table .runtime-country-heading td { padding: 0; background: #f2eff9; border-block: 1px solid #e8e3f1; }
    #runtimeRealtimeView .runtime-country-heading button { min-height: 42px; padding: 10px 18px; gap: 9px; }
    #runtimeRealtimeView .runtime-number-edit, #runtimeRealtimeView .runtime-device-number { display: block; max-width: 100%; padding: 4px 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    #runtimeRealtimeView .runtime-row-actions { flex-direction: column; align-items: flex-start; gap: 3px; }
    #runtimeRealtimeView .runtime-row-actions > .runtime-device-more-button { min-height: 24px; }
}

/* Compact runtime presentation shares the existing device and registration actions. */
#runtimeRealtimeView .runtime-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 17px 0; margin-bottom: 16px; }
#runtimeRealtimeView .runtime-summary > div { padding: 0 22px; border-right: 1px solid var(--border); }
#runtimeRealtimeView .runtime-summary > div:last-child { border-right: 0; }
#runtimeRealtimeView .runtime-summary span { display: block; margin-bottom: 6px; color: #5c6879; font-size: 12px; }
#runtimeRealtimeView .runtime-summary strong { color: #29394e; font-size: 26px; font-weight: 600; line-height: 1.25; }
#runtimeRealtimeView .runtime-summary small { margin-left: 7px; color: #6b7686; font-size: 12px; }
#runtimeRealtimeView .runtime-remark-line { display: flex; align-items: center; gap: 7px; min-width: 0; }
#runtimeRealtimeView .runtime-remark-line .runtime-device-name { min-width: 0; flex: 0 1 auto; }
#runtimeRealtimeView .runtime-remark-edit { border: 0; padding: 3px; background: transparent; color: var(--brand); font: inherit; font-size: 12px; white-space: nowrap; cursor: pointer; }
#runtimeRealtimeView .runtime-remark-edit:hover { text-decoration: underline; }
#runtimeRealtimeView .runtime-country-heading strong { color: #3f315d; font-size: 14px; font-weight: 500; }
#runtimeRealtimeView .runtime-country-heading img { width: 23px; height: 16px; box-shadow: 0 0 0 1px #00000009; }
#runtimeRealtimeView .runtime-number-edit, #runtimeRealtimeView .runtime-device-number { justify-self: start; justify-content: flex-start; color: #6737ba; font-size: 14px; font-weight: 500; }
#runtimeRealtimeView .runtime-device-identity { gap: 5px; width: 100%; }
#runtimeRealtimeView .runtime-device-serial { display: flex; align-items: baseline; gap: 8px; min-width: 0; max-width: 100%; font-size: 13px; line-height: 1.5; color: #3e4c60; }
#runtimeRealtimeView .runtime-device-serial-label { flex: none; color: #5c687a; font-size: 12px; }
#runtimeRealtimeView .runtime-device-serial-value { min-width: 0; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; overflow-wrap: anywhere; }
#runtimeRealtimeView .device-proxy-summary { gap: 6px; align-content: center; }
#runtimeRealtimeView .device-proxy-provider { display: block; max-width: 100%; font-size: 13px; line-height: 1.5; color: #3e4c60; overflow-wrap: anywhere; }
#runtimeRealtimeView .runtime-device-name { display: block; max-width: 100%; border: 0; padding: 2px 0; background: transparent; color: #202b3c; font: inherit; font-size: 14px; font-weight: 500; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
#runtimeRealtimeView .runtime-device-name:hover { color: #6737ba; text-decoration: underline; }
#runtimeRealtimeView .runtime-device-meta { display: block; max-width: 100%; font-size: 12px; line-height: 1.5; color: #526176; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#runtimeRealtimeView .runtime-heartbeat { display: block; margin-top: 8px; color: #576375; font-size: 12px; line-height: 1.5; white-space: nowrap; }
#runtimeRealtimeView .badge { padding: 4px 7px; font-size: 12px; font-weight: 500; }
#runtimeRealtimeView .runtime-current-execution { gap: 7px; min-width: 0; }
#runtimeRealtimeView .runtime-current-execution strong { max-width: 100%; font-size: 14px; font-weight: 500; line-height: 1.5; white-space: normal; overflow-wrap: anywhere; }
#runtimeRealtimeView .runtime-current-execution small { max-width: 100%; font-size: 12px; color: #526176; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#runtimeRealtimeView .runtime-registration-summary { min-width: 0; gap: 7px; }
#runtimeRealtimeView .runtime-registration-totals { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px; min-width: 0; font-size: 14px; font-variant-numeric: tabular-nums; }
#runtimeRealtimeView .runtime-registration-primary { color: #6136ae; font-size: 14px; font-weight: 500; white-space: nowrap; }
#runtimeRealtimeView .runtime-registration-total { border: 0; padding: 0; background: transparent; color: #536174; font: inherit; font-size: 13px; white-space: nowrap; }
#runtimeRealtimeView button.runtime-registration-total { cursor: pointer; }
#runtimeRealtimeView button.runtime-registration-total:hover { text-decoration: underline; }
#runtimeRealtimeView .runtime-success-rate { margin-left: 6px; padding: 2px 6px; border-radius: 5px; background: #f2edf9; color: #6741a4; font-size: 12px; font-weight: 500; white-space: nowrap; }
#runtimeRealtimeView .runtime-registration-breakdown { display: flex; flex-wrap: wrap; gap: 4px 8px; color: #526176; font-size: 12px; line-height: 1.5; }
#runtimeRealtimeView .runtime-registration-breakdown > * { color: #526176; white-space: nowrap; }
#runtimeRealtimeView .runtime-last-success { min-width: 0; gap: 7px; }
#runtimeRealtimeView .runtime-last-success strong { font-size: 14px; font-weight: 500; white-space: normal; }
#runtimeRealtimeView .runtime-last-success small, #runtimeRealtimeView .runtime-last-success-empty { color: #526176; font-size: 12px; overflow-wrap: anywhere; }
#runtimeRealtimeView .device-proxy-open { max-width: 100%; border-bottom: 1px dashed #c5afd9; border-radius: 0; color: #6136ae; font-size: 14px; font-weight: 500; overflow-wrap: anywhere; }
#runtimeRealtimeView .runtime-row-actions { display: flex; min-width: 0; }
#runtimeRealtimeView .runtime-row-actions > .btn { max-width: 100%; padding: 4px 0; color: #6136ae; font-size: 13px; white-space: nowrap; }
#runtimeRealtimeView .runtime-row-actions > .runtime-device-more-button { color: #536174; font-size: 12px; }
#runtimeRealtimeView .runtime-table-footer { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; padding: 14px 18px; color: #536174; font-size: 12px; background: var(--surface); border-top: 1px solid var(--border); border-radius: 0 0 var(--radius) var(--radius); }
#runtimeRealtimeView .runtime-table-footer .runtime-stats-freshness { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; min-width: 0; margin: 0; }
#runtimeRealtimeView .runtime-table-footer .runtime-stats-freshness strong { font-size: 12px; font-weight: 400; }
#runtimeRealtimeView .runtime-table-footer .runtime-stats-freshness small { font-size: 12px; }

.runtime-device-menu { position: fixed; inset: auto; z-index: 100; min-width: 142px; max-width: calc(100vw - 24px); margin: 0; padding: 6px; border: 1px solid #ddd8e8; border-radius: 8px; background: var(--surface); color: var(--text); box-shadow: 0 6px 18px #20293818; }
.runtime-device-menu[hidden] { display: none; }
.runtime-device-menu > button { display: flex; justify-content: flex-start; width: 100%; border: 0; border-radius: 5px; padding: 9px 10px; background: transparent; color: #34435b; font: inherit; font-size: 13px; font-weight: 400; text-align: left; cursor: pointer; }
.runtime-device-menu > button:hover, .runtime-device-menu > button:focus-visible { background: var(--brand-soft); color: var(--brand); }
.runtime-device-details-dialog { width: min(490px, calc(100vw - 28px)); max-width: none; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); padding: 0; border: 1px solid #e1dce9; border-radius: 16px; color: #273345; background: var(--surface); box-shadow: 0 24px 80px #16213c30; font: inherit; overflow: auto; }
.runtime-device-details-dialog::backdrop { background: #17213b55; }
.runtime-device-details-dialog .modal-header, .runtime-device-details-dialog .modal-body { padding: 24px; }
.runtime-device-details-dialog .modal-header > div { min-width: 0; }
.runtime-device-details-dialog .modal-header h3 { font-size: 20px; font-weight: 600; overflow-wrap: anywhere; }
.runtime-device-details-dialog .modal-header button { flex: none; }
.runtime-device-details-grid { display: grid; grid-template-columns: 95px minmax(0, 1fr); gap: 18px 12px; margin: 0; font-size: 14px; line-height: 1.5; }
.runtime-device-details-grid dt { color: #637084; }
.runtime-device-details-grid dd { min-width: 0; margin: 0; overflow-wrap: anywhere; }
.runtime-device-details-dialog .modal-body > .runtime-device-model-note { margin: 24px 0 0; font-size: 12px; line-height: 1.7; color: #647185; }
#runtimeRealtimeView button:focus-visible, .runtime-device-menu > button:focus-visible, .runtime-device-details-dialog button:focus-visible { outline: 2px solid #a78ad1; outline-offset: 3px; }

@media (min-width: 781px) and (max-width: 1100px) {
    #runtimeRealtimeView .toolbar { grid-template-columns: minmax(180px, 1fr) 120px 120px; gap: 8px; }
    #runtimeRealtimeView .runtime-summary > div { padding-inline: 16px; }
    #runtimeRealtimeView .runtime-layout { justify-self: start; }
    #runtimeRealtimeView #runtimeRefreshButton { justify-self: start; }
}
@media (max-width: 780px) {
    .device-proxy-open { min-height: 38px; }
    .device-proxy-dialog { width: calc(100vw - 24px); max-height: calc(100dvh - 24px); }
    .device-proxy-dialog .modal-header, .device-proxy-dialog .modal-body { padding: 14px; }
    .device-proxy-dialog .modal-footer { padding: 12px 14px; }
    .device-proxy-field textarea, .device-proxy-field input { font-size: 16px; }
    .device-proxy-dialog button { min-height: 40px; max-width: 100%; white-space: normal; }
    #runtimeRealtimeView .toolbar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 13px; }
    #runtimeRealtimeView .toolbar .search { grid-column: 1 / -1; }
    #runtimeRealtimeView .toolbar .form-control { min-width: 0; width: 100%; }
    #runtimeRealtimeView .runtime-layout { grid-column: 1 / -1; justify-self: start; }
    #runtimeRealtimeView .runtime-layout button { padding: 8px; font-size: 12px; }
    #runtimeRealtimeView #deviceAccountPurposeBatchButton { justify-self: start; white-space: nowrap; }
    #runtimeRealtimeView #runtimeRefreshButton { justify-self: end; }
    #runtimeRealtimeView .runtime-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 15px 0; }
    #runtimeRealtimeView .runtime-summary > div { padding-inline: 16px; }
    #runtimeRealtimeView .runtime-summary > div:nth-child(2) { border-right: 0; }
    #runtimeRealtimeView .runtime-summary strong { font-size: 24px; }
    #runtimeRealtimeView .runtime-device-table { min-width: 0; }
    #runtimeRealtimeView .runtime-device-name, #runtimeRealtimeView .runtime-device-meta, #runtimeRealtimeView .runtime-current-execution small, #runtimeRealtimeView .runtime-heartbeat { white-space: normal; overflow-wrap: anywhere; }
    #runtimeRealtimeView .runtime-device-name, #runtimeRealtimeView .runtime-number-edit { min-height: 38px; }
    #runtimeRealtimeView .runtime-number-edit { display: block; max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
    #runtimeRealtimeView .runtime-row-actions { flex-wrap: wrap; align-items: center; gap: 4px 14px; }
    #runtimeRealtimeView .runtime-row-actions > .btn { min-height: 38px; }
    #runtimeRealtimeView .runtime-device-table tr.runtime-country-heading { padding: 0; border: 0; }
    #runtimeRealtimeView .runtime-device-table .runtime-country-heading td { display: block; padding: 0; border-radius: 8px; }
    #runtimeRealtimeView .runtime-device-table .runtime-country-heading td::before { display: none; }
    #runtimeRealtimeView .runtime-table-footer { align-items: flex-start; flex-direction: column; padding: 12px 14px; }
    #runtimeRealtimeView .runtime-table-footer .runtime-stats-freshness { align-items: flex-start; gap: 5px; }
    .runtime-device-menu > button { min-height: 40px; }
    .runtime-device-details-dialog .modal-header, .runtime-device-details-dialog .modal-body { padding: 18px; }
    .runtime-device-details-dialog .modal-header h3 { font-size: 18px; }
    .runtime-device-details-grid { grid-template-columns: 82px minmax(0, 1fr); gap: 16px 10px; }
}

.runtime-proxy-expiry-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-top: 1px solid var(--border); padding: 10px 18px 14px; }
.runtime-proxy-expiry-filters { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.runtime-proxy-expiry-filters > span { font-size: 12px; color: var(--muted); margin-right: 6px; }
.runtime-proxy-expiry-filters button { font: inherit; font-size: 12px; font-weight: 400; padding: 6px 11px; border: 1px solid var(--border); border-radius: 6px; color: #526176; background: var(--surface); cursor: pointer; }
.runtime-proxy-expiry-filters button b { font-weight: 500; margin-left: 6px; color: #738096; }
.runtime-proxy-expiry-filters button[aria-pressed="true"] { color: var(--brand); border-color: #e1d2ff; background: var(--brand-soft); }
.runtime-proxy-expiry-filters button[aria-pressed="true"] b { color: var(--brand); }
.runtime-proxy-expiry-sort { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 400; white-space: nowrap; color: #526176; cursor: pointer; }
.runtime-proxy-expiry-sort input { accent-color: var(--brand); width: 14px; height: 14px; }
.runtime-proxy-expiry-zone { display: block; font-size: 10px; font-weight: 400; color: #707987; margin-top: 2px; }
.runtime-proxy-expiry-status { margin: 0; padding: 0 18px 12px; color: #986310; font-size: 12px; }
.runtime-proxy-expiry-status[hidden] { display: none; }
#runtimeRealtimeView .device-proxy-summary { grid-template-columns: max-content minmax(0, 1fr); align-items: center; gap: 6px 8px; }
#runtimeRealtimeView .device-proxy-summary .device-proxy-open { font-size: 13px; min-height: 0; padding: 0; font-weight: 400; }
#runtimeRealtimeView .device-proxy-provider { min-width: 0; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #617085; }
.device-proxy-expiry-date { grid-column: 1 / -1; font: inherit; font-size: 13px; font-weight: 400; font-variant-numeric: tabular-nums; padding: 0; border: 0; background: transparent; text-align: left; color: #26364b; white-space: nowrap; justify-self: start; cursor: pointer; }
.device-proxy-expiry-date:hover { text-decoration: underline; color: var(--brand); }
.device-proxy-expiry-date.soon { color: #99610b; }
.device-proxy-expiry-date.expired { color: #b53b45; }
.device-proxy-expiry-date.unset, .device-proxy-expiry-date.unknown { color: #707987; }
.device-proxy-expiry-note { grid-column: 1 / -1; display: flex; align-items: center; flex-wrap: wrap; gap: 5px 7px; font-size: 11px; line-height: 18px; }
.device-proxy-expiry-note > span { border-radius: 4px; padding: 1px 6px; background: #f5f6f9; color: #677385; }
.device-proxy-expiry-note.soon > span { color: #99610b; background: #fff4dc; }
.device-proxy-expiry-note.expired > span { color: #b53b45; background: #ffedf0; }
.device-proxy-expiry-note button { border: 0; padding: 0; background: none; color: var(--brand); font: inherit; font-size: 11px; font-weight: 400; cursor: pointer; }
#runtimeRealtimeView .device-proxy-summary:has(.expired) { border-left: 2px solid #e9a8ad; padding-left: 9px; margin-left: -11px; }
.device-proxy-current-summary { display: grid; gap: 8px; padding: 14px; background: #f7f5fb; border-radius: 8px; margin-bottom: 21px; font-size: 13px; overflow-wrap: anywhere; }
.device-proxy-current-summary > span:last-child { font-size: 12px; color: #805b1e; }
.device-proxy-field-note { font-size: 12px; color: #677385; line-height: 1.7; }
#deviceProxyExpiresInput { height: 44px; }
#deviceProxyExpiresClear { justify-self: start; }
.device-proxy-fields { border: 1px solid var(--border); border-radius: 8px; margin-bottom: 16px; }
.device-proxy-fields > summary { padding: 13px; cursor: pointer; font-size: 13px; color: #4e5d74; }
.device-proxy-fields[open] > summary { border-bottom: 1px solid var(--border); }
.device-proxy-fields-content { padding: 16px 14px 0; }
.device-proxy-fields-content > p { margin: 0 0 16px; font-size: 12px; line-height: 1.7; }
.device-proxy-dialog button:focus-visible, .device-proxy-fields > summary:focus-visible { outline: 2px solid #a78ad1; outline-offset: 3px; }
@media (min-width: 781px) {
    #runtimeRealtimeView .runtime-device-table { min-width: 1080px; }
    #runtimeRealtimeView .runtime-device-table th:nth-child(1) { width: 5%; }
    #runtimeRealtimeView .runtime-device-table th:nth-child(2) { width: 20%; }
    #runtimeRealtimeView .runtime-device-table th:nth-child(3) { width: 8%; }
    #runtimeRealtimeView .runtime-device-table th:nth-child(4) { width: 13%; }
    #runtimeRealtimeView .runtime-device-table th:nth-child(5) { width: 16%; }
    #runtimeRealtimeView .runtime-device-table th:nth-child(6) { width: 10%; }
    #runtimeRealtimeView .runtime-device-table th:nth-child(7) { width: 19%; }
    #runtimeRealtimeView .runtime-device-table th:nth-child(8) { width: 9%; }
}
@media (max-width: 780px) {
    .runtime-proxy-expiry-toolbar { padding: 12px 14px; align-items: flex-start; flex-wrap: wrap; gap: 12px; }
    .runtime-proxy-expiry-filters { gap: 6px; }
    .runtime-proxy-expiry-filters > span { width: 100%; margin-bottom: 2px; }
    .runtime-proxy-expiry-filters button { padding: 7px 9px; min-height: 36px; }
    .runtime-proxy-expiry-sort { margin-left: auto; min-height: 32px; }
    .runtime-proxy-expiry-zone { display: none; }
    #runtimeRealtimeView .device-proxy-summary { gap: 7px; }
    #runtimeRealtimeView .device-proxy-summary .device-proxy-open { min-height: 28px; }
    .device-proxy-expiry-date { font-size: 12px; min-height: 28px; white-space: normal; }
    .device-proxy-expiry-note button { min-height: 28px; }
    #runtimeRealtimeView .device-proxy-summary:has(.expired) { margin-left: 0; padding-left: 8px; }
}
