/* Сторінка входу — стиль 1С:Підприємство */
body.login-page {
    margin: 0;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-family: var(--1c-font, 'Segoe UI', Tahoma, sans-serif);
    font-size: var(--1c-font-size, 12px);
    color: var(--1c-text, #000);
    background: var(--1c-bg, #f0f0f0);
}

.login-desktop-bg {
    position: fixed;
    inset: 0;
    background: linear-gradient(180deg, #6b8cbc 0%, #3d5a80 45%, #2a4470 100%);
    z-index: 0;
}

.login-window {
    position: relative;
    z-index: 1;
    width: 400px;
    max-width: calc(100vw - 24px);
    background: var(--1c-panel-bg);
    border: 2px solid var(--1c-modal-border);
    box-shadow: 4px 4px 16px var(--1c-modal-shadow);
}

.login-header {
    background: var(--1c-header-bg, #e8e8e8);
    border-bottom: 1px solid var(--1c-border, #c0c0c0);
    padding: 5px 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}

.login-header .window-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: bold;
    font-size: 12px;
}

.login-header .window-title i {
    font-size: 14px;
    color: #0055cc;
}

.login-header .window-controls button {
    width: 20px;
    height: 20px;
    border: 1px solid var(--1c-border, #a0a0a0);
    background: var(--1c-button, #e1e1e1);
    cursor: pointer;
    font-size: 11px;
    line-height: 1;
    padding: 0;
}

.login-header .window-controls button:hover {
    background: var(--1c-accent, #ffd700);
}

.login-body {
    padding: 16px 20px 12px;
}

.login-logo {
    text-align: center;
    margin-bottom: 16px;
}

.login-logo .logo-icon {
    font-size: 40px;
    color: #0055cc;
    line-height: 1;
}

.login-logo .logo-text {
    font-size: 20px;
    font-weight: bold;
    margin-top: 4px;
}

.login-logo .logo-subtitle {
    font-size: 11px;
    color: #666;
}

.login-body .form-group {
    margin-bottom: 10px;
}

.login-body .form-label {
    display: block;
    margin-bottom: 3px;
    font-size: 12px;
}

.login-body .input-wrapper {
    position: relative;
}

.login-body .input-wrapper > i.bi {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
    pointer-events: none;
}

.login-body .form-control {
    width: 100%;
    padding: 5px 28px 5px 28px;
    border: 1px solid var(--1c-input-border, #a0a0a0);
    font-size: 13px;
    font-family: inherit;
    background: #fff;
    box-sizing: border-box;
}

.login-body .form-control:focus {
    outline: none;
    border-color: #d4aa00;
    box-shadow: 0 0 0 1px #ffd700;
}

.login-body .password-toggle {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: none;
    cursor: pointer;
    color: #888;
    padding: 4px;
}

.btn-login {
    width: 100%;
    margin-top: 8px;
    padding: 7px 12px;
    background: var(--1c-accent, #ffd700);
    border: 1px solid #d4aa00;
    font-weight: bold;
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
}

.btn-login:hover {
    background: #ffc800;
}

.btn-login:disabled {
    background: #e8e8e8;
    border-color: #c0c0c0;
    color: #888;
    cursor: wait;
}

.error-message {
    display: none;
    background: #fff8f0;
    border: 1px solid #ffcc80;
    color: #804000;
    padding: 8px 10px;
    margin-bottom: 10px;
    font-size: 12px;
}

.error-message.show {
    display: block;
}

.demo-access {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #e0e0e0;
    font-size: 11px;
    color: #666;
    text-align: center;
}

.demo-access .demo-title {
    margin-bottom: 6px;
    color: #888;
}

.demo-access .demo-user {
    margin-bottom: 2px;
}

.login-mobile-link {
    margin: 12px 0 0;
    text-align: center;
    font-size: 12px;
}

.login-mobile-link a {
    color: var(--1c-link, #0000ff);
    text-decoration: none;
}

.login-mobile-link a:hover {
    text-decoration: underline;
}

.login-status-bar {
    padding: 4px 10px;
    border-top: 1px solid var(--1c-border, #c0c0c0);
    background: var(--1c-header-bg, #e8e8e8);
    font-size: 11px;
    color: #555;
    display: flex;
    justify-content: space-between;
}

.login-window.shake {
    animation: login-shake 0.35s ease;
}

@keyframes login-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}
