body {
    font-family: Arial, sans-serif;
    margin: 20px;
}

h1 {
    margin-bottom: 10px;
}

form {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

form label {
    margin-right: 10px;
}

form select,
form input[type="text"] {
    margin-right: 10px;
    margin-bottom: 5px;
}

#solution-search {
    max-width: 420px;
    margin-bottom: 10px;
}

.search-primary-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
    background-color: #e8edf5;
    border-radius: 6px;
    padding: 4px 6px;
}

.search-primary-row select {
    flex: 1;
}

#open-instance-form {
    margin-bottom: 6px;
}

.search-secondary-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: 2px;
}

.search-label {
    font-size: 0.85em;
    color: #888;
    white-space: nowrap;
}

.search-secondary-row input[type="text"] {
    font-size: 0.85em;
    color: #555;
    border: 1px solid #ccc;
    border-radius: 3px;
    padding: 2px 6px;
    flex: 1;
    min-width: 0;
}

.search-secondary-row input[type="text"]::placeholder {
    color: #aaa;
    font-style: italic;
}

button {
    padding: 8px 12px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

button:hover:not(:disabled) {
    background-color: #0056b3;
}

button:disabled {
    background-color: #b3c3d4;
    cursor: not-allowed;
}

.status-btn {
    background: rgba(255, 255, 255, 0.45);
    border: 1px solid rgba(0, 0, 0, 0.18);
    border-radius: 4px;
    padding: 1px 8px;
    font-size: 11px;
    font-family: inherit;
    color: inherit;
    cursor: pointer;
    white-space: nowrap;
}

.status-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.75);
    background-color: unset;
    border-color: rgba(0, 0, 0, 0.4);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
}

.status-btn:disabled {
    background: rgba(255, 255, 255, 0.25);
    background-color: unset;
    cursor: default;
}

table {
    border-collapse: collapse;
    width: 100%;
    margin: 0;
    font-size: 12px;
}

#demandTable tbody td {
    white-space: nowrap;
}

#demandTable tr.demand-details td {
    white-space: normal;
    word-break: break-all;
    overflow-wrap: break-word;
}

table tr {
    border-bottom: 1px solid #ccc;
}

.ssm-params-table {
    table-layout: fixed;
}

.ssm-params-table th:first-child,
.ssm-params-table td:first-child {
    width: 140px;
}

.ssm-params-table td.ssm-value-cell {
    overflow: hidden;
}

.ssm-params-table td.ssm-value-cell pre {
    margin: 0;
    overflow-x: auto;
    word-break: normal;
}

table td,
table th {
    padding: 5px;
    word-break: break-all;
    border: 1px solid #ccc;
    text-align: left;
}

thead th {
    background-color: #dde5f2;
}

#demandTable th {
    cursor: pointer;
}

#kiosksTable th {
    cursor: pointer;
}

#kiosksTable tbody tr {
    cursor: pointer;
}

#kiosksTable {
    table-layout: fixed;
    width: 575px;
}

#kiosksTable th:nth-child(1),
#kiosksTable td:nth-child(1) {
    width: 210px;
}

#kiosksTable th:nth-child(2),
#kiosksTable td:nth-child(2) {
    width: 210px;
}

#kiosksTable th:nth-child(3),
#kiosksTable td:nth-child(3) {
    width: 75px;
}

#kiosksTable th:nth-child(4),
#kiosksTable td:nth-child(4) {
    width: 80px;
}

.kiosks-layout {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.kiosks-table-wrap {
    flex: 0 1 auto;
    min-width: 0;
}

.kiosk-detail-panel {
    flex: 1;
    min-width: 0;
    position: sticky;
    top: 10px;
    background-color: #f7f9fd;
    border-radius: 6px;
    padding: 8px 10px;
}

.kiosk-detail-panel h3 {
    margin: 0 0 8px;
    word-break: break-all;
}

.kiosk-detail-placeholder {
    color: #888;
    font-style: italic;
}

.kiosk-detail-summary {
    display: grid;
    grid-template-columns: 90px 1fr;
    row-gap: 4px;
    margin: 0 0 12px;
    font-size: 13px;
}

.kiosk-detail-summary dt {
    font-weight: bold;
}

.kiosk-detail-summary dd {
    margin: 0;
}

.kiosk-status-legend {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 4px 8px;
    margin: 0 0 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ccc;
    font-size: 11px;
    align-items: center;
}

.kiosk-status-legend dt {
    padding: 1px 6px;
    border-radius: 3px;
    white-space: nowrap;
    font-weight: bold;
}

.kiosk-status-legend dd {
    margin: 0;
    color: #555;
}

.kiosk-detail-selected {
    background-color: #e6f3e4;
    border-radius: 0 0 6px 6px;
    padding: 8px 10px;
    margin: 0 -10px -8px;
}

.kiosk-detail-selected .ssm-params-table {
    background-color: white;
}

table tr:hover {
    background-color: rgb(248, 240, 230) !important;
}

tr.row-stripe {
    background-color: #f3f3f3;
}

tr.selected-instance {
    background-color: #e6f3e4 !important;
}

tr.demand-details {
    background-color: rgb(255, 251, 245);
    box-shadow: inset 0 0 5px rgba(107, 96, 80, 0.5);
}

tr.demand-details td {
    padding-top: 8px;
    padding-bottom: 8px;
    font-size: 11px;
}

.schedule-cell {
    text-align: left;
    color: burlywood;
    padding-left: 6px;
    font-size: 16px;
}

.content-triangle {
    color: burlywood;
    font-size: 16px;
    margin-right: 3px;
}

.features-list {
    margin: 2px 0;
    padding-left: 14px;
}

tr.secure-string {
    color: red;
}

fieldset {
    margin-bottom: 10px;
    background-color: white;
}

#envContainer {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

#envContainer>fieldset {
    flex: 1;
    min-width: 0;
    background-color: #f7f9fd;
    border-radius: 6px;
    padding: 4px 6px;
}

#page-header {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 10px;
}

#header-left {
    flex-shrink: 0;
}

#header-left h1 {
    margin-bottom: 2px;
}

.app-version {
    font-size: 70%;
    color: grey;
    font-style: italic;
    margin-bottom: 8px;
}

#header-panels {
    flex: 1;
    display: flex;
    gap: 12px;
    min-width: 0;
}

#header-panels .version-panel {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.version-panel {
    padding: 5px 10px;
    border-radius: 5px;
    background-color: #dde5f2;
    font-size: small;
    min-width: 0;
}

.version-panel-selected {
    background-color: #e6f3e4;
}

.status-banner {
    background-color: #f5e6cf;
    border-radius: 6px;
    padding: 6px 10px;
    margin-bottom: 10px;
}

.status-banner p {
    margin: 0;
}

.status-banner select {
    margin-top: 6px;
}

#demandTable thead th {
    white-space: nowrap;
}

.version-title {
    font-size: x-small;
    font-weight: bold;
    text-align: center;
    margin-bottom: 4px;
    min-height: 2.8em;
}

.version-cols {
    display: flex;
    gap: 12px;
}

.version-cols table {
    flex: 1;
    font-size: x-small;
    border: none;
    margin: 0;
    min-width: 0;
    table-layout: fixed;
    border-collapse: collapse;
}

.version-cols tr {
    border-bottom: none;
}

.version-cols tr:hover {
    background-color: transparent !important;
}

.version-cols td {
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    padding: 1px 4px;
    overflow: hidden;
}

.version-col-key {
    width: 40%;
    font-weight: bold;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.version-col-value {
    word-break: break-word;
    overflow-wrap: break-word;
    background-color: white;
}

.diff {
    color: red;
    font-weight: bold;
}

.version-recent-change {
    display: block;
    font-style: italic;
    font-weight: normal;
}

.search-status-row {
    margin-top: 4px;
}

#response {
    display: inline-flex;
    align-items: center;
    color: burlywood;
    font-size: 0.85em;
    white-space: nowrap;
}

.refresh-cache {
    cursor: pointer;
}

#fetchStatus {
    font-size: 70%;
    color: grey;
    font-style: italic;
    margin-bottom: 10px;
}

nav.tabs {
    margin-top: 10px;
    margin-bottom: 10px;
    border-bottom: 1px solid #ccc;
}

nav.tabs button {
    background-color: inherit;
    color: black;
    border: none;
    padding: 10px 16px;
    border-radius: 10px 10px 0 0;
}

nav.tabs button:hover {
    background-color: rgb(248, 240, 230);
}

nav.tabs button.active {
    background-color: burlywood;
}

.content-cell {
    position: relative;
}

.custom-tooltip {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 10;
    background-color: rgba(255, 255, 255, 0.95);
    padding: 5px;
    border: 0.5px solid rgb(151, 143, 133);
    border-radius: 5px;
    white-space: nowrap;
}

.custom-tooltip ul {
    margin-block-start: 0.5em;
    margin-block-end: 0.5em;
    padding-inline-start: 20px;
    padding-inline-end: 20px;
}

.spinner-wrap {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(0, 0, 0, 0.15);
    border-top-color: #007bff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

.spinner-label {
    color: burlywood;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}