.map-legend-swatch {
    width: 18px;
    height: 18px;
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    display: inline-block;
    vertical-align: middle;
    margin-right: 0.35rem;
}

.map-breadcrumb-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.9rem;
    line-height: 1.35;
}

.map-breadcrumb-chip {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-weight: 700;
    white-space: nowrap;
}

.map-breadcrumb-chip-muted {
    background: #eef2f7;
    color: #526170;
}

.map-breadcrumb-chip-primary {
    background: var(--dominus-primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(44, 33, 20, 0.14);
}

.map-breadcrumb-separator,
.map-breadcrumb-count {
    color: #7a8794;
    font-weight: 700;
}

.province-level-0 { background: #f4f6f9; }
.province-level-1 { background: #fff4e7; border-color: #f3d2aa; }
.province-level-2 { background: #ffe2bd; border-color: #f0be80; }
.province-level-3 { background: #ffc985; border-color: #eea75a; }
.province-level-4 { background: #f5a94c; border-color: #e08b12; color: #4c2c00; }
.province-level-5 { background: #ef7d00; border-color: #c86400; color: #fff; }
:root {
    --dominus-primary: #ef7d00;
    --dominus-primary-dark: #c86400;
    --dominus-soft: #fff3e6;
    --dominus-border: #ead7c0;
    --dominus-text: #253140;
}

body {
    background: #f7f8fb;
    color: var(--dominus-text);
}

body.crm-list-page {
    height: 100vh;
    overflow: hidden;
}

body.login-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(239, 125, 0, 0.18), transparent 34rem),
        linear-gradient(135deg, #fff8f0 0%, #f7f8fb 55%, #eef2f7 100%);
}

.login-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1.5rem;
}

.login-card {
    width: min(100%, 430px);
}

.login-brand {
    display: inline-flex;
    align-items: center;
    padding: 0.22rem 0.6rem;
    border-radius: 999px;
    background: var(--dominus-soft);
    color: var(--dominus-primary-dark);
    font-size: 0.82rem;
    font-weight: 800;
}

.login-help {
    border-top: 1px solid #e8edf4;
    padding-top: 1rem;
}

.app-header {
    background: linear-gradient(135deg, var(--dominus-primary-dark), var(--dominus-primary));
    color: #fff;
    box-shadow: 0 10px 24px rgba(44, 33, 20, 0.15);
    position: sticky;
    top: 0;
    z-index: 1040;
}

.app-header .container {
    position: relative;
}

.app-header-compact {
    padding: 1.45rem 0 1.2rem;
}

.app-header-compact .h3 {
    margin-bottom: 0.2rem !important;
}

.app-company-badge {
    display: inline-flex;
    align-items: center;
    max-width: 280px;
    padding: 0.12rem 0.45rem;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-version-badge {
    position: absolute;
    right: 0.75rem;
    bottom: -0.35rem;
    display: inline-flex;
    align-items: center;
    padding: 0;
    border: 0;
    color: rgba(255, 255, 255, 0.45);
    background: transparent;
    font-size: 0.68rem;
    line-height: 1.2;
    font-weight: 500;
    box-shadow: none;
}

.btn-dominus {
    background-color: var(--dominus-primary);
    border-color: var(--dominus-primary);
    color: #fff;
}

.btn-dominus:hover,
.btn-dominus:focus {
    background-color: var(--dominus-primary-dark);
    border-color: var(--dominus-primary-dark);
    color: #fff;
}

.card-body-compact {
    padding: 0.65rem 0.85rem;
}

.icon-action-btn {
    width: 42px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    flex: 0 0 auto;
}

.icon-action-btn svg {
    display: block;
}

.summary-card {
    background: #fff;
    border: 1px solid var(--dominus-border);
    border-radius: 1rem;
    padding: 0.8rem 1.05rem;
    height: 100%;
    box-shadow: 0 8px 18px rgba(34, 42, 53, 0.05);
}

.summary-card-alert {
    border-color: #f2b8b5;
    background: #fff5f5;
}

.summary-label {
    display: block;
    color: #6c757d;
    font-size: 0.86rem;
    margin-bottom: 0.25rem;
}

.summary-value {
    font-size: 1.55rem;
    line-height: 1;
}

.crm-list-main {
    height: calc(100vh - 96px);
    display: flex;
    flex-direction: column;
}

.crm-table-card {
    flex: 1 1 auto;
    min-height: 0;
}

.crm-table-card-body {
    height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.bulk-action-form {
    display: none;
}

.bulk-action-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 0 0 0.65rem;
    flex: 0 0 auto;
}

.crm-table-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
}

.crm-table thead th {
    white-space: nowrap;
    font-size: 0.88rem;
    padding-left: 0.45rem;
    padding-right: 0.45rem;
    position: sticky;
    top: 0;
    z-index: 2;
    background: #fff4e7;
    box-shadow: inset 0 -1px 0 #ead7c0;
}

.crm-table td {
    font-size: 0.92rem;
    padding-left: 0.45rem;
    padding-right: 0.45rem;
    padding-top: 0.85rem;
    padding-bottom: 0.85rem;
}

.crm-table tbody tr.js-edit-row {
    cursor: pointer;
}

.rownum-col {
    width: 34px;
    min-width: 34px;
    text-align: center;
}

.bulk-select-col {
    width: 28px;
    min-width: 28px;
    text-align: center;
}

.min-col {
    min-width: 132px;
}

.row-overdue {
    background-color: #fdeaea;
}

.row-today {
    background-color: #fff6cf;
}

.row-high-interest {
    box-shadow: inset 4px 0 0 #7ecb89;
}

.quick-status-form {
    margin: 0;
}

.icon-table-btn {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    flex: 0 0 auto;
}

.icon-table-btn svg {
    width: 12px;
    height: 12px;
}

.contact-action-cell {
    white-space: nowrap;
    text-align: center;
}

.contact-action-cell .btn,
.contact-action-cell form {
    margin: 0;
}

.contact-action-cell form {
    display: inline-flex;
}

.icon-col {
    width: 30px;
    min-width: 30px;
}

.actions-col {
    width: 54px;
    min-width: 54px;
}

.crm-activity-count {
    font-size: 0.82rem;
    font-weight: 600;
}

.crm-activity-table thead th {
    white-space: nowrap;
    font-size: 0.84rem;
    background: #fff4e7;
    box-shadow: inset 0 -1px 0 #ead7c0;
}

.crm-activity-table td {
    font-size: 0.9rem;
    padding-top: 0.7rem;
    padding-bottom: 0.7rem;
}

.agenda-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.agenda-card .card-body {
    padding: 0.9rem 1rem;
}

.agenda-card-danger {
    border-left: 4px solid #dc3545 !important;
}

.agenda-card-today {
    border-left: 4px solid #ffc107 !important;
}

.agenda-card-muted {
    border-left: 4px solid #94a3b8 !important;
}

.agenda-count {
    min-width: 38px;
    border: 1px solid #e5e7eb;
}

.agenda-table th {
    white-space: nowrap;
    font-size: 0.82rem;
    background: #fff4e7;
}

.agenda-table td {
    font-size: 0.88rem;
    padding-top: 0.45rem;
    padding-bottom: 0.45rem;
}

.agenda-date {
    width: 90px;
    white-space: nowrap;
    font-weight: 700;
}

.agenda-actions-col {
    width: 132px;
    min-width: 132px;
    text-align: right;
    white-space: nowrap;
}

.help-hero .card-body {
    min-height: 520px;
    padding: 2rem;
}

.help-mini-label {
    color: #53667f;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.9rem;
}

.help-title {
    text-align: center;
    font-size: 1.35rem;
    font-weight: 800;
    margin: 1.4rem 0 0.5rem;
}

.help-subtitle {
    text-align: center;
    color: #53667f;
    max-width: 720px;
    margin: 0 auto 2rem;
}

.help-flow {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    align-items: start;
    margin-top: 2.2rem;
}

.help-flow-card {
    text-align: center;
}

.help-flow-card h3 {
    font-size: 1rem;
    font-weight: 800;
    margin: 1.2rem 0 0.6rem;
}

.help-flow-card p {
    color: #53667f;
    margin: 0 auto;
    max-width: 330px;
    line-height: 1.35;
}

.help-illustration {
    width: 250px;
    height: 150px;
    margin: 0 auto;
    position: relative;
}

.help-illustration::before,
.help-illustration::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    background: #f4f6f9;
    z-index: 0;
}

.help-illustration::before {
    width: 120px;
    height: 42px;
    left: 12px;
    bottom: 25px;
}

.help-illustration::after {
    width: 56px;
    height: 56px;
    right: 8px;
    bottom: 12px;
}

.help-illustration-list span,
.help-illustration-mail span,
.help-illustration-agenda span {
    position: absolute;
    display: block;
    z-index: 1;
}

.help-illustration-list span:nth-child(1) {
    width: 130px;
    height: 108px;
    left: 78px;
    top: 26px;
    border: 2px solid #b5c5dc;
    border-radius: 8px;
    background: #fff;
    transform: rotate(2deg);
    box-shadow: 0 12px 20px rgba(37, 49, 64, 0.12);
}

.help-illustration-list span:nth-child(2) {
    width: 112px;
    height: 96px;
    left: 44px;
    top: 16px;
    border: 2px solid #9bb5de;
    border-radius: 8px;
    background: linear-gradient(#7ca5f6 0 30px, #fff 30px);
    box-shadow: 0 12px 20px rgba(37, 49, 64, 0.12);
}

.help-illustration-list span:nth-child(3) {
    width: 84px;
    height: 112px;
    left: 110px;
    top: 8px;
    border: 2px solid #8aa7d9;
    border-radius: 8px;
    background: linear-gradient(#6f9af0 0 34px, #fff 34px);
    box-shadow: 0 12px 20px rgba(37, 49, 64, 0.12);
}

.help-illustration-mail span {
    width: 154px;
    height: 96px;
    left: 48px;
    top: 26px;
    border: 2px solid #c7d2e2;
    border-radius: 10px;
    background:
        linear-gradient(145deg, transparent 48%, #b8c9e2 49%, transparent 51%),
        linear-gradient(35deg, transparent 48%, #b8c9e2 49%, transparent 51%),
        #fff;
    box-shadow: 0 12px 20px rgba(37, 49, 64, 0.12);
}

.help-illustration-mail span::before {
    content: "$";
    position: absolute;
    left: -26px;
    top: 26px;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    border: 2px solid #8d9bb0;
    background: #fff;
    color: #253140;
    display: grid;
    place-items: center;
    font-weight: 800;
}

.help-illustration-agenda span:nth-child(1) {
    width: 130px;
    height: 120px;
    left: 65px;
    top: 14px;
    border: 2px solid #c4d1e3;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 20px rgba(37, 49, 64, 0.12);
}

.help-illustration-agenda span:nth-child(2) {
    width: 86px;
    height: 84px;
    left: 86px;
    top: 36px;
    background: linear-gradient(90deg, #8bb5f7 0 27%, #dce9ff 27% 32%, #9fc2f8 32% 62%, #dce9ff 62% 67%, #b6d0fb 67%);
}

.help-illustration-agenda span:nth-child(3) {
    width: 112px;
    height: 38px;
    left: 74px;
    top: 98px;
    border-bottom: 8px solid #78a7f7;
}

.help-timeline {
    display: grid;
    gap: 0.8rem;
}

.help-step {
    display: grid;
    grid-template-columns: 155px 1fr;
    gap: 1rem;
    align-items: start;
    padding: 0.75rem 0.85rem;
    border: 1px solid #e8edf4;
    border-radius: 0.85rem;
    background: #fbfcfe;
}

.help-step span {
    font-weight: 800;
    color: var(--dominus-primary-dark);
}

.help-step p {
    margin: 0;
    color: #53667f;
}

.help-step-final {
    background: #fff4e7;
    border-color: var(--dominus-border);
}

.help-rule {
    border: 1px solid var(--dominus-border);
    border-radius: 1rem;
    padding: 1rem;
    background: #fff8f0;
    margin-bottom: 1rem;
}

.help-rule ul {
    margin: 0.75rem 0 0;
    padding-left: 1.2rem;
    color: #53667f;
}

.help-status-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
}

.help-status-grid > div,
.help-daily-card {
    border: 1px solid #e8edf4;
    border-radius: 1rem;
    padding: 0.9rem;
    background: #fff;
}

.help-status-grid p,
.help-daily-card p {
    color: #53667f;
    margin: 0.35rem 0 0;
    font-size: 0.9rem;
}

.help-dot {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    display: inline-block;
    margin-right: 0.4rem;
}

.help-dot-green { background: #7ecb89; }
.help-dot-orange { background: var(--dominus-primary); }
.help-dot-red { background: #dc3545; }
.help-dot-gray { background: #94a3b8; }

.help-daily-card span {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: var(--dominus-primary);
    color: #fff;
    display: inline-grid;
    place-items: center;
    font-weight: 800;
    margin-bottom: 0.65rem;
}

.help-daily-card strong {
    display: block;
}

.activity-date-col {
    width: 118px;
    min-width: 118px;
}

.activity-type-col {
    width: 120px;
    min-width: 120px;
}

.activity-actions-col {
    width: 52px;
    min-width: 52px;
    text-align: center;
}

.card {
    border-radius: 1rem;
}

.crm-list-page .alert {
    flex: 0 0 auto;
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(239, 125, 0, 0.45);
    box-shadow: 0 0 0 0.25rem rgba(239, 125, 0, 0.18);
}

.form-label {
    font-size: 0.82rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.filter-toolbar .form-label {
    margin-bottom: 0.25rem;
}

.filter-toolbar .form-control,
.filter-toolbar .form-select {
    min-height: 38px;
    padding-top: 0.4rem;
    padding-bottom: 0.4rem;
}



.spain-geo-stage {
    width: 100%;
    max-width: none;
    margin: 0 auto;
    min-height: 660px;
}

@media (max-width: 991.98px) {
    body.crm-list-page {
        height: auto;
        overflow: auto;
    }

    .crm-list-main {
        height: auto;
        display: block;
    }

    .crm-table-card,
    .crm-table-card-body,
    .crm-table-scroll {
        min-height: auto;
        height: auto;
        overflow: visible;
    }

    .crm-table thead th {
        position: static;
    }
}

.spain-geo-loading {
    min-height: 660px;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    background: linear-gradient(180deg, #fbfcfe 0%, #f4f6f9 100%);
    color: #667085;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.spain-geo-svg {
    width: 100%;
    height: auto;
    display: block;
}

.geo-inset-title {
    fill: #111827;
    font-size: 16px;
    font-weight: 700;
}

.geo-inset-rule {
    stroke: #c4cbd6;
    stroke-width: 1.5;
}

.geo-inset-frame {
    fill: none;
    stroke: #cbd5e1;
    stroke-width: 1.5;
}

.province-shape {
    stroke: #ffffff;
    stroke-width: 1.65;
    vector-effect: non-scaling-stroke;
}

.province-fill-0 { fill: #d1d5db; }
.province-fill-1 { fill: #fff4e7; }
.province-fill-2 { fill: #ffe2bd; }
.province-fill-3 { fill: #ffc985; }
.province-fill-4 { fill: #f5a94c; }
.province-fill-5 { fill: #ef7d00; }

.province-name {
    fill: #111827;
    font-size: 12.5px;
    font-weight: 700;
    text-anchor: middle;
    dominant-baseline: middle;
    paint-order: stroke;
    stroke: rgba(255, 255, 255, 0.96);
    stroke-width: 4px;
    stroke-linejoin: round;
    pointer-events: none;
}

.province-name-long {
    font-size: 11px;
}

.province-badge-circle {
    stroke: #ffffff;
    stroke-width: 2.5;
    vector-effect: non-scaling-stroke;
}

.province-badge-fill-0 { fill: #f4f6f9; }
.province-badge-fill-1 { fill: #fff4e7; }
.province-badge-fill-2 { fill: #ffe2bd; }
.province-badge-fill-3 { fill: #ffc985; }
.province-badge-fill-4 { fill: #f5a94c; }
.province-badge-fill-5 { fill: #ef7d00; }

.province-badge-text {
    fill: #111827;
    font-size: 12px;
    font-weight: 700;
    text-anchor: middle;
    dominant-baseline: middle;
    pointer-events: none;
}

.province-badge-text-light {
    fill: #ffffff;
}

@media (max-width: 768px) {
    .spain-geo-stage,
    .spain-geo-loading {
        min-height: 540px;
    }
}


