:root {
    --bg: #020811;
    --panel: rgba(8, 22, 36, 0.94);
    --panel-soft: rgba(12, 30, 48, 0.86);
    --line: rgba(116, 153, 188, 0.22);
    --line-strong: rgba(75, 151, 255, 0.5);
    --text: #f3f8ff;
    --soft: #b7c7d8;
    --muted: #7f92a7;
    --blue: #2685ff;
    --green: #35d34a;
    --amber: #ffc12f;
    --orange: #ff7e20;
    --red: #ff453f;
    --violet: #a855f7;
    --panel-radius: 7px;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    overflow: hidden;
    color: var(--text);
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
    background:
        linear-gradient(135deg, rgba(0, 23, 37, 0.88), rgba(2, 8, 17, 1) 42%, rgba(1, 15, 25, 0.96)),
        #020811;
}

.dashboard-shell {
    width: 100vw;
    height: 100vh;
    min-width: 1180px;
    display: grid;
    grid-template-columns: 66px minmax(0, 1fr);
    grid-template-rows: 76px minmax(0, 1fr) 58px;
    gap: 8px;
    padding: 8px;
}

.topbar {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 8px;
}

.brand-block {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.brand-mark {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #f8fbff;
    font-size: 2.3rem;
}

.brand-block h1 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 0;
}

.brand-block p {
    margin: 5px 0 0;
    color: var(--text);
    font-size: 0.78rem;
    font-weight: 600;
}

.top-status-grid {
    min-width: 0;
    display: grid;
    grid-template-columns: 1.18fr 1fr 1.65fr 1.18fr 1.42fr 1.2fr;
    gap: 4px;
}

.top-status-card,
.panel,
.sidebar,
.footer-kpis {
    border: 1px solid var(--line);
    border-radius: var(--panel-radius);
    background:
        linear-gradient(145deg, rgba(14, 33, 53, 0.94), rgba(4, 13, 24, 0.94)),
        var(--panel);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035), 0 10px 25px rgba(0, 0, 0, 0.28);
}

.top-status-card {
    min-width: 0;
    padding: 11px 14px;
    display: flex;
    align-items: center;
    gap: 13px;
}

.top-status-card strong {
    display: block;
    font-size: 0.88rem;
    line-height: 1.2;
}

.top-status-card span {
    display: block;
    margin-top: 3px;
    color: var(--soft);
    font-size: 0.74rem;
}

.top-status-card small {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 0.7rem;
}

.status-icon {
    width: 34px;
    flex: 0 0 34px;
    text-align: center;
    font-size: 1.7rem;
}

.weather-icon-img {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    object-fit: contain;
}

.sidebar {
    grid-row: 2;
    grid-column: 1;
    padding: 10px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.nav-button {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 7px;
    display: grid;
    place-items: center;
    color: #9baabd;
    background: transparent;
    font-size: 1.15rem;
}

.nav-button.active {
    color: white;
    background: linear-gradient(135deg, #2084ff, #396cff);
    box-shadow: 0 0 18px rgba(38, 133, 255, 0.44);
}

.orientation-toggle {
    border: 1px solid rgba(255, 193, 47, 0.32);
    color: var(--amber);
    background: rgba(255, 193, 47, 0.08);
}

body.layout-landscape .orientation-toggle {
    border-color: rgba(38, 133, 255, 0.45);
    color: var(--blue);
}

body.layout-portrait .orientation-toggle {
    border-color: rgba(53, 211, 74, 0.42);
    color: var(--green);
}

.dashboard-grid {
    grid-column: 2;
    grid-row: 2;
    min-height: 0;
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-template-rows: 1.13fr 1.03fr 0.92fr;
    gap: 8px;
}

.panel {
    min-width: 0;
    min-height: 0;
    padding: 12px;
    overflow: hidden;
}

.panel-header {
    min-height: 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.panel-header.compact {
    margin-bottom: 7px;
}

.title-row {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 9px;
}

.title-row h2 {
    min-width: 0;
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.panel-icon {
    width: 27px;
    height: 27px;
    border-radius: 6px;
    display: grid;
    place-items: center;
    color: white;
    background: rgba(38, 133, 255, 0.18);
}

.panel-icon.green { background: rgba(53, 211, 74, 0.18); color: var(--green); }
.panel-icon.blue { background: rgba(38, 133, 255, 0.18); color: var(--blue); }
.panel-icon.amber { background: rgba(255, 193, 47, 0.18); color: var(--amber); }
.panel-icon.violet { background: rgba(168, 85, 247, 0.18); color: #c389ff; }
.panel-icon.red { background: rgba(255, 69, 63, 0.18); color: var(--red); }

.panel-whatsapp { grid-column: 1 / 5; grid-row: 1; }
.panel-agenda { grid-column: 5 / 8; grid-row: 1; }
.panel-users { grid-column: 8 / 10; grid-row: 1; }
.panel-status-stack { grid-column: 10 / 13; grid-row: 1; }
.panel-cadastros { grid-column: 1 / 5; grid-row: 2; }
.panel-infra { grid-column: 5 / 10; grid-row: 2 / 4; }
.panel-systems { grid-column: 10 / 13; grid-row: 2; }
.panel-backups { grid-column: 1 / 5; grid-row: 3; }
.panel-system-alerts { grid-column: 10 / 13; grid-row: 3; }

.panel-stack {
    min-width: 0;
    min-height: 0;
    display: grid;
    grid-template-rows: 1.15fr 0.85fr;
    gap: 8px;
}

.state-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    display: inline-block;
}

.state-dot.ok { background: var(--green); box-shadow: 0 0 10px rgba(53, 211, 74, 0.75); }

.inline-status,
#whatsapp-connected {
    color: var(--green);
    font-size: 0.78rem;
    font-weight: 700;
}

.blue-text { color: var(--blue); }
.green-text { color: var(--green); }
.orange-text { color: var(--orange); }
.red-text { color: var(--red); }
.amber { color: var(--amber); }
.blue { color: var(--blue); }
.green { color: var(--green); }
.muted { color: var(--muted); }

.wa-stat-grid,
.cadastro-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.stat-tile {
    min-height: 86px;
    border: 1px solid var(--line-strong);
    border-radius: 5px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(4, 13, 24, 0.58);
}

.stat-tile strong {
    font-size: 2rem;
    line-height: 1;
}

.stat-tile span {
    margin-top: 8px;
    color: var(--text);
    font-size: 0.78rem;
    text-align: center;
}

.stat-tile.blue { border-color: rgba(38, 133, 255, 0.7); color: var(--blue); }
.stat-tile.amber { border-color: rgba(255, 193, 47, 0.68); color: var(--amber); }
.stat-tile.violet { border-color: rgba(168, 85, 247, 0.75); color: var(--violet); }
.stat-tile.green { border-color: rgba(53, 211, 74, 0.65); color: var(--green); }

.wa-time-grid {
    margin-top: 11px;
    border: 1px solid var(--line);
    border-radius: 6px;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.wa-time-grid > div {
    min-width: 0;
    padding: 12px 16px;
}

.wa-time-grid > div + div {
    border-left: 1px solid var(--line);
}

.wa-time-grid span,
.cadastro-bottom span,
.server-metrics span,
.service-block > span,
.network-link span,
.switch-metrics span,
.ap-card span,
.backup-table span,
.backup-summary span,
.footer-kpi span {
    color: var(--soft);
    font-size: 0.7rem;
    font-weight: 700;
}

.wa-time-grid strong {
    display: block;
    margin-top: 13px;
    font-size: 1.62rem;
    line-height: 1;
    font-weight: 500;
}

.wa-time-grid small {
    display: block;
    margin-top: 12px;
    color: var(--soft);
    font-size: 0.76rem;
}

.agenda-list {
    position: relative;
    display: grid;
    gap: 5px;
}

.agenda-row {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: start;
    padding-left: 10px;
    border-left: 3px solid var(--blue);
}

.agenda-row.pending { border-left-color: var(--amber); }
.agenda-row.done { border-left-color: #8da0b8; }

.agenda-row strong {
    font-size: 0.78rem;
}

.agenda-row p {
    margin: 0;
    color: var(--text);
    font-size: 0.78rem;
    font-weight: 700;
}

.agenda-row small {
    display: block;
    margin-top: 2px;
    color: var(--soft);
    font-size: 0.7rem;
}

.status-pill {
    border-radius: 5px;
    padding: 4px 9px;
    font-size: 0.68rem;
    color: #c7d8ea;
    background: rgba(126, 146, 167, 0.16);
}

.status-pill.ok { color: var(--green); background: rgba(53, 211, 74, 0.18); }
.status-pill.warning { color: var(--amber); background: rgba(255, 193, 47, 0.16); }
.status-pill.info { color: #5aa8ff; background: rgba(38, 133, 255, 0.2); }

.next-meeting {
    height: 35px;
    margin-top: 9px;
    border: 1px solid var(--blue);
    border-radius: 4px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 9px;
    padding: 0 10px;
    color: #75baff;
    background: rgba(38, 133, 255, 0.1);
}

.next-meeting span,
.next-meeting em {
    font-size: 0.7rem;
    font-style: normal;
}

.next-meeting strong {
    color: white;
    font-size: 0.78rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.load-list {
    display: grid;
    gap: 12px;
    margin-top: 4px;
}

.load-row {
    display: grid;
    grid-template-columns: 62px minmax(0, 1fr) 20px 36px;
    align-items: center;
    gap: 8px;
}

.load-row strong,
.load-row span {
    font-size: 0.72rem;
}

.load-row .bar {
    height: 11px;
    background: rgba(116, 153, 188, 0.17);
}

.bar i,
.progress i {
    display: block;
    height: 100%;
}

.panel-total {
    margin-top: 20px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.panel-total span {
    font-size: 0.78rem;
}

.panel-total strong {
    font-size: 1.25rem;
}

.status-chart-wrap {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
}

.donut-chart {
    width: 104px;
    height: 104px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    position: relative;
    background: conic-gradient(var(--blue) 0 35%, var(--amber) 35% 50%, var(--violet) 50% 70%, var(--green) 70% 100%);
}

.donut-chart::after {
    content: "";
    position: absolute;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: #06111d;
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.55);
}

.donut-chart strong,
.donut-chart span {
    position: relative;
    z-index: 1;
    display: block;
    text-align: center;
}

.donut-chart strong {
    font-size: 1.4rem;
}

.donut-chart span {
    color: var(--soft);
    font-size: 0.72rem;
}

.status-legend {
    display: grid;
    gap: 8px;
}

.legend-row {
    display: grid;
    grid-template-columns: 11px minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    font-size: 0.72rem;
}

.legend-color {
    height: 11px;
    border-radius: 3px;
}

.alert-count,
.system-alert-count {
    color: var(--amber);
    font-size: 0.75rem;
}

.alert-list {
    display: grid;
    gap: 8px;
}

.alert-list.mini {
    gap: 6px;
}

.alert-row {
    display: grid;
    grid-template-columns: 16px minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    color: var(--soft);
    font-size: 0.72rem;
}

.alert-row strong {
    color: var(--text);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.alert-dot {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    display: grid;
    place-items: center;
    color: white;
    font-size: 0.62rem;
}

.alert-dot.info { background: var(--blue); }
.alert-dot.atencao { background: var(--amber); color: #382500; }
.alert-dot.critico { background: var(--red); }

.cadastro-grid .stat-tile {
    min-height: 84px;
}

.cadastro-bottom {
    margin-top: 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.cadastro-bottom > div {
    min-height: 78px;
    padding: 14px 16px;
}

.cadastro-bottom > div + div {
    border-left: 1px solid var(--line);
}

.cadastro-bottom strong {
    display: block;
    margin-top: 13px;
    font-size: 0.92rem;
}

.cadastro-bottom .red-text {
    font-size: 1.4rem;
}

.infra-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.95fr) minmax(0, 0.95fr);
    grid-template-rows: auto auto;
    gap: 10px;
    min-height: 0;
}

.infra-section {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 10px;
    background: rgba(5, 15, 27, 0.42);
}

.infra-server {
    grid-column: 1 / -1;
}

.infra-aps .ap-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.infra-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 9px;
}

.infra-section-head strong {
    min-width: 0;
    color: var(--text);
    font-size: 0.78rem;
    font-weight: 900;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.infra-section-head span {
    flex: 0 0 auto;
    color: var(--green);
    font-size: 0.72rem;
    font-weight: 800;
}

.server-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-bottom: 1px solid var(--line);
    padding-bottom: 10px;
}

.server-metrics > div {
    min-width: 0;
    padding: 0 10px;
    border-left: 1px solid var(--line);
}

.server-metrics > div:first-child {
    border-left: 0;
    padding-left: 0;
}

.server-metrics strong {
    display: block;
    margin: 8px 0 4px;
    font-size: 1.38rem;
}

.server-metrics svg {
    width: 100%;
    height: 24px;
    fill: none;
    stroke: var(--green);
    stroke-width: 2;
}

.server-metrics svg.red-line {
    stroke: var(--red);
}

.server-metrics small {
    font-size: 0.72rem;
}

.service-block {
    margin-top: 10px;
}

.service-row {
    margin-top: 9px;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
}

.service-item {
    text-align: center;
}

.service-item i {
    display: block;
    margin-bottom: 4px;
    color: #8eb4db;
}

.service-item strong {
    display: block;
    font-size: 0.72rem;
}

.service-item span {
    color: var(--green);
    font-size: 0.68rem;
}

.network-list {
    display: grid;
    gap: 10px;
}

.network-link {
    border-top: 1px solid var(--line);
    padding-top: 8px;
}

.network-link:first-child {
    border-top: 0;
    padding-top: 0;
}

.network-title {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 0.76rem;
    font-weight: 800;
}

.network-title em {
    color: var(--green);
    font-style: normal;
}

.network-stats {
    margin-top: 9px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    text-align: center;
}

.network-stats div + div {
    border-left: 1px solid var(--line);
}

.network-stats strong {
    display: block;
    margin-top: 6px;
    font-size: 1rem;
}

.sparkline {
    margin-top: 8px;
    width: 100%;
    height: 16px;
    fill: none;
    stroke: var(--green);
    stroke-width: 1.7;
}

.system-list {
    display: grid;
    gap: 6px;
}

.system-row {
    height: 32px;
    border: 1px solid var(--line);
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    background: rgba(5, 15, 27, 0.5);
}

.system-row strong {
    font-size: 0.76rem;
}

.system-row span {
    color: var(--green);
    font-size: 0.72rem;
}

.last-check {
    margin: 10px 0 0;
    text-align: center;
    color: var(--muted);
    font-size: 0.72rem;
}

.switch-card {
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 12px 14px;
}

#switch-list {
    display: grid;
    gap: 8px;
}

.panel-infra .switch-card,
.panel-infra .ap-card {
    padding: 9px;
}

.panel-infra .switch-metrics {
    margin-top: 10px;
}

.panel-infra .port-strip {
    margin-top: 10px;
}

.panel-infra .port {
    height: 13px;
}

.switch-head,
.ap-head {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.switch-head strong,
.ap-head strong {
    font-size: 0.82rem;
}

.switch-head span,
.ap-head span {
    color: var(--green);
    font-size: 0.72rem;
}

.switch-metrics {
    margin-top: 14px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    text-align: center;
}

.switch-metrics div + div {
    border-left: 1px solid var(--line);
}

.switch-metrics strong {
    display: block;
    margin-top: 7px;
    font-size: 1rem;
}

.port-strip {
    margin-top: 14px;
}

.port-strip span {
    display: block;
    margin-bottom: 7px;
    color: var(--soft);
    font-size: 0.72rem;
}

.ports {
    display: grid;
    grid-template-columns: repeat(14, 1fr);
    gap: 4px;
}

.port {
    height: 16px;
    border-radius: 3px;
    background: #c8d4e3;
}

.port.active {
    background: var(--green);
}

.port.warn {
    background: #cfe53a;
}

.port-legend {
    margin-top: 10px;
    display: flex;
    gap: 18px;
    color: var(--soft);
    font-size: 0.65rem;
}

.legend-box {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    display: inline-block;
    margin-right: 5px;
    background: var(--muted);
}

.legend-box.active {
    background: var(--green);
}

.ap-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.ap-card {
    border: 1px solid var(--line-strong);
    border-radius: 6px;
    padding: 10px;
}

.ap-card dl {
    margin: 10px 0 0;
    display: grid;
    grid-template-columns: auto auto;
    gap: 7px 10px;
}

.ap-card dt {
    color: var(--soft);
    font-size: 0.68rem;
}

.ap-card dd {
    margin: 0;
    text-align: right;
    font-size: 0.78rem;
}

.progress {
    height: 13px;
    margin-top: 9px;
    border-radius: 999px;
    background: rgba(116, 153, 188, 0.22);
    overflow: hidden;
}

.progress i {
    border-radius: inherit;
    background: linear-gradient(90deg, #28bd44, #53da4e);
}

.backup-table {
    display: grid;
    gap: 0;
}

.backup-row {
    min-height: 30px;
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 0.9fr 56px;
    align-items: center;
    border-top: 1px solid var(--line);
    font-size: 0.73rem;
}

.backup-row:first-child {
    border-top: 0;
}

.backup-row.header {
    color: var(--muted);
    font-size: 0.66rem;
    text-transform: uppercase;
}

.backup-row .ok-pill {
    justify-self: center;
    border-radius: 5px;
    padding: 3px 10px;
    color: var(--green);
    background: rgba(53, 211, 74, 0.22);
    font-weight: 800;
}

.backup-summary {
    margin-top: 8px;
    border-top: 1px solid var(--line);
    display: grid;
    grid-template-columns: 1fr 1fr 54px;
    align-items: center;
    gap: 8px;
    padding-top: 9px;
}

.backup-summary strong {
    display: block;
    margin-top: 5px;
    font-size: 1.2rem;
}

.backup-summary small {
    margin-left: 8px;
    color: var(--soft);
}

.backup-summary > i {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    justify-self: end;
    background: var(--green);
    color: white;
    font-size: 1.5rem;
}

.footer-kpis {
    grid-column: 1 / -1;
    grid-row: 3;
    display: grid;
    grid-template-columns: 1.2fr 1.22fr 1.18fr 1fr 1.28fr minmax(320px, 2.6fr);
    gap: 0;
    align-items: center;
    padding: 0 14px;
}

.footer-kpi {
    min-width: 0;
    height: 36px;
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    padding-right: 18px;
    border-right: 1px solid var(--line);
}

.footer-kpi i {
    font-size: 1.35rem;
}

.footer-kpi span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.footer-kpi strong {
    font-size: 1.3rem;
}

blockquote {
    margin: 0;
    padding-left: 24px;
    color: #4fa5ff;
    text-align: center;
    font-size: 0.82rem;
}

blockquote small {
    display: block;
    margin-top: 7px;
    color: var(--soft);
}

.top-status-card.status-ok { border-color: rgba(53, 211, 74, 0.35); }
.top-status-card.status-warning { border-color: rgba(255, 193, 47, 0.45); }
.top-status-card.status-critical { border-color: rgba(255, 69, 63, 0.52); }

@media (min-width: 1181px) and (max-height: 850px) {
    .dashboard-shell {
        grid-template-columns: 66px minmax(0, 1fr);
        grid-template-rows: 64px minmax(0, 1fr) 44px;
        gap: 6px;
        padding: 6px;
    }

    .topbar {
        grid-template-columns: 340px minmax(0, 1fr);
        gap: 6px;
    }

    .brand-mark {
        width: 44px;
        height: 44px;
        font-size: 1.9rem;
    }

    .brand-block h1 {
        font-size: 1.33rem;
    }

    .brand-block p {
        font-size: 0.68rem;
    }

    .top-status-card {
        padding: 8px 11px;
        gap: 10px;
    }

    .top-status-card strong {
        font-size: 0.78rem;
    }

    .top-status-card span {
        font-size: 0.66rem;
    }

    .top-status-card small {
        font-size: 0.62rem;
    }

    .status-icon {
        width: 30px;
        flex-basis: 30px;
        font-size: 1.45rem;
    }

    .sidebar {
        gap: 10px;
        padding: 8px 7px;
    }

    .nav-button {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .dashboard-grid {
        gap: 6px;
        grid-template-rows: 1.02fr 0.98fr 0.9fr;
    }

    .panel-stack {
        gap: 6px;
    }

    .panel-status-stack {
        grid-template-rows: 1.05fr 0.95fr;
    }

    .panel {
        padding: 10px;
    }

    .panel-header {
        min-height: 24px;
        margin-bottom: 7px;
    }

    .title-row {
        gap: 7px;
    }

    .title-row h2 {
        font-size: 0.78rem;
    }

    .panel-icon {
        width: 24px;
        height: 24px;
        font-size: 0.88rem;
    }

    .wa-stat-grid,
    .cadastro-grid {
        gap: 8px;
    }

    .stat-tile {
        min-height: 66px;
    }

    .stat-tile strong {
        font-size: 1.65rem;
    }

    .stat-tile span {
        margin-top: 6px;
        font-size: 0.68rem;
    }

    .wa-time-grid {
        margin-top: 9px;
    }

    .wa-time-grid > div {
        padding: 9px 12px;
    }

    .wa-time-grid span,
    .cadastro-bottom span,
    .server-metrics span,
    .service-block > span,
    .network-link span,
    .switch-metrics span,
    .ap-card span,
    .backup-table span,
    .backup-summary span,
    .footer-kpi span {
        font-size: 0.62rem;
    }

    .wa-time-grid strong {
        margin-top: 6px;
        font-size: 0.88rem;
    }

    .wa-time-grid small {
        margin-top: 7px;
        font-size: 0.66rem;
    }

    .agenda-list {
        gap: 3px;
    }

    .agenda-row {
        grid-template-columns: 42px minmax(0, 1fr) auto;
        gap: 7px;
        padding-left: 8px;
    }

    .agenda-row strong,
    .agenda-row p {
        font-size: 0.68rem;
    }

    .agenda-row small {
        font-size: 0.62rem;
    }

    .status-pill {
        padding: 3px 7px;
        font-size: 0.6rem;
    }

    .next-meeting {
        height: 28px;
        margin-top: 6px;
        gap: 6px;
        padding: 0 8px;
    }

    .next-meeting span,
    .next-meeting em,
    .next-meeting strong {
        font-size: 0.62rem;
    }

    .load-list {
        gap: 8px;
    }

    .load-row {
        grid-template-columns: 62px minmax(0, 1fr) 20px 30px;
        gap: 6px;
    }

    .load-row strong,
    .load-row span {
        font-size: 0.63rem;
    }

    .load-row .bar {
        height: 10px;
    }

    .panel-total {
        margin-top: 10px;
        padding-top: 8px;
    }

    .panel-total span {
        font-size: 0.68rem;
    }

    .panel-total strong {
        font-size: 1rem;
    }

    .status-chart-wrap {
        grid-template-columns: 68px minmax(0, 1fr);
        gap: 8px;
    }

    .donut-chart {
        width: 66px;
        height: 66px;
    }

    .donut-chart::after {
        width: 38px;
        height: 38px;
    }

    .donut-chart strong {
        font-size: 0.95rem;
    }

    .donut-chart span,
    .legend-row,
    .alert-row {
        font-size: 0.62rem;
    }

    .status-legend {
        gap: 3px;
    }

    .legend-row {
        grid-template-columns: 9px minmax(0, 1fr) auto;
        gap: 6px;
    }

    .legend-color {
        height: 9px;
    }

    .alert-list {
        gap: 5px;
    }

    .alert-list.mini {
        gap: 4px;
    }

    .panel-ticket-alerts .alert-row {
        font-size: 0.58rem;
    }

    .alert-dot {
        width: 14px;
        height: 14px;
        font-size: 0.56rem;
    }

    .cadastro-grid .stat-tile {
        min-height: 64px;
    }

    .cadastro-bottom {
        margin-top: 9px;
    }

    .cadastro-bottom > div {
        min-height: 52px;
        padding: 10px 12px;
    }

    .cadastro-bottom strong {
        margin-top: 7px;
        font-size: 0.76rem;
    }

    .cadastro-bottom .red-text {
        font-size: 1rem;
    }

    .server-metrics {
        padding-bottom: 7px;
    }

    .server-metrics > div {
        padding: 0 8px;
    }

    .server-metrics strong {
        margin: 5px 0 3px;
        font-size: 1.12rem;
    }

    .server-metrics svg {
        height: 20px;
    }

    .server-metrics small,
    .service-item span {
        font-size: 0.62rem;
    }

    .service-block {
        margin-top: 8px;
    }

    .service-row {
        margin-top: 7px;
        gap: 5px;
    }

    .service-item i {
        margin-bottom: 2px;
        font-size: 0.78rem;
    }

    .service-item strong {
        font-size: 0.62rem;
    }

    .network-list {
        gap: 4px;
    }

    .network-link {
        padding-top: 4px;
    }

    .network-title {
        font-size: 0.66rem;
    }

    .network-stats {
        margin-top: 4px;
    }

    .network-stats strong {
        margin-top: 3px;
        font-size: 0.78rem;
    }

    .sparkline {
        margin-top: 3px;
        height: 8px;
    }

    .system-list {
        gap: 5px;
    }

    .system-row {
        height: 28px;
        padding: 0 10px;
    }

    .system-row strong,
    .system-row span,
    .last-check {
        font-size: 0.64rem;
    }

    .last-check {
        margin-top: 7px;
    }

    .switch-card {
        padding: 10px;
    }

    .switch-head strong,
    .ap-head strong {
        font-size: 0.72rem;
    }

    .switch-head span,
    .ap-head span {
        font-size: 0.64rem;
    }

    .switch-metrics {
        margin-top: 10px;
    }

    .switch-metrics strong {
        margin-top: 5px;
        font-size: 0.92rem;
    }

    .port-strip {
        margin-top: 9px;
    }

    .port-strip span {
        margin-bottom: 5px;
        font-size: 0.64rem;
    }

    .ports {
        gap: 3px;
    }

    .port {
        height: 13px;
    }

    .port-legend {
        margin-top: 7px;
        gap: 12px;
        font-size: 0.58rem;
    }

    .ap-card {
        padding: 8px;
    }

    .ap-card dl {
        margin-top: 8px;
        gap: 5px 8px;
    }

    .ap-card dt {
        font-size: 0.6rem;
    }

    .ap-card dd {
        font-size: 0.68rem;
    }

    .progress {
        height: 10px;
        margin-top: 7px;
    }

    .backup-row {
        min-height: 24px;
        font-size: 0.64rem;
    }

    .backup-row.header {
        font-size: 0.56rem;
    }

    .backup-row .ok-pill {
        padding: 2px 8px;
    }

    .backup-summary {
        margin-top: 6px;
        padding-top: 7px;
        grid-template-columns: 1fr 1fr 40px;
    }

    .backup-summary strong {
        margin-top: 3px;
        font-size: 0.88rem;
    }

    .backup-summary small {
        display: block;
        margin-left: 0;
        font-size: 0.64rem;
    }

    .backup-summary > i {
        width: 36px;
        height: 36px;
        font-size: 1.2rem;
    }

    .footer-kpis {
        grid-template-columns: 1.2fr 1.15fr 1.12fr 0.95fr 1.2fr minmax(280px, 2.4fr);
        padding: 0 12px;
    }

    .footer-kpi {
        height: 28px;
        grid-template-columns: 24px minmax(0, 1fr) auto;
        gap: 6px;
        padding-right: 12px;
    }

    .footer-kpi i {
        font-size: 1.1rem;
    }

    .footer-kpi strong {
        font-size: 1rem;
    }

    blockquote {
        font-size: 0.74rem;
    }

    blockquote small {
        margin-top: 3px;
        font-size: 0.64rem;
    }
}

@media (max-width: 1180px), (orientation: portrait) {
    body {
        overflow: auto;
    }

    .dashboard-shell {
        min-width: 0;
        height: auto;
        min-height: 100vh;
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto auto;
        padding: 10px;
    }

    .topbar {
        grid-column: 1;
        grid-template-columns: 1fr;
    }

    .top-status-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .sidebar {
        grid-column: 1;
        grid-row: 2;
        flex-direction: row;
        overflow-x: auto;
        justify-content: flex-start;
    }

    .dashboard-grid {
        grid-column: 1;
        grid-row: 3;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        grid-template-rows: none;
        grid-auto-rows: auto;
    }

    .panel,
    .panel-stack {
        grid-column: span 2;
        grid-row: auto;
        min-height: 230px;
    }

    .panel-whatsapp,
    .panel-agenda,
    .panel-cadastros,
    .panel-infra,
    .panel-system-alerts {
        grid-column: span 4;
    }

    .footer-kpis {
        grid-column: 1;
        grid-row: 4;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        padding: 12px;
    }

    .footer-kpi {
        border-right: 0;
        padding-right: 0;
    }

    blockquote {
        grid-column: 1 / -1;
        padding-left: 0;
    }
}

@media (max-width: 720px) {
    .top-status-grid,
    .dashboard-grid,
    .wa-stat-grid,
    .cadastro-grid,
    .server-metrics,
    .ap-grid,
    .footer-kpis {
        grid-template-columns: 1fr;
    }

    .panel,
    .panel-stack,
    .panel-whatsapp,
    .panel-agenda,
    .panel-cadastros,
    .panel-infra,
    .panel-system-alerts {
        grid-column: span 1;
    }

    .wa-time-grid,
    .cadastro-bottom,
    .infra-layout,
    .status-chart-wrap {
        grid-template-columns: 1fr;
    }

    .wa-time-grid > div + div,
    .cadastro-bottom > div + div {
        border-left: 0;
        border-top: 1px solid var(--line);
    }
}

body.layout-portrait {
    overflow-x: hidden;
    overflow-y: auto;
}

body.layout-portrait .dashboard-shell {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: auto;
    min-height: 100vh;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto auto;
    padding: 10px;
}

body.layout-portrait .topbar {
    grid-column: 1;
    grid-template-columns: 1fr;
}

body.layout-portrait .top-status-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

body.layout-portrait .sidebar {
    grid-column: 1;
    grid-row: 2;
    flex-direction: row;
    overflow-x: auto;
    justify-content: flex-start;
}

body.layout-portrait .dashboard-grid {
    grid-column: 1;
    grid-row: 3;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-rows: none;
    grid-auto-rows: auto;
}

body.layout-portrait .panel,
body.layout-portrait .panel-stack {
    grid-column: span 2;
    grid-row: auto;
    min-height: 230px;
}

body.layout-portrait .panel-whatsapp,
body.layout-portrait .panel-agenda,
body.layout-portrait .panel-cadastros,
body.layout-portrait .panel-infra,
body.layout-portrait .panel-system-alerts {
    grid-column: span 4;
}

body.layout-portrait .footer-kpis {
    grid-column: 1;
    grid-row: 4;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 12px;
}

body.layout-portrait .footer-kpi {
    border-right: 0;
    padding-right: 0;
}

body.layout-portrait blockquote {
    grid-column: 1 / -1;
    padding-left: 0;
}

body.layout-portrait .infra-layout {
    grid-template-columns: 1fr;
}

body.layout-landscape {
    overflow: auto;
}

body.layout-landscape .dashboard-shell {
    min-width: 1180px;
    height: 100vh;
    grid-template-columns: 66px minmax(0, 1fr);
    grid-template-rows: 76px minmax(0, 1fr) 58px;
}

body.layout-landscape .topbar {
    grid-column: 1 / -1;
    grid-template-columns: 340px minmax(0, 1fr);
}

body.layout-landscape .top-status-grid {
    grid-template-columns: 1.18fr 1fr 1.65fr 1.18fr 1.42fr 1.2fr;
}

body.layout-landscape .sidebar {
    grid-row: 2;
    grid-column: 1;
    flex-direction: column;
    overflow: hidden;
    justify-content: flex-start;
}

body.layout-landscape .dashboard-grid {
    grid-column: 2;
    grid-row: 2;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-template-rows: 1.13fr 1.03fr 0.92fr;
}

body.layout-landscape .panel {
    min-height: 0;
}

body.layout-landscape .panel-whatsapp { grid-column: 1 / 5; grid-row: 1; }
body.layout-landscape .panel-agenda { grid-column: 5 / 8; grid-row: 1; }
body.layout-landscape .panel-users { grid-column: 8 / 10; grid-row: 1; }
body.layout-landscape .panel-status-stack { grid-column: 10 / 13; grid-row: 1; }
body.layout-landscape .panel-cadastros { grid-column: 1 / 5; grid-row: 2; }
body.layout-landscape .panel-infra { grid-column: 5 / 10; grid-row: 2 / 4; }
body.layout-landscape .panel-systems { grid-column: 10 / 13; grid-row: 2; }
body.layout-landscape .panel-backups { grid-column: 1 / 5; grid-row: 3; }
body.layout-landscape .panel-system-alerts { grid-column: 10 / 13; grid-row: 3; }

body.layout-landscape .footer-kpis {
    grid-column: 1 / -1;
    grid-row: 3;
    grid-template-columns: 1.2fr 1.22fr 1.18fr 1fr 1.28fr minmax(320px, 2.6fr);
    gap: 0;
    padding: 0 14px;
}

body.layout-landscape .footer-kpi {
    border-right: 1px solid var(--line);
    padding-right: 18px;
}

@media (min-width: 1181px) and (max-height: 850px) {
    body.layout-landscape .dashboard-shell {
        grid-template-rows: 64px minmax(0, 1fr) 44px;
        gap: 6px;
        padding: 6px;
    }

    body.layout-landscape .dashboard-grid {
        gap: 6px;
        grid-template-rows: 1.02fr 0.98fr 0.9fr;
    }

    body.layout-landscape .panel-status-stack {
        grid-template-rows: 1.05fr 0.95fr;
    }

    body.layout-landscape .footer-kpis {
        grid-template-columns: 1.2fr 1.15fr 1.12fr 0.95fr 1.2fr minmax(280px, 2.4fr);
        padding: 0 12px;
    }

    body.layout-landscape .footer-kpi {
        height: 28px;
        grid-template-columns: 24px minmax(0, 1fr) auto;
        gap: 6px;
        padding-right: 12px;
    }
}

.module-dashboard {
    grid-template-rows: 76px 40px minmax(0, 1fr) 58px;
}

.module-dashboard .sidebar {
    grid-row: 2 / 4;
}

.module-dashboard .dashboard-grid {
    grid-row: 3;
}

.module-dashboard .footer-kpis {
    grid-row: 4;
}

.module-statusbar {
    grid-column: 2;
    grid-row: 2;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: var(--panel-radius);
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(180px, auto);
    align-items: center;
    gap: 16px;
    padding: 0 14px;
    background: linear-gradient(145deg, rgba(9, 24, 39, 0.94), rgba(3, 12, 22, 0.94));
}

.module-statusbar strong {
    font-size: 0.86rem;
    text-transform: uppercase;
}

.module-statusbar span {
    color: var(--soft);
    font-size: 0.72rem;
}

.module-statusbar > div:first-child {
    min-width: 0;
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.module-statusbar > div:first-child span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.module-rotation-info {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--blue);
}

.module-rotation-info strong {
    min-width: 42px;
    border: 1px solid rgba(38, 133, 255, 0.42);
    border-radius: 5px;
    padding: 4px 8px;
    text-align: center;
    color: var(--blue);
    background: rgba(38, 133, 255, 0.12);
}

.module-dots {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
}

.module-dot {
    width: 9px;
    height: 9px;
    border: 0;
    border-radius: 999px;
    background: rgba(127, 146, 167, 0.45);
}

.module-dot.active {
    width: 28px;
    background: var(--blue);
    box-shadow: 0 0 13px rgba(38, 133, 255, 0.55);
}

.module-dot.disabled {
    opacity: 0.25;
}

.module-view {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-template-rows: minmax(0, 1fr) !important;
    grid-auto-rows: minmax(0, 1fr);
    align-items: stretch;
}

.module-view > .panel,
.module-view > .panel-stack {
    display: none;
}

.module-view .module-visible {
    display: block;
    grid-row: 1 !important;
    min-height: 0;
    animation: moduleFade 320ms ease-out;
}

.module-view .panel-stack.module-visible {
    display: grid;
}

.module-view .panel-empty-modules.module-visible {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

@keyframes moduleFade {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.module-view .panel-overview { grid-column: 1 / 13 !important; }
.module-active-whatsapp .panel-whatsapp { grid-column: 1 / 7 !important; }
.module-active-whatsapp .panel-users { grid-column: 7 / 10 !important; }
.module-active-whatsapp .panel-status-stack { grid-column: 10 / 13 !important; }
.module-active-agenda .panel-agenda { grid-column: 1 / 13 !important; }
.module-active-cadastros .panel-cadastros { grid-column: 1 / 13 !important; }
.module-active-infraestrutura .panel-infra { grid-column: 1 / 13 !important; grid-row: 1 !important; }
.module-active-sistemas .panel-systems { grid-column: 1 / 13 !important; }
.module-active-clima .panel-weather { grid-column: 1 / 13 !important; }
.module-active-backups .panel-backups { grid-column: 1 / 13 !important; }
.module-active-alertas .panel-status-stack { grid-column: 1 / 7 !important; }
.module-active-alertas .panel-system-alerts { grid-column: 7 / 13 !important; }
.module-view .panel-empty-modules { grid-column: 1 / 13 !important; }

.module-view .panel {
    padding: 20px;
}

.module-view .panel-header {
    margin-bottom: 18px;
}

.module-view .title-row h2 {
    font-size: clamp(1rem, 1.35vw, 1.55rem);
    white-space: normal;
    overflow: visible;
}

.module-view .load-row {
    grid-template-columns: minmax(110px, 0.9fr) minmax(80px, 1.4fr) 28px 42px;
}

.module-view .panel-icon {
    width: 34px;
    height: 34px;
    font-size: 1.1rem;
}

.module-view .stat-tile {
    min-height: clamp(112px, 16vh, 170px);
}

.module-view .stat-tile strong {
    font-size: clamp(2.6rem, 4.2vw, 5.2rem);
}

.module-view .stat-tile span {
    font-size: clamp(0.82rem, 1vw, 1.12rem);
}

.module-view .wa-time-grid strong,
.module-view .server-metrics strong,
.module-view .backup-summary strong,
.module-view .panel-total strong {
    font-size: clamp(1.5rem, 2.4vw, 3rem);
}

.module-view .agenda-row {
    grid-template-columns: 78px minmax(0, 1fr) auto;
    gap: 16px;
    padding: 12px 0 12px 18px;
}

.module-view .agenda-row strong,
.module-view .agenda-row p,
.module-view .system-row strong,
.module-view .system-row span,
.module-view .backup-row,
.module-view .load-row strong,
.module-view .load-row span,
.module-view .alert-row {
    font-size: clamp(0.88rem, 1vw, 1.15rem);
}

.module-view .agenda-row small {
    font-size: clamp(0.78rem, 0.86vw, 1rem);
}

.module-view .next-meeting {
    height: 58px;
    margin-top: 18px;
}

.module-view .next-meeting span,
.module-view .next-meeting em,
.module-view .next-meeting strong {
    font-size: clamp(0.82rem, 0.95vw, 1.08rem);
}

.module-view .status-chart-wrap {
    grid-template-columns: minmax(130px, 190px) minmax(0, 1fr);
}

.module-view .donut-chart {
    width: clamp(124px, 12vw, 180px);
    height: clamp(124px, 12vw, 180px);
}

.module-view .donut-chart::after {
    width: 54%;
    height: 54%;
}

.overview-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.overview-card {
    min-height: 150px;
    border: 1px solid var(--line-strong);
    border-radius: 7px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: rgba(4, 13, 24, 0.55);
}

.overview-card span {
    color: var(--soft);
    font-size: 0.9rem;
    font-weight: 800;
    text-transform: uppercase;
}

.overview-card strong {
    margin-top: 12px;
    font-size: clamp(1.8rem, 3.2vw, 4rem);
    line-height: 1;
}

.overview-card small {
    margin-top: 10px;
    color: var(--soft);
    font-size: 0.92rem;
}

.overview-alerts {
    margin-top: 16px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.overview-alerts .alert-row {
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 10px;
}

.weather-hero {
    min-height: 250px;
    border: 1px solid var(--line-strong);
    border-radius: 7px;
    display: grid;
    grid-template-columns: minmax(120px, 180px) minmax(0, 1fr);
    align-items: center;
    gap: 26px;
    padding: 28px;
    background: rgba(4, 13, 24, 0.56);
}

.weather-hero img {
    width: clamp(110px, 11vw, 170px);
    height: clamp(110px, 11vw, 170px);
    object-fit: contain;
}

.weather-hero span {
    color: var(--soft);
    font-size: clamp(1rem, 1.25vw, 1.35rem);
    font-weight: 800;
    text-transform: uppercase;
}

.weather-hero strong {
    display: block;
    margin-top: 10px;
    font-size: clamp(4.2rem, 8vw, 9rem);
    line-height: 0.95;
}

.weather-hero p {
    margin: 14px 0 0;
    color: var(--text);
    font-size: clamp(1.2rem, 1.7vw, 2rem);
}

.weather-metrics {
    margin-top: 14px;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
}

.weather-metrics div {
    min-height: 110px;
    border: 1px solid var(--line);
    border-radius: 7px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 16px;
    background: rgba(5, 15, 27, 0.5);
}

.weather-metrics span {
    color: var(--soft);
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
}

.weather-metrics strong {
    margin-top: 10px;
    font-size: clamp(1.3rem, 2.2vw, 2.8rem);
}

.weather-note {
    min-height: 22px;
    margin: 14px 0 0;
    color: var(--amber);
    font-size: 0.92rem;
}

.panel-empty-modules {
    text-align: center;
}

.panel-empty-modules p {
    max-width: 720px;
    margin: 0 auto;
    color: var(--soft);
    font-size: clamp(1.2rem, 2vw, 2.4rem);
}

body.layout-portrait .module-dashboard {
    grid-template-rows: auto auto auto auto auto;
}

body.layout-portrait .module-dashboard .sidebar {
    grid-row: 2;
}

body.layout-portrait .module-statusbar {
    grid-column: 1;
    grid-row: 3;
    grid-template-columns: 1fr;
    min-height: 78px;
    align-items: start;
    padding: 12px;
}

body.layout-portrait .module-statusbar > div:first-child {
    display: grid;
    gap: 4px;
}

body.layout-portrait .module-dots {
    justify-content: flex-start;
}

body.layout-portrait .module-dashboard .dashboard-grid {
    grid-row: 4;
}

body.layout-portrait .module-dashboard .footer-kpis {
    grid-row: 5;
}

body.layout-portrait .module-view {
    grid-template-columns: 1fr;
}

body.layout-portrait .module-view .module-visible {
    grid-column: 1 !important;
}

body.layout-portrait .overview-grid,
body.layout-portrait .overview-alerts,
body.layout-portrait .module-view .wa-stat-grid,
body.layout-portrait .module-view .cadastro-grid,
body.layout-portrait .module-view .infra-layout,
body.layout-portrait .module-view .server-metrics,
body.layout-portrait .module-view .ap-grid,
body.layout-portrait .weather-metrics {
    grid-template-columns: 1fr;
}

body.layout-portrait .weather-hero {
    grid-template-columns: 1fr;
    min-height: 0;
}

body.layout-landscape .module-dashboard {
    grid-template-rows: 76px 40px minmax(0, 1fr) 58px;
}

body.layout-landscape .module-dashboard .sidebar {
    grid-row: 2 / 4;
}

body.layout-landscape .module-statusbar {
    grid-column: 2;
    grid-row: 2;
}

body.layout-landscape .module-dashboard .dashboard-grid {
    grid-row: 3;
}

body.layout-landscape .module-dashboard .module-view {
    grid-template-rows: minmax(0, 1fr) !important;
}

body.layout-landscape .module-dashboard .footer-kpis {
    grid-row: 4;
}
