/* ================================================================
   NV Track — Dark Theme
   --dark-deep  : #040e18   sidebar + page bg
   --dark-card  : #14222f   cards / panels
   --accent-lg  : #81bd3b   Verde Claro  (destaques primários)
   --accent-dg  : #145f5f   Verde Escuro (destaques secundários)
   ================================================================ */

/* ===== RESET & BASE ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #040e18;
    color: rgba(255,255,255,0.85);
    overflow: hidden;
}

/* ===== LAYOUT ===== */
#app-container {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* ===== SIDEBAR ===== */
#sidebar {
    width: 210px;
    min-width: 210px;
    background: #040e18;
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: fixed;
    left: 0; top: 0;
    z-index: 1000;
    border-right: 1px solid rgba(129,189,59,0.12);
}

#sidebar-logo {
    padding: 18px 16px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 72px;
}

#sidebar-logo img {
    width: 152px;
    height: auto;
    object-fit: contain;
    mix-blend-mode: screen;
    filter: brightness(1.05);
}

#sidebar-nav {
    flex: 1;
    padding: 10px 0;
    overflow-y: auto;
}

#sidebar-footer {
    padding: 12px 16px;
    border-top: 1px solid rgba(255,255,255,0.05);
    font-size: 10.5px;
    color: rgba(255,255,255,0.2);
    text-align: center;
    letter-spacing: 0.3px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 16px;
    color: rgba(255,255,255,0.55);
    cursor: pointer;
    transition: all 0.18s ease;
    text-decoration: none;
    font-size: 13.5px;
    border-left: 3px solid transparent;
    user-select: none;
}

.nav-item:hover {
    background: rgba(129,189,59,0.08);
    color: rgba(255,255,255,0.85);
    border-left-color: rgba(129,189,59,0.4);
}

.nav-item.active {
    background: rgba(129,189,59,0.13);
    color: #81bd3b;
    border-left-color: #81bd3b;
    font-weight: 600;
}

.nav-icon {
    font-size: 15px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

/* ===== MAIN CONTENT ===== */
#main-wrapper {
    margin-left: 210px;
    height: 100vh;
    width: calc(100vw - 210px);
    overflow: hidden;
    background: #040e18;
}

#page-content {
    height: 100vh;
    overflow-y: auto;
    padding: 20px 24px;
    background: #040e18;
}

/* ===== DASHBOARD HERO BANNER ===== */
.dash-hero {
    background: linear-gradient(120deg, #040e18 0%, #0a1a28 50%, #0d2233 100%);
    border: 1px solid rgba(129,189,59,0.18);
    border-radius: 12px;
    padding: 24px 28px;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 24px rgba(0,0,0,0.4);
    position: relative;
    overflow: hidden;
}

.dash-hero::before {
    content: "";
    position: absolute;
    right: 170px; top: -50px;
    width: 240px; height: 240px;
    border-radius: 50%;
    border: 1px solid rgba(129,189,59,0.08);
    pointer-events: none;
}

.dash-hero::after {
    content: "";
    position: absolute;
    right: 110px; top: -90px;
    width: 380px; height: 380px;
    border-radius: 50%;
    border: 1px solid rgba(20,95,95,0.1);
    pointer-events: none;
}

.hero-left { flex: 1; }

.hero-greeting {
    font-size: 11px;
    font-weight: 600;
    color: #81bd3b;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    margin-bottom: 4px;
}

.hero-title {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 5px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 13px;
    color: rgba(255,255,255,0.42);
    margin-bottom: 16px;
}

.hero-pills { display: flex; gap: 10px; flex-wrap: wrap; }

.hero-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 12px;
    color: rgba(255,255,255,0.65);
}

.hero-pill-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: #81bd3b;
    flex-shrink: 0;
}

.hero-logo-wrap {
    flex-shrink: 0;
    margin-left: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-logo-wrap img {
    height: 130px;
    width: auto;
    object-fit: contain;
    mix-blend-mode: screen;
    filter: brightness(1.05);
    opacity: 0.9;
}

/* ===== KPI CARDS ===== */
.kpi-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 18px;
}

.kpi-card {
    background: #14222f;
    border-radius: 10px;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid rgba(255,255,255,0.06);
    transition: border-color 0.2s, transform 0.2s;
}

.kpi-card:hover {
    border-color: rgba(129,189,59,0.3);
    transform: translateY(-1px);
}

.kpi-label {
    font-size: 11px;
    color: rgba(255,255,255,0.38);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 6px;
    font-weight: 600;
}

.kpi-value {
    font-size: 26px;
    font-weight: 700;
    color: #fff;
    line-height: 1;
}

.kpi-icon-wrap {
    width: 46px; height: 46px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.kpi-icon-green  { background: rgba(129,189,59,0.15);  color: #81bd3b; }
.kpi-icon-teal   { background: rgba(20,95,95,0.25);    color: #2ab5b5; }
.kpi-icon-orange { background: rgba(255,152,0,0.13);   color: #ffb74d; }
.kpi-icon-blue   { background: rgba(66,165,245,0.13);  color: #64b5f6; }

/* ===== CHART CARDS ===== */
.chart-card {
    background: #14222f;
    border-radius: 10px;
    padding: 16px 20px;
    border: 1px solid rgba(255,255,255,0.06);
    margin-bottom: 16px;
}

.chart-card-title {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255,255,255,0.85);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
}

/* ===== GRID LAYOUT ===== */
.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.three-col {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

/* ===== DATA TABLE ===== */
.data-table-wrap {
    background: #14222f;
    border-radius: 10px;
    padding: 16px 20px;
    border: 1px solid rgba(255,255,255,0.06);
    margin-bottom: 16px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.data-table th {
    text-align: left;
    padding: 8px 10px;
    color: rgba(255,255,255,0.35);
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.data-table td {
    padding: 9px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.78);
    vertical-align: middle;
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(255,255,255,0.03); }

/* ===== BADGES ===== */
.badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.badge-success  { background: rgba(76,175,80,0.18);   color: #81c784; }
.badge-warning  { background: rgba(255,152,0,0.18);   color: #ffb74d; }
.badge-danger   { background: rgba(244,67,54,0.18);   color: #e57373; }
.badge-info     { background: rgba(66,165,245,0.18);  color: #64b5f6; }
.badge-neutral  { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.55); }
.badge-brand    { background: rgba(129,189,59,0.18);  color: #81bd3b; }

/* ===== GRAVAÇÕES ===== */
.script-card {
    background: #14222f;
    border-radius: 10px;
    padding: 16px 20px;
    border: 1px solid rgba(255,255,255,0.06);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.script-card:hover {
    border-color: rgba(129,189,59,0.35);
    background: rgba(20,34,47,0.9);
}

.script-icon {
    width: 42px; height: 42px;
    border-radius: 8px;
    background: rgba(129,189,59,0.12);
    color: #81bd3b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.script-name { font-weight: 600; color: #fff; font-size: 14px; }
.script-meta { font-size: 12px; color: rgba(255,255,255,0.4); margin-top: 2px; }

/* ===== TOOLBAR ===== */
.toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.btn-primary {
    background: #81bd3b;
    color: #040e18;
    border: none;
    padding: 8px 16px;
    border-radius: 7px;
    font-size: 13px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
}

.btn-primary:hover { background: #6da832; }

.btn-secondary {
    background: transparent;
    color: rgba(255,255,255,0.7);
    border: 1px solid rgba(255,255,255,0.15);
    padding: 8px 16px;
    border-radius: 7px;
    font-size: 13px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(129,189,59,0.5);
    color: #81bd3b;
}

.search-box {
    flex: 1;
    max-width: 300px;
    padding: 8px 14px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 7px;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s;
    background: rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.85);
}

.search-box::placeholder { color: rgba(255,255,255,0.3); }
.search-box:focus { border-color: #81bd3b; background: rgba(255,255,255,0.07); }

/* ===== native <select> dark style ===== */
select.form-select {
    width: 100%;
    padding: 8px 12px;
    background: rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.85);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 7px;
    font-size: 13px;
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='rgba(255,255,255,0.4)' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
}

select.form-select:focus { border-color: #81bd3b; }
select.form-select option { background: #14222f; color: rgba(255,255,255,0.85); }

/* ===== PROCESSOS ===== */
.process-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.process-card {
    background: #14222f;
    border-radius: 10px;
    padding: 16px;
    border: 1px solid rgba(255,255,255,0.06);
    border-top: 3px solid #81bd3b;
    cursor: pointer;
    transition: all 0.2s;
}

.process-card:hover {
    border-color: rgba(129,189,59,0.45);
    border-top-color: #81bd3b;
    transform: translateY(-1px);
    background: rgba(20,34,47,0.95);
}

.process-card-title { font-weight: 600; color: #fff; font-size: 14px; margin-bottom: 6px; }
.process-card-desc  { font-size: 12px; color: rgba(255,255,255,0.42); margin-bottom: 10px; }
.process-card-steps { font-size: 12px; color: #81bd3b; font-weight: 500; }

/* ===== FLOW PANEL ===== */
.flow-panel {
    background: #14222f;
    border-radius: 10px;
    padding: 20px;
    border: 1px solid rgba(255,255,255,0.06);
    margin-bottom: 16px;
}

/* ===== USUARIOS ===== */
.user-avatar {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #145f5f, #81bd3b);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    flex-shrink: 0;
}

/* ===== CONFIGURACOES ===== */
.config-section {
    background: #14222f;
    border-radius: 10px;
    padding: 20px;
    border: 1px solid rgba(255,255,255,0.06);
    margin-bottom: 16px;
}

.config-section-title {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255,255,255,0.85);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
}

.form-group { margin-bottom: 14px; }

.form-label {
    display: block;
    font-size: 12.5px;
    font-weight: 500;
    color: rgba(255,255,255,0.5);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 7px;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s;
    background: rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.85);
    font-family: inherit;
}

.form-control::placeholder { color: rgba(255,255,255,0.25); }
.form-control:focus { border-color: #81bd3b; background: rgba(255,255,255,0.07); }

/* ===== AUDITORIA ===== */
.audit-filter-row {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    align-items: center;
}

/* ===== RADIO / TOGGLE ===== */
.radio-group { display: flex; gap: 16px; }

.radio-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: rgba(255,255,255,0.7);
    cursor: pointer;
}

.radio-group input[type="radio"] { accent-color: #81bd3b; }

/* ===== EMPTY STATE ===== */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: rgba(255,255,255,0.25);
    text-align: center;
}

.empty-state-icon { font-size: 48px; margin-bottom: 16px; opacity: 0.3; }
.empty-state-text { font-size: 14px; }

/* ===== NODE INFO TOOLTIP ===== */
.node-info {
    background: rgba(20,34,47,0.95);
    border: 1px solid rgba(129,189,59,0.3);
    border-radius: 7px;
    padding: 8px 12px;
    font-size: 12.5px;
    color: rgba(255,255,255,0.85);
    flex: 1;
    margin-left: 12px;
}

.node-info-placeholder {
    font-size: 11.5px;
    color: rgba(255,255,255,0.3);
    font-style: italic;
    flex: 1;
    margin-left: 12px;
}

/* ===== CYTOSCAPE BG ===== */
.cyto-wrap {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    background: #0d1c28;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: #040e18; }
::-webkit-scrollbar-thumb { background: rgba(129,189,59,0.35); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #81bd3b; }

/* ===== LEGEND ===== */
.legend-row {
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: 12px;
    color: rgba(255,255,255,0.45);
    flex-wrap: wrap;
    margin-top: 8px;
}

.legend-item { display: flex; align-items: center; gap: 5px; }

/* ===== ALERT MESSAGES ===== */
.alert-success {
    background: rgba(76,175,80,0.12);
    border: 1px solid rgba(76,175,80,0.3);
    color: #81c784;
    padding: 10px 16px;
    border-radius: 7px;
    margin-bottom: 14px;
    font-size: 13px;
}

.alert-danger {
    background: rgba(244,67,54,0.12);
    border: 1px solid rgba(244,67,54,0.3);
    color: #e57373;
    padding: 10px 16px;
    border-radius: 7px;
    margin-bottom: 14px;
    font-size: 13px;
}
