:root {
    --bg-dark: #0f172a;
    --bg-panel: rgba(30, 41, 59, 0.7);
    --border-light: rgba(255, 255, 255, 0.1);
    --text-primary: #f8fafc;
    --text-dim: #94a3b8;
    
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --secondary: #475569;
    --secondary-hover: #334155;
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --success: #10b981;
    --warning: #f59e0b;
    
    --radius-lg: 16px;
    --radius-md: 10px;
    --radius-sm: 6px;
    
    --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
}

/* Typography Utilities */
.fw-light { font-weight: 300; }
.text-dim { color: var(--text-dim); }
.text-sm { font-size: 0.875rem; }
.text-monospace { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }
.blur-part { filter: blur(3px); transition: filter 0.3s; cursor: pointer; }
.blur-part:hover { filter: blur(0); }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }

h1, h2, h3 { letter-spacing: -0.025em; margin-bottom: 0.5rem; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.25rem; }

/* View Transitions */
.view {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s;
    z-index: 1;
}

.view.active {
    opacity: 1;
    visibility: visible;
    z-index: 10;
}

/* Glassmorphism Panel */
.glass-panel {
    background: var(--bg-panel);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-glass);
}

/* Buttons */
button {
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
    border: none;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    padding: 0.6rem 1.25rem;
}
.btn-primary:hover { background-color: var(--primary-hover); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
    background-color: var(--secondary);
    color: white;
    padding: 0.6rem 1.25rem;
}
.btn-secondary:hover { background-color: var(--secondary-hover); }

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-light);
    padding: 0.4rem 1rem;
    font-size: 0.875rem;
}
.btn-outline:hover { background-color: rgba(255,255,255,0.05); }

.btn-outline.active {
    background-color: var(--primary);
    border-color: var(--primary);
    color: white;
}
.btn-outline.mode-danger.active {
    background-color: var(--danger);
    border-color: var(--danger);
}

.mode-danger:hover {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.3);
}

.btn-sm { padding: 0.4rem 0.8rem; font-size: 0.875rem; }
.btn-block { width: 100%; }

.btn-icon {
    background: transparent;
    color: var(--text-dim);
    padding: 0.5rem;
    border-radius: 50%;
}
.btn-icon:hover { color: white; background: rgba(255,255,255,0.1); }

.btn-icon-tx {
    background: transparent;
    color: var(--text-dim);
    border: none;
    padding: 0.4rem;
    font-size: 1.1rem;
}
.btn-icon-tx .tx { font-size: 0.75rem; display: block; margin-top: 2px; }
.btn-icon-tx:hover { color: var(--primary); }

.btn-group { display: flex; gap: 0.5rem; }

/* Forms */
.input-group {
    margin-bottom: 1.25rem;
    text-align: left;
}
label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-dim);
    font-size: 0.875rem;
}
input, select, textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    color: white;
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.2s;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
}

/* ========================================================= */
/* Login View */
/* ========================================================= */
.login-wrapper {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.login-panel {
    width: 100%;
    max-width: 400px;
    padding: 2.5rem 2rem;
    text-align: center;
    z-index: 10;
    margin: 0 1rem;
}

.logo-box { margin-bottom: 2rem; }
.logo-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    animation: float 4s ease-in-out infinite;
}
.logo-icon.small { font-size: 1.5rem; animation: none; margin-bottom: 0; margin-right: 0.75rem; }
.subtitle { color: var(--text-dim); font-size: 0.9rem; margin-top: 0.25rem; }

#login-btn { width: 100%; margin-top: 0.5rem; font-size: 1rem; padding: 0.8rem; }
.login-footer { margin-top: 2rem; font-size: 0.75rem; color: rgba(255,255,255,0.2); letter-spacing: 1px; text-transform: uppercase; }

/* Animated BG Blobs */
.bg-blob {
    position: absolute;
    filter: blur(80px);
    z-index: 1;
    opacity: 0.4;
    animation: move 20s infinite alternate ease-in-out;
}
.blob-1 {
    width: 40vw; height: 40vw;
    background: linear-gradient(to right, #3b82f6, #8b5cf6);
    top: -10%; left: -10%;
}
.blob-2 {
    width: 30vw; height: 30vw;
    background: linear-gradient(to right, #10b981, #0ea5e9);
    bottom: -10%; right: -10%;
    animation-delay: -10s;
}

@keyframes move {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(10vw, 10vh) scale(1.2); }
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* ========================================================= */
/* Dashboard View */
/* ========================================================= */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    margin: 1rem 2rem;
    border-radius: var(--radius-md);
}
.header-left { display: flex; align-items: center; }
.header-right { display: flex; align-items: center; gap: 1.5rem; }

.server-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}
.pulse-dot {
    width: 8px; height: 8px;
    background-color: var(--success);
    border-radius: 50%;
    position: relative;
}
.pulse-dot::after {
    content: '';
    position: absolute;
    width: 100%; height: 100%;
    background-color: inherit;
    border-radius: inherit;
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(3); opacity: 0; }
}

.dashboard-content {
    padding: 0 2rem 2rem;
    max-width: 1600px;
    margin: 0 auto;
}

.control-section {
    margin-top: 2rem;
}

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.6s forwards;
}
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }

@keyframes fadeIn {
    to { opacity: 1; transform: translateY(0); }
}

/* Server Card */
.server-card {
    padding: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    align-items: center;
    justify-content: space-between;
}
.server-info { display: flex; gap: 3rem; flex-wrap: wrap; }
.info-item { display: flex; flex-direction: column; gap: 0.25rem; }
.info-label { font-size: 0.75rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 1px; }
.info-value { font-size: 1.25rem; font-weight: 600; }
.info-value.highlight { color: var(--primary); }
.server-actions { display: flex; align-items: center; gap: 1rem; }
.action-label { font-size: 0.875rem; color: var(--text-dim); }

/* Mines Grid */
.mines-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-dim);
}

.mine-card {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.2s, box-shadow 0.2s;
}
.mine-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-light);
}
.card-title-bx { display: flex; align-items: center; gap: 0.5rem; }
.mine-card h3 { margin: 0; font-size: 1.1rem; }

.status-indicator {
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
}
.status-indicator.enabled { background: rgba(16, 185, 129, 0.1); color: var(--success); }
.status-indicator.disabled { background: rgba(245, 158, 11, 0.1); color: var(--warning); }
.status-indicator.stopped { background: rgba(239, 68, 68, 0.1); color: var(--danger); }

.card-body { flex-grow: 1; }
.info-row { display: flex; justify-content: space-between; margin-bottom: 0.5rem; font-size: 0.875rem; }
.info-row .label { color: var(--text-dim); }

.pending-cmds {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    min-height: 24px;
}
.cmd-chip {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    border: 1px solid rgba(59, 130, 246, 0.3);
}
.cmd-chip.notice-pending { background: rgba(59, 130, 246, 0.15); color: #93c5fd; border-color: rgba(96, 165, 250, 0.35); }
.cmd-chip.notice-delivered { background: rgba(245, 158, 11, 0.15); color: #fcd34d; border-color: rgba(245, 158, 11, 0.35); }
.cmd-chip.notice-displayed { background: rgba(245, 158, 11, 0.2); color: #fbbf24; border-color: rgba(251, 191, 36, 0.35); }
.cmd-chip.notice-acknowledged { background: rgba(16, 185, 129, 0.15); color: #6ee7b7; border-color: rgba(52, 211, 153, 0.35); }
.cmd-chip.notice-timeout { background: rgba(239, 68, 68, 0.18); color: #fca5a5; border-color: rgba(248, 113, 113, 0.4); }

.notif-row .value,
.notif-status-row .value {
    max-width: 210px;
    text-align: right;
    word-break: break-word;
}

.card-footer { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--border-light); }
.btn-row.main-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.btn-row.secondary-actions { display: flex; justify-content: space-around; }

/* ========================================================= */
/* Modals & Loaders */
/* ========================================================= */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    transition: opacity 0.3s, visibility 0.3s;
}
.modal-backdrop.hidden { opacity: 0; visibility: hidden; pointer-events: none; }

.modal {
    width: 100%;
    max-width: 500px;
    background: var(--bg-dark); /* Solid background for modal to avoid double blur */
    border: 1px solid var(--border-light);
    transform: translateY(0) scale(1);
    transition: transform 0.3s;
}
.modal-backdrop.hidden .modal { transform: translateY(20px) scale(0.95); }

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-light);
}
.modal-header h3 { margin: 0; font-size: 1.1rem; }
.close-modal {
    background: transparent; border: none; font-size: 1.5rem; color: var(--text-dim);
    cursor: pointer; padding: 0; line-height: 1; margin: -5px; width: 30px; height: 30px;
    border-radius: 50%;
}
.close-modal:hover { background: rgba(255,255,255,0.1); color: white; }

.modal-body { padding: 1.5rem; }
.modal-actions { display: flex; justify-content: flex-end; gap: 1rem; margin-top: 1rem; }
.config-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }

.loader {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    display: inline-block;
}
.loader.hidden { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Toast */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.toast {
    background: rgba(30, 41, 59, 0.9);
    border-left: 4px solid var(--primary);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transform: translateX(120%);
    animation: slideIn 0.3s forwards;
    cursor: pointer;
}
.toast-success { border-color: var(--success); }
.toast-error { border-color: var(--danger); }
.toast.hiding { animation: slideOut 0.3s forwards; }

@keyframes slideIn { to { transform: translateX(0); } }
@keyframes slideOut { to { transform: translateX(120%); opacity: 0; } }

/* ========================================================= */
/* Multi-Instance Mine Cards                                 */
/* ========================================================= */

.instance-counter {
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}
.instance-counter.has-alert {
    background: rgba(239, 68, 68, 0.12);
    color: var(--danger);
    animation: blink-soft 2s infinite;
}
@keyframes blink-soft {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.service-group {
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.service-group:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.service-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    padding-left: 0.25rem;
}

.service-mini {
    text-transform: none;
    letter-spacing: 0;
    font-size: 0.72rem;
    font-weight: 500;
    color: rgba(148, 163, 184, 0.86);
    white-space: nowrap;
}

.instance-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap; /* Allow wrapping if space is tight */
    gap: 0.5rem; /* Reduced gap */
    padding: 0.4rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
    transition: background-color 0.2s;
}
.instance-row:last-of-type {
    margin-bottom: 0.5rem;
}

.inst-label {
    font-weight: 600;
    color: var(--text-dim);
}

.inst-role {
    min-width: 75px; /* Reduced from 100px */
    font-weight: 500;
}

.inst-hb {
    font-size: 0.8rem;
    color: var(--text-dim);
    white-space: nowrap;
}

.queue-info {
    font-size: 0.75rem;
    color: var(--text-dim);
    background: rgba(255,255,255,0.04);
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    white-space: nowrap;
    min-width: 1.7rem;
    text-align: center;
    justify-self: center;
}
.queue-info.queue-alert {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.12);
    font-weight: 600;
}
.queue-info.queue-pending {
    color: var(--primary);
    background: rgba(59, 130, 246, 0.12);
}
.queue-info.queue-ok {
    color: var(--success);
    background: rgba(16, 185, 129, 0.08);
}

/* Role Colors (Only subtle backgrounds if desired, removing text color overrides) */
.instance-row.role-active {
    background: rgba(16, 185, 129, 0.04);
}

.instance-row.role-idle {
    background: rgba(59, 130, 246, 0.04);
}

.instance-row.role-paused {
    background: rgba(245, 158, 11, 0.08);
}

.instance-row.role-restart {
    background: rgba(245, 158, 11, 0.12);
}

.instance-row.role-offline {
    /* Removed red background to avoid sea of red */
    background: rgba(255, 255, 255, 0.02);
}

.node-block {
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-sm);
    background: rgba(15, 23, 42, 0.24);
    margin-bottom: 0.45rem;
    overflow: hidden;
}

.node-block[open] {
    background: rgba(15, 23, 42, 0.34);
    border-color: rgba(96, 165, 250, 0.18);
}

.node-summary {
    display: grid;
    grid-template-columns: minmax(3.2rem, 0.9fr) 1rem minmax(4.2rem, 1fr) minmax(0, 1.35fr) 1rem;
    gap: 0.55rem;
    align-items: center;
    min-height: 2.25rem;
    padding: 0.45rem 0.65rem;
    cursor: pointer;
    list-style: none;
    font-size: 0.8rem;
}

.node-summary::-webkit-details-marker {
    display: none;
}

.node-summary::after {
    content: "›";
    color: var(--text-dim);
    transform: rotate(0deg);
    transition: transform 0.2s;
}

.node-block[open] .node-summary::after {
    transform: rotate(90deg);
}

.node-title {
    font-weight: 700;
    color: var(--text-primary);
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.node-hb {
    color: var(--text-dim);
    white-space: nowrap;
    justify-self: center;
}

.node-metrics {
    color: var(--text-dim);
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    justify-self: center;
    text-align: center;
}

.node-summary .status-dot {
    width: 0.72rem;
    height: 0.72rem;
}

.node-details {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0.55rem;
    padding: 0.45rem 0.55rem 0.6rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.detail-group {
    border: 1px solid rgba(255, 255, 255, 0.055);
    border-radius: 5px;
    overflow: hidden;
    background: rgba(2, 6, 23, 0.2);
}

.detail-title {
    padding: 0.35rem 0.45rem;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-dim);
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.055);
}

.upload-link-row {
    display: grid;
    grid-template-columns: 0.75rem minmax(0, 1fr) auto 2.45rem;
    gap: 0.25rem;
    align-items: center;
    padding: 0.3rem 0.45rem;
    font-size: 0.74rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.045);
}

.upload-link-row:last-child {
    border-bottom: 0;
}

.link-name {
    color: var(--text-primary);
    font-weight: 650;
    min-width: 0;
}

.link-metric {
    grid-column: 2 / -1;
    color: var(--text-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.66rem;
    opacity: 0.72;
    line-height: 1;
    margin-top: -0.1rem;
}

.detail-empty {
    padding: 0.55rem;
    font-size: 0.74rem;
    color: rgba(148, 163, 184, 0.75);
}

.extractor-list {
    margin: 0.1rem 0 0.55rem 0.5rem;
    display: grid;
    gap: 0.25rem;
}

.component-list {
    display: grid;
    margin: 0;
    gap: 0;
}

.component-row,
.extractor-row {
    display: grid;
    grid-template-columns: 0.8rem minmax(0, 1fr) auto auto 1.8rem;
    align-items: center;
    gap: 0.35rem;
    padding: 0.38rem 0.45rem;
    font-size: 0.75rem;
    background: rgba(255, 255, 255, 0.025);
    border-bottom: 1px solid rgba(255, 255, 255, 0.045);
}

.component-row:last-child,
.extractor-row:last-child {
    border-bottom: 0;
}

.component-main,
.extractor-main {
    min-width: 0;
    color: var(--text-dim);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.component-age,
.component-count {
    color: var(--text-dim);
    font-size: 0.72rem;
    white-space: nowrap;
}

.component-count {
    text-align: center;
}

.component-restart {
    width: 1.8rem;
    min-width: 1.8rem;
    height: 1.45rem;
    padding: 0;
    justify-self: end;
}

.mini-action {
    width: 2.4rem;
    min-width: 2.4rem;
    height: 1.45rem;
    padding: 0 0.1rem;
    border-radius: 4px;
    background: rgba(15, 23, 42, 0.66);
    color: var(--text-dim);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.72rem;
    line-height: 1;
}

.mini-action:hover,
.mini-action:focus {
    color: var(--text-primary);
    border-color: rgba(96, 165, 250, 0.35);
}

.status-dot {
    width: 0.52rem;
    height: 0.52rem;
    border-radius: 50%;
    display: inline-block;
    justify-self: center;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.04);
}

.dot-ok {
    background: var(--success);
}

.dot-bad {
    background: var(--danger);
}

.dot-muted {
    background: var(--text-muted);
}

.extractor-ok .extractor-main {
    color: var(--success);
}
.extractor-ok .component-main { color: var(--success); }

.extractor-standby .extractor-main {
    color: var(--primary);
}
.extractor-standby .component-main { color: var(--primary); }

.extractor-warning .extractor-main {
    color: var(--warning);
}
.extractor-warning .component-main { color: var(--warning); }

.extractor-fault .extractor-main {
    color: var(--danger);
}
.extractor-fault .component-main { color: var(--danger); }

/* Service Actions */
.service-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    padding-left: 0.25rem;
}

/* Compact Button */
.btn-xs {
    font-size: 0.75rem;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-weight: 500;
    background: transparent;
    color: var(--text-dim);
    border: 1px solid var(--border-light);
    cursor: pointer;
    transition: all 0.2s;
}
.btn-xs:hover {
    background: rgba(255,255,255,0.06);
    color: var(--text-primary);
}
.btn-xs:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}
.btn-xs:disabled:hover {
    background: transparent;
    color: var(--text-dim);
    border-color: var(--border-light);
}
.btn-xs.mode-danger:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.3);
}
.btn-xs.btn-success {
    color: var(--success);
    border-color: rgba(16, 185, 129, 0.3);
}
.btn-xs.btn-success:hover {
    background: rgba(16, 185, 129, 0.1);
}

/* Mine-level Actions */
.mine-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    justify-content: flex-end;
}

.receiver-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
}

.status-indicator.offline {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

/* Section Header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}
.action-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

@media (max-width: 760px) {
    .node-summary {
        grid-template-columns: minmax(3rem, 1fr) 1rem minmax(4rem, 1fr) 1rem;
    }
    .node-summary::after {
        grid-column: 4;
        justify-self: end;
    }
    .node-hb,
    .node-metrics {
        grid-column: 1 / -1;
        justify-self: stretch;
        text-align: left;
    }
    .node-details {
        grid-template-columns: 1fr;
    }
    .upload-link-row {
        grid-template-columns: 0.8rem minmax(0, 1fr) auto 2.35rem;
    }
    .link-metric {
        display: none;
    }
    .component-row,
    .extractor-row {
        grid-template-columns: 0.8rem minmax(0, 1fr) auto auto 1.8rem;
        gap: 0.25rem;
    }
}

/* Toast warning */
.toast-warning { border-color: var(--warning); }

/* Utility Classes */
.hidden { display: none !important; }
