/* =============================================================
   BIOS Checker v2: Premium Dark UI
   Spójny redesign: dashboard, motherboards, reports, logs, settings
   ============================================================= */

:root {
    /* Surface */
    --v2-bg:           #07090f;
    --v2-bg-alt:       #0a0d15;
    --v2-surface:      #0f1320;
    --v2-surface-2:    #11162a;
    --v2-surface-3:    #161c33;
    --v2-elev:         rgba(255, 255, 255, 0.04);
    --v2-border:       rgba(255, 255, 255, 0.06);
    --v2-border-strong:rgba(255, 255, 255, 0.12);

    /* Text */
    --v2-text:         #f4f5f7;
    --v2-text-muted:   #9aa3b2;
    --v2-text-dim:     #6b7280;

    /* Brand */
    --v2-red:          #ff3b3b;
    --v2-red-2:        #e23636;
    --v2-red-glow:     rgba(255, 59, 59, 0.45);

    /* Status */
    --v2-success:      #22c55e;
    --v2-success-bg:   rgba(34, 197, 94, 0.12);
    --v2-warning:      #f59e0b;
    --v2-warning-bg:   rgba(245, 158, 11, 0.12);
    --v2-danger:       #ef4444;
    --v2-danger-bg:    rgba(239, 68, 68, 0.12);
    --v2-info:         #60a5fa;
    --v2-info-bg:      rgba(96, 165, 250, 0.12);
    --v2-neutral:      #94a3b8;
    --v2-neutral-bg:   rgba(148, 163, 184, 0.12);

    /* Layout */
    --v2-radius-sm: 8px;
    --v2-radius:    12px;
    --v2-radius-lg: 16px;
    --v2-shadow:    0 18px 40px -16px rgba(0, 0, 0, 0.6);
    --v2-shadow-sm: 0 6px 18px -8px rgba(0, 0, 0, 0.5);
    --v2-font:      'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* ---- Base ---- */
body.v2 {
    margin: 0;
    background: radial-gradient(1100px 600px at 80% -10%, rgba(255, 59, 59, 0.08), transparent 60%),
                radial-gradient(800px 500px at -10% 110%, rgba(255, 59, 59, 0.05), transparent 60%),
                var(--v2-bg);
    color: var(--v2-text);
    font-family: var(--v2-font);
    font-size: 14px;
    line-height: 1.45;
    min-height: 100vh;
}

body.v2 *,
body.v2 *::before,
body.v2 *::after {
    box-sizing: border-box;
}

body.v2 a {
    color: var(--v2-text);
    text-decoration: none;
}

body.v2 button {
    font-family: inherit;
    cursor: pointer;
}

/* ---- App shell ---- */
.v2-shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Form controls do not inherit the page font: a browser gives them the system
   one, so a search box and a dropdown rendered in Arial while every other word
   on the page was Inter. Individual controls had been fixed one at a time
   wherever somebody noticed; this covers the ones nobody has noticed yet. */
input, select, textarea, button {
    font-family: inherit;
}

.v2-main {
    flex: 1;
    width: 100%;
    max-width: 1480px;
    margin: 0 auto;
    padding: 24px 32px 40px;
}

/* ---- Top nav ---- */
.v2-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(7, 9, 15, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--v2-border);
}

.v2-nav-inner {
    max-width: 1480px;
    margin: 0 auto;
    padding: 14px 32px;
    display: flex;
    align-items: center;
    gap: 28px;
}

.v2-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.08em;
    color: var(--v2-text);
    white-space: nowrap;
}

.v2-brand img {
    width: 34px;
    height: 34px;
    object-fit: contain;
    filter: drop-shadow(0 0 8px var(--v2-red-glow));
}

.v2-brand .v2-brand-accent {
    color: var(--v2-red);
}

.v2-nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    justify-content: center;
}

.v2-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    font-size: 13px;
    color: var(--v2-text-muted);
    border-radius: 8px;
    transition: color 0.15s, background 0.15s;
}

.v2-nav-link i {
    font-size: 13px;
    opacity: 0.85;
}

.v2-nav-link:hover {
    color: var(--v2-text);
    background: var(--v2-elev);
}

.v2-nav-link.is-active {
    color: var(--v2-text);
    position: relative;
}

.v2-nav-link.is-active::after {
    content: '';
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: -8px;
    height: 2px;
    background: var(--v2-red);
    box-shadow: 0 0 10px var(--v2-red-glow);
    border-radius: 2px;
}

/* Back to the launcher. Set apart from the tool's own tabs, since it leaves the
   tool rather than moving inside it. */
.v2-nav-hub {
    margin-left: 10px;
    padding-left: 16px;
    border-left: 1px solid var(--v2-border-strong);
    opacity: 0.75;
}

.v2-nav-hub:hover {
    opacity: 1;
}

.v2-nav-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.v2-bell {
    position: relative;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--v2-elev);
    border: 1px solid var(--v2-border);
    color: var(--v2-text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.v2-bell .v2-bell-dot {
    position: absolute;
    top: 8px;
    right: 9px;
    width: 8px;
    height: 8px;
    background: var(--v2-red);
    border: 2px solid var(--v2-bg);
    border-radius: 50%;
}

.v2-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px;
    border: 1px solid var(--v2-border);
    border-radius: 999px;
    background: var(--v2-elev);
}

.v2-user-name {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.v2-user-name strong {
    font-size: 13px;
    font-weight: 600;
}

.v2-user-name span {
    font-size: 11px;
    color: var(--v2-text-muted);
}

.v2-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--v2-red) 0%, var(--v2-red-2) 100%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 13px;
}

.v2-lang {
    display: inline-flex;
    border: 1px solid var(--v2-border);
    border-radius: 999px;
    overflow: hidden;
    background: var(--v2-elev);
}

.v2-lang a {
    padding: 4px 10px;
    font-size: 11px;
    color: var(--v2-text-muted);
    letter-spacing: 0.05em;
}

.v2-lang a.is-active {
    background: var(--v2-red);
    color: white;
}

.v2-logout {
    color: var(--v2-text-muted);
    padding: 6px;
}

.v2-logout:hover {
    color: var(--v2-red);
}

/* ---- Page header / hero ---- */
.v2-hero {
    position: relative;
    background:
        radial-gradient(520px 180px at 100% 0%, rgba(255, 59, 59, 0.10), transparent 60%),
        linear-gradient(135deg, #0f1320 0%, #11162a 58%, rgba(255, 59, 59, 0.05) 100%);
    border: 1px solid var(--v2-border-strong);
    border-radius: var(--v2-radius);
    padding: 16px 20px;
    margin-bottom: 18px;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: stretch;
    gap: 18px;
    box-shadow: var(--v2-shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.v2-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--v2-red), transparent);
    opacity: 0.85;
    pointer-events: none;
}

.v2-hero-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

.v2-hero-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.v2-hero-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.v2-hero-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(255, 59, 59, 0.18), rgba(255, 59, 59, 0.04));
    border: 1px solid rgba(255, 59, 59, 0.28);
    color: var(--v2-red);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 0 14px rgba(255, 59, 59, 0.16);
    flex-shrink: 0;
}

.v2-hero-text h1 {
    margin: 0 0 2px;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.v2-hero-text p {
    margin: 0;
    color: var(--v2-text-muted);
    font-size: 12px;
    line-height: 1.35;
}

.v2-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--v2-text-dim);
}

.v2-hero-eyebrow .v2-hero-pulse {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--v2-success);
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55);
    animation: v2-hero-pulse 2.2s ease-out infinite;
}

@keyframes v2-hero-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55); }
    70%  { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.v2-hero-badges {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.v2-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 9px;
    border-radius: 999px;
    border: 1px solid var(--v2-border-strong);
    background: rgba(255, 255, 255, 0.03);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--v2-text-muted);
}

.v2-hero-badge.is-accent {
    border-color: rgba(255, 59, 59, 0.35);
    color: #fecaca;
    background: rgba(255, 59, 59, 0.10);
}

.v2-hero-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.v2-hero-meta.is-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.v2-hero-meta.is-5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.v2-hero-tile .v2-hm-sub {
    font-size: 10.5px;
    color: var(--v2-text-dim);
    margin-top: 2px;
}

.v2-hero-tile .v2-hm-progress {
    margin-top: 6px;
    height: 5px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 999px;
    overflow: hidden;
}

.v2-hero-tile .v2-hm-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--v2-red), #ff8a8a);
    transition: width 0.35s ease;
}

.v2-hero-tile .v2-hm-progress-meta {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-top: 4px;
    font-size: 10px;
    color: var(--v2-text-dim);
}

.v2-hero-tile .v2-hm-progress-meta strong {
    color: var(--v2-text-muted);
    font-weight: 600;
}

.v2-hero-tile {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--v2-border-strong);
    background: rgba(7, 9, 15, 0.45);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    transition: border-color 0.15s, background 0.15s;
}

.v2-hero-tile:hover {
    border-color: rgba(255, 59, 59, 0.28);
    background: rgba(15, 19, 32, 0.72);
}

.v2-hero-tile .v2-hm-label {
    font-size: 9.5px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--v2-text-dim);
    font-weight: 600;
}

.v2-hero-tile .v2-hm-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--v2-text);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.v2-hero-tile .v2-hm-value.is-success { color: var(--v2-success); }
.v2-hero-tile .v2-hm-value.is-warning { color: var(--v2-warning); }
.v2-hero-tile .v2-hm-value.is-danger  { color: var(--v2-danger); }
.v2-hero-tile .v2-hm-value.is-info    { color: var(--v2-info); }

.v2-hero-tile .v2-hm-value.is-operation-stack {
    align-items: flex-start;
    white-space: normal;
}

.v2-hm-operation-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    min-width: 0;
}

.v2-hm-operation-stack .v2-hm-operation-label,
.v2-hm-operation-stack .v2-hm-operation-target {
    line-height: 1.25;
    font-weight: 600;
}

.v2-hm-operation-stack .v2-hm-operation-target {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.v2-hero-aside {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.v2-hero-clock {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 108px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--v2-border-strong);
    background: rgba(7, 9, 15, 0.55);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.v2-hero-clock .v2-hm-label {
    font-size: 9.5px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--v2-text-dim);
    font-weight: 600;
}

.v2-hero-clock-time {
    font-family: 'JetBrains Mono', 'Cascadia Code', Consolas, monospace;
    font-size: 18px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--v2-text);
    letter-spacing: 0.04em;
    line-height: 1;
}

.v2-hero-clock-date {
    font-size: 11px;
    color: var(--v2-text-muted);
    line-height: 1.2;
}

.v2-hero-visual {
    position: relative;
    width: 320px;
    height: 190px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    pointer-events: none;
}

.v2-hero-visual::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, rgba(255, 59, 59, 0.28) 0%, transparent 70%);
    filter: blur(12px);
    pointer-events: none;
}

.v2-hero-visual img {
    position: relative;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    filter: drop-shadow(0 12px 28px rgba(255, 59, 59, 0.45));
}

/* ---- KPI cards ---- */
.v2-kpis {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 22px;
}

.v2-kpi {
    position: relative;
    background: var(--v2-surface);
    border: 1px solid var(--v2-border);
    border-radius: var(--v2-radius);
    padding: 18px 18px 22px;
    overflow: hidden;
    display: flex;
    gap: 14px;
    align-items: flex-start;
    transition: border-color 0.15s, transform 0.15s;
}

.v2-kpi:hover {
    border-color: var(--v2-border-strong);
    transform: translateY(-1px);
}

.v2-kpi-icon {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.v2-kpi.is-total .v2-kpi-icon {
    background: rgba(148, 163, 184, 0.12);
    color: #cbd5e1;
}

.v2-kpi.is-success .v2-kpi-icon {
    background: var(--v2-success-bg);
    color: var(--v2-success);
}

.v2-kpi.is-warning .v2-kpi-icon {
    background: var(--v2-warning-bg);
    color: var(--v2-warning);
}

.v2-kpi.is-danger .v2-kpi-icon {
    background: var(--v2-danger-bg);
    color: var(--v2-danger);
}

.v2-kpi-body {
    flex: 1;
    min-width: 0;
}

.v2-kpi-value {
    font-size: 30px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 6px;
}

.v2-kpi-label {
    font-size: 12px;
    color: var(--v2-text-muted);
    letter-spacing: 0.02em;
}

.v2-kpi-meta {
    font-size: 11px;
    color: var(--v2-text-dim);
    margin-top: 4px;
}

.v2-kpi-arrow {
    position: absolute;
    top: 14px;
    right: 14px;
    color: var(--v2-text-dim);
    font-size: 11px;
    opacity: 0.7;
}

.v2-kpi-progress {
    margin-top: 12px;
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 999px;
    overflow: hidden;
}

.v2-kpi-progress-fill {
    height: 100%;
    width: 0%;
    border-radius: 999px;
    transition: width 0.45s ease;
    background: linear-gradient(90deg, #6b7280, #9ca3af);
}

.v2-kpi.is-total .v2-kpi-progress-fill   { background: linear-gradient(90deg, #cbd5e1, #94a3b8); }
.v2-kpi.is-success .v2-kpi-progress-fill { background: linear-gradient(90deg, #22c55e, #16a34a); }
.v2-kpi.is-warning .v2-kpi-progress-fill { background: linear-gradient(90deg, #f59e0b, #d97706); }
.v2-kpi.is-danger .v2-kpi-progress-fill  { background: linear-gradient(90deg, #ef4444, #b91c1c); }

.v2-kpi-strip {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.04);
}

.v2-kpi-strip-fill {
    height: 100%;
    width: 0%;
    transition: width 0.45s ease;
}

.v2-kpi.is-total .v2-kpi-strip-fill   { background: linear-gradient(90deg, #cbd5e1, #94a3b8); }
.v2-kpi.is-success .v2-kpi-strip-fill { background: linear-gradient(90deg, var(--v2-success), #16a34a); }
.v2-kpi.is-warning .v2-kpi-strip-fill { background: linear-gradient(90deg, var(--v2-warning), #d97706); }
.v2-kpi.is-danger .v2-kpi-strip-fill  { background: linear-gradient(90deg, var(--v2-danger), #b91c1c); }

/* ---- Two-column layout (table + sidebar) ---- */
.v2-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 22px;
    align-items: start;
}

.v2-card {
    background: var(--v2-surface);
    border: 1px solid var(--v2-border);
    border-radius: var(--v2-radius);
    box-shadow: var(--v2-shadow-sm);
}

.v2-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--v2-border);
}

.v2-card-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.v2-card-title i {
    color: var(--v2-red);
}

.v2-card-body {
    padding: 14px 20px 18px;
}

/* ---- Stack (left column on dashboard) ---- */
.v2-stack {
    display: flex;
    flex-direction: column;
    gap: 22px;
    min-width: 0;
}

/* ---- Live status panel ---- */
.v2-live {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
}

.v2-live-icon {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    background: var(--v2-success-bg);
    color: var(--v2-success);
    transition: background 0.2s, color 0.2s;
}

.v2-live-icon.is-success { background: var(--v2-success-bg); color: var(--v2-success); }
.v2-live-icon.is-warning { background: var(--v2-warning-bg); color: var(--v2-warning); }
.v2-live-icon.is-danger  { background: var(--v2-danger-bg);  color: var(--v2-danger); }
.v2-live-icon.is-info    { background: var(--v2-info-bg);    color: var(--v2-info); }

.v2-live-text {
    min-width: 0;
}

.v2-live-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--v2-text);
    margin-bottom: 4px;
}

.v2-live-sub {
    font-size: 12.5px;
    color: var(--v2-text-muted);
}

.v2-live-right {
    display: flex;
    gap: 14px;
    align-items: stretch;
}

.v2-live-stat {
    text-align: right;
    padding: 0 12px;
    border-left: 1px solid var(--v2-border-strong);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.v2-live-stat:first-child {
    border-left: 0;
}

.v2-live-stat .v2-live-stat-value {
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
    color: var(--v2-text);
}

.v2-live-stat .v2-live-stat-label {
    font-size: 10px;
    color: var(--v2-text-dim);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 4px;
}

.v2-live-stat.is-success .v2-live-stat-value { color: var(--v2-success); }
.v2-live-stat.is-warning .v2-live-stat-value { color: var(--v2-warning); }
.v2-live-stat.is-danger  .v2-live-stat-value { color: var(--v2-danger); }

.v2-live-progress {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px dashed var(--v2-border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.v2-live-progress .v2-progress {
    flex: 1;
    height: 8px;
}

.v2-live-progress-label {
    font-size: 12px;
    color: var(--v2-text-muted);
    min-width: 0;
    flex: 1;
}

.v2-live-progress-pct {
    font-size: 12px;
    font-weight: 600;
    color: var(--v2-text);
    min-width: 42px;
    text-align: right;
}

/* ---- Activity timeline ---- */
.v2-timeline {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 380px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.v2-timeline-item {
    display: grid;
    grid-template-columns: 14px minmax(0, 1fr);
    gap: 12px;
    align-items: flex-start;
    padding: 10px 12px;
    background: var(--v2-bg-alt);
    border: 1px solid var(--v2-border);
    border-radius: 8px;
    transition: border-color 0.15s, transform 0.15s;
}

.v2-timeline-item:hover {
    border-color: var(--v2-border-strong);
    transform: translateX(2px);
}

.v2-timeline-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-top: 5px;
    background: var(--v2-info);
    box-shadow: 0 0 8px var(--v2-info-bg);
}

.v2-timeline-dot.is-info    { background: var(--v2-info);    box-shadow: 0 0 8px var(--v2-info); }
.v2-timeline-dot.is-success { background: var(--v2-success); box-shadow: 0 0 8px var(--v2-success); }
.v2-timeline-dot.is-warning { background: var(--v2-warning); box-shadow: 0 0 8px var(--v2-warning); }
.v2-timeline-dot.is-danger  { background: var(--v2-danger);  box-shadow: 0 0 8px var(--v2-danger); }
.v2-timeline-dot.is-error   { background: var(--v2-danger);  box-shadow: 0 0 8px var(--v2-danger); }

.v2-timeline-body {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: baseline;
    min-width: 0;
}

.v2-timeline-msg {
    font-size: 12.5px;
    color: var(--v2-text);
    word-break: break-word;
    line-height: 1.4;
}

.v2-timeline-time {
    font-size: 11px;
    color: var(--v2-text-dim);
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}

.v2-timeline-empty {
    padding: 28px 12px;
    text-align: center;
    color: var(--v2-text-dim);
    font-size: 12.5px;
}

/* ---- Toolbar (search + filters) ---- */
.v2-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.v2-search {
    position: relative;
    flex: 1;
    min-width: 220px;
    max-width: 320px;
}

.v2-search i {
    position: absolute;
    top: 50%;
    left: 12px;
    transform: translateY(-50%);
    color: var(--v2-text-dim);
    font-size: 12px;
}

.v2-search input {
    width: 100%;
    padding: 8px 12px 8px 32px;
    border: 1px solid var(--v2-border);
    background: var(--v2-bg-alt);
    color: var(--v2-text);
    border-radius: 8px;
    font-size: 13px;
    transition: border-color 0.15s;
}

.v2-search input:focus {
    border-color: var(--v2-red);
    outline: none;
}

.v2-select {
    background: var(--v2-bg-alt);
    border: 1px solid var(--v2-border);
    color: var(--v2-text);
    padding: 8px 28px 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='%239aa3b2' d='M3 6l5 5 5-5z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 14px 14px;
    min-width: 130px;
}

.v2-icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--v2-border);
    background: var(--v2-bg-alt);
    color: var(--v2-text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.v2-icon-btn:hover {
    color: var(--v2-red);
    border-color: var(--v2-border-strong);
}

/* ---- Buttons ---- */
.v2-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid transparent;
    transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.05s;
    background: var(--v2-elev);
    color: var(--v2-text);
}

.v2-btn:hover { background: var(--v2-surface-2); }
.v2-btn:active { transform: translateY(1px); }

.v2-btn.is-primary {
    background: var(--v2-red);
    color: white;
    box-shadow: 0 8px 22px -10px var(--v2-red-glow);
}

.v2-btn.is-primary:hover { background: var(--v2-red-2); }

.v2-btn.is-outline {
    background: transparent;
    border-color: var(--v2-border-strong);
    color: var(--v2-text);
}

.v2-btn.is-outline:hover { border-color: var(--v2-red); color: var(--v2-red); }

.v2-btn.is-ghost {
    background: transparent;
    color: var(--v2-text-muted);
}

.v2-btn.is-ghost:hover { color: var(--v2-text); }

.v2-btn.is-success { background: var(--v2-success); color: #0a0d15; }
.v2-btn.is-warning { background: var(--v2-warning); color: #0a0d15; }
.v2-btn.is-danger  { background: var(--v2-danger);  color: white; }

.v2-btn.is-large {
    padding: 12px 18px;
    font-size: 14px;
}

.v2-btn:disabled,
.v2-btn[disabled] {
    opacity: 0.55;
    cursor: not-allowed;
}

/* ---- Motherboards table ---- */
.v2-table-wrapper {
    overflow: auto;
}

.v2-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 760px;
}

.v2-table thead th {
    font-size: 10.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--v2-text-dim);
    text-align: left;
    padding: 12px 14px;
    border-bottom: 1px solid var(--v2-border);
    background: var(--v2-surface);
    position: sticky;
    top: 0;
}

.v2-table tbody td {
    padding: 14px 14px;
    border-bottom: 1px solid var(--v2-border);
    font-size: 13px;
    vertical-align: middle;
}

.v2-table tbody tr {
    transition: background 0.15s;
}

.v2-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.025);
    cursor: pointer;
}

.v2-table tbody tr.is-selected td {
    background: rgba(255, 59, 59, 0.06);
}

.v2-mb-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.v2-mb-logo {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: var(--v2-text);
    letter-spacing: 0.05em;
    flex-shrink: 0;
}

/* Vendor brand wordmark (SVG). Replaces the text badge in the vendor cell. */
.v2-vendor-logo {
    height: 26px;
    width: auto;
    max-width: 130px;
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
    object-fit: contain;
}

.v2-mb-logo.brand-asus     { background: linear-gradient(135deg, #1f2a5a, #0c1330); color: #c7d2fe; }
.v2-mb-logo.brand-msi      { background: linear-gradient(135deg, #4b0202, #1a0000); color: #fecaca; }
.v2-mb-logo.brand-gigabyte { background: linear-gradient(135deg, #5a3406, #1f1100); color: #fde68a; }
.v2-mb-logo.brand-asrock   { background: linear-gradient(135deg, #1a3a5a, #06182d); color: #bae6fd; }
.v2-mb-logo.brand-supermicro { background: linear-gradient(135deg, #1b3b2d, #06180f); color: #bbf7d0; }
.v2-mb-logo.brand-nzxt     { background: linear-gradient(135deg, #2a2a2a, #0e0e0e); color: #e5e7eb; }
.v2-mb-logo.brand-unknown  { background: rgba(255, 255, 255, 0.06); color: var(--v2-text-muted); }

.v2-mb-info .v2-mb-name {
    font-weight: 600;
    color: var(--v2-text);
}

.v2-mb-info .v2-mb-sub {
    font-size: 11px;
    color: var(--v2-text-dim);
    margin-top: 2px;
}

.v2-version-current {
    font-weight: 600;
    color: var(--v2-text);
}

.v2-version-date {
    font-size: 11px;
    color: var(--v2-text-dim);
    margin-top: 2px;
}

/* Status badges */
.v2-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1;
}

.v2-badge i { font-size: 10px; }

.v2-badge.is-success { background: var(--v2-success-bg); color: var(--v2-success); }
.v2-badge.is-warning { background: var(--v2-warning-bg); color: var(--v2-warning); }
.v2-badge.is-danger  { background: var(--v2-danger-bg);  color: var(--v2-danger);  }
.v2-badge.is-info    { background: var(--v2-info-bg);    color: var(--v2-info);    }
.v2-badge.is-neutral { background: var(--v2-neutral-bg); color: var(--v2-neutral); }

.v2-status-cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
}

.v2-status-sub {
    font-size: 10.5px;
    color: var(--v2-text-dim);
}

/* Priority pills */
.v2-priority {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.v2-priority.is-low      { background: rgba(148, 163, 184, 0.12); color: #cbd5e1; }
.v2-priority.is-medium   { background: rgba(245, 158, 11, 0.14);  color: var(--v2-warning); }
.v2-priority.is-high     { background: rgba(239, 68, 68, 0.14);   color: var(--v2-danger); }
.v2-priority.is-critical { background: rgba(239, 68, 68, 0.22);   color: #fecaca; }

.v2-chev {
    color: var(--v2-text-dim);
    text-align: right;
}

.v2-table-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--v2-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: var(--v2-text-muted);
}

.v2-pager {
    display: flex;
    align-items: center;
    gap: 4px;
}

.v2-pager button {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 1px solid var(--v2-border);
    background: var(--v2-bg-alt);
    color: var(--v2-text-muted);
    font-size: 12px;
}

.v2-pager button.is-active {
    background: var(--v2-red);
    color: white;
    border-color: var(--v2-red);
}

.v2-pager button:disabled { opacity: 0.4; cursor: not-allowed; }

/* ---- Sidebar widgets ---- */
.v2-side {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.v2-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.v2-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--v2-bg-alt);
    border: 1px solid var(--v2-border);
    transition: border-color 0.15s, transform 0.15s;
}

.v2-list-item:hover {
    border-color: var(--v2-border-strong);
    transform: translateX(2px);
}

.v2-list-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}

.v2-list-icon.is-danger  { background: var(--v2-danger-bg);  color: var(--v2-danger); }
.v2-list-icon.is-warning { background: var(--v2-warning-bg); color: var(--v2-warning); }
.v2-list-icon.is-info    { background: var(--v2-info-bg);    color: var(--v2-info); }

.v2-list-body {
    flex: 1;
    min-width: 0;
}

.v2-list-title {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--v2-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.v2-list-sub {
    font-size: 11px;
    color: var(--v2-text-muted);
    margin-top: 2px;
}

.v2-list-link {
    color: var(--v2-text-dim);
}

.v2-empty {
    padding: 16px;
    text-align: center;
    color: var(--v2-text-dim);
    font-size: 12.5px;
}

/* Quick Actions */
.v2-actions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.v2-action-tile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: var(--v2-bg-alt);
    border: 1px solid var(--v2-border);
    border-radius: 10px;
    color: var(--v2-text);
    text-align: left;
    transition: border-color 0.15s, transform 0.15s;
    font-size: 12.5px;
}

.v2-action-tile:hover {
    border-color: var(--v2-red);
    transform: translateY(-1px);
}

.v2-action-tile .v2-action-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 59, 59, 0.12);
    color: var(--v2-red);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.v2-action-tile strong {
    display: block;
    font-weight: 600;
}

.v2-action-tile span {
    display: block;
    font-size: 10.5px;
    color: var(--v2-text-muted);
    margin-top: 1px;
}

/* System Info */
.v2-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 18px;
}

.v2-info-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.v2-info-item .v2-info-label {
    font-size: 11px;
    color: var(--v2-text-muted);
}

.v2-info-item .v2-info-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--v2-text);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.v2-online-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--v2-success);
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
}

/* ---- Footer ---- */
.v2-footer {
    margin-top: auto;
    border-top: 1px solid var(--v2-border);
    background: rgba(7, 9, 15, 0.65);
}

.v2-footer-inner {
    max-width: 1480px;
    margin: 0 auto;
    padding: 14px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: var(--v2-text-muted);
}

.v2-footer-links {
    display: flex;
    gap: 18px;
}

.v2-footer-links a {
    color: var(--v2-text-muted);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.v2-footer-links a:hover { color: var(--v2-red); }

/* ---- Generic page header ---- */
.v2-page-header {
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.v2-page-header h1 {
    margin: 0 0 4px;
    font-size: 22px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.v2-page-header h1 i {
    color: var(--v2-red);
}

.v2-page-header p {
    margin: 0;
    color: var(--v2-text-muted);
    font-size: 13px;
}

/* ---- Forms (settings) ---- */
.v2-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.v2-form-group label {
    display: block;
    font-size: 12px;
    color: var(--v2-text-muted);
    margin-bottom: 6px;
    font-weight: 500;
}

.v2-form-control {
    width: 100%;
    padding: 9px 12px;
    background: var(--v2-bg-alt);
    border: 1px solid var(--v2-border);
    color: var(--v2-text);
    border-radius: 8px;
    font-size: 13px;
    font-family: inherit;
}

.v2-form-control:focus { outline: none; border-color: var(--v2-red); }

.v2-form-section {
    margin-bottom: 20px;
}

.v2-form-section h2 {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 12px;
    color: var(--v2-text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.v2-form-section h2 i { color: var(--v2-red); }

.v2-form-group.is-full {
    grid-column: 1 / -1;
}

.v2-form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--v2-text);
    cursor: pointer;
}

.v2-form-check input {
    width: 16px;
    height: 16px;
    accent-color: var(--v2-red);
}

.v2-form-group label.v2-form-check {
    display: flex;
    align-items: center;
    margin-bottom: 0;
    cursor: pointer;
}

.tooltip-icon {
    margin-left: 6px;
    color: var(--v2-text-muted);
    font-size: 0.85em;
    cursor: help;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.tooltip-icon:hover {
    opacity: 1;
}

.v2-cell-note {
    font-size: 12px;
    color: var(--v2-text);
}

.v2-cell-note.is-muted {
    color: var(--v2-text-dim);
}

.v2-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 8px;
}

.v2-settings-page {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.v2-page-actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 16px;
}

.v2-coming-soon {
    padding: 48px 24px;
    text-align: center;
}

.v2-coming-soon-icon {
    width: 84px;
    height: 84px;
    border-radius: 22px;
    margin: 0 auto 18px;
    background: var(--v2-info-bg);
    color: var(--v2-info);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
}

.v2-coming-soon h2 {
    margin: 0 0 8px;
    font-size: 20px;
}

.v2-coming-soon p {
    margin: 0 auto;
    max-width: 540px;
    color: var(--v2-text-muted);
}

.v2-coming-soon-actions {
    margin-top: 22px;
}

/* ---- Logs ---- */
.v2-log-stream {
    background: #050608;
    border-radius: var(--v2-radius);
    border: 1px solid var(--v2-border);
    padding: 12px 14px;
    max-height: 520px;
    overflow: auto;
    font-family: 'JetBrains Mono', 'Cascadia Code', Consolas, monospace;
    font-size: 12px;
    line-height: 1.55;
}

.v2-log-row {
    display: grid;
    grid-template-columns: 88px 70px 1fr;
    gap: 12px;
    padding: 4px 0;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.04);
}

.v2-log-time { color: var(--v2-text-dim); }
.v2-log-lvl { font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.v2-log-lvl.is-info  { color: var(--v2-info); }
.v2-log-lvl.is-warn  { color: var(--v2-warning); }
.v2-log-lvl.is-error { color: var(--v2-danger); }
.v2-log-lvl.is-debug { color: var(--v2-neutral); }
.v2-log-msg { color: var(--v2-text); white-space: pre-wrap; word-break: break-word; }

.v2-log-row.log-error {
    background: rgba(239, 68, 68, 0.06);
}

.v2-log-row.log-warning {
    background: rgba(245, 158, 11, 0.06);
}

.v2-log-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.v2-log-toolbar .v2-select {
    min-width: 180px;
}

/* ---- Reports list ---- */
.v2-report-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 18px;
    background: var(--v2-surface);
    border: 1px solid var(--v2-border);
    border-radius: var(--v2-radius);
    margin-bottom: 10px;
    transition: border-color 0.15s;
}

.v2-report-card:hover { border-color: var(--v2-border-strong); }

.v2-report-name {
    font-weight: 600;
    color: var(--v2-text);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.v2-report-name i { color: var(--v2-red); }

.v2-report-meta {
    font-size: 11px;
    color: var(--v2-text-muted);
    margin-top: 2px;
}

.v2-reports-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.v2-report-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* ---- Status banner / messages ---- */
.v2-status-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 10px;
    background: var(--v2-bg-alt);
    border: 1px solid var(--v2-border);
    font-size: 12.5px;
    color: var(--v2-text-muted);
}

.v2-progress {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 999px;
    overflow: hidden;
}

.v2-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--v2-red), #ff8a8a);
    transition: width 0.25s ease;
}

/* ---- Activity console ---- */
.v2-console-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 0 20px 12px;
    border-bottom: 1px solid var(--v2-border);
}

.v2-grid-console > .v2-console-card {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.v2-console-table-wrap {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.28) transparent;
}

.v2-console-table-wrap::-webkit-scrollbar {
    width: 6px;
}

.v2-console-table-wrap::-webkit-scrollbar-track {
    background: transparent;
}

.v2-console-table-wrap::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.22);
    border-radius: 999px;
}

.v2-console-table-wrap:hover::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.38);
}

.v2-console-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 640px;
}

.v2-console-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--v2-surface);
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--v2-text-dim);
    text-align: left;
    padding: 10px 14px;
    border-bottom: 1px solid var(--v2-border);
}

.v2-console-table tbody td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--v2-border);
    font-size: 12.5px;
    vertical-align: middle;
}

.v2-console-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.025);
}

.v2-console-time {
    font-family: 'JetBrains Mono', Consolas, monospace;
    font-size: 11.5px;
    color: var(--v2-text-dim);
    white-space: nowrap;
}

.v2-console-detail {
    color: var(--v2-text-muted);
    font-size: 12px;
}

.v2-console-footer {
    margin-top: auto;
    padding: 12px 20px;
    border-top: 1px solid var(--v2-border);
    display: flex;
    justify-content: center;
}

.v2-btn.is-start {
    border-color: rgba(34, 197, 94, 0.45);
    color: var(--v2-success);
    background: rgba(34, 197, 94, 0.08);
}

.v2-btn.is-start:hover {
    background: rgba(34, 197, 94, 0.14);
    border-color: var(--v2-success);
}

.v2-btn.is-stop-outline {
    border-color: rgba(239, 68, 68, 0.45);
    color: var(--v2-danger);
    background: rgba(239, 68, 68, 0.08);
}

.v2-btn.is-stop-outline:hover {
    background: rgba(239, 68, 68, 0.14);
    border-color: var(--v2-danger);
}

/* ---- Queue summary ---- */
.v2-queue-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.v2-queue-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid var(--v2-border);
    background: var(--v2-bg-alt);
    font-size: 12.5px;
}

.v2-queue-row .v2-queue-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--v2-text-muted);
}

.v2-queue-row .v2-queue-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.v2-queue-row .v2-queue-dot.is-pending  { background: var(--v2-info); }
.v2-queue-row .v2-queue-dot.is-checking { background: var(--v2-warning); }
.v2-queue-row .v2-queue-dot.is-failed   { background: var(--v2-danger); }

.v2-queue-row strong {
    font-size: 14px;
    color: var(--v2-text);
}

/* ---- Bottom panels ---- */
.v2-bottom-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 22px;
    margin-top: 22px;
}

.v2-recent-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.v2-recent-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--v2-border);
    background: var(--v2-bg-alt);
}

.v2-recent-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 12px;
}

.v2-recent-icon.is-success { background: var(--v2-success-bg); color: var(--v2-success); }
.v2-recent-icon.is-warning { background: var(--v2-warning-bg); color: var(--v2-warning); }
.v2-recent-icon.is-danger  { background: var(--v2-danger-bg);  color: var(--v2-danger); }
.v2-recent-icon.is-info    { background: var(--v2-info-bg);    color: var(--v2-info); }

.v2-recent-body {
    flex: 1;
    min-width: 0;
}

.v2-recent-title {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--v2-text);
}

.v2-recent-sub {
    font-size: 11px;
    color: var(--v2-text-muted);
    margin-top: 2px;
}

.v2-recent-time {
    font-size: 10.5px;
    color: var(--v2-text-dim);
    flex-shrink: 0;
}

.v2-donut-wrap {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
}

.v2-donut {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    position: relative;
    margin: 0 auto;
    box-shadow: inset 0 0 0 1px var(--v2-border);
}

.v2-donut::after {
    content: attr(data-total);
    position: absolute;
    inset: 28%;
    border-radius: 50%;
    background: var(--v2-surface);
    border: 1px solid var(--v2-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--v2-text-muted);
    text-align: center;
    line-height: 1.2;
    white-space: pre-line;
}

.v2-donut-legend {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.v2-donut-legend-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 12px;
    color: var(--v2-text-muted);
}

.v2-donut-legend-item span:first-child {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.v2-donut-swatch {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    flex-shrink: 0;
}

.v2-bell-count {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--v2-red);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
    border: 2px solid var(--v2-bg);
}

/* ---- Motherboards page ---- */
.v2-mb-card-header {
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 14px;
}

.v2-mb-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    flex: 1 1 320px;
}

.v2-mb-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex: 0 0 auto;
}

.v2-filter-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid var(--v2-border);
    border-radius: 8px;
    background: var(--v2-bg-alt);
    color: var(--v2-text-muted);
    font-size: 13px;
    user-select: none;
    cursor: pointer;
}

.v2-filter-check input {
    width: 15px;
    height: 15px;
    cursor: pointer;
}

.v2-motherboards-page {
    --v2-mb-visible-rows: 10;
    --v2-mb-row-height: 41px;
    --v2-mb-table-head-height: 40px;
}

.v2-mb-table-wrap {
    flex: 0 0 auto;
    min-height: 0;
    height: calc(var(--v2-mb-table-head-height) + (var(--v2-mb-visible-rows) * var(--v2-mb-row-height)));
    max-height: calc(var(--v2-mb-table-head-height) + (var(--v2-mb-visible-rows) * var(--v2-mb-row-height)));
    overflow-x: hidden;
    overflow-y: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.28) transparent;
}

.v2-motherboards-page .v2-mb-table thead th {
    padding: 10px 12px;
}

.v2-motherboards-page .v2-mb-table tbody td {
    padding: 9px 12px;
    line-height: 1.35;
}

.v2-motherboards-page .v2-mb-table tbody tr {
    height: var(--v2-mb-row-height);
}

.v2-mb-table-wrap::-webkit-scrollbar {
    width: 6px;
}

.v2-mb-table-wrap::-webkit-scrollbar-track {
    background: transparent;
}

.v2-mb-table-wrap::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.22);
    border-radius: 999px;
}

.v2-mb-table-wrap:hover::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.38);
}

.v2-motherboards-page .v2-mb-table th:nth-child(1) { width: 44px; }
.v2-motherboards-page .v2-mb-table th:nth-child(2) { width: 148px; }
.v2-motherboards-page .v2-mb-table th:nth-child(3) { width: min(28vw, 280px); }
.v2-motherboards-page .v2-mb-table th:nth-child(4) { width: 72px; }
.v2-motherboards-page .v2-mb-table th:nth-child(5) { width: 96px; }
.v2-motherboards-page .v2-mb-table th:nth-child(6) { width: 84px; }
.v2-motherboards-page .v2-mb-table th:nth-child(7) { width: 128px; }
.v2-motherboards-page .v2-mb-table th:nth-child(8) { width: 104px; }

.v2-mb-row-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    white-space: nowrap;
}

.v2-motherboards-page .v2-badge.is-outline {
    background: transparent;
    border: 1px solid currentColor;
    border-radius: 6px;
    padding: 3px 8px;
    font-size: 10px;
    letter-spacing: 0.06em;
}

.v2-mb-actions .v2-btn-icon {
    min-width: 38px;
    padding-left: 10px;
    padding-right: 10px;
}

.v2-motherboards-page .mainboard-row > td {
    vertical-align: top;
    padding-top: 10px;
}

.v2-motherboards-page .artnr-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
}

.v2-motherboards-page .vendor-mini-logo-img {
    width: 24px;
    height: 24px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid var(--v2-border);
    background: var(--v2-bg-alt);
}

.v2-motherboards-page .vendor-mini-logo {
    width: 24px;
    height: 24px;
    border-radius: 8px;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: #fff;
    background: #3a3a3a;
    border: 1px solid #4a4a4a;
    text-transform: uppercase;
}

.v2-motherboards-page .vendor-asus { background: #2563eb; border-color: #3b82f6; }
.v2-motherboards-page .vendor-msi { background: #dc2626; border-color: #ef4444; }
.v2-motherboards-page .vendor-gigabyte { background: #7c3aed; border-color: #8b5cf6; }
.v2-motherboards-page .vendor-asrock { background: #16a34a; border-color: #22c55e; }
.v2-motherboards-page .vendor-supermicro { background: #0ea5e9; border-color: #38bdf8; }
.v2-motherboards-page .vendor-nzxt { background: #475569; border-color: #64748b; }
.v2-motherboards-page .vendor-unknown { background: #525252; border-color: #666666; }

.v2-motherboards-page .editable {
    width: 100%;
    padding: 0.4rem 0.5rem;
    background: var(--v2-bg-alt);
    border: 1px solid var(--v2-border);
    border-radius: 6px;
    color: var(--v2-text);
    font-size: 0.85rem;
    box-sizing: border-box;
}

.v2-motherboards-page .editable:focus {
    outline: none;
    border-color: var(--v2-red);
    box-shadow: 0 0 0 2px rgba(255, 59, 59, 0.15);
}

.v2-motherboards-page .editable.readonly {
    background: var(--v2-elev);
    color: var(--v2-text-muted);
    cursor: not-allowed;
}

.v2-motherboards-page .editable.readonly:focus {
    border-color: var(--v2-border);
    box-shadow: none;
}

.v2-motherboards-page .mainboard-row { cursor: pointer; }

.v2-motherboards-page .mainboard-cell {
    vertical-align: middle;
    position: relative;
    padding-bottom: 26px !important;
}

.v2-motherboards-page .mainboard-stack {
    display: flex;
    align-items: center;
    min-height: 30px;
}

.v2-motherboards-page .mainboard-cell .toggle-detail-btn {
    position: absolute;
    left: 14px;
    bottom: 4px;
}

.v2-motherboards-page .mainboard-row.expanded {
    background: rgba(255, 59, 59, 0.06);
    box-shadow: inset 3px 0 0 rgba(255, 59, 59, 0.55);
}

.v2-motherboards-page .toggle-detail-btn {
    margin-top: 6px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--v2-border);
    color: var(--v2-text-muted);
    font-size: 0.74rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 2px 8px;
    border-radius: 999px;
}

.v2-motherboards-page .toggle-detail-btn:hover {
    color: var(--v2-text);
    border-color: rgba(255, 59, 59, 0.45);
    background: rgba(255, 59, 59, 0.1);
}

.v2-motherboards-page .mainboard-row.expanded .toggle-detail-btn i {
    transform: rotate(180deg);
}

.v2-motherboards-page .toggle-detail-btn i {
    transition: transform 0.2s ease;
}

.v2-motherboards-page .details-row td {
    background: var(--v2-bg-alt);
    border-top: 1px solid var(--v2-border);
    padding: 12px 14px 14px;
}

.v2-motherboards-page .details-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(210px, 1fr));
    gap: 10px;
}

.v2-motherboards-page .details-card {
    background: var(--v2-surface);
    border: 1px solid var(--v2-border);
    border-radius: 10px;
    padding: 11px;
    min-height: 122px;
}

.v2-motherboards-page .details-card-title {
    font-size: 0.78rem;
    color: var(--v2-text-muted);
    font-weight: 700;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--v2-border);
    padding-bottom: 6px;
}

.v2-motherboards-page .details-card-content {
    font-size: 0.82rem;
    line-height: 1.4;
    color: var(--v2-text);
}

.v2-motherboards-page .instruction-step {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 7px;
}

.v2-motherboards-page .instruction-step-index {
    width: 18px;
    height: 18px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    font-weight: 700;
    color: #9cc8ff;
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.4);
    flex-shrink: 0;
}

.v2-motherboards-page .actions-row {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.v2-motherboards-page .btn-icon {
    background: var(--v2-elev);
    border: 1px solid var(--v2-border);
    color: var(--v2-text-muted);
    cursor: pointer;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s, border-color 0.15s, background 0.15s;
}

.v2-motherboards-page .btn-icon:hover {
    transform: translateY(-1px);
}

.v2-motherboards-page .btn-check {
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.35);
    color: var(--v2-success);
}

.v2-motherboards-page .btn-profile {
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.35);
    color: var(--v2-info);
}

.v2-motherboards-page .btn-reset {
    background: rgba(148, 163, 184, 0.12);
    border-color: rgba(148, 163, 184, 0.35);
    color: #cbd5e1;
}

.v2-motherboards-page .btn-danger {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.35);
    color: var(--v2-danger);
}

.v2-motherboards-page .btn-check:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.v2-motherboards-page .loading,
.v2-motherboards-page .empty,
.v2-motherboards-page .error {
    text-align: center;
    padding: 2rem;
    color: var(--v2-text-muted);
}

.v2-motherboards-page .muted-text {
    color: var(--v2-text-dim);
    font-size: 0.78rem;
}

.v2-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(3, 4, 8, 0.72);
    backdrop-filter: blur(4px);
}

.v2-modal .modal-content {
    background: var(--v2-surface);
    margin: 5% auto;
    padding: 0;
    border: 1px solid var(--v2-border);
    width: 90%;
    max-width: 600px;
    border-radius: var(--v2-radius);
    box-shadow: var(--v2-shadow-sm);
}

.v2-modal .modal-content.v2-modal-wide {
    max-width: 920px;
}

.v2-modal .modal-header {
    padding: 16px 20px;
    background: var(--v2-elev);
    color: var(--v2-text);
    border-radius: var(--v2-radius) var(--v2-radius) 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--v2-border);
}

.v2-modal .modal-header h2 {
    margin: 0;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.v2-modal .close {
    color: var(--v2-text-dim);
    font-size: 24px;
    font-weight: 700;
    cursor: pointer;
    line-height: 1;
}

.v2-modal .close:hover {
    color: var(--v2-text);
}

.v2-modal .modal-body {
    padding: 20px;
    color: var(--v2-text);
    background: var(--v2-surface);
    max-height: 80vh;
    overflow-y: auto;
}

.v2-modal .form-group {
    margin-bottom: 14px;
}

.v2-modal .form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--v2-text-muted);
    font-size: 12px;
}

.v2-modal .form-group .required {
    color: var(--v2-danger);
}

.v2-modal .form-control,
.v2-modal textarea.form-control {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--v2-border);
    border-radius: 8px;
    font-size: 13px;
    box-sizing: border-box;
    background: var(--v2-bg-alt);
    color: var(--v2-text);
    font-family: inherit;
}

.v2-modal .form-control:focus,
.v2-modal textarea.form-control:focus {
    outline: none;
    border-color: var(--v2-red);
    box-shadow: 0 0 0 2px rgba(255, 59, 59, 0.15);
}

.v2-modal .form-text {
    display: block;
    margin-top: 6px;
    color: var(--v2-text-dim);
    font-size: 11px;
}

.v2-modal .form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--v2-border);
}

.v2-modal .form-actions .btn {
    min-width: 120px;
    padding: 0.65rem 1rem;
    font-size: 0.9rem;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: 1px solid var(--v2-border);
}

.v2-modal .form-actions .btn-primary {
    background: var(--v2-red);
    border-color: var(--v2-red);
    color: #fff;
}

.v2-modal .form-actions .btn-secondary,
.v2-modal .form-actions .btn-success {
    background: var(--v2-elev);
    color: var(--v2-text);
}

.v2-modal .readonly-field,
.v2-modal .form-control[readonly] {
    background: var(--v2-elev);
    color: var(--v2-text-muted);
    cursor: not-allowed;
}

.v2-modal .profile-files-list {
    max-height: 180px;
    overflow-y: auto;
    border: 1px solid var(--v2-border);
    border-radius: 8px;
    padding: 8px;
    background: var(--v2-bg-alt);
    color: var(--v2-text-muted);
    font-size: 13px;
}

.v2-modal .profile-file-item {
    padding: 6px 4px;
    border-bottom: 1px solid var(--v2-border);
}

.v2-modal .profile-file-item:last-child {
    border-bottom: none;
}

.v2-modal .status-message {
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 13px;
}

.v2-modal .status-info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.25);
    color: var(--v2-info);
}

@media (max-width: 1180px) {
    .v2-motherboards-page .details-grid {
        grid-template-columns: 1fr;
    }

    .v2-mb-actions {
        width: 100%;
        justify-content: flex-start;
    }
}

/* ---- Motherboards mockup layout ---- */
.v2-mb-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.v2-mb-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.v2-page-hero {
    margin-bottom: 18px;
}

.v2-mb-status-card {
    padding: 14px 16px 16px;
    margin-bottom: 18px;
}

.v2-mb-status-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.v2-mb-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(480px, 38vw);
    gap: 16px;
    align-items: stretch;
    min-height: 0;
}

.v2-mb-main,
.v2-mb-detail {
    background: var(--v2-surface);
    border: 1px solid var(--v2-border);
    border-radius: var(--v2-radius);
    box-shadow: var(--v2-shadow-xs);
}

.v2-mb-main {
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.v2-mb-detail {
    position: sticky;
    top: 12px;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.v2-mb-detail-empty {
    padding: 24px 20px;
    color: var(--v2-text-muted);
    font-size: 13px;
    text-align: center;
}

.v2-mb-detail-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--v2-border);
    background: var(--v2-elev);
}

.v2-mb-detail-head > div:first-child {
    min-width: 0;
    flex: 1 1 auto;
}

.v2-mb-detail-head h2 {
    margin: 0;
    font-size: 15px;
    line-height: 1.3;
    color: var(--v2-text);
    word-break: break-word;
}

.v2-mb-detail-head p {
    margin: 4px 0 0;
    font-size: 12px;
    line-height: 1.35;
    color: var(--v2-text-muted);
}

.v2-mb-detail-head-actions {
    display: flex;
    flex-flow: row nowrap;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.v2-mb-detail-body {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1 1 auto;
}

.v2-mb-tabs {
    display: flex;
    align-items: stretch;
    flex-wrap: wrap;
    gap: 0;
    padding: 0 14px;
    border-bottom: 1px solid var(--v2-border);
    background: var(--v2-bg-alt);
    overflow-x: visible;
}

.v2-mb-tab {
    appearance: none;
    border: none;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: var(--v2-text-muted);
    border-radius: 0;
    padding: 11px 12px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.v2-mb-tab:hover {
    color: var(--v2-text);
}

.v2-mb-tab.is-active {
    color: var(--v2-red);
    border-bottom-color: var(--v2-red);
}

.v2-mb-tab-panels {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 12px 14px 14px;
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.22) transparent;
}

.v2-mb-tab-panel {
    display: none;
}

.v2-mb-tab-panel.is-active {
    display: block;
}

.v2-mb-instructions-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.v2-mb-instructions-title {
    margin: 0;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--v2-text-muted);
}

.v2-mb-instructions-body {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    color: var(--v2-text);
    white-space: pre-wrap;
    word-break: break-word;
}

.v2-mb-instructions-empty {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: var(--v2-text-muted);
    font-style: italic;
}

.v2-mb-instructions-textarea {
    width: 100%;
    min-height: 180px;
    resize: vertical;
}

.v2-mb-instructions-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.v2-mb-overview {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.v2-mb-info-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.v2-mb-detail-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.v2-mb-detail-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 0;
    border-bottom: 1px solid var(--v2-border);
    font-size: 12px;
    line-height: 1.35;
}

.v2-mb-detail-row span {
    flex: 0 0 46%;
    color: var(--v2-text-muted);
}

.v2-mb-detail-row strong {
    flex: 1 1 auto;
    text-align: right;
    font-weight: 600;
    color: var(--v2-text);
    word-break: break-word;
}

.v2-mb-overview-thumb {
    width: 72px;
    height: 54px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid var(--v2-border);
    background: rgba(255, 255, 255, 0.03);
}

.v2-mb-overview-thumb.is-product {
    width: 100%;
    max-width: 100%;
    height: 180px;
}

.v2-mb-overview-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.v2-mb-overview-thumb.is-product .v2-mb-product-image {
    object-fit: contain;
    background: rgba(255, 255, 255, 0.02);
}

.v2-mb-overview-fallback {
    font-size: 22px;
    color: var(--v2-text-muted);
}

.v2-mb-section-title {
    margin: 10px 0 6px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--v2-text-muted);
}

.v2-mb-section-title:first-child {
    margin-top: 0;
}

.v2-mb-profile-block {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 0 0;
}

.v2-mb-profile-block.is-compact {
    padding-top: 0;
    border-top: none;
}

.v2-mb-muted {
    margin: 0;
    color: var(--v2-text-muted);
    font-size: 13px;
    line-height: 1.5;
}

.v2-mb-profile-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.v2-mb-upload-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 13px;
    color: var(--v2-text-muted);
}

.v2-mb-upload-label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--v2-text-dim);
}

.v2-file-picker {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.v2-file-picker-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.v2-file-picker-btn {
    margin: 0;
    cursor: pointer;
}

.v2-file-picker-name {
    flex: 1 1 120px;
    min-width: 0;
    font-size: 12px;
    color: var(--v2-text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.v2-mb-files-pane {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.v2-mb-files-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.v2-mb-files-summary,
.v2-mb-files-default {
    margin: 0;
}

.v2-mb-files-default strong {
    color: var(--v2-text);
    font-weight: 600;
}

.v2-mb-files-upload-section {
    padding-top: 16px;
    border-top: 1px solid var(--v2-border);
}

.v2-mb-files-upload-section .v2-mb-upload-field {
    gap: 10px;
}

.v2-mb-files-upload-section .v2-file-picker {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--v2-border);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.02);
}

.v2-mb-files-upload-section .v2-file-picker-btn,
.v2-mb-files-upload-section .v2-file-picker-name,
.v2-mb-files-upload-section .v2-btn.is-primary {
    width: 100%;
}

.v2-mb-files-upload-section .v2-file-picker-name {
    padding: 2px 2px 0;
}

.v2-mb-files-empty {
    padding: 12px;
    border: 1px dashed var(--v2-border);
    border-radius: 10px;
    text-align: center;
    font-size: 13px;
    color: var(--v2-text-muted);
    font-style: italic;
}

.v2-mb-file-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.v2-mb-file-list.is-compact {
    margin-bottom: 4px;
}

.v2-mb-file-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--v2-border);
    border-radius: 10px;
    background: var(--v2-elev);
    font-size: 12px;
    color: var(--v2-text-muted);
}

.v2-mb-file-main {
    flex: 1 1 auto;
    min-width: 0;
}

.v2-mb-file-name {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--v2-text);
    word-break: break-word;
}

.v2-mb-file-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    margin-top: 4px;
    font-size: 11px;
    color: var(--v2-text-muted);
}

.v2-mb-file-actions {
    flex: 0 0 auto;
    align-self: center;
}

.v2-mb-file-delete {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: transparent;
}

.v2-mb-file-list .empty {
    display: block;
    padding: 8px 10px;
    border: 1px dashed var(--v2-border);
    border-radius: 10px;
    text-align: center;
    font-style: italic;
    color: var(--v2-text-muted);
}

.v2-mb-overview-actions,
.v2-mb-profile-actions {
    margin-top: 0;
    gap: 10px;
}

.v2-mb-overview-actions .v2-btn,
.v2-mb-profile-actions .v2-btn {
    flex: 1 1 120px;
}

.v2-btn.is-compact {
    padding: 6px 10px;
    font-size: 11px;
    gap: 6px;
}

.v2-mb-vendor-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--v2-text);
}

.v2-motherboards-page .v2-mb-table tbody tr.is-selected td {
    background: rgba(255, 59, 59, 0.08);
}

.v2-motherboards-page .v2-mb-table tbody tr.is-selected td:first-child {
    box-shadow: inset 3px 0 0 var(--v2-red);
}

.v2-mb-row-menu {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: 1px solid var(--v2-border);
    background: var(--v2-elev);
    color: var(--v2-text-muted);
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.v2-mb-row-menu:hover {
    color: var(--v2-text);
    border-color: rgba(255, 59, 59, 0.35);
    background: rgba(255, 59, 59, 0.08);
}

.v2-mb-table-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    padding: 12px 14px;
    border-top: 1px solid var(--v2-border);
    color: var(--v2-text-muted);
    font-size: 12px;
}

.v2-page-size {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.v2-page-size select,
.v2-select.v2-page-size {
    min-width: 74px;
    padding: 6px 9px;
    border: 1px solid var(--v2-border);
    border-radius: 8px;
    background: var(--v2-bg-alt);
    color: var(--v2-text);
    font-size: 12px;
}

/* ---- Dashboard: full-width + screenshot cells ---- */
body.v2-page-dashboard {
    background: #0b0e14;
}

body.v2-page-dashboard .v2-main,
body.v2-page-dashboard .v2-nav-inner,
body.v2-page-dashboard .v2-footer-inner {
    max-width: none;
    width: 100%;
}

body.v2-page-dashboard .v2-main {
    padding: 14px 22px 28px;
}

body.v2-page-dashboard .v2-nav-inner {
    padding: 12px 22px;
}

body.v2-page-dashboard .v2-footer-inner {
    padding: 12px 22px;
}

body.v2-page-dashboard .v2-hero-dashboard {
    display: grid;
    grid-template-columns: minmax(0, 1fr) min(240px, 22vw);
    gap: 0;
    padding: 0;
    margin-bottom: 12px;
    border-radius: 10px;
    border: 1px solid var(--v2-border);
    background: #11151f;
    box-shadow: none;
    overflow: hidden;
    align-items: stretch;
}

body.v2-page-dashboard .v2-hero-dashboard::before {
    display: none;
}

body.v2-page-dashboard .v2-hero-dashboard .v2-hero-content {
    padding: 0 0 0 16px;
    min-width: 0;
    justify-content: center;
}

body.v2-page-dashboard .v2-dash-subtitle {
    display: none;
}

body.v2-page-dashboard .v2-hero-meta.is-5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0;
    height: 100%;
    align-items: stretch;
}

body.v2-page-dashboard .v2-hero-tile {
    border: none;
    border-radius: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.07);
    background: transparent;
    box-shadow: none;
    padding: 10px 16px;
    min-height: 0;
    height: 100%;
    justify-content: center;
    align-items: flex-start;
    gap: 4px;
}

body.v2-page-dashboard .v2-hero-tile:last-child {
    border-right: none;
}

body.v2-page-dashboard .v2-hero-tile:hover {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.07);
}

body.v2-page-dashboard .v2-hero-tile .v2-hm-label {
    font-size: 10px;
    letter-spacing: 0.1em;
    margin-bottom: 0;
}

body.v2-page-dashboard .v2-hero-tile .v2-hm-value {
    font-size: 12.5px;
    white-space: normal;
}

body.v2-page-dashboard .v2-hero-tile-progress .v2-hm-progress {
    margin-top: 4px;
    height: 4px;
}

body.v2-page-dashboard .v2-hero-aside {
    border-left: 1px solid rgba(255, 255, 255, 0.07);
    padding: 0;
    align-items: stretch;
    justify-content: center;
}

body.v2-page-dashboard .v2-hero-dashboard .v2-hero-chip {
    width: 100%;
    height: 100%;
    min-height: 76px;
    border-radius: 0;
}

body.v2-page-dashboard .v2-hero-dashboard .v2-hero-chip img {
    transform: none;
    max-height: 100%;
}

body.v2-page-dashboard .v2-kpis {
    gap: 12px;
    margin-bottom: 12px;
}

body.v2-page-dashboard .v2-kpi {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    grid-template-rows: auto auto auto 5px;
    column-gap: 12px;
    row-gap: 2px;
    padding: 14px 16px 0;
    min-height: 108px;
    border-radius: 10px;
    background: #11151f;
    border-color: rgba(255, 255, 255, 0.07);
    align-items: start;
}

body.v2-page-dashboard .v2-kpi:hover {
    transform: none;
    border-color: rgba(255, 255, 255, 0.12);
}

body.v2-page-dashboard .v2-kpi-icon {
    grid-row: 1 / span 2;
    grid-column: 1;
    width: 40px;
    height: 40px;
    font-size: 16px;
    border-radius: 8px;
}

body.v2-page-dashboard .v2-kpi-body {
    display: contents;
}

body.v2-page-dashboard .v2-kpi-value {
    grid-column: 2;
    grid-row: 1;
    font-size: 34px;
    font-weight: 700;
    margin: 0;
    line-height: 1;
    align-self: end;
}

body.v2-page-dashboard .v2-kpi-label {
    grid-column: 2;
    grid-row: 2;
    font-size: 12px;
    color: var(--v2-text-muted);
}

body.v2-page-dashboard .v2-kpi-meta {
    grid-column: 2;
    grid-row: 3;
    font-size: 11px;
    margin-top: 2px;
}

body.v2-page-dashboard .v2-kpi-progress {
    grid-column: 1 / -1;
    grid-row: 4;
    margin: 10px -16px 0;
    width: calc(100% + 32px);
    height: 4px;
    border-radius: 0 0 10px 10px;
    background: rgba(0, 0, 0, 0.35);
}

body.v2-page-dashboard .v2-kpi-progress-fill {
    border-radius: 0 0 0 10px;
}

body.v2-page-dashboard .v2-kpi-strip {
    display: none;
}

body.v2-page-dashboard .v2-dash-body {
    grid-template-columns: minmax(0, 1fr) min(380px, 28vw);
    gap: 14px;
}

body.v2-page-dashboard .v2-dash-main,
body.v2-page-dashboard .v2-side {
    gap: 14px;
}

body.v2-page-dashboard .v2-side {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

body.v2-page-dashboard .v2-card {
    border-radius: 10px;
    background: #11151f;
    border-color: rgba(255, 255, 255, 0.07);
}

body.v2-page-dashboard .v2-bottom-grid {
    gap: 14px;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.35fr);
}

body.v2-page-dashboard .v2-kpi-icon {
    grid-row: 1;
    align-self: center;
}

body.v2-page-dashboard .v2-kpi-value {
    grid-row: 1;
    align-self: center;
    font-size: 36px;
}

body.v2-page-dashboard .v2-kpi-label {
    grid-column: 1 / -1;
    grid-row: 2;
}

body.v2-page-dashboard .v2-kpi-meta {
    grid-column: 1 / -1;
    grid-row: 3;
}

body.v2-page-dashboard .v2-hm-progress-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
}

body.v2-page-dashboard .v2-hm-progress-row .v2-hm-progress {
    flex: 1;
    margin-top: 0;
}

body.v2-page-dashboard .v2-hm-progress-pct {
    font-size: 11px;
    font-weight: 600;
    color: var(--v2-text-muted);
    min-width: 38px;
    text-align: right;
}

body.v2-page-dashboard .v2-nav-link.is-active::after {
    bottom: -13px;
}

body.v2-page-dashboard .v2-user {
    cursor: default;
}

body.v2-page-dashboard .v2-user-chevron {
    font-size: 10px;
    color: var(--v2-text-dim);
    margin-left: 2px;
}

body.v2-page-dashboard .v2-bell-count {
    display: none !important;
}


body.v2-page-dashboard .v2-card-header-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

body.v2-page-dashboard .v2-console-title > i {
    display: none;
}

body.v2-page-dashboard .v2-donut-wrap--wide {
    grid-template-columns: 130px minmax(0, 1fr) minmax(140px, 1fr);
    gap: 14px 18px;
    align-items: center;
}

body.v2-page-dashboard .v2-donut {
    width: 120px;
    height: 120px;
}

body.v2-page-dashboard .v2-donut::after {
    display: none;
}

body.v2-page-dashboard .v2-donut-center {
    position: absolute;
    inset: 22%;
    border-radius: 50%;
    background: #11151f;
    border: 1px solid var(--v2-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1.1;
}

body.v2-page-dashboard .v2-donut-total-num {
    font-size: 22px;
    font-weight: 700;
    color: var(--v2-text);
}

body.v2-page-dashboard .v2-donut-center small {
    font-size: 10px;
    color: var(--v2-text-dim);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

body.v2-page-dashboard .v2-sync-meta {
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 11px;
}

body.v2-page-dashboard .v2-sync-meta-row {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

body.v2-page-dashboard .v2-sync-meta-row span {
    color: var(--v2-text-dim);
}

body.v2-page-dashboard .v2-sync-meta-row strong {
    color: var(--v2-text);
    font-size: 12.5px;
    font-weight: 600;
}

body.v2-page-dashboard .v2-info-grid--dash {
    grid-template-columns: 1fr 1fr;
}

body.v2-page-dashboard .v2-sysinfo-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

body.v2-page-dashboard .v2-sysinfo-stat {
    text-align: center;
    padding: 10px 8px;
}

body.v2-page-dashboard .v2-sysinfo-stat strong {
    font-size: 18px;
}

body.v2-page-dashboard .v2-recent-item {
    align-items: center;
}

body.v2-page-dashboard .v2-recent-status {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    flex-shrink: 0;
}

.v2-btn.is-stop-solid {
    border-color: rgba(239, 68, 68, 0.55);
    color: #fff;
    background: linear-gradient(180deg, #ef4444, #dc2626);
}

.v2-btn.is-stop-solid:hover:not(:disabled) {
    background: linear-gradient(180deg, #f87171, #ef4444);
}

.v2-btn.is-stop-solid:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.v2-toolbar-always:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* ---- Dashboard layout (screenshot match) ---- */
.v2-brand-stack {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
    gap: 2px;
}

.v2-brand-title {
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.08em;
}

/* Shown only when the published patch level is ahead of the installed one.
   Deliberately quiet: it is information, not an alarm - nothing is broken at
   the moment it appears, and it stays until somebody applies the patch. */
.v2-brand-update {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 14px;
    padding: 5px 11px;
    border: 1px solid var(--v2-amber, #d99a2b);
    border-radius: 999px;
    background: rgba(217, 154, 43, 0.12);
    color: var(--v2-amber, #d99a2b);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-decoration: none;
    white-space: nowrap;
}

.v2-brand-update:hover {
    background: rgba(217, 154, 43, 0.2);
    color: var(--v2-amber, #d99a2b);
}

@media (max-width: 900px) {
    /* The tab bar matters more than this on a narrow screen, and the same
       notice is on the Settings page. */
    .v2-brand-update { display: none; }
}

.v2-brand-ver {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--v2-text-dim);
    text-transform: none;
}

.v2-hm-link {
    margin-top: 2px;
    font-size: 11px;
    font-weight: 600;
    color: var(--v2-red);
}

.v2-hm-link:hover {
    color: #ff6b6b;
}

.v2-hero-tile-progress .v2-hm-value {
    font-size: 12px;
}

.v2-dash-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 22px;
    align-items: start;
}

.v2-dash-main {
    display: flex;
    flex-direction: column;
    gap: 22px;
    min-width: 0;
}

/* fallback when not dashboard page */
body:not(.v2-page-dashboard) .v2-dash-body {
    grid-template-columns: minmax(0, 1fr) 360px;
}

.v2-dash-body .v2-console-card {
    display: flex;
    flex-direction: column;
    min-height: 420px;
}

.v2-dash-body .v2-console-table-wrap {
    flex: 1 1 auto;
    min-height: 280px;
    max-height: 420px;
}

.v2-console-title::before {
    content: '>_ ';
    font-family: 'JetBrains Mono', Consolas, monospace;
    color: var(--v2-red);
    font-weight: 600;
}

.v2-live-pill {
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 10px;
    font-weight: 700;
}

.v2-btn.is-warning-outline {
    border-color: rgba(245, 158, 11, 0.45);
    color: var(--v2-warning);
    background: rgba(245, 158, 11, 0.08);
}

.v2-btn.is-warning-outline:hover {
    background: rgba(245, 158, 11, 0.14);
    border-color: var(--v2-warning);
}

.v2-view-log-btn {
    min-width: 180px;
    justify-content: center;
}

.v2-card-link {
    font-size: 12px;
    padding: 6px 10px;
}

.v2-bottom-grid {
    margin-top: 0;
}

.v2-problems-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
}

.v2-problem-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(239, 68, 68, 0.22);
    background: rgba(239, 68, 68, 0.06);
}

.v2-problem-body {
    flex: 1;
    min-width: 0;
}

.v2-problem-title {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--v2-text);
    line-height: 1.25;
}

.v2-problem-error {
    font-size: 11px;
    color: #f87171;
    margin-top: 3px;
}

.v2-problem-time {
    font-size: 10px;
    color: var(--v2-text-dim);
    flex-shrink: 0;
}

.v2-problems-link {
    display: inline-flex;
    font-size: 12px;
    font-weight: 600;
    color: var(--v2-red);
}

.v2-problems-link:hover {
    color: #ff6b6b;
}

.v2-recent-item .v2-mb-logo {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 700;
    flex-shrink: 0;
}

.v2-sysinfo-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--v2-border);
}

.v2-sysinfo-stat {
    padding: 8px 10px;
    border-radius: 8px;
    background: var(--v2-bg-alt);
    border: 1px solid var(--v2-border);
}

.v2-sysinfo-stat strong {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: var(--v2-text);
    line-height: 1.1;
}

.v2-sysinfo-stat span {
    font-size: 10px;
    color: var(--v2-text-dim);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.v2-console-table .v2-badge {
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 10px;
    font-weight: 700;
}

.v2-donut::after {
    font-size: 22px;
    font-weight: 700;
    color: var(--v2-text);
}

@media (max-width: 980px) {
    .v2-mb-status-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .v2-mb-workspace {
        grid-template-columns: 1fr;
    }

    .v2-mb-detail {
        position: static;
        max-height: none;
    }
}

/* ---- App pages: full-width + status strip ---- */
body.v2-page-app {
    background: #0b0e14;
}

body.v2-page-app .v2-main,
body.v2-page-app .v2-nav-inner,
body.v2-page-app .v2-footer-inner {
    max-width: none;
    width: 100%;
}

body.v2-page-app .v2-main {
    padding: 14px 22px 28px;
}

body.v2-page-app .v2-nav-inner {
    padding: 12px 22px;
}

body.v2-page-app .v2-footer-inner {
    padding: 12px 22px;
}

body.v2-page-app .v2-status-strip.v2-hero-dashboard {
    display: block;
    padding: 0;
    margin-bottom: 12px;
    border-radius: 10px;
    border: 1px solid var(--v2-border);
    background: #11151f;
    box-shadow: none;
    overflow: hidden;
    min-height: 76px;
}

body.v2-page-app .v2-status-strip.v2-hero-dashboard::before {
    display: none;
}

body.v2-page-app .v2-status-strip .v2-hero-content {
    padding: 0;
    min-width: 0;
    min-height: 76px;
    justify-content: center;
}

body.v2-page-app .v2-hero-meta.is-5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0;
    height: 100%;
    align-items: stretch;
}

body.v2-page-app .v2-hero-tile {
    border: none;
    border-radius: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.07);
    background: transparent;
    box-shadow: none;
    padding: 10px 16px;
    min-height: 0;
    height: 100%;
    justify-content: center;
    align-items: flex-start;
    gap: 4px;
}

body.v2-page-app .v2-hero-tile:last-child {
    border-right: none;
}

body.v2-page-app .v2-hero-tile:hover {
    background: rgba(255, 255, 255, 0.02);
}

body.v2-page-app .v2-hero-tile .v2-hm-label {
    font-size: 10px;
    letter-spacing: 0.1em;
    margin-bottom: 0;
}

body.v2-page-app .v2-hero-tile .v2-hm-value {
    font-size: 12.5px;
    white-space: normal;
}

body.v2-page-app .v2-hero-tile-progress .v2-hm-progress {
    margin-top: 8px;
    height: 4px;
}

body.v2-page-app .v2-hm-progress-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

body.v2-page-app .v2-hm-progress-row .v2-hm-progress {
    flex: 1 1 auto;
    min-width: 0;
}

body.v2-page-app .v2-hm-progress-pct {
    flex: 0 0 auto;
    font-size: 11px;
    color: var(--v2-text-muted);
}

body.v2-page-motherboards .v2-mb-card-header {
    padding: 12px 14px;
    border-bottom: 1px solid var(--v2-border);
    gap: 10px;
}

/* Profiles page */
.v2-pf-kpis {
    margin-bottom: 14px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

@media (max-width: 1180px) {
    .v2-pf-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .v2-pf-kpis {
        grid-template-columns: 1fr;
    }
}

.v2-pf-kpi {
    border: 1px solid var(--v2-border);
    cursor: pointer;
    text-align: left;
    width: 100%;
    font: inherit;
    color: inherit;
}

.v2-pf-kpi.is-active {
    outline: 1px solid rgba(255, 59, 59, 0.45);
    box-shadow: 0 0 0 1px rgba(255, 59, 59, 0.2);
}

.v2-pf-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    white-space: nowrap;
}

body.v2-page-app .v2-profiles-page {
    margin-top: 0;
}

.v2-pf-table .v2-pf-row {
    cursor: pointer;
}

.v2-pf-table .v2-pf-row:hover td {
    background: rgba(255, 255, 255, 0.03);
}

.v2-pf-table .v2-pf-row.is-expanded td {
    background: rgba(255, 59, 59, 0.06);
    border-bottom-color: transparent;
}

.v2-pf-chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    color: var(--v2-text-muted);
    transition: transform 0.15s ease;
}

.v2-pf-row.is-expanded .v2-pf-chevron {
    transform: rotate(90deg);
    color: var(--v2-red);
}

.v2-pf-detail-row td {
    padding: 0 !important;
    background: rgba(7, 9, 15, 0.65);
    border-bottom: 1px solid var(--v2-border);
}

.v2-pf-detail {
    padding: 14px 16px 16px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

@media (max-width: 900px) {
    .v2-pf-detail {
        grid-template-columns: 1fr;
    }
}

.v2-pf-detail-block {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.v2-pf-detail-block label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--v2-text-dim);
}

.v2-pf-detail-block textarea {
    width: 100%;
    min-height: 120px;
    resize: vertical;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--v2-border);
    background: var(--v2-bg-alt);
    color: var(--v2-text);
    font-size: 13px;
    line-height: 1.45;
    font-family: inherit;
}

.v2-pf-detail-block textarea:focus {
    outline: none;
    border-color: var(--v2-red);
}

.v2-pf-detail-block textarea[readonly] {
    opacity: 0.92;
    cursor: default;
}

.v2-pf-detail-actions {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding-top: 4px;
}

.v2-pf-detail-meta {
    font-size: 11px;
    color: var(--v2-text-muted);
    margin-left: auto;
}

.v2-pf-has-note {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--v2-warning);
}

/* ---- Hamburger button (hidden on desktop) ---- */
.v2-nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 38px;
    height: 38px;
    background: var(--v2-elev);
    border: 1px solid var(--v2-border);
    border-radius: var(--v2-radius-sm);
    padding: 0;
    cursor: pointer;
    flex-shrink: 0;
    transition: border-color 0.15s;
}
.v2-nav-toggle:hover { border-color: var(--v2-border-strong); }
.v2-nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--v2-text-muted);
    border-radius: 2px;
    transition: transform 0.2s, opacity 0.2s;
}
.v2-nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.v2-nav-toggle.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.v2-nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---- Responsive ---- */
@media (max-width: 1180px) {
    .v2-grid { grid-template-columns: 1fr; }
    .v2-grid-console > .v2-console-card { height: auto !important; }
    .v2-console-table-wrap { flex: initial; max-height: 420px; }
    .v2-kpis { grid-template-columns: repeat(2, 1fr); }
    .v2-hero { grid-template-columns: 1fr; }
    .v2-hero-aside { justify-content: flex-end; }
    .v2-hero-visual { width: 280px; height: 168px; }
    .v2-hero-meta.is-4,
    .v2-hero-meta.is-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .v2-bottom-grid { grid-template-columns: 1fr; }
    .v2-dash-body { grid-template-columns: 1fr; }
    body.v2-page-dashboard .v2-hero-dashboard { grid-template-columns: 1fr; }
    body.v2-page-dashboard .v2-hero-aside {
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.07);
        min-height: 120px;
    }
    body.v2-page-dashboard .v2-hero-meta.is-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    body.v2-page-dashboard .v2-hero-tile:nth-child(2n) { border-right: none; }
    body.v2-page-dashboard .v2-dash-body { grid-template-columns: 1fr; }
    body.v2-page-app .v2-hero-meta.is-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    body.v2-page-app .v2-hero-tile:nth-child(2n) { border-right: none; }
}

@media (max-width: 860px) {
    .v2-hero-meta,
    .v2-hero-meta.is-4,
    .v2-hero-meta.is-5 { grid-template-columns: 1fr; }
    .v2-hero-aside { flex-direction: row; align-items: stretch; justify-content: flex-start; }
    .v2-hero-visual { width: 100%; max-width: 320px; height: 168px; }
    .v2-donut-wrap { grid-template-columns: 1fr; }
    /* table horizontal scroll on tablet */
    .v2-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    /* toolbar wraps filters to new row */
    .v2-mb-toolbar { flex-wrap: wrap; gap: 8px; }
    .v2-search { flex: 1 1 100%; }
}

@media (max-width: 720px) {
    .v2-main { padding: 18px 16px 32px; }

    /* Nav: show hamburger, collapse links into dropdown */
    .v2-nav-toggle { display: flex; }
    .v2-nav-inner {
        padding: 12px 16px;
        gap: 12px;
        position: relative;
    }
    .v2-nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(7, 9, 15, 0.97);
        backdrop-filter: blur(14px);
        border-bottom: 1px solid var(--v2-border);
        flex-direction: column;
        padding: 8px 12px 14px;
        gap: 2px;
        z-index: 200;
        box-shadow: 0 12px 32px rgba(0,0,0,0.5);
    }
    .v2-nav-links.is-open { display: flex; }
    .v2-nav-link {
        width: 100%;
        padding: 11px 14px;
        border-radius: var(--v2-radius-sm);
    }
    .v2-nav-link.is-active::after { display: none; }
    .v2-nav-link.is-active { background: rgba(255, 59, 59, 0.08); }

    /* filters: 2 per row */
    .v2-select { flex: 1 1 calc(50% - 4px); min-width: 120px; }

    /* forms, action grids */
    .v2-kpis { grid-template-columns: 1fr 1fr; }
    .v2-form-grid { grid-template-columns: 1fr; }
    .v2-actions-grid { grid-template-columns: 1fr; }
    .v2-mb-actions { flex-wrap: wrap; gap: 6px; }
}

@media (max-width: 480px) {
    .v2-main { padding: 14px 12px 28px; }

    /* Nav: hide username label, keep only avatar */
    .v2-user-name { display: none; }
    .v2-lang { display: none; }
    .v2-user { padding: 4px; border-radius: 50%; }

    /* KPIs: full width each */
    .v2-kpis { grid-template-columns: 1fr; }

    /* Hero tiles: single column */
    .v2-hero-meta,
    .v2-hero-meta.is-4,
    .v2-hero-meta.is-5 { grid-template-columns: 1fr; }
    .v2-hero-tile { border-right: none !important; }

    /* Filters: full width each */
    .v2-select { flex: 1 1 100%; }
    .v2-filter-check { flex: 1 1 100%; }

    /* Smaller table min-width for phones */
    .v2-table { min-width: 480px; }

    /* Log rows: 2-col (drop time column) */
    .v2-log-row { grid-template-columns: 60px 1fr; }
    .v2-log-time { display: none; }

    /* Profiles KPI grid */
    .v2-pf-kpis { grid-template-columns: 1fr 1fr !important; }

    /* Typography scale-down */
    .v2-hero-text h1 { font-size: 17px; }
    .v2-kpi-num { font-size: 26px !important; }
    .v2-card-title { font-size: 14px; }
}

/* ============================================================
   RESPONSIVE OVERHAUL: specificity corrections & layout fixes
   ============================================================ */

/* Prevent stray wide elements from causing horizontal page scroll */
body.v2 { overflow-x: hidden; }

/* Table wrappers always scroll horizontally with touch support */
.v2-table-wrapper { -webkit-overflow-scrolling: touch; }

/* ---- 860px: stack MB workspace early, fix app-page padding specificity ---- */
@media (max-width: 860px) {
    /* Stack motherboard workspace at 860px so table has full width
       (default rule stacks at 980px, which is too late: table too narrow at 860-980px) */
    .v2-mb-workspace { grid-template-columns: 1fr; }
    .v2-mb-detail    { position: static; max-height: none; min-height: 0; }

    /* body.v2-page-app .v2-nav-inner has higher specificity than .v2-nav-inner
       in the 720px block, so it keeps 22px padding on app pages without this override */
    body.v2-page-app .v2-nav-inner { padding: 12px 16px; }
    body.v2-page-app .v2-main      { padding: 14px 18px 28px; }
}

/* ---- 720px ---- */
@media (max-width: 720px) {
    /* App page layout: same specificity issue, later rule wins */
    body.v2-page-app .v2-main      { padding: 14px 14px 24px; }
    body.v2-page-app .v2-nav-inner { padding: 10px 14px; }

    /* Motherboard detail info cards: 2 columns instead of 3×210px min */
    .v2-motherboards-page .details-grid { grid-template-columns: repeat(2, 1fr); }

    /* Report cards: wrap meta/actions below title */
    .v2-report-card { flex-wrap: wrap; gap: 10px; }
    .v2-report-card .v2-report-actions { flex: 0 0 100%; }
}

/* ---- 640px: modals ---- */
@media (max-width: 640px) {
    .v2-modal .modal-content,
    .v2-modal .modal-content.v2-modal-wide {
        width: calc(100% - 20px);
        max-width: 100%;
        margin: 20px auto;
    }
    .v2-modal .modal-body   { padding: 16px; }
    .v2-modal .modal-header { padding: 14px 16px; }
}

/* ---- 480px: phone overrides ---- */
@media (max-width: 480px) {
    /* App page padding: must beat body.v2-page-app .v2-main (no-media, high specificity) */
    body.v2-page-app .v2-main      { padding: 10px 10px 20px; }
    body.v2-page-app .v2-nav-inner { padding: 8px 12px; }

    /* Hero tile grids: body.v2-page-app/.v2-page-dashboard beat generic .v2-hero-meta rules */
    body.v2-page-app .v2-hero-meta.is-5,
    body.v2-page-dashboard .v2-hero-meta.is-5 { grid-template-columns: 1fr; }
    body.v2-page-app .v2-hero-tile,
    body.v2-page-dashboard .v2-hero-tile {
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }
    body.v2-page-app .v2-status-strip.v2-hero-dashboard { min-height: 0; }

    /* Reduce table min-widths: wrapper still scrolls, but distance is shorter */
    .v2-table         { min-width: 360px; }
    .v2-console-table { min-width: 360px; }

    /* Log toolbar selects: 2 per row, no forced 180px min */
    .v2-log-toolbar .v2-select { min-width: 0; flex: 1 1 calc(50% - 6px); }

    /* Motherboard detail cards: single column */
    .v2-motherboards-page .details-grid { grid-template-columns: 1fr; }

    /* MB status bar: single column */
    .v2-mb-status-grid { grid-template-columns: 1fr; }

    /* Reports: stack card content vertically */
    .v2-report-card { flex-direction: column; gap: 12px; }
    .v2-report-card .v2-report-actions { width: 100%; }

    /* Profile row actions: allow wrap to prevent overflow */
    .v2-pf-actions { white-space: normal; flex-wrap: wrap; }
}

/* ---- 640px: motherboards table → card view ---- */
/* Selectors prefixed with .v2-motherboards-page to beat the desktop
   `.v2-motherboards-page .v2-mb-table tbody tr { height: 41px }` rule. */
@media (max-width: 640px) {
    .v2-motherboards-page .v2-mb-table { min-width: 0; }
    .v2-motherboards-page .v2-mb-table thead { display: none; }
    .v2-motherboards-page .v2-mb-table,
    .v2-motherboards-page .v2-mb-table tbody,
    .v2-motherboards-page .v2-mb-table tr,
    .v2-motherboards-page .v2-mb-table tbody td {
        display: block;
        width: auto;
        height: auto;
    }
    /* Release the fixed row height / wrap height that drove the desktop grid */
    .v2-motherboards-page .v2-mb-table-wrap {
        height: auto;
        max-height: none;
        overflow-y: visible;
    }

    .v2-motherboards-page .v2-mb-table tbody tr.v2-mb-row {
        height: auto;
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 12px;
        padding: 8px 12px;
        margin-bottom: 10px;
        background: rgba(255, 255, 255, 0.02);
    }
    .v2-motherboards-page .v2-mb-table tbody tr.v2-mb-row.is-selected {
        border-color: var(--v2-accent, #e11d2a);
        background: rgba(225, 29, 42, 0.06);
    }

    .v2-motherboards-page .v2-mb-table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
        padding: 6px 0;
        border: none;
        text-align: right;
        white-space: normal;
    }
    .v2-motherboards-page .v2-mb-table tbody td::before {
        content: attr(data-label);
        font-size: 11px;
        letter-spacing: 0.04em;
        text-transform: uppercase;
        color: var(--v2-text-muted, #8b93a7);
        flex: 0 0 auto;
        text-align: left;
    }
    /* Actions row: label left, buttons right without squeezing */
    .v2-motherboards-page .v2-mb-table tbody td.v2-mb-row-actions {
        flex-wrap: wrap;
        justify-content: flex-end;
    }
}

/* ---- A compact hero for the app pages ----
   `.v2-hero-visual` is 320x190, sized for the BIOS dashboard where the hero
   also carries a clock and a status strip. Driver and RGB Checker put four
   tiles in it and nothing else, so the fixed visual set the height and left
   most of the band empty. `body.v2-page-app` scopes this to those pages: the
   dashboard's own hero is restyled further down and must not be touched.
   Applied by opting in, not by page class: `v2-page-app` also covers BIOS
   Checker's motherboards, logs and settings pages, which use the same hero
   component and were never part of this. */
.v2-hero.is-compact {
    padding: 14px 18px;
    margin-bottom: 14px;
    align-items: center;
}

.v2-hero.is-compact .v2-hero-visual {
    width: 150px;
    height: 92px;
}

.v2-hero.is-compact .v2-hero-visual i {
    font-size: 42px;
}

.v2-hero.is-compact .v2-dash-subtitle {
    margin: 0 0 10px;
}

/* The navbar mark for a tool with no logo file of its own. Sized to sit where
   the image sits, so the brand does not shift between tools. */
.v2-brand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: rgba(255, 59, 59, 0.12);
    color: var(--v2-red);
    font-size: 16px;
    flex-shrink: 0;
}
