body {
    margin: 0;
    padding: 0;
    background: #f4f6f8;
    font-family: Arial, sans-serif;
    color: #1f2937;
}

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    box-sizing: border-box;
}

.auth-page-nav {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 1000;
}

.auth-card {
    width: 100%;
    max-width: 560px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    padding: 32px;
    box-sizing: border-box;
}

.auth-title {
    margin: 0 0 24px 0;
    font-size: 32px;
    line-height: 1.2;
    color: #111827;
}

.form-message {
    margin-bottom: 18px;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 15px;
}

.form-message.error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.form-message.success {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.field {
    margin-bottom: 18px;
}

.field label {
    display: block;
    margin-bottom: 8px;
    font-size: 15px;
    font-weight: 700;
    color: #111827;
}

.field input {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    box-sizing: border-box;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: 16px;
    background: #ffffff;
    color: #111827;
}

.field input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.field small {
    display: block;
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.4;
    color: #6b7280;
}

.password-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.password-row input {
    flex: 1;
}

.secondary-button {
    height: 48px;
    padding: 0 16px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    background: #f9fafb;
    cursor: pointer;
    font-size: 15px;
    white-space: nowrap;
}

.secondary-button:hover {
    background: #f3f4f6;
}

.primary-button {
    width: 100%;
    height: 50px;
    border: none;
    border-radius: 12px;
    background: #2563eb;
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}

.primary-button:hover {
    background: #1d4ed8;
}

.auth-link-block {
    margin-top: 18px;
    text-align: center;
    font-size: 15px;
}

.auth-link-block a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
}

.auth-link-block a:hover {
    text-decoration: underline;
}

.auth-subtitle {
    margin: -8px 0 20px 0;
    font-size: 15px;
    line-height: 1.5;
    color: #6b7280;
}

.auth-back-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.96);
    color: #111827;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.auth-back-button:hover {
    background: #f3f4f6;
    border-color: #cbd5e1;
    color: #111827;
}

.auth-back-button:active {
    transform: translateY(1px);
}

.auth-subtitle--center {
    text-align: center;
}

.register-choice-grid {
    display: grid;
    gap: 14px;
    margin-top: 24px;
}

.register-choice-button {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 56px;
    padding: 0 20px;
    border-radius: 14px;
    background: #2563eb;
    color: #ffffff;
    text-decoration: none;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    transition: background 0.2s ease, transform 0.2s ease;
}

.register-choice-button:hover {
    background: #1d4ed8;
}

.register-choice-button:active {
    transform: translateY(1px);
}

.field-readonly input {
    background: #f9fafb;
    color: #111827;
}

.auth-title--center {
    text-align: center;
}

.auth-title--select {
    font-size: 40px;
    margin-bottom: 20px;
}

.auth-demo-note {
    margin: 0 0 18px 0;
    font-size: 16px;
    line-height: 1.5;
    color: #2563eb;
    text-align: center;
}

.auth-title--center {
    text-align: center;
}

.auth-demo-note {
    margin: 0 0 18px 0;
    font-size: 16px;
    line-height: 1.5;
    color: #2563eb;
    text-align: center;
}

.password-toggle-btn {
    width: 46px;
    min-width: 46px;
    height: 46px;
    padding: 0;
    border: 1px solid #dbe5f3;
    border-radius: 12px;
    background: #f7faff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.password-toggle-btn:hover {
    background: #eef4ff;
    border-color: #c9d8f0;
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(23, 59, 116, 0.08);
}

.password-toggle-btn:active {
    transform: translateY(0);
    box-shadow: none;
}

.password-toggle-btn:focus-visible {
    outline: none;
    border-color: #4d7bff;
    box-shadow: 0 0 0 4px rgba(77, 123, 255, 0.14);
}

.password-toggle-btn svg {
    width: 20px;
    height: 20px;
    stroke: #173b74;
    transition: stroke 0.18s ease, opacity 0.18s ease;
}

.password-toggle-btn .eye-off {
    display: none;
}

.password-toggle-btn.is-active .eye-open {
    display: none;
}

.password-toggle-btn.is-active .eye-off {
    display: block;
}

.password-toggle-btn.is-active {
    background: #edf3ff;
    border-color: #c8d8f6;
}

.field input.input-invalid {
    border-color: #d85b6b !important;
    background: linear-gradient(180deg, #ffffff 0%, #fff7f8 100%);
    box-shadow: 0 0 0 4px rgba(216, 91, 107, 0.12) !important;
}

.field input.input-invalid::placeholder {
    color: #c78a95;
}

.field input.input-invalid:focus {
    border-color: #d85b6b !important;
    box-shadow: 0 0 0 4px rgba(216, 91, 107, 0.14) !important;
}