/* =========================================
   ЗМІННІ
   ========================================= */
:root {
    /* Кольори*/
    --color-primary: #3C9ADC;
    --color-primary-hover: #2380C2;
    --color-link: #2f80ed;
    --color-white: #ffffff;
    --color-bg-light: #f8f9fa;
    --color-input-bg: #eef4ff;
    
    /* Текст */
    --color-text-main: #374151;
    
    /* Обведення та рамки */
    --color-border: #cfd6e4;
    --color-border-light: #e5e7eb;
    
    /* Кольори статусів (помилки та успіх) */
    --color-error-outline: #e53935;
    --color-error-text: red;
    --color-error-msg: #ff0000;
    --color-error-req: #d32f2f;
    --color-success: #27ae60;
    
    /* Тіні */
    --shadow-focus: 0 0 0 3px rgba(60, 154, 220, 0.5);
    --shadow-error: 0 0 15px rgba(255, 0, 0, 0.5);
    
    /* Шрифти та радіуси */
    --font-family-base: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
}

/* =========================================
   ОСНОВНІ СТИЛІ
   ========================================= */
* {
    box-sizing: border-box;
    font-family: var(--font-family-base);
}

body {
    margin: 0;
    padding: 40px 0;
}

#wrapper {
    margin-top: 40px;
    border: 0px solid #000;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    height: auto !important;
}

#header {
    display: flex;
    justify-content: space-between; 
    align-items: center; 
    max-width: 800px;           
}

#logoIco {
    width: 250px;
}

.register-link {
    white-space: nowrap;
}

.LogoLine {
    position: absolute;
    background: var(--color-primary);    
    width: 99.5%;
    max-width: 800px;
    height: 3px;
    margin-top: 70px;
}

a,
a:visited,
a:hover,
a:active,
a:focus {
    color: var(--color-link);
}

/* =========================================
   БЛОК РЕЄСТРАЦІЇ
   ========================================= */
.registration-box {
    width: 420px;
    margin: 0 auto;
    background: var(--color-white);
    padding: 32px;
    border-radius: var(--radius-lg);
    margin-top: 80px;
}

.registration-box h1 {
    margin: 0 0 24px;
    font-size: 22px;
    font-weight: 700;
}

.field {
    position: relative;
    display: block;
    margin-bottom: 18px;
}

.fdescr {
    display: block;
    margin-bottom: 6px;
    font-size: 16px;
}

.label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Інпути */
#password, #password2, #email {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    font-size: 18px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background-color: var(--color-input-bg);
}

input:focus{
    outline: none;
    border-color: var(--color-primary);
    box-shadow: var(--shadow-focus);
}

input.error {
    outline: 1px solid var(--color-error-outline);
}

/* Кнопка */
.btn-registration {
    width: 100%;
    height: 52px;
    border: none;
    border-radius: var(--radius-md);
    background: var(--color-primary); 
    color: var(--color-white);
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
}

.btn-registration:hover {
    background: var(--color-primary-hover);
}

/* =========================================
   ПОМИЛКИ ТА ПОВІДОМЛЕННЯ
   ========================================= */
.error-text {
    color: var(--color-error-text);
    font-size: 12px;
    margin-top: 5px;
}

.icon {
    position: absolute;
    right: 10px;
    top: 12px;
    display: none;
}

.error-icon {
    position: absolute;
    right: -14px;
    top: 38px;
    color: var(--color-error-outline);
    font-weight: bold;
    font-size: 18px;
    display: none;
    pointer-events: none;
    line-height: 1;
}

.field.error .error-icon {
    display: block;
}

#ErrMsgEmail,
#ErrMsgServer {
    display: none;
    margin-top: 15px;
    float: left;
    margin-left: 3%;
    margin-right: 3%;    
    border: 1px solid var(--color-error-msg);
    border-radius: 5px;
    box-shadow: var(--shadow-error);
}

.ErrMsgText {
    margin-left: 10px;
    margin-right: 10px;
}

/* =========================================
   ПАРОЛЬ + ОКО
   ========================================= */
.password-wrap {
    position: relative;
}

.password-wrap input {
    padding-right: 44px;
}

.toggle-password {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    border: none;
    background: none;
    cursor: pointer;
    opacity: 0.6;
    background: url("/img/view.svg") 0 0 no-repeat;
}

.toggle-password.active {
    background: url("/img/no-view.svg") 0 0 no-repeat;
}

/* Маскування пароля */
.masked-password {
    -webkit-text-security: disc;
}
.unmasked-password {
    -webkit-text-security: none;
}

/* =========================================
   БЛОК ВИМОГ ДО ПАРОЛЯ
   ========================================= */
.password-requirements {
    margin: 15px 0 25px;
    background: var(--color-bg-light);
    padding: 12px 15px;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border-light);
    text-align: left;
}

.password-requirements .req-title {
    margin: 0 0 8px;
    font-weight: 600;
    color: var(--color-text-main);
    font-size: 13px;
}

.password-requirements .req-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 13px;
}

.password-requirements li {
    margin-bottom: 4px;
    color: var(--color-error-req); 
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
}

.password-requirements li::before {
    content: "❌";
    font-weight: bold;
    margin-right: 8px;
    font-size: 14px;
}

/* =========================================
   Мобільні пристрої
   ========================================= */
@media screen and (min-width: 100px) and (max-width: 768px) {
    #wrapper .registration-box {
        margin-top: 0px;
        width: auto;
    }
    .register-link {
        white-space: normal;
    }
    .register-link a {
        display: block;
        margin-right: 10px;
    }
    #logoIco {
        width: 230px;
    }
    body {
        padding: 5px 0;
    }
}