.lede {
    max-width: 62rem;
    margin: 0 0 1.5rem;
    font-size: 0.85rem;
    line-height: 1.5;
    color: #8b8b8b;
}

.lede strong {
    color: #b9b9b9;
}

.panel {
    border: 1px solid #33343a;
    border-radius: 6px;
    background: #23242a;
    overflow: hidden;
}

.panel-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.9rem;
    background: #26272d;
    border-bottom: 1px solid #33343a;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #999;
}

.panel-head .spacer {
    margin-left: auto;
}

.panel-body {
    padding: 0.9rem;
}

/* ---------- controls ---------- */

.controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    align-items: center;
    margin-bottom: 1rem;
}

input[type="text"] {
    padding: 0.45rem 0.7rem;
    border: 1px solid #3a3b42;
    border-radius: 5px;
    background: #1a1b20;
    color: #e6e6e6;
    font-size: 0.85rem;
    font-family: inherit;
}

input[type="text"]:focus {
    outline: none;
    border-color: #4a6f8f;
}

input.uuid {
    font-family: monospace;
    min-width: 22rem;
}

button {
    padding: 0.45rem 0.9rem;
    border: 1px solid #3a3b42;
    border-radius: 5px;
    background: #2f3038;
    color: #ddd;
    font-size: 0.8rem;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
}

button:hover:not(:disabled) {
    background: #3a3b45;
    border-color: #4a4b55;
}

button:disabled {
    opacity: 0.5;
    cursor: default;
}

button.primary {
    background: #1f5b7a;
    border-color: #2b7099;
    color: #dceffb;
}

button.primary:hover:not(:disabled) {
    background: #26688b;
}

button.tiny {
    padding: 0.2rem 0.55rem;
    font-size: 0.7rem;
    font-weight: 600;
}

/* ---------- order list ---------- */

th {
    letter-spacing: 0.05em;
    background: #26272d;
}

td {
    border-bottom: 1px solid #2a2b31;
    vertical-align: middle;
}

tbody tr:last-child td {
    border-bottom: none;
}

tbody tr:hover {
    background: #26272d;
}

.orb {
    font-size: 1.1rem;
    font-weight: 700;
    color: #e6e6e6;
    font-variant-numeric: tabular-nums;
}

.uuid {
    font-family: monospace;
    font-size: 0.72rem;
    color: #667;
}

/* A UUID broken over four lines is unreadable and unselectable. The table
   gets a horizontal scrollbar instead, the same way the dashboard's
   pressure table does. */
td.uuid {
    white-space: nowrap;
}

.location {
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    white-space: nowrap;
}

.location-PENDING {
    background: #4a3a1c;
    color: #ffe0ae;
}

.location-IN_PRODUCTION {
    background: #1f4a33;
    color: #b9f0d1;
}

.entry-kind {
    font-size: 0.7rem;
    color: #7f7f7f;
    letter-spacing: 0.03em;
}

.na {
    color: #666;
}

/* ---------- probe result ---------- */

.result-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem 1.4rem;
    font-size: 0.8rem;
    color: #9aa7b4;
    margin-bottom: 1rem;
}

.result-meta .label {
    display: block;
    font-size: 0.66rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #6f7d8c;
    margin-bottom: 0.15rem;
}

.result-meta .value {
    font-variant-numeric: tabular-nums;
    color: #dcdcdc;
}

.status-ok {
    color: #7ee0a3;
    font-weight: 600;
}

.status-bad {
    color: #ff8888;
    font-weight: 600;
}

.reading {
    margin-bottom: 1.1rem;
    padding: 0.7rem 0.85rem;
    border-left: 2px solid #3c4a5a;
    border-radius: 0 4px 4px 0;
    background: #202126;
    font-size: 0.8rem;
    color: #9aa7b4;
}

.reading table {
    width: auto;
    font-size: 0.8rem;
}

.reading td {
    padding: 0.12rem 1.2rem 0.12rem 0;
    border-bottom: none;
}

.reading td:last-child {
    padding-right: 0;
    white-space: nowrap;
}

.reading-kds {
    font-weight: 600;
    color: #cfe3ff;
}

.reading-title {
    margin-bottom: 0.4rem;
    font-size: 0.68rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #6f7d8c;
}

.reading-summary {
    margin-top: 0.4rem;
    color: #6f7d8c;
}

/* ---------- raw JSON ---------- */

.json-block {
    margin-bottom: 1rem;
}

.json-block:last-child {
    margin-bottom: 0;
}

pre {
    margin: 0;
    padding: 0.8rem 0.9rem;
    max-height: 30rem;
    overflow: auto;
    background: #1a1b20;
    border: 1px solid #2a2b31;
    border-radius: 5px;
    font-family: Consolas, Monaco, monospace;
    font-size: 0.78rem;
    line-height: 1.5;
    color: #cfd6dd;
    tab-size: 2;
}

.json-key {
    color: #86b9e8;
}

.json-string {
    color: #c3e88d;
}

.json-number {
    color: #f9a35c;
}

.json-boolean {
    color: #d78ce0;
}

.json-null {
    color: #8a8a8a;
    font-style: italic;
}

.not-json {
    margin-bottom: 0.4rem;
    font-size: 0.75rem;
    color: #e0b070;
}

.probe-error {
    padding: 0.8rem 0.9rem;
    border-radius: 5px;
    background: #3d1f1f;
    border: 1px solid #5a2c2c;
    color: #ffcccc;
    font-size: 0.85rem;
    line-height: 1.5;
}

.hint {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: #777;
}

.spinner {
    display: inline-block;
    width: 0.8rem;
    height: 0.8rem;
    border: 2px solid #4a6f8f;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    vertical-align: -0.1rem;
}

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

.copy-tooltip {
    position: fixed;
    transform: translate(-50%, -100%);
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    background: #3a3b42;
    color: #e6e6e6;
    font-size: 0.72rem;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 10;
}

.copy-tooltip.visible {
    opacity: 1;
}

/* ---------- tabs ---------- */

.tabs {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 1.4rem;
    border-bottom: 1px solid #33343a;
}

.tab-button {
    padding: 0.55rem 1rem;
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    background: transparent;
    color: #999;
    font-size: 0.85rem;
    font-weight: 600;
}

.tab-button:hover:not(:disabled) {
    background: transparent;
    color: #ccc;
}

.tab-button.active {
    color: #cfe3ff;
    border-bottom-color: #2d5fa3;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

/* ---------- live indicator ---------- */

.live-indicator {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.78rem;
    color: #7ee0a3;
    margin-bottom: 1.2rem;
}

.live-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: #7ee0a3;
    animation: livePulse 1.6s ease-in-out infinite;
}

.live-indicator.stale {
    color: #ff8888;
}

.live-indicator.stale .live-dot {
    background: #ff8888;
    animation: none;
}

@keyframes livePulse {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(126, 224, 163, 0.5);
    }
    50% {
        opacity: 0.55;
        box-shadow: 0 0 0 4px rgba(126, 224, 163, 0);
    }
}

.updated-at {
    color: #6f7d8c;
}

/* ---------- fact grid: Restaurant / Settings ---------- */

.fact-grid {
    width: 100%;
    border-collapse: collapse;
    min-width: 46rem;
    table-layout: fixed;
}

.fact-grid th, .fact-grid td {
    padding: 0.5rem 0.7rem;
    border-bottom: 1px solid #2a2b31;
    text-align: center;
}

.fact-grid thead th {
    color: #cfe3ff;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    border-bottom: 1px solid #33343a;
    white-space: nowrap;
}

.fact-grid tbody tr:last-child td {
    border-bottom: none;
}

.fact-grid tbody tr:hover {
    background: #26272d;
}

.fact-grid col.labels {
    width: 12rem;
}

.fact-row-name {
    text-align: left;
    font-size: 0.78rem;
    color: #ccc;
    font-weight: 400;
    padding-right: 1rem;
    white-space: nowrap;
}

.fact-value {
    font-size: 0.85rem;
    font-weight: 700;
    color: #dcdcdc;
    font-variant-numeric: tabular-nums;
}

/* ---------- one order's fact ---------- */

.order-fact-table {
    width: 100%;
    max-width: 34rem;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.order-fact-table td {
    padding: 0.4rem 0.7rem;
    border-bottom: 1px solid #2a2b31;
}

.order-fact-table tr:last-child td {
    border-bottom: none;
}

.order-fact-table td:first-child {
    color: #999;
    white-space: nowrap;
    width: 12rem;
}

.order-fact-table td:last-child {
    font-weight: 600;
    color: #dcdcdc;
    font-variant-numeric: tabular-nums;
}
