:root {
    --bs-body-font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --bs-body-bg: #f8fafc;
    --bs-body-color: #1e293b;
    --bs-primary: #2563eb;
    --bs-primary-rgb: 37, 99, 235;
    --bs-primary-hover: #1d4ed8;
    --bs-secondary-color: #64748b;
    --bs-border-color: #e2e8f0;
    --bs-border-radius: 0.5rem;
    --bs-border-radius-lg: 0.75rem;
    --bs-border-radius-xl: 1rem;
    --bs-card-border-color: #e2e8f0;
    --bs-card-cap-bg: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
}

html, body {
    font-family: var(--bs-body-font-family);
    background-color: var(--bs-body-bg);
    color: var(--bs-body-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 0.925rem;
    line-height: 1.5;
}

h1, h2, h3, h4, h5, h6, .navbar-brand {
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    letter-spacing: -0.02em;
    color: #0f172a;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Links & Typography */
a {
    color: #2563eb;
    text-decoration: none;
    transition: color 0.15s ease-in-out;
}
a:hover {
    color: #1d4ed8;
}

/* Cards & Surfaces */
.card {
    background-color: #ffffff;
    border: 1px solid var(--bs-border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
    box-shadow: var(--shadow-md);
}
.card-header {
    background-color: transparent;
    border-bottom: 1px solid var(--bs-border-color);
    padding: 1rem 1.25rem;
    font-weight: 600;
}

/* Buttons */
.btn {
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.45rem 0.95rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    transition: all 0.15s ease-in-out;
}
.btn-primary {
    background-color: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
    box-shadow: 0 1px 2px 0 rgba(37, 99, 235, 0.2);
}
.btn-primary:hover, .btn-primary:focus {
    background-color: #1d4ed8;
    border-color: #1d4ed8;
    box-shadow: 0 2px 4px 0 rgba(37, 99, 235, 0.3);
}
.btn-secondary {
    background-color: #f1f5f9;
    border-color: #e2e8f0;
    color: #334155;
}
.btn-secondary:hover {
    background-color: #e2e8f0;
    border-color: #cbd5e1;
    color: #0f172a;
}
.btn-outline-primary {
    border-color: #93c5fd;
    color: #2563eb;
    background-color: #eff6ff;
}
.btn-outline-primary:hover {
    background-color: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}

.btn:focus, .btn:active:focus, .form-control:focus, .form-select:focus {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* Form Controls */
.form-control, .form-select {
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    padding: 0.5rem 0.85rem;
    font-size: 0.875rem;
    color: #1e293b;
    background-color: #ffffff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-control:focus, .form-select:focus {
    border-color: #3b82f6;
    background-color: #ffffff;
}
.form-label {
    font-weight: 500;
    font-size: 0.825rem;
    color: #475569;
    margin-bottom: 0.35rem;
}

/* Tables */
.table {
    --bs-table-bg: transparent;
    --bs-table-border-color: #f1f5f9;
    font-size: 0.875rem;
}
.table thead th {
    background-color: #f8fafc;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    border-top: none;
}
.table tbody td {
    padding: 0.85rem 1rem;
    vertical-align: middle;
    color: #334155;
    border-bottom: 1px solid #f1f5f9;
}
.table-hover tbody tr:hover {
    background-color: #f8fafc;
}

/* Badges */
.badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
    border-radius: 6px;
    font-size: 0.75rem;
    letter-spacing: 0.02em;
}

/* Blazor validation & errors */
.valid.modified:not([type=checkbox]) {
    outline: 1px solid #22c55e;
}
.invalid {
    outline: 1px solid #ef4444;
}
.validation-message {
    color: #ef4444;
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

.blazor-error-boundary {
    background: #fef2f2;
    border-left: 4px solid #ef4444;
    padding: 1rem 1.25rem;
    color: #991b1b;
    border-radius: 8px;
    margin: 1rem 0;
}

#blazor-error-ui {
    background: #fffbeb;
    border-top: 1px solid #fef3c7;
    bottom: 0;
    box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.05);
    display: none;
    left: 0;
    padding: 0.75rem 1.5rem;
    position: fixed;
    width: 100%;
    z-index: 1050;
    color: #92400e;
    font-size: 0.875rem;
}
#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 1.25rem;
    top: 0.75rem;
    color: #78350f;
}