* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f4f6f9;
    color: #243447;
}

.app-shell {
    min-height: 100vh;
    display: flex;
}

.sidebar {
    width: 245px;
    background: #17365d;
    color: white;
    padding: 22px 14px;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    overflow-y: auto;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 10px 24px;
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: white;
    color: #17365d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
}

.brand-name {
    font-size: 19px;
    font-weight: 700;
}

.brand-sub {
    font-size: 11px;
    opacity: 0.75;
}

.nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-item {
    color: white;
    text-decoration: none;
    padding: 11px 12px;
    border-radius: 7px;
    font-size: 14px;
}

.nav-item:hover {
    background: rgba(255,255,255,0.12);
}

.nav-item.muted {
    opacity: 0.55;
}

.nav-separator {
    height: 1px;
    background: rgba(255,255,255,0.15);
    margin: 12px 4px;
}

.main {
    margin-left: 245px;
    width: calc(100% - 245px);
}

.topbar {
    min-height: 84px;
    background: white;
    border-bottom: 1px solid #dde3ea;
    padding: 16px 26px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.topbar h1 {
    margin: 0;
    font-size: 24px;
}

.page-subtitle {
    color: #6c7a89;
    margin: 4px 0 0;
    font-size: 13px;
}

.user-area {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 13px;
}

.logout-button {
    border: 0;
    background: #eef2f6;
    color: #243447;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
}

.content {
    padding: 24px 26px;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 22px;
}

.kpi-card {
    background: white;
    border-radius: 10px;
    border: 1px solid #e1e6eb;
    padding: 20px;
}

.kpi-label {
    color: #6c7a89;
    font-size: 13px;
}

.kpi-value {
    font-size: 30px;
    font-weight: 700;
    margin-top: 6px;
    color: #17365d;
}

.panel {
    background: white;
    border: 1px solid #e1e6eb;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.panel h2 {
    margin-top: 0;
    font-size: 18px;
}

.status-list > div {
    border-bottom: 1px solid #edf0f2;
    padding: 10px 0;
    display: flex;
    justify-content: space-between;
}

.status-list span {
    color: #2e7d32;
    font-weight: 600;
}

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

.data-table th {
    text-align: left;
    font-size: 12px;
    color: #65727e;
    background: #f7f9fb;
    padding: 11px 12px;
    border-bottom: 1px solid #dde3ea;
}

.data-table td {
    padding: 12px;
    border-bottom: 1px solid #edf0f2;
    font-size: 13px;
}

.data-table a {
    color: #1f5f99;
    text-decoration: none;
    font-weight: 600;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
}

.record-row {
    padding: 9px 0;
    border-bottom: 1px solid #edf0f2;
    display: flex;
    gap: 14px;
    align-items: center;
    flex-wrap: wrap;
}

.timeline-row {
    padding: 12px 0;
    border-bottom: 1px solid #edf0f2;
}

.timeline-row span {
    color: #74808c;
    margin-left: 10px;
    font-size: 12px;
}

.position-card {
    padding: 16px;
    margin-bottom: 12px;
    border-radius: 8px;
    border: 1px solid #e1e6eb;
    background: #fafbfd;
}

.position-card h3 {
    margin-top: 0;
}

.qualification-list {
    margin-top: 12px;
    font-size: 13px;
}

.empty-state {
    color: #8793a0;
}

.login-page {
    min-height: 100vh;
    background: #17365d;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    width: 360px;
    background: white;
    border-radius: 12px;
    padding: 34px;
    box-shadow: 0 14px 35px rgba(0,0,0,0.25);
}

.login-brand {
    font-size: 30px;
    font-weight: 700;
    color: #17365d;
    text-align: center;
}

.login-subtitle {
    text-align: center;
    color: #74808c;
    margin: 4px 0 24px;
}

.login-card label {
    display: block;
    margin: 12px 0 6px;
    font-size: 13px;
}

.login-card input {
    width: 100%;
    padding: 11px;
    border: 1px solid #ccd4dc;
    border-radius: 6px;
}

.login-card button {
    width: 100%;
    margin-top: 20px;
    padding: 11px;
    border: 0;
    border-radius: 6px;
    background: #17365d;
    color: white;
    cursor: pointer;
}

.alert {
    background: #fdecea;
    color: #9f2d25;
    padding: 10px;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 14px;
}


/* ---------------------------------------------------------
   QCRM Forms
--------------------------------------------------------- */

.form-panel {
    max-width: 1100px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 22px;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-field.form-wide {
    grid-column: 1 / -1;
}

.form-field label {
    font-size: 13px;
    font-weight: 600;
    color: #415266;
}

.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="url"],
.form-field input[type="number"],
.form-field input[type="datetime-local"],
.form-field input[type="date"],
.form-field input[type="tel"],
.form-field select,
.form-field textarea {
    width: 100%;
    min-height: 40px;
    border: 1px solid #ccd4dc;
    border-radius: 7px;
    padding: 9px 11px;
    font-family: inherit;
    font-size: 13px;
    background: white;
}

.form-field textarea {
    min-height: 100px;
    resize: vertical;
}

.form-field input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid #edf0f2;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 9px 15px;
    border-radius: 7px;
    border: 1px solid #ccd4dc;
    background: white;
    color: #243447;
    font-size: 13px;
    text-decoration: none;
    cursor: pointer;
}

.button.primary {
    background: #17365d;
    border-color: #17365d;
    color: white;
}

.button:hover {
    opacity: 0.92;
}

.help-text {
    color: #7d8994;
    font-size: 11px;
}

.field-error {
    color: #b3261e;
    font-size: 12px;
}

@media (max-width: 800px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-field.form-wide {
        grid-column: auto;
    }
}


/* ---------------------------------------------------------
   Customer 360
--------------------------------------------------------- */

.page-heading-row {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.page-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.heading-meta {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
}

.badge-neutral {
    background: #eef2f6;
    color: #465666;
}

.badge-success {
    background: #e8f5e9;
    color: #24762c;
}

.badge-warning {
    background: #fff4e5;
    color: #9a5a00;
}

.badge-danger {
    background: #fdecea;
    color: #a32c24;
}

.badge-info {
    background: #e8f2fb;
    color: #1f5f99;
}

.danger-alert {
    margin-bottom: 20px;
    border: 1px solid #f0b7b2;
}

.kpi-foot {
    margin-top: 4px;
    font-size: 11px;
    color: #7b8793;
}

.panel-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 14px;
}

.panel-heading h2 {
    margin: 0;
}

.panel-subtitle {
    color: #7b8793;
    font-size: 12px;
    margin-top: 3px;
}

.small-action {
    font-size: 12px;
    color: #1f5f99;
    text-decoration: none;
    font-weight: 600;
    white-space: nowrap;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 24px;
}

.info-grid > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-wide {
    grid-column: 1 / -1;
}

.info-label {
    color: #7a8793;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
}

.contact-card {
    border: 1px solid #e0e6ec;
    border-radius: 9px;
    background: #fafbfd;
    padding: 16px;
}

.contact-card-top {
    display: flex;
    justify-content: space-between;
    gap: 14px;
}

.contact-card h3 {
    margin: 0;
    font-size: 15px;
}

.contact-title {
    margin-top: 3px;
    color: #75818d;
    font-size: 12px;
}

.contact-data {
    margin-top: 14px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.contact-data > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.contact-data span {
    color: #7a8793;
    font-size: 10px;
    text-transform: uppercase;
}

.contact-data b {
    font-size: 12px;
    word-break: break-word;
}

.card-actions {
    display: flex;
    gap: 14px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #e5e9ed;
}

.card-actions a {
    color: #1f5f99;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
}

.mini-warning {
    margin-top: 12px;
    padding: 7px 9px;
    border-radius: 6px;
    background: #fdecea;
    color: #a32c24;
    font-size: 11px;
    font-weight: 600;
}

.subsection-title {
    margin-top: 18px;
    margin-bottom: 6px;
    color: #65727e;
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 700;
}

.evidence-row {
    padding: 14px 0;
    border-bottom: 1px solid #edf0f2;
}

.evidence-row:last-child {
    border-bottom: 0;
}

.evidence-row p {
    margin: 8px 0;
    color: #4c5c6c;
    font-size: 13px;
}

.source-footer {
    display: flex;
    gap: 20px;
    color: #84909b;
    font-size: 11px;
}

.table-subtext {
    margin-top: 3px;
    color: #8793a0;
    font-size: 10px;
    font-weight: normal;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

.filter-panel {
    padding: 16px 18px;
}

.filter-grid {
    display: grid;
    grid-template-columns:
        minmax(220px, 2fr)
        repeat(3, minmax(150px, 1fr))
        auto;
    gap: 12px;
    align-items: end;
}

.filter-actions {
    display: flex;
    gap: 8px;
    padding-bottom: 1px;
}

@media (max-width: 1100px) {
    .filter-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .filter-actions {
        grid-column: 1 / -1;
    }
}

@media (max-width: 800px) {
    .page-heading-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .page-actions {
        width: 100%;
    }

    .info-grid,
    .contact-data,
    .filter-grid {
        grid-template-columns: 1fr;
    }

    .info-wide,
    .filter-actions {
        grid-column: auto;
    }
}


/* Step 11C - Customer 360 contact person */
.badge-primary-contact {
    display: inline-block;
    margin-left: 7px;
    padding: 3px 7px;
    border-radius: 999px;
    background: #e8f1fb;
    color: #17365d;
    font-size: 10px;
    font-weight: 700;
    vertical-align: middle;
}


/* Step 12A - Project 360 */

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

.project-company-card,
.project-source-card {
    border: 1px solid #e1e6eb;
    border-radius: 9px;
    background: #fafbfd;
    padding: 16px;
}

.project-company-card h3 {
    margin: 7px 0;
}

.project-company-card a,
.project-source-card a {
    color: #1f5f99;
    text-decoration: none;
    font-weight: 600;
}

.project-company-role {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 999px;
    background: #e8f1fb;
    color: #17365d;
    font-size: 11px;
    font-weight: 700;
}

.project-role-source,
.source-dates,
.section-subtitle {
    color: #74808c;
    font-size: 12px;
    margin-top: 7px;
}

.project-source-card {
    margin-bottom: 12px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 18px;
}

.info-grid span,
.text-section > span {
    display: block;
    color: #74808c;
    font-size: 11px;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.info-grid a {
    color: #1f5f99;
    text-decoration: none;
}

.text-section {
    margin-top: 22px;
}

.panel-heading-row,
.page-heading-row,
.page-actions,
.filter-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.panel-heading-row,
.page-heading-row {
    justify-content: space-between;
}

.panel-heading-row h2 {
    margin-bottom: 2px;
}

.panel-heading-row a {
    color: #1f5f99;
    text-decoration: none;
    font-weight: 600;
}

.filter-grid {
    display: grid;
    grid-template-columns: minmax(240px, 2fr) repeat(3, minmax(150px, 1fr)) auto;
    gap: 14px;
    align-items: end;
}

@media (max-width: 1100px) {
    .filter-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}


/* =========================================================
   QCRM PROFESSIONAL FORM SYSTEM
   Step 12B
========================================================= */

.q-btn {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 42px;
    padding: 9px 17px;
    border-radius: 8px;
    border: 1px solid transparent;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        box-shadow 0.15s ease,
        transform 0.05s ease;
}

.q-btn:active {
    transform: translateY(1px);
}

.q-btn-primary {
    background: #17365d;
    border-color: #17365d;
    color: #fff;
    box-shadow: 0 2px 4px rgba(23,54,93,.14);
}

.q-btn-primary:hover {
    background: #214a7d;
    border-color: #214a7d;
    color: #fff;
}

.q-btn-secondary {
    background: #fff;
    border-color: #cfd8e3;
    color: #243447;
}

.q-btn-secondary:hover {
    background: #f6f8fb;
    border-color: #aebdcc;
    color: #17365d;
}


/* Compatibility for any older QCRM buttons */
.button-primary,
.button-secondary {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 9px 17px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.button-primary {
    background: #17365d;
    border: 1px solid #17365d;
    color: white;
}

.button-secondary {
    background: white;
    border: 1px solid #cfd8e3;
    color: #243447;
}


.q-record-form {
    width: 100%;
}

.q-record-form-narrow {
    max-width: 1050px;
}

.q-form-section {
    background: #fff;
    border: 1px solid #dfe6ee;
    border-radius: 12px;
    padding: 22px 24px;
    margin-bottom: 18px;
    box-shadow: 0 1px 2px rgba(31,45,61,.025);
}

.q-section-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #edf1f5;
}

.q-section-header h2 {
    margin: 0;
    color: #172b42;
    font-size: 17px;
    font-weight: 700;
}

.q-section-header p {
    margin: 5px 0 0;
    color: #7b8794;
    font-size: 12px;
    line-height: 1.45;
}

.q-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 18px 22px;
}

.q-field {
    min-width: 0;
}

.q-span-2 {
    grid-column: 1 / -1;
}

.q-field label {
    display: block;
    margin-bottom: 7px;
    color: #34495e;
    font-size: 12px;
    font-weight: 700;
}

.q-required {
    color: #c63737;
}

.q-field input:not([type="checkbox"]),
.q-field select,
.q-field textarea,
.q-form-section input:not([type="checkbox"]),
.q-form-section select,
.q-form-section textarea {
    width: 100%;
    border: 1px solid #cfd8e3;
    border-radius: 8px;
    background: #fff;
    color: #213547;
    font-family: inherit;
    font-size: 13px;
    outline: none;
    transition:
        border-color .15s ease,
        box-shadow .15s ease,
        background .15s ease;
}

.q-field input:not([type="checkbox"]),
.q-field select,
.q-form-section input:not([type="checkbox"]),
.q-form-section select {
    height: 43px;
    padding: 0 12px;
}

.q-field textarea,
.q-form-section textarea {
    min-height: 110px;
    padding: 11px 12px;
    resize: vertical;
    line-height: 1.45;
}

.q-field input:focus,
.q-field select:focus,
.q-field textarea:focus,
.q-form-section input:focus,
.q-form-section select:focus,
.q-form-section textarea:focus {
    border-color: #527ba5;
    box-shadow: 0 0 0 3px rgba(48,99,148,.10);
}

.q-field-help {
    margin-top: 6px;
    color: #83909d;
    font-size: 11px;
    line-height: 1.4;
}

.q-field .errorlist,
.q-form-section .errorlist {
    list-style: none;
    margin: 6px 0 0;
    padding: 0;
    color: #b3261e;
    font-size: 11px;
    font-weight: 600;
}

.q-form-footer {
    position: sticky;
    bottom: 0;
    z-index: 5;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 22px;
    padding: 14px 18px;
    background: rgba(244,246,249,.96);
    border-top: 1px solid #dce4ec;
    backdrop-filter: blur(6px);
}

.q-check-group {
    display: grid;
    grid-template-columns: 1fr;
    gap: 9px;
}

.q-check-card {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-height: 56px;
    padding: 11px 12px;
    border: 1px solid #dfe6ee;
    border-radius: 8px;
    background: #fafbfd;
    cursor: pointer;
}

.q-check-card input {
    width: 17px;
    height: 17px;
    margin-top: 2px;
}

.q-check-card span {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.q-check-card b {
    color: #34495e;
    font-size: 12px;
}

.q-check-card small {
    color: #81909e;
    font-size: 10px;
    line-height: 1.35;
}

.q-check-danger {
    border-color: #efcecb;
    background: #fffafa;
}

.q-alert {
    padding: 11px 13px;
    margin-bottom: 16px;
    border-radius: 8px;
    font-size: 12px;
}

.q-alert-danger {
    background: #fdecea;
    border: 1px solid #efb8b3;
    color: #9f2d25;
}


/* Better header action behavior */
.page-heading-row {
    width: 100%;
}

.page-heading-row > div:first-child {
    min-width: 0;
}

.page-actions {
    flex-shrink: 0;
}


/* Better project list action/filter presentation */
.filter-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}


/* Stronger status presentation */
.status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 25px;
    padding: 4px 9px;
    border-radius: 999px;
    background: #eef3f8;
    color: #3d556d;
    font-size: 11px;
    font-weight: 700;
}


@media (max-width: 900px) {

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

    .q-span-2 {
        grid-column: auto;
    }

    .q-form-section {
        padding: 18px;
    }

    .q-form-footer {
        flex-wrap: wrap;
    }

    .q-form-footer .q-btn {
        flex: 1;
    }

    .page-heading-row {
        flex-direction: column;
        align-items: flex-start;
    }
}


/* =========================================================
   STEP 13A - MARKET INTELLIGENCE
========================================================= */

.q-filter-panel {
    padding: 18px;
}

.q-intelligence-filter-grid {
    display: grid;
    grid-template-columns:
        minmax(260px, 2fr)
        repeat(4, minmax(145px, 1fr))
        auto;
    gap: 12px;
    align-items: end;
}

.q-table-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 14px;
}

.q-table-toolbar h2 {
    margin: 0;
    font-size: 17px;
}

.q-table-toolbar p {
    margin: 4px 0 0;
    color: #788591;
    font-size: 12px;
}

.q-intelligence-table td {
    vertical-align: top;
}

.q-signal-title-cell {
    min-width: 240px;
}

.q-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.q-status-new {
    background: #edf3f8;
    color: #455f77;
}

.q-status-investigating {
    background: #fff4e5;
    color: #945700;
}

.q-status-qualified {
    background: #e6f4ea;
    color: #267236;
}

.q-status-watch {
    background: #edf0ff;
    color: #4955a5;
}

.q-status-rejected {
    background: #fdebea;
    color: #a32f27;
}

.q-status-duplicate {
    background: #eeeef1;
    color: #62636b;
}

.q-score {
    display: inline-flex;
    align-items: baseline;
    gap: 2px;
}

.q-score b {
    font-size: 16px;
    color: #17365d;
}

.q-score span {
    color: #8995a0;
    font-size: 9px;
}

.q-kpi-text {
    margin-top: 12px;
    color: #17365d;
    font-size: 14px;
    font-weight: 700;
}

.q-signal-action-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
    padding: 15px 17px;
    border: 1px solid #dfe6ed;
    border-radius: 10px;
    background: white;
}

.q-signal-action-bar > div:first-child {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.q-signal-action-bar span {
    color: #7a8794;
    font-size: 11px;
}

.q-signal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.q-signal-actions form,
.q-inline-form {
    margin: 0;
}

.q-btn-success {
    background: #267236;
    border-color: #267236;
    color: white;
}

.q-btn-success:hover {
    background: #1f602d;
    color: white;
}

.q-btn-warning {
    background: #fff4e5;
    border-color: #e5c693;
    color: #8c5200;
}

.q-btn-danger {
    background: #fff;
    border-color: #e6aaa5;
    color: #a32f27;
}

.q-btn-danger:hover {
    background: #fdebea;
}

.q-alert-success {
    background: #e8f5e9;
    border: 1px solid #b9dabe;
    color: #276a30;
}

.q-signal-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 24px;
}

.q-signal-info-grid > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.q-signal-info-grid span,
.q-intelligence-summary > span {
    color: #7b8793;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.q-signal-info-grid a {
    color: #1f5f99;
    text-decoration: none;
    font-weight: 700;
}

.q-intelligence-summary {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid #edf0f2;
}

.q-intelligence-summary p {
    margin-bottom: 0;
    line-height: 1.55;
}

.q-action-recommendation {
    padding: 16px;
    border-left: 4px solid #2f6ca5;
    border-radius: 7px;
    background: #f7fafe;
    line-height: 1.55;
}

.q-rejection-box {
    margin-top: 18px;
    padding: 14px;
    border: 1px solid #edc1bd;
    border-radius: 8px;
    background: #fffafa;
    color: #8e332c;
}

.q-rejection-box p {
    margin-bottom: 0;
}

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

.q-evidence-card {
    padding: 16px;
    border: 1px solid #e0e6ec;
    border-radius: 9px;
    background: #fafbfd;
}

.q-evidence-card-header {
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

.q-evidence-card h3 {
    margin: 0;
    font-size: 14px;
}

.q-evidence-meta {
    margin-top: 4px;
    color: #85919c;
    font-size: 10px;
}

.q-reliability-badge {
    display: inline-flex;
    padding: 4px 7px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
}

.q-reliability-high {
    background: #e6f4ea;
    color: #267236;
}

.q-reliability-medium {
    background: #fff4e5;
    color: #945700;
}

.q-reliability-low {
    background: #fdebea;
    color: #a32f27;
}

.q-reliability-unknown {
    background: #eeeef1;
    color: #62636b;
}

.q-source-link {
    display: inline-block;
    margin-top: 10px;
    color: #1f5f99;
    font-size: 11px;
    text-decoration: none;
    font-weight: 700;
}

.q-evidence-card p {
    margin: 12px 0;
    font-size: 12px;
    line-height: 1.5;
}

.q-evidence-footer {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding-top: 10px;
    border-top: 1px solid #e4e9ee;
    color: #7c8995;
    font-size: 10px;
}

.q-evidence-footer a {
    color: #1f5f99;
    text-decoration: none;
    font-weight: 700;
}

.q-audit-row {
    display: grid;
    grid-template-columns: 14px 1fr;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #edf0f2;
}

.q-audit-marker {
    width: 8px;
    height: 8px;
    margin-top: 5px;
    border-radius: 50%;
    background: #5078a0;
}

.q-audit-heading {
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

.q-audit-heading b {
    font-size: 11px;
}

.q-audit-heading span,
.q-audit-user {
    color: #8a96a1;
    font-size: 10px;
}

.q-audit-row p {
    margin: 5px 0;
    font-size: 12px;
}


@media (max-width: 1250px) {

    .q-intelligence-filter-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .q-search-field {
        grid-column: span 2;
    }

    .q-intelligence-filter-grid .filter-actions {
        grid-column: 1 / -1;
    }
}


@media (max-width: 850px) {

    .q-intelligence-filter-grid {
        grid-template-columns: 1fr;
    }

    .q-search-field {
        grid-column: auto;
    }

    .q-signal-action-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .q-signal-info-grid {
        grid-template-columns: 1fr;
    }
}


/* =========================================================
   QCRM Market Intelligence - controlled assessment
   ========================================================= */

.q-system-control-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 20px;
}

.q-system-control-strip > div {
    border: 1px solid #d9e2ec;
    background: #f7f9fc;
    border-radius: 9px;
    padding: 14px 16px;
}

.q-system-control-strip span,
.q-assessment-grid span {
    display: block;
    color: #6f7f91;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 5px;
}

.q-system-control-strip b {
    color: #17365d;
    font-size: 14px;
}

.q-system-help {
    margin-top: 12px;
}

.q-assessment-pending {
    border-left: 4px solid #17365d;
}

.q-assessment-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.q-assessment-grid > div {
    border: 1px solid #d9e2ec;
    background: #f7f9fc;
    border-radius: 9px;
    padding: 18px;
}

.q-assessment-grid b {
    display: block;
    color: #17365d;
    font-size: 18px;
    margin-bottom: 6px;
}

.q-assessment-grid small {
    display: block;
    color: #74808c;
    line-height: 1.45;
}

@media (max-width: 1000px) {
    .q-system-control-strip,
    .q-assessment-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 650px) {
    .q-system-control-strip,
    .q-assessment-grid {
        grid-template-columns: 1fr;
    }
}
