html, body {
    height: 100%;
    -webkit-font-smoothing: antialiased;
}

::selection {
    background: rgba(59, 130, 246, 0.25);
}

/* Focus rings */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Reusable component classes */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: linear-gradient(90deg, #2563eb 0%, #06b6d4 100%);
    color: white;
    font-weight: 600;
    border-radius: 0.5rem;
    transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
    border: none;
    cursor: pointer;
}
.btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(59, 130, 246, 0.28);
}
.btn-primary:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: white;
    color: #334155;
    font-weight: 600;
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
    transition: border-color .15s ease, background .15s ease;
    cursor: pointer;
}
.btn-secondary:hover:not(:disabled) {
    border-color: #94a3b8;
    background: #f8fafc;
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.9rem;
    color: #475569;
    font-weight: 500;
    border-radius: 0.5rem;
    transition: background .15s ease, color .15s ease;
    cursor: pointer;
}
.btn-ghost:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.input {
    display: block;
    width: 100%;
    padding: 0.6rem 0.85rem;
    background: white;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    font-size: 0.95rem;
    color: #0f172a;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.35rem;
}

.card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 0.9rem;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.chip {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 500;
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #dbeafe;
}

.gradient-text {
    background: linear-gradient(90deg, #2563eb 0%, #06b6d4 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.field-error {
    color: #dc2626;
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

.validation-message {
    color: #dc2626;
    font-size: 0.8rem;
}

.blazor-error-boundary {
    background: #dc2626;
    padding: 1rem 1.5rem;
    color: white;
    border-radius: 0.5rem;
}
.blazor-error-boundary::after {
    content: "An error has occurred.";
}

#blazor-error-ui {
    background: #dc2626;
    color: white;
    bottom: 0;
    left: 0;
    padding: 0.75rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
    display: none;
}
#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}
