html, body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', 'Roboto', 'Helvetica Neue', sans-serif;
}

h1:focus {
    outline: none;
}

/* ============================================
   Custom CSS properties — light mode defaults
   ============================================ */
:root {
    --subnet-leaf-bg: rgba(46, 125, 50, 0.08);
    --subnet-leaf-border: rgba(46, 125, 50, 0.2);
    --subnet-leaf-text: #2e7d32;
    --subnet-branch-bg: rgba(0, 0, 0, 0.03);
    --subnet-branch-text: rgba(0, 0, 0, 0.5);
}

.mud-theme-dark {
    --subnet-leaf-bg: rgba(102, 187, 106, 0.12);
    --subnet-leaf-border: rgba(102, 187, 106, 0.25);
    --subnet-leaf-text: #a5d6a7;
    --subnet-branch-bg: rgba(255, 255, 255, 0.04);
    --subnet-branch-text: rgba(255, 255, 255, 0.45);
}

/* ============================================
   Label color classes — light mode
   ============================================ */
.label-blue { background: rgba(25, 118, 210, 0.12); color: #1565c0; }
.label-red { background: rgba(211, 47, 47, 0.12); color: #c62828; }
.label-green { background: rgba(46, 125, 50, 0.12); color: #2e7d32; }
.label-orange { background: rgba(230, 81, 0, 0.12); color: #e65100; }
.label-purple { background: rgba(106, 27, 154, 0.12); color: #6a1b9a; }
.label-teal { background: rgba(0, 105, 92, 0.12); color: #00695c; }
.label-pink { background: rgba(173, 20, 87, 0.12); color: #ad1457; }
.label-amber { background: rgba(255, 143, 0, 0.12); color: #ff8f00; }

/* Label color classes — dark mode */
.mud-theme-dark .label-blue { background: rgba(144, 202, 249, 0.15); color: #90caf9; }
.mud-theme-dark .label-red { background: rgba(239, 83, 80, 0.15); color: #ef9a9a; }
.mud-theme-dark .label-green { background: rgba(102, 187, 106, 0.15); color: #a5d6a7; }
.mud-theme-dark .label-orange { background: rgba(255, 167, 38, 0.15); color: #ffcc80; }
.mud-theme-dark .label-purple { background: rgba(171, 71, 188, 0.15); color: #ce93d8; }
.mud-theme-dark .label-teal { background: rgba(38, 166, 154, 0.15); color: #80cbc4; }
.mud-theme-dark .label-pink { background: rgba(236, 64, 122, 0.15); color: #f48fb1; }
.mud-theme-dark .label-amber { background: rgba(255, 202, 40, 0.15); color: #ffe082; }

/* ============================================
   Blazor loading spinner
   ============================================ */
.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

.loading-progress circle {
    fill: none;
    stroke: #333;
    stroke-width: 0.4rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    stroke: #90caf9;
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: 600;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
    color: #90caf9;
}

.loading-progress-text:after {
    content: var(--blazor-load-percentage-text, "Loading");
}

/* Blazor error banner */
#blazor-error-ui {
    background: #311b1b;
    color: #e08080;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.3);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.blazor-error-boundary {
    padding: 1rem;
    color: #e08080;
    background: #311b1b;
    border-radius: 4px;
}

.blazor-error-boundary::after {
    content: "An error has occurred.";
}
