.consent-section {
    display: grid;
    gap: 0.4rem;
}

.consent-section-head h3 {
    margin: 0;
    font-size: 1.08rem;
    color: #0f172a;
}

.consent-section-head p {
    margin: 0.3rem 0 0;
    color: #475569;
    line-height: 1.6;
}

.consent-panel {
    display: grid;
    gap: 0.35rem;
    padding: 0.55rem 0.75rem;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.92), rgba(255, 255, 255, 0.95));
}

.consent-panel.has-error {
    border-color: rgba(220, 38, 38, 0.34);
    box-shadow: 0 0 0 4px rgba(254, 226, 226, 0.85);
}

.consent-option {
    display: grid;
    gap: 0.45rem;
}

.consent-option-inline {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 0.25rem;
    padding: 0.45rem 0;
    border: 0;
    background: transparent;
    border-radius: 0;
}

.consent-option-inline + .consent-option-inline {
    padding-top: 0.45rem;
    border-top: 1px solid rgba(191, 219, 254, 0.18);
}

.consent-option.is-invalid {
    color: #b91c1c;
}

.consent-option-main {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    min-width: 0;
    cursor: pointer;
}

.consent-option-main input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    margin-top: 0.08rem;
    flex: 0 0 auto;
}

.consent-option-main input[type="checkbox"]:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.consent-option-text {
    color: #0f172a;
    line-height: 1.5;
    font-size: 0.95rem;
}

.consent-link {
    border: 0;
    padding: 0;
    background: transparent;
    color: #1d4ed8;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 0.2em;
    white-space: normal;
    font-size: inherit;
    font-family: inherit;
}

.consent-link:hover,
.consent-link:focus-visible {
    color: #1e40af;
    text-decoration-thickness: 2px;
}

.consent-link-inline {
    border: 0;
    padding: 0;
    margin: 0 0.05em;
    background: transparent;
    color: #1d4ed8;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 0.2em;
    white-space: normal;
    font-size: inherit;
    font-family: inherit;
    display: inline;
}

.consent-link-inline:hover,
.consent-link-inline:focus-visible {
    color: #1e40af;
    text-decoration-thickness: 2px;
}

.consent-error {
    display: none;
    color: #b91c1c;
    font-weight: 700;
    line-height: 1.5;
    margin-top: 0.25rem;
}

.consent-error.is-visible {
    display: block;
}

.consent-modal[hidden] {
    display: none;
}

.consent-modal {
    position: fixed;
    inset: 0;
    z-index: 4000;
    display: grid;
    place-items: center;
    padding: 1rem;
}

.consent-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, 0.62);
    backdrop-filter: blur(4px);
}

.consent-modal-dialog {
    position: relative;
    width: min(760px, 100%);
    max-height: min(88vh, 880px);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    background: #ffffff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 28px 64px rgba(15, 23, 42, 0.28);
}

.consent-modal-head,
.consent-modal-actions {
    padding: 1.1rem 1.25rem;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.98), rgba(255, 255, 255, 0.96));
}

.consent-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

.consent-modal-head h3 {
    margin: 0;
    font-size: 1.25rem;
    color: #0f172a;
}

.consent-modal-head p {
    margin: 0.22rem 0 0;
    color: #64748b;
    font-size: 0.88rem;
}

.consent-modal-close {
    border: 0;
    background: transparent;
    color: #334155;
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
}

.consent-modal-body {
    overflow-y: auto;
    padding: 1.2rem 1.25rem 1.35rem;
    color: #334155;
    position: relative;
}

.consent-modal-scroll-message {
    position: sticky;
    top: 0;
    padding: 0.6rem;
    margin: -1.2rem -1.25rem 1rem -1.25rem;
    background: linear-gradient(180deg, rgba(59, 130, 246, 0.08) 0%, rgba(59, 130, 246, 0.02) 100%);
    border-bottom: 1px solid rgba(59, 130, 246, 0.15);
    text-align: center;
    font-size: 0.85rem;
    color: #1e40af;
    font-weight: 500;
    animation: fadeInScale 0.3s ease-out;
}

.consent-modal-scroll-message.hidden {
    display: none;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.consent-copy-block + .consent-copy-block {
    margin-top: 1rem;
}

.consent-copy-block h4 {
    margin: 0 0 0.4rem;
    font-size: 1rem;
    color: #0f172a;
}

.consent-copy-block p {
    margin: 0;
    line-height: 1.72;
}

.consent-copy-block p + p {
    margin-top: 0.7rem;
}

.consent-modal-actions {
    display: flex;
    justify-content: flex-end;
    border-top: 1px solid rgba(226, 232, 240, 0.9);
}

.consent-modal-action {
    width: auto;
    min-width: 120px;
}

body.consent-modal-open {
    overflow: hidden;
}

.auth-layout .consent-section-head h3 {
    color: #f5f8ff;
}

.auth-layout .consent-section-head p {
    color: rgba(219, 232, 255, 0.82);
}

.auth-layout .consent-panel {
    gap: 0.5rem;
    padding: 0.72rem 0.82rem;
    border-color: rgba(147, 197, 253, 0.2);
    background: linear-gradient(180deg, rgba(7, 18, 36, 0.54), rgba(15, 23, 42, 0.42));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(10px);
}

.auth-layout .consent-option-inline + .consent-option-inline {
    border-top-color: rgba(147, 197, 253, 0.18);
}

.auth-layout .consent-option-text {
    color: #ecf4ff;
    font-size: 0.98rem;
}

.auth-layout .consent-option-main input[type="checkbox"] {
    accent-color: #f5c400;
}

.auth-layout .consent-link {
    color: #ffd95f;
    font-size: 0.94rem;
}

.auth-layout .consent-link-inline {
    color: #ffd95f;
    font-size: inherit;
}

.auth-layout .consent-link:hover,
.auth-layout .consent-link-inline:hover,
.auth-layout .consent-link:focus-visible,
.auth-layout .consent-link-inline:focus-visible {
    color: #fff3a6;
}

.auth-layout .consent-error {
    color: #ffd4d4;
}

.auth-layout .consent-modal-dialog {
    width: min(640px, 100%);
    max-height: min(76vh, 760px);
    background: linear-gradient(180deg, rgba(8, 19, 41, 0.98), rgba(10, 26, 58, 0.97));
    border: 1px solid rgba(255, 220, 95, 0.22);
    color: #e8f1ff;
}

.auth-layout .consent-modal-head,
.auth-layout .consent-modal-actions {
    background: linear-gradient(180deg, rgba(10, 26, 58, 0.98), rgba(7, 18, 36, 0.95));
    border-color: rgba(147, 197, 253, 0.12);
}

.auth-layout .consent-modal-head h3,
.auth-layout .consent-copy-block h4 {
    color: #fff8df;
}

.auth-layout .consent-modal-head p,
.auth-layout .consent-modal-body {
    color: rgba(223, 234, 251, 0.86);
}

.auth-layout .consent-modal-close {
    color: #dbe8ff;
}

.auth-layout .consent-modal-scroll-message {
    background: linear-gradient(180deg, rgba(245, 196, 0, 0.08) 0%, rgba(245, 196, 0, 0.02) 100%);
    border-bottom-color: rgba(245, 196, 0, 0.15);
    color: #ffeb99;
}

.auth-layout .consent-modal-action {
    min-width: 104px;
}

@media (max-width: 720px) {
    .consent-option-inline {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }

    .consent-link,
    .consent-link-inline {
        white-space: normal;
        text-align: left;
    }

    .consent-modal {
        padding: 0.65rem;
    }

    .consent-modal-dialog {
        max-height: 92vh;
        border-radius: 20px;
    }

    .auth-layout .consent-panel {
        padding: 0.68rem 0.72rem;
    }

    .auth-layout .consent-modal-dialog {
        width: min(560px, 100%);
        max-height: 84vh;
    }
}
