:root {
    --sidebar-width: 240px;
    --primary: #0d6efd;
    --primary-dark: #0a58ca;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: #f0f4f8;
    min-height: 100vh;
}

#wrapper {
    min-height: 100vh;
}

#sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

#sidebar .nav-link {
    border-radius: 8px;
    margin-bottom: 2px;
    padding: 10px 14px;
    transition: background 0.2s;
}

#sidebar .nav-link:hover,
#sidebar .nav-link.active {
    background: rgba(255,255,255,0.15);
}

#sidebar .nav-link.active {
    background: rgba(255,255,255,0.25);
    font-weight: 600;
}

#page-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    width: calc(100% - var(--sidebar-width));
}

/* Cards dashboard */
.stat-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.1);
    color: inherit;
}

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

.stat-card .stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.2;
}

/* Tabelas */
.table-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    overflow: hidden;
}

.table th {
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #64748b;
    border-bottom-width: 1px;
    white-space: nowrap;
}

.table td {
    vertical-align: middle;
}

/* Kanban */
.kanban-board {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 16px;
    min-height: 500px;
}

.kanban-column {
    min-width: 280px;
    max-width: 300px;
    background: #e8eef5;
    border-radius: 12px;
    padding: 12px;
    flex-shrink: 0;
}

.kanban-column h6 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    margin-bottom: 12px;
    padding: 0 4px;
}

.kanban-card {
    background: #fff;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    cursor: pointer;
    transition: box-shadow 0.2s;
    border-left: 4px solid #0d6efd;
}

.kanban-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.kanban-card.atrasada {
    border-left-color: #dc3545;
    background: #fff5f5;
}

.kanban-card.urgente {
    border-left-color: #dc3545;
}

.kanban-card.alta {
    border-left-color: #ffc107;
}

.kanban-card .card-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.kanban-card .card-meta {
    font-size: 0.75rem;
    color: #64748b;
}

/* Filtros */
.filter-bar {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    margin-bottom: 20px;
}

/* Formulários */
.form-card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* Checklist */
.checklist-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
}

.checklist-item.done {
    text-decoration: line-through;
    opacity: 0.6;
}

/* Comentários */
.comment-item {
    border-left: 3px solid #0d6efd;
    padding: 10px 14px;
    margin-bottom: 12px;
    background: #f8fafc;
    border-radius: 0 8px 8px 0;
}

.comment-item .comment-meta {
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 4px;
}

/* Página de login */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 50%, #084298 100%);
}

.login-card {
    background: #fff;
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

/* Badges extras */
.badge {
    font-weight: 500;
    font-size: 0.75rem;
}

/* Responsivo */
@media (max-width: 768px) {
    #sidebar {
        transform: translateX(-100%);
    }
    #sidebar.show {
        transform: translateX(0);
    }
    #page-content {
        margin-left: 0;
        width: 100%;
    }
    .kanban-board {
        flex-direction: column;
    }
    .kanban-column {
        max-width: 100%;
        min-width: 100%;
    }
}

/* Overlay mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 999;
}
.sidebar-overlay.show {
    display: block;
}

/* Highlight atrasadas */
tr.atrasada {
    background-color: #fff5f5 !important;
}
tr.atrasada td:first-child {
    border-left: 3px solid #dc3545;
}

/* Page header */
.page-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}
.page-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    color: #1e293b;
}
