/* ==========================================================================
   ESTILO PADRÃO - ECOSSISTEMA DE APPS (Calculadora do Trabalhador)
   Design System: Glassmorphism | Mobile-First | Ultra-Contrast
   ========================================================================== */

/* 1. RESET E CONFIGURAÇÕES GLOBAIS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: #0f172a; /* Azul Marinho Profundo */
    color: #ffffff !important; 
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 600px;
}

/* Forçar visibilidade de texto em inputs e selects */
input, select, textarea, button {
    color: #ffffff !important;
    font-family: inherit;
}

/* 2. NAVEGAÇÃO E CABEÇALHO */
.btn-back {
    color: #4facfe;
    text-decoration: none;
    font-weight: 500;
    display: inline-block;
    margin-bottom: 15px;
    font-size: 0.9rem;
    transition: opacity 0.2s;
}

.btn-back:hover { opacity: 0.8; }

h1 {
    font-size: 1.5rem;
    text-align: center;
    margin: 10px 0 20px 0;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

h3 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: #4facfe;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 3. DESIGN SYSTEM: GLASSMORPHISM */
.glass-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 18px;
    margin-bottom: 18px;
    width: 100%;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

/* 4. DASHBOARD: BOTÕES DE MENU */
.grid-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    width: 100%;
}

.btn-menu {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(79, 172, 254, 0.3);
    border-radius: 18px;
    padding: 22px 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
}

.btn-menu:hover {
    transform: translateY(-4px);
    border-color: #00f2fe;
    background: rgba(79, 172, 254, 0.15);
}

.btn-menu .icon { font-size: 2.2rem; margin-bottom: 8px; }
.btn-menu strong { color: #4facfe; font-size: 0.95rem; text-transform: uppercase; }
.btn-menu small { color: rgba(255,255,255,0.7); font-size: 0.75rem; margin-top: 5px; }

/* 5. FORMULÁRIOS DE AJUSTES E SALÁRIO */
.config-row-full {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 18px;
}

.input-full {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 14px;
    font-size: 1.1rem;
    width: 100%;
    outline: none;
    transition: border-color 0.2s;
}

.input-full:focus { border-color: #4facfe; }

.config-card {
    background: rgba(255, 255, 255, 0.02);
    padding: 15px;
    border-radius: 14px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.config-card label {
    display: block;
    font-size: 0.7rem;
    color: #4facfe;
    text-transform: uppercase;
    margin-bottom: 10px;
    font-weight: 700;
}

.input-simple {
    background: transparent;
    border: none;
    border-bottom: 2px solid #4facfe;
    font-size: 1.2rem;
    font-weight: bold;
    width: 100%;
    text-align: center;
    padding: 5px 0;
    outline: none;
}

.glass-input {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px;
    border-radius: 10px;
    width: 100%;
    font-size: 0.9rem;
    outline: none;
}

.glass-input option { background: #1e293b; color: white; }

.check-group {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.check-group label {
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    color: #cbd5e1;
}

input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #4facfe;
    cursor: pointer;
}

/* 6. ESCALA E TABELAS */
.escala-grid { display: flex; flex-direction: column; gap: 10px; }

.dia-config-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.03);
    padding: 12px 15px;
    border-radius: 14px;
}

.dia-nome { color: #4facfe; font-weight: bold; width: 85px; font-size: 0.9rem; }

input[type="time"] {
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 8px;
    border-radius: 8px;
    font-size: 0.85rem;
    width: 85px;
    text-align: center;
}

.table-container {
    width: 100%;
    overflow-x: auto;
    border-radius: 12px;
}

table { width: 100%; border-collapse: collapse; min-width: 500px; }
th { font-size: 0.7rem; color: #4facfe; padding: 12px 8px; text-align: left; text-transform: uppercase; border-bottom: 1px solid rgba(255,255,255,0.1); }
td { padding: 12px 8px; border-bottom: 1px solid rgba(255, 255, 255, 0.05); font-size: 0.85rem; }

/* 7. BOTÕES E STATUS */
.btn-main {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    border: none;
    padding: 18px;
    border-radius: 14px;
    color: #0f172a !important;
    font-weight: 800;
    cursor: pointer;
    width: 100%;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-main:active { transform: scale(0.97); }

.btn-print {
    background: transparent;
    border: 1.5px solid #4facfe;
    color: #4facfe !important;
    padding: 10px 22px;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-print:hover { background: #4facfe; color: #0f172a !important; }

/* 8. MODAL E INDICADORES */
.modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.98); 
    display: flex; align-items: center; justify-content: center; z-index: 1000;
}

.modal-content { width: 95%; max-width: 520px; max-height: 85vh; overflow-y: auto; }

.grid-resumo { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat { background: rgba(255, 255, 255, 0.03); padding: 15px; border-radius: 15px; text-align: center; border: 1px solid rgba(255,255,255,0.05); }
.stat span { font-size: 0.65rem; opacity: 0.6; text-transform: uppercase; display: block; margin-bottom: 5px; }
.stat strong { color: #00f2fe; font-size: 1.2rem; }

.hidden { display: none !important; }

/* 9. REGRAS DE IMPRESSÃO */
@media print {
    .btn-back, .btn-main, .btn-print, .grid-inputs, .btn-menu, select { display: none !important; }
    body { background: white !important; color: black !important; padding: 0; }
    .glass-card { border: 1px solid #eee !important; background: none !important; box-shadow: none !important; color: black !important; backdrop-filter: none !important; }
    input { color: black !important; border: none !important; background: none !important; }
    strong, h1, h3, span { color: black !important; -webkit-text-fill-color: black !important; }
    .stat { border: 1px solid #eee !important; }
}

/* Ajuste para Autofill do Navegador */
input:-webkit-autofill {
    -webkit-text-fill-color: white !important;
    -webkit-box-shadow: 0 0 0px 1000px #1e293b inset;
    transition: background-color 5000s ease-in-out 0s;
}