.ak-auth-header-account,
.ak-auth-header-account *,
.ak-auth-app,
.ak-auth-app *,
.ak-auth-modal,
.ak-auth-modal * {
    box-sizing: border-box;
}

.ak-auth-header-account {
    align-items: center;
    display: inline-flex;
    flex: 0 0 auto;
    height: 38px;
    justify-content: center;
    min-width: 38px;
    position: relative;
}

html.ak-auth-known-user:not(.ak-auth-hydrated) .ak-auth-header-account {
    min-width: 38px;
    width: 38px;
}

html:not(.ak-auth-hydrated) .ak-auth-header-account {
    min-width: 38px;
    width: 38px;
}

html.ak-auth-known-user:not(.ak-auth-hydrated) .ak-auth-header-account > * {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

html:not(.ak-auth-hydrated) .ak-auth-header-account > * {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

html.ak-auth-known-user:not(.ak-auth-hydrated) .ak-auth-header-account::before {
    background: #eef0f6;
    border-radius: 999px;
    content: "";
    height: 38px;
    inset: 0;
    position: absolute;
    width: 38px;
}

html:not(.ak-auth-hydrated) .ak-auth-header-account::before {
    background: #eef0f6;
    border-radius: 999px;
    content: "";
    height: 38px;
    inset: 0;
    position: absolute;
    width: 38px;
}

.ak-auth-header-login {
    align-items: center;
    background: #4f47e6;
    border: 0;
    border-radius: 999px;
    box-shadow: 0 8px 18px rgba(79, 71, 230, 0.12);
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    font-size: 14px;
    font-weight: 700;
    height: 38px;
    justify-content: center;
    line-height: 1;
    min-width: 92px;
    padding: 0 18px;
    transition: background-color 0.16s ease, transform 0.16s ease, opacity 0.16s ease;
    white-space: nowrap;
}

.ak-auth-header-login:hover,
.ak-auth-header-login:focus {
    background: #3e38b1;
    color: #fff;
    opacity: 1;
    outline: none;
    text-decoration: none;
}

.ak-auth-header-login:active {
    transform: scale(0.96);
}

.ak-auth-header-login-icon {
    font-size: 16px;
    line-height: 1;
}

.ak-auth-header-avatar {
    align-items: center;
    background: transparent;
    border-radius: 999px;
    box-shadow: none;
    color: #fff;
    display: inline-flex;
    height: 38px;
    justify-content: center;
    overflow: hidden;
    text-decoration: none;
    transition: opacity 0.16s ease, transform 0.16s ease;
    width: 38px;
}

.ak-auth-header-avatar img {
    border: 0;
    border-radius: 999px;
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.ak-auth-header-avatar span {
    align-items: center;
    background: #4f47e6;
    border: 0;
    border-radius: 999px;
    display: inline-flex;
    font-size: 13px;
    font-weight: 900;
    height: 100%;
    justify-content: center;
    line-height: 1;
    width: 100%;
}

.ak-auth-header-avatar:hover,
.ak-auth-header-avatar:focus {
    color: #fff;
    opacity: 0.84;
    outline: none;
    text-decoration: none;
}

.ak-auth-app {
    background: #f0f1f4;
    color: #191919;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.ak-auth-modal[hidden],
.ak-auth-view[hidden],
.ak-auth-alert[hidden] {
    display: none !important;
}

.ak-auth-modal {
    align-items: center;
    display: flex;
    inset: 0;
    justify-content: center;
    padding: 16px;
    position: fixed;
    z-index: 100000;
}

.ak-auth-backdrop {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    inset: 0;
    opacity: 0;
    position: absolute;
    transition: opacity 0.18s ease;
}

.ak-auth-modal.is-open .ak-auth-backdrop {
    opacity: 1;
}

.ak-auth-modal-frame {
    max-width: 480px;
    opacity: 0;
    position: relative;
    transform: translateY(20px) scale(0.95);
    transition: transform 0.18s ease, opacity 0.18s ease;
    width: 100%;
}

.ak-auth-modal.is-open .ak-auth-modal-frame {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.ak-auth-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 25px 50px rgba(15, 23, 42, 0.22);
    color: #0f172a;
    max-width: 480px;
    overflow: hidden;
    position: relative;
    width: 100%;
}

.ak-auth-card-page {
    box-shadow: 0 24px 60px rgba(79, 71, 230, 0.12);
}

.ak-auth-card-body {
    padding: 40px;
}

.ak-auth-close {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 999px;
    color: #94a3b8;
    cursor: pointer;
    display: inline-flex;
    height: 32px;
    justify-content: center;
    padding: 0;
    position: absolute;
    right: 16px;
    top: 16px;
    transition: background-color 0.16s ease, color 0.16s ease;
    width: 32px;
    z-index: 2;
}

.ak-auth-close:hover,
.ak-auth-close:focus {
    background: #f1f5f9;
    color: #475569;
    outline: none;
}

.ak-auth-close-icon {
    font-size: 20px;
    line-height: 1;
}

.ak-auth-card[data-current-view="login"] .ak-auth-view-register,
.ak-auth-card[data-current-view="login"] .ak-auth-view-forgot,
.ak-auth-card[data-current-view="register"] .ak-auth-view-login,
.ak-auth-card[data-current-view="register"] .ak-auth-view-forgot,
.ak-auth-card[data-current-view="forgot"] .ak-auth-view-login,
.ak-auth-card[data-current-view="forgot"] .ak-auth-view-register {
    display: none;
}

.ak-auth-heading {
    margin-bottom: 32px;
}

.ak-auth-heading h2,
.ak-auth-heading .ak-auth-title {
    color: #0f172a;
    display: block;
    font-size: 24px;
    font-weight: 900;
    line-height: 1.2;
    margin: 0;
}

.ak-auth-heading p {
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.6;
    margin: 6px 0 0;
}

.ak-auth-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.ak-auth-field {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ak-auth-field label,
.ak-auth-label-row label {
    color: #475569;
    display: block;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.1em;
    line-height: 1.2;
    margin: 0 0 0 2px;
    text-transform: uppercase;
}

.ak-auth-label-row {
    align-items: center;
    display: flex;
    justify-content: space-between;
}

.ak-auth-input-wrap {
    position: relative;
}

.ak-auth-input-icon {
    align-items: center;
    color: #475569;
    display: flex;
    height: 100%;
    left: 16px;
    pointer-events: none;
    position: absolute;
    top: 0;
}

.ak-auth-input-icon i {
    font-size: 16px;
    line-height: 1;
}

.ak-auth-field input {
    appearance: none;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    color: #0f172a;
    font-size: 16px;
    font-weight: 500;
    height: 56px;
    line-height: 1.2;
    outline: none;
    padding: 0 16px;
    transition: background-color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
    width: 100%;
}

.ak-auth-input-wrap input {
    padding-left: 44px;
}

.ak-auth-field input:focus {
    background: #fff;
    border-color: #4f47e6;
    box-shadow: 0 0 0 3px rgba(79, 71, 230, 0.1);
}

.ak-auth-alert {
    align-items: center;
    background: #fff1f2;
    border: 1px solid #ffe4e6;
    border-radius: 8px;
    color: #f43f5e;
    display: flex;
    font-size: 12px;
    font-weight: 700;
    gap: 8px;
    line-height: 1.5;
    padding: 12px;
}

.ak-auth-alert:before {
    background: #f43f5e;
    border-radius: 999px;
    content: "";
    display: block;
    flex: 0 0 auto;
    height: 4px;
    width: 4px;
}

.ak-auth-alert.is-success {
    background: #ecfdf5;
    border-color: #bbf7d0;
    color: #047857;
}

.ak-auth-alert.is-success:before {
    background: #10b981;
}

.ak-auth-primary-btn {
    align-items: center;
    background: #4f47e6;
    border: 0;
    border-radius: 12px;
    box-shadow: 0 14px 28px rgba(79, 71, 230, 0.16);
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    font-size: 14px;
    font-weight: 700;
    gap: 8px;
    height: 48px;
    justify-content: center;
    line-height: 1;
    padding: 0 18px;
    transition: background-color 0.16s ease, transform 0.16s ease, opacity 0.16s ease;
    width: 100%;
}

.ak-auth-primary-btn:hover,
.ak-auth-primary-btn:focus {
    background: #3e38b1;
    color: #fff;
    outline: none;
}

.ak-auth-primary-btn:active {
    transform: translateY(1px);
}

.ak-auth-primary-btn.is-loading {
    opacity: 0.82;
    pointer-events: none;
}

.ak-auth-btn-icon,
.ak-auth-spinner {
    font-size: 16px;
    line-height: 1;
}

.ak-auth-spinner {
    animation: ak-auth-spin 0.75s linear infinite;
    display: none;
}

.ak-auth-primary-btn.is-loading .ak-auth-btn-icon {
    display: none;
}

.ak-auth-primary-btn.is-loading .ak-auth-spinner {
    display: inline-flex;
}

.ak-auth-switch-line {
    color: #64748b;
    font-size: 13px;
    line-height: 1.6;
    padding-top: 8px;
    text-align: center;
}

.ak-auth-switch-line button {
    background: transparent;
    border: 0;
    color: #4f47e6;
    cursor: pointer;
    font-size: 13px;
    font-weight: 900;
    margin-left: 4px;
    padding: 0;
}

.ak-auth-switch-line button:hover,
.ak-auth-switch-line button:focus {
    outline: none;
    text-decoration: underline;
}

@keyframes ak-auth-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 767px) {
    .ak-auth-header-login {
        height: 38px;
        padding: 0 12px;
    }

    .ak-auth-card-body {
        padding: 32px 24px;
    }

    .ak-auth-heading {
        margin-bottom: 28px;
    }
}
