* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #f4f6f8;
    color: #17202a;
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Arial,
        sans-serif;
}

.header {
    background: #17232e;
    color: white;
    padding: 28px 4%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.eyebrow {
    font-size: 11px;
    letter-spacing: 1.5px;
    opacity: .6;
}

.header h1 {
    margin: 5px 0;
    font-size: 28px;
}

.subtitle {
    opacity: .65;
}

.status {
    padding: 11px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
}

.status-ok {
    background: #17583c;
}

.status-error {
    background: #772c31;
}

main {
    width: 94%;
    max-width: 1550px;
    margin: 24px auto 60px;
}

.cards {
    display: grid;
    grid-template-columns:
        repeat(auto-fit, minmax(190px, 1fr));
    gap: 14px;
}

.card,
.panel {
    background: white;
    border: 1px solid #e1e6ea;
    border-radius: 12px;
    box-shadow:
        0 2px 8px rgba(0,0,0,.035);
}

.card {
    padding: 20px;
}

.label {
    color: #697682;
    font-size: 12px;
    margin-bottom: 9px;
}

.value {
    font-size: 22px;
    font-weight: 700;
}

.value-small {
    font-size: 13px;
    line-height: 1.5;
}

.detail {
    margin-top: 5px;
    color: #7b8791;
    font-size: 12px;
}

.panel {
    padding: 22px;
    margin-top: 20px;
}

.panel h2 {
    margin-top: 0;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.panel-header p {
    margin: 4px 0 0;
    color: #74808b;
}

input {
    min-width: 300px;
    padding: 10px 12px;
    border: 1px solid #cad2d9;
    border-radius: 7px;
    font-size: 14px;
}

.table-wrap {
    overflow-x: auto;
    margin-top: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    color: #697682;
    font-size: 11px;
    text-transform: uppercase;
}

th,
td {
    padding: 13px 10px;
    border-bottom: 1px solid #edf0f2;
    vertical-align: top;
}

.title-cell {
    min-width: 320px;
    font-weight: 600;
}

code {
    font-size: 12px;
}

a {
    color: #176ca3;
    text-decoration: none;
    font-weight: 600;
}

a:hover {
    text-decoration: underline;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.item {
    padding: 15px 0;
    border-bottom: 1px solid #edf0f2;
}

.item-title {
    font-weight: 700;
    margin-bottom: 8px;
}

.tags {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
}

.tags span {
    background: #edf2f5;
    border-radius: 20px;
    padding: 4px 8px;
    font-size: 11px;
}

.warning {
    border-left: 4px solid #d79a22;
    padding-left: 14px;
}

.empty {
    padding: 16px;
    border-radius: 8px;
}

.success {
    background: #eef8f2;
    color: #256641;
}

.reports {
    display: grid;
    grid-template-columns:
        repeat(auto-fill, minmax(270px, 1fr));
    gap: 10px;
}

.report {
    border: 1px solid #e2e6ea;
    border-radius: 8px;
    padding: 14px;
    display: flex;
    gap: 12px;
    align-items: center;
    color: inherit;
}

.report:hover {
    background: #f7f9fa;
    text-decoration: none;
}

.report-icon {
    font-size: 24px;
}

.health-row,
.run {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 11px 0;
    border-bottom: 1px solid #edf0f2;
}

.run-result {
    text-align: right;
}

footer {
    margin-top: 25px;
    color: #84909a;
    font-size: 11px;
    text-align: center;
}

@media (max-width: 850px) {

    .header,
    .panel-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .grid-2 {
        grid-template-columns: 1fr;
    }

    input {
        min-width: 100%;
        width: 100%;
    }
}


.section-info {
    color: #74808b;
    margin-bottom: 18px;
}

.recipient-row,
.audit-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    padding: 12px 0;
    border-bottom: 1px solid #edf0f2;
}

.recipient-form {
    display: grid;
    grid-template-columns: 1fr 1.4fr auto;
    gap: 8px;
    margin-top: 18px;
}

.recipient-form input {
    min-width: 0;
    width: 100%;
}

button {
    border: 0;
    border-radius: 7px;
    padding: 10px 14px;
    cursor: pointer;
    font-weight: 600;
}

.button-primary {
    background: #176b46;
    color: white;
}

.button-primary:hover {
    background: #12583a;
}

.button-danger {
    background: #f7e9e9;
    color: #a32b2b;
}

.button-danger:hover {
    background: #f1dada;
}

.audit-meta {
    text-align: right;
    white-space: nowrap;
}


@media (max-width: 850px) {

    .recipient-form {
        grid-template-columns: 1fr;
    }

}

.operation-info {
    margin: 14px 0 18px;
    padding: 14px;
    border: 1px solid #e2e6ea;
    border-radius: 8px;
    background: #f8faf9;
}

.operation-info strong {
    display: block;
    margin-top: 4px;
}

.run-button {
    width: 100%;
    margin-bottom: 12px;
}

.section-separator {
    margin: 24px 0;
    border: 0;
    border-top: 1px solid #edf0f2;
}


/* =========================================================
   COMPLIANCE AGENT STATUS - STAGE 9B
   ========================================================= */

.agent-status {
    padding: 16px;
    border-radius: 9px;
    margin: 14px 0 18px;
    border: 1px solid #e2e6ea;
}

.agent-ready {
    background: #eef8f2;
}

.agent-running {
    background: #fff7e5;
}

.agent-error {
    background: #fbeeee;
}

.agent-status-title {
    font-size: 17px;
    font-weight: 700;
}

.agent-status-subtitle {
    margin-top: 5px;
    color: #65717b;
    font-size: 13px;
}

.agent-details {
    margin-bottom: 18px;
}

.agent-detail-row {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 10px 0;
    border-bottom: 1px solid #edf0f2;
}

.agent-detail-row span {
    color: #74808b;
}

.agent-detail-row strong {
    text-align: right;
}

.diagnostic-box {
    margin: 18px 0;
    padding: 14px;
    border: 1px solid #ead9ad;
    border-left: 4px solid #d79a22;
    border-radius: 8px;
    background: #fffaf0;
}

.diagnostic-title {
    font-weight: 700;
    margin-bottom: 6px;
}

.diagnostic-run,
.diagnostic-date {
    color: #74808b;
    font-size: 12px;
}

.diagnostic-message {
    margin: 8px 0;
    font-size: 13px;
    word-break: break-word;
}

.diagnostic-resolved {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #ead9ad;
    font-size: 12px;
    color: #256641;
}

.action-message {
    padding: 12px;
    margin: 14px 0;
    border-radius: 8px;
    font-size: 13px;
}

.action-success {
    background: #eef8f2;
    color: #256641;
}

.action-warning {
    background: #fff7e5;
    color: #7a5914;
}

.run-button:disabled {
    cursor: not-allowed;
    opacity: 0.65;
}

@media (max-width: 850px) {

    .agent-detail-row {
        flex-direction: column;
        gap: 4px;
    }

    .agent-detail-row strong {
        text-align: left;
    }

}


/* =========================================================
   NEWSLETTER DELIVERY - STAGE 9C
   ========================================================= */

.newsletter-delivery {
    margin: 14px 0 18px;
    padding: 15px;
    border: 1px solid #e2e6ea;
    border-radius: 8px;
    background: #f8faf9;
}

.newsletter-delivery-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
}

.newsletter-delivery-details {
    color: #65717b;
    font-size: 13px;
    line-height: 1.7;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.newsletter-sent {
    background: #eef8f2;
    border-color: #cfe7d8;
}

.newsletter-failed {
    background: #fbeeee;
    border-color: #ebcccc;
}


/* =========================================================
   LOGIN - STAGE 10A
   ========================================================= */

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: #f3f6f7;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: white;
    border: 1px solid #e2e6ea;
    border-radius: 12px;
    padding: 32px;
}

.login-brand {
    font-size: 34px;
    margin-bottom: 12px;
}

.login-card h1 {
    margin: 0 0 8px;
}

.login-description {
    color: #74808b;
    margin-bottom: 24px;
}

.login-form {
    display: grid;
    gap: 16px;
}

.login-form label {
    display: grid;
    gap: 6px;
    font-weight: 600;
}

.login-form input {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 11px 12px;
    border: 1px solid #ccd3d8;
    border-radius: 7px;
    font: inherit;
}

.login-button {
    width: 100%;
    margin-top: 4px;
}

.login-error {
    padding: 11px 12px;
    margin-bottom: 18px;
    border-radius: 7px;
    background: #fbeeee;
    color: #a32b2b;
}


/* =========================================================
   LOGOUT
   ========================================================= */

.logout-form {
    position: fixed;
    top: 18px;
    right: 22px;
    z-index: 1000;
}

.logout-button {
    background: white;
    color: #4f5b64;
    border: 1px solid #d8dde1;
    padding: 8px 14px;
    border-radius: 7px;
    font-weight: 600;
}

.logout-button:hover {
    background: #f4f6f7;
}


/* =========================================================
   LEGAL REGISTER - STAGE 10B
   ========================================================= */

.legal-portal {
    margin: 0;
    background: #f4f6f7;
    color: #263238;
}

.legal-header {
    background: white;
    border-bottom: 1px solid #e2e6ea;
    padding: 18px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.legal-brand {
    font-size: 18px;
    font-weight: 700;
}

.legal-user {
    margin-top: 4px;
    font-size: 12px;
    color: #74808b;
}

.legal-header-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.legal-header-actions form {
    margin: 0;
}

.legal-admin-link {
    font-size: 13px;
    font-weight: 600;
}

.legal-container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 34px 24px 60px;
}

.legal-intro h1 {
    margin-bottom: 8px;
}

.legal-intro p {
    max-width: 760px;
    color: #65717b;
    line-height: 1.6;
}

.legal-stats {
    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 24px 0;
}

.legal-stat {
    background: white;
    border: 1px solid #e2e6ea;
    border-radius: 9px;
    padding: 18px;
}

.legal-stat span {
    display: block;
    color: #74808b;
    font-size: 12px;
}

.legal-stat strong {
    display: block;
    margin-top: 5px;
    font-size: 25px;
}

.legal-tools {
    display: flex;
    gap: 12px;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

#legal-search {
    flex: 1;
    max-width: 500px;
    min-width: 250px;
    padding: 11px 13px;
    border: 1px solid #ccd3d8;
    border-radius: 8px;
    font: inherit;
}

.legal-filters {
    display: flex;
    gap: 7px;
}

.legal-filter {
    background: white;
    border: 1px solid #d8dde1;
    color: #4f5b64;
}

.legal-filter.active {
    background: #176b46;
    border-color: #176b46;
    color: white;
}

.legal-list {
    display: grid;
    gap: 9px;
}

.legal-document {
    background: white;
    border: 1px solid #e2e6ea;
    border-radius: 9px;
    padding: 17px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 22px;
}

.legal-document:hover {
    border-color: #cbd4d9;
}

.legal-document h2 {
    font-size: 15px;
    line-height: 1.45;
    margin: 5px 0;
}

.legal-jurisdiction {
    color: #65717b;
    font-size: 11px;
    font-weight: 600;
}

.legal-eli {
    color: #8a959d;
    font-size: 11px;
}

.legal-document-action {
    flex: 0 0 auto;
}

.legal-document-link {
    display: inline-block;
    background: #eef8f2;
    color: #176b46;
    border-radius: 7px;
    padding: 9px 12px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.legal-document-link:hover {
    text-decoration: none;
    background: #e2f2e8;
}

.legal-no-link {
    color: #9aa3aa;
    font-size: 12px;
}

.legal-no-results {
    background: white;
    border: 1px solid #e2e6ea;
    border-radius: 9px;
    padding: 22px;
    text-align: center;
    color: #74808b;
}

@media (max-width: 760px) {

    .legal-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .legal-stats {
        grid-template-columns: 1fr;
    }

    .legal-tools {
        align-items: stretch;
        flex-direction: column;
    }

    #legal-search {
        max-width: none;
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    .legal-filters {
        flex-wrap: wrap;
    }

    .legal-document {
        align-items: flex-start;
        flex-direction: column;
    }

}


/* =========================================================
   USERS & ACCESS - STAGE 10C
   ========================================================= */

.admin-account-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 13px 14px;
    margin-bottom: 16px;
    background: #f6f8f9;
    border: 1px solid #e2e6ea;
    border-radius: 8px;
}

.user-access-card {
    border: 1px solid #e2e6ea;
    border-radius: 9px;
    padding: 15px;
    margin-bottom: 12px;
    background: #fff;
}

.user-access-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 14px;
}

.user-access-name {
    font-size: 14px;
}

.access-badge {
    display: inline-block;
    padding: 5px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.access-active {
    background: #e8f5ed;
    color: #256641;
}

.access-pending {
    background: #fff3d8;
    color: #805d13;
}

.access-disabled {
    background: #eef1f3;
    color: #65717b;
}

.access-admin {
    background: #e8f5ed;
    color: #176b46;
}

.user-access-form {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    padding-top: 12px;
    border-top: 1px solid #edf0f2;
}

.access-option {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    cursor: pointer;
}

.access-option input {
    width: auto;
    min-width: 0;
}

.user-access-actions {
    margin-left: auto;
}

.user-access-meta {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 11px;
    color: #84909a;
    font-size: 11px;
}

.user-deactivate-form {
    margin-top: 12px;
}

.user-create-form {
    display: grid;
    grid-template-columns:
        1fr 1.4fr;
    gap: 9px;
    margin-top: 12px;
}

.user-create-form input {
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}

.user-create-options {
    display: flex;
    align-items: center;
    gap: 18px;
}

.user-create-form > button {
    align-self: end;
}

.user-activation-note {
    margin-top: 12px;
    color: #84909a;
    font-size: 11px;
    line-height: 1.5;
}

@media (max-width: 850px) {

    .user-access-header {
        flex-direction: column;
    }

    .user-access-form {
        align-items: flex-start;
        flex-direction: column;
    }

    .user-access-actions {
        margin-left: 0;
        width: 100%;
    }

    .user-access-actions button {
        width: 100%;
    }

    .user-create-form {
        grid-template-columns: 1fr;
    }

}


/* =========================================================
   USER ACTIVATION - STAGE 10D
   ========================================================= */

.button-secondary {
    background: #edf2f5;
    color: #42515b;
    border: 1px solid #d8dde1;
}

.button-secondary:hover {
    background: #e3e9ed;
}

.user-activation-form {
    margin-top: 12px;
}

.activation-card {
    width: 100%;
    max-width: 680px;
    background: white;
    border: 1px solid #e2e6ea;
    border-radius: 12px;
    padding: 32px;
}

.activation-link-label {
    display: block;
    margin: 20px 0 7px;
    font-weight: 600;
}

.activation-link-copy {
    display: flex;
    gap: 8px;
}

.activation-link-copy input {
    flex: 1;
    min-width: 0;
    padding: 10px 11px;
    border: 1px solid #ccd3d8;
    border-radius: 7px;
}

.activation-copy-result {
    margin-top: 8px;
    color: #256641;
    font-size: 12px;
}

.activation-actions {
    margin-top: 24px;
}

.password-info {
    color: #74808b;
    font-size: 11px;
}

.login-success {
    padding: 11px 12px;
    margin-bottom: 18px;
    border-radius: 7px;
    background: #eef8f2;
    color: #256641;
}

@media (max-width: 650px) {

    .activation-link-copy {
        flex-direction: column;
    }

}

.password-change-link {
    position: fixed;
    top: 25px;
    right: 118px;
    z-index: 1000;
    font-size: 12px;
    font-weight: 600;
}


/* ==========================================================
   EU LEGAL REGISTER
   ========================================================== */

.eu-register-summary {
    margin: 24px 0;
    padding: 20px;
    border: 1px solid #dde3ea;
    border-radius: 14px;
    background: #ffffff;
}

.eu-summary-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 14px;
}

.eu-summary-grid {
    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.eu-summary-card {
    padding: 14px 16px;
    border-radius: 10px;
    background: #f7f9fb;
}

.eu-summary-card span {
    display: block;
    font-size: 13px;
    margin-bottom: 6px;
    opacity: 0.75;
}

.eu-summary-card strong {
    font-size: 24px;
}

.legal-document-eu {
    align-items: flex-start;
}

.eu-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: 7px 0 10px;
}

.eu-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.3;
}

.eu-badge-monitored {
    background: #e8f5ec;
    color: #1c6937;
}

.eu-badge-conditional {
    background: #fff4dd;
    color: #815a06;
}

.eu-badge-review {
    background: #fdeaea;
    color: #8b2d2d;
}

.eu-badge-neutral {
    background: #edf1f5;
    color: #46525e;
}

.eu-details {
    margin-top: 14px;
    max-width: 900px;
}

.eu-details summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
}

.eu-detail-block {
    margin-top: 12px;
    padding: 12px 14px;
    border-left: 3px solid #d7dde4;
    background: #fafbfc;
    border-radius: 6px;
}

.eu-detail-block strong {
    display: block;
    margin-bottom: 5px;
}

.eu-detail-block p {
    margin: 0;
    line-height: 1.5;
}

.eu-detail-block ul {
    margin: 6px 0 0 20px;
    padding: 0;
}

.eu-detail-block li {
    margin: 4px 0;
}


@media (max-width: 760px) {

    .eu-summary-grid {
        grid-template-columns: 1fr;
    }

}


/* Link do pełnego rejestru prawnego */

.legal-register-cta-wrap {
    margin-top: 16px;
}

.legal-register-cta {
    display: inline-flex;
    align-items: center;
    padding: 10px 16px;
    border-radius: 9px;
    text-decoration: none;
    font-weight: 650;
    background: #eef3f8;
    color: #25384d;
    transition:
        background 0.15s ease,
        transform 0.15s ease;
}

.legal-register-cta:hover {
    background: #e1e9f1;
    transform: translateY(-1px);
}


/* ==========================================================
   MAIN DASHBOARD -> FULL LEGAL REGISTER
   ========================================================== */

.main-legal-register-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 38px;
    padding: 0 15px;
    margin-right: 10px;

    border: 1px solid #b8c8d8;
    border-radius: 7px;

    background: #eef4f9;
    color: #1263a0;

    font-size: 13px;
    font-weight: 650;
    text-decoration: none;

    white-space: nowrap;

    transition:
        background 0.15s ease,
        border-color 0.15s ease;
}

.main-legal-register-link:hover {
    background: #e2edf6;
    border-color: #91aec7;
}

@media (max-width: 760px) {

    .main-legal-register-link {
        margin-right: 0;
        margin-bottom: 8px;
    }

}


/* Rozróżnienie pełnego rejestru od aktów potwierdzonych */

.register-confirmed-note {
    margin-top: 5px;
    font-size: 11px;
    color: #75808c;
}

.register-confirmed-note strong {
    color: #425466;
}


/* Legal register filtering */
.legal-document[hidden] {
    display: none !important;
}

.legal-no-results[hidden] {
    display: none !important;
}


/* ==========================================================
   COMPLIANCE LEGAL AI PANEL
   ========================================================== */

.legal-ai-panel {
    background: #ffffff;
    border: 1px solid #dfe3e8;
    border-radius: 14px;
    padding: 22px;
    margin: 0 0 22px 0;
    box-shadow: 0 4px 18px rgba(16, 24, 40, 0.06);
}

.legal-ai-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 18px;
}

.legal-ai-header h2 {
    margin: 3px 0 6px 0;
    font-size: 22px;
}

.legal-ai-header p {
    margin: 0;
    color: #667085;
    line-height: 1.5;
}

.legal-ai-kicker {
    color: #2457a7;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.legal-ai-badge {
    flex: 0 0 auto;
    background: #eef4ff;
    color: #2457a7;
    border-radius: 999px;
    padding: 7px 11px;
    font-size: 12px;
    font-weight: 700;
}

#legal-ai-question {
    display: block;
    width: 100%;
    min-height: 92px;
    resize: vertical;
    border: 1px solid #cfd6df;
    border-radius: 10px;
    padding: 13px 14px;
    font: inherit;
    line-height: 1.45;
    background: #ffffff;
}

#legal-ai-question:focus {
    outline: 2px solid rgba(36, 87, 167, 0.18);
    border-color: #2457a7;
}

.legal-ai-controls {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 11px;
}

#legal-ai-submit {
    border: 0;
    border-radius: 8px;
    padding: 10px 17px;
    background: #2457a7;
    color: #ffffff;
    font-weight: 700;
    cursor: pointer;
}

#legal-ai-submit:disabled {
    opacity: 0.65;
    cursor: wait;
}

.legal-ai-hint {
    color: #667085;
    font-size: 12px;
}

.legal-ai-status {
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: 9px;
    background: #eef4ff;
    color: #344054;
    line-height: 1.45;
}

.legal-ai-status.error {
    background: #fff1f0;
    color: #b42318;
}

.legal-ai-answer-box {
    margin-top: 18px;
    border-top: 1px solid #e4e7ec;
    padding-top: 18px;
}

.legal-ai-answer-title {
    font-weight: 800;
    margin-bottom: 10px;
}

.legal-ai-answer {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    line-height: 1.58;
    color: #1d2939;
}

.legal-ai-disclaimer {
    margin-top: 18px;
    color: #667085;
    font-size: 12px;
    line-height: 1.45;
}

.legal-ai-panel[hidden],
.legal-ai-status[hidden],
.legal-ai-answer-box[hidden] {
    display: none !important;
}

@media (max-width: 720px) {

    .legal-ai-header {
        display: block;
    }

    .legal-ai-badge {
        display: inline-block;
        margin-top: 12px;
    }

    .legal-ai-controls {
        align-items: flex-start;
        flex-direction: column;
    }

}



/* ==========================================================
   COMPLIANCE LEGAL AI CHAT V2
   ========================================================== */

.legal-ai-conversation {
    margin: 18px 0;
    max-height: 560px;
    overflow-y: auto;
    padding: 4px;
}

.legal-ai-empty {
    padding: 18px;
    border: 1px dashed #d0d5dd;
    border-radius: 10px;
    color: #667085;
    background: #f9fafb;
    line-height: 1.5;
}

.legal-ai-message {
    margin: 0 0 14px 0;
    max-width: 92%;
}

.legal-ai-message.user {
    margin-left: auto;
}

.legal-ai-message.assistant {
    margin-right: auto;
}

.legal-ai-message-label {
    margin-bottom: 5px;
    font-size: 11px;
    font-weight: 800;
    color: #667085;
}

.legal-ai-message.user
.legal-ai-message-label {
    text-align: right;
}

.legal-ai-message-body {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    padding: 13px 15px;
    border-radius: 12px;
    line-height: 1.58;
}

.legal-ai-message.user
.legal-ai-message-body {
    background: #2457a7;
    color: #ffffff;
}

.legal-ai-message.assistant
.legal-ai-message-body {
    background: #f2f4f7;
    color: #1d2939;
    border: 1px solid #e4e7ec;
}

.legal-ai-source-link {
    color: #2457a7;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.legal-ai-clear {
    margin-left: auto;
    border: 0;
    background: transparent;
    color: #667085;
    cursor: pointer;
    padding: 8px 4px;
    font: inherit;
    font-size: 12px;
}

.legal-ai-clear:hover {
    color: #344054;
    text-decoration: underline;
}

.legal-ai-clear:disabled {
    opacity: 0.5;
    cursor: default;
}

@media (max-width: 720px) {

    .legal-ai-message {
        max-width: 100%;
    }

    .legal-ai-clear {
        margin-left: 0;
    }
}

