html,
body {
    margin: 0;
    min-height: 100%;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    color: #172033;
    background: #ffffff;
}

body {
    min-height: 100vh;
}

#app,
.mud-layout,
.mud-main-content {
    background: #ffffff;
}

a {
    color: inherit;
}

h1:focus {
    outline: none;
}

.identity-login-page {
    min-height: 100vh;
    background: #08162f;
}

.identity-shell-drawer,
.identity-shell-drawer .mud-drawer-content,
.identity-shell-drawer.mud-drawer,
.identity-shell-drawer.mud-drawer .mud-paper {
    background:
        linear-gradient(180deg, rgba(6, 14, 32, 0.94), rgba(5, 12, 28, 0.98)),
        url("/img/background-lv.png") center center / cover no-repeat !important;
    color: #f5f8ff !important;
}

.identity-shell-appbar,
.identity-shell-appbar.mud-appbar,
.identity-shell-appbar .mud-toolbar-appbar,
.identity-shell-appbar .mud-toolbar {
    background: #ffffff !important;
    color: #1c2640 !important;
}

.identity-login-grid {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.08fr 1fr;
}

.identity-login-brand {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 3rem 3.25rem 2.25rem;
    color: #f6f8fc;
    background:
        linear-gradient(180deg, rgba(5, 14, 32, 0.82), rgba(5, 14, 32, 0.88)),
        url("/img/background-lv.png") center center / cover no-repeat;
}

.identity-brand-logo {
    width: min(320px, 78%);
    height: auto;
}

.identity-brand-copy {
    max-width: 41rem;
    margin-top: auto;
    margin-bottom: auto;
}

.identity-brand-copy h1 {
    margin: 0 0 1.75rem;
    font-size: clamp(2.6rem, 5vw, 4.3rem);
    line-height: 0.98;
    letter-spacing: -0.045em;
}

.identity-brand-line {
    display: block;
}

.identity-brand-highlight {
    margin-top: 0.5rem;
    color: #1f63ff;
}

.identity-brand-copy p {
    max-width: 35rem;
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.85;
    color: rgba(237, 242, 251, 0.82);
}

.identity-brand-pillars {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.identity-brand-pillar {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding-right: 1rem;
    color: rgba(242, 246, 255, 0.92);
}

.identity-brand-pillar:not(:last-child) {
    border-right: 1px solid rgba(136, 164, 228, 0.18);
}

.identity-brand-pillar .mud-icon-root {
    color: #1f63ff;
}

.identity-brand-pillar span {
    font-size: 0.98rem;
    line-height: 1.45;
}

.identity-brand-footer {
    margin-top: 2rem;
    color: rgba(225, 232, 247, 0.66);
    font-size: 0.92rem;
}

.identity-login-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1.5rem;
    padding: 2rem 2rem 1.5rem;
    background:
        radial-gradient(circle at top left, rgba(29, 99, 255, 0.08), transparent 22%),
        linear-gradient(180deg, #f7f9fc 0%, #eef2f7 100%);
}

.identity-login-card {
    width: min(100%, 630px);
    margin: 0 auto;
    padding: 2.8rem 3.8rem 3rem;
    border-radius: 28px;
    border: 1px solid rgba(18, 35, 71, 0.06);
    background: rgba(255, 255, 255, 0.96);
    box-shadow:
        0 24px 60px rgba(17, 35, 71, 0.08),
        0 2px 8px rgba(17, 35, 71, 0.04);
}

.identity-login-mark {
    display: block;
    width: 84px;
    height: auto;
    margin: 0 auto 1.75rem;
}

.identity-login-header {
    text-align: center;
    margin-bottom: 2.25rem;
}

.identity-login-header h2 {
    margin: 0;
    font-size: clamp(2.2rem, 3.4vw, 3rem);
    letter-spacing: -0.04em;
    color: #11203b;
}

.identity-login-header p {
    margin: 0.9rem 0 0;
    color: #61708f;
    font-size: 1rem;
}

.identity-login-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.identity-field-block {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.identity-field-label {
    font-size: 1rem;
    font-weight: 700;
    color: #17233d;
}

.identity-login-helpers {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 0.1rem;
}

.identity-login-button {
    margin-top: 0.65rem;
    min-height: 50px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    box-shadow: none;
}

.identity-login-alert {
    margin-bottom: 1rem;
}

.identity-login-progress {
    margin-right: 0.65rem;
}

.identity-login-divider {
    height: 1px;
    margin: 2.2rem 0 1.9rem;
    background: linear-gradient(90deg, transparent, rgba(17, 35, 71, 0.14), transparent);
}

.identity-activation-card {
    width: min(100%, 700px);
}

.identity-activation-alert {
    margin-top: 0.35rem;
}

.identity-activation-details {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-top: 0.85rem;
}

.identity-activation-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
    margin-top: 0.25rem;
}

.identity-activation-footer-copy {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.identity-reset-card {
    width: min(100%, 720px);
}

.identity-mfa-card {
    width: min(100%, 720px);
}

.identity-reset-mode-switch {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
    margin-bottom: 1.3rem;
}

.identity-reset-alert {
    margin-top: 0.35rem;
}

.identity-reset-token-preview {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    padding: 1rem 1.1rem;
    border-radius: 16px;
    border-color: rgba(31, 99, 255, 0.24);
    background: rgba(31, 99, 255, 0.05);
}

.identity-reset-token-copy {
    color: #5f6f8d;
}

.identity-reset-token-value {
    padding: 0.85rem 1rem;
    border-radius: 12px;
    background: rgba(8, 22, 47, 0.92);
    color: #f7fbff;
    font-family: "Consolas", "Courier New", monospace;
    font-size: 0.94rem;
    line-height: 1.5;
    word-break: break-all;
}

.identity-login-contact {
    margin: 0;
    text-align: center;
    color: #1c2944;
    font-size: 1rem;
}

.identity-login-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    color: rgba(228, 233, 243, 0.88);
    font-size: 0.95rem;
}

.identity-footer-separator {
    color: rgba(228, 233, 243, 0.45);
}

.identity-dashboard-header {
    margin-bottom: 1.8rem;
}

.identity-dashboard-subtitle {
    margin-top: 0.45rem;
    color: #66748f;
    font-weight: 400;
}

.identity-metric-card,
.identity-panel,
.identity-placeholder {
    border: 1px solid rgba(17, 35, 71, 0.06);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 18px 48px rgba(17, 35, 71, 0.06);
}

.identity-metric-card {
    padding: 1.25rem 1.2rem;
}

.identity-metric-top,
.identity-metric-bottom {
    display: flex;
    align-items: center;
}

.identity-metric-top {
    gap: 0.9rem;
}

.identity-metric-bottom {
    gap: 0.9rem;
    margin-top: 1.2rem;
}

.identity-metric-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
}

.identity-metric-blue {
    color: #2f61ff;
    background: rgba(47, 97, 255, 0.1);
}

.identity-metric-green {
    color: #1aa357;
    background: rgba(26, 163, 87, 0.1);
}

.identity-metric-purple {
    color: #7a43ff;
    background: rgba(122, 67, 255, 0.1);
}

.identity-metric-amber {
    color: #d08a12;
    background: rgba(208, 138, 18, 0.12);
}

.identity-metric-cyan {
    color: #1294c8;
    background: rgba(18, 148, 200, 0.1);
}

.identity-metric-trend {
    color: #18a957;
    font-weight: 700;
}

.identity-metric-caption {
    margin-top: 0.55rem;
    color: #76839e;
}

.identity-panel {
    padding: 1.4rem 1.3rem;
}

.identity-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.identity-panel-link {
    display: inline-block;
    margin-top: 1.1rem;
}

.identity-activity-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.identity-activity-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.9rem;
    align-items: start;
}

.identity-activity-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 999px;
}

.identity-activity-green {
    color: #1aa357;
    background: rgba(26, 163, 87, 0.1);
}

.identity-activity-blue {
    color: #2f61ff;
    background: rgba(47, 97, 255, 0.1);
}

.identity-activity-purple {
    color: #7a43ff;
    background: rgba(122, 67, 255, 0.1);
}

.identity-activity-emerald {
    color: #17a96a;
    background: rgba(23, 169, 106, 0.1);
}

.identity-activity-amber {
    color: #d08a12;
    background: rgba(208, 138, 18, 0.12);
}

.identity-activity-copy {
    min-width: 0;
}

.identity-activity-copy .mud-typography:last-child,
.identity-activity-time,
.identity-status-card .mud-typography:last-child {
    color: #6f7d99;
}

.identity-chart {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.identity-chart-svg {
    width: 100%;
    height: 260px;
}

.identity-chart-grid line {
    stroke: rgba(17, 35, 71, 0.08);
    stroke-width: 1;
}

.identity-chart-line {
    fill: none;
    stroke: #1f63ff;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.identity-chart-points circle {
    fill: #1f63ff;
    stroke: #ffffff;
    stroke-width: 3;
}

.identity-chart-labels {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.25rem;
    color: #6f7d99;
    font-size: 0.88rem;
}

.identity-range-select {
    min-width: 160px;
}

.identity-status-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.7rem 0;
}

.identity-status-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    color: #1aa357;
    background: rgba(26, 163, 87, 0.1);
}

.identity-usage-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.identity-usage-item {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) auto;
    gap: 0.9rem;
    align-items: center;
}

.identity-usage-title {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    min-width: 0;
}

.identity-usage-icon {
    color: #2f61ff;
}

.identity-usage-bar {
    position: relative;
    height: 6px;
    border-radius: 999px;
    background: rgba(17, 35, 71, 0.08);
    overflow: hidden;
}

.identity-usage-fill {
    position: absolute;
    inset: 0 auto 0 0;
    border-radius: inherit;
    background: linear-gradient(90deg, #1f63ff, #2f7cff);
}

.identity-usage-value {
    color: #5c6c89;
    font-size: 0.95rem;
    white-space: nowrap;
}

.identity-placeholder {
    padding: 2rem;
}

.identity-placeholder-subtitle {
    margin-top: 0.5rem;
    color: #66748f;
    font-weight: 400;
}

.identity-placeholder-copy {
    max-width: 64ch;
    line-height: 1.8;
    color: #485874;
}

.cors-origins-page {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.cors-origins-breadcrumb,
.cors-origins-origin-cell,
.cors-origins-stat-copy,
.cors-origins-footer,
.cors-origins-pagination {
    display: flex;
    align-items: center;
}

.cors-origins-breadcrumb {
    gap: 0.45rem;
    color: #6b7a95;
    font-size: 0.95rem;
}

.cors-origins-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.cors-origins-subtitle,
.cors-origins-muted,
.cors-origins-dialog-subtitle {
    color: #66748f;
}

.cors-origins-surface {
    padding: 1.4rem;
    border-radius: 24px;
    background: #ffffff;
    border: 1px solid rgba(17, 35, 71, 0.08);
}

.cors-origins-toolbar {
    display: grid;
    grid-template-columns: minmax(280px, 1.5fr) repeat(3, minmax(180px, 0.8fr)) auto;
    gap: 0.85rem;
    align-items: center;
    margin-bottom: 1rem;
}

.cors-origins-search,
.cors-origins-filter,
.cors-origins-page-size {
    width: 100%;
}

.cors-origins-loading,
.cors-origins-empty {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 220px;
    text-align: center;
}

.cors-origins-grid {
    border-radius: 18px;
    overflow: hidden;
}

.cors-origins-primary-cell {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.cors-origins-origin-cell {
    gap: 0.5rem;
    color: #21314f;
    min-width: 0;
}

.cors-origins-origin-cell .mud-typography {
    overflow-wrap: anywhere;
}

.cors-origins-footer {
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1rem;
}

.cors-origins-pagination {
    gap: 0.85rem;
}

.cors-origins-dialog {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cors-origins-dialog-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cors-origins-dialog-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

#blazor-error-ui {
    color-scheme: light only;
    background: #fef3c7;
    border-top: 1px solid #f59e0b;
    bottom: 0;
    box-shadow: 0 -1px 6px rgba(15, 23, 42, 0.18);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.8rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1400;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.loading-progress {
    position: absolute;
    display: block;
    width: 8rem;
    height: 8rem;
    inset: 20vh 0 auto;
    margin: 0 auto;
}

.loading-progress circle {
    fill: none;
    stroke: #dbe3f0;
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    stroke: #1976d2;
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}

.loading-progress-text {
    position: absolute;
    text-align: center;
    color: #40506d;
    font-weight: 600;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

.loading-progress-text:after {
    content: var(--blazor-load-percentage-text, "Loading");
}

@media (max-width: 1199.98px) {
    .identity-login-grid {
        grid-template-columns: 1fr;
    }

    .identity-login-brand {
        min-height: 42vh;
        gap: 2rem;
    }

    .identity-brand-pillars {
        grid-template-columns: 1fr;
    }

    .identity-brand-pillar:not(:last-child) {
        border-right: 0;
    }
}

@media (max-width: 767.98px) {
    .identity-login-brand,
    .identity-login-panel {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    .identity-login-card {
        padding: 2rem 1.35rem 2.2rem;
        border-radius: 24px;
    }

    .identity-login-helpers,
    .identity-login-footer {
        flex-direction: column;
    }

    .identity-activation-actions {
        grid-template-columns: 1fr;
    }

    .cors-origins-header,
    .cors-origins-footer,
    .cors-origins-pagination {
        flex-direction: column;
        align-items: stretch;
    }

    .cors-origins-toolbar,
    .cors-origins-dialog-grid {
        grid-template-columns: 1fr;
    }

    .identity-reset-mode-switch {
        grid-template-columns: 1fr;
    }

    .identity-login-helpers {
        align-items: flex-start;
    }

    .identity-footer-separator {
        display: none;
    }

    .identity-activity-item,
    .identity-usage-item {
        grid-template-columns: 1fr;
    }

    .identity-chart-labels {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .identity-range-select {
        width: 100%;
    }
}
