* {
    box-sizing: border-box;
    margin: 0;
    padding: 0
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    background: #f5f5f4;
    color: #1c1917;
    line-height: 1.5
}

.doc-header {
    padding: 20px 24px;
    background: white;
    border-bottom: 1px solid #e7e5e4;
    margin-bottom: 20px
}

.doc-header h1 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
    max-width: 1100px;
    margin: 0 auto 4px
}

.doc-header p {
    font-size: 12px;
    color: #57534e;
    max-width: 1100px;
    margin: 0 auto
}

.layout {
    max-width: 1100px;
    margin: 0 auto 60px;
    padding: 0 24px;
    display: grid;
    grid-template-columns:380px 1fr;
    gap: 32px;
    align-items: flex-start
}

@media (max-width: 780px) {
    .layout {
        grid-template-columns:1fr
    }
}

.tabs {
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: sticky;
    top: 24px
}

.tab {
    padding: 10px 14px;
    cursor: pointer;
    border: 1px solid #e7e5e4;
    border-radius: 6px;
    font-size: 13px;
    color: #57534e;
    background: white
}

.tab.active {
    border-color: #3598db;
    color: #1c1917;
    font-weight: 600;
    background: #eff6ff
}

.right {
    display: flex;
    flex-direction: column;
    gap: 20px
}

.form-card {
    display: none
}

.form-card.active {
    display: block
}

.form-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #1c1917
}

.form-url {
    font-size: 12px;
    color: #57534e;
    margin-bottom: 18px;
    font-family: Consolas, monospace
}

.form {
    background: white;
    border: 1px solid #e7e5e4;
    border-radius: 8px;
    padding: 24px;
    max-width: 380px;
    font-size: 13px
}

.form h3 {
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 18px
}

.form input[type="text"],
.form input[type="email"],
.form input[type="tel"],
.form input[type="password"] {
    width: 100%;
    padding: 9px 11px;
    border: 1px solid #d6d3d1;
    border-radius: 5px;
    font-size: 13px;
    font-family: inherit;
}

.form input:focus {
    outline: none;
    border-color: #3598db
}

.form input.invalid {
    border-color: #dc2626;
    background: #fef2f2
}

.field {
    margin-bottom: 10px
}

.field input {
    margin-bottom: 2px
}

.field-hint {
    font-size: 11px;
    color: #a8a29e;
    font-style: italic;
    padding-left: 2px
}

/* Поле пароля с глазиком */
.pwd-wrap {
    position: relative
}

.pwd-wrap input {
    padding-right: 36px
}

.pwd-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #78716c;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.pwd-toggle:hover {
    color: #3598db
}

.pwd-toggle svg {
    width: 18px;
    height: 18px;
    display: block
}

.pwd-toggle .icon-off {
    display: none
}

.pwd-toggle.visible .icon-on {
    display: none
}

.pwd-toggle.visible .icon-off {
    display: block
}

/* Звёздочка обязательности */
.req::after {
    content: " *";
    color: #dc2626;
    font-weight: 600
}

/* Helper-текст для обозначения «*» как метки обязательности */
.req-legend {
    font-size: 11px;
    color: #a8a29e;
    font-style: italic;
    margin-bottom: 10px;
    padding-left: 2px
}

/* Демо-доступ */
.demo {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
    font-size: 12px;
    cursor: pointer
}

/* Чекбокс акцепта — мельче, чтобы влезло в одну строку */
.consent {
    margin: 14px 0 4px;
    font-size: 11px;
    line-height: 1.35;
    color: #1c1917;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    white-space: nowrap
}

.consent input {
    margin: 0;
    flex-shrink: 0
}

.consent a {
    color: #3598db;
    text-decoration: underline
}

.consent.invalid {
    color: #dc2626
}

.consent.invalid input {
    outline: 1px solid #dc2626;
    outline-offset: 1px
}

/* Сообщение об ошибке для чекбокса */
.consent-error {
    font-size: 11px;
    color: #dc2626;
    margin: 2px 0 0 22px;
    display: none
}

.consent-error.show {
    display: block
}

/* Политика — отдельная строка под чекбоксом */
.policy-info {
    margin: 0 0 12px 22px;
    font-size: 11px;
    line-height: 1.4;
    color: #57534e
}

.policy-info a {
    color: #3598db;
    text-decoration: underline
}

.btn {
    display: block;
    width: 100%;
    padding: 12px 16px;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    font-family: inherit;
    margin-top: 6px
}

.form-legat .btn {
    background: #52B85C
}

.form-legat .btn:hover {
    background: #62da6e
}

.form-market .btn {
    background: #2A9CA4
}

.form-market .btn:hover {
    background: #1e8188
}

.form-zakupki .btn {
    background: #42A1E6
}

.form-zakupki .btn:hover {
    background: #3598DB
}

.form-podbor .btn {
    background: #184bb1
}

.form-podbor .btn:hover {
    background: #1A59D8
}

.login-link {
    text-align: center;
    margin-top: 10px;
    font-size: 12px;
    color: #57534e
}

.login-link a {
    color: #3598db;
    text-decoration: none
}

.notes {
    font-size: 12px;
    color: #57534e;
    background: white;
    border: 1px solid #e7e5e4;
    border-radius: 6px;
    padding: 14px 16px;
    line-height: 1.5
}

.notes h4 {
    font-size: 13px;
    font-weight: 600;
    color: #1c1917;
    margin-bottom: 6px;
    margin-top: 10px
}

.notes h4:first-child {
    margin-top: 0
}

.notes .remove {
    color: #991b1b;
    text-decoration: line-through
}

.notes code {
    background: #fafaf9;
    padding: 1px 4px;
    border-radius: 2px;
    font-size: 11px;
    font-family: Consolas, monospace
}
