/* OpenHAB Cloud uses the shared dashboard palette in both themes. */
#openhabCloudTab{color:var(--text);min-width:0;font-size:1rem;line-height:1.9;color-scheme:light}
:root[data-theme=dark] #openhabCloudTab{color-scheme:dark}
#openhabCloudTab [hidden]{display:none!important}
#openhabCloudTab :is(input,select,button){font:inherit}
#openhabCloudTab :is(input,select,button,summary):focus-visible{outline:2px solid var(--primary);outline-offset:4px}
.oh-hero{display:flex;justify-content:space-between;align-items:center;gap:24px;padding:10px 0 28px;margin-bottom:26px;border-bottom:1px solid var(--border);background:none;color:var(--text)}
.oh-hero h2{font-size:clamp(24px,2.4vw,32px);font-weight:300;letter-spacing:-.5px;color:var(--heading);margin:8px 0}
.oh-hero p{color:var(--muted);margin:6px 0 14px;font-size:.95rem}
.oh-hero small{color:var(--primary);font-size:.8rem;letter-spacing:.1em}
#ohFetched{display:inline-block;color:var(--muted);font-size:.875rem;font-variant-numeric:tabular-nums}
.oh-orb{display:grid;place-items:center;flex:none;width:68px;height:68px;border:1px solid var(--border);background:var(--accent-soft);color:var(--primary);font-size:32px;line-height:1}
.oh-card{min-width:0;background:var(--surface);border:1px solid var(--border);border-radius:0;padding:28px;margin-bottom:24px;box-shadow:none}
.oh-card h3{color:var(--heading);font-size:1.15rem;font-weight:500;margin:0 0 20px}
.oh-card p,.oh-note{color:var(--muted);font-size:.875rem;line-height:2}
.oh-card p{margin:0 0 18px}.oh-note{margin:12px 0}
.oh-form-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px;align-items:start}
.oh-form-grid label{display:grid;gap:9px;font-size:.875rem;font-weight:500;color:var(--text);align-content:start}
.oh-form-grid label small{color:var(--muted);font-weight:400;font-size:.875rem;line-height:1.9;letter-spacing:0}
.oh-form-grid input,.oh-toolbar input,.oh-toolbar select{box-sizing:border-box;width:100%;min-width:0;min-height:48px;padding:11px 14px;border:1px solid var(--border);border-radius:0;background:var(--surface);color:var(--text);box-shadow:none;transition:border-color .15s,background .15s}
.oh-form-grid input::placeholder,.oh-toolbar input::placeholder{color:var(--muted);opacity:1}
.oh-form-grid input[readonly]{color:var(--muted);background:var(--surface-alt)}
.oh-form-grid input:focus,.oh-toolbar input:focus,.oh-toolbar select:focus{border-color:var(--primary)}
.oh-toolbar select{appearance:none;padding-inline-end:38px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%238b8576' stroke-width='1.5'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:left 12px center}
.oh-actions{display:flex;align-items:center;flex-wrap:wrap;gap:18px;margin-top:24px;padding-top:22px;border-top:1px solid var(--border)}
.oh-actions button{display:inline-flex;justify-content:center;align-items:center;min-height:48px;padding:12px 22px;border:1px solid var(--primary);border-radius:0;background:var(--primary);color:var(--button-ink);font-weight:500;cursor:pointer;transition:filter .15s}
.oh-actions button:hover{filter:brightness(1.08)}.oh-actions button:disabled{opacity:.65;cursor:wait}
.oh-actions span{font-size:.875rem;color:var(--muted)}
#ohMessage{margin:16px 0 0;padding:12px 15px;border-inline-start:2px solid var(--primary);background:var(--accent-soft);color:var(--text);overflow-wrap:anywhere}
#ohMessage:empty,#ohWarnings:empty{display:none}
#ohMessage.oh-error{border-color:var(--danger);background:var(--danger-soft);color:var(--danger)}
#ohWarnings:not(:empty){padding:12px 16px;border:1px solid var(--border);background:var(--warning-soft);color:var(--warning)}
.oh-metrics{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:0;margin:28px 0;border:1px solid var(--border);background:var(--surface)}
.oh-metrics article{min-width:0;border:0;border-inline-end:1px solid var(--border);padding:24px 20px;background:none}
.oh-metrics article:last-child{border-inline-end:0}
.oh-metrics small{display:block;color:var(--muted);font-size:.875rem;line-height:1.7}
.oh-metrics strong{display:block;color:var(--heading);font-size:2rem;font-weight:300;line-height:1.5;margin-top:12px;font-variant-numeric:tabular-nums}
.oh-metrics article:nth-child(4) strong{color:var(--success)}
.oh-toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:12px;padding:18px 0;margin:12px 0 6px;border-top:1px solid var(--border)}
.oh-toolbar input{flex:2 1 260px}.oh-toolbar select{flex:1 1 190px}
#ohResultCount{color:var(--muted);font-size:.875rem;padding:0 8px;white-space:nowrap}
.oh-scroll{max-width:100%;max-height:620px;overflow:auto;border:1px solid var(--border);border-radius:0;scrollbar-width:thin;scrollbar-color:var(--border) transparent}
.oh-scroll table{width:100%;border-collapse:separate;border-spacing:0;font-size:.875rem;line-height:1.9;color:var(--text)}
.oh-scroll th{position:sticky;top:0;z-index:1;background:var(--surface-alt);color:var(--muted);font-weight:500;text-align:start;white-space:nowrap;border-bottom:1px solid var(--border)}
.oh-scroll td,.oh-scroll th{padding:15px 16px;vertical-align:middle}
.oh-scroll td{min-width:110px;max-width:380px;overflow-wrap:anywhere;border-bottom:1px solid var(--border);background:var(--surface);transition:background .15s}
.oh-scroll tr:last-child td{border-bottom:0}.oh-scroll tr:hover td{background:var(--surface-alt)}
.oh-scroll td[dir=auto]{unicode-bidi:plaintext}
.oh-badge{display:inline-flex;align-items:center;justify-content:center;white-space:nowrap;min-height:30px;padding:3px 10px;border:1px solid transparent;border-radius:4px;font-size:.875rem;font-weight:500}
.oh-green{background:var(--success-soft);color:var(--success)}.oh-muted{background:var(--surface-alt);color:var(--muted)}.oh-red{background:var(--danger-soft);color:var(--danger)}
.oh-device-ref{display:block;font-size:.875rem;line-height:1.9;margin:3px 0;color:var(--muted)}
.oh-detail{display:inline-flex;align-items:center;justify-content:center;min-height:36px;padding:5px 12px;background:transparent;border:1px solid var(--border);border-radius:0;color:var(--primary);cursor:pointer;white-space:nowrap}
.oh-detail:hover{background:var(--accent-soft);border-color:var(--primary)}
.oh-two-col{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;align-items:start}
.oh-two-col>.oh-card{min-width:0}.oh-card details>summary{list-style:none;display:flex;align-items:center;justify-content:space-between;gap:16px;cursor:pointer;color:var(--heading);font-size:1rem;font-weight:500;padding:0;min-height:30px}
.oh-card details>summary::-webkit-details-marker{display:none}
.oh-card details>summary::after{content:'+';display:grid;place-items:center;flex:none;width:30px;height:30px;border:1px solid var(--border);color:var(--primary);font-size:22px;font-weight:300}
.oh-card details[open]>summary{padding-bottom:20px;margin-bottom:20px;border-bottom:1px solid var(--border)}.oh-card details[open]>summary::after{content:'−'}
.oh-empty{text-align:center;padding:40px!important;color:var(--muted)}
.oh-card pre{direction:ltr;text-align:left;max-width:100%;padding:20px;background:var(--surface-alt);color:var(--text);border:1px solid var(--border);border-radius:0;overflow:auto;font: .875rem/1.9 ui-monospace,Consolas,monospace;margin:0 0 18px}
.oh-paths{display:flex;flex-wrap:wrap;gap:10px}
.oh-paths code{direction:ltr;max-width:100%;padding:7px 10px;border:1px solid var(--border);background:var(--surface-alt);color:var(--muted);font-size:.875rem;overflow-wrap:anywhere}
.oh-dialog{width:min(650px,calc(100% - 32px));max-height:85vh;overflow:auto;padding:30px;border:1px solid var(--border);border-radius:0;background:var(--surface);color:var(--text);font-family:inherit;box-shadow:0 24px 80px #0003}
.oh-dialog::backdrop{background:var(--overlay)}.oh-dialog h3{color:var(--heading);font-size:1.15rem;font-weight:500;padding-bottom:18px;border-bottom:1px solid var(--border);overflow-wrap:anywhere}
.oh-dialog dl{display:grid;grid-template-columns:auto minmax(0,1fr);gap:18px 24px;margin:24px 0;font-size:.875rem}.oh-dialog dd{margin:0;overflow-wrap:anywhere}.oh-dialog dt{color:var(--muted)}
.oh-dialog button{min-height:42px;border:1px solid var(--border);background:var(--surface-alt);color:var(--text);padding:8px 22px;font:inherit;cursor:pointer}.oh-dialog button:hover{border-color:var(--primary)}
.oh-empty-start{display:grid;justify-items:center;text-align:center;padding:64px 24px;background:var(--surface);border:1px solid var(--border);color:var(--text)}
.oh-empty-start::before{content:'☁';display:grid;place-items:center;width:64px;height:64px;margin-bottom:22px;border:1px solid var(--border);background:var(--accent-soft);color:var(--primary);font-size:30px}
.oh-empty-start h3{font-size:1.2rem;font-weight:400;color:var(--heading);margin:0 0 12px}.oh-empty-start p{max-width:540px;color:var(--muted);font-size:.95rem;line-height:2;margin:0}
.oh-empty-start:has(~#ohSnapshot:not([hidden])){display:none}
@media(max-width:1100px){.oh-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}.oh-metrics article:nth-child(3){border-inline-end:0}.oh-metrics article:nth-child(-n+3){border-bottom:1px solid var(--border)}.oh-two-col{grid-template-columns:minmax(0,1fr);gap:0}}
@media(max-width:760px){.oh-form-grid{grid-template-columns:minmax(0,1fr);gap:18px}.oh-card{padding:20px}.oh-hero{gap:16px;padding-top:4px}.oh-hero small{font-size:.75rem}.oh-orb{width:52px;height:52px;font-size:26px}.oh-metrics article{padding:18px 14px}.oh-toolbar{align-items:stretch}.oh-toolbar input,.oh-toolbar select{flex-basis:100%}#ohResultCount{padding:5px 0}.oh-scroll td,.oh-scroll th{padding:12px}.oh-actions{gap:14px}.oh-actions button{width:100%}.oh-empty-start{padding:40px 20px}.oh-dialog{padding:22px}}
@media(max-width:450px){.oh-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.oh-metrics article{border-inline-end:1px solid var(--border);border-bottom:1px solid var(--border)}.oh-metrics article:nth-child(3){border-inline-end:1px solid var(--border)}.oh-metrics article:nth-child(2n){border-inline-end:0}.oh-metrics article:nth-last-child(-n+2){border-bottom:0}.oh-hero{align-items:flex-start}.oh-hero h2{font-size:24px}.oh-orb{display:none}.oh-dialog dl{grid-template-columns:minmax(0,1fr);gap:8px}.oh-dialog dd{margin-bottom:12px}}
@media(prefers-reduced-motion:reduce){#openhabCloudTab *{transition:none!important}}

.oh-timeline-heading{display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap;margin-bottom:18px}.oh-timeline-heading h3{margin:0}.oh-timeline-heading>span{font-size:.875rem;color:var(--muted)}
.oh-timeline-controls{display:flex;flex-wrap:wrap;align-items:end;gap:18px;padding:18px 0;border-block:1px solid var(--border);margin-bottom:18px}.oh-timeline-controls label{display:grid;gap:8px;flex:1 1 220px;min-width:0;font-size:.875rem;color:var(--muted)}.oh-timeline-controls select{width:100%;min-height:46px;border:1px solid var(--border);background:var(--surface);color:var(--text);border-radius:0;padding:10px 36px 10px 12px;appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%238b8576' stroke-width='1.5'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:left 12px center}
.oh-time-legend{display:flex;flex-wrap:wrap;gap:22px;color:var(--muted);font-size:.875rem;margin:18px 0}.oh-time-legend span{display:flex;align-items:center;gap:8px}.oh-time-legend i{width:10px;height:10px;display:inline-block;background:var(--success);border-radius:50%}.oh-time-legend span:last-child i{background:var(--danger);border-radius:1px}
.oh-time-scroll{overflow:auto;max-height:650px;border:1px solid var(--border);scrollbar-width:thin}.oh-time-chart{min-width:940px}.oh-time-axis,.oh-time-row{display:grid;grid-template-columns:250px minmax(350px,1fr) 240px;gap:20px;padding:18px;align-items:center}.oh-time-axis{position:sticky;top:0;z-index:3;background:var(--surface-alt);font-size:.875rem;color:var(--muted);min-height:70px;border-bottom:1px solid var(--border)}.oh-time-axis>div{direction:ltr;position:relative;height:30px;margin-inline:8px}.oh-time-axis>div span{position:absolute;top:0;transform:translateX(-50%);font-size:.8rem;white-space:nowrap}.oh-time-axis>div span:first-child{transform:none}.oh-time-axis>div span:last-child{transform:translateX(-100%)}
.oh-time-row{border-bottom:1px solid var(--border);min-height:110px}.oh-time-row:last-child{border-bottom:0}.oh-time-row:hover{background:var(--surface-alt)}.oh-time-label{min-width:0;display:grid;justify-items:start;gap:5px}.oh-time-label strong{font-size:.875rem;font-weight:500;overflow-wrap:anywhere;max-width:100%}.oh-time-label small{font-size:.8rem;color:var(--muted);overflow-wrap:anywhere;max-width:100%}.oh-time-label .oh-badge{font-size:.8rem;min-height:24px}.oh-time-track{height:70px;position:relative;direction:ltr;background:repeating-linear-gradient(to right,var(--border) 0 1px,transparent 1px 25%);margin-inline:8px}.oh-time-track::before,.oh-time-track::after{content:'';position:absolute;left:0;right:0;top:20px;border-top:1px solid var(--border)}.oh-time-track::after{top:48px}
#openhabCloudTab .oh-time-marker{position:absolute;z-index:1;top:12px;transform:translateX(-50%);width:18px;height:18px;min-height:0;border:3px solid var(--surface);border-radius:50%;background:var(--success);padding:0;cursor:pointer;box-shadow:0 0 0 1px var(--success)}#openhabCloudTab .oh-time-stop{top:40px;border-radius:2px;background:var(--danger);box-shadow:0 0 0 1px var(--danger)}.oh-time-tooltip{position:absolute;bottom:27px;left:50%;transform:translateX(-50%);padding:7px 10px;white-space:nowrap;display:none;background:var(--surface);color:var(--text);border:1px solid var(--border);font-size:.8rem;box-shadow:0 4px 16px #0002;pointer-events:none}.oh-time-marker:hover,.oh-time-marker:focus-visible{z-index:4!important}.oh-time-marker:hover .oh-time-tooltip,.oh-time-marker:focus-visible .oh-time-tooltip{display:block}.oh-time-values{display:grid;gap:7px;color:var(--muted);font-size:.875rem}.oh-time-missing{position:absolute;inset:20px 0;text-align:center;background:var(--surface);color:var(--muted);font-size:.875rem}.oh-time-row:hover .oh-time-missing{background:var(--surface-alt)}
@media(max-width:760px){.oh-timeline-controls{gap:14px}.oh-timeline-controls label{flex-basis:100%}.oh-time-legend{gap:12px}}


/* Compact shared-axis dot chart. */
.oh-plot-scroll{max-height:580px;overflow:auto;border:1px solid var(--border);background:var(--surface);scrollbar-width:thin}
.oh-plot{display:block;width:100%;min-width:1080px;height:auto;font-family:inherit;direction:ltr;overflow:visible}
.oh-plot text{font-size:14px;fill:var(--text)}.oh-plot .oh-plot-tick{font-size:13px;fill:var(--muted)}.oh-plot .oh-plot-heading{font-size:14px;fill:var(--muted);font-weight:500}.oh-plot .oh-plot-uuid{font-size:12px;fill:var(--muted)}.oh-plot .oh-plot-email{font-size:14px;font-weight:500}
.oh-plot-grid{stroke:var(--border);stroke-dasharray:3 5}.oh-plot-rail{stroke:var(--border);stroke-width:1}.oh-plot-background{fill:transparent}.oh-plot-row:nth-of-type(even) .oh-plot-background{fill:var(--surface-alt);fill-opacity:.55}.oh-plot-row:hover .oh-plot-background{fill:var(--accent-soft);fill-opacity:1}
.oh-plot .oh-plot-start-time{fill:var(--success);font-variant-numeric:tabular-nums}.oh-plot .oh-plot-stop-time{fill:var(--danger);font-variant-numeric:tabular-nums}.oh-plot-start{fill:var(--success)}.oh-plot-stop{fill:var(--danger)}.oh-plot-point{stroke:var(--surface);stroke-width:2;cursor:help}.oh-plot-point:focus-visible{outline:2px solid var(--primary);outline-offset:4px}
.oh-timeline-controls{display:flex;gap:16px;flex-wrap:wrap;padding:14px 0;margin:12px 0;border-block:1px solid var(--border)}.oh-timeline-controls label{flex:1 1 220px}.oh-time-legend{margin:14px 0;font-size:.875rem}.oh-timeline-heading{margin-bottom:10px}

/* Four summary metrics. */
.oh-metrics{grid-template-columns:repeat(4,minmax(0,1fr))}
@media(max-width:1100px){.oh-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.oh-metrics article{border-inline-end:1px solid var(--border);border-bottom:1px solid var(--border)}.oh-metrics article:nth-child(3){border-inline-end:1px solid var(--border)}.oh-metrics article:nth-child(2n){border-inline-end:0}.oh-metrics article:nth-last-child(-n+2){border-bottom:0}}
