:root {
    --bg-deep: #0b0e14;
    --bg-dark: #121820;
    --bg-card: #1c2128;
    --border: #30363d;
    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --white: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.v6-noc {
    background-color: var(--bg-deep);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    font-size: 9.5px;
    /* Reduced from 10px */
    /* Increased from 8.5px */
}

.noc-wrapper {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 2px;
    gap: 2px;
    /* Tightest gap */
    /* Slightly tightened from 3px for better layout control */
}

/* HEADER REFINEMENT */
.v6-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-dark);
    padding: 2px 10px;
    border-radius: 4px;
    border: 1px solid var(--border);
    flex-shrink: 0;
    height: 26px;
    /* Slimmer header */
    /* Slim but professional */
}

.brand {
    display: flex;
    align-items: center;
    gap: 8px;
}

.brand h1 {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.v6-brand-icon {
    width: 16px;
    height: 16px;
    color: #39ff14;
}

.v6-header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

#lastUpdateText {
    font-size: 10px;
    color: var(--text-secondary);
}

.v6-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.v6-controls select {
    background: #000;
    border: 1px solid var(--border);
    color: #fff;
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 2px;
}

.v6-controls button {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
}

/* SECTION 1: SUB-HEADER ROW */
.v6-middle-row.section-1 {
    display: grid;
    grid-template-columns: 200px 1fr 140px;
    gap: 4px;
    height: 100px;
    /* Reduced from 105px */
    /* Reduced from 115px */
    flex-shrink: 0;
}

/* BLOCKS */
.v6-block {
    background: var(--bg-dark);
    border-radius: 4px;
    border: 1px solid var(--border);
    overflow: hidden;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.block-title {
    background: #1a1f26;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-bottom: 1px solid var(--border);
    text-align: center;
    color: var(--white);
    letter-spacing: 0.5px;
}

/* TABLES */
.v6-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 10px;
}

.v6-table th {
    background: #1c2128;
    color: var(--text-secondary);
    font-weight: 600;
    padding: 2px 6px;
    border: 1px solid var(--border);
    text-align: center;
}

.v6-table td {
    border: 1px solid var(--border);
    padding: 1px 6px;
    text-align: center;
    white-space: nowrap;
    height: 17px;
}

.v6-table tr td:first-child {
    background: #1a1f26;
    font-weight: 600;
    text-align: left;
}

/* PROGRESSION / CARDS */
.v6-prog-dia {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 4px;
    overflow-y: auto;
}

.v6-inconsis-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
}

.v6-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4px;
}

.v6-card-title {
    font-size: 10px;
    color: var(--white);
    text-align: center;
    line-height: 1.1;
    margin-bottom: 6px;
    font-weight: 500;
}

.v6-card-val {
    font-size: 32px;
    font-weight: 700;
    line-height: 1;
    color: var(--white);
}

.v6-card.active {
    background: rgba(190, 40, 40, 0.95);
    border-color: #ff3333;
}

.v6-incidentes-hoje {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 4px;
    display: flex;
    flex-direction: column;
}

.v6-inc-header {
    background: #1a1f26;
    font-size: 10px;
    font-weight: 700;
    text-align: center;
    padding: 3px;
    border-bottom: 1px solid var(--border);
}

.v6-inc-row {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    border-bottom: 1px solid var(--border);
}

.v6-inc-row:last-child {
    border-bottom: none;
}

.v6-inc-row span {
    margin-left: 10px;
    font-size: 18px;
}

.v6-inc-row.p0.active {
    background: #b00;
    color: #fff;
}

.v6-inc-row.p1.active {
    background: #d90;
    color: #000;
}

.v6-inc-row.p2.active {
    background: #5c7ba2;
    color: #fff;
}

.badge-v6 {
    padding: 1px 5px;
    border-radius: 2px;
    font-weight: 700;
    font-size: 9px;
}

.bg-tamops {
    background: #388bfd;
    color: #fff;
}

.v6-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.v6-spinner {
    width: 30px;
    height: 30px;
    border: 4px solid #222;
    border-top-color: #00f2ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.hidden {
    display: none !important;
}

::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 2px;
}

.table-block>div:last-child {
    overflow-y: auto;
    flex: 1;
}

.v6-toggle {
    position: relative;
    width: 34px;
    height: 18px;
}

.v6-toggle input {
    display: none;
}

.v6-toggle label {
    position: absolute;
    inset: 0;
    background: #333;
    border-radius: 9px;
    cursor: pointer;
}

.v6-toggle label::after {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    background: #fff;
    top: 2px;
    left: 2px;
    border-radius: 50%;
    transition: 0.2s;
}

.v6-toggle input:checked+label {
    background: #39ff14;
}

.v6-toggle input:checked+label::after {
    left: 18px;
}