/* tagesprotokoll.css — Dashboard & Sparklines */

#tp-operator-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
    animation: fadeIn 0.5s ease-out;
}

.tp-dash-card {
    background: var(--bg1);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.tp-dash-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--accent);
    opacity: 0.8;
}

.tp-dash-card.critical::before { background: var(--error); }
.tp-dash-card.warning::before { background: var(--warn); }
.tp-dash-card.success::before { background: var(--success); }

.tp-dash-title {
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--t3);
    letter-spacing: 0.05em;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Redox Gauge Mini */
.tp-redox-mini {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tp-redox-val {
    font-size: 24px;
    font-weight: 800;
    font-family: var(--mono);
}

.tp-trend-arrow {
    font-size: 20px;
    transition: transform 0.3s ease;
}

/* Prognose */
.tp-prog-main {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tp-prog-val {
    font-size: 20px;
    font-weight: 700;
    color: var(--t1);
}

.tp-prog-status {
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    width: fit-content;
}

/* Silo Strip */
.tp-silo-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tp-silo-badge {
    background: rgba(192, 57, 43, 0.1);
    border: 1px solid rgba(192, 57, 43, 0.3);
    color: var(--error);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Progress Bar (Umfärbung) */
.tp-umf-progress {
    margin-top: 8px;
}

/* Sparklines in Table */
.tp-sparkline-svg {
    display: block;
    width: 100px;
    height: 24px;
}

.tp-sparkline-line {
    fill: none;
    stroke: var(--accent);
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.tp-sparkline-temp {
    stroke: var(--warn);
    opacity: 0.6;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ─── Modularisierung: JS-Inline Styles Extrahierung ─── */

/* Status Badges */
.tp-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    border: 1px solid transparent;
}
.tp-badge--sm {
    padding: 4px 7px;
    font-size: 10px;
}
.tp-badge--offen { background: rgba(112, 112, 160, 0.13); color: var(--t3); border-color: rgba(112, 112, 160, 0.27); }
.tp-badge--bestaetigt { background: rgba(45, 224, 156, 0.13); color: var(--success); border-color: rgba(45, 224, 156, 0.27); }
.tp-badge--stillstand { background: rgba(255, 200, 68, 0.13); color: var(--warn); border-color: rgba(255, 200, 68, 0.27); }
.tp-badge--auto { background: rgba(68, 229, 204, 0.13); color: var(--teal); border-color: rgba(68, 229, 204, 0.27); }

/* Satz-Zellen */
.tp-satz-stack {
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.tp-satz-sep {
    font-size: 9px;
    color: var(--t4);
    padding-left: 2px;
    line-height: 1.4;
}
.tp-satz-item {
    display: flex;
    align-items: center;
    gap: 4px;
}
.tp-satz-name {
    font-size: 11px;
    font-weight: 600;
    color: var(--t1);
}
.tp-satz-name--single {
    color: var(--t2);
}
.tp-satz-count {
    font-size: 10px;
    color: var(--t4);
    background: var(--bg3);
    border: 1px solid var(--line);
    border-radius: 3px;
    padding: 0 4px;
    line-height: 1.7;
    font-family: var(--mono);
}

/* Heute Karte Modifikationen */
.tp-card {
    margin-bottom: 10px;
    padding: 10px 14px;
}
.tp-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.tp-card-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--t1);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Stillstand Banner */
.tp-stillstand-banner {
    padding: 10px 12px;
    background: rgba(255, 170, 0, 0.07);
    border: 1px solid rgba(255, 170, 0, 0.4);
    border-radius: 8px;
    font-size: 12px;
    margin-top: 8px;
}
.tp-stillstand-title {
    color: var(--warn);
    font-weight: 700;
    margin-bottom: 4px;
}
.tp-stillstand-time {
    font-family: var(--mono);
    color: var(--t2);
    margin-bottom: 2px;
}

/* Schicht Chips */
.tp-schicht-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.tp-schicht-lbl {
    font-size: 10px;
    color: var(--t3);
    text-transform: uppercase;
    letter-spacing: .05em;
}

/* Kennzahlen Grid */
.tp-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    text-align: center;
    margin-bottom: 8px;
}
.tp-kpi-block {
    display: flex;
    flex-direction: column;
}
.tp-kpi-lbl {
    font-size: 10px;
    color: var(--t3);
    text-transform: uppercase;
}
.tp-kpi-val {
    font-size: 20px;
    font-weight: 700;
    font-family: var(--mono);
}
.tp-kpi-sub {
    font-size: 9px;
    color: var(--t4);
}

/* IS-Maschinen-Strip */
.tp-is-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    padding: 6px 10px;
    background: var(--bg2);
    border-radius: 6px;
    font-size: 11px;
    margin-bottom: 8px;
    border: 1px solid var(--line); /* changed to var(--line) */
}
.tp-is-lbl {
    font-size: 10px;
    color: var(--t4);
    font-weight: 600;
    align-self: center;
}
.tp-is-item {
    color: var(--t2);
}
.tp-is-item b {
    font-family: var(--mono);
}

/* Actions Row */
.tp-actions-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 4px;
}

/* Helper Typo */
.tp-text-t2 { color: var(--t2); }
.tp-text-t3 { color: var(--t3); }
.tp-text-t4 { color: var(--t4); }
.tp-text-success { color: var(--success); }
.tp-text-warn { color: var(--warn); }
.tp-text-error { color: var(--error); }
.tp-text-teal { color: var(--teal); }
.tp-text-accent { color: var(--accent); }

/* Table Helpers */
.tp-table-wrap {
    overflow-x: auto;
}
.tp-row--muted {
    opacity: 0.45;
}
.tp-row--stillstand {
    background: rgba(255, 200, 68, 0.08);
}
.tp-cell-mono {
    font-family: var(--mono);
}
