* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: #f5f5f5;
    color: #222;
}

.app {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 240px;
    background: #111;
    color: white;
    padding: 30px 20px;
}

.brand {
    margin-bottom: 40px;
}

.brand-title {
    font-size: 24px;
    font-weight: bold;
}

.brand-subtitle {
    font-size: 12px;
    opacity: 0.6;
    margin-top: 5px;
}

nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

nav a {
    color: #ccc;
    text-decoration: none;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
}

nav a:hover,
nav a.active {
    background: #333;
    color: white;
}

.content {
    flex: 1;
    padding: 40px;
}

.topbar {
    margin-bottom: 30px;
}

.topbar h1 {
    font-size: 32px;
}

.topbar p {
    margin-top: 5px;
    color: #777;
}

.cards {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

.card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.card span {
    display: block;
    color: #777;
    font-size: 14px;
    margin-bottom: 15px;
}

.card strong {
    font-size: 32px;
}

.welcome {
    margin-top: 30px;
    background: white;
    padding: 30px;
    border-radius: 12px;
}

.welcome h2 {
    margin-bottom: 10px;
}

.welcome p {
    color: #666;
    line-height: 1.6;
}

@media (max-width: 1000px) {

    .cards {
        grid-template-columns: repeat(2, 1fr);
    }

}

@media (max-width: 700px) {

    .sidebar {
        display: none;
    }

    .content {
        padding: 20px;
    }

    .cards {
        grid-template-columns: 1fr;
    }

}
.topbar-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-primary {
    background: #111;
    color: white;
    border: none;
    padding: 12px 18px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

.btn-primary:hover {
    background: #333;
}

.btn-secondary {
    background: #eee;
    color: #222;
    border: none;
    padding: 12px 18px;
    border-radius: 8px;
    cursor: pointer;
}

.btn-link {
    background: none;
    border: none;
    color: #111;
    font-weight: 600;
    cursor: pointer;
}

.filters {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.filters input,
.filters select {
    background: white;
    border: 1px solid #ddd;
    padding: 12px;
    border-radius: 8px;
}

.filters input {
    flex: 1;
}

.table-wrapper {
    background: white;
    border-radius: 12px;
    overflow: hidden;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: #f4f4f4;
}

th,
td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

th {
    font-size: 12px;
    text-transform: uppercase;
    color: #777;
}

.status-badge {
    display: inline-block;
    padding: 6px 10px;
    background: #f1f1f1;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.priority {
    display: inline-flex;
    width: 28px;
    height: 28px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: bold;
}

.priority-A {
    background: #111;
    color: white;
}

.priority-B {
    background: #444;
    color: white;
}

.priority-C {
    background: #aaa;
    color: white;
}

.priority-D {
    background: #ddd;
}

.empty-state {
    text-align: center;
    color: #888;
    padding: 40px;
}

.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.hidden {
    display: none;
}

.modal-content {
    width: 100%;
    max-width: 620px;
    background: white;
    border-radius: 14px;
    padding: 28px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 25px;
}

.modal-header p {
    color: #777;
    margin-top: 5px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 30px;
    cursor: pointer;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.form-group.full {
    grid-column: 1 / -1;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
}

.form-group input,
.form-group select {
    border: 1px solid #ddd;
    padding: 12px;
    border-radius: 8px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 25px;
}

.back-row {
    margin-bottom: 20px;
}

.back-link {
    color: #666;
    text-decoration: none;
    font-size: 14px;
}

.back-link:hover {
    color: #111;
}


.client-header {
    background: white;
    padding: 28px;
    border-radius: 14px;
    margin-bottom: 24px;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

.eyebrow {
    display: block;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 1.5px;
    color: #888;
    margin-bottom: 8px;
}

.client-header h1 {
    font-size: 30px;
}

.client-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #777;
    margin-top: 8px;
    font-size: 14px;
}

.client-score {
    display: flex;
    gap: 30px;
}

.client-score div {
    min-width: 80px;
}

.client-score span {
    display: block;
    color: #888;
    font-size: 12px;
    margin-bottom: 5px;
}

.client-score strong {
    font-size: 28px;
}


.panel {
    background: white;
    padding: 26px;
    border-radius: 14px;
    margin-bottom: 24px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
}

.section-header h2 {
    font-size: 20px;
}

.section-header p {
    color: #888;
    font-size: 13px;
    margin-top: 5px;
}


.stage-control {
    display: flex;
    gap: 12px;
}

.stage-control select {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 12px;
    background: white;
}


.client-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}


.empty-box {
    background: #f7f7f7;
    border: 1px dashed #d7d7d7;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
}

.empty-box.compact {
    padding: 24px;
}

.empty-box strong {
    display: block;
    margin-bottom: 7px;
}

.empty-box p {
    color: #777;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 18px;
}


.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.info-item {
    border-bottom: 1px solid #eee;
    padding-bottom: 14px;
}

.info-item span {
    display: block;
    color: #888;
    font-size: 12px;
    margin-bottom: 5px;
}

.info-item strong {
    font-size: 14px;
}


.history-item {
    position: relative;
    display: flex;
    gap: 15px;
    padding: 0 0 24px 3px;
}

.history-item:not(:last-child)::before {
    content: "";
    position: absolute;
    left: 8px;
    top: 16px;
    bottom: 0;
    width: 1px;
    background: #ddd;
}

.history-dot {
    width: 12px;
    height: 12px;
    background: #111;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 4px;
    z-index: 1;
}

.history-date {
    color: #999;
    font-size: 11px;
    margin-bottom: 5px;
}

.history-item strong {
    font-size: 14px;
    font-weight: 500;
}

.empty-history {
    color: #888;
    padding: 15px 0;
}


.hidden {
    display: none !important;
}


@media (max-width: 900px) {

    .client-grid {
        grid-template-columns: 1fr;
    }

    .client-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 25px;
    }

}

.map-content {
    max-width: 1100px;
}

.map-header {
    margin-bottom: 30px;
}

.map-header h1 {
    font-size: 36px;
    margin-bottom: 5px;
}

.map-header > p {
    color: #777;
}

.map-client {
    margin-top: 18px;
    display: inline-block;
    background: #ededed;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
}

.form-section {
    position: relative;
}

.section-number {
    font-size: 11px;
    letter-spacing: 2px;
    color: #999;
    font-weight: 700;
    margin-bottom: 8px;
}

.form-group textarea {
    width: 100%;
    border: 1px solid #ddd;
    padding: 12px;
    border-radius: 8px;
    font-family: inherit;
    resize: vertical;
}

.map-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-bottom: 50px;
}

.map-submit {
    min-width: 240px;
}

.activity-create-button {
    width: 100%;
    margin-top: 12px;
}

.next-activity-card {
    border: 1px solid #ddd;
    border-left: 4px solid #777;
    border-radius: 10px;
    padding: 20px;
}

.next-activity-card h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.next-activity-card p {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 15px;
}

.activity-label {
    display: inline-block;
    background: #eee;
    padding: 5px 9px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: bold;
    margin-bottom: 12px;
}

.activity-date {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 15px;
}

.activity-overdue {
    border-left-color: #222;
    background: #fafafa;
}

.activity-overdue .activity-label {
    background: #222;
    color: white;
}

.activity-today {
    border-left-width: 6px;
}

.activity-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 24px;
}

.activity-stat-card {
    background: white;
    padding: 22px;
    border-radius: 12px;
    border: 1px solid #eee;
    cursor: pointer;
    transition: 0.2s ease;
}

.activity-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 18px rgba(0,0,0,0.06);
}

.activity-stat-card span {
    display: block;
    color: #777;
    font-size: 13px;
    margin-bottom: 10px;
}

.activity-stat-card strong {
    font-size: 30px;
}

.activity-stat-card.critical {
    border-top: 4px solid #222;
}

.activity-stat-card.warning {
    border-top: 4px solid #888;
}


.activity-toolbar {
    margin-bottom: 20px;
}

.activity-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.activity-tab {
    border: 1px solid #ddd;
    background: white;
    padding: 9px 14px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
}

.activity-tab:hover {
    border-color: #999;
}

.activity-tab.active {
    background: #111;
    color: white;
    border-color: #111;
}


.activity-row {
    display: grid;
    grid-template-columns: 100px 1fr auto;
    gap: 20px;
    align-items: center;

    padding: 20px 0;

    border-bottom: 1px solid #eee;
}

.activity-row:last-child {
    border-bottom: none;
}


.activity-time span {
    display: block;

    color: #888;

    font-size: 11px;
    font-weight: 700;

    text-transform: uppercase;

    margin-bottom: 5px;
}

.activity-time strong {
    font-size: 17px;
}


.activity-main h3 {
    font-size: 16px;
    margin-bottom: 6px;
}

.activity-main > p {
    color: #777;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 10px;
}


.activity-client-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.activity-client-meta span,
.activity-client-meta strong {
    font-size: 11px;

    background: #f3f3f3;

    padding: 5px 8px;

    border-radius: 20px;
}


.activity-row-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}


.activity-link {
    text-decoration: none;
    display: inline-block;
}


.activity-row.overdue {
    border-left: 4px solid #222;
    padding-left: 16px;
}

.activity-row.today {
    background: #fafafa;
    padding-left: 12px;
    padding-right: 12px;
    border-radius: 8px;
}

.activity-row.completed {
    opacity: 0.55;
}

.activity-row.no-action {
    border-left: 4px solid #999;
    padding-left: 16px;
}


.activity-empty {
    text-align: center;
    padding: 50px 20px;
}

.activity-empty strong {
    display: block;
    margin-bottom: 7px;
}

.activity-empty p {
    color: #888;
    font-size: 14px;
}


@media (max-width: 1000px) {

    .activity-stats {
        grid-template-columns:
            repeat(2, 1fr);
    }

}


@media (max-width: 750px) {

    .activity-stats {
        grid-template-columns: 1fr;
    }

    .activity-row {
        grid-template-columns: 1fr;
    }

    .activity-row-actions {
        justify-content: flex-start;
    }

}

.funnel-content {
    min-width: 0;
    overflow: hidden;
}

.funnel-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 22px;
}

.funnel-summary > div {
    background: white;
    border-radius: 12px;
    padding: 18px;
    border: 1px solid #eee;
}

.funnel-summary span {
    display: block;
    color: #777;
    font-size: 12px;
    margin-bottom: 8px;
}

.funnel-summary strong {
    font-size: 26px;
}


.funnel-view-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.funnel-view-button {
    background: white;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 9px 15px;
    cursor: pointer;
}

.funnel-view-button.active {
    background: #111;
    color: white;
    border-color: #111;
}


.funnel-board {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    align-items: flex-start;

    padding-bottom: 25px;
}


.funnel-column {
    width: 290px;
    min-width: 290px;

    background: #ededed;
    border-radius: 12px;

    padding: 12px;
}


.funnel-column-wide {
    width: 100%;
    min-width: 500px;
}


.funnel-column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 8px 5px 14px;
}

.funnel-column-header h2 {
    font-size: 14px;
}

.funnel-column-header span {
    display: flex;

    align-items: center;
    justify-content: center;

    min-width: 25px;
    height: 25px;

    background: white;
    border-radius: 50%;

    font-size: 11px;
    font-weight: bold;
}


.funnel-dropzone {
    min-height: 180px;
    border-radius: 8px;
    transition: 0.15s ease;
}

.funnel-dropzone.drag-over {
    background: #ddd;
}


.funnel-card {
    background: white;

    border-radius: 10px;
    padding: 16px;

    margin-bottom: 10px;

    border: 1px solid #e2e2e2;

    cursor: grab;

    transition: 0.15s ease;
}

.funnel-card:hover {
    box-shadow:
        0 4px 14px
        rgba(0,0,0,0.06);
}

.funnel-card.dragging {
    opacity: 0.4;
}

.funnel-card.stalled {
    border-left:
        4px solid #222;
}


.funnel-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;

    margin-bottom: 6px;
}

.funnel-card-header a {
    color: #111;
    text-decoration: none;

    font-size: 14px;
    font-weight: 700;
}


.funnel-score {
    color: #888;
    font-size: 11px;

    margin-bottom: 18px;
}


.funnel-card-section {
    padding-top: 12px;
    border-top: 1px solid #eee;
}

.funnel-card-section > span {
    display: block;

    color: #999;

    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.7px;

    margin-bottom: 5px;
}

.funnel-card-section strong {
    display: block;

    font-size: 12px;
    line-height: 1.4;
}

.funnel-card-section small {
    display: block;

    margin-top: 4px;

    color: #777;
}


.funnel-no-action {
    color: #666;
}


.funnel-card-footer {
    margin-top: 15px;

    padding-top: 10px;

    border-top: 1px solid #eee;
}

.funnel-card-footer span {
    color: #888;
    font-size: 10px;
}


.funnel-empty-column {
    padding: 30px 10px;

    text-align: center;

    color: #999;
    font-size: 11px;

    border:
        1px dashed #ccc;

    border-radius: 8px;
}


@media (max-width: 1000px) {

    .funnel-summary {
        grid-template-columns:
            repeat(2, 1fr);
    }

}


@media (max-width: 700px) {

    .funnel-summary {
        grid-template-columns: 1fr;
    }

}

.dashboard-alerts {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.dashboard-alert-card {
    display: block;
    text-decoration: none;
    color: inherit;

    background: white;

    border: 1px solid #eee;
    border-top: 4px solid #ddd;

    border-radius: 12px;

    padding: 20px;

    transition: 0.2s ease;
}

.dashboard-alert-card:hover {
    transform: translateY(-2px);

    box-shadow:
        0 5px 18px
        rgba(0,0,0,0.05);
}

.dashboard-alert-card.critical {
    border-top-color: #222;
}

.dashboard-alert-card.warning {
    border-top-color: #777;
}

.dashboard-alert-card > span {
    display: block;

    color: #777;

    font-size: 12px;

    margin-bottom: 8px;
}

.dashboard-alert-card > strong {
    display: block;

    font-size: 30px;

    margin-bottom: 4px;
}

.dashboard-alert-card > small {
    color: #999;
    font-size: 11px;
}


.dashboard-grid {
    display: grid;

    grid-template-columns:
        minmax(0, 1.5fr)
        minmax(280px, 1fr);

    gap: 20px;

    margin-bottom: 24px;
}

.dashboard-link {
    color: #555;

    font-size: 12px;

    text-decoration: none;
}

.dashboard-link:hover {
    text-decoration: underline;
}


.dashboard-funnel-row,
.dashboard-demand-row {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 20px;

    padding: 11px 0;

    border-bottom: 1px solid #eee;
}

.dashboard-funnel-row:last-child,
.dashboard-demand-row:last-child {
    border-bottom: none;
}

.dashboard-funnel-row span,
.dashboard-demand-row span {
    color: #555;
    font-size: 13px;
}

.dashboard-funnel-row strong,
.dashboard-demand-row strong {
    font-size: 14px;
}


.priority-overview {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.priority-overview > div {
    background: #f5f5f5;

    border-radius: 10px;

    padding: 18px;
}

.priority-overview span {
    display: block;

    font-size: 11px;
    color: #888;

    margin-bottom: 6px;
}

.priority-overview strong {
    font-size: 26px;
}


.top-budget {
    min-height: 150px;

    display: flex;

    flex-direction: column;

    align-items: flex-start;
    justify-content: center;
}

.top-budget strong {
    font-size: 26px;
    line-height: 1.2;

    margin-bottom: 8px;
}

.top-budget span {
    color: #888;
    font-size: 13px;
}


.dashboard-base-stats {
    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 16px;

    padding-bottom: 40px;
}

.dashboard-base-stats > div {
    background: white;

    border: 1px solid #eee;

    border-radius: 12px;

    padding: 18px;
}

.dashboard-base-stats span {
    display: block;

    color: #888;

    font-size: 11px;

    margin-bottom: 7px;
}

.dashboard-base-stats strong {
    font-size: 23px;
}


.dashboard-empty {
    padding: 30px 0;

    color: #999;

    font-size: 13px;
}


@media (max-width: 1100px) {

    .dashboard-alerts {
        grid-template-columns:
            repeat(2, 1fr);
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-base-stats {
        grid-template-columns:
            repeat(2, 1fr);
    }

}


@media (max-width: 650px) {

    .dashboard-alerts,
    .dashboard-base-stats {
        grid-template-columns: 1fr;
    }

}

.sidebar {
    display: flex;
    flex-direction: column;
}

.sidebar nav {
    flex: 1;
}

.sidebar nav a,
.sidebar nav span {
    position: relative;
}

.sidebar nav .nav-disabled {
    display: flex;
    align-items: center;
    justify-content: space-between;

    opacity: 0.4;
    cursor: default;
}

.sidebar nav .nav-disabled small {
    font-size: 8px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}


.sidebar-footer {
    padding-top: 20px;
    margin-top: auto;

    border-top:
        1px solid rgba(255,255,255,0.08);
}

.sidebar-footer span,
.sidebar-footer small {
    display: block;
}

.sidebar-footer span {
    font-size: 11px;
    font-weight: 600;

    margin-bottom: 4px;
}

.sidebar-footer small {
    font-size: 9px;

    opacity: 0.45;

    text-transform: uppercase;
    letter-spacing: 0.7px;
}


/* TOAST */

.toast-container {
    position: fixed;

    top: 24px;
    right: 24px;

    z-index: 9999;

    display: flex;
    flex-direction: column;
    gap: 10px;

    pointer-events: none;
}


.toast {
    min-width: 280px;
    max-width: 420px;

    display: flex;
    align-items: center;
    gap: 12px;

    background: #111;
    color: white;

    padding: 14px 16px;

    border-radius: 10px;

    box-shadow:
        0 10px 35px
        rgba(0,0,0,0.18);

    font-size: 13px;

    opacity: 0;

    transform:
        translateY(-10px);

    transition:
        opacity 0.2s ease,
        transform 0.2s ease;
}


.toast-visible {
    opacity: 1;

    transform:
        translateY(0);
}


.toast-indicator {
    width: 7px;
    height: 7px;

    flex-shrink: 0;

    border-radius: 50%;

    background: white;
}


.toast-error {
    background: #222;
}


@media (max-width: 650px) {

    .toast-container {
        left: 15px;
        right: 15px;
        top: 15px;
    }

    .toast {
        min-width: 0;
        max-width: none;
        width: 100%;
    }

}

.button-loading {
    opacity: 0.65;
    cursor: wait !important;
}

button:disabled {
    pointer-events: none;
}

.property-search-card {
    padding: 20px;

    border: 1px solid #e8e8e8;

    border-radius: 12px;

    background: #fafafa;
}


.property-search-top {
    display: flex;

    align-items: flex-start;
    justify-content: space-between;

    gap: 20px;
}


.property-search-label {
    display: block;

    margin-bottom: 6px;

    font-size: 10px;

    letter-spacing: 0.8px;

    color: #999;
}


.property-search-card h3 {
    margin: 0;

    font-size: 17px;
}


.property-search-actions {
    margin-top: 18px;
}


.status-badge {
    display: inline-flex;

    align-items: center;

    padding: 6px 10px;

    border-radius: 999px;

    background: #eee;

    font-size: 10px;

    color: #555;
}

.research-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.7fr);
    gap: 20px;
    margin-bottom: 20px;
}


.research-map-summary {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}


.research-map-item {
    padding: 14px;
    border-radius: 10px;
    background: #f7f7f7;
}


.research-map-item span {
    display: block;
    margin-bottom: 5px;
    font-size: 10px;
    color: #999;
    text-transform: uppercase;
}


.research-map-item strong {
    font-size: 13px;
    line-height: 1.4;
}


.research-status {
    display: flex;
    align-items: flex-end;
    gap: 12px;
}


.research-status > div {
    flex: 1;
}


.research-status span {
    display: block;
    margin-bottom: 7px;
    font-size: 10px;
    color: #888;
}


.research-status select {
    width: 100%;
}


.opportunities-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}


.opportunity-card {
    padding: 18px;

    border: 1px solid #5c5b5b;
    border-radius: 12px;

    background: #fff;

    box-shadow: 0 12px 2px rgba(0,0,0,.04),
        0 4px 12px rgba(0,0,0,.03);
}


.opportunity-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}


.opportunity-card h3 {
    margin: 0 0 5px;
    font-size: 16px;
}


.opportunity-card p {
    margin: 0;
    color: #888;
    font-size: 11px;
}


.adherence-score {
    min-width: 65px;
    text-align: right;
}


.adherence-score strong {
    display: block;
    font-size: 22px;
}


.adherence-score span {
    display: block;
    font-size: 9px;
    color: #999;
}


.opportunity-price {
    margin: 18px 0 12px;
    font-size: 20px;
    font-weight: 700;
}


.opportunity-details {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}


.opportunity-details span {
    padding: 5px 8px;
    border-radius: 6px;
    background: #f3f3f3;
    font-size: 10px;
}


.opportunity-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 10px;

    margin-top: 18px;
    padding-top: 14px;

    border-top: 1px solid #eee;
}


.opportunity-card-footer select {
    max-width: 150px;
}


/* =========================================
   MODAL DE OPORTUNIDADE
   ========================================= */

.opportunity-modal {
    display: none;

    position: fixed;
    inset: 0;

    z-index: 10000;

    background:
        rgba(0, 0, 0, 0.55);

    padding: 30px 20px;

    overflow-y: auto;

    align-items: flex-start;
    justify-content: center;
}


.opportunity-modal.active {
    display: flex;
}


.opportunity-modal .opportunity-modal-content {
    position: relative;

    width: min(100%, 720px);
    max-width: 720px;

    margin: auto;

    padding: 24px;

    background: #fff;

    border-radius: 14px;

    box-sizing: border-box;
}


body.modal-open {
    overflow: hidden;
}


/* FORMULÁRIO DO MODAL */

.opportunity-modal .form-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 14px;

    margin-top: 20px;
}


.opportunity-modal .form-group {
    min-width: 0;
}


.opportunity-modal .form-full {
    grid-column: 1 / -1;
}


.opportunity-modal input,
.opportunity-modal select,
.opportunity-modal textarea {
    width: 100%;

    box-sizing: border-box;
}


.opportunity-modal textarea {
    resize: vertical;

    min-height: 80px;
}


.opportunity-modal .modal-actions {
    display: flex;

    align-items: center;
    justify-content: flex-end;

    flex-wrap: wrap;

    gap: 10px;

    margin-top: 22px;

    padding-top: 18px;

    border-top: 1px solid #eee;
}


.opportunity-modal .modal-close {
    width: 36px;
    height: 36px;

    display: inline-flex;

    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    border: 0;
    border-radius: 8px;

    background: #f2f2f2;

    cursor: pointer;

    font-size: 20px;
    line-height: 1;
}


/* NOTEBOOK / TELAS MENORES */

@media (max-width: 800px) {

    .opportunity-modal {
        padding: 16px;
    }

    .opportunity-modal .opportunity-modal-content {
        width: 100%;

        padding: 18px;
    }

}


/* CELULAR */

@media (max-width: 600px) {

    .opportunity-modal .form-grid {
        grid-template-columns: 1fr;
    }

    .opportunity-modal .form-full {
        grid-column: auto;
    }

    .opportunity-modal .modal-actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .opportunity-modal .modal-actions button {
        width: 100%;
    }

}

/* =========================================
   LAYOUT - PÁGINA PESQUISA IMOBILIÁRIA
   ========================================= */

.research-page {
    margin: 0;
    min-height: 100vh;

    display: flex;
    align-items: stretch;

    background: #f5f5f5;
}


.research-page .sidebar {
    width: 260px;
    min-width: 260px;

    min-height: 100vh;

    flex-shrink: 0;

    position: sticky;
    top: 0;
    align-self: flex-start;

    box-sizing: border-box;
}


.research-page .content {
    flex: 1;

    min-width: 0;

    padding: 38px 42px;

    box-sizing: border-box;
}


/* Cabeçalho da pesquisa */

.research-page .topbar {
    margin: 0 0 28px;
    padding: 0;

    min-height: auto;
}


/* Painéis */

.research-page .panel {
    box-sizing: border-box;
}


/* Desktop menor / notebook */

@media (max-width: 1100px) {

    .research-page .content {
        padding: 28px 24px;
    }

}


/* Mobile */

@media (max-width: 750px) {

    .research-page {
        display: block;
    }

    .research-page .sidebar {
        width: 100%;
        min-width: 0;
        min-height: auto;

        position: relative;
    }

    .research-page .content {
        width: 100%;

        padding: 22px 16px;
    }

}

/* =========================================
   ADERÊNCIA DA OPORTUNIDADE
   ========================================= */

.adherence-score {
    min-width: 72px;

    padding: 8px 10px;

    border: 1px solid #e5e5e5;
    border-radius: 10px;

    background: #fafafa;

    cursor: pointer;

    text-align: right;
}


.adherence-score strong {
    display: block;

    font-size: 21px;

    color: #111;
}


.adherence-score span {
    display: block;

    margin-top: 2px;

    font-size: 9px;

    color: #888;
}


.adherence-score:hover {
    background: #f2f2f2;
}


.adherence-details {
    display: none;

    margin-top: 16px;

    padding: 16px;

    border-radius: 10px;

    background: #f7f7f7;
}


.adherence-details.active {
    display: block;
}


.adherence-details-header {
    margin-bottom: 14px;
}


.adherence-details-header div {
    display: flex;

    align-items: baseline;

    gap: 8px;
}


.adherence-details-header strong {
    font-size: 22px;
}


.adherence-details-header span {
    font-size: 10px;

    color: #777;

    text-transform: uppercase;
}


.adherence-reasons {
    display: flex;

    flex-direction: column;

    gap: 8px;
}


.adherence-reason {
    display: grid;

    grid-template-columns:
        24px 1fr auto;

    align-items: center;

    gap: 9px;

    padding: 10px;

    background: #fff;

    border-radius: 8px;
}


.adherence-reason-icon {
    display: flex;

    align-items: center;
    justify-content: center;

    width: 22px;
    height: 22px;

    border-radius: 50%;

    background: #eee;

    font-size: 12px;
}


.adherence-reason strong {
    display: block;

    font-size: 11px;
}


.adherence-reason p {
    margin: 2px 0 0;

    font-size: 10px;

    color: #777;
}


.adherence-reason b {
    font-size: 11px;
}

/* =========================================
   MOTOR DE BUSCA
   ========================================= */

.search-engine-panel {
    margin-bottom: 20px;
}


.search-criteria {
    display: flex;

    flex-wrap: wrap;

    gap: 10px;
}


.search-criterion {
    min-width: 130px;

    padding: 12px 14px;

    border: 1px solid #e8e8e8;
    border-radius: 10px;

    background: #fafafa;
}


.search-criterion span {
    display: block;

    margin-bottom: 4px;

    font-size: 9px;

    color: #999;

    text-transform: uppercase;
}


.search-criterion strong {
    display: block;

    font-size: 12px;
}


.search-warnings {
    display: flex;

    flex-direction: column;

    gap: 4px;

    margin-top: 14px;
}


.search-warnings strong {
    font-size: 10px;
}


.search-warnings span {
    font-size: 10px;

    color: #777;
}

/* =========================================
   RESULTADOS DOS PROVIDERS
   ========================================= */

.provider-search-results {
    margin-top: 20px;
}


.provider-results-header {
    margin-bottom: 12px;
}


.provider-results-header h3 {
    margin: 3px 0 0;
}


.provider-results-grid {
    display: grid;

    grid-template-columns:
        repeat(
            auto-fit,
            minmax(190px, 1fr)
        );

    gap: 12px;
}


.provider-result-card {
    padding: 16px;

    border: 1px solid #e6e6e6;
    border-radius: 12px;

    background: #fff;
}


.provider-label {
    display: block;

    margin-bottom: 8px;

    font-size: 9px;

    color: #999;

    text-transform: uppercase;
}


.provider-result-card strong {
    display: block;

    margin-bottom: 6px;

    font-size: 14px;
}


.provider-result-card p {
    margin: 0 0 12px;

    font-size: 10px;

    color: #777;

    line-height: 1.4;
}


.provider-result-card .secondary-button {
    display: inline-flex;

    align-items: center;

    justify-content: center;

    text-decoration: none;
}

.url-import-row {
    display: grid;

    grid-template-columns:
        1fr auto;

    gap: 8px;

    align-items: center;
}


.url-import-row input {
    width: 100%;
}


.url-import-status {
    display: block;

    min-height: 16px;

    margin-top: 6px;

    font-size: 10px;

    color: #777;
}


.url-import-status strong {
    color: #111;
}


@media (max-width: 600px) {

    .url-import-row {
        grid-template-columns: 1fr;
    }

}

.raw-import-actions {
    display: flex;
    align-items: center;
    gap: 10px;

    margin-top: 8px;
}


.raw-import-actions .url-import-status {
    margin-top: 0;
}

.opportunity-footer-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* =========================================================
   SA CORE — BOTÕES DE AÇÃO
   ========================================================= */

.text-button,
.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;

    min-height: 38px;
    padding: 8px 14px;

    border-radius: 9px;
    border: 1px solid #e4e4e7;

    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;

    text-decoration: none;
    cursor: pointer;

    transition:
        background-color 0.18s ease,
        border-color 0.18s ease,
        transform 0.18s ease;
}


/* AÇÃO SECUNDÁRIA / EDITAR */

.text-button {
    background: #ffffff;
    color: #52525b;
}

.text-button:hover {
    background: #f4f4f5;
    border-color: #d4d4d8;
    color: #18181b;
}


/* AÇÃO PRINCIPAL */

.secondary-button {
    background: #18181b;
    border-color: #18181b;
    color: #ffffff;
}

.secondary-button:hover {
    background: #27272a;
    border-color: #27272a;
    color: #ffffff;
}


/* Clique */

.text-button:active,
.secondary-button:active {
    transform: translateY(1px);
}


/* =========================================================
   FOOTER DAS OPORTUNIDADES
   ========================================================= */

.opportunity-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.opportunity-footer-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}


/* SELECT DE STATUS */

.opportunity-card-footer select {
    min-height: 38px;
    padding: 7px 34px 7px 12px;

    border: 1px solid #e4e4e7;
    border-radius: 9px;

    background: #ffffff;
    color: #18181b;

    font-family: inherit;
    font-size: 12px;
    font-weight: 600;

    cursor: pointer;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 640px) {

    .opportunity-card-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .opportunity-footer-actions {
        width: 100%;
    }

    .opportunity-footer-actions .text-button,
    .opportunity-footer-actions .secondary-button {
        flex: 1;
    }

}

/* =========================================================
   PESQUISA — AÇÕES PRINCIPAIS
   ========================================================= */

/* Buscar oportunidades */

#searchOpportunitiesButton {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    min-height: 42px;
    padding: 10px 18px;

    background: #18181b;
    color: #ffffff;

    border: 1px solid #18181b;
    border-radius: 10px;

    font-family: inherit;
    font-size: 13px;
    font-weight: 600;

    cursor: pointer;

    transition:
        background-color 0.18s ease,
        border-color 0.18s ease,
        transform 0.18s ease;
}

#searchOpportunitiesButton:hover {
    background: #27272a;
    border-color: #27272a;
}

#searchOpportunitiesButton:active {
    transform: translateY(1px);
}


/* + Adicionar oportunidade */

#addOpportunityButton {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;

    min-height: 42px;
    padding: 10px 16px;

    background: #ffffff;
    color: #18181b;

    border: 1px solid #d4d4d8;
    border-radius: 10px;

    font-family: inherit;
    font-size: 13px;
    font-weight: 600;

    cursor: pointer;

    transition:
        background-color 0.18s ease,
        border-color 0.18s ease,
        transform 0.18s ease;
}

#addOpportunityButton:hover {
    background: #f4f4f5;
    border-color: #a1a1aa;
}

#addOpportunityButton:active {
    transform: translateY(1px);
}

/* =========================================================
   CONTROLE DA PESQUISA — STATUS
   ========================================================= */

#searchStatus {
    width: 100%;
    min-height: 48px;

    padding: 0 42px 0 14px;

    background-color: #ffffff;
    color: #18181b;

    border: 1px solid #d4d4d8;
    border-radius: 10px;

    font-family: inherit;
    font-size: 14px;
    font-weight: 600;

    cursor: pointer;
    outline: none;

    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        background-color 0.18s ease;
}

#searchStatus:hover {
    border-color: #a1a1aa;
}

#searchStatus:focus {
    border-color: #18181b;
    box-shadow: 0 0 0 3px rgba(24, 24, 27, 0.08);
}

.presentation-select-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 38px;
    padding: 8px 13px;

    background: #ffffff;
    color: #52525b;

    border: 1px solid #d4d4d8;
    border-radius: 9px;

    font-family: inherit;
    font-size: 13px;
    font-weight: 600;

    cursor: pointer;

    transition:
        background-color 0.18s ease,
        border-color 0.18s ease,
        color 0.18s ease;
}

.presentation-select-button:hover {
    background: #f4f4f5;
    border-color: #a1a1aa;
}

.presentation-select-button.selected {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #166534;
}

/* =========================================================
   CURADORIA DO CLIENTE
   ========================================================= */

.curation-panel {
    margin-bottom: 24px;
    padding: 22px 24px;

    background: #fafafa;

    border: 1px solid #d4d4d8;
    border-radius: 14px;
}

.curation-panel-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.curation-panel h3 {
    margin: 4px 0 6px;

    color: #18181b;

    font-size: 18px;
    font-weight: 700;
}

.curation-panel p {
    margin: 0;

    color: #71717a;

    font-size: 13px;
}

@media (max-width: 700px) {

    .curation-panel-content {
        align-items: stretch;
        flex-direction: column;
    }

    .curation-panel .secondary-button {
        width: 100%;
    }

}

