/* Platform console styles on the Hearth tokens (css/hearth.css, loaded first). */

html, body {
    background: var(--bg);
    color: var(--ink);
    font-family: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

h1:focus {
    outline: none;
}

a {
    color: var(--primary);
}

code {
    font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: .92em;
    color: var(--ink);
    background: var(--chip-muted);
    border-radius: 6px;
    padding: 1px 5px;
}

.validation-message {
    color: var(--danger);
}

/* ---------- Shell ---------- */
.mud-appbar.hearth-appbar {
    background: color-mix(in oklab, var(--surface), transparent 8%);
    color: var(--ink);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.mud-drawer.hearth-drawer {
    background: var(--surface);
    border-right: 1px solid var(--border);
}

.hearth-drawer .mud-nav-link {
    border-radius: 12px;
    margin: 2px 10px;
    width: auto;
    color: var(--ink-2);
    font-weight: 500;
}

.hearth-drawer .mud-nav-link:hover {
    background: var(--surface-2);
}

.hearth-drawer .mud-nav-link.active {
    background: var(--primary-soft);
    color: var(--primary);
    font-weight: 600;
}

.hearth-drawer .mud-nav-link.active .mud-nav-link-icon {
    color: var(--primary);
}

.mud-main-content {
    background: var(--bg);
}

.hearth-console-main {
    max-width: 1400px;
    margin: 0 auto;
}

.hearth-console-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.hearth-console-title {
    font-weight: 700;
    font-size: 16px;
    letter-spacing: -0.02em;
    color: var(--ink);
}

.hearth-console-sub {
    font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
    font-weight: 500;
    font-size: 10.5px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--ink-3);
}

/* ---------- Surfaces ---------- */
.mud-card {
    border-radius: 18px;
}

.mud-card,
.mud-table.mud-paper,
.mud-paper.mud-paper-outlined {
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.mud-table-head .mud-table-cell {
    font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 10.5px;
    font-weight: 500;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--ink-3);
}

.mud-table-row:hover {
    background: var(--surface-2);
}

.mud-chip {
    font-weight: 600;
}

.mud-button-filled.mud-button-filled-primary {
    box-shadow: 0 6px 18px -8px var(--mud-palette-primary);
}

/* ---------- Sign-in ---------- */
.hearth-auth {
    min-height: 100vh;
    background: var(--bg);
    position: relative;
    overflow: hidden;
}

.hearth-auth::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 420px;
    background: radial-gradient(ellipse at 20% 0%, var(--primary-soft), transparent 60%);
    pointer-events: none;
}

.hearth-auth > * {
    position: relative;
}

.mud-card.hearth-auth-card {
    border-radius: 20px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.hearth-auth-mark {
    display: flex;
    justify-content: center;
    margin-bottom: 12px;
}

/* ---------- Loading screen ---------- */
.hearth-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    height: 100vh;
    background: var(--bg);
    color: var(--ink-2);
}

.hearth-loading-mark {
    animation: hearth-breathe 2.4s ease-in-out infinite;
}

.hearth-loading-title {
    font-family: 'Newsreader', Georgia, serif;
    font-size: 26px;
    color: var(--ink);
    letter-spacing: -0.01em;
}

.hearth-loading-bar {
    width: 160px;
    height: 4px;
    border-radius: 999px;
    background: var(--chip-muted);
    overflow: hidden;
}

.hearth-loading-bar span {
    display: block;
    height: 100%;
    width: var(--blazor-load-percentage, 0%);
    background: var(--primary);
    border-radius: inherit;
    transition: width .1s ease-out;
}

.hearth-loading-text {
    font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 11.5px;
    font-weight: 500;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--ink-3);
}

.hearth-loading-text::after {
    content: var(--blazor-load-percentage-text, "");
    margin-left: 6px;
}

/* ---------- Errors ---------- */
#blazor-error-ui {
    background: var(--surface);
    color: var(--ink);
    border-top: 1px solid var(--border);
    border-left: 3px solid var(--danger);
    box-shadow: var(--shadow);
    font-size: 13.5px;
    bottom: 0;
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .reload {
    color: var(--primary);
    font-weight: 600;
    margin-left: 8px;
}

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

.blazor-error-boundary {
    background: var(--danger-soft);
    color: var(--danger);
    border: 1px solid color-mix(in oklab, var(--danger), transparent 70%);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    font-weight: 600;
}

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