/* Custom Login & Register — стили под кабинет (Montserrat, белый на #0D3256) */

.cl-form-wrap {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    color: #ffffff;
    background: #0D3256;
    padding: 32px 28px;
    border-radius: 8px;
    box-sizing: border-box;
    width: 100%;
    margin: 0 auto;
}
.cl-form-wrap *,
.cl-form-wrap *::before,
.cl-form-wrap *::after {
    box-sizing: border-box;
    font-family: inherit;
}

/* Форма входа — компактная */
.cl-form-wrap.cl-login {
    max-width: 400px;
}
/* Форма регистрации — шире, больше полей */
.cl-form-wrap.cl-register {
    max-width: 520px;
    padding: 36px 32px;
}

.cl-title {
    font-size: 22px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 8px;
    color: #ffffff;
    line-height: 1.25;
}
.cl-register .cl-title {
    font-size: 20px;
    margin-bottom: 6px;
}

.cl-subtitle {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    margin-bottom: 22px;
    line-height: 1.4;
}

.cl-field {
    margin-bottom: 14px;
}
.cl-field label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 6px;
    color: rgba(255, 255, 255, 0.85);
}
.cl-required {
    color: #ff6b6b;
    margin-left: 2px;
}
.cl-field input[type="text"],
.cl-field input[type="password"],
.cl-field input[type="email"],
.cl-field input[type="tel"] {
    width: 100%;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color .15s, background .15s;
}
.cl-field input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}
.cl-field input:focus {
    outline: none;
    border-color: #7eb8ff;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 0 3px rgba(126, 184, 255, 0.2);
}

/* Кнопка показа пароля */
.cl-password-wrap {
    position: relative;
}
.cl-password-wrap input {
    padding-right: 44px !important;
}
.cl-toggle-password {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cl-toggle-password:hover {
    color: #ffffff;
}
.cl-toggle-password .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* Строка "запомнить + забыли пароль" */
.cl-row-inline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}
.cl-remember {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
}
.cl-remember input[type="checkbox"],
.cl-checkbox-row input[type="checkbox"] {
    accent-color: #7eb8ff;
    width: 16px;
    height: 16px;
    cursor: pointer;
    flex-shrink: 0;
}
.cl-link {
    color: #7eb8ff;
    text-decoration: none;
    font-size: 13px;
}
.cl-link:hover {
    color: #a8d0ff;
    text-decoration: underline;
}

/* Чекбокс согласия */
.cl-checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    line-height: 1.4;
}
.cl-agreement {
    margin: 16px 0 14px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

/* Информационная плашка */
.cl-info-note {
    background: rgba(126, 184, 255, 0.1);
    border-left: 3px solid #7eb8ff;
    color: rgba(255, 255, 255, 0.9);
    padding: 10px 14px;
    border-radius: 4px;
    font-size: 12px;
    line-height: 1.5;
    margin: 16px 0 8px;
}

/* Сообщение об ошибке / успехе */
.cl-error {
    background: rgba(220, 80, 80, 0.15);
    border-left: 3px solid #ff6b6b;
    color: #ffcccc;
    padding: 10px 14px;
    border-radius: 4px;
    font-size: 13px;
    margin-bottom: 14px;
    display: none;
    line-height: 1.4;
}
.cl-error.is-visible {
    display: block;
}
.cl-success {
    background: rgba(95, 217, 133, 0.15);
    border-left: 3px solid #5fd985;
    color: #b8f0c8;
    padding: 10px 14px;
    border-radius: 4px;
    font-size: 13px;
    margin-bottom: 14px;
    line-height: 1.4;
}

/* Кнопка submit */
.cl-submit {
    width: 100%;
    padding: 12px 20px;
    background: #ffffff;
    color: #0D3256;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background .15s, transform .1s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
}
.cl-submit:hover {
    background: #e6efff;
    transform: translateY(-1px);
}
.cl-submit:active {
    transform: translateY(0);
}
.cl-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Спиннер */
.cl-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(13, 50, 86, 0.3);
    border-top-color: #0D3256;
    border-radius: 50%;
    animation: cl-spin 0.6s linear infinite;
}
@keyframes cl-spin {
    to { transform: rotate(360deg); }
}

/* Подсказка про регистрацию / вход */
.cl-register-hint {
    text-align: center;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 14px;
}

/* ─── Состояние "уже залогинен" ─── */
.cl-logged-in {
    display: flex;
    align-items: center;
    gap: 16px;
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    color: #ffffff;
    background: #0D3256;
    padding: 24px;
    border-radius: 8px;
    max-width: 400px;
    margin: 0 auto;
}
.cl-avatar {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2d6db3, #1a4a8a);
    color: #ffffff;
    font-weight: 600;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.15);
    text-transform: uppercase;
}
.cl-logged-info {
    flex: 1;
    min-width: 0;
}
.cl-logged-hello {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 2px;
}
.cl-logged-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cl-logged-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.cl-btn {
    display: inline-block;
    padding: 7px 16px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background .15s, transform .1s;
}
.cl-btn-primary {
    background: #ffffff;
    color: #0D3256;
}
.cl-btn-primary:hover {
    background: #e6efff;
    transform: translateY(-1px);
}
.cl-btn-ghost {
    background: transparent;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.4);
}
.cl-btn-ghost:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #ffffff;
}

/* Адаптив */
@media (max-width: 540px) {
    .cl-form-wrap,
    .cl-form-wrap.cl-register {
        padding: 24px 20px;
    }
    .cl-title {
        font-size: 19px;
    }
    .cl-register .cl-title {
        font-size: 18px;
    }
    .cl-row-inline {
        flex-direction: column;
        align-items: flex-start;
    }
}
