/* ===== Loading bar ===== */
#loading-bar {
    position: fixed;
    top: 0; left: 0;
    height: 3px;
    width: 0;
    background: #fd7e14;
    z-index: 9999;
    transition: none;
}
#loading-bar.active {
    width: 70%;
    transition: width 8s cubic-bezier(0.1, 0.05, 0, 1);
}

/* ===== Paleta de cores ===== */
:root {
    /* Laranja principal */
    --bs-primary:           #fd7e14;
    --bs-primary-rgb:       253, 126, 20;

    /* Âmbar — segundo laranja, para ícones de info/destaque */
    --bs-info:              #e8960c;
    --bs-info-rgb:          232, 150, 12;

    /* Carvão quente — substitui o cinza frio padrão */
    --bs-secondary:         #4a4540;
    --bs-secondary-rgb:     74, 69, 64;

    /* Verde mantido, mas levemente aquecido */
    --bs-success:           #28a06a;
    --bs-success-rgb:       40, 160, 106;

    /* Links */
    --bs-link-color:        #fd7e14;
    --bs-link-hover-color:  #e06c0a;
}

/* ===== Sobrescrita de componentes Bootstrap ===== */

/* Botão primário */
.btn-primary {
    background-color: #fd7e14;
    border-color: #fd7e14;
    color: #fff;
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active {
    background-color: #e06c0a;
    border-color: #e06c0a;
    color: #fff;
}
.btn-primary:focus,
.btn-primary:focus-visible {
    box-shadow: 0 0 0 0.25rem rgba(253, 126, 20, 0.4);
}

/* Botão outline primário */
.btn-outline-primary {
    color: #fd7e14;
    border-color: #fd7e14;
}
.btn-outline-primary:hover,
.btn-outline-primary:active {
    background-color: #fd7e14;
    border-color: #fd7e14;
    color: #fff;
}

/* Nav pills (tabs do login) */
.nav-pills .nav-link.active,
.nav-pills .show > .nav-link {
    background-color: #fd7e14;
    color: #fff;
}
.nav-pills .nav-link {
    color: #4a4540;
}
.nav-pills .nav-link:hover {
    color: #fd7e14;
}

/* Badge primary */
.badge.bg-primary {
    background-color: #fd7e14 !important;
}

/* text-primary em laranja mais escuro — legível sobre fundo branco e laranja claro */
.text-primary {
    color: #c95700 !important;
}

/* Badge secondary */
.badge.bg-secondary {
    background-color: #4a4540 !important;
}

/* ===== Layout ===== */
body {
    font-family: 'Segoe UI', system-ui, sans-serif;
}

/* ===== Sidebar ===== */
.sidebar {
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #5a524c #1e1a18;
    background-color: #1e1a18 !important; /* carvão escuro quente */
}

.sidebar .nav-link {
    padding: 0.45rem 0.75rem;
    border-radius: 6px;
    transition: background-color 0.15s, color 0.15s;
    font-size: 0.9rem;
}

.sidebar .nav-link:hover {
    background-color: rgba(253, 126, 20, 0.12);
}

.sidebar .nav-link.active {
    background-color: #fd7e14 !important;
}

.sidebar .section-label {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: #7a6f68;
    padding: 0.5rem 0.75rem 0.25rem;
    text-transform: uppercase;
}

/* ===== Cards ===== */
.card {
    border: 1px solid #e9ecef;
    border-radius: 10px;
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    font-weight: 600;
}

/* ===== Tables ===== */
.table th {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6c757d;
    border-top: none;
}

.table-hover tbody tr:hover {
    background-color: #fff4ec;
}

/* ===== Badges ===== */
.badge-perfil {
    font-size: 0.75rem;
    padding: 0.35em 0.65em;
}

/* ===== Forms ===== */
.form-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #495057;
    margin-bottom: 0.3rem;
}

.form-control:focus,
.form-select:focus {
    border-color: #fd7e14;
    box-shadow: 0 0 0 0.25rem rgba(253, 126, 20, 0.2);
}

.section-divider {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6c757d;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 0.4rem;
    margin: 1.5rem 0 1rem;
}

/* ===== Auth pages ===== */
.auth-card {
    width: 100%;
    max-width: 440px;
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.auth-logo {
    font-size: 1.6rem;
    font-weight: 700;
    color: #fd7e14;
}

/* ===== Profile cards (escolher perfil) ===== */
.perfil-card {
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 12px;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.1s;
}

.perfil-card:hover {
    border-color: #fd7e14;
    box-shadow: 0 4px 16px rgba(253, 126, 20, 0.2);
    transform: translateY(-2px);
}

.perfil-card.selected {
    border-color: #fd7e14;
    background-color: #fff4ec;
}

/* ===== Dashboard stat cards ===== */
.stat-card {
    border-radius: 12px;
    border: none;
}

.stat-card .icon-box {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

/* ===== Utility ===== */
.text-truncate-2 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
