/*
 * Management application base styles.
 *
 * Every value resolves through a design token custom property. A raw hex or px here
 * fails the ship gate (contract item 11, gate stage 4).
 */

@import url('css/tokens.css');

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

html,
body {
    margin: 0;
    padding: 0;
    font-family: var(--font-family-sans);
    font-size: var(--font-size-md);
    line-height: var(--font-lineHeight-normal);
    color: var(--semantic-text);
    background-color: var(--semantic-surface-sunken);
}

h1, h2, h3, h4 {
    margin: 0 0 var(--space-3) 0;
    line-height: var(--font-lineHeight-tight);
    font-weight: var(--font-weight-semibold);
    color: var(--semantic-text);
}

h1 { font-size: var(--font-size-2xl); }
h2 { font-size: var(--font-size-xl); }
h3 { font-size: var(--font-size-lg); }

p {
    margin: 0 0 var(--space-4) 0;
}

a {
    color: var(--semantic-primary);
    text-decoration: none;
}

a:hover {
    color: var(--semantic-primary-hover);
    text-decoration: underline;
}

:focus-visible {
    outline: 2px solid var(--semantic-focus-ring);
    outline-offset: 2px;
}

.card {
    background-color: var(--semantic-surface-raised);
    border: 1px solid var(--semantic-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: var(--space-5);
    margin-bottom: var(--space-5);
}

.muted {
    color: var(--semantic-text-muted);
    font-size: var(--font-size-sm);
}

.badge {
    display: inline-block;
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-pill);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-medium);
    background-color: var(--semantic-primary-subtle);
    color: var(--semantic-primary-active);
}

.stack > * + * {
    margin-top: var(--space-4);
}

/* Blazor's built-in error surface, restyled away from the template defaults. */
#blazor-error-ui {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: none;
    z-index: var(--z-toast);
    padding: var(--space-4) var(--space-5);
    background-color: var(--semantic-danger-subtle);
    color: var(--semantic-danger);
    box-shadow: var(--shadow-lg);
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    float: right;
    font-weight: var(--font-weight-bold);
}

.blazor-error-boundary {
    padding: var(--space-4);
    border-radius: var(--radius-md);
    background-color: var(--semantic-danger-subtle);
    color: var(--semantic-danger);
}

.validation-message {
    color: var(--semantic-danger);
    font-size: var(--font-size-sm);
}
