/* public/assets/css/hardware/midi-test.css */
.midi-wrapper { --p-bg: #ffffff; --p-border: #e2e8f0; --p-primary: #8b5cf6; --p-primary-hover: #7c3aed; --p-success: #10b981; --p-warning: #f59e0b; --p-text: #0f172a; --p-text-muted: #64748b; width: 100%; max-width: 1200px; margin: 0 auto; background: var(--p-bg); border-radius: 20px; padding: 24px; border: 1px solid var(--p-border); box-shadow: 0 10px 25px -5px rgba(0,0,0,0.05); box-sizing: border-box; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
.midi-wrapper *, .midi-wrapper *::before, .midi-wrapper *::after { box-sizing: border-box; }

.midi-header { text-align: center; margin-bottom: 24px; border-bottom: 1px solid var(--p-border); padding-bottom: 24px; }
.midi-title { font-size: 1.7rem; font-weight: 800; color: var(--p-text); margin: 0 0 10px 0; }
.midi-subtitle { font-size: 0.95rem; color: var(--p-text-muted); max-width: 800px; margin: 0 auto; line-height: 1.6; }

.midi-workspace { display: flex; flex-direction: column; gap: 20px; }

/* Dashboard */
.midi-dashboard { display: flex; gap: 24px; align-items: stretch; }
@media (max-width: 800px) { .midi-dashboard { flex-direction: column; } }

.midi-device-panel { flex: 1; background: #f8fafc; border: 1px solid var(--p-border); border-radius: 12px; padding: 20px; display: flex; flex-direction: column; }
.midi-panel-title { font-size: 0.95rem; font-weight: 800; color: #475569; margin-bottom: 12px; text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 2px solid var(--p-border); padding-bottom: 8px; }
.midi-device-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.midi-device-item { background: #ffffff; border: 1px solid #cbd5e1; padding: 10px 14px; border-radius: 8px; font-weight: 700; color: #1e293b; display: flex; align-items: center; gap: 10px; box-shadow: 0 2px 4px rgba(0,0,0,0.02); }
.midi-device-item::before { content: ''; display: block; width: 10px; height: 10px; border-radius: 50%; background: var(--p-success); box-shadow: 0 0 8px var(--p-success); }
.midi-device-empty { color: #94a3b8; font-style: italic; font-size: 0.9rem; }

.midi-stat-panel { flex: 1.5; display: flex; gap: 16px; }
.midi-stat-box { flex: 1; background: #ffffff; border: 1px solid var(--p-border); border-radius: 12px; padding: 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; box-shadow: 0 4px 10px rgba(0,0,0,0.02); }
.midi-stat-label { font-size: 0.85rem; font-weight: 700; color: #64748b; margin-bottom: 8px; text-transform: uppercase; }
.midi-stat-val { font-size: 2.5rem; font-weight: 900; font-family: monospace; color: #1e293b; line-height: 1; margin-bottom: 12px; }
.midi-stat-val.highlight { color: var(--p-primary); text-shadow: 0 4px 10px rgba(139, 92, 246, 0.2); }

.midi-vel-bar-bg { width: 100%; max-width: 200px; height: 12px; background: #e2e8f0; border-radius: 6px; overflow: hidden; box-shadow: inset 0 2px 4px rgba(0,0,0,0.1); }
.midi-vel-bar-fill { width: 0%; height: 100%; background: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899); transition: width 0.05s ease-out; }

/* Cyberpunk Terminal / Log */
.midi-terminal-container { background: #0f172a; border-radius: 12px; border: 2px solid #334155; overflow: hidden; display: flex; flex-direction: column; box-shadow: inset 0 5px 20px rgba(0,0,0,0.5); }
.midi-terminal-header { display: flex; justify-content: space-between; align-items: center; background: #1e293b; padding: 12px 16px; color: #cbd5e1; font-family: monospace; font-size: 0.95rem; font-weight: 700; border-bottom: 1px solid #0f172a; }
.midi-terminal-tools { display: flex; gap: 16px; align-items: center; }
.midi-checkbox-label { display: flex; align-items: center; gap: 6px; font-family: system-ui, sans-serif; font-size: 0.85rem; font-weight: 600; cursor: pointer; color: #94a3b8; }
.midi-checkbox { accent-color: var(--p-primary); cursor: pointer; width: 16px; height: 16px; }
.midi-btn-icon { background: none; border: none; font-size: 1.1rem; cursor: pointer; opacity: 0.7; transition: 0.2s; padding: 0; }
.midi-btn-icon:hover { opacity: 1; transform: scale(1.1); }

/* Table Header */
.midi-table-header { display: grid; grid-template-columns: 80px 100px 120px 60px 1fr 1fr; gap: 10px; background: #020617; padding: 8px 16px; border-bottom: 2px solid #334155; color: #64748b; font-family: monospace; font-size: 0.8rem; font-weight: 800; }

.midi-terminal-body { height: 350px; overflow-y: auto; padding: 8px 0; background: #0f172a; }
.midi-log-row { display: grid; grid-template-columns: 80px 100px 120px 60px 1fr 1fr; gap: 10px; padding: 6px 16px; font-family: 'Consolas', monospace; font-size: 0.9rem; color: #f8fafc; border-bottom: 1px dashed rgba(51, 65, 85, 0.5); }
.midi-log-row:hover { background: rgba(255, 255, 255, 0.05); }

.midi-log-row.system { color: #64748b; font-style: italic; }
.midi-log-row.noteon .col-type { color: var(--p-success); font-weight: 700; }
.midi-log-row.noteoff .col-type { color: #94a3b8; }
.midi-log-row.cc .col-type { color: #3b82f6; }
.midi-log-row.pitch .col-type { color: var(--p-warning); }

.col-time { color: #64748b; }
.col-hex { color: #f472b6; font-weight: 700; }
.col-ch { color: #cbd5e1; }
.col-data { color: #f8fafc; }

.midi-hint-card { background: #fef2f2; border-left: 4px solid #ef4444; padding: 16px; border-radius: 0 10px 10px 0; font-size: 0.9rem; color: #7f1d1d; line-height: 1.6; }
.midi-hint-card code { background: rgba(239, 68, 68, 0.1); padding: 2px 6px; border-radius: 4px; font-family: monospace; }

/* Dark Mode */
[data-theme="dark"] .midi-wrapper { background: #1e293b; border-color: #334155; }
[data-theme="dark"] .midi-title, [data-theme="dark"] .midi-panel-title, [data-theme="dark"] .midi-stat-val { color: #f8fafc; }
[data-theme="dark"] .midi-subtitle, [data-theme="dark"] .midi-stat-label, [data-theme="dark"] .midi-checkbox-label { color: #94a3b8; }
[data-theme="dark"] .midi-device-panel { background: #0f172a; border-color: #475569; }
[data-theme="dark"] .midi-stat-box { background: #1e293b; border-color: #334155; }
[data-theme="dark"] .midi-device-item { background: #1e293b; border-color: #475569; color: #cbd5e1; }
[data-theme="dark"] .midi-vel-bar-bg { background: #0f172a; border-color: #475569; }
[data-theme="dark"] .midi-terminal-container { border-color: #020617; }
[data-theme="dark"] .midi-hint-card { background: rgba(239, 68, 68, 0.1); border-left-color: #ef4444; color: #fca5a5; }