:root {
    --primary-color: #3070B3;
}

body {
    background-color: #f8f9fa;
}

h5 {
    color: #275c93;
}

.min-width-175 {
    min-width: 175px !important;
}

.min-width-300 {
    min-width: 300px !important;
}

.content-wrapper {
    padding-top: 56px;
    color: #212529;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: .5rem;
    padding-top: 12px;
}

@media (max-width: 768px) {
    .content-wrapper {
        padding-top: 80px;
        padding-left: 15px;
        padding-right: 15px;
    }
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

    .btn-primary:hover {
        background-color: #275c93;
        border-color: #275c93;
    }

.checkbox-lg {
    transform: scale(1.5);
    margin-right: 10px;
}

/* Menu */
.navbar-custom {
    background-color: var(--primary-color);
}

    .navbar-custom .nav-link,
    .navbar-custom .navbar-brand,
    .navbar-custom .navbar-text {
        color: #ffffff !important;
    }

        .navbar-custom .nav-link:hover {
            opacity: 0.85;
        }

        .navbar-custom .nav-link.active {
            border-bottom: 2px solid #ffffff;
        }

    .navbar-custom .navbar-nav .nav-link {
        padding: 0.75rem 1.1rem; /* mais respiro lateral */
        font-weight: 500;
        display: flex;
        align-items: center;
        gap: 6px; /* espaço entre ícone e texto */
        transition: background-color .15s ease, opacity .15s ease;
        border-radius: 6px;
    }

        .navbar-custom .navbar-nav .nav-link:hover {
            background-color: rgba(255,255,255,0.12);
        }

        .navbar-custom .navbar-nav .nav-link.active {
            background-color: rgba(255,255,255,0.18);
            border-bottom: none; /* remove a linha inferior */
        }

    .navbar-custom .navbar-nav {
        gap: 6px;
    }

    .navbar-custom .navbar-text {
        font-size: 0.9rem;
        opacity: 0.95;
    }

    .navbar-custom .btn-outline-light {
        border-width: 1px;
        padding: 0.35rem 0.75rem;
    }

.navbar-toggler {
    border: none;
}

.navbar-toggler-icon {
    filter: invert(1);
}

.navbar-project-name {
    color: #fff;
    font-size: 0.95rem;
    margin-left: 10px;
}

/* Card */
.card-elevated {
    border: 1px solid #e9ecef;
    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.04);
}

.card-animate {
    opacity: 0;
    transform: translateY(8px);
    transition: transform .2s ease, opacity .3s ease;
}

    .card-animate.show {
        opacity: 1;
        transform: translateY(0);
    }

/* Inputs */
.input-group-text {
    background-color: #f8f9fa;
    border-right: 0;
}

.input-group .form-control {
    border-left: 0;
}

/* Botão loading */
.btn-loading {
    pointer-events: none;
    opacity: 0.8;
}

/* Auth Layout */
.auth-wrapper {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f4f6f9;
    padding: 24px;
}

.auth-card {
    width: 100%;
    max-width: 600px;
}

.auth-brand {
    background: linear-gradient( 135deg, var(--primary-color), #275c93 );
    border-radius: 14px 14px 0 0;
    padding: 15px 20px;
    text-align: center;
}

.auth-brand-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.auth-logo {
    height: 26px;
    width: auto;
}

.auth-title {
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.auth-content {
    background: #ffffff;
    border-radius: 0 0 14px 14px;
    padding: 10px 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
}

.app-footer {
    margin-top: 10px;
    padding: 10px 0;
    font-size: 0.85rem;
    color: #6c757d;
}

.footer-separator {
    margin: 0 8px;
    opacity: 0.6;
}

.footer-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

    .footer-link:hover {
        text-decoration: underline;
        color: #dc2832;
    }

/* Tabela */
.table {
    color: #212529;
}

    .table thead th {
        font-size: 0.85rem;
        text-transform: uppercase;
        letter-spacing: .04em;
        color: #fff;
        background-color: #6ab1fb;
        border: 1px solid #dee2e6;
        text-align: center;
    }

    .table tbody tr {
        transition: background-color .15s ease;
    }

        .table tbody tr:hover {
            background-color: #f8f9fa;
        }

        .table tbody tr:nth-child(odd) {
            background-color: #ffffff;
        }

        .table tbody tr:nth-child(even) {
            background-color: #f8f9fa;
        }

        .table tbody tr:hover {
            background-color: #eef4fb;
        }

table td,
table th {
    vertical-align: middle;
}

.header-light {
    color: #fff !important;
    background-color: transparent !important;
    border: 1px solid transparent !important;
}

.header-strong {
    color: #fff !important;
    background-color: #275c93 !important;
}

/* Sidebar */
.project-layout {
    display: flex;
    min-height: calc(100vh - 90px);
}

.project-sidebar {
    width: 240px;
    background: #ffffff;
    border-right: 1px solid #e9ecef;
    flex-shrink: 0;
    position: relative;
}

    .project-sidebar.collapsed {
        width: 70px;
    }

    .project-sidebar:not(.collapsed) .submenu-popup {
        display: none !important;
    }

.sidebar-inner {
    height: 100%;
    padding: 1rem 0.6rem;
    display: flex;
    flex-direction: column;
}

.sidebar-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0.55rem 0.7rem;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    color: #495057;
}

    .sidebar-toggle:hover {
        background: #f1f3f5;
    }

.project-sidebar.collapsed .sidebar-toggle span {
    display: none;
}

.project-sidebar.collapsed .sidebar-toggle i {
    transform: rotate(180deg);
}

.project-sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.55rem 0.65rem;
    border-radius: 6px;
    color: #495057;
    font-size: 0.9rem;
}

    .project-sidebar .nav-link i {
        font-size: 1.1rem;
        width: 20px;
        text-align: center;
    }

    .project-sidebar .nav-link:hover {
        background: #f1f3f5;
    }

    .project-sidebar .nav-link.active {
        background: rgba(48,112,179,0.10);
        color: var(--primary-color);
    }

.project-sidebar.collapsed .nav-link span {
    display: none;
}

.sidebar-separator {
    margin: 10px 6px;
    opacity: 0.2;
}

.submenu {
    padding-left: 26px;
}

    .submenu .nav-link {
        font-size: 0.82rem;
        padding: 4px 6px;
        gap: 8px;
    }

        .submenu .nav-link i {
            font-size: 0.9rem;
            width: 16px;
        }

.project-sidebar.collapsed .submenu {
    display: none;
}

.project-sidebar.collapsed .nav-item {
    position: relative;
    padding-right: 6px;
}

    .project-sidebar.collapsed .nav-item .submenu-popup {
        display: none;
        position: absolute;
        top: -6px;
        left: 100%;
        margin-left: 4px;
        background: #ffffff;
        border: 1px solid #dee2e6;
        border-radius: 8px;
        padding: 8px;
        min-width: 210px;
        box-shadow: 0 6px 18px rgba(0,0,0,0.12);
        z-index: 1000;
    }

    .project-sidebar.collapsed .nav-item:hover .submenu-popup {
        display: block;
    }

.submenu-popup a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    font-size: 0.85rem;
    border-radius: 6px;
    color: #495057;
    text-decoration: none;
}

    .submenu-popup a i {
        font-size: 0.95rem;
        width: 16px;
    }

    .submenu-popup a:hover {
        background: #f1f3f5;
    }

.project-content {
    flex: 1;
    padding: 1rem;
}

@media (max-width: 767px) {
    .project-layout {
        flex-direction: column;
    }

    .project-sidebar {
        display: none;
    }

    .project-content {
        padding: 1rem;
    }
}

/* Métricas */
.field-label {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #275c93;
    margin-bottom: 4px;
}

.field-value {
    font-size: 0.95rem;
    color: #212529;
    line-height: 1.6;
}

.field-muted {
    font-size: 0.85rem;
    color: #adb5bd;
}

.list-clean {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

    .list-clean li::before {
        content: "•";
        margin-right: 8px;
        position: relative;
        left: 3px;
    }

/* Matriz */
.matriz-table {
    font-size: 0.8rem;
}

    .matriz-table th {
        background: #f8f9fa;
        vertical-align: middle;
        text-align: center;
    }

.edit-header {
    background: #215298 !important;
}

.col-grupo {
    min-width: 120px;
    max-width: 250px;
}

.col-subgrupo {
    min-width: 180px;
    max-width: 250px;
}

.col-indicador {
    min-width: 300px;
    max-width: 350px;
}

.col-responsavel {
    min-width: 150px;
    max-width: 250px;
}

.col-fonte {
    min-width: 150px;
    max-width: 200px;
}

.col-inicio {
    min-width: 60px;
    max-width: 100px;
    text-align: center;
}

.col-fim {
    min-width: 60px;
    max-width: 100px;
    text-align: center;
}

.col-periodicidade {
    min-width: 100px;
    max-width: 150px;
    text-align: center;
}

.col-meta {
    min-width: 80px;
    max-width: 100px;
    text-align: center;
}

.col-obs {
    min-width: 150px;
    max-width: 250px;
}

.col-link {
    min-width: 100px;
    max-width: 200px;
    text-align: center;
}

.col-medicao {
    min-width: 150px;
    max-width: 250px;
    text-align: center;
}

.lock-input {
    background-color: #e1e1e1;
    border: 1px solid #495057;
}

.territorio-row {
    background: #f9f9f9;
}

.link-badge {
    cursor: pointer;
    font-size: 0.95rem;
    padding: 6px 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

    .link-badge i {
        font-size: 1rem;
    }

.link-count {
    font-weight: 600;
}

/* Toast */
.matriz-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 10px 15px;
    border-radius: 6px;
    color: #fff;
    z-index: 9999;
}

    .matriz-toast.ok {
        background: #198754;
    }

    .matriz-toast.erro {
        background: #dc3545;
    }

/* Prestação */
.textarea-lg {
    min-height: 200px !important;
    resize: vertical;
}

.textarea-xl {
    min-height: 360px !important;
    resize: vertical;
}

.card-header {
    color: #fff;
    background-color: #2b86e6;
}

/* Aporte */
.aporte-plan {
    width: 125px !important;
    font-size: 14px;
}

/* Ícone de Ajuda */
.icone-ajuda {
    cursor: help;
}
