/* Components — Orion cyberpunk style */

/* Status indicators (top bar on PLATFORM_CTRL) */
.status-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.status-indicator .si-icon { font-size: 1.2rem; }
.status-indicator .si-label { font-size: 0.65rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }
.status-indicator .si-value { font-size: 0.85rem; font-weight: 600; color: var(--green); }

/* Stat cards */
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
}
.stat-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}
.stat-value {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.stat-sub { font-size: 0.7rem; color: var(--text-muted); margin-top: 4px; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius);
    font-family: var(--font);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.btn-primary {
    background: var(--cyan-dim);
    border: 1px solid var(--cyan);
    color: var(--cyan);
}
.btn-primary:hover { background: rgba(0,229,255,0.25); box-shadow: 0 0 12px rgba(0,229,255,0.2); }
.btn-danger {
    background: var(--red-dim);
    border: 1px solid var(--red);
    color: var(--red);
}
.btn-danger:hover { background: rgba(255,50,80,0.25); box-shadow: 0 0 12px rgba(255,50,80,0.2); }
.btn-ghost {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
}
.btn-ghost:hover { border-color: var(--text-secondary); color: var(--text-primary); }
.btn-green {
    background: var(--green-dim);
    border: 1px solid var(--green);
    color: var(--green);
}
.btn-green:hover { background: rgba(0,255,136,0.25); }
.btn-sm { padding: 5px 10px; font-size: 0.7rem; }
.btn-block { width: 100%; justify-content: center; }

/* Tables */
.table-wrap {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
table { width: 100%; border-collapse: collapse; }
table th {
    text-align: left;
    padding: 10px 16px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
}
table td {
    padding: 10px 16px;
    font-size: 0.8rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
}
table tr:hover td { background: var(--bg-hover); }
table tr:last-child td { border-bottom: none; }
.empty-row { color: var(--text-muted); font-style: italic; }

/* Forms */
.form-label {
    display: block;
    font-size: 0.7rem;
    color: var(--red);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}
.form-input {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-input);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}
.form-input:focus {
    outline: none;
    border-color: var(--red);
    box-shadow: 0 0 8px rgba(255,50,80,0.15);
}
.form-input::placeholder { color: var(--text-muted); }
.form-hint { font-size: 0.7rem; color: var(--text-muted); margin-top: 4px; }
.form-select {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 0.8rem;
}

/* Pills / Tags */
.pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.pill-green { background: var(--green-dim); color: var(--green); }
.pill-red { background: var(--red-dim); color: var(--red); }
.pill-cyan { background: var(--cyan-dim); color: var(--cyan); }
.pill-yellow { background: var(--yellow-dim); color: var(--yellow); }
.pill-purple { background: var(--purple-dim); color: var(--purple); }
.pill-muted { background: rgba(60,70,80,0.3); color: var(--text-secondary); }

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.card-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--cyan);
    letter-spacing: 0.5px;
}
.card-body { padding: 16px; }

/* Action icons row */
.action-icons {
    display: flex;
    gap: 6px;
}
.action-icon {
    width: 30px; height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.15s;
    background: transparent;
}
.action-icon:hover { border-color: var(--cyan); background: var(--cyan-dim); }
.action-icon.danger:hover { border-color: var(--red); background: var(--red-dim); }

/* Toast */
.toast-container { position: fixed; top: 16px; right: 16px; z-index: 2000; display: flex; flex-direction: column; gap: 8px; }
.toast {
    padding: 10px 16px;
    border-radius: var(--radius);
    font-size: 0.8rem;
    box-shadow: var(--shadow);
    animation: slideIn 0.3s ease;
    max-width: 340px;
    font-family: var(--font);
}
.toast-success { background: #0a1a10; color: var(--green); border-left: 3px solid var(--green); }
.toast-error { background: #1a0a0a; color: var(--red); border-left: 3px solid var(--red); }
.toast-info { background: #0a1520; color: var(--cyan); border-left: 3px solid var(--cyan); }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* Toggle */
.toggle {
    position: relative;
    width: 36px; height: 20px;
    background: var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s;
}
.toggle.on { background: var(--cyan); }
.toggle::after {
    content: '';
    position: absolute;
    top: 2px; left: 2px;
    width: 16px; height: 16px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
}
.toggle.on::after { transform: translateX(16px); }

/* Page fade in */
.main-area { animation: fadeIn 0.15s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
