.logo .brandmark {
    width: 34px;
    height: 34px;
    margin: 0;
    overflow: hidden;
}

.brandmark.has-image {
    padding: 0;
    border: 1px solid var(--line);
    background: #fff;
}

.brandmark img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.auth-card .brand-login-mark {
    width: 64px;
    height: 64px;
    margin: auto;
    border-radius: 16px;
}

.settings-card {
    margin-bottom: 18px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--card);
    box-shadow: var(--shadow);
}

.settings-card-head,
.settings-card-head > div,
.brand-preview,
.settings-actions,
.copy-field {
    display: flex;
    align-items: center;
}

.settings-card-head {
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
}

.settings-card-head > div {
    gap: 12px;
}

.settings-card-head h2,
.settings-card-head p {
    margin: 0;
}

.settings-card-head h2 {
    font-size: 18px;
}

.settings-card-head p {
    margin-top: 4px;
    color: var(--muted);
}

.settings-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    flex: none;
    border-radius: 12px;
    background: #eeeeff;
    color: var(--brand);
    font-size: 22px;
    font-weight: 850;
}

.settings-icon.facebook {
    background: #e9f1ff;
    color: #1877f2;
    font-family: Arial, sans-serif;
}

.brand-preview {
    gap: 9px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--bg);
}

.brand-preview .settings-brand-mark {
    width: 38px;
    height: 38px;
    margin: 0;
    border-radius: 10px;
}

.settings-form {
    margin-top: 0;
}

.settings-form label small {
    font-weight: 400;
}

.settings-actions {
    justify-content: flex-end;
    gap: 9px;
}

.settings-actions button {
    margin: 0 !important;
}

.facebook-connect {
    background: #1877f2;
}

.connection-state {
    padding: 6px 10px;
    border-radius: 999px;
    background: #fff3dc;
    color: #915f00;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.connection-state.ready {
    background: #e7f8ef;
    color: #17734a;
}

.settings-notice {
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: 10px;
    background: #e7f8ef;
    color: #17734a;
    font-weight: 700;
}

.settings-notice.error {
    background: #fff0f0;
    color: #b42318;
}

.facebook-steps {
    margin-bottom: 20px;
    padding: 16px;
    border: 1px solid #d9e7ff;
    border-radius: 13px;
    background: #f6f9ff;
}

.dark .facebook-steps {
    border-color: #2b4163;
    background: #1d2636;
}

.facebook-steps ol {
    margin: 10px 0 15px;
    padding-inline-start: 22px;
    color: var(--muted);
}

.facebook-steps li + li {
    margin-top: 5px;
}

.copy-field {
    gap: 7px;
}

.copy-field input {
    direction: ltr;
    unicode-bidi: isolate;
    font-family: Consolas, monospace;
    font-size: 12px;
}

.copy-field button {
    flex: none;
    margin: 0 !important;
}

.status-save-button {
    min-height: 36px;
    margin: 0 !important;
    padding: 7px 11px;
    border-radius: 8px;
    white-space: nowrap;
    font-size: 12px;
    font-weight: 800;
}

.lead-details .card-status-form,
.followup-details .card-status-form {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 6px;
}

.lead-details .card-status-form .auto-save-state,
.followup-details .card-status-form .auto-save-state {
    display: none;
}

.lead-job-title {
    display: inline-flex;
    align-items: center;
    margin-inline-start: 6px;
    padding: 3px 8px;
    border: 1px solid #dfe1f7;
    border-radius: 999px;
    background: #f5f5ff;
    color: var(--brand);
    font-size: 11px;
    font-weight: 750;
    vertical-align: middle;
}

.dark .lead-job-title {
    border-color: #393c57;
    background: #242738;
}

.results-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 0 0 12px;
}

.results-head .view-switch {
    margin: 0;
}

.filter-count {
    display: flex;
    align-items: baseline;
    gap: 7px;
    color: var(--muted);
}

.filter-count strong {
    color: var(--text);
    font-size: 22px;
}

.bulk-bar {
    margin: 0 0 16px;
}

.card-status-form {
    position: relative;
    display: grid;
    gap: 3px;
    margin: 0;
}

.card-status-form select {
    min-height: 38px;
    padding: 7px 30px 7px 9px;
    border-color: #dfe1f7;
    background: #f7f7ff;
    color: var(--brand);
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.dark .card-status-form select {
    border-color: #393c57;
    background: #242738;
}

.card-status-form.is-saving select {
    opacity: .65;
}

.card-status-form.is-saved select {
    border-color: #30a46c;
    background: #eaf8f0;
    color: #17734a;
}

.card-status-form.is-error select {
    border-color: #d92d20;
}

.auto-save-state {
    min-height: 15px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
}

.card-status-form.is-saved .auto-save-state {
    color: #17734a;
}

.card-status-form.is-error .auto-save-state {
    color: #b42318;
}

.followup-details {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.feedback-action-group {
    display: block;
}

.mobile-edit {
    display: none;
}

.action-icon img {
    display: block;
    object-fit: contain;
}

.dashboard-live {
    padding: 7px 11px;
    border-radius: 999px;
    background: #e8f8ef;
    color: #17734a;
    font-size: 12px;
    font-weight: 800;
}

.report-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 15px;
    margin-bottom: 16px;
}

.report-kpis article {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: var(--card);
    box-shadow: var(--shadow);
}

.report-kpi-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    flex: none;
    border-radius: 12px;
    background: #eeeeff;
    color: var(--brand);
    font-size: 20px;
    font-weight: 850;
}

.dark .report-kpi-icon {
    background: #292c42;
}

.report-kpis small,
.report-kpis strong {
    display: block;
}

.report-kpis strong {
    margin-top: 3px;
    font-size: 25px;
    line-height: 1.1;
}

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

.report-card {
    min-width: 0;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--card);
    box-shadow: var(--shadow);
}

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

.report-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.report-head h2,
.report-head p {
    margin: 0;
}

.report-head h2 {
    font-size: 16px;
}

.report-head p {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

.report-head > b {
    color: var(--brand);
    font-size: 24px;
}

.column-chart {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 12px;
    height: 240px;
    padding-top: 22px;
}

.column-item {
    display: grid;
    grid-template-rows: 18px 1fr 20px;
    gap: 5px;
    min-width: 0;
    text-align: center;
}

.column-value {
    color: var(--muted);
    font-size: 11px;
    font-weight: 750;
}

.column-track {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    overflow: hidden;
    border-radius: 9px;
    background: var(--bg);
}

.column-track i {
    width: min(34px, 62%);
    min-height: 5px;
    border-radius: 9px 9px 3px 3px;
    background: linear-gradient(180deg, #7c7df1, var(--brand));
}

.column-item small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.report-bars {
    display: grid;
    gap: 14px;
}

.report-bar > div,
.summary-lines p {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.report-bar > div {
    margin-bottom: 6px;
    font-size: 12px;
}

.report-bar i {
    display: block;
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--bg);
}

.report-bar em {
    display: block;
    height: 100%;
    border-radius: inherit;
}

.conversion-ring {
    display: grid;
    place-items: center;
    width: 150px;
    height: 150px;
    margin: 8px auto 18px;
    border-radius: 50%;
    background: conic-gradient(var(--brand) calc(var(--value) * 1%), #eaebf2 0);
}

.conversion-ring > div {
    display: grid;
    place-items: center;
    width: 112px;
    height: 112px;
    border-radius: 50%;
    background: var(--card);
}

.conversion-ring strong,
.conversion-ring small {
    display: block;
}

.conversion-ring strong {
    font-size: 25px;
}

.summary-lines p {
    margin: 0;
    padding: 10px 0;
    border-top: 1px solid var(--line);
}

@media (max-width: 1050px) {
    .report-kpis {
        grid-template-columns: 1fr 1fr;
    }

    .followup-details {
        grid-template-columns: 1fr 1fr;
    }
}

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

    .report-wide {
        grid-column: auto;
    }
}

@media (max-width: 600px) {
    .settings-card {
        padding: 16px;
    }

    .settings-card-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .brand-preview {
        width: 100%;
    }

    .settings-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .settings-actions button,
    .copy-field button {
        min-height: 44px;
    }

    .copy-field {
        align-items: stretch;
        flex-direction: column;
    }

    .results-head {
        align-items: stretch;
        flex-direction: column;
    }

    .filter-count {
        justify-content: center;
        padding: 8px;
        border-radius: 10px;
        background: var(--card);
    }

    .feedback-action-group {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        margin-bottom: 10px;
    }

    .feedback-action-group .quick-feedback {
        display: contents;
    }

    .feedback-action-group .quick-feedback textarea {
        grid-column: 1 / -1;
        height: 72px;
        margin: 0;
    }

    .feedback-action-group .quick-feedback button,
    .feedback-action-group .mobile-edit {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        min-width: 0;
        min-height: 48px;
        margin: 0 !important;
        text-align: center;
    }

    .lead-actions {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .lead-actions .desktop-edit {
        display: none;
    }

    .lead-actions .action-icon,
    .lead-actions form,
    .lead-actions form button {
        width: 100%;
        min-height: 48px;
    }

    .lead-actions form {
        display: flex;
    }

    .followup-details {
        grid-template-columns: 1fr;
    }

    .report-kpis {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .report-kpis article {
        align-items: flex-start;
        padding: 14px;
    }

    .report-kpi-icon {
        width: 34px;
        height: 34px;
        font-size: 16px;
    }

    .column-chart {
        gap: 5px;
        height: 210px;
    }
}

@media (max-width: 420px) {
    .report-kpis {
        grid-template-columns: 1fr;
    }
}
