:root {
    --bg-color: #1a1a2e;
    --card-bg: #16213e;
    --text-color: #ffffff;
    --accent-color: #00d4ff;
    --secondary-color: #0f3460;
    --btn-bg: #00d4ff;
    --btn-hover: #00a8cc;
    --error-color: #ff4d4d;
    --success-color: #00ff99;
    --warning-color: #ffaa00;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
}

/* --- Login Screen Styling --- */
#loginScreen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: #1a1a2e;
}

.login-card {
    width: 380px;
    background: #16213e;
    border: 1px solid #00d4ff;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 0 30px rgba(0,212,255,0.15);
}

.login-title {
    font-size: 1.6rem;
    color: #00d4ff;
    text-align: center;
    margin-bottom: 8px;
    font-weight: bold;
}

.login-subtitle {
    color: #888;
    text-align: center;
    margin-bottom: 24px;
    font-size: 0.9rem;
}

#uidInput {
    width: 100%;
    padding: 12px;
    background: #1a1a2e;
    border: 1px solid #2a2a4a;
    border-radius: 6px;
    color: #e0e0e0;
    font-size: 1.1rem;
    text-align: center;
    letter-spacing: 2px;
    margin-bottom: 16px;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

#uidInput:focus {
    border-color: #00d4ff;
    outline: none;
}

#btnLogin {
    width: 100%;
    padding: 12px;
    background: #00ff99;
    color: #1a1a2e;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.2s;
}

#btnLogin:hover { opacity: 0.85; }
#btnLogin:disabled { opacity: 0.5; cursor: not-allowed; }

#loginError {
    color: #ff4d4d;
    font-size: 0.85rem;
    text-align: center;
    margin-top: 12px;
    min-height: 20px;
}

#landingLoginError,
#clientLoginError {
    color: #ff4d4d;
    font-size: 0.85rem;
    text-align: center;
    margin-top: 12px;
    min-height: 20px;
}

#landingUsername,
#landingPassword,
#clientUsername,
#clientPassword {
    width: 100%;
    padding: 12px;
    background: #1a1a2e;
    border: 1px solid #2a2a4a;
    border-radius: 6px;
    color: #e0e0e0;
    font-size: 1rem;
    margin-bottom: 12px;
    box-sizing: border-box;
}

#landingUsername:focus,
#landingPassword:focus,
#clientUsername:focus,
#clientPassword:focus {
    border-color: #00d4ff;
    outline: none;
}

#btnLandingLogin,
#btnClientLogin {
    width: 100%;
    padding: 12px;
    background: #00ff99;
    color: #1a1a2e;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
}

.client-node-item {
    width: 100%;
    background: #1a1a2e;
    color: #ffffff;
    border: 1px solid #2a2a4a;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    text-align: left;
}

.client-node-item:hover {
    border-color: #00d4ff;
}

.client-node-item span span {
    display: block;
    color: #888;
    font-size: 0.85rem;
    margin-top: 4px;
}

.client-gw-group {
    margin-bottom: 14px;
}

.client-gw-header {
    display: flex;
    align-items: center;
    padding: 6px 10px;
    background: #0f1a2b;
    border: 1px solid #1e3a5a;
    border-radius: 6px 6px 0 0;
    margin-bottom: 2px;
}

.client-gw-group .client-node-item {
    border-radius: 4px;
    margin-bottom: 4px;
    border-color: #1e2e44;
}

/* --- Navbar Styling --- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #16213e;
    border-bottom: 1px solid #2a2a4a;
    padding: 12px 24px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-title { color: #00d4ff; font-weight: bold; font-size: 1.1rem; }

#connectedUid { color: #00ff99; font-size: 0.85rem; margin-right: 16px; font-weight: bold; }

.client-context {
    color: #e0e0e0;
    font-size: 0.85rem;
    margin-right: 16px;
    font-weight: 600;
}

#btnDisconnect {
    background: transparent;
    border: 1px solid #ff4d4d;
    color: #ff4d4d;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.2s;
}

#btnDisconnect:hover { background: rgba(255,77,77,0.15); }

/* --- Dashboard Styling --- */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.card {
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--secondary-color);
}

h2 {
    color: var(--accent-color);
    margin-top: 0;
    font-size: 1.2rem;
    border-bottom: 1px solid var(--secondary-color);
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

/* Status Cards */
.status-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px solid #2a2a4a;
}
.status-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}
.health-detail {
    font-size: 0.78rem;
    color: #888;
    font-family: monospace;
}
.health-detail.error {
    color: #ff4d4d;
}

/* --- Admin Management Forms --- */
.admin-subform {
    background: #0b0b18;
    border: 1px solid #1e1e38;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 16px;
}
.admin-subform-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}
.admin-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.admin-field label {
    font-size: 0.75rem;
    color: #888;
    font-weight: 600;
}
.admin-field input, .admin-field select {
    background: #0d0d1a;
    border: 1px solid #2a2a4a;
    color: #ccc;
    padding: 6px 10px;
    border-radius: 7px;
    font-size: 0.85rem;
    outline: none;
    transition: border-color 0.15s;
}
.admin-field input:focus, .admin-field select:focus {
    border-color: #a78bfa;
}
.admin-field select option {
    background: #0d0d1a;
}
.admin-hint {
    color: #555;
    font-weight: 400;
}
.admin-subform-toggle {
    margin: 12px 0 0;
}
.admin-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: #888;
    cursor: pointer;
}
.admin-checkbox-label input[type="checkbox"] {
    accent-color: #a78bfa;
    width: 15px;
    height: 15px;
}
.admin-feedback {
    font-size: 0.82rem;
    color: #888;
}
.admin-feedback.ok    { color: #00ff99; }
.admin-feedback.error { color: #ff4d4d; }

/* --- Client List --- */
.admin-client-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
}
.admin-client-row {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #0b0b18;
    border: 1px solid #1e1e38;
    border-radius: 8px;
    padding: 10px 14px;
    flex-wrap: wrap;
}
.admin-client-left {
    display: flex;
    flex-direction: column;
    min-width: 130px;
}
.admin-client-name {
    font-weight: 700;
    color: #a78bfa;
    font-size: 0.9rem;
}
.admin-client-id {
    font-size: 0.72rem;
    color: #555;
    font-family: monospace;
}
.admin-client-nodes {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    flex: 1;
}
.admin-client-right {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}
.admin-client-count {
    font-size: 0.75rem;
    color: #555;
}
.admin-status-dot {
    font-size: 0.8rem;
}

/* --- Unassigned Nodes --- */
.unassigned-empty {
    color: #00ff99;
    font-size: 0.85rem;
    padding: 10px 0;
}
.unassigned-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
}
.unassigned-row {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #0b0b18;
    border: 1px solid #2a1a1a;
    border-left: 3px solid #ffaa00;
    border-radius: 8px;
    padding: 10px 14px;
    flex-wrap: wrap;
}
.unassigned-left {
    display: flex;
    flex-direction: column;
    min-width: 110px;
}
.unassigned-uid {
    font-weight: 700;
    color: #ffaa00;
    font-size: 0.92rem;
    font-family: monospace;
}
.unassigned-meta {
    font-size: 0.72rem;
    color: #555;
    margin-top: 2px;
}
.unassigned-mid {
    flex: 1;
}
.unassigned-seen {
    font-size: 0.75rem;
    color: #555;
}
.unassigned-right {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    flex-wrap: wrap;
}
.unassigned-assign-inline {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.unassigned-client-sel {
    background: #0d0d1a;
    border: 1px solid #2a2a4a;
    color: #ccc;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    outline: none;
    cursor: pointer;
}
.unassigned-client-sel:focus {
    border-color: #a78bfa;
}
.btn-assign-inline {
    background: rgba(167, 139, 250, 0.12);
    border: 1px solid rgba(167, 139, 250, 0.3);
    color: #a78bfa;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
}
.btn-assign-inline:hover {
    background: rgba(167, 139, 250, 0.22);
}
.unassigned-feedback {
    font-size: 0.78rem;
}

/* --- Database Explorer — Table List --- */
.db-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
    padding: 4px 0;
}
.db-card {
    background: #0d0d1a;
    border: 1px solid #2a2a4a;
    border-radius: 10px;
    padding: 14px 16px;
    cursor: pointer;
    transition: border-color 0.18s, box-shadow 0.18s, transform 0.15s;
    outline: none;
}
.db-card:hover, .db-card:focus {
    border-color: #a78bfa;
    box-shadow: 0 0 14px rgba(167, 139, 250, 0.18);
    transform: translateY(-2px);
}
.db-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}
.db-card-icon {
    font-size: 1.15rem;
}
.db-card-name {
    font-weight: 700;
    color: #a78bfa;
    font-size: 0.92rem;
    flex: 1;
}
.db-card-arrow {
    color: #444;
    font-size: 1rem;
    transition: color 0.15s;
}
.db-card:hover .db-card-arrow {
    color: #a78bfa;
}
.db-count-badge {
    background: rgba(167, 139, 250, 0.12);
    color: #a78bfa;
    font-size: 0.72rem;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
    white-space: nowrap;
}
.db-count-empty {
    background: rgba(136, 136, 136, 0.1);
    color: #555;
}
.db-col-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.db-col-pill {
    background: rgba(79, 195, 247, 0.08);
    color: #4fc3f7;
    font-size: 0.68rem;
    padding: 2px 7px;
    border-radius: 8px;
    font-family: monospace;
    border: 1px solid rgba(79, 195, 247, 0.15);
}

/* --- Database Explorer — Row View --- */
.db-row-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.db-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
}
.db-back-btn {
    background: transparent;
    border: 1px solid #2a2a4a;
    color: #888;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: border-color 0.15s, color 0.15s;
}
.db-back-btn:hover {
    border-color: #a78bfa;
    color: #a78bfa;
}
.db-breadcrumb-sep  { color: #333; }
.db-breadcrumb-icon { font-size: 1rem; }
.db-breadcrumb-name {
    font-weight: 700;
    color: #a78bfa;
    font-size: 0.92rem;
}
.db-breadcrumb-count {
    font-size: 0.75rem;
    color: #555;
    background: rgba(136,136,136,0.08);
    padding: 2px 8px;
    border-radius: 8px;
}
.db-filter-input {
    background: #0d0d1a;
    border: 1px solid #2a2a4a;
    color: #ccc;
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 0.82rem;
    width: 220px;
    outline: none;
    transition: border-color 0.15s;
}
.db-filter-input:focus {
    border-color: #a78bfa;
}
.db-scroll {
    overflow-x: auto;
    max-height: 440px;
    overflow-y: auto;
    border: 1px solid #1a1a2e;
    border-radius: 8px;
}
.db-rows-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}
.db-th {
    text-align: left;
    padding: 8px 12px;
    color: #888;
    border-bottom: 2px solid #2a2a4a;
    font-weight: 600;
    white-space: nowrap;
    position: sticky;
    top: 0;
    background: #0b0b18;
    z-index: 1;
}
.db-th-idx {
    color: #333;
    font-size: 0.65rem;
    margin-right: 5px;
    font-weight: 400;
}
.db-cell {
    padding: 6px 12px;
    color: #ccc;
    vertical-align: top;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: monospace;
    font-size: 0.78rem;
    border-bottom: 1px solid #12121f;
}
.db-row-even td { background: #0d0d1a; }
.db-row-odd  td { background: #0b0b17; }
.db-rows-table tr:hover td {
    background: rgba(167, 139, 250, 0.06);
}
.db-null {
    color: #333;
    font-style: italic;
}
.db-redacted {
    color: #ffaa00;
    font-size: 0.75rem;
}
.db-status-val {
    font-weight: 600;
    font-size: 0.78rem;
}
.db-json-toggle {
    color: #4fc3f7;
    cursor: pointer;
    font-size: 0.75rem;
    text-decoration: underline dotted;
}
.db-json-expanded {
    color: #aaa;
    font-size: 0.72rem;
    margin: 4px 0 0;
    white-space: pre-wrap;
    word-break: break-all;
    max-width: 320px;
}
.db-empty-row {
    text-align: center;
    color: #555;
    padding: 24px;
    font-style: italic;
}
.db-truncate-note {
    font-size: 0.78rem;
    color: #ffaa00;
    margin-bottom: 10px;
    background: rgba(255, 170, 0, 0.06);
    border: 1px solid rgba(255, 170, 0, 0.15);
    padding: 6px 12px;
    border-radius: 6px;
}
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: bold;
}
.status-badge.online, .status-badge.alive { background: rgba(0, 255, 153, 0.15); color: #00ff99; }
.status-badge.disconnected, .status-badge.offline, .status-badge.lost { background: rgba(255, 77, 77, 0.15); color: #ff4d4d; }
.status-badge.unknown { background: rgba(136, 136, 136, 0.15); color: #888888; }
.status-badge.warning { background: rgba(255, 170, 0, 0.15); color: #ffaa00; }

/* --- Node List Table --- */
.node-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.node-table th {
    text-align: left;
    padding: 8px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--accent-color);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.node-table td {
    padding: 8px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    vertical-align: middle;
}

.node-table td.mono { font-family: monospace; }

.node-table tbody tr:hover { background: rgba(255, 255, 255, 0.03); }

#btnNodeList {
    font-size: 0.8rem;
    padding: 5px 12px;
    margin-right: 10px;
}

.status-summary-box {
    margin-top: 12px;
    font-size: 1rem;
    font-weight: bold;
    text-align: center;
    padding: 10px;
    border-radius: 6px;
}
.state-ready { background: rgba(0, 255, 153, 0.2); color: #00ff99; }
.state-not-ready { background: rgba(255, 77, 77, 0.2); color: #ff4d4d; }
.state-warning { background: rgba(255, 170, 0, 0.2); color: #ffaa00; }

.status-detail {
    margin-top: 10px;
    color: #a9b3d1;
    font-size: 0.9rem;
    line-height: 1.4;
}

.alerts-content {
    display: grid;
    gap: 8px;
}

.empty-state {
    color: #a9b3d1;
    margin: 0;
    padding: 10px 0;
    text-align: center;
}

.error-text { color: var(--error-color); }

.alert-item {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 4px solid var(--warning-color);
    border-radius: 6px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.03);
}

.alert-error { border-left-color: var(--error-color); }
.alert-warning { border-left-color: var(--warning-color); }
.alert-info { border-left-color: var(--accent-color); }

.alert-main {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

.alert-code {
    color: var(--text-color);
    font-family: monospace;
    font-weight: bold;
}

.alert-target,
.alert-meta {
    color: #a9b3d1;
    font-size: 0.85rem;
}

.alert-meta {
    margin-top: 4px;
}

/* Controls */
.button-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn-ctrl { transition: opacity 0.2s, transform 0.1s; }
.btn-start { background: #00ff99; color: #1a1a2e; }
.btn-stop { background: #ff4d4d; color: #fff; }
.btn-reverse { background: #00d4ff; color: #1a1a2e; }
.btn-fault-reset { background: #ffaa00; color: #1a1a2e; }

.btn-secondary {
    background: transparent;
    border: 1px solid var(--accent-color);
    border-radius: 6px;
    color: var(--accent-color);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: bold;
    padding: 8px 12px;
    transition: opacity 0.2s, background 0.2s;
}

.btn-secondary:hover {
    background: rgba(0, 212, 255, 0.1);
}

.btn-secondary:disabled {
    cursor: not-allowed;
    opacity: 0.4;
}

/* Shared Data items */
.data-item { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
.data-item span { font-weight: bold; color: var(--accent-color); font-family: monospace; }
.timestamp { font-size: 0.8rem; opacity: 0.8; }
.badge { padding: 2px 8px; border-radius: 4px; font-size: 0.9em; }
.badge-green { background-color: var(--success-color); color: #000; }
.badge-red { background-color: var(--error-color); color: #fff; }
.badge-warning { background-color: var(--warning-color); color: #1a1a2e; }
.na-text { color: #8892b0; font-style: italic; }

/* Control panel extra styles */
.control-section { margin-bottom: 20px; padding-bottom: 15px; border-bottom: 1px solid rgba(255,255,255,0.05); }
.freq-header { display: flex; justify-content: space-between; align-items: baseline; }
.freq-controls input[type="range"] { -webkit-appearance: none; width: 100%; height: 6px; background: #0f3460; border-radius: 3px; margin: 15px 0; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: #00d4ff; cursor: pointer; }
.freq-input-group { display: flex; gap: 10px; }
.feedback-box { background: #0f3460; padding: 12px; border-radius: 6px; font-family: monospace; font-size: 0.95rem; border-left: 3px solid #555; }
.status-ok { border-left-color: #00ff99; color: #00ff99; }
.status-error { border-left-color: #ff4d4d; color: #ff4d4d; }
.status-pending { border-left-color: #ffaa00; color: #ffaa00; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { animation: fadeIn 0.4s ease; }
.scrollable-list { max-height: 250px; overflow-y: auto; }
/* --- FOTA Styling --- */
.fota-drop-zone {
    border: 2px dashed #2a2a4a;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: rgba(255,255,255,0.02);
    margin: 15px 0;
}

.fota-drop-zone:hover, .fota-drop-zone.dragover {
    border-color: var(--accent-color);
    background: rgba(0, 212, 255, 0.05);
}

.drop-zone-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
    display: block;
}

.fota-hint {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 10px;
}

.fota-status-box {
    margin-top: 15px;
    padding: 15px;
    background: #0f3460;
    border-radius: 6px;
    font-size: 0.9rem;
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background: #1a1a2e;
    border-radius: 4px;
    margin-top: 10px;
    overflow: hidden;
}

.progress-bar {
    width: 0%;
    height: 100%;
    background: var(--accent-color);
    transition: width 0.3s ease;
}

#fota-version {
    background: #1a1a2e;
    border: 1px solid #2a2a4a;
    color: #fff;
    padding: 10px;
    border-radius: 4px;
}
#fota-version:focus {
    border-color: var(--accent-color);
    outline: none;
}

/* --- Fleet counters --- */
.fleet-counters {
    display: flex;
    gap: 16px;
    padding: 10px 14px;
    background: #0b0b18;
    border-radius: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
    align-items: center;
    border: 1px solid #1a1a2e;
}
.fleet-counter {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 48px;
}
.fleet-counter-value {
    font-size: 1.25rem;
    font-weight: bold;
    color: #00d4ff;
    font-family: monospace;
    line-height: 1;
}
.fleet-counter-value.cnt-online  { color: #00ff99; }
.fleet-counter-value.cnt-offline { color: #ff4d4d; }
.fleet-counter-value.cnt-dup     { color: #ffaa00; }
.fleet-counter-label {
    font-size: 0.65rem;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 3px;
}

/* --- Node filter bar --- */
.node-filter-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
    align-items: center;
}
.node-filter-input {
    background: #0d0d1a;
    border: 1px solid #2a2a4a;
    color: #ccc;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.82rem;
    width: 160px;
    outline: none;
    transition: border-color 0.15s;
}
.node-filter-input:focus { border-color: #00d4ff; }
.node-filter-select {
    background: #0d0d1a;
    border: 1px solid #2a2a4a;
    color: #ccc;
    padding: 5px 8px;
    border-radius: 6px;
    font-size: 0.82rem;
    outline: none;
    cursor: pointer;
}
.node-filter-select:focus { border-color: #00d4ff; }
.node-filter-count {
    font-size: 0.75rem;
    color: #555;
    margin-left: 4px;
}

/* --- Stale / duplicate row states --- */
.node-table tr.row-duplicate { background: rgba(255, 170, 0, 0.04); }
.node-table tr.row-duplicate:hover { background: rgba(255, 170, 0, 0.08); }
.badge-stale { background: rgba(255, 170, 0, 0.15); color: #ffaa00; }
.nl-lastseen.stale { color: #ffaa00; }
.dup-badge {
    background: rgba(255, 170, 0, 0.2);
    color: #ffaa00;
    font-size: 0.62rem;
    padding: 1px 5px;
    border-radius: 4px;
    margin-left: 5px;
    font-weight: 700;
    letter-spacing: 0.05em;
    vertical-align: middle;
}

/* --- Alert node link --- */
.alert-node-link {
    color: #00d4ff;
    cursor: pointer;
    text-decoration: underline dotted;
    font-family: monospace;
}
.alert-node-link:hover { color: #00ff99; }

/* --- Loading / error / empty states --- */
.state-loading {
    color: #888;
    text-align: center;
    padding: 18px;
    font-size: 0.85rem;
    margin: 0;
}
.state-error {
    color: #ff4d4d;
    text-align: center;
    padding: 14px;
    font-size: 0.85rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.btn-retry {
    background: transparent;
    border: 1px solid #ff4d4d;
    color: #ff4d4d;
    padding: 4px 14px;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.15s;
}
.btn-retry:hover { background: rgba(255,77,77,0.1); }

/* --- Command panel tabs --- */
.cmd-tabs {
    display: flex;
    border-bottom: 1px solid #2a2a4a;
    margin-bottom: 12px;
}
.cmd-tab {
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: #555;
    padding: 6px 14px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
    margin-bottom: -1px;
}
.cmd-tab:hover { color: #aaa; }
.cmd-tab.active { color: #00d4ff; border-bottom-color: #00d4ff; }

/* --- One-time password reveal --- */
.password-reveal {
    background: #0b0b18;
    border: 1px solid #00ff99;
    border-radius: 6px;
    padding: 10px 14px;
    margin-top: 10px;
}
.password-reveal p { font-size: 0.72rem; color: #888; margin: 0 0 4px; }
.password-reveal code { font-family: monospace; color: #00ff99; font-size: 0.9rem; word-break: break-all; }
