/* Card 4 — Vista Unidades · presentación premium */

#view-units {
    --units-accent: #00f2fe;
    --units-accent-dim: rgba(0, 242, 254, 0.12);
    --units-surface: var(--bg-panel, #161a23);
    --units-surface-2: rgba(18, 21, 28, 0.92);
    --units-border: var(--border-color, #272e3d);
    --units-glow: 0 8px 32px rgba(0, 0, 0, 0.35);
    gap: 14px !important;
}

#tab-units.tab-btn { gap: 6px; }
#tab-units.tab-btn.active {
    color: #67e8f9;
    border-bottom-color: #00f2fe !important;
}

.units-header-stack {
    display: grid;
    grid-template-columns: minmax(0, 420px) 1fr;
    gap: 10px;
    align-items: stretch;
}
@media (max-width: 900px) {
    .units-header-stack { grid-template-columns: 1fr; }
}

.units-scope-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid rgba(251, 191, 36, 0.2);
    background: linear-gradient(145deg, rgba(41, 37, 24, 0.65) 0%, rgba(22, 26, 35, 0.85) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    font-size: 0.68rem;
    line-height: 1.45;
    color: var(--text-muted, #94a3b8);
}
.units-scope-note-icon {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(251, 191, 36, 0.05));
    border: 1px solid rgba(251, 191, 36, 0.35);
    color: #fcd34d;
    font-size: 0.7rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}
.units-scope-note-body strong {
    display: block;
    font-family: 'Outfit', sans-serif;
    font-size: 0.58rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #fde68a;
    font-weight: 800;
    margin-bottom: 3px;
}
.units-scope-note-body p { margin: 0; color: #e2e8f0; font-size: 0.67rem; }

.units-filter-banner {
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid var(--units-border);
    background: linear-gradient(180deg, rgba(22, 26, 35, 0.95) 0%, rgba(16, 18, 22, 0.9) 100%);
    box-shadow: var(--units-glow);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 20px;
    font-size: 0.68rem;
    color: var(--text-muted);
}
.units-banner-main {
    display: flex;
    align-items: center;
    gap: 8px;
}
.units-banner-main strong {
    font-family: 'Outfit', sans-serif;
    color: var(--text-main, #e2e8f0);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    font-size: 0.68rem;
}
.units-banner-main span {
    color: var(--text-muted);
    font-weight: 500;
}
.units-filter-val {
    color: #7dd3fc;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 6px;
    background: rgba(56, 189, 248, 0.08);
    border: 1px solid rgba(56, 189, 248, 0.15);
}

/* Chips */
.units-chip-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 12px 16px !important;
    border-radius: 12px !important;
    background: var(--units-surface) !important;
    border: 1px solid var(--units-border) !important;
    box-shadow: var(--units-glow);
}
.units-chip-bar > label {
    font-family: 'Outfit', sans-serif;
    font-size: 0.58rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    font-weight: 800;
    margin-right: 4px;
}
.units-chip-hint {
    font-size: 0.52rem;
    color: #64748b;
    margin-right: 8px;
    white-space: nowrap;
}
.units-chip-scroll {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex: 1 1 auto;
    min-width: 0;
    max-height: 88px;
    overflow-x: auto;
    overflow-y: auto;
    scrollbar-width: thin;
}
.units-chip {
    border: 1px solid rgba(51, 65, 85, 0.9);
    background: rgba(15, 23, 42, 0.5);
    color: #64748b;
    font-family: 'Outfit', sans-serif;
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.12s ease, border-color 0.15s, box-shadow 0.15s, color 0.15s;
    flex-shrink: 0;
}
.units-chip:hover {
    border-color: #475569;
    color: #e2e8f0;
    transform: translateY(-1px);
}
.units-chip.in-filter {
    border-color: rgba(56, 189, 248, 0.45);
    background: rgba(56, 189, 248, 0.08);
    color: #7dd3fc;
}
.units-chip.focused {
    border-color: #fbbf24 !important;
    background: linear-gradient(180deg, rgba(251, 191, 36, 0.28) 0%, rgba(251, 191, 36, 0.1) 100%) !important;
    color: #fff !important;
    box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.45), 0 4px 16px rgba(251, 191, 36, 0.2);
    transform: translateY(-1px);
}
.units-chip-actions {
    margin-left: auto;
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}
.units-chip-actions button {
    font-family: 'Outfit', sans-serif;
    font-size: 0.58rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid var(--units-border);
    background: rgba(255, 255, 255, 0.03);
    color: #cbd5e1;
    cursor: pointer;
    transition: all 0.15s ease;
}
.units-chip-actions button:hover {
    color: #fff;
    border-color: #64748b;
    background: rgba(255, 255, 255, 0.06);
}
#units-btn-print {
    border-color: rgba(0, 242, 254, 0.3) !important;
    color: #67e8f9 !important;
}

/* Panel detalle */
.units-detail-panel {
    padding: 0 !important;
    overflow: hidden;
    border-radius: 14px !important;
    border: 1px solid var(--units-border) !important;
    background: var(--units-surface) !important;
    box-shadow: var(--units-glow), 0 0 0 1px rgba(255, 255, 255, 0.02);
    position: relative;
}
.units-detail-panel::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, #00f2fe, #3b82f6, #8b5cf6);
    opacity: 0.85;
    z-index: 2;
}
.units-detail-hdr {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 14px 18px;
    padding: 18px 20px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: linear-gradient(180deg, rgba(22, 26, 35, 0.98) 0%, rgba(18, 21, 28, 0.95) 100%);
}
@media (max-width: 768px) {
    .units-detail-hdr { grid-template-columns: 1fr; }
}
.units-detail-identity {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}
.units-unit-avatar {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    font-weight: 900;
    letter-spacing: 0.02em;
    color: #e0f2fe;
    background: linear-gradient(135deg, rgba(0, 242, 254, 0.25) 0%, rgba(59, 130, 246, 0.2) 100%);
    border: 1px solid rgba(0, 242, 254, 0.35);
    box-shadow: 0 4px 16px rgba(0, 242, 254, 0.15);
}
.units-detail-hdr h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-main, #f1f5f9);
    margin: 0;
    line-height: 1.2;
    letter-spacing: -0.01em;
}
.units-detail-hdr .units-subline {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin: 4px 0 0;
}
.units-detail-hdr .units-subline strong {
    color: #7dd3fc;
    font-weight: 700;
}
.units-detail-badge {
    font-family: 'Outfit', sans-serif;
    font-size: 0.58rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #00f2fe;
    border: 1px solid rgba(0, 242, 254, 0.35);
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(0, 242, 254, 0.08);
    white-space: nowrap;
    align-self: start;
}
.units-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.06);
}
.units-nav button {
    font-family: 'Outfit', sans-serif;
    font-size: 0.62rem;
    font-weight: 700;
    padding: 7px 14px;
    border-radius: 8px;
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.04);
    color: #e2e8f0;
    cursor: pointer;
    transition: all 0.15s ease;
}
.units-nav button:hover:not(:disabled) {
    border-color: rgba(0, 242, 254, 0.4);
    background: rgba(0, 242, 254, 0.1);
    color: #a5f3fc;
}
.units-nav button:disabled { opacity: 0.3; cursor: not-allowed; }
.units-nav-pos {
    font-family: 'Outfit', sans-serif;
    font-size: 0.68rem;
    color: #94a3b8;
    font-weight: 700;
    min-width: 3.5rem;
    text-align: center;
    padding: 0 4px;
}

.units-detail-body {
    padding: 16px 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.units-meta-filter {
    padding: 10px 14px;
    border-radius: 10px;
    margin-bottom: 14px;
    background: linear-gradient(90deg, rgba(0, 242, 254, 0.06) 0%, rgba(59, 130, 246, 0.04) 100%);
    border: 1px solid rgba(0, 242, 254, 0.14);
    font-size: 0.68rem;
    color: #94a3b8;
    line-height: 1.5;
}
.units-meta-filter strong {
    font-family: 'Outfit', sans-serif;
    color: #cbd5e1;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.58rem;
    letter-spacing: 0.06em;
    margin-right: 6px;
}
.units-meta-filter em {
    color: #67e8f9;
    font-style: normal;
    font-weight: 600;
}
.units-meta-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}
.units-meta-pill {
    font-size: 0.65rem;
    padding: 5px 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
}
.units-meta-pill strong { color: var(--text-main); font-weight: 700; }

.units-kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 22px;
}
@media (max-width: 768px) { .units-kpi-grid { grid-template-columns: 1fr; } }

.units-kpi {
    position: relative;
    background: linear-gradient(160deg, rgba(22, 26, 35, 0.95) 0%, rgba(16, 18, 24, 0.98) 100%);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    padding: 16px 16px 14px 18px;
    overflow: hidden;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.units-kpi::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: var(--kpi-accent, #64748b);
    border-radius: 3px 0 0 3px;
}
.units-kpi:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}
.units-kpi.kpi-blue { --kpi-accent: #3b82f6; }
.units-kpi.kpi-amber { --kpi-accent: #f59e0b; }
.units-kpi.kpi-rose { --kpi-accent: #f43f5e; }
.units-kpi label {
    display: block;
    font-family: 'Outfit', sans-serif;
    font-size: 0.58rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-weight: 800;
}
.units-kpi .val {
    font-family: 'Outfit', sans-serif;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-main, #f8fafc);
    letter-spacing: -0.02em;
    line-height: 1.1;
}
.units-kpi .delta {
    font-size: 0.68rem;
    margin-top: 6px;
    font-weight: 600;
}
.units-kpi .delta.ok { color: #34d399; }
.units-kpi .delta.warn { color: #fbbf24; }
.units-kpi .delta.bad { color: #fb7185; }

.units-partidas-section h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.units-partidas-section h3::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(255,255,255,0.08), transparent);
}
.units-partidas-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.78rem;
    background: rgba(12, 14, 18, 0.6);
    border: 1px solid var(--units-border);
    border-radius: 12px;
    overflow: hidden;
}
.units-partidas-table th,
.units-partidas-table td {
    padding: 11px 14px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.units-partidas-table th {
    font-family: 'Outfit', sans-serif;
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    font-weight: 800;
    background: rgba(0, 0, 0, 0.4);
}
.units-partidas-table tbody tr:nth-child(even) { background: rgba(255, 255, 255, 0.015); }
.units-partidas-table tbody tr:hover { background: rgba(59, 130, 246, 0.06); }
.units-partidas-table td.num {
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}
.units-partidas-table tr:last-child td { border-bottom: none; }
.units-partidas-table .desv-ok { color: #34d399; font-weight: 700; }
.units-partidas-table .desv-bad { color: #fb7185; font-weight: 700; }

/* Grilla */
.units-grid-panel {
    padding: 0 !important;
    overflow: hidden;
    border-radius: 14px !important;
    border: 1px solid var(--units-border) !important;
    background: var(--units-surface) !important;
    box-shadow: var(--units-glow);
}
.units-grid-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--units-border);
    background: linear-gradient(180deg, rgba(22, 26, 35, 0.9) 0%, rgba(16, 18, 22, 0.85) 100%);
}
.units-grid-toolbar h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    font-weight: 800;
    margin: 0;
}

.units-compare-toggle {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 3px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--units-border);
}
.units-compare-toggle button {
    font-family: 'Outfit', sans-serif;
    font-size: 0.58rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 6px 11px;
    border-radius: 7px;
    border: 1px solid transparent;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}
.units-compare-toggle button:hover {
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.04);
}
.units-compare-toggle button.active {
    color: #e0f2fe;
    background: linear-gradient(180deg, rgba(0, 242, 254, 0.2) 0%, rgba(0, 242, 254, 0.08) 100%);
    border-color: rgba(0, 242, 254, 0.35);
    box-shadow: 0 0 0 1px rgba(0, 242, 254, 0.15);
}

.units-charts-wrap { padding: 8px 12px 12px; }
.units-chart-pane {
    width: 100%;
    height: 420px;
    min-height: 320px;
}
.units-chart-hint {
    margin: 0;
    padding: 8px 16px 14px;
    font-size: 0.6rem;
    color: #64748b;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.units-chart-hint.hidden,
.units-charts-wrap.hidden,
.units-page-ctrl.hidden,
#units-compare-table-wrap.hidden { display: none !important; }

.units-legend-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 3px;
    vertical-align: middle;
}
.units-legend-dot.ok { background: #34d399; }
.units-legend-dot.warn { background: #fbbf24; }
.units-legend-dot.bad { background: #f87171; }

@media (max-width: 900px) {
    .units-chart-pane { height: 360px; }
    .units-compare-toggle button { padding: 5px 8px; font-size: 0.52rem; }
}

.units-page-ctrl {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.62rem;
    color: var(--text-muted);
    padding: 4px 8px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
}
.units-page-ctrl button {
    padding: 5px 10px;
    border-radius: 6px;
    border: 1px solid var(--units-border);
    background: rgba(255, 255, 255, 0.04);
    color: #cbd5e1;
    cursor: pointer;
    font-size: 0.65rem;
    font-weight: 700;
    transition: all 0.12s ease;
}
.units-page-ctrl button:hover:not(:disabled) {
    border-color: #64748b;
    color: #fff;
}
.units-page-ctrl button:disabled { opacity: 0.35; }
.units-page-ctrl select {
    background: rgba(15, 17, 26, 0.9);
    border: 1px solid var(--units-border);
    color: var(--text-main);
    border-radius: 6px;
    font-size: 0.62rem;
    padding: 4px 8px;
}
#units-page-lbl {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    min-width: 4.5rem;
    text-align: center;
}

.units-exec-table {
    width: 100%;
    text-align: left;
    min-width: 900px;
    font-size: 0.74rem;
}
.units-exec-table thead th {
    font-family: 'Outfit', sans-serif;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    padding: 11px 12px;
    border-bottom: 1px solid var(--units-border);
    background: rgba(0, 0, 0, 0.45);
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    transition: color 0.12s, background 0.12s;
}
.units-exec-table thead th:hover {
    color: var(--text-main);
    background: rgba(59, 130, 246, 0.08);
}
.units-exec-table thead th.sorted {
    color: #93c5fd;
    background: rgba(59, 130, 246, 0.12);
}
.units-exec-table thead th .sort-ind { opacity: 0.7; margin-left: 3px; font-size: 0.55rem; }
.units-exec-table tbody td,
.units-exec-table tfoot td {
    padding: 9px 12px;
    border-bottom: 1px solid rgba(39, 46, 61, 0.6);
    vertical-align: middle;
}
.units-exec-table tbody tr:nth-child(even) { background: rgba(255, 255, 255, 0.012); }
.units-exec-table tbody tr.units-row-focus {
    background: linear-gradient(90deg, rgba(0, 242, 254, 0.1) 0%, rgba(0, 242, 254, 0.03) 100%) !important;
    box-shadow: inset 3px 0 0 #00f2fe;
}
.units-exec-table tbody tr { cursor: pointer; transition: background 0.12s; }
.units-exec-table tbody tr:hover { background: rgba(59, 130, 246, 0.07); }
.units-exec-table tfoot {
    background: rgba(0, 0, 0, 0.5);
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
}
.units-exec-table .txt-gasto { color: var(--color-gasto, #f87171); }
.units-exec-table .txt-proy { color: var(--color-proy, #d97706); }

.units-cell-name .units-code {
    font-family: 'Outfit', sans-serif;
    font-size: 0.55rem;
    color: #64748b;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.units-cell-name .units-title {
    font-weight: 600;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.units-bar-wrap { min-width: 108px; max-width: 140px; }
.units-bar-track {
    position: relative;
    height: 9px;
    background: rgba(15, 23, 42, 0.8);
    border-radius: 5px;
    overflow: hidden;
    border: 1px solid rgba(51, 65, 85, 0.6);
}
.units-bar-ppto {
    position: absolute; left: 0; top: 0; height: 100%;
    background: linear-gradient(90deg, rgba(100, 116, 139, 0.5), rgba(71, 85, 105, 0.4));
    max-width: 100%;
    border-radius: 5px 0 0 5px;
}
.units-bar-real {
    position: absolute; left: 0; top: 0; height: 100%;
    background: linear-gradient(90deg, #2563eb, #38bdf8);
    max-width: 100%;
    z-index: 1;
    border-radius: 5px;
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.35);
}
.units-bar-legend {
    display: flex;
    justify-content: space-between;
    font-size: 0.48rem;
    color: #64748b;
    margin-top: 3px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
}

.units-empty-state {
    padding: 48px 24px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.units-filter-hint {
    flex: 1 1 100%;
    font-size: 0.62rem;
    color: #94a3b8;
    margin-top: 4px;
}
.units-filter-hint strong { color: #7dd3fc; }
.units-filter-hint em { color: #fbbf24; font-style: normal; font-weight: 700; }

.units-chip-primary {
    border-color: rgba(0, 242, 254, 0.45) !important;
    background: rgba(0, 242, 254, 0.12) !important;
    color: #a5f3fc !important;
}
.units-chip-primary.is-on {
    border-color: rgba(0, 242, 254, 0.7) !important;
    background: rgba(0, 242, 254, 0.22) !important;
    color: #e0f2fe !important;
    box-shadow: 0 0 0 1px rgba(0, 242, 254, 0.35);
}

.units-viewing-pill {
    margin-left: 10px;
    font-size: 0.58rem;
    padding: 3px 10px;
    border-radius: 999px;
    border: 1px solid rgba(251, 191, 36, 0.4);
    background: rgba(251, 191, 36, 0.12);
    color: #fde68a;
}
.units-viewing-pill strong { color: #fff; font-weight: 800; }
.units-viewing-pill span {
    margin-left: 6px;
    padding-left: 6px;
    border-left: 1px solid rgba(251, 191, 36, 0.35);
    color: #fcd34d;
    font-weight: 700;
}
.units-filter-val.is-all {
    background: rgba(0, 242, 254, 0.12);
    border-color: rgba(0, 242, 254, 0.35);
    color: #a5f3fc;
}

.units-kpi-exec { margin: 0; }
.units-kpi-exec .panel { min-height: 108px; }

.units-logbook-panel {
    padding: 14px 16px !important;
    border-radius: 12px !important;
    border: 1px solid rgba(251, 191, 36, 0.15) !important;
    background: linear-gradient(145deg, rgba(41, 37, 24, 0.35) 0%, rgba(22, 26, 35, 0.9) 100%) !important;
}
.units-logbook-hdr {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}
.units-logbook-hdr h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #fde68a;
    margin: 0 0 4px;
}
.units-logbook-hdr p {
    margin: 0;
    font-size: 0.62rem;
    color: #94a3b8;
}
.units-log-open {
    font-family: 'Outfit', sans-serif;
    font-size: 0.58rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid rgba(251, 191, 36, 0.35);
    background: rgba(251, 191, 36, 0.1);
    color: #fcd34d;
    cursor: pointer;
    white-space: nowrap;
}
.units-logbook-list { display: flex; flex-direction: column; gap: 6px; }
.units-log-item {
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(0, 0, 0, 0.2);
    font-size: 0.65rem;
}
.units-log-meta { color: #94a3b8; margin-bottom: 3px; text-transform: uppercase; font-size: 0.55rem; letter-spacing: 0.04em; }
.units-log-preview { color: #e2e8f0; line-height: 1.35; }
.units-logbook-empty { font-size: 0.65rem; color: #64748b; padding: 8px 0; }
.units-log-more {
    display: inline-block;
    margin-top: 8px;
    font-size: 0.62rem;
    color: #67e8f9;
    text-decoration: none;
}

.units-tree-section { padding: 0 !important; }
.units-tree-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.units-tree-toolbar h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #cbd5e1;
    margin: 0;
}
.units-tree-hint { font-size: 0.58rem; color: #64748b; }
.units-exec-tree tbody tr.level-1 td { cursor: pointer; }
.units-exec-tree tbody tr.level-2 td,
.units-exec-tree tbody tr.level-3 td { cursor: pointer; }
.units-exec-tree .icon-colapsable {
    display: inline-block;
    width: 12px;
    font-size: 8px;
    margin-right: 4px;
    transition: transform 0.15s;
}
.units-exec-tree tr.is-open > td .icon-colapsable { transform: rotate(90deg); }
.units-col-period {
    display: block;
    font-size: 0.62rem;
    font-weight: 500;
    color: #64748b;
    text-transform: none;
    letter-spacing: 0;
    margin-top: 2px;
}
.units-ing-zero {
    font-size: 0.55rem;
    font-weight: 600;
    color: #64748b;
    text-transform: none;
    letter-spacing: 0;
}
.btn-op-unit {
    margin-left: 8px;
    font-size: 0.52rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid rgba(251, 191, 36, 0.35);
    background: rgba(251, 191, 36, 0.12);
    color: #fcd34d;
    cursor: pointer;
    vertical-align: middle;
}
.btn-op-unit:hover { background: rgba(251, 191, 36, 0.22); }

@media print {
    body.units-print-mode header.panel,
    body.units-print-mode .mx-6.mt-4.flex.items-center.justify-between,
    body.units-print-mode #fluidityBanner,
    body.units-print-mode .units-chip-bar,
    body.units-print-mode .units-grid-panel,
    body.units-print-mode .suite-toolbar,
    body.units-print-mode #debug-bar,
    body.units-print-mode .suite-footer { display: none !important; }
    body.units-print-mode #view-units { display: flex !important; }
    body.units-print-mode .tab-view:not(#view-units) { display: none !important; }
    body.units-print-mode .units-scope-note,
    body.units-print-mode .units-filter-banner,
    body.units-print-mode .units-meta-filter {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}
