/* CSS Global - Mobile First */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --cor-primaria: #FF6B35;
    --cor-secundaria: #004E89;
    --cor-sucesso: #28A745;
    --cor-aviso: #FFC107;
    --cor-erro: #DC3545;
    --cor-fundo: #F8F9FA;
    --cor-texto: #333;
    --cor-cinza: #6C757D;
    --cor-borda: #DEE2E6;
    --font-size-base: 16px;
    --border-radius: 8px;
    --sombra: 0 2px 8px rgba(0,0,0,0.1);
    --transicao: 0.3s ease;
}

html, body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--cor-fundo);
    color: var(--cor-texto);
    font-size: var(--font-size-base);
    line-height: 1.6;
    height: 100%;
}

/* Tipografia */
h1, h2, h3, h4, h5, h6 {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    color: var(--cor-secundaria);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p { margin-bottom: 1rem; }

/* Botões */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transicao);
    text-align: center;
    text-decoration: none;
    width: 100%;
    margin-bottom: 0.5rem;
}

.btn-primary {
    background-color: var(--cor-primaria);
    color: white;
}

.btn-primary:hover {
    background-color: #E55A27;
    transform: translateY(-2px);
    box-shadow: var(--sombra);
}

.btn-secondary {
    background-color: var(--cor-secundaria);
    color: white;
}

.btn-secondary:hover {
    background-color: #003A64;
}

.btn-success {
    background-color: var(--cor-sucesso);
    color: white;
}

.btn-success:hover {
    background-color: #218838;
}

.btn-danger {
    background-color: var(--cor-erro);
    color: white;
}

.btn-danger:hover {
    background-color: #C82333;
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--cor-primaria);
    color: var(--cor-primaria);
}

.btn-outline:hover {
    background-color: var(--cor-primaria);
    color: white;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.1rem;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Inputs e Formulários */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--cor-texto);
}

input, textarea, select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--cor-borda);
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transicao);
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--cor-primaria);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

/* Cards */
.card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--sombra);
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.card-header {
    border-bottom: 2px solid var(--cor-borda);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.card-header h2 {
    margin: 0;
}

.card-body {
    padding: 1rem 0;
}

.card-footer {
    border-top: 1px solid var(--cor-borda);
    padding-top: 1rem;
    margin-top: 1rem;
}

/* Tabelas */
table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

thead {
    background-color: var(--cor-secundaria);
    color: white;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--cor-borda);
}

tbody tr:hover {
    background-color: var(--cor-fundo);
}

/* Alertas */
.alert {
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    border-left: 4px solid;
}

.alert-success {
    background-color: #D4EDDA;
    border-color: var(--cor-sucesso);
    color: #155724;
}

.alert-error {
    background-color: #F8D7DA;
    border-color: var(--cor-erro);
    color: #721C24;
}

.alert-warning {
    background-color: #FFF3CD;
    border-color: var(--cor-aviso);
    color: #856404;
}

.alert-info {
    background-color: #D1ECF1;
    border-color: #17A2B8;
    color: #0C5460;
}

/* Responsividade */
@media (max-width: 768px) {
    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.3rem; }
    
    .btn {
        padding: 14px 20px;
    }
    
    table {
        font-size: 0.9rem;
    }
    
    th, td {
        padding: 10px;
    }
}

/* Utilitários */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--cor-cinza); }
.text-danger { color: var(--cor-erro); }
.text-success { color: var(--cor-sucesso); }

.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; }

.hidden { display: none; }
.visible { display: block; }

.loader {
    border: 4px solid var(--cor-fundo);
    border-top: 4px solid var(--cor-primaria);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 2rem auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
