/* Reset e Variáveis */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --success-color: #2ecc71;
    --warning-color: #f1c40f;
    --info-color: #3498db;
    --danger-color: #e74c3c;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;
    --sidebar-width: 250px;
    --header-height: 60px;
    --transition-speed: 0.3s;
}

/* Layout Principal */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--gray-100);
    color: var(--gray-800);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--primary-color);
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    z-index: 1000;
    transition: transform var(--transition-speed) ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.sidebar-brand {
    padding: 1.5rem;
    color: white;
    font-size: 1.25rem;
    font-weight: 600;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar .nav-link {
    color: rgba(255,255,255,0.8);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.sidebar .nav-link:hover {
    color: white;
    background: rgba(255,255,255,0.1);
}

.sidebar .nav-link i {
    margin-right: 0.75rem;
    width: 20px;
    text-align: center;
}

.sidebar .nav-link.active {
    background: var(--secondary-color);
    color: white;
}

/* Conteúdo Principal */
.main-content {
    margin-left: 250px;
    padding: 2rem;
    min-height: 100vh;
}

/* Estado com sidebar oculta (desktop) */
.main-content.sidebar-hidden {
    margin-left: 0;
}

/* Cards */
.card {
    background: white;
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 1.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.card-header {
    background: white;
    border-bottom: 1px solid var(--gray-200);
    padding: 1.25rem;
}

.card-title {
    margin: 0;
    color: var(--primary-color);
    font-weight: 600;
}

/* Estatísticas Cards */
.stat-card {
    padding: 1.5rem;
    border-radius: 10px;
    background: white;
    margin-bottom: 1.5rem;
}

.stat-card .icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    opacity: 0.8;
}

.stat-card .title {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-600);
    margin-bottom: 0.5rem;
}

.stat-card .value {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--gray-800);
}

/* Botões */
.btn {
    padding: 0.6rem 1.2rem;
    border-radius: 5px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
}

/* Tabelas */
.table {
    background: white;
    border-radius: 10px;
    overflow: hidden;
}

.table thead th {
    background: var(--gray-100);
    border-bottom: 2px solid var(--gray-200);
    color: var(--gray-700);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
}

.table tbody tr:hover {
    background: var(--gray-100);
}

/* Status Badges */
.badge {
    padding: 0.5em 1em;
    border-radius: 30px;
    font-weight: 500;
}

.status-aguardando {
    background-color: var(--warning-color) !important;
    color: var(--dark-color);
}

.status-em_andamento {
    background-color: var(--info-color) !important;
    color: white;
}

.status-concluido {
    background-color: var(--success-color) !important;
    color: white;
}

.status-cancelado {
    background-color: var(--danger-color) !important;
    color: white;
}

/* Formulários */
.form-control {
    border-radius: 5px;
    border: 1px solid var(--gray-300);
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
}

.form-control:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

.form-label {
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

/* Timeline */
.timeline {
    position: relative;
    padding: 1rem 0;
}

.timeline-item {
    position: relative;
    padding-left: 2.5rem;
    margin-bottom: 1.5rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--secondary-color);
    border: 3px solid white;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.timeline-item::after {
    content: '';
    position: absolute;
    left: 7px;
    top: 16px;
    bottom: -24px;
    width: 2px;
    background: var(--gray-300);
}

.timeline-item:last-child::after {
    display: none;
}

.timeline-date {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-bottom: 0.5rem;
}

.timeline-content {
    background: white;
    padding: 1rem;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* Responsividade */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
}

/* Desktop: permitir ocultar sidebar com mesmo botão */
@media (min-width: 769px) {
    .sidebar.show {
        transform: translateX(-100%);
    }
}

/* Overlay da sidebar (mobile) */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 999;
    display: none;
}
.sidebar-overlay.active { display: block; }

/* Animações */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}