/* =================================== */
/* CSS UNIFICADO - SPIKE ADMIN LAYOUT */
/* =================================== */

/* Reset e Configuração Global */
body {
    background-color: #f6f8fc;
    font-family: 'Inter', 'Segoe UI', Tahoma, sans-serif;
}

#mainNav {
    display: none !important;
}

/* ---------------------------------- */
/* 1. Barra Lateral (Branca) */
/* ---------------------------------- */
.sidebar-nav {
    width: 270px;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    background: #fff;
    border-right: 1px solid #eef2f7;
    color: #2A3547;
    display: flex;
    flex-direction: column;
    z-index: 1001;
    transition: left 0.3s ease;
}

.sidebar-header {
    padding: 20px 25px;
    display: flex;
    align-items: center;
    height: 70px;
    border-bottom: 1px solid #eef2f7;
}

.sidebar-brand-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2A3547;
    text-decoration: none;
}

.sidebar-brand-text span {
    color: #5D87FF;
}

.sidebar-nav-list {
    flex-grow: 1;
    overflow-y: auto;
    padding: 15px 0;
}

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

.nav-list-header {
    font-size: 0.75rem;
    font-weight: 600;
    color: #5A6A85;
    padding: 10px 35px;
    text-transform: uppercase;
}

.nav-list-item {
    padding: 0 20px;
    margin-bottom: 5px;
}

.nav-list-link {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    color: #2A3547;
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.2s ease, color 0.2s ease;
}

.nav-list-link i {
    min-width: 20px;
    margin-right: 12px;
    font-size: 1.1rem;
}

.nav-list-link .nav-link-text {
    font-size: 0.95rem;
    font-weight: 500;
}

.nav-list-link:hover {
    background: #ECF2FF;
    color: #5D87FF;
}

.nav-list-item.active > .nav-list-link {
    background: #ECF2FF;
    color: #5D87FF;
}

.nav-list-link.nav-link-collapse::after {
    content: '\f107';
    font-family: 'FontAwesome';
    margin-left: auto;
    transition: transform 0.2s;
}

.nav-list-link.nav-link-collapse[aria-expanded="true"]::after {
    transform: rotate(180deg);
}

.sidenav-second-level {
    list-style: none;
    padding-left: 20px;
    margin-top: 5px;
}

.sidenav-second-level .nav-list-link {
    padding-left: 30px;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid #eef2f7;
}

.sidebar-profile-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: #ECF2FF;
    border: none;
    border-radius: 8px;
    padding: 10px 15px;
    text-align: left;
    transition: background 0.2s ease;
}

.sidebar-profile-btn:hover {
    background: #e0e9ff;
}

.sidebar-profile-btn .fa-user-circle {
    font-size: 2.2rem;
    margin-right: 10px;
    color: #5D87FF;
}

.sidebar-profile-info {
    flex-grow: 1;
}

.sidebar-profile-info h6 {
    color: #2A3547;
    font-weight: 600;
    font-size: 0.9rem;
    margin: 0;
}

.sidebar-profile-info small {
    color: #5A6A85;
    font-size: 0.8rem;
    display: block;
}

.sidebar-profile-btn .fa-sign-out {
    font-size: 1.2rem;
    color: #2A3547;
    transform: rotate(-180deg);
}

/* ---------------------------------- */
/* 2. Barra Superior (Clara) */
/* ---------------------------------- */
.main-content-wrapper {
    margin-left: 270px;
    width: calc(100% - 270px);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.topbar-nav {
    height: 70px;
    background: #fff;
    border-bottom: 1px solid #eef2f7;
    padding: 0 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    width: calc(100% - 270px);
    left: 270px;
    top: 0;
    z-index: 1000;
}

.topbar-left-cluster {
    display: flex;
    align-items: center;
}

.topbar-nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-left: 2.5rem;
}

.topbar-nav-links a {
    text-decoration: none;
    color: #2A3547;
    font-weight: 500;
    font-size: 0.95rem;
}

.topbar-nav-links a:hover {
    color: #5D87FF;
}

/* Corrige o dropdown do topo que abre por baixo do header fixo */
.topbar-nav .dropdown-menu {
    position: absolute !important;
    z-index: 2001 !important;
    top: 100% !important; /* garante que abre abaixo do botão */
    right: 0 !important;
    left: auto !important;
    transform: none !important; /* evita que o bootstrap posicione errado */
}


.sidebar-toggle-btn {
    font-size: 1.25rem;
    color: #5D87FF;
    background: #ECF2FF;
    border: none;
    border-radius: 8px;
    padding: 5px 10px;
    cursor: pointer;
}

.topbar-search {
    position: relative;
    display: none;
}

@media (min-width: 1200px) {
    .topbar-search {
        display: block;
        margin-left: 2rem;
    }
}

.topbar-search input {
    border: none;
    background: #ECF2FF;
    border-radius: 8px;
    padding: 10px 15px 10px 40px;
    width: 300px;
    font-size: 0.9rem;
    color: #5A6A85;
}

.topbar-search i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #5A6A85;
}

.topbar-nav .navbar-nav {
    flex-direction: row;
    align-items: center;
}

.topbar-nav .nav-item {
    margin-left: 10px;
}

.topbar-nav .nav-link {
    color: #5A6A85;
    font-size: 1.25rem;
    padding: 10px;
}

.topbar-profile-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.topbar-profile-trigger i.fa-user-circle {
    font-size: 2.5rem;
    color: #ccc;
}

.topbar-profile-info {
    line-height: 1.3;
    text-align: right;
    display: none;
}

@media (min-width: 992px) {
    .topbar-profile-info {
        display: block;
    }
}

.topbar-profile-info strong {
    font-size: 0.9rem;
    color: #2A3547;
    font-weight: 600;
}

.topbar-profile-info small {
    font-size: 0.8rem;
    color: #5A6A85;
    display: block;
}

.topbar-nav .dropdown-menu {
    background-color: #fff;
    color: #2A3547;
    border: 1px solid #eef2f7;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    padding: 15px;
    min-width: 250px;
}

.topbar-nav .dropdown-menu .small {
    color: #5A6A85;
}

.topbar-nav .dropdown-menu h6 {
    color: #2A3547;
    font-weight: bold;
}

.topbar-nav .dropdown-menu .btn-outline-primary {
    border-color: #5D87FF;
    color: #5D87FF;
    background: none;
}

.topbar-nav .dropdown-menu .btn-outline-primary:hover {
    background-color: #ECF2FF;
}

.topbar-nav .dropdown-item {
    color: #2A3547;
}

.topbar-nav .dropdown-item:hover {
    background-color: #f6f8fc;
    color: #5D87FF;
}

.topbar-nav .dropdown-item.text-danger {
    color: #fa896b !important;
}

.topbar-nav .dropdown-item.text-danger:hover {
    background-color: #fef5f2;
}

/* ---------------------------------- */
/* 3. Área de Conteúdo Principal */
/* ---------------------------------- */
.page-content {
    padding: 25px;
    /* Esta é a correção para o conteúdo não ficar atrás da barra */
    padding-top: 95px; /* 70px (topbar) + 25px (padding) */
}

.content-wrapper,
.content-wrapper > .container-fluid {
    padding: 0 !important;
    margin: 0 !important;
}

/* ---------------------------------- */
/* 4. Estilos de Toggle da Sidebar */
/* ---------------------------------- */
body.sidebar-toggled .sidebar-nav {
    left: -270px;
}

body.sidebar-toggled .main-content-wrapper {
    margin-left: 0;
    width: 100%;
}

body.sidebar-toggled .topbar-nav {
    width: 100%;
    left: 0;
}

/* ---------------------------------- */
/* 5. Responsivo (Mobile) */
/* ---------------------------------- */
@media (max-width: 991.98px) {
    .sidebar-nav {
        left: -270px;
        z-index: 3000;
    }

    .main-content-wrapper {
        margin-left: 0;
        width: 100%;
    }

    .topbar-nav {
        width: 100%;
        left: 0;
        z-index: 2000;
    }

    .topbar-nav-links {
        display: none;
    }

    .sidebar-toggle-btn {
        margin-right: 0.5rem;
    }

    body.sidebar-open .sidebar-nav {
        left: 0;
    }

    body.sidebar-open::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.4);
        z-index: 2999;
    }
}

/* =================================== */
/* CSS DO CONTEÚDO (Cards, Tabelas) */
/* =================================== */

.card {
    background-color: #ffffff;
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.card-body {
    padding: 24px;
}
.card-header {
    background-color: #fff;
    border-bottom: 1px solid #eef2f7;
    padding: 20px 24px;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}
.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2a3547;
    margin-bottom: 0;
}
.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2a3547;
    margin-bottom: 1rem;
}
.stat-card {
    margin-bottom: 24px;
}
.stat-card .card-body {
    padding: 20px;
}
.stat-card-title {
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: 500;
}
.stat-card-value {
    font-size: 2rem;
    font-weight: 700;
    color: #2a3547;
}
.chart-mini {
    height: 50px;
}
table.dataTable {
    border-collapse: collapse !important;
    width: 100% !important;
    border-spacing: 0;
}
table.dataTable thead th {
    border-bottom: 2px solid #eef2f7;
    padding: 12px 16px;
    text-align: left;
    font-size: 14px;
    font-weight: 600;
    color: #555;
}
table.dataTable tbody td {
    padding: 16px;
    vertical-align: middle;
    font-size: 14px;
    border-bottom: 1px solid #f5f5f5;
}
table.dataTable tbody tr:last-child td {
    border-bottom: none;
}
table.dataTable tbody tr:hover {
    background-color: #f9f9f9;
}
.aniversariante-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #eef2f7;
}
.aniversariante-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.aniversariante-item strong {
    font-weight: 600;
    color: #333;
}
.aniversariante-item small {
    font-size: 14px;
    font-weight: 500;
    color: #6c757d;
}

/* =================================== */
/* CORREÇÃO DO DROPDOWN NO HEADER FIXO */
/* =================================== */
.topbar-nav .nav-item.dropdown {
    position: relative !important;
}

body {
    background: #fafafa;
    font-family: 'Inter', 'Segoe UI', Tahoma, sans-serif;
    color: #333;
}

.header-box {
    background: #fff;
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    margin-bottom: 25px;
}

.header-task {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 12px;
}

.header-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
}

.inprogress { background: #fc8686; color: #520d0d; }
.uiux { background: #fce7f3; color: #be185d; }

.timer {
    font-size: 18px;
    font-weight: bold;
    color: #16a34a;
}

.datatable-box {
    background: #fff;
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

table.dataTable {
    border-collapse: separate;
    border-spacing: 0 12px;
}

table.dataTable tbody tr {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

table.dataTable tbody td {
    background: #fff;
    padding: 16px;
    vertical-align: middle;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.progress-bar {
    height: 6px;
    border-radius: 4px;
    background: #e5e7eb;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #16a34a; /* verde padrão */
    transition: width 0.5s, background-color 0.5s;
}

.progress-wrapper {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.progress-fill.warning {
    background: orange; /* acima de 80% */
}

.progress-fill.complete {
    background: red; /* 100% */
}

.progress-text {
    font-size: 13px;
}

.progress-text strong {
    font-weight: bold;
}

.worked-task {
    font-size: 13px;
    color: #6b7280;
}

/* Badge de férias */
.ferias-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #d1fae5;
    color: #047857;
    font-weight: 600;
    font-size: 13px;
    padding: 3px 8px;
    border-radius: 6px;
    margin-bottom: 4px;
}

.ferias-badge img {
    width: 30px;
    height: 30px;
}

/* Badge de aviso */
.avencer-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fef3c7;
    color: #b45309;
    font-weight: 600;
    font-size: 13px;
    padding: 3px 8px;
    border-radius: 6px;
    margin-bottom: 4px;
}

.avencer-badge img {
    width: 14px;
    height: 14px;
}

/* ===== Login Style Spike Admin ===== */
body.login {
    background: linear-gradient(135deg, #f6f8fc 0%, #e9eefc 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Círculos decorativos */
.shape {
    position: absolute;
    border-radius: 50%;
    z-index: 0;
}

.shape.shape1 {
    width: 300px;
    height: 300px;
    background-color: #ff7f50;
    bottom: -100px;
    left: 100px;
    opacity: 0.3;
}

.shape.shape2 {
    width: 250px;
    height: 250px;
    background-color: #5D87FF;
    top: -100px;
    right: 120px;
    opacity: 0.3;
}

/* Card principal */
.login-card {
    position: relative;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    padding: 40px 35px;
    width: 100%;
    max-width: 420px;
    z-index: 1;
}

.login-card-cadastro {
    position: relative;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    padding: 40px 35px;
    width: 100%;
    max-width: 700px;
    min-height: 450px;       /* altura mínima */
    height: auto !important; /* cresce conforme o conteúdo */
    z-index: 1;
}


.login-logo {
    text-align: center;
    margin-bottom: 15px;
}

.login-logo img {
    width: 225px;
    height: 66px;
}

.login-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2A3547;
    text-align: center;
    margin-bottom: 25px;
}

/* Botões sociais */
.social-login {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 15px;
}

.social-btn {
    flex: 1;
    border: 1px solid #dfe3eb;
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    font-weight: 500;
    font-size: 0.9rem;
    background: #fff;
    transition: all 0.2s ease;
    cursor: pointer;
}

.social-btn:hover {
    background: #f5f8ff;
    border-color: #5D87FF;
    color: #5D87FF;
}

.divider {
    text-align: center;
    position: relative;
    margin: 20px 0;
    color: #6c757d;
    font-size: 0.9rem;
}

.divider::before, .divider::after {
    content: '';
    position: absolute;
    width: 40%;
    height: 1px;
    background: #dee2e6;
    top: 50%;
    transform: translateY(-50%);
}

.divider::before { left: 0; }
.divider::after { right: 0; }

label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #2A3547;
    margin-top: 10px;
}

input.form-control {
    border-radius: 8px;
    height: 42px;
    font-size: 0.95rem;
}

.remember-forgot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    margin-top: 10px;
}

.remember-forgot a {
    color: #5D87FF;
    text-decoration: none;
}

.remember-forgot a:hover {
    text-decoration: underline;
}

.btn-login {
    background-color: #0d6efd;
    border: none;
    color: #fff;
    border-radius: 8px;
    font-weight: 600;
    width: 100%;
    padding: 10px;
    margin-top: 15px;
    transition: all 0.2s ease;
}

.btn-login:hover {
    background-color: #0b5ed7;
}

.signup-link {
    text-align: center;
    font-size: 0.9rem;
    margin-top: 15px;
}

.signup-link a {
    color: #0d6efd;
    text-decoration: none;
    font-weight: 600;
}

.signup-link a:hover {
    text-decoration: underline;
}

/* Mensagens de status */
.alert {
    margin-bottom: 15px;
}

/* ===== Responsividade ===== */
@media (max-width: 480px) {
    .login-card {
        margin: 20px;
        padding: 30px 24px;
        max-width: 95%;
    }

    .bubble.orange {
        width: 200px;
        height: 200px;
        bottom: -80px;
        left: -60px;
    }

    .bubble.blue {
        width: 200px;
        height: 200px;
        top: -70px;
        right: -80px;
    }

    .login-logo span {
        font-size: 1.1rem;
    }
}

canvas { width: 100%; height: 100px !important; }

.linha-corrigida {
    position: relative;
    overflow: hidden;
}

.linha-corrigida::after {
    content: "CORRIGIDO";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-12deg);
    font-size: 32px;
    font-weight: 700;
    letter-spacing: 2px;
    color: rgba(0, 128, 0, 0.18); /* verde suave */
    padding: 5px 20px;
    border: 3px solid rgba(0, 128, 0, 0.25);
    border-radius: 8px;
    text-transform: uppercase;
    backdrop-filter: blur(2px);          /* 🔥 dá efeito premium moderno */
    -webkit-backdrop-filter: blur(2px);  /* para Safari */
    pointer-events: none;
    white-space: nowrap;
}
