/* Tipologias de metragem: referência manual do edifício e aplicação explícita na unidade. */
.building-area-profiles,
.unit-area-profile-selector {
    border: 1px solid #cde4e6;
    background: linear-gradient(145deg, #f5fffe 0%, #f8fbff 100%);
}

.building-area-profiles-header,
.unit-area-profile-header,
.building-area-profile-card-head,
.building-area-profile-actions,
.unit-area-profile-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.building-area-profiles-header h3,
.unit-area-profile-header h3 {
    margin: 0;
    color: #153c57;
    font-size: 15px;
    line-height: 1.25;
}

.building-area-profiles-header h3 i,
.unit-area-profile-header h3 i {
    color: #008b8b;
    margin-right: 7px;
}

.building-area-profiles-header p,
.unit-area-profile-header p,
.building-area-profile-hint,
.unit-area-profile-note,
.building-area-profile-empty,
.building-area-profile-feedback {
    margin: 6px 0 0;
    color: #527087;
    font-size: 12px;
    line-height: 1.45;
}

.building-area-profile-list {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.building-area-profile-card {
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 1px solid #d5e6ef;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 3px 10px rgba(21, 60, 87, 0.05);
}

.building-area-profile-card strong {
    color: #173b59;
    font-size: 13px;
}

.building-area-profile-card small {
    color: #6b8093;
    font-size: 11px;
}

.building-area-profile-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.building-area-profile-metric {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 8px;
    border-radius: 999px;
    background: #e8f8f7;
    color: #087f80;
    font-weight: 700;
    font-size: 11px;
}

.building-area-profile-metric.total {
    background: #edf4ff;
    color: #2862aa;
}

.building-area-profile-editor-wrap {
    margin-top: 14px;
    border-top: 1px dashed #bed3df;
    padding-top: 12px;
}

.building-area-profile-editor-wrap summary {
    cursor: pointer;
    color: #174d70;
    font-weight: 800;
    font-size: 12px;
}

.building-area-profile-editor-wrap[open] summary {
    margin-bottom: 12px;
}

.building-area-profile-rows {
    display: grid;
    gap: 10px;
}

.building-area-profile-row {
    display: grid;
    grid-template-columns: minmax(150px, 1.3fr) minmax(90px, .7fr) minmax(90px, .7fr) minmax(140px, 1fr) 44px;
    gap: 8px;
    align-items: end;
    padding: 10px;
    border: 1px solid #d4e1eb;
    border-radius: 12px;
    background: #fbfdff;
}

.building-area-profile-field {
    display: grid;
    gap: 4px;
}

.building-area-profile-field label {
    color: #527087;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.building-area-profile-field input,
.unit-area-profile-select {
    box-sizing: border-box;
    min-width: 0;
    min-height: 42px;
    padding: 9px 10px;
    border: 1px solid #bdd4e3;
    border-radius: 9px;
    color: #173b59;
    background: #fff;
    font: inherit;
    font-size: 12px;
}

.building-area-profile-field input:focus,
.unit-area-profile-select:focus {
    outline: 3px solid rgba(0, 139, 139, .18);
    border-color: #008b8b;
}

.building-area-profile-remove,
.building-area-profile-add,
.building-area-profile-save,
.unit-area-profile-apply {
    min-height: 44px;
    border: 1px solid transparent;
    border-radius: 10px;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.building-area-profile-remove {
    width: 44px;
    color: #b53b4f;
    border-color: #f5c8d0;
    background: #fff5f6;
}

.building-area-profile-remove:hover { background: #ffe7ea; }

.building-area-profile-add {
    padding: 0 12px;
    color: #155d75;
    border-color: #afd3dd;
    background: #f2fbfc;
}

.building-area-profile-save,
.unit-area-profile-apply {
    padding: 0 14px;
    color: #fff;
    border-color: #008486;
    background: linear-gradient(135deg, #008b8b, #0872a4);
    box-shadow: 0 5px 12px rgba(8, 114, 164, .16);
}

.building-area-profile-save:disabled,
.unit-area-profile-apply:disabled {
    cursor: not-allowed;
    opacity: .6;
    box-shadow: none;
}

.building-area-profile-feedback.is-error { color: #b4233c; }
.building-area-profile-feedback.is-success { color: #087f59; }

.unit-area-profile-selector {
    display: grid;
    gap: 12px;
}

.unit-area-profile-controls {
    align-items: stretch;
}

.unit-area-profile-select { flex: 1; }

.unit-area-profile-note {
    padding: 9px 10px;
    border-left: 3px solid #54a9b8;
    border-radius: 0 8px 8px 0;
    background: rgba(222, 244, 246, .65);
}

@media (max-width: 760px) {
    .building-area-profiles-header,
    .unit-area-profile-header,
    .unit-area-profile-controls,
    .building-area-profile-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .building-area-profile-row {
        grid-template-columns: 1fr 1fr;
    }

    .building-area-profile-row .building-area-profile-field:first-child,
    .building-area-profile-row .building-area-profile-field:last-of-type {
        grid-column: 1 / -1;
    }

    .building-area-profile-remove {
        grid-column: 1 / -1;
        width: 100%;
    }
}
