/** * BetterDesk Console - CDAP Styles * Device list page, widget grid layout, individual widget types, and command log. */ /* ═══════════════════════════════════════════════════════════════════ DEVICES LIST PAGE ═══════════════════════════════════════════════════════════════════ */ /* ── List Page Layout ─────────────────────────────────────────────── */ .cdap-list-page { max-width: 1400px; margin: 0 auto; } /* ── Gateway Banner ───────────────────────────────────────────────── */ .cdap-gateway-banner { display: flex; align-items: center; justify-content: space-between; background: var(--card-bg, #161b22); border: 1px solid var(--border-color, #30363d); border-radius: var(--radius-md, 8px); padding: 1rem 1.25rem; margin-bottom: 1.25rem; gap: 1rem; } .cdap-gateway-status { display: flex; align-items: center; gap: 0.5rem; font-weight: 600; font-size: 0.9rem; } .cdap-gateway-status .cdap-gw-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--text-tertiary, #484f58); flex-shrink: 0; } .cdap-gateway-status.online .cdap-gw-dot { background: var(--success-color, #3fb950); box-shadow: 0 0 6px var(--success-color, #3fb950); } .cdap-gateway-stats { display: flex; gap: 1.5rem; align-items: center; } .cdap-gw-stat { display: flex; flex-direction: column; align-items: center; gap: 0.15rem; } .cdap-gw-stat-value { font-size: 1.1rem; font-weight: 700; color: var(--text-primary, #e6edf3); } .cdap-gw-stat-label { font-size: 0.7rem; color: var(--text-tertiary, #484f58); text-transform: uppercase; letter-spacing: 0.04em; } /* ── Search & Filters ─────────────────────────────────────────────── */ .cdap-list-toolbar { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap; } .cdap-search-wrap { position: relative; flex: 1; min-width: 200px; max-width: 360px; } .cdap-search-wrap .material-icons { position: absolute; left: 0.75rem; top: 50%; transform: translateY(-50%); color: var(--text-tertiary, #484f58); font-size: 1.1rem; pointer-events: none; } .cdap-search-wrap input { width: 100%; padding: 0.55rem 0.75rem 0.55rem 2.25rem; border: 1px solid var(--border-color, #30363d); border-radius: var(--radius-sm, 6px); background: var(--input-bg, #0d1117); color: var(--text-primary, #e6edf3); font-size: 0.85rem; outline: none; transition: border-color 0.15s; } .cdap-search-wrap input:focus { border-color: var(--accent-color, #58a6ff); } .cdap-type-filter { display: flex; gap: 0.35rem; flex-wrap: wrap; } /* ── Device Grid ──────────────────────────────────────────────────── */ .cdap-device-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1rem; } /* ── Device Card ──────────────────────────────────────────────────── */ .cdap-device-card { background: var(--card-bg, #161b22); border: 1px solid var(--border-color, #30363d); border-radius: var(--radius-md, 8px); padding: 1rem 1.15rem; cursor: pointer; transform: translateY(0); transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s; } .cdap-device-card:hover { border-color: var(--accent-color, #58a6ff); box-shadow: 0 2px 12px rgba(88, 166, 255, 0.08); transform: translateY(-1px); } .cdap-device-card.online { border-left: 3px solid var(--success-color, #3fb950); } .cdap-device-card.offline { border-left: 3px solid var(--text-tertiary, #484f58); opacity: 0.75; } .cdap-card-header { display: flex; align-items: flex-start; gap: 0.75rem; margin-bottom: 0.75rem; } .cdap-card-icon { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-sm, 6px); background: var(--bg-tertiary, #21262d); color: var(--accent-color, #58a6ff); flex-shrink: 0; } .cdap-card-icon .material-icons { font-size: 1.25rem; } .cdap-card-identity { flex: 1; min-width: 0; } .cdap-card-name { font-weight: 600; font-size: 0.95rem; color: var(--text-primary, #e6edf3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .cdap-card-id { font-size: 0.75rem; color: var(--text-tertiary, #484f58); font-family: var(--font-mono, monospace); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .cdap-card-status { display: flex; align-items: center; gap: 0.35rem; font-size: 0.75rem; font-weight: 500; white-space: nowrap; flex-shrink: 0; } .cdap-card-status .cdap-status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-tertiary, #484f58); } .cdap-card-status.online { color: var(--success-color, #3fb950); } .cdap-card-status.online .cdap-status-dot { background: var(--success-color, #3fb950); box-shadow: 0 0 4px var(--success-color, #3fb950); } .cdap-card-status.offline { color: var(--text-tertiary, #484f58); } /* ── Card Meta ────────────────────────────────────────────────────── */ .cdap-card-meta { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 0.75rem; padding-bottom: 0.65rem; border-bottom: 1px solid var(--border-subtle, rgba(48, 54, 61, 0.5)); } .cdap-card-meta-item { display: flex; align-items: center; gap: 0.3rem; font-size: 0.78rem; color: var(--text-secondary, #8b949e); } .cdap-card-meta-item .material-icons { font-size: 0.9rem; color: var(--text-tertiary, #484f58); } /* ── Card Footer ──────────────────────────────────────────────────── */ .cdap-card-footer { display: flex; align-items: center; justify-content: space-between; } .cdap-card-hb { display: flex; align-items: center; gap: 0.25rem; font-size: 0.75rem; color: var(--text-secondary, #8b949e); } .cdap-card-hb .material-icons { font-size: 0.85rem; color: var(--danger-color, #f85149); } .cdap-card-hb.muted { color: var(--text-tertiary, #484f58); } .cdap-card-arrow { color: var(--text-tertiary, #484f58); font-size: 1.1rem; transition: color 0.15s; } .cdap-device-card:hover .cdap-card-arrow { color: var(--accent-color, #58a6ff); } /* ── Empty / Disabled States ──────────────────────────────────────── */ .cdap-empty-state, .cdap-disabled-state { text-align: center; padding: 3rem 1.5rem; color: var(--text-tertiary, #484f58); } .cdap-empty-state .material-icons, .cdap-disabled-state .material-icons { font-size: 3rem; margin-bottom: 0.75rem; display: block; } .cdap-empty-state h3, .cdap-disabled-state h3 { font-size: 1.1rem; color: var(--text-secondary, #8b949e); margin: 0 0 0.5rem; } .cdap-empty-state p, .cdap-disabled-state p { font-size: 0.85rem; max-width: 420px; margin: 0 auto; line-height: 1.5; } /* ── List Page Loading ────────────────────────────────────────────── */ .cdap-list-loading { display: flex; align-items: center; justify-content: center; padding: 3rem; color: var(--text-tertiary, #484f58); gap: 0.5rem; } .cdap-list-loading .spinner { width: 20px; height: 20px; border: 2px solid var(--border-color, #30363d); border-top-color: var(--accent-color, #58a6ff); border-radius: 50%; animation: cdap-spin 0.6s linear infinite; } @keyframes cdap-spin { to { transform: rotate(360deg); } } /* ── List Page Responsive ─────────────────────────────────────────── */ @media (max-width: 768px) { .cdap-gateway-banner { flex-direction: column; align-items: flex-start; } .cdap-list-toolbar { flex-direction: column; align-items: stretch; } .cdap-search-wrap { max-width: none; } .cdap-device-grid { grid-template-columns: 1fr; } } @media (max-width: 480px) { .cdap-gateway-stats { flex-wrap: wrap; gap: 1rem; } } /* ═══════════════════════════════════════════════════════════════════ DEVICE DETAIL PAGE ═══════════════════════════════════════════════════════════════════ */ /* ── Page Layout ──────────────────────────────────────────────────── */ .cdap-device-page { max-width: 1400px; margin: 0 auto; } /* ── Device Header ────────────────────────────────────────────────── */ .cdap-device-header { display: flex; align-items: center; justify-content: space-between; gap: var(--space-md, 1rem); margin-bottom: var(--space-lg, 1.5rem); flex-wrap: wrap; } .cdap-device-title { display: flex; align-items: center; gap: var(--space-sm, 0.5rem); } .cdap-back-btn { color: var(--text-secondary, #8b949e); transition: color 0.15s; } .cdap-back-btn:hover { color: var(--text-primary, #e6edf3); } .cdap-device-identity h1 { font-size: 1.5rem; font-weight: 600; color: var(--text-primary, #e6edf3); margin: 0; } .cdap-device-meta { display: flex; align-items: center; gap: var(--space-md, 1rem); margin-top: 4px; } .cdap-meta-item { display: flex; align-items: center; gap: 4px; font-size: 0.8rem; color: var(--text-secondary, #8b949e); } .cdap-meta-item .material-icons { font-size: 16px; } /* Status indicator */ .cdap-device-status { display: flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 20px; font-size: 0.85rem; font-weight: 500; background: var(--bg-tertiary, #21262d); border: 1px solid var(--border-color, #30363d); } .cdap-device-status.online { background: rgba(63, 185, 80, 0.1); border-color: rgba(63, 185, 80, 0.3); color: #3fb950; } .cdap-device-status.offline { background: rgba(139, 148, 158, 0.1); border-color: rgba(139, 148, 158, 0.3); color: #8b949e; } .cdap-status-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; } .cdap-device-status.online .cdap-status-dot { box-shadow: 0 0 6px rgba(63, 185, 80, 0.5); } /* ── Offline Banner ───────────────────────────────────────────────── */ .cdap-offline-banner { display: flex; align-items: center; gap: var(--space-sm, 0.5rem); padding: var(--space-sm, 0.5rem) var(--space-md, 1rem); background: rgba(210, 153, 34, 0.1); border: 1px solid rgba(210, 153, 34, 0.3); border-radius: var(--radius-md, 8px); color: #d29922; font-size: 0.85rem; margin-bottom: var(--space-lg, 1.5rem); } .cdap-offline-banner .material-icons { font-size: 20px; } /* ── Alerts Panel ─────────────────────────────────────────────────── */ .cdap-alerts-panel { background: var(--card-bg, #161b22); border: 1px solid var(--border-color, #30363d); border-radius: var(--radius-md, 8px); margin-bottom: var(--space-lg, 1.5rem); overflow: hidden; } .cdap-alerts-header { display: flex; align-items: center; justify-content: space-between; padding: 0.75rem 1rem; border-bottom: 1px solid var(--border-color, #30363d); background: rgba(210, 153, 34, 0.08); } .cdap-alerts-header h3 { display: flex; align-items: center; gap: 0.5rem; margin: 0; font-size: 0.9rem; font-weight: 600; color: var(--text-primary, #e6edf3); } .cdap-alerts-header .material-icons { font-size: 18px; color: #d29922; } .cdap-alerts-count { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: #d29922; color: #fff; font-size: 0.75rem; font-weight: 700; } .cdap-alerts-list { max-height: 300px; overflow-y: auto; } .cdap-alert-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.6rem 1rem; border-bottom: 1px solid var(--border-color, #30363d); } .cdap-alert-item:last-child { border-bottom: none; } .cdap-alert-critical { background: rgba(248, 81, 73, 0.08); } .cdap-alert-critical .cdap-alert-icon { color: #f85149; } .cdap-alert-warning { background: rgba(210, 153, 34, 0.08); } .cdap-alert-warning .cdap-alert-icon { color: #d29922; } .cdap-alert-info { background: rgba(56, 139, 253, 0.08); } .cdap-alert-info .cdap-alert-icon { color: #388bfd; } .cdap-alert-icon { font-size: 20px; flex-shrink: 0; } .cdap-alert-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; } .cdap-alert-label { font-size: 0.85rem; font-weight: 600; color: var(--text-primary, #e6edf3); } .cdap-alert-msg { font-size: 0.8rem; color: var(--text-secondary, #8b949e); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .cdap-alert-time { font-size: 0.75rem; color: var(--text-secondary, #8b949e); white-space: nowrap; flex-shrink: 0; } /* ── Linked Devices Panel ──────────────────────────────────────────── */ .cdap-linked-panel { background: var(--card-bg, #161b22); border: 1px solid var(--border-color, #30363d); border-radius: var(--radius-md, 8px); margin-bottom: var(--space-lg, 1.5rem); overflow: hidden; } .cdap-linked-header { display: flex; align-items: center; justify-content: space-between; padding: 0.75rem 1rem; border-bottom: 1px solid var(--border-color, #30363d); background: rgba(56, 139, 253, 0.06); } .cdap-linked-header h3 { display: flex; align-items: center; gap: 0.5rem; margin: 0; font-size: 0.9rem; font-weight: 600; color: var(--text-primary, #e6edf3); } .cdap-linked-header .material-icons { font-size: 18px; color: #388bfd; } .cdap-linked-count { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: #388bfd; color: #fff; font-size: 0.75rem; font-weight: 700; } .cdap-linked-list { max-height: 240px; overflow-y: auto; } .cdap-linked-empty { display: flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 1.25rem 1rem; color: var(--text-secondary, #8b949e); font-size: 0.85rem; } .cdap-linked-empty .material-icons { font-size: 20px; opacity: 0.6; } .cdap-linked-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.6rem 1rem; border-bottom: 1px solid var(--border-color, #30363d); transition: background 0.15s; } .cdap-linked-item:last-child { border-bottom: none; } .cdap-linked-item:hover { background: rgba(56, 139, 253, 0.06); } .cdap-linked-status { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; background: var(--text-secondary, #8b949e); } .cdap-linked-status.online { background: #3fb950; box-shadow: 0 0 4px rgba(63, 185, 80, 0.4); } .cdap-linked-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; } .cdap-linked-name { font-size: 0.85rem; font-weight: 600; color: var(--text-primary, #e6edf3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .cdap-linked-id { font-size: 0.75rem; color: var(--text-secondary, #8b949e); font-family: var(--font-mono, 'JetBrains Mono', monospace); } .cdap-linked-platform { font-size: 0.75rem; color: var(--text-secondary, #8b949e); flex-shrink: 0; } .cdap-unlink-btn { flex-shrink: 0; opacity: 0; transition: opacity 0.15s; } .cdap-linked-item:hover .cdap-unlink-btn { opacity: 1; } .cdap-unlink-btn .material-icons { font-size: 18px; color: #f85149; } /* ── Widget Grid ──────────────────────────────────────────────────── */ .cdap-widget-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--space-md, 1rem); margin-bottom: var(--space-lg, 1.5rem); } .cdap-widget-category { grid-column: 1 / -1; margin-top: var(--space-md, 1rem); } .cdap-widget-category:first-child { margin-top: 0; } .cdap-widget-category h3 { font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-secondary, #8b949e); margin: 0; padding-bottom: var(--space-xs, 0.25rem); border-bottom: 1px solid var(--border-color, #30363d); } /* Widget Card */ .cdap-widget { background: var(--bg-secondary, #161b22); border: 1px solid var(--border-color, #30363d); border-radius: var(--radius-md, 8px); padding: var(--space-md, 1rem); display: flex; flex-direction: column; gap: var(--space-sm, 0.5rem); transition: border-color 0.15s; } .cdap-widget:hover { border-color: var(--border-hover, #484f58); } .cdap-widget-readonly { opacity: 0.85; } /* Widget sizes */ .cdap-widget-sm { min-height: auto; } .cdap-widget-lg { grid-column: span 2; } .cdap-widget-xl { grid-column: 1 / -1; } @media (max-width: 768px) { .cdap-widget-lg, .cdap-widget-xl { grid-column: span 1; } } .cdap-widget-header { display: flex; align-items: center; justify-content: space-between; } .cdap-widget-label { font-size: 0.8rem; font-weight: 500; color: var(--text-secondary, #8b949e); text-transform: uppercase; letter-spacing: 0.03em; } .cdap-widget-unit { font-size: 0.75rem; color: var(--text-tertiary, #6e7681); } .cdap-widget-body { flex: 1; display: flex; flex-direction: column; justify-content: center; } /* ── Toggle Widget ────────────────────────────────────────────────── */ .cdap-toggle { position: relative; display: inline-block; width: 48px; height: 26px; } .cdap-toggle-input { opacity: 0; width: 0; height: 0; } .cdap-toggle-slider { position: absolute; inset: 0; background: var(--bg-tertiary, #21262d); border: 1px solid var(--border-color, #30363d); border-radius: 26px; cursor: pointer; transition: background 0.2s, border-color 0.2s; } .cdap-toggle-slider::before { content: ''; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; background: var(--text-secondary, #8b949e); border-radius: 50%; transition: transform 0.2s, background 0.2s; } .cdap-toggle-input:checked + .cdap-toggle-slider { background: rgba(63, 185, 80, 0.2); border-color: rgba(63, 185, 80, 0.4); } .cdap-toggle-input:checked + .cdap-toggle-slider::before { transform: translateX(22px); background: #3fb950; } .cdap-toggle-input:disabled + .cdap-toggle-slider { cursor: not-allowed; opacity: 0.5; } .cdap-toggle-label { margin-left: var(--space-sm, 0.5rem); font-size: 0.85rem; font-weight: 500; color: var(--text-primary, #e6edf3); } /* ── Gauge Widget ─────────────────────────────────────────────────── */ .cdap-gauge { display: flex; flex-direction: column; gap: 6px; } .cdap-gauge-bar { height: 8px; background: var(--bg-tertiary, #21262d); border-radius: 4px; overflow: hidden; } .cdap-gauge-fill { height: 100%; background: var(--accent-color, #58a6ff); border-radius: 4px; transition: width 0.5s ease; } .cdap-gauge-fill.cdap-gauge-warning { background: #d29922; } .cdap-gauge-fill.cdap-gauge-danger { background: #f85149; } .cdap-gauge-value { display: flex; align-items: baseline; justify-content: space-between; } .cdap-gauge-number { font-size: 1.5rem; font-weight: 600; color: var(--text-primary, #e6edf3); } .cdap-gauge-range { font-size: 0.75rem; color: var(--text-tertiary, #6e7681); } /* ── Button Widget ────────────────────────────────────────────────── */ .cdap-action-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; background: var(--bg-tertiary, #21262d); border: 1px solid var(--border-color, #30363d); border-radius: var(--radius-sm, 6px); color: var(--text-primary, #e6edf3); font-size: 0.85rem; cursor: pointer; transition: background 0.15s, border-color 0.15s; } .cdap-action-btn:hover { background: var(--bg-hover, #292e36); border-color: var(--border-hover, #484f58); } .cdap-action-btn:active { background: var(--accent-color, #58a6ff); color: #fff; } .cdap-action-btn .material-icons { font-size: 18px; } /* ── LED Widget ───────────────────────────────────────────────────── */ .cdap-led { display: flex; align-items: center; gap: var(--space-sm, 0.5rem); } .cdap-led-light { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--border-color, #30363d); transition: background 0.3s, box-shadow 0.3s; } .cdap-led-light.off { background: var(--bg-tertiary, #21262d); } .cdap-led-light.on { background: #3fb950; box-shadow: 0 0 8px rgba(63, 185, 80, 0.5); border-color: rgba(63, 185, 80, 0.4); } .cdap-led-label { font-size: 0.85rem; color: var(--text-primary, #e6edf3); } /* ── Text Widget ──────────────────────────────────────────────────── */ .cdap-text-value { font-size: 1.1rem; font-weight: 500; color: var(--text-primary, #e6edf3); word-break: break-word; } /* ── Slider Widget ────────────────────────────────────────────────── */ .cdap-slider-wrap { display: flex; flex-direction: column; gap: 4px; } .cdap-slider-input { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; background: var(--bg-tertiary, #21262d); border-radius: 3px; outline: none; } .cdap-slider-input::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; background: var(--accent-color, #58a6ff); border-radius: 50%; cursor: pointer; border: 2px solid var(--bg-primary, #0d1117); transition: transform 0.1s; } .cdap-slider-input::-webkit-slider-thumb:hover { transform: scale(1.15); } .cdap-slider-input::-moz-range-thumb { width: 18px; height: 18px; background: var(--accent-color, #58a6ff); border-radius: 50%; cursor: pointer; border: 2px solid var(--bg-primary, #0d1117); } .cdap-slider-input:disabled { opacity: 0.5; cursor: not-allowed; } .cdap-slider-labels { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--text-tertiary, #6e7681); } .cdap-slider-value { font-weight: 600; color: var(--text-primary, #e6edf3); } /* ── Select Widget ────────────────────────────────────────────────── */ .cdap-select-input { width: 100%; padding: 6px 10px; background: var(--bg-tertiary, #21262d); border: 1px solid var(--border-color, #30363d); border-radius: var(--radius-sm, 6px); color: var(--text-primary, #e6edf3); font-size: 0.85rem; } .cdap-select-input:focus { border-color: var(--accent-color, #58a6ff); outline: none; } /* ── Chart Widget (simple bars) ───────────────────────────────────── */ .cdap-chart-bars { display: flex; flex-direction: column; gap: 8px; } .cdap-chart-bar-wrap { display: grid; grid-template-columns: 80px 1fr 50px; align-items: center; gap: 8px; } .cdap-chart-bar-label { font-size: 0.75rem; color: var(--text-secondary, #8b949e); text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .cdap-chart-bar-track { height: 8px; background: var(--bg-tertiary, #21262d); border-radius: 4px; overflow: hidden; } .cdap-chart-bar-fill { height: 100%; background: var(--accent-color, #58a6ff); border-radius: 4px; transition: width 0.5s ease; } .cdap-chart-bar-value { font-size: 0.75rem; font-weight: 500; color: var(--text-primary, #e6edf3); text-align: right; } /* ── Loading & Empty States ───────────────────────────────────────── */ .cdap-loading { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 60px 20px; color: var(--text-secondary, #8b949e); } .cdap-loading-spinner { width: 32px; height: 32px; border: 3px solid var(--border-color, #30363d); border-top-color: var(--accent-color, #58a6ff); border-radius: 50%; animation: cdap-spin 0.8s linear infinite; margin-bottom: var(--space-md, 1rem); } @keyframes cdap-spin { to { transform: rotate(360deg); } } .cdap-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 80px 20px; text-align: center; } .cdap-empty-icon { font-size: 64px; color: var(--text-tertiary, #6e7681); margin-bottom: var(--space-md, 1rem); } .cdap-empty h3 { color: var(--text-primary, #e6edf3); margin: 0 0 8px; } .cdap-empty p { color: var(--text-secondary, #8b949e); margin: 0; max-width: 400px; } .cdap-error { color: #f85149; text-align: center; } /* ── Command Log ──────────────────────────────────────────────────── */ .cdap-command-log { background: var(--bg-secondary, #161b22); border: 1px solid var(--border-color, #30363d); border-radius: var(--radius-md, 8px); overflow: hidden; } .cdap-command-log-header { display: flex; align-items: center; justify-content: space-between; padding: var(--space-sm, 0.5rem) var(--space-md, 1rem); border-bottom: 1px solid var(--border-color, #30363d); } .cdap-command-log-header h3 { display: flex; align-items: center; gap: 6px; font-size: 0.85rem; font-weight: 600; color: var(--text-secondary, #8b949e); margin: 0; } .cdap-command-log-header h3 .material-icons { font-size: 18px; } .cdap-command-log-entries { max-height: 240px; overflow-y: auto; padding: var(--space-xs, 0.25rem) 0; } .cdap-log-entry { display: flex; align-items: center; gap: 8px; padding: 6px var(--space-md, 1rem); font-size: 0.8rem; border-bottom: 1px solid var(--border-subtle, rgba(48, 54, 61, 0.5)); } .cdap-log-entry:last-child { border-bottom: none; } .cdap-log-icon { font-size: 16px; } .cdap-log-success .cdap-log-icon { color: #3fb950; } .cdap-log-error .cdap-log-icon { color: #f85149; } .cdap-log-time { color: var(--text-tertiary, #6e7681); min-width: 70px; font-family: monospace; } .cdap-log-detail { flex: 1; color: var(--text-primary, #e6edf3); } .cdap-log-detail strong { color: var(--accent-color, #58a6ff); } .cdap-log-error-msg { color: #f85149; font-size: 0.75rem; } .cdap-log-empty { padding: var(--space-md, 1rem); text-align: center; color: var(--text-tertiary, #6e7681); font-size: 0.8rem; } /* ── Table Widget ──────────────────────────────────────────────────── */ .cdap-table-toolbar { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; } .cdap-table-search { width: 100%; max-width: 260px; padding: 0.3rem 0.6rem; font-size: 0.78rem; background: var(--bg-tertiary, #21262d); border: 1px solid var(--border-color, #30363d); border-radius: var(--radius-sm, 4px); color: var(--text-primary, #e6edf3); outline: none; } .cdap-table-search:focus { border-color: var(--accent, #58a6ff); box-shadow: 0 0 0 2px rgba(88, 166, 255, 0.15); } .cdap-table-wrap { overflow-x: auto; max-height: 400px; overflow-y: auto; } .cdap-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; } .cdap-table thead th { position: sticky; top: 0; background: var(--bg-secondary, #161b22); padding: 0.45rem 0.65rem; text-align: left; font-weight: 600; color: var(--text-secondary, #8b949e); border-bottom: 1px solid var(--border-color, #30363d); white-space: nowrap; user-select: none; } .cdap-table-sortable { cursor: pointer; } .cdap-table-sortable::after { content: ''; margin-left: 0.3rem; } .cdap-table-sortable.sort-asc::after { content: '▲'; font-size: 0.6rem; } .cdap-table-sortable.sort-desc::after { content: '▼'; font-size: 0.6rem; } .cdap-table tbody td { padding: 0.4rem 0.65rem; border-bottom: 1px solid var(--border-subtle, rgba(48, 54, 61, 0.4)); color: var(--text-primary, #e6edf3); } .cdap-table tbody tr:hover { background: var(--bg-tertiary, #21262d); } .cdap-table-empty { text-align: center; color: var(--text-tertiary, #484f58); font-style: italic; } /* Table pagination */ .cdap-table-pagination { display: flex; align-items: center; justify-content: center; gap: 0.75rem; padding: 0.5rem 0 0; font-size: 0.75rem; color: var(--text-secondary, #8b949e); } .cdap-pag-btn { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border: 1px solid var(--border-color, #30363d); border-radius: var(--radius-sm, 4px); background: var(--bg-tertiary, #21262d); color: var(--text-primary, #e6edf3); cursor: pointer; transition: background 0.15s; } .cdap-pag-btn:hover:not(:disabled) { background: var(--bg-secondary, #161b22); } .cdap-pag-btn:disabled { opacity: 0.35; cursor: not-allowed; } .cdap-pag-btn .material-icons { font-size: 18px; } .cdap-pag-info { min-width: 80px; text-align: center; } /* Table badge column type */ .cdap-badge { display: inline-block; padding: 0.15rem 0.5rem; border-radius: 10px; font-size: 0.7rem; font-weight: 600; background: color-mix(in srgb, var(--badge-color, var(--accent, #58a6ff)) 18%, transparent); color: var(--badge-color, var(--accent, #58a6ff)); border: 1px solid color-mix(in srgb, var(--badge-color, var(--accent, #58a6ff)) 30%, transparent); white-space: nowrap; } /* Table action column type */ .cdap-table-action { padding: 0.15rem 0.5rem; font-size: 0.7rem; border: 1px solid var(--border-color, #30363d); border-radius: var(--radius-sm, 4px); background: var(--bg-tertiary, #21262d); color: var(--accent, #58a6ff); cursor: pointer; transition: background 0.15s; } .cdap-table-action:hover { background: var(--bg-secondary, #161b22); } /* Table number column type */ .cdap-number { font-variant-numeric: tabular-nums; font-family: var(--font-mono, 'Cascadia Code', 'Fira Code', monospace); } /* ── Terminal Widget ──────────────────────────────────────────────── */ .cdap-terminal { background: #0d1117; border: 1px solid var(--border-color, #30363d); border-radius: var(--radius-sm, 4px); min-height: 280px; max-height: 480px; overflow: hidden; font-family: var(--font-mono, 'Cascadia Code', 'Fira Code', monospace); font-size: 0.78rem; line-height: 1.5; position: relative; } .cdap-terminal-output { padding: 0.5rem 0.75rem; overflow-y: auto; max-height: 278px; } .cdap-terminal-line { white-space: pre-wrap; word-break: break-all; color: var(--text-primary, #e6edf3); } /* Terminal connect button */ .cdap-terminal-connect { display: flex; align-items: center; justify-content: center; padding: 1.5rem; } .cdap-terminal-connect.hidden { display: none; } .cdap-terminal-connect-btn { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.6rem 1.2rem; background: var(--accent, #58a6ff); color: #fff; border: none; border-radius: var(--radius-sm, 4px); font-size: 0.85rem; cursor: pointer; transition: background 0.15s; } .cdap-terminal-connect-btn:hover { background: color-mix(in srgb, var(--accent, #58a6ff) 85%, white); } .cdap-terminal-connect-btn .material-icons { font-size: 18px; } /* xterm.js overrides for CDAP terminal */ .cdap-terminal .xterm { padding: 0.3rem; height: 100%; } .cdap-terminal .xterm-viewport { scrollbar-width: thin; scrollbar-color: var(--border-color, #30363d) transparent; } .cdap-terminal .xterm-viewport::-webkit-scrollbar { width: 6px; } .cdap-terminal .xterm-viewport::-webkit-scrollbar-thumb { background: var(--border-color, #30363d); border-radius: 3px; } /* ── Desktop Widget ───────────────────────────────────────────────── */ .cdap-desktop-widget { position: relative; } .cdap-desktop-canvas-wrap { position: relative; background: #000; border-radius: var(--radius-sm, 4px); overflow: hidden; aspect-ratio: 4 / 3; } .cdap-desktop-canvas { width: 100%; height: 100%; object-fit: contain; display: block; } .cdap-desktop-overlay, .cdap-video-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.5rem; background: rgba(0, 0, 0, 0.7); color: var(--text-tertiary, #484f58); font-size: 0.85rem; } .cdap-desktop-overlay .material-icons, .cdap-video-overlay .material-icons { font-size: 2.5rem; } .cdap-desktop-overlay.hidden, .cdap-video-overlay.hidden { display: none; } /* ── Video Stream Widget ──────────────────────────────────────────── */ .cdap-video-widget { position: relative; } .cdap-video-container { position: relative; background: #000; border-radius: var(--radius-sm, 4px); overflow: hidden; aspect-ratio: 16 / 9; } .cdap-video-frame { width: 100%; height: 100%; object-fit: contain; display: block; } .cdap-video-frame.hidden { display: none; } /* ── File Browser Widget ──────────────────────────────────────────── */ .cdap-file-browser { border: 1px solid var(--border-color, #30363d); border-radius: var(--radius-sm, 4px); overflow: hidden; } .cdap-file-toolbar { display: flex; align-items: center; justify-content: space-between; padding: 0.4rem 0.65rem; background: var(--bg-secondary, #161b22); border-bottom: 1px solid var(--border-color, #30363d); } .cdap-file-path { font-family: var(--font-mono, monospace); font-size: 0.78rem; color: var(--text-secondary, #8b949e); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; } .cdap-file-up { padding: 0.2rem 0.4rem; flex-shrink: 0; } .cdap-file-up .material-icons { font-size: 1rem; } .cdap-file-list { max-height: 260px; overflow-y: auto; } .cdap-file-entry { display: flex; align-items: center; gap: 0.5rem; padding: 0.35rem 0.65rem; border-bottom: 1px solid var(--border-subtle, rgba(48, 54, 61, 0.3)); font-size: 0.8rem; cursor: default; } .cdap-file-entry[data-type="dir"] { cursor: pointer; } .cdap-file-entry[data-type="dir"]:hover { background: var(--bg-tertiary, #21262d); } .cdap-file-icon { font-size: 1.1rem; color: var(--text-tertiary, #484f58); flex-shrink: 0; } .cdap-file-entry[data-type="dir"] .cdap-file-icon { color: var(--accent-color, #58a6ff); } .cdap-file-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-primary, #e6edf3); } .cdap-file-size { font-size: 0.72rem; color: var(--text-tertiary, #484f58); white-space: nowrap; flex-shrink: 0; } .cdap-file-empty { padding: 1rem; text-align: center; color: var(--text-tertiary, #484f58); font-size: 0.8rem; font-style: italic; } /* ── Connect Buttons (shared for desktop, video, file browser) ──── */ .cdap-desktop-connect, .cdap-video-connect, .cdap-file-connect { display: flex; justify-content: center; padding: 0.75rem; } .cdap-desktop-connect.hidden, .cdap-video-connect.hidden, .cdap-file-connect.hidden { display: none; } .cdap-desktop-connect-btn, .cdap-video-connect-btn, .cdap-file-connect-btn { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.5rem 1rem; border-radius: var(--radius-md, 6px); font-size: 0.82rem; font-weight: 500; cursor: pointer; transition: all 0.15s ease; } .cdap-desktop-connect-btn { background: rgba(88, 166, 255, 0.1); color: var(--accent-color, #58a6ff); border: 1px solid rgba(88, 166, 255, 0.25); } .cdap-desktop-connect-btn:hover { background: rgba(88, 166, 255, 0.2); border-color: rgba(88, 166, 255, 0.4); } .cdap-video-connect-btn { background: rgba(63, 185, 80, 0.1); color: var(--success-color, #3fb950); border: 1px solid rgba(63, 185, 80, 0.25); } .cdap-video-connect-btn:hover { background: rgba(63, 185, 80, 0.2); border-color: rgba(63, 185, 80, 0.4); } .cdap-file-connect-btn { background: rgba(210, 153, 34, 0.1); color: var(--warning-color, #d29922); border: 1px solid rgba(210, 153, 34, 0.25); } .cdap-file-connect-btn:hover { background: rgba(210, 153, 34, 0.2); border-color: rgba(210, 153, 34, 0.4); } .cdap-desktop-connect-btn .material-icons, .cdap-video-connect-btn .material-icons, .cdap-file-connect-btn .material-icons { font-size: 1.1rem; } /* ── Desktop: 16:9 Canvas ───────────────────────────────────────── */ .cdap-desktop-canvas-wrap { aspect-ratio: 16 / 9; } .cdap-desktop-canvas { cursor: crosshair; } .cdap-desktop-canvas:focus { outline: 2px solid var(--accent-color, #58a6ff); outline-offset: -2px; } /* ── Video: Canvas-based ─────────────────────────────────────────── */ .cdap-video-canvas { width: 100%; height: 100%; object-fit: contain; display: block; } /* ── File Browser: Entries, Details, Actions ──────────────────────── */ .cdap-file-dir:hover { background: var(--bg-tertiary, #21262d); } .cdap-file-dir .cdap-file-icon { color: var(--accent-color, #58a6ff); } .cdap-file-modified { font-size: 0.72rem; color: var(--text-tertiary, #484f58); white-space: nowrap; flex-shrink: 0; } .cdap-file-actions { display: flex; gap: 0.15rem; opacity: 0; transition: opacity 0.15s ease; flex-shrink: 0; } .cdap-file-entry:hover .cdap-file-actions { opacity: 1; } .cdap-file-download, .cdap-file-delete { padding: 0.15rem; border: none; background: transparent; cursor: pointer; border-radius: 3px; color: var(--text-tertiary, #484f58); transition: color 0.15s ease, background 0.15s ease; } .cdap-file-download:hover { color: var(--accent-color, #58a6ff); background: rgba(88, 166, 255, 0.1); } .cdap-file-delete:hover { color: var(--danger-color, #f85149); background: rgba(248, 81, 73, 0.1); } .cdap-file-download .material-icons, .cdap-file-delete .material-icons { font-size: 0.95rem; } .cdap-file-loading { padding: 1.5rem; text-align: center; color: var(--text-tertiary, #484f58); font-size: 0.82rem; } .cdap-file-error { padding: 0.5rem 0.65rem; background: rgba(248, 81, 73, 0.1); color: var(--danger-color, #f85149); font-size: 0.78rem; border-bottom: 1px solid rgba(248, 81, 73, 0.2); } .cdap-file-upload-area { display: flex; justify-content: center; padding: 0.65rem; border-top: 1px solid var(--border-color, #30363d); } .cdap-file-upload-btn { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.35rem 0.75rem; border-radius: var(--radius-sm, 4px); font-size: 0.78rem; background: rgba(88, 166, 255, 0.08); color: var(--accent-color, #58a6ff); border: 1px solid rgba(88, 166, 255, 0.2); cursor: pointer; transition: background 0.15s ease; } .cdap-file-upload-btn:hover { background: rgba(88, 166, 255, 0.15); } .cdap-file-upload-btn .material-icons { font-size: 1rem; } /* ── Unsupported Widget ───────────────────────────────────────────── */ .cdap-widget-unsupported { padding: var(--space-sm, 0.5rem); text-align: center; font-size: 0.8rem; color: var(--text-tertiary, #6e7681); font-style: italic; } /* ── Responsive ───────────────────────────────────────────────────── */ @media (max-width: 640px) { .cdap-widget-grid { grid-template-columns: 1fr; } .cdap-device-header { flex-direction: column; align-items: flex-start; } .cdap-device-meta { flex-wrap: wrap; } .cdap-chart-bar-wrap { grid-template-columns: 60px 1fr 40px; } } /* ─────────────────────────────────────────────────────────────────────── Audio Widget ─────────────────────────────────────────────────────────────────────── */ .cdap-audio-widget { display: flex; flex-direction: column; gap: 0.75rem; } .cdap-audio-controls { display: flex; align-items: center; gap: 0.75rem; padding: 0.5rem; background: var(--bg-secondary, #161b22); border-radius: 8px; } .cdap-audio-status { font-size: 0.8rem; font-weight: 500; padding: 0.2rem 0.5rem; border-radius: 4px; white-space: nowrap; } .cdap-audio-status.streaming { color: #3fb950; background: rgba(63, 185, 80, 0.1); } .cdap-audio-status.connecting { color: #d29922; background: rgba(210, 153, 34, 0.1); } .cdap-audio-status.disconnected { color: #8b949e; background: rgba(139, 148, 158, 0.1); } .cdap-audio-level { flex: 1; min-width: 80px; } .cdap-audio-level-track { height: 6px; background: var(--bg-tertiary, #21262d); border-radius: 3px; overflow: hidden; } .cdap-audio-level-fill { height: 100%; border-radius: 3px; transition: width 0.1s linear; width: 0%; } .cdap-audio-level-fill.low { background: #3fb950; } .cdap-audio-level-fill.medium { background: #d29922; } .cdap-audio-level-fill.high { background: #f85149; } .cdap-audio-buttons { display: flex; gap: 0.25rem; } .cdap-audio-mute-btn { padding: 0.25rem; min-width: unset; } .cdap-audio-connect { text-align: center; } .cdap-audio-connect-btn { display: inline-flex; align-items: center; gap: 0.5rem; } /* ─────────────────────────────────────────────────────────────────────── Desktop Toolbar (monitor selector, clipboard indicator) ─────────────────────────────────────────────────────────────────────── */ .cdap-desktop-toolbar { display: flex; align-items: center; gap: 0.5rem; padding: 0.25rem 0.5rem; background: var(--bg-secondary, #161b22); border-radius: 6px 6px 0 0; min-height: 28px; } .cdap-desktop-clipboard-indicator { font-size: 0.75rem; padding: 0.15rem 0.4rem; border-radius: 4px; transition: opacity 0.3s ease; } .cdap-desktop-clipboard-indicator.hidden { opacity: 0; pointer-events: none; } .cdap-desktop-clipboard-indicator.clip-in { color: #3fb950; background: rgba(63, 185, 80, 0.15); } .cdap-desktop-clipboard-indicator.clip-out { color: #58a6ff; background: rgba(88, 166, 255, 0.15); } /* Monitor selector */ .cdap-monitor-selector { display: flex; align-items: center; gap: 0.35rem; margin-left: auto; } .cdap-monitor-selector .material-icons { font-size: 16px; color: var(--text-secondary, #8b949e); } .cdap-monitor-select { font-size: 0.75rem; padding: 0.15rem 0.4rem; background: var(--bg-tertiary, #21262d); color: var(--text-primary, #e6edf3); border: 1px solid var(--border-primary, #30363d); border-radius: 4px; cursor: pointer; } .cdap-monitor-select:hover { border-color: var(--border-hover, #58a6ff); } /* Widget medium size (for audio) */ .cdap-widget-md { grid-column: span 2; }