/* Вход в стиле толстого клиента 1С:Предприятие */

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
    font-size: 13px;
    background: #ece9d8;
    color: #000;
}

body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    min-height: 100dvh;
    padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
}

.login-window {
    width: 360px;
    background: #fff;
    border: 1px solid #aca899;
    box-shadow: 2px 2px 8px rgba(0,0,0,.15);
    padding: 20px 24px 24px;
}

.login-brand {
    margin-bottom: 18px;
}

.logo-1c {
    display: inline-block;
    background: #d42020;
    color: #fff;
    font-weight: 700;
    font-size: 11px;
    padding: 2px 5px 3px;
    line-height: 1;
    letter-spacing: -.5px;
    margin-bottom: 6px;
}

.brand-title {
    font-size: 15px;
    font-weight: 400;
    color: #000;
    margin-bottom: 2px;
}

.brand-sub {
    font-size: 11px;
    color: #666;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.field-row {
    position: relative;
}

.field-input {
    width: 100%;
    height: 28px;
    padding: 4px 8px;
    border: 1px solid #7f9db9;
    background: #fff;
    font-size: 13px;
    font-family: inherit;
    outline: none;
}

.field-input:focus {
    border-color: #316ac5;
    box-shadow: inset 0 0 0 1px #316ac5;
}

.field-select {
    appearance: auto;
    cursor: pointer;
}

.field-password .field-input {
    padding-right: 34px;
}

.pwd-toggle {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 26px;
    height: 22px;
    border: none;
    background: transparent;
    cursor: pointer;
    color: #666;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pwd-toggle:hover { color: #316ac5; }

.pwd-toggle .pwd-slash { display: none; }
.pwd-toggle.visible .pwd-slash { display: block; }

.remember-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    cursor: pointer;
    user-select: none;
    margin-top: 2px;
}

.remember-row input {
    width: 14px;
    height: 14px;
    accent-color: #4a8f29;
}

.error-msg {
    color: #c00;
    font-size: 12px;
    padding: 4px 0;
}

.btn-enter {
    margin-top: 6px;
    width: 100%;
    height: 30px;
    border: 1px solid #aca899;
    border-radius: 0;
    background: linear-gradient(180deg, #fefefe 0%, #e4e4e4 45%, #d8d8d8 100%);
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    color: #000;
}

.btn-enter:hover {
    background: linear-gradient(180deg, #fff 0%, #ececec 45%, #e0e0e0 100%);
}

.btn-enter:active {
    background: linear-gradient(180deg, #d8d8d8 0%, #e4e4e4 55%, #fefefe 100%);
}

.btn-enter:disabled {
    opacity: .6;
    cursor: wait;
}

@media (max-width: 400px) {
    .login-window {
        width: calc(100vw - 24px);
        margin: 12px;
    }

    .btn-enter {
        min-height: 44px;
        height: 44px;
    }

    .field-input {
        min-height: 44px;
        height: 44px;
    }
}
