/* * ARQUIVO: css/style.css
 * OBJETIVO: Estilização centralizada, Responsiva (Mobile-First) e Utilitários
 */

:root {
    --primary: #0056b3;
    --primary-dark: #004494;
    --secondary: #6c757d;
    --success: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
    --light: #f8f9fa;
    --dark: #343a40;
    --bg-body: #f4f6f9;
    --border-color: #dee2e6;
    --shadow: 0 2px 10px rgba(0,0,0,0.05);
    
    /* Cores Semânticas para Cards/Status */
    --color-blue: #007bff;
    --color-green: #28a745;
    --color-red: #dc3545;
    --color-purple: #6f42c1;
    --color-teal: #20c997;
    --color-yellow: #ffc107;
    --color-orange: #fd7e14;
}

/* ================= BASE E RESET ================= */
* { box-sizing: border-box; }

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-body);
    margin: 0;
    padding: 0;
    color: #333;
    font-size: 16px;
    line-height: 1.5;
}

h1, h2, h3 { margin-top: 0; color: #333; }
a { text-decoration: none; color: var(--primary); }

/* ================= UTILITIES / HELPERS (REGRA DE OURO: SEM INLINE) ================= */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }

.w-100 { width: 100%; }

/* Texto de Apoio (UX - Estudo) */
.help-text {
    display: block;
    font-size: 0.85rem;
    color: #666;
    margin-top: 4px;
    font-style: italic;
}

/* ================= PÁGINA DE LOGIN ================= */
.page-login {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background-color: var(--bg-body);
}

.login-box {
    width: 100%;
    max-width: 350px;
    padding: 30px;
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.login-title {
    text-align: center;
    color: var(--primary);
    margin-bottom: 20px;
}

/* ================= LAYOUT E CONTAINER ================= */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px;
    background: white;
    min-height: 100vh;
}

@media (min-width: 768px) {
    .container {
        margin: 20px auto;
        padding: 30px;
        border-radius: 8px;
        box-shadow: var(--shadow);
        min-height: auto;
    }
}

/* ================= HEADER E NAV SUPERIOR ================= */
.navbar {
    background-color: var(--primary);
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.navbar h1 { margin: 0; font-size: 1.2rem; color: white; }
.user-info { font-size: 0.9rem; margin-top: 5px; }

.nav-btn-sair {
    margin-left: 10px;
    color: white !important; /* Força cor branca no link */
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

/* ================= FORMULÁRIOS (GRID SYSTEM) ================= */
.form-grid {
    display: grid;
    grid-template-columns: 1fr; 
    gap: 15px;
}

.form-group { margin-bottom: 15px; }

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #555;
}

input[type="text"], input[type="email"], input[type="password"],
input[type="date"], input[type="number"], select, textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    background-color: #fff;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(0,86,179,0.2);
}

@media (min-width: 768px) {
    .form-grid { grid-template-columns: repeat(3, 1fr); }
    .col-2 { grid-column: span 2; }
    .col-3 { grid-column: span 3; }
}

/* ================= TABELAS RESPONSIVAS ================= */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-top: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

th, td {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
}

th { background-color: var(--light); color: #333; font-weight: 600; }

/* ================= BOTÕES E ALERTS ================= */
.btn {
    padding: 8px 16px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-size: 0.9rem;
    transition: background 0.2s;
    color: white;
    text-decoration: none;
}

.btn-primary { background: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: var(--secondary); }
.btn-secondary:hover { background: #5a6268; }
.btn-success { background: var(--success); }
.btn-danger { background: var(--danger); }
.btn-sm { padding: 5px 10px; font-size: 0.8rem; }

.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-weight: 500;
}
.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

/* ================= DASHBOARD CARDS ================= */
.dashboard-section-title {
    grid-column: 1 / -1;
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 1.2rem;
    color: #555;
    border-left: 4px solid var(--primary);
    padding-left: 10px;
    font-weight: 600;
}

.grid-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.2s;
    border: 1px solid var(--border-color); /* Borda padrão */
    border-bottom-width: 3px; /* Espessura da cor inferior */
    display: block;
    text-decoration: none;
}

.card:hover { transform: translateY(-5px); box-shadow: 0 5px 15px rgba(0,0,0,0.1); }
.card h3 { margin-top: 10px; margin-bottom: 5px; color: var(--primary); font-size: 1.1rem; }
.card p { color: #666; font-size: 0.9rem; margin: 0; }
.card .icon { font-size: 2rem; display: block; margin-bottom: 10px; }

/* Cores de Borda do Dashboard (Substitui inline style) */
.border-blue { border-bottom-color: var(--color-blue); }
.border-green { border-bottom-color: var(--color-green); }
.border-red { border-bottom-color: var(--color-red); }
.border-purple { border-bottom-color: var(--color-purple); }
.border-teal { border-bottom-color: var(--color-teal); }
.border-yellow { border-bottom-color: var(--color-yellow); }
.border-orange { border-bottom-color: var(--color-orange); }
.border-cyan { border-bottom-color: #17a2b8; }
.border-pink { border-bottom-color: #e83e8c; }
.border-indigo { border-bottom-color: #6610f2; }
.border-gray { border-bottom-color: #6c757d; }

.card-disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
    background-color: #f8f9fa;
    filter: grayscale(0.8);
}

/* ================= NAVEGAÇÃO VIAJANTE ================= */
.nav-viajante {
    display: flex;
    overflow-x: auto;
    gap: 5px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
}

.nav-item {
    flex: 0 0 auto;
    text-decoration: none;
    color: #555;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    background: #e9ecef;
    transition: 0.2s;
}

.nav-item:hover { background: #dbe2e8; color: #333; }
.nav-item.active { background: var(--primary); color: white; }

/* ================= BADGES ================= */
.badge { padding: 4px 8px; border-radius: 4px; font-size: 0.75rem; color: white; display: inline-block; }
.bg-info { background-color: #17a2b8; }
.bg-red { background-color: var(--color-red); }
.bg-orange { background-color: var(--color-orange); }
.bg-green { background-color: var(--color-green); }
.bg-blue { background-color: var(--color-blue); }