/* PowerSolver Test Runner Styles */
:root {
    --bg-dark: #0f1419;
    --bg-card: #1a1f26;
    --bg-card-hover: #242b35;
    --border-color: #2d3640;
    --text-primary: #e7e9ea;
    --text-secondary: #8b98a5;
    --accent-blue: #1d9bf0;
    --accent-green: #00ba7c;
    --accent-red: #f4212e;
    --accent-yellow: #ffd400;
    --accent-purple: #7856ff;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    background: var(--bg-dark);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    min-height: 100vh;
}

.app-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.app-header {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
}

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

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-icon {
    font-size: 2.5rem;
    color: var(--accent-blue);
}

.app-header h1 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.header-subtitle {
    margin: 4px 0 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.api-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-dark);
    border-radius: 20px;
    font-size: 0.85rem;
}

.api-status i {
    font-size: 0.6rem;
}

.api-status.online i { color: var(--accent-green); }
.api-status.offline i { color: var(--accent-red); }
.api-status.checking i { color: var(--accent-yellow); }

/* Configuration Panel */
.config-panel {
    background: var(--bg-card);
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.config-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    cursor: pointer;
    transition: background 0.2s;
}

.config-header:hover {
    background: var(--bg-card-hover);
}

.config-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.config-body {
    padding: 0 24px 20px;
    display: none;
}

.config-body.show {
    display: block;
}

.config-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.config-item label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.config-item input,
.config-item select {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.config-item input:focus,
.config-item select:focus {
    outline: none;
    border-color: var(--accent-blue);
}

.config-actions {
    display: flex;
    gap: 12px;
}

/* Test Loader Panel */
.test-loader-panel {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
}

.test-loader-panel h3 {
    margin: 0 0 20px;
    font-size: 1rem;
    font-weight: 600;
}

.loader-options {
    display: flex;
    align-items: center;
    gap: 24px;
}

.loader-option {
    flex: 1;
    padding: 20px;
    background: var(--bg-dark);
    border-radius: 10px;
    text-align: center;
}

.loader-option h4 {
    margin: 0 0 8px;
    font-size: 0.95rem;
}

.loader-option p {
    margin: 0 0 16px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.loader-divider {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
}

/* Test Summary */
.test-summary {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
}

.summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.summary-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.summary-actions {
    display: flex;
    gap: 10px;
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.stat-card {
    background: var(--bg-dark);
    border-radius: 10px;
    padding: 16px;
    text-align: center;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.stat-total .stat-value { color: var(--accent-blue); }
.stat-pass .stat-value { color: var(--accent-green); }
.stat-fail .stat-value { color: var(--accent-red); }
.stat-pending .stat-value { color: var(--accent-yellow); }
.stat-time .stat-value { color: var(--accent-purple); }

.progress-container {
    display: flex;
    align-items: center;
    gap: 16px;
}

.progress {
    flex: 1;
    height: 8px;
    background: var(--bg-dark);
    border-radius: 4px;
    overflow: hidden;
}

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

.progress-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    min-width: 60px;
    text-align: right;
}

/* Test Cases Panel */
.test-cases-panel {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 24px;
    border: 1px solid var(--border-color);
}

.test-cases-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 16px;
}

.test-cases-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.filter-controls {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-controls select,
.filter-controls input {
    padding: 8px 12px;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.85rem;
}

.filter-controls input {
    min-width: 200px;
}

/* Test Case Card */
.test-case-card {
    background: var(--bg-dark);
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.test-case-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-color);
}

.test-case-card.selected {
    border-color: var(--accent-blue);
}

.test-status-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.test-status-icon.pending {
    background: rgba(255, 212, 0, 0.1);
    color: var(--accent-yellow);
}

.test-status-icon.running {
    background: rgba(29, 155, 240, 0.1);
    color: var(--accent-blue);
}

.test-status-icon.pass {
    background: rgba(0, 186, 124, 0.1);
    color: var(--accent-green);
}

.test-status-icon.fail {
    background: rgba(244, 33, 46, 0.1);
    color: var(--accent-red);
}

.test-case-info {
    flex: 1;
    min-width: 0;
}

.test-case-name {
    font-weight: 600;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.test-case-meta {
    display: flex;
    gap: 16px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.test-case-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.test-case-actions {
    display: flex;
    gap: 8px;
}

.test-case-actions button {
    padding: 6px 12px;
    font-size: 0.8rem;
}

.test-result-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.test-result-badge.pass {
    background: rgba(0, 186, 124, 0.15);
    color: var(--accent-green);
}

.test-result-badge.fail {
    background: rgba(244, 33, 46, 0.15);
    color: var(--accent-red);
}

/* Modal Styles */
.modal-content {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
}

.modal-footer {
    border-top: 1px solid var(--border-color);
}

.btn-close {
    filter: invert(1);
}

.nav-tabs {
    border-bottom: 1px solid var(--border-color);
}

.nav-tabs .nav-link {
    color: var(--text-secondary);
    border: none;
    padding: 10px 20px;
}

.nav-tabs .nav-link:hover {
    color: var(--text-primary);
    border: none;
}

.nav-tabs .nav-link.active {
    color: var(--accent-blue);
    background: transparent;
    border: none;
    border-bottom: 2px solid var(--accent-blue);
}

.json-viewer {
    background: var(--bg-dark);
    border-radius: 8px;
    padding: 16px;
    overflow: auto;
    max-height: 400px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.85rem;
    white-space: pre-wrap;
    word-break: break-word;
}

.markdown-content {
    background: var(--bg-dark);
    border-radius: 8px;
    padding: 20px;
    max-height: 400px;
    overflow: auto;
}

.markdown-content h1, .markdown-content h2, .markdown-content h3 {
    color: var(--text-primary);
    margin-top: 1em;
}

.markdown-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1em 0;
}

.markdown-content th, .markdown-content td {
    border: 1px solid var(--border-color);
    padding: 8px 12px;
    text-align: left;
}

.markdown-content th {
    background: var(--bg-card);
}

.markdown-content code {
    background: var(--bg-card);
    padding: 2px 6px;
    border-radius: 4px;
}

.markdown-content pre {
    background: var(--bg-card);
    padding: 12px;
    border-radius: 6px;
    overflow: auto;
}

.code-input {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.85rem;
    background: var(--bg-dark) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color) !important;
}

/* Validation Results */
.validation-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.validation-item {
    background: var(--bg-dark);
    border-radius: 8px;
    padding: 12px 16px;
    border-left: 4px solid;
}

.validation-item.pass {
    border-color: var(--accent-green);
}

.validation-item.fail {
    border-color: var(--accent-red);
}

.validation-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.validation-item.pass .validation-header i {
    color: var(--accent-green);
}

.validation-item.fail .validation-header i {
    color: var(--accent-red);
}

.validation-details {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.validation-details code {
    background: var(--bg-card);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--text-primary);
}

/* Buttons */
.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
}

.btn-primary:hover {
    background: #1a8cd8;
    border-color: #1a8cd8;
}

.btn-success {
    background: var(--accent-green);
    border-color: var(--accent-green);
}

.btn-outline-primary {
    color: var(--accent-blue);
    border-color: var(--accent-blue);
}

.btn-outline-primary:hover {
    background: var(--accent-blue);
    color: white;
}

.btn-outline-secondary {
    color: var(--text-secondary);
    border-color: var(--border-color);
}

.btn-outline-secondary:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    border-color: var(--border-color);
}

.btn-outline-danger {
    color: var(--accent-red);
    border-color: var(--accent-red);
}

.btn-outline-danger:hover {
    background: var(--accent-red);
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    .summary-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .loader-options {
        flex-direction: column;
    }
    
    .loader-divider {
        margin: 16px 0;
    }
    
    .filter-controls {
        width: 100%;
    }
    
    .filter-controls input {
        flex: 1;
        min-width: auto;
    }
}

/* Animations */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.test-status-icon.running i {
    animation: spin 1s linear infinite;
}

/* Form controls in dark theme */
.form-control {
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.form-control:focus {
    background: var(--bg-dark);
    border-color: var(--accent-blue);
    color: var(--text-primary);
    box-shadow: 0 0 0 0.2rem rgba(29, 155, 240, 0.25);
}

.form-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* ============================================================ */
/*  Phase 2 additions — new modular UI mount points              */
/* ============================================================ */
.top-bar { display:flex; align-items:center; gap:1rem; padding:.5rem 1rem; border-bottom:1px solid #ddd; }
.top-bar h1 { font-size:1.1rem; margin:0; }

.tabs { display:flex; gap:.25rem; padding:.25rem 1rem; border-bottom:1px solid #ddd; }
.tab { padding:.35rem .8rem; border:1px solid #ddd; background:#f8f8f8; cursor:pointer; border-radius:.25rem .25rem 0 0; }
.tab--active { background:#fff; border-bottom-color:#fff; border-top-color:var(--product-accent,#333); border-top-width:3px; }

#main-panel { padding:1rem; }

.health-card { display:inline-block; padding:.75rem 1rem; border:1px solid #ddd; border-radius:.25rem; margin:.25rem; min-width:150px; }

.runs-table, .cases-table, .results-table { border-collapse:collapse; width:100%; margin-top:.5rem; }
.runs-table th, .runs-table td,
.cases-table th, .cases-table td,
.results-table th, .results-table td { border:1px solid #eee; padding:.25rem .5rem; text-align:left; }

.result-row--failed { background:#fff0f0; }
.result-row--passed { background:#f0fff4; }

.progress { position:relative; width:100%; height:14px; background:#eee; border-radius:7px; overflow:hidden; }
.progress__bar { height:100%; background:#2563eb; transition:width .2s ease; }
.progress__label { position:absolute; top:0; left:50%; transform:translateX(-50%); font-size:.75rem; line-height:14px; }

.error { color:#b91c1c; padding:.5rem; }

/* Phase 10 — environment switcher + PROD badge */
#env-switcher { display:inline-flex; align-items:center; gap:.5rem; }
#env-switcher select { padding:.2rem .4rem; }
.env-badge {
  display:inline-block;
  padding:.1rem .5rem;
  font-size:.7rem;
  font-weight:700;
  letter-spacing:.08em;
  border-radius:.2rem;
  text-transform:uppercase;
}
.env-badge[hidden] { display:none; }
.env-badge--prod {
  background:#c0392b;
  color:#fff;
  border:1px solid #a93226;
}

/* Phase 11 — History view */
.history-view__header { display:flex; justify-content:space-between; align-items:center; margin-bottom:.75rem; flex-wrap:wrap; gap:.5rem; }
.history-filters { display:flex; gap:.75rem; align-items:center; flex-wrap:wrap; }
.history-filters select, .history-filters button { padding:.2rem .4rem; }
.history-loading { color:var(--text-secondary,#8b98a5); font-style:italic; }
.history-empty   { color:var(--text-secondary,#8b98a5); font-style:italic; padding:.5rem 0; }

.history-table { border-collapse:collapse; width:100%; }
.history-table th, .history-table td { border:1px solid #eee; padding:.25rem .5rem; text-align:left; font-size:.9rem; }
.history-row--failed { background:#fff5f5; }
.history-row--passed { background:#f3fbf5; }
.history-row--running { background:#fff8e6; }
.history-row--partial { background:#fef3e3; }
.history-open { padding:.15rem .55rem; font-size:.8rem; cursor:pointer; }

.status-pill { display:inline-block; padding:.1rem .5rem; border-radius:10px; font-size:.72rem; font-weight:600; text-transform:uppercase; letter-spacing:.05em; background:#e0e0e0; color:#333; }
.status-pill--passed  { background:#d4edda; color:#155724; }
.status-pill--failed  { background:#f8d7da; color:#721c24; }
.status-pill--running { background:#fff3cd; color:#856404; }
.status-pill--partial { background:#ffeeba; color:#856404; }
.status-pill--error   { background:#f5c6cb; color:#721c24; }

.run-detail__header { display:flex; align-items:center; gap:.75rem; margin-bottom:.5rem; }
.run-detail__header h3 { margin:0; }
.history-back { padding:.2rem .6rem; cursor:pointer; }
.run-detail__meta { display:grid; grid-template-columns:max-content 1fr; gap:.25rem .75rem; margin:.5rem 0; }
.run-detail__meta dt { font-weight:600; color:var(--text-secondary,#555); }
.run-detail__meta dd { margin:0; }
.run-detail__counts { font-size:.9rem; margin:.25rem 0 .5rem; }
.results-table--history th, .results-table--history td { font-size:.85rem; }

/* Phase 12 — Dashboard health cards */
.dashboard__header { display:flex; justify-content:space-between; align-items:center; margin-bottom:.5rem; gap:.5rem; }
.dashboard__refresh { padding:.25rem .6rem; cursor:pointer; font-size:.85rem; }
.dashboard__health-grid { display:flex; flex-wrap:wrap; gap:.5rem; margin:.25rem 0 1rem; }
.health-card { border-left-width:4px; transition:background-color .15s; }
.health-card h3 { margin:0 0 .25rem; font-size:.95rem; }
.health-card__status { margin:0; font-weight:600; text-transform:uppercase; letter-spacing:.04em; font-size:.75rem; }
.health-card__latency { margin:.15rem 0 0; font-size:.75rem; color:#666; font-family:ui-monospace, "Courier New", monospace; }
.health-card--checking { border-left-color:#90a4ae; }
.health-card--checking .health-card__status { color:#607d8b; }
.health-card--up       { border-left-color:#2e7d32; background:#f1f8f3; }
.health-card--up       .health-card__status { color:#2e7d32; }
.health-card--slow     { border-left-color:#ef6c00; background:#fff8e1; }
.health-card--slow     .health-card__status { color:#ef6c00; }
.health-card--down     { border-left-color:#c62828; background:#fdecea; }
.health-card--down     .health-card__status { color:#c62828; }
.health-card--timeout  { border-left-color:#c62828; background:#fdecea; }
.health-card--timeout  .health-card__status { color:#c62828; }
.health-card--unknown  { border-left-color:#bdbdbd; background:#fafafa; }
.health-card--unknown  .health-card__status { color:#757575; }

/* Phase 13 — Run diffing */
.history-compare-hint { font-size:.8rem; color:#666; font-style:italic; }
.history-table__select { width:1.75rem; text-align:center; }
#history-compare:disabled { opacity:.55; cursor:not-allowed; }

.run-diff__header { display:flex; align-items:center; gap:.75rem; margin-bottom:.5rem; }
.run-diff__header h3 { margin:0; font-size:1rem; }
.run-diff__summary { font-size:.85rem; margin:.25rem 0 .75rem; padding:.4rem .6rem; background:#f4f6f8; border-radius:4px; }
.run-diff__summary strong { color:#222; }
.run-diff__buckets { display:flex; flex-direction:column; gap:1rem; }
.diff-bucket { border-left:3px solid #bdbdbd; padding:.25rem .5rem .5rem .75rem; }
.diff-bucket__heading { margin:.25rem 0 .35rem; font-size:.9rem; }
.diff-bucket__count { color:#666; font-weight:400; }
.diff-bucket--regressions { border-left-color:#c62828; background:#fdecea; }
.diff-bucket--fixes       { border-left-color:#2e7d32; background:#f1f8f3; }
.diff-bucket--newFailures { border-left-color:#ef6c00; background:#fff8e1; }
.diff-bucket--newPasses   { border-left-color:#1565c0; background:#e8f1fb; }
.diff-bucket--removed     { border-left-color:#6a1b9a; background:#f6edfa; }
.diff-bucket--stableFail  { border-left-color:#8e8e8e; background:#f7f7f7; }
.diff-bucket--stablePass  { border-left-color:#bdbdbd; background:#fafafa; }
.diff-bucket--other       { border-left-color:#bdbdbd; background:#fafafa; }
.results-table--diff { width:100%; border-collapse:collapse; font-size:.8rem; }
.results-table--diff th, .results-table--diff td { border:1px solid #eee; padding:.2rem .5rem; text-align:left; }
.status-cell--absent { color:#999; }

/* Phase 15 — Validator coverage tab */
.coverage-view__header { display:flex; justify-content:space-between; align-items:center; margin-bottom:.5rem; gap:.5rem; }
.coverage-view__header h2 { margin:0; }
#coverage-refresh { padding:.25rem .6rem; cursor:pointer; font-size:.85rem; }
.coverage-totals { font-size:.85rem; margin:.25rem 0 .75rem; padding:.4rem .6rem; background:#f4f6f8; border-radius:4px; }
.coverage-totals strong { color:#222; }
.coverage-section { margin:.75rem 0; padding:.25rem .5rem .5rem .75rem; border-left:3px solid #bdbdbd; }
.coverage-section h4 { margin:.25rem 0 .35rem; font-size:.9rem; }
.coverage-section--orphan-validators { border-left-color:#ef6c00; background:#fff8e1; }
.coverage-section--orphan-refs       { border-left-color:#c62828; background:#fdecea; }
.coverage-section--by-validator      { border-left-color:#1565c0; background:#e8f1fb; }
.coverage-section--by-product        { border-left-color:#2e7d32; background:#f1f8f3; }
.coverage-section--clean             { border-left-color:#9e9e9e; background:#fafafa; }
.coverage-count { color:#666; font-weight:400; }
.coverage-hint { margin:.15rem 0 .4rem; font-size:.8rem; color:#555; font-style:italic; }
.coverage-empty { margin:.15rem 0; font-size:.8rem; color:#666; }
.coverage-table { width:100%; border-collapse:collapse; font-size:.8rem; }
.coverage-table th, .coverage-table td { border:1px solid #eee; padding:.2rem .5rem; text-align:left; vertical-align:top; }
.coverage-row--unused { opacity:.7; font-style:italic; }
.coverage-scope { display:inline-block; padding:.05rem .4rem; border-radius:8px; font-size:.7rem; font-weight:600; text-transform:lowercase; background:#e0e0e0; color:#333; }
.coverage-scope--global { background:#cfd8dc; color:#263238; }
.coverage-case-list { margin:0; padding-left:1.1rem; font-size:.78rem; }
.coverage-case-product { color:#666; font-family:ui-monospace, "Courier New", monospace; }

/* ---------- Phase 16: auth widget ---------- */
.auth-widget { display:flex; align-items:center; gap:.5rem; margin-left:auto; font-size:.8rem; }
.auth-widget__signin,
.auth-widget__logout,
.auth-widget__submit,
.auth-widget__cancel { padding:.2rem .6rem; cursor:pointer; font-size:.8rem; border-radius:3px; border:1px solid #bdbdbd; background:#fff; }
.auth-widget__signin:hover,
.auth-widget__logout:hover { background:#f0f0f0; }
.auth-widget__submit { background:#1565c0; color:#fff; border-color:#1565c0; }
.auth-widget__cancel { color:#666; }
.auth-widget__form { display:flex; align-items:center; gap:.25rem; flex-wrap:wrap; }
.auth-widget__form input { font-size:.8rem; padding:.2rem .4rem; border:1px solid #bdbdbd; border-radius:3px; }
.auth-widget__user { display:inline-flex; align-items:center; gap:.35rem; color:#333; }
.auth-widget__role { display:inline-block; padding:.05rem .45rem; border-radius:10px; font-size:.65rem; font-weight:600; text-transform:lowercase; background:#e0e0e0; color:#333; }
.auth-widget__role--viewer   { background:#eceff1; color:#455a64; }
.auth-widget__role--operator { background:#c8e6c9; color:#1b5e20; }
.auth-widget__role--admin    { background:#ffe0b2; color:#e65100; }
.auth-widget__error { color:#c62828; font-size:.75rem; }

/* ---------- Phase 17: dashboard auto-refresh controls ---------- */
.dashboard__controls { display:flex; align-items:center; gap:.75rem; font-size:.8rem; color:#555; flex-wrap:wrap; }
.dashboard__auto-toggle { display:inline-flex; align-items:center; gap:.3rem; user-select:none; cursor:pointer; }
.dashboard__auto-toggle input { margin:0; }
.dashboard__last-checked { color:#666; font-family:ui-monospace, "Courier New", monospace; font-size:.75rem; }
.dashboard__last-checked #health-last-checked { color:#333; }
