body {
    background: linear-gradient(135deg, #f4f8ff 0%, #eef4ff 48%, #f8fbff 100%);
    color: #20324d;
}

.auth-page {
    position: relative;
    min-height: 100vh;
    padding: 80px 16% 48px;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 48px;
    align-items: center;
    overflow: hidden;
}

.auth-page::before,
.auth-page::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    z-index: -1;
}

.auth-page::before {
    width: 420px;
    height: 420px;
    right: -120px;
    top: -80px;
    background: radial-gradient(circle, rgba(52, 120, 232, 0.22), rgba(255, 255, 255, 0));
}

.auth-page::after {
    width: 300px;
    height: 300px;
    left: -100px;
    bottom: -60px;
    background: radial-gradient(circle, rgba(130, 184, 255, 0.24), rgba(255, 255, 255, 0));
}

.auth-copy {
    max-width: 560px;
}

.eyebrow {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(52, 120, 232, 0.12);
    color: #3478e8;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.auth-copy h1 {
    font-size: 52px;
    line-height: 1.15;
    color: #1d3d66;
    margin-bottom: 16px;
}

.auth-copy p {
    font-size: 18px;
    line-height: 1.9;
    color: #5f6f86;
    margin-bottom: 20px;
}

.auth-highlights {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 12px;
}

.auth-highlights li {
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(52, 120, 232, 0.12);
    color: #244265;
    font-weight: 500;
}

.auth-card {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(52, 120, 232, 0.16);
    border-radius: 28px;
    padding: 28px;
    box-shadow: 0 20px 60px rgba(40, 100, 180, 0.16);
    backdrop-filter: blur(14px);
}

.register-card {
    padding: 24px;
}

.register-card .card-top {
    margin-bottom: 14px;
}

.register-card .input-box {
    margin-bottom: 12px;
}

.register-card .register-text {
    margin-top: 12px;
}

.card-top {
    margin-bottom: 18px;
}

.card-top h2 {
    font-size: 28px;
    color: #1d3d66;
    margin-bottom: 8px;
}

.card-top p {
    color: #67809c;
    margin: 0;
}

.input-box {
    position: relative;
    margin-bottom: 14px;
}

.input-box input {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid #dce7f8;
    border-radius: 14px;
    font-size: 15px;
    color: #20324d;
    background: #f8fbff;
    outline: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.input-box input:focus {
    border-color: #3478e8;
    box-shadow: 0 0 0 4px rgba(52, 120, 232, 0.12);
    background: #ffffff;
}

.input-box label {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #6882a3;
    pointer-events: none;
    transition: all 0.25s ease;
    background: transparent;
    padding: 0 6px;
}

.input-box input:focus + label,
.input-box input:valid + label {
    top: 0;
    left: 10px;
    font-size: 12px;
    color: #f0f0f0;
    background: #0099ff;
    border-radius: 5px;
}

/* Password field with a show/hide toggle button */
.password-box input {
    padding-right: 44px;
}

.toggle-visibility {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 23px;
    height: 23px;
    border: none;
    background: transparent;
    color: #6882a3;
    cursor: pointer;
    font-size: 12px;
    line-height: 1;
    display: grid;
    place-items: center;
    padding: 0;
    border-radius: 50%;
}

.toggle-visibility .icon-eye-off,
.toggle-visibility.is-visible .icon-eye {
    display: none;
}

.toggle-visibility.is-visible .icon-eye-off {
    display: block;
}

.toggle-visibility:hover {
    color: #3478e8;
    background: rgba(52, 120, 232, 0.08);
}

.btn2 {
    width: 100%;
    padding: 12px 16px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, #3478e8, #5aa8ff);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(52, 120, 232, 0.22);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn2:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(52, 120, 232, 0.28);
}

.btn2:active {
    transform: translateY(0);
}

.message {
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(255, 95, 95, 0.1);
    color: #c94848;
    border: 1px solid rgba(255, 95, 95, 0.16);
    font-size: 14px;
}

.message.success {
    background: rgba(52, 200, 130, 0.1);
    color: #1f8a5c;
    border: 1px solid rgba(52, 200, 130, 0.2);
}

.register-text {
    margin-top: 14px;
    text-align: center;
    color: #5f6f86;
}

.register-text a {
    color: #3478e8;
    font-weight: 600;
    text-decoration: none;
}

.register-text a:hover {
    color: #8400ff;
}

.settings-page {
    grid-template-columns: 1fr 1.05fr;
    align-items: start;
    padding-top: 150px;
}

.settings-page::before {
    top: -130px;
}

.settings-ad {
    display: grid;
    min-height: 146px;
    margin-top: 22px;
    padding: 10px;
    border-top: 1px solid rgba(52, 120, 232, 0.18);
    border-bottom: 1px solid rgba(52, 120, 232, 0.18);
    place-items: center;
}

.settings-ad > span {
    color: #8493a9;
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.settings-ad ins { width: 100%; }

.settings-ad-placeholder {
    display: grid;
    width: 100%;
    min-height: 72px;
    margin-top: 4px;
    border: 1px dashed rgba(52, 120, 232, 0.25);
    place-items: center;
    color: #8493a9;
    font-size: 0.72rem;
}

.settings-panel {
    width: min(620px, 100%);
    display: grid;
    gap: 16px;
}

.settings-panel-header {
    padding: 0 4px 8px;
}

.settings-panel-header h2,
.settings-section-heading h3 {
    margin: 0;
    color: #1d3d66;
}

.settings-panel-header h2 {
    font-size: 30px;
}

.settings-panel-header p,
.settings-section-heading p {
    margin: 6px 0 0;
    color: #67809c;
}

.settings-section {
    padding: 22px;
    border: 1px solid #dce7f8;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 12px 28px rgba(40, 100, 180, 0.08);
}

.settings-section-heading {
    margin-bottom: 18px;
}

.settings-section-heading h3 {
    font-size: 18px;
}

.settings-section-heading p {
    font-size: 13px;
}

.settings-fields {
    display: grid;
    gap: 14px;
}

.settings-name-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.settings-section .input-box input:focus + label,
.settings-section .input-box input:not(:placeholder-shown) + label {
    top: 0;
    left: 10px;
    font-size: 12px;
    color: #f0f0f0;
    background: #0099ff;
    border-radius: 5px;
}

.settings-section .input-box input:placeholder-shown:not(:focus) + label {
    top: 50%;
    left: 16px;
    transform: translateY(-50%);
    font-size: inherit;
    color: #6882a3;
    background: transparent;
    border-radius: 0;
}

.settings-section .btn2 {
    margin-top: 4px;
}

.profile-preview-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}

.profile-preview-frame {
    width: 132px;
    height: 132px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #dce7f8;
    background: linear-gradient(135deg, #3478e8, #79b7ff);
    display: grid;
    place-items: center;
    box-shadow: 0 10px 24px rgba(52, 120, 232, 0.16);
}

.profile-preview-frame img,
.profile-preview-placeholder {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: grid;
    place-items: center;
    font-size: 34px;
    font-weight: 700;
    color: #fff;
}

.upload-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(52, 120, 232, 0.12);
    color: #3478e8;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

#profile_image {
    display: none;
}

.helper-text {
    margin: 0 0 10px;
    color: #6c7f95;
    font-size: 13px;
}

.password-section {
    margin-top: 0;
}

.crop-modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 32, 57, 0.72);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}

.crop-modal.is-open {
    display: flex;
}

.crop-modal-dialog {
    width: min(760px, 100%);
    background: #fff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.2);
}

.crop-modal-header,
.crop-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: #f8fbff;
}

.crop-modal-header h3 {
    margin: 0;
    color: #20324d;
}

.crop-modal-close {
    border: none;
    background: transparent;
    font-size: 24px;
    cursor: pointer;
    color: #67809c;
}

.crop-modal-body {
    padding: 20px;
}

.crop-stage {
    display: grid;
    gap: 12px;
}

.crop-viewport {
    width: 100%;
    height: 360px;
    border-radius: 20px;
    overflow: hidden;
    background: linear-gradient(135deg, #eef6ff, #dfefff);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    touch-action: none;
}

.crop-guide {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300px;
    height: 300px;
    transform: translate(-50%, -50%);
    border: 2px solid rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.35);
    pointer-events: none;
    z-index: 2;
}

.crop-viewport img {
    position: absolute;
    top: 50%;
    left: 50%;
    width: auto;
    max-width: none;
    max-height: none;
    transform: translate(-50%, -50%);
    user-select: none;
    pointer-events: auto;
    touch-action: none;
}

.crop-help {
    color: #67809c;
    font-size: 14px;
    margin: 0;
}

.crop-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #20324d;
    font-weight: 600;
}

.crop-controls input {
    flex: 1;
}

.btn2.secondary {
    background: #e7eef9;
    color: #20324d;
    box-shadow: none;
}

@media (max-width: 980px) {
    .auth-page {
        grid-template-columns: 1fr;
        padding: 100px 8% 60px;
    }

    .auth-copy {
        display: none;
    }

    .settings-page { padding-top: 140px; }
}

@media (max-width: 640px) {
    .auth-page {
        padding: 90px 6% 50px;
        gap: 28px;
    }

    .auth-copy h1 {
        font-size: 36px;
    }

    .auth-card {
        padding: 24px;
        border-radius: 22px;
    }

    .settings-page {
        grid-template-columns: 1fr;
        padding-top: 120px;
    }

    .settings-panel {
        width: 100%;
    }

    .settings-name-fields {
        grid-template-columns: 1fr;
    }

    .auth-highlights li {
        padding: 10px 12px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .auth-page {
        padding: 100px 4% 36px;
        gap: 20px;
    }

    .settings-page {
        padding-top: 150px;
    }

    .auth-copy h1 {
        font-size: 28px;
    }

    .auth-copy p {
        font-size: 15px;
    }

    .auth-card {
        padding: 18px;
        border-radius: 18px;
    }

    .card-top h2 {
        font-size: 24px;
    }

    .input-box input {
        padding: 13px 12px;
    }

    .btn2 {
        padding: 13px 14px;
    }

    .register-text {
        font-size: 14px;
    }
}

@media (max-width: 360px) {
    .auth-page {
        padding-top: 110px;
    }

    .settings-page {
        padding-top: 160px;
    }
}