:root {
    --surface: #fffdf8;
    --border: #e8ddce;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

img,
svg,
video {
    max-width: 100%;
}

.content.px-4 {
    width: 100%;
    padding-left: 0 !important;
    padding-right: 0 !important;
}


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

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#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;
    }

.blazor-error-boundary {
    display: none;
}

.app-loading {
    min-height: 100vh;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 1rem;
    background:
        radial-gradient(circle at 50% 38%, rgba(20, 84, 63, 0.14), transparent 34rem),
        linear-gradient(180deg, #fffdf8 0%, #fbf6ed 100%);
    color: #073b2c;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.app-loading__mark {
    width: 6.75rem;
    height: 6.75rem;
    position: relative;
    display: grid;
    place-items: center;
}

.app-loading__mark img {
    width: 5rem;
    height: 5rem;
    padding: 0.45rem;
    object-fit: contain;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 1rem 2.5rem rgba(31, 44, 34, 0.18);
}

.app-loading__orbit {
    position: absolute;
    inset: 0;
    border: 2px solid rgba(20, 84, 63, 0.18);
    border-top-color: #14543f;
    border-radius: 50%;
    animation: feast-loading-spin 1.15s linear infinite;
}

.app-loading__brand {
    font-size: 1rem;
    font-weight: 700;
}

.app-loading__bar {
    width: min(14rem, 58vw);
    height: 0.25rem;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(20, 84, 63, 0.14);
}

.app-loading__bar span {
    display: block;
    width: 45%;
    height: 100%;
    border-radius: inherit;
    background: #14543f;
    animation: feast-loading-bar 1.25s ease-in-out infinite;
}

@keyframes feast-loading-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes feast-loading-bar {
    0% {
        transform: translateX(-110%);
    }

    100% {
        transform: translateX(235%);
    }
}

code {
    color: #c02d76;
}

.account-page {
    max-width: 1140px;
    margin: 0 auto;
    padding: clamp(18px, 2.6vw, 28px) var(--el-spacing-lg) clamp(28px, 4vw, 48px);
}

.account-panel {
    max-width: 820px;
    margin: 0 auto;
    border: 1px solid rgba(var(--el-color-primary-rgb), 0.2);
    border-radius: 18px;
    box-shadow: 0 8px 28px rgba(23, 25, 35, 0.06);
    padding: clamp(18px, 2vw, 24px);
    background: linear-gradient(145deg, rgba(var(--el-color-primary-rgb), 0.06), rgba(var(--el-color-primary-rgb), 0.015));
}

.account-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 22px;
}

.account-icon {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #a44900;
    background: #fff4e6;
    border: 1px solid #ffd8a8;
    flex: 0 0 auto;
}

.account-header h1 {
    margin: 0 0 8px;
    font-family: var(--el-font-family-heading);
    color: var(--el-color-text-primary);
}

.account-header p,
.account-muted,
.account-note {
    color: var(--el-color-text-secondary);
}

.account-header p {
    margin: 0;
    line-height: 1.5;
}

.account-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.account-grid label,
.account-stack label {
    display: grid;
    gap: 6px;
}

.account-grid span,
.account-stack span {
    color: var(--el-color-text-secondary);
    font-size: 0.9rem;
}

.account-grid-wide {
    grid-column: 1 / -1;
}

.account-grid .form-control,
.account-stack .form-control {
    min-height: 42px;
    border-radius: 10px;
    border-color: var(--el-color-border);
    background: var(--el-color-surface, #fff);
    color: var(--el-color-text-primary);
}

.account-grid .form-control:focus,
.account-stack .form-control:focus {
    border-color: var(--el-color-primary);
    box-shadow: 0 0 0 0.2rem rgba(var(--el-color-primary-rgb), 0.12);
}

.account-stack {
    display: grid;
    gap: 16px;
}

.account-stack .account-check {
    display: flex;
    align-items: center;
    gap: 8px;
}

.account-stack .account-check span {
    color: var(--el-color-text-primary);
}

.account-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.account-link {
    border: 0;
    background: transparent;
    padding: 0;
    color: var(--el-color-primary);
    cursor: pointer;
    font-weight: 700;
    font: inherit;
    text-decoration: none;
}

.account-link:hover {
    text-decoration: underline;
}

.account-result {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    border: 1px solid rgba(47, 125, 50, 0.22);
    border-radius: 12px;
    padding: 14px;
    background: rgba(47, 125, 50, 0.06);
}

.account-result-icon {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eaf6eb;
    color: #2f7d32;
    flex: 0 0 auto;
}

.account-result h2 {
    margin: 0 0 6px;
    font-size: 1.12rem;
    color: var(--el-color-text-primary);
}

.account-result p {
    margin: 0;
    color: var(--el-color-text-secondary);
    line-height: 1.45;
}

.account-google-button {
    width: 100%;
    min-height: 44px;
    margin-top: 18px;
    border: 1px solid #dadce0;
    border-radius: 4px;
    background: #fff;
    color: #3c4043;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-family: "Roboto", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.account-google-button:hover {
    background: #f8fafd;
    border-color: #d2e3fc;
    color: #202124;
    box-shadow: 0 1px 2px rgba(60, 64, 67, 0.18);
    text-decoration: none;
}

.account-google-mark {
    width: 18px;
    height: 18px;
    display: block;
    flex: 0 0 auto;
}

.account-note {
    margin: 18px 0 0;
    border: 1px solid rgba(var(--el-color-primary-rgb), 0.18);
    border-radius: 10px;
    padding: 10px 12px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    background: rgba(var(--el-color-primary-rgb), 0.035);
    line-height: 1.45;
}

.account-status {
    color: var(--el-color-text-secondary);
}

.account-status.success {
    color: #2f7d32;
}

.account-status.error {
    color: #b42318;
}

.account-step-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 18px;
}

.account-step-tab {
    min-height: 44px;
    border: 1px solid rgba(var(--el-color-primary-rgb), 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.7);
    color: var(--el-color-text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 700;
}

.account-step-tab.active {
    border-color: var(--el-color-primary);
    background: rgba(var(--el-color-primary-rgb), 0.1);
    color: var(--el-color-text-primary);
}

.account-code-input {
    font-variant-numeric: tabular-nums;
}

.account-list {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.account-list-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid rgba(var(--el-color-primary-rgb), 0.14);
    border-radius: 10px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.68);
}

.account-authenticator-setup {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    margin-top: 18px;
}

.account-qr-code {
    width: 184px;
    min-width: 184px;
    padding: 10px;
    border: 1px solid rgba(var(--el-color-primary-rgb), 0.18);
    border-radius: 8px;
    background: #fff;
}

.account-qr-code svg {
    display: block;
    width: 100%;
    height: auto;
}

.account-setup-copy {
    min-width: 0;
}

.account-setup-copy p {
    margin: 0;
    color: var(--el-color-text-secondary);
    line-height: 1.5;
}

.account-setup-copy .account-note {
    margin-top: 12px;
}

.account-code {
    display: block;
    overflow-wrap: anywhere;
    border: 1px solid rgba(var(--el-color-primary-rgb), 0.18);
    border-radius: 10px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--el-color-text-primary);
}

.account-recovery-codes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 12px;
}

.account-recovery-codes code {
    border: 1px solid rgba(var(--el-color-primary-rgb), 0.16);
    border-radius: 8px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.76);
    color: var(--el-color-text-primary);
}

@media (max-width: 640px) {
    .content.px-4 {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }

    .top-app-bar {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .nav-container {
        min-height: 58px !important;
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
        gap: 0.75rem !important;
    }

    .nav-brand img {
        height: 58px !important;
        margin-right: 0 !important;
    }

    .navbar-toggler {
        flex: 0 0 auto;
    }

    .account-page {
        padding-left: var(--el-spacing-md);
        padding-right: var(--el-spacing-md);
    }

    .account-panel {
        border-radius: 16px;
    }

    .account-grid,
    .account-step-tabs,
    .account-recovery-codes {
        grid-template-columns: 1fr;
    }

    .account-list-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .account-authenticator-setup {
        grid-template-columns: 1fr;
        justify-items: start;
    }

    .account-qr-code {
        width: min(184px, 100%);
        min-width: 0;
    }
}
