/* OS-2045 Task Manager — Wave D-1
 *
 * App-spezifische Styles für die Live-Charts-App.
 * Komplett unter [data-theme-mode="os2045"] gescoped, um andere Themes
 * unangetastet zu lassen. Keine externen Abhängigkeiten — Canvas-Charts
 * werden inline im Modul mit primitive 2D-API gezeichnet.
 */

[data-theme-mode="os2045"] .tm-root {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    background: #0d1014;
    color: #d6dde6;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 13px;
    overflow: hidden;
}

/* ── Toolbar ───────────────────────────────────────────────────────── */
[data-theme-mode="os2045"] .tm-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    background: linear-gradient(180deg, #181c22 0%, #11151a 100%);
    border-bottom: 1px solid #232a33;
    flex: 0 0 auto;
}

[data-theme-mode="os2045"] .tm-tabs {
    display: flex;
    gap: 2px;
    flex: 1;
}

[data-theme-mode="os2045"] .tm-tab {
    padding: 7px 18px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px 6px 0 0;
    color: #8d97a4;
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
    transition: background 120ms ease, color 120ms ease;
}

[data-theme-mode="os2045"] .tm-tab:hover {
    background: rgba(255, 255, 255, 0.04);
    color: #cfd6df;
}

[data-theme-mode="os2045"] .tm-tab.active {
    background: #0d1014;
    border-color: #2a323d;
    border-bottom-color: #0d1014;
    color: #7cc4ff;
    font-weight: 600;
    position: relative;
    top: 1px;
}

[data-theme-mode="os2045"] .tm-tab:focus-visible {
    outline: 2px solid #7cc4ff;
    outline-offset: 2px;
}

[data-theme-mode="os2045"] .tm-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

[data-theme-mode="os2045"] .tm-btn {
    background: #1a2028;
    border: 1px solid #2a323d;
    color: #cfd6df;
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
    font-family: inherit;
    font-size: 12px;
    transition: background 120ms ease, border-color 120ms ease;
}

[data-theme-mode="os2045"] .tm-btn:hover {
    background: #232a33;
    border-color: #3a4452;
}

[data-theme-mode="os2045"] .tm-btn:focus-visible {
    outline: 2px solid #7cc4ff;
    outline-offset: 1px;
}

[data-theme-mode="os2045"] .tm-btn.tm-btn-active {
    background: #1a3550;
    border-color: #3a6fa0;
    color: #9bd2ff;
}

[data-theme-mode="os2045"] .tm-interval {
    background: #1a2028;
    color: #cfd6df;
    border: 1px solid #2a323d;
    border-radius: 4px;
    padding: 5px 8px;
    font-family: inherit;
    font-size: 12px;
    cursor: pointer;
}

[data-theme-mode="os2045"] .tm-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 8px rgba(74, 222, 128, 0.6);
    transition: background 200ms ease;
}

[data-theme-mode="os2045"] .tm-status-dot.paused {
    background: #f59e0b;
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.6);
}

[data-theme-mode="os2045"] .tm-status-dot.error {
    background: #ef4444;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.6);
}

/* ── Panels ────────────────────────────────────────────────────────── */
[data-theme-mode="os2045"] .tm-panel {
    flex: 1;
    overflow: auto;
    padding: 14px;
    display: none;
}

[data-theme-mode="os2045"] .tm-panel.active {
    display: block;
}

/* ── Übersicht: Charts-Grid ────────────────────────────────────────── */
[data-theme-mode="os2045"] .tm-charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 14px;
}

[data-theme-mode="os2045"] .tm-chart-card {
    background: linear-gradient(180deg, #131820 0%, #0f131a 100%);
    border: 1px solid #232a33;
    border-radius: 8px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 180px;
}

[data-theme-mode="os2045"] .tm-chart-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
}

[data-theme-mode="os2045"] .tm-chart-title {
    font-size: 12px;
    font-weight: 600;
    color: #8d97a4;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

[data-theme-mode="os2045"] .tm-chart-value {
    font-size: 22px;
    font-weight: 700;
    color: #f0f4f8;
    font-variant-numeric: tabular-nums;
}

[data-theme-mode="os2045"] .tm-chart-sub {
    font-size: 11px;
    color: #8d97a4;
    margin-top: -4px;
}

[data-theme-mode="os2045"] .tm-chart-canvas-wrap {
    flex: 1;
    position: relative;
    min-height: 90px;
}

[data-theme-mode="os2045"] .tm-chart-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* ── Prozesse: Tabelle ─────────────────────────────────────────────── */
[data-theme-mode="os2045"] .tm-procs-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

[data-theme-mode="os2045"] .tm-procs-filter {
    flex: 1;
    background: #11151a;
    border: 1px solid #2a323d;
    color: #cfd6df;
    border-radius: 4px;
    padding: 6px 10px;
    font-family: inherit;
    font-size: 13px;
}

[data-theme-mode="os2045"] .tm-procs-filter:focus {
    outline: 2px solid #7cc4ff;
    outline-offset: -1px;
    border-color: #3a6fa0;
}

[data-theme-mode="os2045"] .tm-procs-info {
    font-size: 12px;
    color: #8d97a4;
}

[data-theme-mode="os2045"] .tm-procs-table-wrap {
    overflow: auto;
    border: 1px solid #232a33;
    border-radius: 6px;
    max-height: calc(100% - 80px);
}

[data-theme-mode="os2045"] .tm-procs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}

[data-theme-mode="os2045"] .tm-procs-table thead th {
    background: #181c22;
    color: #cfd6df;
    text-align: left;
    padding: 8px 10px;
    border-bottom: 1px solid #2a323d;
    cursor: pointer;
    user-select: none;
    position: sticky;
    top: 0;
    z-index: 1;
}

[data-theme-mode="os2045"] .tm-procs-table thead th:hover {
    background: #1f242c;
}

[data-theme-mode="os2045"] .tm-procs-table thead th.sorted::after {
    content: ' \25B2';
    font-size: 10px;
    color: #7cc4ff;
}

[data-theme-mode="os2045"] .tm-procs-table thead th.sorted.desc::after {
    content: ' \25BC';
}

[data-theme-mode="os2045"] .tm-procs-table tbody tr {
    border-bottom: 1px solid #1a2028;
}

[data-theme-mode="os2045"] .tm-procs-table tbody tr:hover {
    background: rgba(124, 196, 255, 0.05);
}

[data-theme-mode="os2045"] .tm-procs-table td {
    padding: 6px 10px;
    color: #cfd6df;
    vertical-align: top;
}

[data-theme-mode="os2045"] .tm-procs-table td.cmd {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 11px;
    color: #aab4c0;
    max-width: 480px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

[data-theme-mode="os2045"] .tm-procs-table td.num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* ── Netzwerk-Panel ────────────────────────────────────────────────── */
[data-theme-mode="os2045"] .tm-net-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 14px;
}

[data-theme-mode="os2045"] .tm-net-card {
    background: linear-gradient(180deg, #131820 0%, #0f131a 100%);
    border: 1px solid #232a33;
    border-radius: 8px;
    padding: 14px;
}

[data-theme-mode="os2045"] .tm-net-section {
    background: #11151a;
    border: 1px solid #232a33;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 12px;
}

[data-theme-mode="os2045"] .tm-net-section h3 {
    margin: 0 0 8px 0;
    font-size: 12px;
    font-weight: 600;
    color: #8d97a4;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

[data-theme-mode="os2045"] .tm-net-pre {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 11px;
    color: #aab4c0;
    background: #0a0d12;
    padding: 8px 10px;
    border-radius: 4px;
    margin: 0;
    overflow: auto;
    max-height: 280px;
    white-space: pre;
}

[data-theme-mode="os2045"] .tm-iface-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

[data-theme-mode="os2045"] .tm-iface-list li {
    padding: 6px 0;
    border-bottom: 1px solid #1a2028;
    font-size: 12px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

[data-theme-mode="os2045"] .tm-iface-list li:last-child {
    border-bottom: none;
}

[data-theme-mode="os2045"] .tm-iface-name {
    font-weight: 600;
    color: #cfd6df;
}

[data-theme-mode="os2045"] .tm-iface-addr {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: #8d97a4;
}

/* ── Loading / Error states ───────────────────────────────────────── */
[data-theme-mode="os2045"] .tm-empty {
    text-align: center;
    color: #8d97a4;
    padding: 40px 20px;
    font-size: 13px;
}

[data-theme-mode="os2045"] .tm-error {
    color: #f87171;
    background: rgba(248, 113, 113, 0.08);
    border: 1px solid rgba(248, 113, 113, 0.3);
    border-radius: 4px;
    padding: 10px 12px;
    margin: 10px 0;
    font-size: 12px;
}
