:root {
    --bg: #f5f7f8;
    --ink: #17212b;
    --muted: #667085;
    --line: #d8dee4;
    --panel: #ffffff;
    --primary: #0f766e;
    --primary-dark: #115e59;
    --danger: #b42318;
    --warning: #9a6700;
    --success: #027a48;
    --gold: #d6bd55;
    --orange: #cf6d19;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 15px;
}

a {
    color: var(--primary);
    text-decoration: none;
}

code {
    background: #eef2f5;
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 2px 5px;
}

.topbar {
    min-height: 60px;
    background: #ffffff;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--ink);
}

.brand-logo {
    width: 154px;
    height: auto;
    display: block;
}

.brand-copy {
    border-left: 1px solid var(--line);
    padding-left: 14px;
}

.brand-copy strong {
    display: block;
    font-size: 18px;
}

.brand-copy span {
    color: var(--muted);
    font-size: 13px;
}

.topbar nav {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar nav a {
    color: #344054;
    font-weight: 700;
}

.topbar nav a:hover {
    color: var(--primary);
}

.nav-user {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.page {
    width: min(1180px, calc(100% - 32px));
    margin: 26px auto;
}

.page-title {
    margin-bottom: 20px;
}

.page-title h1 {
    margin: 0 0 4px;
    font-size: 26px;
}

.page-title p {
    margin: 0;
    color: var(--muted);
}

.cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.cards article,
.panel,
.auth-box,
.notice {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.cards article {
    padding: 18px;
}

.cards span {
    display: block;
    color: var(--muted);
    margin-bottom: 8px;
}

.cards strong {
    font-size: 28px;
}

.panel {
    padding: 20px;
    margin-bottom: 18px;
}

.panel h2,
.auth-box h1,
.notice h2 {
    margin-top: 0;
}

.module-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.module-list span {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 7px 10px;
    background: #fafafa;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.panel-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.panel-actions form {
    margin: 0;
}

.small-button {
    width: auto;
    padding: 8px 10px;
    font-size: 13px;
}

.secondary-small {
    border: 1px solid var(--line);
    background: #ffffff;
    color: #344054;
}

.panel-header h2 {
    margin: 0;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 920px;
}

th,
td {
    border-bottom: 1px solid var(--line);
    padding: 10px 8px;
    text-align: left;
    vertical-align: top;
}

th {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    min-width: 74px;
    justify-content: center;
    border-radius: 999px;
    padding: 4px 8px;
    border: 1px solid var(--line);
    background: #f2f4f7;
    font-size: 12px;
    font-weight: 700;
}

.status-up,
.status-closed,
.status-sent {
    color: var(--success);
    border-color: #6ce9a6;
    background: #ecfdf3;
}

.status-down,
.status-open,
.status-failed {
    color: var(--danger);
    border-color: #fda29b;
    background: #fff1f3;
}

.status-unknown,
.status-skipped {
    color: var(--warning);
    border-color: #f4c430;
    background: #fffaeb;
}

.sefaz-table {
    min-width: 1080px;
}

.sefaz-table th,
.sefaz-table td {
    text-align: center;
}

.sefaz-table th:first-child,
.sefaz-table td:first-child {
    text-align: left;
}

.sefaz-check-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(80px, 1fr));
    gap: 8px 12px;
    margin: 10px 0 16px;
}

.sefaz-check-grid .check-row {
    margin: 0;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fafafa;
}

.sefaz-status,
.sefaz-legend {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.sefaz-legend {
    flex-wrap: wrap;
    font-size: 13px;
}

.sefaz-legend span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.sefaz-dot {
    display: inline-block;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: #98a2b3;
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, .7), 0 0 0 1px rgba(0, 0, 0, .12);
    flex: 0 0 auto;
}

.sefaz-dot.up {
    background: #12b76a;
}

.sefaz-dot.warning {
    background: #fdb022;
}

.sefaz-dot.down {
    background: #f04438;
}

.sefaz-dot.na {
    background: #d0d5dd;
}

.sefaz-row-warning td {
    background: #fffaeb;
}

.sefaz-row-down td {
    background: #fff1f3;
}

.sefaz-row-monitored td:first-child {
    border-left: 4px solid var(--primary);
}

.auth-box {
    max-width: 420px;
    margin: 60px auto;
    padding: 24px;
}

.auth-box.wide {
    max-width: 560px;
}

label {
    display: block;
    margin-bottom: 14px;
    font-weight: 700;
}

input {
    display: block;
    width: 100%;
    margin-top: 6px;
    border: 1px solid #b9c2cc;
    border-radius: 6px;
    padding: 11px 12px;
    font: inherit;
}

select,
textarea {
    display: block;
    width: 100%;
    margin-top: 6px;
    border: 1px solid #b9c2cc;
    border-radius: 6px;
    padding: 11px 12px;
    font: inherit;
    background: #ffffff;
}

button {
    width: 100%;
    border: 0;
    border-radius: 6px;
    padding: 12px 14px;
    background: var(--primary);
    color: #ffffff;
    cursor: pointer;
    font-weight: 700;
}

.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 10px 14px;
    background: #ffffff;
    color: #344054;
    font-weight: 700;
}

.row-action {
    font-weight: 700;
}

.action-cell {
    min-width: 130px;
    white-space: nowrap;
}

.action-cell form {
    display: inline-block;
    margin: 0 0 0 8px;
}

.action-cell .row-action {
    margin-right: 8px;
}

.text-button {
    width: auto;
    background: transparent;
    color: var(--primary);
    padding: 0;
    border: 0;
}

.text-button:hover {
    background: transparent;
    color: var(--primary-dark);
}

.form-panel {
    max-width: 820px;
}

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

.sub-panel {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
    margin: 16px 0;
    background: #fafafa;
}

.sub-panel h2 {
    margin: 0 0 12px;
    font-size: 16px;
}

.check-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
}

.check-row input {
    width: auto;
    margin: 0;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.form-actions button {
    width: auto;
}

.filter-form {
    display: grid;
    grid-template-columns: 180px minmax(220px, 1fr) auto;
    gap: 14px;
    align-items: end;
}

.filter-form button {
    width: auto;
}

.inline-form {
    display: inline-flex;
    align-items: end;
    gap: 8px;
}

.inline-form input {
    width: auto;
}

.settings-form {
    margin-bottom: 16px;
}

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

.field-note {
    color: var(--muted);
    font-weight: 700;
    margin: 0 0 8px;
}

button:hover {
    background: var(--primary-dark);
}

.secondary-button:hover {
    background: #eef2f5;
}

.secondary-small:hover {
    background: #eef2f5;
}

.danger-button {
    background: var(--danger);
}

.danger-button:hover {
    background: #912018;
}

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

.summary-grid div {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
    background: #fafafa;
}

.summary-grid span,
.muted-line {
    color: var(--muted);
    display: block;
    font-size: 13px;
}

.summary-grid strong {
    display: block;
    margin-top: 6px;
}

.summary-grid small {
    color: var(--muted);
}

.small-stat {
    font-size: 16px !important;
}

.danger-text {
    color: var(--danger);
}

.incident-action-form textarea {
    min-height: 110px;
}

.note-list {
    display: grid;
    gap: 12px;
}

.note-list article {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
    background: #fafafa;
}

.note-list article div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
}

.note-list article p {
    margin: 10px 0 0;
}

.token-text {
    font-size: 13px;
    overflow-wrap: anywhere;
}

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

.rank-grid article {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fafafa;
    padding: 14px;
}

.rank-grid h3 {
    margin: 0 0 10px;
}

.rank-grid ol {
    margin: 0;
    padding-left: 22px;
}

.rank-grid li {
    margin-bottom: 6px;
}

.attention-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    margin-bottom: 18px;
    padding: 20px;
    border: 1px solid #f79009;
    border-radius: 8px;
    background: #fff7ed;
}

.attention-panel span {
    display: block;
    color: #b54708;
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.attention-panel strong {
    display: block;
    color: var(--ink);
    font-size: 24px;
}

.attention-panel p {
    margin: 6px 0 0;
    color: #7a2e0e;
}

.champion-panel {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    margin-bottom: 18px;
    padding: 20px;
    border: 1px solid #d6bd55;
    border-radius: 8px;
    background: #fffaf0;
}

.champion-panel span {
    color: var(--warning);
    display: block;
    font-weight: 700;
    margin-bottom: 4px;
}

.champion-panel strong {
    display: block;
    font-size: 28px;
}

.champion-panel p {
    margin: 4px 0 0;
    color: var(--muted);
}

.avatar,
.champion-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    overflow: hidden;
    background: #eef2f5;
    color: var(--primary-dark);
    font-weight: 800;
    flex: 0 0 auto;
}

.avatar {
    width: 34px;
    height: 34px;
}

.nav-avatar {
    width: 28px;
    height: 28px;
    font-size: 12px;
}

.profile-avatar {
    width: 86px;
    height: 86px;
    font-size: 34px;
}

.champion-avatar {
    width: 76px;
    height: 76px;
    border: 3px solid #d6bd55;
    font-size: 30px;
}

.large-avatar {
    width: 64px;
    height: 64px;
    font-size: 24px;
}

.avatar img,
.champion-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.person-cell {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 180px;
}

.team-list {
    display: grid;
    gap: 14px;
}

.team-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 16px;
    align-items: start;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
    background: #fafafa;
}

.team-form {
    min-width: 0;
}

.team-grid {
    grid-template-columns: minmax(180px, 1fr) minmax(220px, 1fr);
}

.team-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 13px;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}

.profile-header h2 {
    margin: 0 0 4px;
}

.profile-header p {
    margin: 0;
    color: var(--muted);
}

.notice {
    padding: 14px 16px;
    margin-bottom: 16px;
}

.notice.warning {
    border-color: #f4c430;
    color: var(--warning);
}

.notice.danger {
    border-color: #fda29b;
    color: var(--danger);
}

.notice.success {
    border-color: #6ce9a6;
    color: var(--success);
}

.tv-body {
    background: #101418;
    color: #f6f8fb;
    font-size: 16px;
    min-height: 100vh;
}

.tv-screen {
    min-height: 100vh;
    padding: 18px;
}

.tv-hero {
    align-items: center;
    background: #ffffff;
    border: 1px solid #26333f;
    border-left: 10px solid #0f766e;
    border-radius: 8px;
    color: #111827;
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(300px, 1fr) minmax(300px, 1.2fr) minmax(190px, auto);
    min-height: 118px;
    padding: 18px 22px;
}

.tv-hero-warning {
    border-left-color: #f59e0b;
}

.tv-hero-danger {
    border-left-color: #ef4444;
}

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

.tv-brand-block img {
    display: block;
    height: auto;
    max-width: 220px;
    width: 38%;
}

.tv-brand-block span,
.tv-operation span,
.tv-clock span {
    color: #667085;
    display: block;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}

.tv-brand-block strong {
    display: block;
    font-size: 28px;
    line-height: 1.05;
}

.tv-operation {
    align-items: center;
    display: flex;
    gap: 18px;
    justify-content: center;
    min-width: 0;
}

.tv-operation strong {
    display: block;
    font-size: 46px;
    line-height: 1;
}

.tv-pulse {
    background: #12b76a;
    border-radius: 50%;
    box-shadow: 0 0 0 10px rgba(18, 183, 106, 0.12);
    display: block;
    height: 42px;
    width: 42px;
}

.tv-hero-warning .tv-pulse {
    background: #f59e0b;
    box-shadow: 0 0 0 10px rgba(245, 158, 11, 0.14);
}

.tv-hero-danger .tv-pulse {
    background: #ef4444;
    box-shadow: 0 0 0 10px rgba(239, 68, 68, 0.14);
}

.tv-clock {
    text-align: right;
}

.tv-clock strong {
    display: block;
    font-size: 42px;
    line-height: 1;
}

.tv-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 10px;
}

.tv-actions button {
    background: #111827;
    border: 1px solid #344054;
    border-radius: 6px;
    color: #ffffff;
    cursor: pointer;
    font-size: 12px;
    font-weight: 800;
    min-height: 34px;
    padding: 8px 10px;
}

.tv-actions button:hover,
.tv-actions button.is-active {
    background: #0f766e;
    border-color: #0f766e;
}

.tv-alert-strip {
    border-radius: 8px;
    font-weight: 800;
    margin-top: 14px;
    padding: 12px 16px;
}

.tv-alert-danger {
    background: #7f1d1d;
    color: #fff1f2;
}

.tv-critical-strip {
    align-items: center;
    background: #fff1f3;
    border: 2px solid #ef4444;
    border-radius: 8px;
    color: #7f1d1d;
    display: grid;
    gap: 12px;
    grid-template-columns: auto minmax(0, 1fr);
    margin-top: 14px;
    padding: 12px 16px;
}

.tv-critical-strip strong {
    font-size: 18px;
    text-transform: uppercase;
    white-space: nowrap;
}

.tv-critical-strip div {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tv-critical-strip span {
    background: #ffffff;
    border: 1px solid #fda29b;
    border-radius: 999px;
    color: #7f1d1d;
    display: inline-flex;
    font-size: 13px;
    font-weight: 800;
    gap: 6px;
    max-width: 360px;
    overflow: hidden;
    padding: 6px 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tv-critical-strip small {
    color: #b42318;
    font-weight: 700;
}

.tv-metrics {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin: 14px 0;
}

.tv-metric {
    background: #1a222b;
    border: 1px solid #2d3a45;
    border-radius: 8px;
    min-height: 116px;
    padding: 16px;
}

.tv-metric span {
    color: #cbd5e1;
    display: block;
    font-size: 13px;
    font-weight: 800;
    min-height: 32px;
    text-transform: uppercase;
}

.tv-metric strong {
    display: block;
    font-size: 44px;
    line-height: 1;
    margin-top: 6px;
}

.tv-metric small {
    color: #95a3b3;
    display: block;
    margin-top: 8px;
}

.tv-metric-up {
    border-color: #12b76a;
}

.tv-metric-warning {
    border-color: #f59e0b;
}

.tv-metric-danger {
    border-color: #ef4444;
}

.tv-metric-muted {
    border-color: #475467;
}

.tv-status-legend {
    align-items: center;
    background: #1a222b;
    border: 1px solid #2d3a45;
    border-radius: 8px;
    color: #cbd5e1;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 20px;
    margin: -4px 0 14px;
    min-height: 42px;
    padding: 9px 14px;
}

.tv-status-legend span {
    align-items: center;
    display: inline-flex;
    font-size: 13px;
    font-weight: 800;
    gap: 8px;
}

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

.legend-up {
    background: #12b76a;
}

.legend-warning {
    background: #f59e0b;
}

.legend-down {
    background: #ef4444;
}

.tv-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: minmax(0, 1.8fr) minmax(360px, 0.8fr);
}

.tv-focus-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr) minmax(320px, 0.7fr);
    margin-bottom: 14px;
}

.tv-grid-lower {
    grid-template-columns: minmax(0, 1.55fr) minmax(360px, 0.85fr);
}

.tv-column {
    display: grid;
    gap: 14px;
}

.tv-column-wide {
    grid-template-rows: auto auto;
}

.tv-panel {
    background: #f8fafc;
    border: 1px solid #2d3a45;
    border-radius: 8px;
    color: #111827;
    min-width: 0;
    padding: 16px;
}

.tv-panel-up {
    border-top: 5px solid #12b76a;
}

.tv-panel-warning {
    border-top: 5px solid #f59e0b;
}

.tv-panel-danger {
    border-top: 5px solid #ef4444;
}

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

.tv-panel-head h1 {
    font-size: 22px;
    line-height: 1.05;
    margin: 0;
}

.tv-panel-head span {
    color: #667085;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    white-space: nowrap;
}

.tv-panel-badge {
    border-radius: 999px;
    border: 1px solid #d8dee4;
    padding: 6px 10px;
}

.tv-panel-badge-up {
    background: #ecfdf3;
    border-color: #6ce9a6;
    color: #027a48 !important;
}

.tv-panel-badge-warning {
    background: #fffaeb;
    border-color: #fdb022;
    color: #9a6700 !important;
}

.tv-panel-badge-danger {
    background: #fff1f3;
    border-color: #fda29b;
    color: #b42318 !important;
}

.tv-node-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.tv-node-grid-focus {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.tv-node-grid-compact {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.tv-switch-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.tv-node {
    background: #ffffff;
    border: 1px solid #d8dee4;
    border-left: 8px solid #98a2b3;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    min-height: 148px;
    min-width: 0;
    padding: 12px;
}

.tv-node-compact {
    min-height: 112px;
    padding: 9px 10px;
}

.tv-node-compact strong {
    font-size: 16px;
    margin: 8px 0 3px;
    min-height: 36px;
}

.tv-node-compact .tv-host {
    font-size: 12px;
}

.tv-node-compact .tv-latency {
    margin: 8px 0 6px;
}

.tv-node-compact .tv-node-foot {
    font-size: 11px;
}

.tv-node-up {
    border-left-color: #12b76a;
}

.tv-node-down {
    border-left-color: #ef4444;
}

.tv-node-unknown {
    border-left-color: #f59e0b;
}

.tv-node-head,
.tv-node-foot {
    align-items: center;
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.tv-site {
    background: #eef2f5;
    border-radius: 999px;
    color: #344054;
    font-size: 12px;
    font-weight: 800;
    max-width: 110px;
    overflow: hidden;
    padding: 4px 8px;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.tv-led {
    background: #98a2b3;
    border-radius: 50%;
    display: block;
    height: 14px;
    width: 14px;
}

.tv-node-up .tv-led {
    background: #12b76a;
}

.tv-node-down .tv-led {
    background: #ef4444;
}

.tv-node-unknown .tv-led {
    background: #f59e0b;
}

.tv-node strong {
    display: block;
    font-size: 20px;
    line-height: 1.12;
    margin: 14px 0 5px;
    min-height: 44px;
    overflow: hidden;
}

.tv-host {
    color: #667085;
    display: block;
    font-size: 13px;
    min-height: 18px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tv-latency {
    background: #eef2f5;
    border-radius: 999px;
    height: 8px;
    margin: 13px 0 8px;
    overflow: hidden;
}

.tv-latency span {
    background: #98a2b3;
    display: block;
    height: 100%;
}

.tv-latency-good span {
    background: #12b76a;
}

.tv-latency-warn span {
    background: #f59e0b;
}

.tv-latency-bad span {
    background: #ef4444;
}

.tv-node-foot {
    color: #667085;
    font-size: 12px;
    margin-top: auto;
}

.tv-ticket {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 6px;
    color: #9a3412;
    font-size: 12px;
    font-weight: 800;
    margin-top: 9px;
    padding: 5px 7px;
}

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

.tv-sefaz-grid-tight {
    gap: 8px;
}

.tv-sefaz-card {
    background: #ffffff;
    border: 1px solid #d8dee4;
    border-left: 7px solid #12b76a;
    border-radius: 8px;
    min-height: 96px;
    padding: 10px;
}

.tv-sefaz-warning {
    border-left-color: #f59e0b;
}

.tv-sefaz-down {
    border-left-color: #ef4444;
}

.tv-sefaz-card strong {
    display: block;
    font-size: 25px;
    line-height: 1;
}

.tv-sefaz-card span {
    color: #667085;
    display: block;
    font-size: 13px;
    margin-top: 6px;
}

.tv-sefaz-dots {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.tv-sefaz-dot {
    background: #98a2b3;
    border-radius: 50%;
    display: block;
    height: 13px;
    width: 13px;
}

.tv-sefaz-dot-up {
    background: #12b76a;
}

.tv-sefaz-dot-warning {
    background: #f59e0b;
}

.tv-sefaz-dot-down {
    background: #ef4444;
}

.tv-glpi-split {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tv-glpi-split div {
    background: #ffffff;
    border: 1px solid #d8dee4;
    border-radius: 8px;
    min-height: 104px;
    padding: 14px;
}

.tv-glpi-split span,
.tv-champion span,
.tv-ticket-list span {
    color: #667085;
    display: block;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.tv-glpi-split strong {
    display: block;
    font-size: 44px;
    line-height: 1;
    margin-top: 10px;
}

.tv-champion {
    align-items: center;
    background: #fffaf0;
    border: 1px solid #f4c430;
    border-radius: 8px;
    display: flex;
    gap: 14px;
    margin-top: 12px;
    min-height: 96px;
    padding: 12px;
}

.tv-champion-avatar {
    align-items: center;
    background: #ffffff;
    border: 3px solid #d6bd55;
    border-radius: 50%;
    color: #9a6700;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 28px;
    font-weight: 900;
    height: 66px;
    justify-content: center;
    overflow: hidden;
    width: 66px;
}

.tv-champion-avatar img {
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.tv-champion strong {
    display: block;
    font-size: 22px;
    line-height: 1.1;
    margin-top: 4px;
}

.tv-champion small {
    color: #7a2e0e;
    display: block;
    margin-top: 4px;
}

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

.tv-ticket-list article {
    background: #ffffff;
    border: 1px solid #d8dee4;
    border-radius: 8px;
    min-height: 64px;
    padding: 10px;
}

.tv-ticket-list strong {
    display: block;
    font-size: 15px;
    line-height: 1.2;
    margin-bottom: 5px;
}

.tv-empty {
    color: #667085;
    margin: 0;
}

.tv-footer {
    align-items: center;
    color: #cbd5e1;
    display: flex;
    gap: 18px;
    justify-content: space-between;
    margin-top: 14px;
}

.tv-refresh-bar {
    background: #26333f;
    border-radius: 999px;
    flex: 1;
    height: 8px;
    overflow: hidden;
}

.tv-refresh-bar span {
    background: #12b76a;
    display: block;
    height: 100%;
    width: 0;
}

@media (max-width: 820px) {
    .cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .topbar {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
        padding: 14px 16px;
    }

    .brand-logo {
        width: 132px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .summary-grid,
    .filter-form,
    .recipient-rules,
    .sefaz-check-grid,
    .rank-grid,
    .attention-panel,
    .team-grid,
    .champion-panel,
    .team-row {
        grid-template-columns: 1fr;
    }

    .champion-panel {
        align-items: start;
    }

    .tv-screen {
        padding: 10px;
    }

    .tv-hero,
    .tv-focus-grid,
    .tv-grid,
    .tv-metrics,
    .tv-critical-strip {
        grid-template-columns: 1fr;
    }

    .tv-clock,
    .tv-operation {
        text-align: left;
        justify-content: flex-start;
    }

    .tv-actions {
        justify-content: flex-start;
    }

    .tv-brand-block img {
        width: 180px;
    }

    .tv-operation strong,
    .tv-clock strong {
        font-size: 34px;
    }

    .tv-sefaz-grid,
    .tv-glpi-split {
        grid-template-columns: 1fr;
    }
}

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