/* Estilos Globais - Plataforma de Ensino Online */
/* Paleta de Cores: Tons de Azul */

:root {
    --azul-principal: #2563eb;
    --azul-escuro: #1e40af;
    --azul-claro: #3b82f6;
    --azul-muito-claro: #dbeafe;
    --texto: #1f2937;
    --texto-claro: #6b7280;
    --fundo: #ffffff;
    --fundo-cinza: #f9fafb;
    --borda: #e5e7eb;
    --sucesso: #10b981;
    --erro: #ef4444;
    --aviso: #f59e0b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--texto);
    background-color: var(--fundo-cinza);
    line-height: 1.6;
}

/* Header */
.header {
    background-color: var(--fundo);
    border-bottom: 1px solid var(--borda);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--azul-principal);
    text-decoration: none;
}

.nav {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav a {
    color: var(--texto);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav a:hover {
    color: var(--azul-principal);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--azul-principal);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Cards */
.card {
    background-color: var(--fundo);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

.card-header {
    border-bottom: 1px solid var(--borda);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--texto);
}

/* Botões */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--azul-principal);
    color: white;
}

.btn-primary:hover {
    background-color: var(--azul-escuro);
}

.btn-secondary {
    background-color: var(--azul-muito-claro);
    color: var(--azul-principal);
}

.btn-secondary:hover {
    background-color: var(--azul-claro);
    color: white;
}

.btn-danger {
    background-color: var(--erro);
    color: white;
}

.btn-danger:hover {
    background-color: #dc2626;
}

.btn-success {
    background-color: var(--sucesso);
    color: white;
}

/* Formulários */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--texto);
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--borda);
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--azul-principal);
    box-shadow: 0 0 0 3px var(--azul-muito-claro);
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-check input {
    width: auto;
}

/* Alertas */
.alert {
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid var(--sucesso);
}

.alert-error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid var(--erro);
}

.alert-warning {
    background-color: #fef3c7;
    color: #92400e;
    border: 1px solid var(--aviso);
}

/* Grid de Cursos */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.course-card {
    background-color: var(--fundo);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.course-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.course-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background-color: var(--azul-muito-claro);
}

.course-content {
    padding: 1.5rem;
}

.course-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--texto);
}

.course-description {
    color: var(--texto-claro);
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.course-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--borda);
}

.course-price {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--azul-principal);
}

.course-price.free {
    color: var(--sucesso);
}

/* Tabelas */
.table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--fundo);
    border-radius: 8px;
    overflow: hidden;
}

.table th,
.table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--borda);
}

.table th {
    background-color: var(--azul-muito-claro);
    font-weight: 600;
    color: var(--azul-escuro);
}

.table tr:hover {
    background-color: var(--fundo-cinza);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 500;
}

.badge-primary {
    background-color: var(--azul-muito-claro);
    color: var(--azul-principal);
}

.badge-success {
    background-color: #d1fae5;
    color: #065f46;
}

.badge-warning {
    background-color: #fef3c7;
    color: #92400e;
}

/* Progress Bar */
.progress {
    width: 100%;
    height: 8px;
    background-color: var(--borda);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background-color: var(--azul-principal);
    transition: width 0.3s;
}

/* Responsivo */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav {
        flex-direction: column;
        width: 100%;
    }
    
    .courses-grid {
        grid-template-columns: 1fr;
    }
    
    .container {
        padding: 1rem;
    }
    
    .table {
        font-size: 0.875rem;
    }
    
    .table th,
    .table td {
        padding: 0.5rem;
    }
}

/* Utilitários */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.d-flex {
    display: flex;
}

.justify-between {
    justify-content: space-between;
}

.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

