* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #732ED5;
    --title-font-color: #240D44;
    --font-default-color: #666666;
    --font-light-color: #A3A3A3;
    --input-text-color: #240D44;
    --input-border-color: #cccccc;
    --input-background-color: #ffffff;
    --page-background-color: #ffffff;
    --konfio-control-height: 52px;
    --konfio-content-width: 440px;
    --konfio-field-width: 380px;
    --konfio-primary-button-width: 320px;
    --button-border-radius: 9999px;
    --input-border-radius: 16px;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, Roboto, Helvetica, sans-serif;
    background-color: var(--page-background-color);
    color: var(--font-default-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 0;
}

.konfio-nav {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    max-width: 1920px;
    width: 100%;
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: var(--page-background-color);
    z-index: 10;
}

.konfio-logo {
    display: inline-flex;
    align-items: center;
}

.konfio-logo svg {
    display: block;
    height: 28px;
    width: 112px;
}

.konfio-register-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    line-height: 24px;
}

.konfio-register-link:hover {
    text-decoration: underline;
}

.konfio-main {
    width: 100%;
    max-width: var(--konfio-content-width);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 60px 16px 40px 16px;
}

.konfio-screen {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: center;
}

.konfio-screen.active {
    display: flex;
}

.konfio-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    width: 100%;
    margin-bottom: 28px;
}

.konfio-title {
    font-size: 30px;
    line-height: 34px;
    font-weight: 550;
    color: var(--title-font-color);
    text-align: center;
    margin: 0;
    position: relative;
    display: inline-block;
    letter-spacing: -1px;
    padding-top: 8px;
}

.konfio-title::before {
    content: "";
    position: absolute;
    top: -6px;
    left: -5px;
    width: calc(100% + 10px);
    height: 55%;
    background: #ffffff;
    z-index: 2;
    pointer-events: none;
}

#screen-password .konfio-title::before {
    height: 65%;
    top: -8px;
}

.konfio-subtitle {
    font-size: 19px;
    line-height: 26px;
    font-weight: 500;
    color: var(--font-default-color);
    text-align: center;
    margin: 16px 0 0 0;
}

.konfio-form {
    width: var(--konfio-field-width);
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 20px;
}

.konfio-input-wrapper {
    width: 100%;
    margin-bottom: 18px;
}

.konfio-input-wrapper input {
    width: 100%;
    height: var(--konfio-control-height);
    padding: 14px 18px;
    font-size: 17px;
    font-family: inherit;
    color: var(--input-text-color);
    background-color: var(--input-background-color);
    border: 1.5px solid var(--input-border-color);
    border-radius: var(--input-border-radius);
    outline: none;
    transition: border-color 0.2s ease;
}

.konfio-input-wrapper input::placeholder {
    color: var(--font-light-color);
}

.konfio-input-wrapper input:focus {
    border-color: var(--primary-color);
}

.konfio-forgot {
    display: block;
    color: var(--primary-color);
    font-size: 17px;
    font-weight: 500;
    text-decoration: none;
    margin-bottom: 32px;
    text-align: center;
}

.konfio-forgot:hover {
    text-decoration: underline;
}

.konfio-btn-primary {
    width: var(--konfio-primary-button-width);
    max-width: 100%;
    height: var(--konfio-control-height);
    padding: 14px 18px;
    font-size: 17px;
    font-family: inherit;
    font-weight: 500;
    color: #858585;
    background: #F5F5F5;
    border: none;
    border-radius: var(--button-border-radius);
    cursor: not-allowed;
    transition: all 0.3s ease;
    text-align: center;
}

.konfio-btn-primary.active {
    background: var(--primary-color);
    color: #ffffff;
    cursor: pointer;
}

.konfio-btn-primary.active:hover {
    background: #5F1FBF;
}

.konfio-user-display {
    width: 100%;
    position: relative;
    border: 1.5px solid var(--input-border-color);
    border-radius: var(--input-border-radius);
    padding: 18px 18px 12px 18px;
    margin-bottom: 18px;
    background: var(--input-background-color);
    text-align: left;
}

.konfio-user-label {
    position: absolute;
    top: -10px;
    left: 14px;
    background: var(--input-background-color);
    padding: 0 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--font-default-color);
}

.konfio-user-value {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 16px;
    color: var(--input-text-color);
    font-weight: 500;
    word-break: break-all;
}

.konfio-edit-btn {
    background: transparent;
    border: none;
    color: var(--primary-color);
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
}

.konfio-edit-btn:hover {
    text-decoration: underline;
}

.konfio-password-wrapper {
    position: relative;
    width: 100%;
}

.konfio-password-wrapper input {
    padding-right: 50px;
}

.konfio-toggle-password {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.konfio-toggle-password svg {
    width: 22px;
    height: 22px;
    stroke: var(--font-default-color);
}

.konfio-toggle-password:hover svg {
    stroke: var(--primary-color);
}

.konfio-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-top: 28px;
    font-size: 19px;
    font-weight: 500;
    line-height: 26px;
    color: var(--font-default-color);
    text-align: center;
    max-width: 240px;
}

.konfio-footer p {
    margin: 0;
}

.konfio-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: inherit;
}

.konfio-footer a:hover {
    text-decoration: underline;
}

@media (max-width: 480px) {
    .konfio-nav {
        padding: 16px;
    }
    .konfio-main {
        padding: 60px 16px 40px 16px;
    }
    .konfio-title {
        font-size: 26px;
        line-height: 30px;
        letter-spacing: -0.8px;
    }
    .konfio-subtitle {
        font-size: 17px;
    }
    .konfio-input-wrapper input {
        font-size: 16px;
    }
    .konfio-btn-primary {
        font-size: 16px;
    }
    .konfio-footer {
        font-size: 17px;
    }
}

@media (min-width: 768px) {
    body {
        justify-content: center;
    }
    .konfio-main {
        padding: 0 16px;
    }
    .konfio-title::before {
        display: none;
    }
}

.konfio-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.konfio-modal-overlay.active {
    display: flex;
}

.konfio-modal {
    position: relative;
    background-color: #ffffff;
    border-radius: 16px;
    padding: 40px 32px 32px 32px;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    text-align: center;
    animation: konfioModalIn 0.25s ease-out;
}

@keyframes konfioModalIn {
    from {
        opacity: 0;
        transform: scale(0.92);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.konfio-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.konfio-modal-close:hover {
    background-color: rgba(115, 46, 213, 0.1);
}

.konfio-modal-close svg {
    width: 22px;
    height: 22px;
    stroke: var(--primary-color);
}

.konfio-modal-title {
    font-family: inherit;
    font-size: 22px;
    font-weight: 600;
    color: var(--title-font-color);
    margin-bottom: 12px;
    line-height: 28px;
}

.konfio-modal-text {
    font-family: inherit;
    font-size: 16px;
    font-weight: 400;
    color: var(--font-default-color);
    line-height: 24px;
    margin: 0;
}

.konfio-modal-action {
    margin-top: 24px;
    width: 100%;
    height: var(--konfio-control-height);
    padding: 12px 16px;
    font-family: inherit;
    font-size: 17px;
    font-weight: 500;
    color: #ffffff;
    background: var(--primary-color);
    border: none;
    border-radius: var(--button-border-radius);
    cursor: pointer;
    transition: background 0.3s ease;
}

.konfio-modal-action:hover {
    background: #5F1FBF;
}