@import url('design-system.css');
@import url('quality-admin.css');
@import url('transfers.css');
@import url('branding.css');
/* Page-specific layouts retained; shared foundations live in design-system.css. */
.page-heading, .content > .d-flex:first-of-type { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.5rem; }
.people-table { min-width: 64rem; width: 100%; }
.people-table td { min-width: 8rem; overflow-wrap: break-word; word-break: normal; }
.people-table td:first-child { min-width: 12rem; }
.people-table td:last-child { min-width: 12rem; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.metric { padding: 1.1rem; display: grid; gap: .65rem; text-decoration: none; color: var(--cmdb-ink); font-size: .8rem; }
.metric:hover { border-color: #8fb2d4; }
.metric strong { font-size: 2rem; font-weight: 650; line-height: 1; }
.metric > span:last-child { font-size: .8rem; color: #215e9b; }
.dashboard-columns { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1rem; }
.quick-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem; }
.distribution-row { display: flex; align-items: center; gap: 1rem; padding: .6rem 0; text-decoration: none; color: var(--cmdb-ink); }
.distribution-row .status-badge { min-width: 10rem; }
.distribution-bar { height: .4rem; background: #edf1f5; border-radius: .3rem; flex: 1; }
.distribution-bar span { display: block; background: #719abd; height: 100%; border-radius: .3rem; }
.view-tabs { display: inline-flex; border: 1px solid #bccbdc; background: #fff; border-radius: .4rem; padding: .2rem; margin-bottom: 1.25rem; }
.view-tabs a { padding: .45rem 1rem; border-radius: .25rem; color: #526175; text-decoration: none; }
.view-tabs a.active { background: #e8f0f9; color: #194e83; font-weight: 600; }
.pagination-toolbar { display: flex; justify-content: space-between; gap: 1rem; align-items: center; margin-top: 1rem; font-size: .8rem; }
.infrastructure-toolbar { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; font-size: .8rem; }
.infrastructure-toolbar input { max-width: 26rem; }
.infrastructure-tree, .infrastructure-children { list-style: none; margin: 0; padding: 0; }
.infrastructure-children { margin-left: 1.25rem; padding-left: 1rem; border-left: 1px solid #ccd7e5; }
.infrastructure-node { margin-bottom: .5rem; }
.infrastructure-row { display: flex; gap: .9rem; align-items: center; padding: .8rem 1rem; background: #fff; border: 1px solid var(--cmdb-border); border-left: 4px solid var(--host-color); border-radius: .35rem; margin-bottom: .5rem; }
.tree-toggle { width: 1.8rem; height: 1.8rem; background: #f4f6f9; border: 1px solid #bac7d6; border-radius: .25rem; flex-shrink: 0; }
.tree-leaf { width: 1.8rem; text-align: center; color: #5e6c7d; flex-shrink: 0; }
.tree-identity { display: grid; gap: .15rem; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.tree-identity small { color: #5e6c7d; }
.tree-context { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .6rem; max-width: 50%; }
.host-link { font-size: .8rem; display: inline-flex; align-items: center; gap: .4rem; overflow-wrap: anywhere; }
.host-dot { width: .6rem; height: .6rem; background: var(--host-color); border-radius: 50%; display: inline-block; flex-shrink: 0; }
.tree-warning { font-size: .8rem; color: #79520d; background: #fff7e6; padding: .65rem; border-radius: .3rem; }
.detail-summary { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-top: .65rem; }
.detail-tabs { display: flex; flex-wrap: wrap; gap: .25rem; border-bottom: 1px solid var(--cmdb-border); margin-bottom: 1.5rem; }
.detail-tabs a { font-size: .8rem; padding: .7rem .8rem; text-decoration: none; }
.detail-section { scroll-margin-top: 1rem; }
dl dt { font-size: .8rem; color: #5e6c7d; font-weight: 500; }
dl dd { overflow-wrap: anywhere; }
.import-steps { display: flex; flex-wrap: wrap; gap: .75rem; list-style: none; padding: 0; margin: 1rem 0 1.5rem; }
.import-steps li { display: flex; align-items: center; gap: .5rem; color: #5e6c7d; font-size: .8rem; }
.import-steps span { border: 1px solid #bac7d6; border-radius: 50%; width: 1.7rem; height: 1.7rem; display: grid; place-items: center; background: #fff; }
.import-steps .current { color: #194e83; font-weight: 600; }
.import-steps .current span { background: #215e9b; color: #fff; border-color: #215e9b; }
.import-invalid td:first-child { border-left: 3px solid #982c3c; }
.import-valid td:first-child { border-left: 3px solid #226443; }
pre { padding: .8rem; background: #f4f6f9; overflow-x: auto; }
details summary { cursor: pointer; font-weight: 600; padding: .5rem 0; }
.blazor-error-boundary { background: #982c3c; color: #fff; padding: 1rem; }
.blazor-error-boundary::after { content: "Não foi possível apresentar esta secção."; }
@media (max-width: 1150px) { .metric-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 600px) {
    .metric-grid, .dashboard-columns { grid-template-columns: 1fr; }
    .page-heading .btn { align-self: flex-start; }
    .infrastructure-row { flex-wrap: wrap; padding: .7rem; gap: .6rem; }
    .tree-context { max-width: 100%; width: 100%; justify-content: flex-start; padding-left: 2.4rem; }
    .infrastructure-children { margin-left: .3rem; padding-left: .5rem; }
    .distribution-row { gap: .6rem; }
    .distribution-row .status-badge { min-width: 8rem; }
    .pagination-toolbar { flex-wrap: wrap; }
    .d-flex.gap-2 { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }
.active-asset-filters .list-inline-item { max-width: 100%; }
.active-asset-filters .status-badge { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.global-search-results { overflow-wrap: anywhere; }

/* Product patterns: bounded tables, readable identifiers and keyboard access. */
.card, .card-body, .content, .search-result { min-width: 0; }
.search-result { border-bottom: 1px solid var(--cmdb-border); padding-bottom: 1rem; }
.search-context { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .25rem .75rem; margin: .6rem 0 0; }
.search-context dd, .asset-identification dd { margin: 0; overflow-wrap: anywhere; }
.asset-identification summary { font-size: .8rem; white-space: normal; }
.asset-identification dl { display: grid; grid-template-columns: max-content minmax(0,1fr); gap: .3rem .6rem; margin-top: .5rem; }
@media (max-width: 699px) {
    .btn, button, summary { min-height: 2.75rem; }
    .detail-tabs { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
}
