:root {
    --cv-primary: #1565C0;
    --cv-primary-dark: #0D47A1;
    --cv-radius: 10px;
    --cv-shadow: 0 1px 3px rgba(13, 40, 71, 0.08), 0 1px 2px rgba(13, 40, 71, 0.06);
    --cv-shadow-hover: 0 6px 16px rgba(13, 40, 71, 0.14);
}

html, body {
    font-family: Roboto, 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: var(--mud-palette-background, #F4F6F9);
}

.cv-brand-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    width: 38px;
    object-fit: contain;
}

.cv-brand-logo-lg {
    height: 52px;
    width: 52px;
}

.cv-drawer-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    width: 100%;
    color: inherit;
}

.cv-brand-home {
    display: inline-flex;
    align-items: center;
    color: inherit;
}

.cv-list-card {
    overflow: hidden;
}

.cv-list-table,
.cv-list-table .mud-table,
.cv-list-table .mud-table-container {
    border: 0 !important;
    box-shadow: none !important;
}

.cv-list-table .mud-table-container {
    border-radius: 0;
}

.cv-drawer .mud-drawer-content {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    min-height: 0;
    overflow-y: auto;
}

.cv-drawer .cv-nav {
    flex: 0 0 auto;
    margin-top: auto;
    width: 100%;
}

.cv-text-caption {
    opacity: 0.7;
}

.cv-appbar {
    border-bottom: 1px solid rgba(13, 40, 71, 0.08);
}

.cv-appbar-title {
    font-weight: 600;
    margin-left: 10px;
}

.cv-search-wrap {
    display: flex;
    align-items: center;
    margin-right: 12px;
}

.cv-search {
    width: 320px;
    max-width: 34vw;
}

.cv-global-search {
    width: 280px;
    max-width: 30vw;
    margin-right: 8px;
}

@media (max-width: 599px) {
    .cv-global-search {
        width: 140px;
    }
}

.cv-menu-actions {
    margin-left: 4px;
}

.cv-logout-form {
    display: block;
    margin: 0;
    padding: 0;
}

.cv-user-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 6px;
    border-radius: 999px;
    cursor: pointer;
}

.cv-user-chip-name {
    font-weight: 500;
    font-size: 0.9rem;
}

.cv-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cv-primary) 0%, var(--cv-primary-dark) 100%);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.cv-avatar-image {
    object-fit: cover;
}

.cv-hidden-xs {
    display: none;
}

@media (min-width: 600px) {
    .cv-hidden-xs {
        display: inline-flex;
    }
}

.cv-content-wrap {
    min-height: 100vh;
    background-color: var(--mud-palette-background, #F4F6F9);
}

.cv-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: var(--mud-palette-background, #F4F6F9);
}

.cv-page-container {
    flex: 1;
    padding-top: 24px;
    padding-bottom: 32px;
    width: 100%;
}

.cv-nav .cv-nav-link {
    border-radius: 8px;
    margin: 2px 10px;
}

.cv-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.cv-page-header-main {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 0;
}

.cv-page-header-icon {
    margin-top: 2px;
}

.cv-page-title {
    font-weight: 600;
}

.cv-page-subtitle {
    opacity: 0.75;
    margin-top: 2px;
}

.cv-page-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.cv-card {
    padding: 20px;
    border-radius: var(--cv-radius);
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.cv-card:hover {
    box-shadow: var(--cv-shadow-hover);
    transform: translateY(-2px);
}

.cv-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    margin-bottom: 4px;
}

.cv-card-icon-primary {
    background: rgba(21, 101, 192, 0.12);
    color: var(--cv-primary);
}

.cv-card-icon-secondary {
    background: rgba(0, 131, 143, 0.12);
    color: #00838F;
}

.cv-card-icon-accent {
    background: rgba(249, 168, 37, 0.15);
    color: #B98600;
}

.mud-theme-dark .cv-card-icon-primary {
    background: rgba(100, 181, 246, 0.15);
    color: #64B5F6;
}

.mud-theme-dark .cv-card-icon-secondary {
    background: rgba(77, 208, 225, 0.15);
    color: #4DD0E1;
}

.mud-theme-dark .cv-card-icon-accent {
    background: rgba(255, 213, 79, 0.15);
    color: #FFD54F;
}

.cv-card-cta {
    margin-top: auto;
    align-self: flex-start;
}

.cv-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 48px 16px;
    text-align: center;
    border: 1px dashed rgba(13, 40, 71, 0.18);
    border-radius: var(--cv-radius);
    background: rgba(255, 255, 255, 0.4);
}

.mud-theme-dark .cv-empty-state {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.02);
}

.cv-empty-icon {
    font-size: 48px !important;
    opacity: 0.85;
}

.cv-empty-description {
    max-width: 420px;
    opacity: 0.75;
}

.cv-empty-actions {
    margin-top: 8px;
}

.cv-state-page {
    display: flex;
    justify-content: center;
    padding: 48px 16px;
}

.cv-state-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 40px 48px;
    border-radius: var(--cv-radius);
    text-align: center;
    max-width: 480px;
}

.cv-auth-main {
    align-items: center;
    justify-content: center;
}

.cv-auth-container {
    width: 100%;
    padding-top: 40px;
    padding-bottom: 40px;
}

.cv-auth-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
}

.cv-auth-brand-title {
    font-weight: 600;
}

#blazor-error-ui {
    background: #B32121;
    color: #fff;
    bottom: 0;
    width: 100%;
    padding: 0.6rem 1rem;
    display: none;
    z-index: 10000;
}

#blazor-error-ui.show {
    display: block;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    margin-left: 12px;
    float: right;
}

#blazor-error-ui a {
    color: #FFD54F;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.cv-auth-card {
    padding: 32px;
    border-radius: var(--cv-radius);
}

.cv-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.cv-label {
    font-size: 0.875rem;
    font-weight: 500;
}

.cv-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid rgba(0, 0, 0, 0.23);
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    background: transparent;
    color: inherit;
    box-sizing: border-box;
}

.cv-input:focus {
    outline: 2px solid var(--cv-primary);
    border-color: var(--cv-primary);
}

.cv-validation {
    color: #e50000;
    font-size: 0.75rem;
}

.cv-submit {
    width: 100%;
    margin-top: 16px;
    padding: 10px 16px;
    border: none;
    border-radius: 4px;
    background: var(--cv-primary);
    color: #fff;
    font-size: 0.9375rem;
    font-weight: 500;
    font-family: inherit;
    letter-spacing: 0.02857em;
    text-transform: uppercase;
    cursor: pointer;
}

.cv-submit:hover {
    background: var(--cv-primary-dark);
}

.cv-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    cursor: pointer;
}

.cv-oauth-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cv-oauth-btn {
    flex: 1 1 140px;
}

.cv-state-page-auth {
    padding-top: 24px;
}
