@font-face {
    font-family: 'Inter';
    src: local('Inter-Medium'), local('InterMedium'), url(../fonts/brand/Inter-Medium.ttf) format('truetype');
    font-weight: 500;
    font-display: swap;
}

@font-face {
    font-family: 'Gilroy';
    src: local('Gilroy-ExtraBold'), local('GilroyExtraBold'), url(../fonts/brand/Gilroy-ExtraBold.ttf) format('truetype');
    font-weight: 800;
    font-display: swap;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    width: 100%;
    font-family: 'Inter', Arial, sans-serif;
    background: #fff;
}

.login-layout {
    display: flex;
    min-height: 100vh;
    width: 100vw;
}

.left-panel {
    width: 40%;
    min-width: 240px;
    background-repeat: no-repeat;
    position: relative;
    background: linear-gradient(180.02deg, #628AC7 0.02%, #644EA5 99.98%);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.left-panel .login-hero {
    flex: 1;
    background: url('../images/background-alt.png') no-repeat bottom center;
    background-size: contain;
}
.left-panel .login-title {
    text-align: center;
    padding: 0 8%;
}
.left-panel .login-title h1 {
    font-size: clamp(30px, 2.2vw, 40px);
    font-weight: 800;
    font-family: 'Gilroy', sans-serif;
    color: #fff;
    margin-top: 96px;
}
.left-panel .login-title p {
    font-size: clamp(18px, 1.4vw, 22px);
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    margin: 30px 0 90px 0;
}

.right-panel {
    width: 60%;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: #fff;
    min-height: 100vh;
    box-sizing: border-box;
}

form {
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 20px 20px 20px;
    width: 340px;
    border-radius: 4px;
    margin: 0 auto;
    box-sizing: border-box;
}

.logo {
    height: 33px;
    margin-bottom: 20px;
    max-width: 125px;
    width: auto;
}

.input-block {
    width: 100%;
    margin-bottom: 0;
    position: relative;
    display: flex;
    flex-direction: column;
}

.input-block:not(:last-child) {
    margin-bottom: 20px;
}

.input {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 8px;
    font-size: 13px;
    font-weight: 500;
    border: none;
    border-bottom: 1px solid rgba(224, 224, 224, 1);
    border-radius: 0;
    background: transparent;
    outline: none;
    transition: border-color 0.15s, background 0.15s;
}

.input:focus {
    border-bottom: 1px solid #5544eb;
    background: transparent;
}

.label {
    position: absolute;
    top: -17px;
    left: 0;
    background: transparent;
    padding: 0 4px;
    font-size: 12px;
    font-weight: 500;
    color: rgba(111, 118, 131, 1);
    pointer-events: none;
    transition: 0.2s;
}

.input:focus + .label {
    color: #5544eb;
}

.input-error {
    color: #d50000;
    font-size: 13px;
    font-weight: 500;
    margin-top: 3px;
    display: none;
    width: 100%;
    padding: 0;
    margin-left: 0;
    margin-right: 0;
    box-sizing: border-box;
}

.visibility_container {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    height: 22px;
    display: flex;
    align-items: center;
}

.visibility {
    height: 22px;
    width: 22px;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.15s;
}

.visibility:hover {
    opacity: 1;
}

.btn {
    width: 100%;
    box-sizing: border-box;
    height: 36px;
    min-height: 36px;
    padding: 0 0;
    font-size: 13px;
    font-weight: 500;
    border: none;
    border-radius: 3px;
    background: #e0e0eb;
    color: #44476a;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.btn:not(:last-child) {
    margin-bottom: 25px;
}

.btn:hover {
    background: #d1d1e0;
    color: #222;
}

.main-btn {
    background: rgba(85, 68, 235, 1);
    color: #fff;
    margin-bottom: 18px;
}

.main-btn:hover {
    background: #3d2fc7;
    color: #fff;
}

.social-btn {
    background: rgba(85, 68, 235, 0.1);
    color: #44476a;
    margin-bottom: 10px;
}

.social-btn:hover {
    background: rgba(85, 68, 235, 0.18);
}

.slack-logo {
    height: 36px;
    width: 36px;
}

.telegram-logo {
    height: 22px;
    width: 22px;
    margin-right: 7px;
}

.message, .message-warning, .message-success {
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    width: 100%;
    padding: 8px 12px;
    border-radius: 3px;
    margin: 0 0 20px 0;
    box-sizing: border-box;
    display: none;
}

.message {
    background: #ffe5e6;
    color: #c0392b;
}

.message-success {
    background: #e6ffe7;
    color: #1cab41;
}

.message-warning {
    background: #fff6d0;
    color: #b7730e;
}

.is-invalid .input {
    border-bottom: 1px solid #d50000 !important;
}

.is-invalid .input-error {
    display: block;
    color: #d50000;
    font-size: 13px;
    font-weight: 500;
    margin-top: 3px;
    width: 100%;
    padding: 0;
    margin-left: 0;
    margin-right: 0;
    box-sizing: border-box;
}

.input-block:not(:last-child) {
    margin-bottom: 20px;
}

.is-invalid .input-error:not(:last-child) {
    margin-bottom: 0;
}

.form-row {
    margin-bottom: 20px;
}

.form-row:last-child {
    margin-bottom: 0;
}

.input-block, .btn, .input-error {
    margin-bottom: 0;
}

.form-title {
    text-align: center;
    color: rgba(37, 37, 37, 1);
    font-weight: 600;
    font-size: 20px;
    margin: 0 0 10px 0;
}

.form-subtitle {
    text-align: center;
    color: rgba(183, 186, 193, 1);
    font-weight: 500;
    font-size: 13px;
    margin: 0 0 30px 0;
}

.form-subtitle.compact {
    margin: 0 0 20px 0;
}

.form-link {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 500;
    background: transparent;
    color: rgba(67, 81, 232, 1);
    text-decoration: underline;
    border: none;
    box-shadow: none;
    padding: 0;
    height: auto;
    min-width: 0;
    cursor: pointer;
    margin: 0 auto;
    transition: color 0.13s;
}

.form-link:hover {
    color: rgba(67, 81, 232, 0.7);
    text-decoration: underline;
}

.disabled-button {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.disabled-button:hover {
    opacity: 0.5;
    background: rgba(85, 68, 235, 0.1) !important;
    color: #44476a !important;
}

.text.form-row {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #404040;
    font-size: 13px;
    font-weight: 500;
    margin: 0 0 20px 0;
    width: 100%;
}

.text.form-row .line {
    flex: 1;
    height: 1px;
    background-color: #ccc;
    display: block;
}

.text.form-row .line:first-child {
    margin-right: 15px;
}

.text.form-row .line:last-child {
    margin-left: 15px;
}

@media (max-width: 900px) {
    .login-layout {
        flex-direction: column;
    }

    .left-panel, .right-panel {
        width: 100%;
        min-width: 0;
    }

    .left-panel {
        height: 180px;
        min-height: 130px;
    }

    .right-panel {
        min-height: auto;
        padding-top: 15px;
        padding-bottom: 15px;
    }

    form {
        width: 95vw;
        min-width: 0;
        max-width: 350px;
    }
}

@media (max-width: 600px) {
    .right-panel {
        padding: 8px 0;
    }

    form {
        width: 99vw;
        min-width: 0;
        max-width: 99vw;
        padding: 16px 2vw 12px 2vw;
    }
}

/* Register page specific styles */
.register-fields-wrapper {
    display: flex;
    gap: 15px;
    width: 100%;
    margin-bottom: 20px;
}

.country-code-block {
    flex: 0 0 100px;
    margin-bottom: 0 !important;
}

.phone-number-block {
    flex: 1;
    margin-bottom: 0 !important;
}

.country-code-select {
    appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12"><path fill="%23666" d="M6 8L2 4h8z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 12px;
    padding-right: 30px;
    cursor: pointer;
}

.country-code-select:focus {
    outline: none;
}

.country-code-select option {
    padding: 8px 12px;
    background: #fff;
    color: #333;
}

@media (max-width: 600px) {
    .register-fields-wrapper {
        flex-direction: column;
        gap: 20px;
    }

    .country-code-block,
    .phone-number-block {
        flex: 1;
        margin-bottom: 20px !important;
    }
}

/* Password warnings styles */
.new-password-warnings {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
    width: 100%;
}

.new-password-warnings li {
    font-size: 12px;
    font-weight: 500;
    color: #d50000;
    margin-bottom: 5px;
    padding-left: 20px;
    position: relative;
}

.new-password-warnings li:before {
    content: "✗";
    position: absolute;
    left: 0;
    color: #d50000;
    font-weight: bold;
}

/* Close button styles */
.close-button {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.3s;
    z-index: 10;
}

.close-button:hover {
    opacity: 1;
}

/* Avatar upload styles */
.form-avatar-wrapper {
    display: flex;
    gap: 35px;
    align-items: center;
    margin: 0 0 20px 0;
}

.form-avatar-preview img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 50%;
    background: #ddd;
}

.avatar-cropper-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.avatar-cropper-modal.is-open {
    display: flex;
}

.avatar-cropper-dialog {
    background: #fff;
    max-width: 528px;
    width: 90%;
    box-shadow: 2px 2px 8px 0 rgba(0, 0, 0, 0.4);
}

.avatar-cropper-header {
    font-size: 16px;
    font-weight: 600;
    padding: 10px 16px;
    text-align: left;
    background: rgba(85, 68, 235, 1);
    color: #fff;
}

.avatar-cropper-body {
    max-height: 420px;
    overflow: hidden;
}

.avatar-cropper-body img {
    max-width: 100%;
    padding: 8px 8px 0 8px;
    display: block;
}

.avatar-cropper-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 8px 16px;
}

.avatar-cropper-actions .btn {
    color: rgba(85, 68, 235, 1);
    width: auto;
    padding: 8px 16px;
    height: auto;
    min-height: auto;
    line-height: inherit;
    background: transparent;
    border: 1px solid rgba(85, 68, 235, 1);
    margin-bottom: 0;
}

.avatar-cropper-actions .btn:hover {
    background: rgba(85, 68, 235, 0.1);
    color: rgba(85, 68, 235, 1);
}

.avatar-cropper-actions .btn#avatar-cropper-apply {
    background: rgba(85, 68, 235, 1);
    color: #fff;
    border: none;
}

.avatar-cropper-actions .btn#avatar-cropper-apply:hover {
    background: #3d2fc7;
    color: #fff;
}

.form-avatar-upload {
    display: flex;
    gap: 10px;
    width: 100%;
}

.form-avatar-upload button {
    flex: 1;
    position: relative !important;
    bottom: 0 !important;
    margin-bottom: 0 !important;
}

.form-avatar-error {
    margin-top: -9px;
}

.avatar-setButton {
    padding: 8px 16px;
    background-color: rgba(85, 68, 235, 1);
    color: #fff;
    margin-bottom: 0 !important;
}

.avatar-setButton:hover {
    background-color: #3d2fc7;
    color: #fff;
}

.avatar-clearButton {
    padding: 8px 16px;
    background-color: transparent;
    color: rgba(85, 68, 235, 1);
    border: 1px solid rgba(85, 68, 235, 1);
    margin-bottom: 0 !important;
}

.avatar-clearButton:hover {
    background-color: rgba(85, 68, 235, 0.1);
    color: rgba(85, 68, 235, 1);
}

#avatar-upload {
    display: none;
}