/* === Global app styles === */

h1:focus { outline: none; }

.validation-message {
    color: #b00020;
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.invalid {
    outline: 1px solid #b00020;
}

.blazor-error-boundary {
    background: #b32121;
    color: #fff;
    padding: 1rem;
}

/* --- Blazor error UI (hidden by default) --- */
#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    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;
}

/* --- Buttons (admin) --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.55rem 0.9rem;
    border: 1px solid transparent;
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    line-height: 1.2;
    transition: background 0.1s, color 0.1s, border-color 0.1s;
    background: transparent;
    color: inherit;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn--primary {
    background: #4c6fff;
    color: #fff;
    border-color: #4c6fff;
}

.btn--primary:hover:not(:disabled) {
    background: #3a5ce5;
    border-color: #3a5ce5;
}

.btn--ghost {
    background: transparent;
    color: #1f2430;
    border-color: #d4d8e0;
}

.btn--ghost:hover:not(:disabled) {
    background: #f0f1f4;
}

.btn--danger {
    background: #fff;
    color: #b00020;
    border-color: #f3c2c8;
}

.btn--danger:hover:not(:disabled) {
    background: #fde7e9;
    border-color: #b00020;
}

.btn--sm {
    padding: 0.35rem 0.7rem;
    font-size: 0.85rem;
}

/* --- Form-level inline error banner --- */
.form-error {
    background: #fde7e9;
    color: #b00020;
    border: 1px solid #f3c2c8;
    padding: 0.55rem 0.85rem;
    border-radius: 6px;
    font-size: 0.95rem;
}

.form-warning {
    background: #fff8e1;
    color: #8a6500;
    border: 1px solid #f0deb0;
    padding: 0.55rem 0.85rem;
    border-radius: 6px;
    font-size: 0.95rem;
}

/* --- Form fields (global) --- */
.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.95rem;
}

.form-field label {
    font-weight: 500;
    color: #374151;
}

.form-field input,
.form-field textarea,
.form-field select {
    padding: 0.6rem 0.75rem;
    border: 1px solid #d4d8e0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    background: #f9fafb;
    color: #1f2430;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
    width: 100%;
    box-sizing: border-box;
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
    outline: none;
    border-color: #4c6fff;
    box-shadow: 0 0 0 3px rgba(76, 111, 255, 0.15);
    background: #fff;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
    color: #9ca3af;
}

.form-field input[type="file"] {
    padding: 0.5rem 0;
    background: transparent;
    border-color: transparent;
}

.form-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eef0f4;
}