﻿:root {
    --app-navy: #243447;
    --app-blue: #1d5d8f;
    --app-border: #d9e1ea;
    --app-bg: #f4f7fa;
    --app-text: #263442;
}

body {
    background: var(--app-bg);
    color: var(--app-text);
}

.app-navbar {
    background: var(--app-navy);
}

.navbar-left {
    align-items: center;
    display: flex;
    gap: 12px;
}

.app-navbar .navbar-brand {
    margin-right: 0;
}

.app-navbar .navbar-nav {
    align-items: center;
    gap: 4px;
}

.app-navbar .nav-link {
    border-radius: 6px;
    padding-left: 10px;
    padding-right: 10px;
}

.app-navbar .nav-link.active {
    background: rgba(255, 255, 255, 0.12);
}

.app-navbar .nav-refresh-button {
    background: #fff;
    border-radius: 6px;
    color: var(--app-blue);
    display: inline-block;
    font-weight: 600;
    padding: 6px 12px;
    text-decoration: none;
    white-space: nowrap;
}

.app-navbar .nav-refresh-button:hover,
.app-navbar .nav-refresh-button:focus {
    background: #eef6ff;
    color: #164d78;
}

.admin-dropdown {
    border: 1px solid var(--app-border);
    box-shadow: 0 10px 24px rgba(36, 52, 71, 0.12);
}

.admin-dropdown .dropdown-item {
    color: var(--app-navy);
}

.admin-dropdown .dropdown-item:hover,
.admin-dropdown .dropdown-item:focus {
    background: #eef6ff;
    color: var(--app-blue);
}

.app-container {
    padding: 28px;
}

.page-heading {
    align-items: center;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.page-heading h1 {
    font-size: 1.8rem;
    margin: 0;
}

.page-heading p {
    color: #667789;
    margin: 4px 0 0;
}

.detail-top-actions {
    display: inline-flex;
    gap: 10px;
    white-space: nowrap;
}

.metric-card,
.filter-panel,
.info-panel,
.edit-panel,
.app-table-wrap,
.chart-card {
    background: #fff;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(36, 52, 71, 0.06);
}

.metric-card {
    min-height: 118px;
    padding: 20px;
}

.metric-card-compact {
    min-height: 88px;
    padding: 14px;
}

.metric-card span {
    color: #657789;
    display: block;
    font-size: 0.88rem;
}

.metric-card strong {
    display: block;
    font-size: 1.8rem;
    margin-top: 8px;
}

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

.filter-panel h2 {
    font-size: 1rem;
    margin-bottom: 14px;
}

.filter-actions,
.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 18px;
}

.classification-filter-actions {
    margin-top: 0;
}

.table-actions {
    display: inline-flex;
    gap: 8px;
    white-space: nowrap;
    flex-wrap: nowrap;
    align-items: center;
}

.table-actions-cell {
    white-space: nowrap;
    min-width: 170px;
}

.table-actions .btn {
    white-space: nowrap;
}

.app-table {
    margin-bottom: 0;
}

.app-table thead th {
    background: #eef3f7;
    color: #4d6072;
    font-size: 0.86rem;
    white-space: nowrap;
}

.status-pill {
    background: #edf2f7;
    border-radius: 999px;
    color: #46596b;
    display: inline-block;
    font-size: 0.82rem;
    padding: 4px 10px;
    white-space: nowrap;
}

.status-recebida {
    background: #e8eef5;
    color: #33516f;
}

.status-analise {
    background: #e7f0ff;
    color: #1d5d9f;
}

.status-andamento {
    background: #e3f6ef;
    color: #12664f;
}

.status-material {
    background: #fff0d6;
    color: #8a5200;
}

.status-concluido {
    background: #dff5e5;
    color: #176b35;
}

.status-recusado {
    background: #ffe1e1;
    color: #a11212;
}

.status-duplicado {
    background: #fff5c2;
    color: #755f00;
}

.priority-badge {
    border-radius: 999px;
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    min-width: 72px;
    padding: 5px 10px;
    text-align: center;
}

.priority-critico {
    background: #ffe1e1;
    color: #a11212;
}

.priority-urgente {
    background: #7f1d1d;
    color: #fff;
}

.priority-alta {
    background: #ffe1e1;
    color: #b91c1c;
}

.priority-media {
    background: #ffe7cc;
    color: #a84d00;
}

.priority-normal {
    background: #fff5c2;
    color: #755f00;
}

.priority-baixa {
    background: #dff5e5;
    color: #176b35;
}

.priority-planejada {
    background: #e0efff;
    color: #1d4f91;
}

.priority-empty {
    background: #edf2f7;
    color: #607286;
}

.detail-layout {
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(280px, 0.8fr) minmax(360px, 1.2fr);
}

.info-panel,
.edit-panel {
    padding: 20px;
}

.info-panel h2,
.edit-panel h2 {
    font-size: 1.2rem;
    margin-bottom: 16px;
}

.info-panel dl {
    margin: 0;
}

.info-panel dt {
    color: #607286;
    font-size: 0.84rem;
    margin-top: 12px;
}

.info-panel dd {
    border-bottom: 1px solid #edf1f5;
    margin: 3px 0 0;
    padding-bottom: 10px;
    word-break: break-word;
}

.priority-summary {
    background: #f6f8fb;
    border: 1px solid #e1e8ef;
    border-radius: 8px;
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 18px;
    padding: 12px;
}

.priority-summary > div {
    display: grid;
    gap: 4px;
}

.priority-summary > div > span {
    color: #607286;
    font-size: 0.84rem;
}

.chart-card {
    padding: 16px;
}

.chart-card h2 {
    font-size: 1rem;
    margin: 0 0 14px;
}

.donut-wrap {
    align-items: center;
    display: flex;
    gap: 16px;
}

.donut-chart {
    border-radius: 50%;
    height: 180px;
    position: relative;
    width: 180px;
}

.donut-chart::after {
    background: #fff;
    border-radius: 50%;
    content: "";
    height: 108px;
    left: 50%;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 108px;
}

.donut-center {
    color: #2f4254;
    font-size: 1.2rem;
    font-weight: 700;
    margin-left: -126px;
    pointer-events: none;
    width: 72px;
    text-align: center;
}

.chart-legend {
    list-style: none;
    margin: 0;
    padding: 0;
}

.chart-legend li {
    align-items: center;
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.legend-dot {
    border-radius: 999px;
    display: inline-block;
    height: 10px;
    width: 10px;
}

.legend-green { background: #2d8b57; }
.legend-blue { background: #1d5d8f; }
.legend-amber { background: #b45309; }

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

.bar-row {
    align-items: center;
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(120px, 1fr) minmax(120px, 2fr) 34px;
}

.bar-label {
    color: #425566;
    font-size: 0.88rem;
}

.bar-track {
    background: #eef3f7;
    border-radius: 6px;
    height: 12px;
    overflow: hidden;
}

.bar-fill {
    background: linear-gradient(90deg, #3f86b6, #1d5d8f);
    height: 100%;
}

.bar-value {
    color: #425566;
    font-size: 0.86rem;
    font-weight: 600;
    text-align: right;
}

.status-tone-green {
    background: #f3fbf5;
    border-color: #a9d8b9;
}

.status-tone-red {
    background: #fff5f5;
    border-color: #e6b1b1;
}

.status-tone-yellow {
    background: #fffbea;
    border-color: #ebd58f;
}

.login-shell {
    align-items: center;
    display: flex;
    justify-content: center;
    min-height: calc(100vh - 150px);
}

.login-panel {
    background: #fff;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    box-shadow: 0 12px 28px rgba(36, 52, 71, 0.08);
    max-width: 420px;
    padding: 28px;
    width: 100%;
}

.login-panel h1 {
    font-size: 1.45rem;
    margin-bottom: 20px;
}

.auto-refresh-note {
    color: #607286;
    font-size: 0.86rem;
    margin: -4px 0 14px;
}

.auto-refresh-note-warning {
    color: #8a5b12;
}

@media (max-width: 992px) {
    .app-container {
        padding: 18px;
    }

    .page-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .detail-layout {
        grid-template-columns: 1fr;
    }

    .navbar-left {
        flex: 1;
    }

    .app-navbar .navbar-nav {
        align-items: stretch;
        gap: 0;
        padding-top: 10px;
    }

    .donut-wrap {
        align-items: flex-start;
        flex-direction: column;
    }

    .donut-center {
        margin-left: 0;
        margin-top: -124px;
        width: 180px;
    }
}

.chart-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 320px;
}

.chart-card .donut-wrap,
.chart-card .bar-list {
    margin: 0 auto;
    width: 100%;
    max-width: 520px;
}

.donut-wrap {
    justify-content: center;
}

.public-track-panel {
    background: #fff;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(36, 52, 71, 0.06);
    margin-bottom: 18px;
    padding: 16px;
}

.public-track-panel h2 {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.public-track-table {
    max-height: 320px;
    overflow-y: auto;
}

.login-shell {
    min-height: auto;
    padding-bottom: 12px;
}

th.sortable {
    cursor: pointer;
    white-space: nowrap;
}

th.sortable a.sort-link {
    color: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

th.sortable:hover {
    background-color: rgba(0, 0, 0, 0.04);
}

.sort-icon {
    font-size: 0.8rem;
    opacity: 0.75;
}

.filtros-grid { display: grid; grid-template-columns: repeat(6, minmax(180px, 1fr)); gap: 18px 16px; align-items: end; }
.filtro-item { display: flex; flex-direction: column; }
.filtro-item .form-label { margin-bottom: 6px; font-weight: 500; }
.filtro-item .form-select, .filtro-item .form-control { width: 100%; height: 38px; }
.filtro-item .choices { width: 100%; }
.filtro-item .choices__inner { min-height: 38px; height: 38px; }
.filtros-acoes { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
@media (max-width: 1400px) { .filtros-grid { grid-template-columns: repeat(4, minmax(180px, 1fr)); } }
@media (max-width: 900px) { .filtros-grid { grid-template-columns: repeat(2, minmax(180px, 1fr)); } }
@media (max-width: 600px) { .filtros-grid { grid-template-columns: 1fr; } }
