:root {
    --nstt-bg-primary: #ffffff;
    --nstt-bg-secondary: #f8fafc;
    --nstt-border-color: #e2e8f0;
    --nstt-text-main: #0f172a;
    --nstt-text-muted: #64748b;
    --nstt-accent-gradient: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    --nstt-success: #10b981;
    --nstt-warning: #f59e0b;
    --nstt-danger: #ef4444;
    --nstt-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    --nstt-gauge-track: #e2e8f0;
}

.nstt-wrapper.dark-theme {
    --nstt-bg-primary: #0f172a;
    --nstt-bg-secondary: #1e293b;
    --nstt-border-color: #334155;
    --nstt-text-main: #f8fafc;
    --nstt-text-muted: #94a3b8;
    --nstt-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.3);
    --nstt-gauge-track: #334155;
}

.nstt-wrapper {
    background-color: var(--nstt-bg-primary);
    border: 1px solid var(--nstt-border-color);
    border-radius: 16px;
    padding: 24px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: var(--nstt-text-main);
    box-shadow: var(--nstt-shadow);
    max-width: 850px;
    margin: 20px auto;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nstt-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--nstt-border-color);
    padding-bottom: 16px;
    margin-bottom: 24px;
}

.nstt-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    color: var(--nstt-text-main);
    display: flex;
    align-items: center;
    gap: 10px;
}

.nstt-btn-icon {
    background: var(--nstt-bg-secondary);
    border: 1px solid var(--nstt-border-color);
    color: var(--nstt-text-main);
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.nstt-btn-icon:hover {
    background: var(--nstt-border-color);
}

/* Gauge Cluster Elements */
.nstt-gauge-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 32px;
    position: relative;
}

.nstt-gauge-outer {
    position: relative;
    width: 220px;
    height: 220px;
    margin-bottom: 16px;
}

.nstt-gauge-svg {
    transform: rotate(-90deg);
    width: 100%;
    height: 100%;
}

.nstt-gauge-bg {
    fill: none;
    stroke: var(--nstt-gauge-track);
    stroke-width: 12;
}

.nstt-gauge-fill {
    fill: none;
    stroke: url(#nstt-grad);
    stroke-width: 14;
    stroke-linecap: round;
    stroke-dasharray: 534;
    stroke-dashoffset: 534;
    transition: stroke-dashoffset 0.1s linear;
}

/* Fallback stroke colors directly matching fallback UI */
.nstt-gauge-fill {
    stroke: #3b82f6; 
}

.nstt-gauge-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    display: flex;
    flex-direction: column;
}

.nstt-val-display {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
}

.nstt-unit-display {
    font-size: 0.9rem;
    color: var(--nstt-text-muted);
    font-weight: 600;
    text-transform: uppercase;
    margin-top: 4px;
}

/* Linear Streamlined Progress Track */
.nstt-progress-container {
    width: 100%;
    max-width: 400px;
    background-color: var(--nstt-gauge-track);
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.nstt-progress-bar {
    background: var(--nstt-accent-gradient);
    height: 100%;
    width: 0%;
    transition: width 0.2s ease;
}

.nstt-status {
    font-size: 0.95rem;
    color: var(--nstt-text-muted);
    font-weight: 500;
    margin: 4px 0 0 0;
}

/* Operational Metrics Dashboard Grid Grid Layout */
.nstt-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.nstt-card {
    background-color: var(--nstt-bg-secondary);
    border: 1px solid var(--nstt-border-color);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: transform 0.2s;
}

.nstt-card:hover {
    transform: translateY(-2px);
}

.nstt-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #fff;
}

.nstt-card-icon.download { background: linear-gradient(135deg, #10b981 0%, #059669 100%); }
.nstt-card-icon.upload { background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%); }
.nstt-card-icon.ping { background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%); }
.nstt-card-icon.jitter { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); }

.nstt-card-data {
    display: flex;
    flex-direction: column;
}

.nstt-label {
    font-size: 0.8rem;
    color: var(--nstt-text-muted);
    font-weight: 600;
    text-transform: uppercase;
}

.nstt-card-data h3 {
    margin: 2px 0 0 0;
    font-size: 1.35rem;
    font-weight: 700;
}

.nstt-card-data h3 small {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--nstt-text-muted);
}

/* Analytics Scoring Dashboard Block */
.nstt-analytics-grid {
    display: flex;
    justify-content: space-between;
    background: var(--nstt-bg-secondary);
    border: 1px solid var(--nstt-border-color);
    padding: 14px 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-size: 0.95rem;
}

.nstt-analytics-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nstt-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    background: var(--nstt-border-color);
    color: var(--nstt-text-muted);
}

.nstt-badge.excellent { background-color: rgba(16, 185, 129, 0.15); color: #10b981; }
.nstt-badge.good { background-color: rgba(59, 130, 246, 0.15); color: #3b82f6; }
.nstt-badge.slow { background-color: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.nstt-badge.unstable { background-color: rgba(239, 68, 68, 0.15); color: #ef4444; }

/* Structural Metadata Parameters */
.nstt-meta-panel {
    background-color: var(--nstt-bg-secondary);
    border: 1px solid var(--nstt-border-color);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 24px;
}

.nstt-meta-panel h3 {
    margin: 0 0 12px 0;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nstt-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    font-size: 0.85rem;
}

.nstt-meta-grid div {
    color: var(--nstt-text-muted);
}

.nstt-meta-grid span {
    color: var(--nstt-text-main);
    font-weight: 500;
}

/* Navigation Dashboard Controls Buttons styling */
.nstt-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
    justify-content: center;
}

.nstt-controls.export-group {
    background-color: var(--nstt-bg-secondary);
    padding: 12px;
    border-radius: 10px;
    border: 1px dashed var(--nstt-border-color);
}

.nstt-btn {
    padding: 12px 24px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: opacity 0.2s, transform 0.1s;
}

.nstt-btn:active { transform: scale(0.98); }
.nstt-btn:disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }

.nstt-btn.primary { background: var(--nstt-accent-gradient); color: #fff; }
.nstt-btn.danger { background-color: var(--nstt-danger); color: #fff; }
.nstt-btn.secondary { background-color: var(--nstt-border-color); color: var(--nstt-text-main); }
.nstt-btn.action { background-color: var(--nstt-bg-primary); border: 1px solid var(--nstt-border-color); color: var(--nstt-text-main); font-size: 0.85rem; padding: 8px 14px;}

.nstt-footer-options {
    text-align: center;
    font-size: 0.85rem;
    color: var(--nstt-text-muted);
    margin-top: 16px;
}

.nstt-error-box {
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--nstt-danger);
    color: var(--nstt-danger);
    padding: 12px;
    border-radius: 8px;
    margin-top: 16px;
    font-size: 0.9rem;
    text-align: center;
    font-weight: 500;
}

.hidden { display: none !important; }

@media (max-width: 600px) {
    .nstt-metrics-grid { grid-template-columns: 1fr 1fr; }
    .nstt-controls .nstt-btn { width: 100%; justify-content: center; }
    .nstt-analytics-grid { flex-direction: column; gap: 8px; }
}