/* Variáveis de cores */
:root {
    --primary: #032e79;
    --primary-light: #1e4491;
    --primary-dark: #021b47;
    --secondary: #021b47;
    --secondary-light: #0a2d6b;
    --secondary-dark: #01132f;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --light: #ffffff;
    --gray: #f4f4f4;
    --gray-dark: #cccccc;
    --gradient: linear-gradient(135deg, var(--primary), var(--secondary));
    --gradient-hover: linear-gradient(135deg, var(--primary-light), var(--primary-dark));
    
    /* Cores de texto */
    --text-primary: var(--light);
    --text-secondary: #e0e0e0;
    --text-muted: #b0b0b0;

    /* Transições */
    --tran-02: all 0.2s ease;
    --tran-03: all 0.3s ease;
    --tran-04: all 0.4s ease;
    --tran-05: all 0.5s ease;
}

/* Estilos Gerais - reduzidos para evitar conflitos com Bootstrap */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: #f0f2f5;
    color: var(--primary-dark);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.container {
    display: flex;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Sidebar */
.sidebar {
    width: 70px;
    background: var(--gradient);
    color: var(--text-primary);
    padding: 1.5rem 0.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: fixed;
    height: 100vh;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    z-index: 100;
    overflow-x: hidden;
}

.sidebar:hover {
    width: 260px;
    padding: 1.5rem;
    background: var(--gradient);
}

/* Estado expandido do sidebar */
.sidebar .logo h2,
.sidebar .sidebar-footer span {
    color: var(--text-primary);
    opacity: 0;
    width: 0;
    display: none;
    transition: opacity 0.2s ease, width 0.2s ease;
    white-space: nowrap;
}

.sidebar:hover .logo h2,
.sidebar:hover .sidebar-footer span {
    opacity: 1;
    width: auto;
    display: block;
}

.sidebar nav ul li a span {
    color: var(--text-primary);
    opacity: 0;
    width: 0;
    display: none;
    transition: opacity 0.2s ease, width 0.2s ease;
    white-space: nowrap;
}

.sidebar:hover nav ul li a span {
    opacity: 1;
    width: auto;
    display: inline-block;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
}

.sidebar:hover .logo {
    justify-content: flex-start;
}

.logo img {
    width: 40px;
    height: auto;
    margin-right: 0;
}

.sidebar:hover .logo img {
    margin-right: 0.5rem;
}

.logo h2 {
    font-size: 1.2rem;
    font-weight: 700;
}

.sidebar nav ul {
    list-style: none;
    padding-left: 0;
}

.sidebar nav ul li {
    margin-bottom: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.sidebar nav ul li a {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 8px;
}

.sidebar:hover nav ul li a {
    justify-content: flex-start;
    padding: 0.8rem 1rem;
    background: rgba(255, 255, 255, 0.1);
}

.sidebar nav ul li a i {
    margin-right: 0;
    font-size: 1.1rem;
}

.sidebar:hover nav ul li a i {
    margin-right: 0.8rem;
}

.sidebar nav ul li:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.sidebar nav ul li.active {
    background: rgba(255, 255, 255, 0.2);
}

.sidebar-footer {
    margin-top: 2rem;
    font-size: 0.8rem;
    opacity: 0.8;
    text-align: center;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 70px;
    padding: 1.5rem;
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Tooltips para ícones quando o mouse não está sobre o sidebar */
.sidebar nav ul li a {
    position: relative;
}

.sidebar nav ul li a:hover::after {
    content: attr(data-title);
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--primary-dark);
    color: var(--light);
    padding: 0.5rem;
    border-radius: 4px;
    margin-left: 10px;
    font-size: 0.8rem;
    white-space: nowrap;
    z-index: 102;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.sidebar:hover nav ul li a:hover::after {
    display: none;
}

.sidebar nav ul li a:hover::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 100%;
    margin-left: 0;
    transform: translateY(-50%);
    border: 5px solid transparent;
    border-right-color: var(--primary-dark);
    z-index: 102;
}

.sidebar:hover nav ul li a:hover::before {
    display: none;
}

/* Notificações e perfil de usuário */
.notifications {
    position: relative;
    cursor: pointer;
}

.notifications i {
    font-size: 1.2rem;
    color: var(--secondary);
}

.badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--primary) !important;
    color: white;
    border-radius: 50% !important;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 0;
}

.user img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
}

/* Cards de Estatísticas */
.stat-card {
    background: var(--gradient);
    color: var(--light);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    height: 100%;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.1);
}

.stat-icon i {
    font-size: 1.5rem;
    color: var(--light);
}

.bg-orange {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
}

.bg-blue {
    background: linear-gradient(135deg, var(--secondary), var(--secondary-light));
}

.bg-green {
    background: linear-gradient(135deg, var(--success), var(--success-light));
}

.bg-gradient {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.bg-dark {
    background: linear-gradient(135deg, var(--dark), #333333);
}

.stat-details h3 {
    font-size: 0.9rem;
    color: var(--light);
    margin-bottom: 0.5rem;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
    color: var(--light);
}

.trend {
    font-size: 0.8rem;
    display: flex;
    align-items: center;
}

.trend i {
    margin-right: 0.3rem;
}

.trend.up {
    color: var(--success);
}

.trend.down {
    color: var(--danger);
}

/* Cards de Gráficos */
.chart-card {
    background: var(--light);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    height: 100%;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.chart-header h3 {
    font-size: 1.1rem;
    color: var(--primary);
    margin-bottom: 0;
}

.chart-body {
    height: 300px;
    position: relative;
}

/* Kanban Board */
.kanban-column {
    background-color: var(--gray);
    border-radius: 12px;
    height: 100%;
}

.column-header {
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--gray-dark);
}

.column-header h3 {
    font-size: 0.9rem;
    color: var(--primary);
    margin-bottom: 0;
}

.count {
    background-color: var(--secondary-light);
    color: var(--light);
    border-radius: 50px;
    padding: 0.2rem 0.6rem;
    font-size: 0.8rem;
    font-weight: 600;
}

.kanban-cards {
    padding: 1rem;
    max-height: 400px;
    overflow-y: auto;
}

.kanban-card {
    background-color: var(--light);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.8rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.kanban-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.card-priority {
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

.card-priority.high {
    background-color: var(--danger);
}

.card-priority.medium {
    background-color: var(--warning);
}

.card-priority.low {
    background-color: var(--success);
}

.kanban-card h4 {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    padding-left: 0.2rem;
}

.kanban-card p {
    font-size: 0.8rem;
    color: var(--primary);
    margin-bottom: 1rem;
    padding-left: 0.2rem;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: #777;
}

.card-meta span {
    display: flex;
    align-items: center;
}

.card-meta i {
    margin-right: 0.3rem;
}

.card-meta i.fa-whatsapp {
    color: #25D366;
}

.card-meta i.fa-check-circle {
    color: var(--success);
}

/* Recent Activity */
.activity-list {
    background-color: var(--light);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    padding: 1rem;
}

.activity-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--gray);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    flex-shrink: 0;
}

.activity-icon i {
    color: var(--primary);
    font-size: 1rem;
}

.activity-details {
    flex: 1;
}

.activity-details p {
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}

.activity-time {
    font-size: 0.75rem;
    color: #777;
}

/* Links "Ver tudo" */
.view-all {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.view-all i {
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
}

.view-all:hover {
    color: var(--primary-dark);
}

.view-all:hover i {
    transform: translateX(3px);
}

/* Estilos para dispositivos móveis */
@media (max-width: 768px) {
    .sidebar {
        width: 0;
        padding: 0;
        transform: translateX(-100%);
        opacity: 0;
        z-index: 1050;
    }

    .sidebar.open {
        width: 260px;
        padding: 1.5rem;
        transform: translateX(0);
        opacity: 1;
        box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
    }

    .sidebar.open .logo {
        justify-content: flex-start;
    }

    .sidebar.open .logo img {
        margin-right: 0.5rem;
    }

    .sidebar.open .logo h2,
    .sidebar.open .sidebar-footer span {
        opacity: 1;
        width: auto;
        display: block;
    }

    .sidebar.open nav ul li a {
        justify-content: flex-start;
        padding: 0.8rem 1rem;
    }

    .sidebar.open nav ul li a span {
        opacity: 1;
        width: auto;
        display: inline-block;
    }

    .sidebar.open nav ul li a i {
        margin-right: 0.8rem;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 1rem;
    }

    header {
        margin-top: 3rem;
    }

    /* Estilo para o botão mobile criado dinamicamente */
    .mobile-toggle {
        cursor: pointer;
        transition: all 0.3s ease;
    }

    .mobile-toggle:hover {
        background: var(--primary-dark) !important;
        transform: scale(1.05);
    }

    /* Overlay quando o sidebar está aberto */
    .sidebar-overlay.active {
        z-index: 1040;
    }
}

/* Estilos para telas grandes (desktop e laptop) */
@media (min-width: 1441px) {
    .sidebar {
        width: 80px;
    }

    .sidebar:hover {
        width: 280px;
    }

    .main-content {
        margin-left: 80px;
        padding: 2rem 3rem;
    }

    .stat-icon {
        width: 70px;
        height: 70px;
    }

    .stat-icon i {
        font-size: 1.8rem;
    }

    .stat-number {
        font-size: 1.8rem;
    }

    .chart-body {
        height: 380px;
    }

    .kanban-cards {
        max-height: 480px;
    }

    h1 {
        font-size: 2.2rem;
    }

    .section-header h2 {
        font-size: 1.6rem;
    }
}

/* Estilos para telas muito grandes (monitores grandes) */
@media (min-width: 1921px) {
    .sidebar {
        width: 90px;
    }

    .sidebar:hover {
        width: 300px;
    }

    .main-content {
        margin-left: 90px;
        padding: 3rem 4rem;
    }

    .logo img {
        width: 50px;
    }

    .logo h2 {
        font-size: 1.5rem;
    }

    .sidebar nav ul li a {
        padding: 1rem 1.2rem;
    }

    .sidebar nav ul li a i {
        font-size: 1.3rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .chart-body {
        height: 450px;
    }
}

/* Animações */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-card,
.chart-card,
.kanban-card,
.activity-item {
    animation: fadeIn 0.5s ease forwards;
}

.stat-card:nth-child(1) {
    animation-delay: 0.1s;
}

.stat-card:nth-child(2) {
    animation-delay: 0.2s;
}

.stat-card:nth-child(3) {
    animation-delay: 0.3s;
}

.stat-card:nth-child(4) {
    animation-delay: 0.4s;
}

/* Overlay para quando o sidebar está aberto em mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 90;
}

.sidebar-overlay.active {
    display: block;
}

.sidebar header .image-text .name {
    color: #FFF;
}

.sidebar header .image-text .profession {
    color: rgba(255, 255, 255, 0.8);
}

.sidebar .menu-bar .mode .sun-moon i {
    color: #FFF;
}

.sidebar li a {
    color: #FFF;
}

.sidebar li a:hover {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar li a.active {
    background: rgba(255, 255, 255, 0.2);
}

.sidebar .menu-bar .bottom-content .toggle-switch {
    background: rgba(255, 255, 255, 0.2);
}

/* Botões */
.btn-primary {
    background: var(--gradient);
    color: var(--light);
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: var(--gradient-hover);
    transform: translateY(-2px);
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient);
    padding: 20px;
}

.login-card {
    background: var(--light);
    border-radius: 15px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

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

.login-card .logo img {
    width: 150px;
    height: auto;
}

.login-card h2 {
    color: var(--primary);
    text-align: center;
    margin-bottom: 30px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--primary);
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.form-group input:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(3, 46, 121, 0.1);
}

.login-btn {
    width: 100%;
    padding: 12px;
    background: var(--gradient);
    color: var(--light);
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.login-btn:hover {
    background: var(--gradient-hover);
    transform: translateY(-2px);
}

/* Tabelas */
.table-container {
    background: var(--light);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.table th {
    color: var(--primary);
    font-weight: 600;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(3, 46, 121, 0.05);
}

/* Status Badges */
.badge-primary {
    background: var(--gradient);
    color: var(--light);
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.85em;
}

/* Charts */
.chart-title {
    color: var(--primary);
    margin-bottom: 20px;
    font-weight: 600;
}