@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    /* Cores Padrão (Claro) */
    --bg-base: #f1f5f9;
    --surface: #ffffff;
    --primary: #4f46e5; /* Indigo mais vibrante e tech */
    --primary-dark: #3730a3;
    --accent: #f59e0b;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --radius-md: 12px;
    --radius-lg: 20px;
    --shadow-card: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -2px rgba(0,0,0,0.05);
}

body.dark-mode {
    /* Cores Modo Escuro */
    --bg-base: #0f172a;
    --surface: #1e293b;
    --primary: #6366f1;
    --primary-dark: #818cf8;
    --accent: #fbbf24;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border: #334155;
    --shadow-card: 0 10px 15px -3px rgba(0,0,0,0.3);
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Inter', sans-serif; }

body { background: var(--bg-base); color: var(--text-main); min-height: 100vh; padding-bottom: 70px; transition: background 0.3s, color 0.3s; }
.hidden { display: none !important; }
.mt-2 { margin-top: 10px; } .mt-3 { margin-top: 15px; } .mt-4 { margin-top: 25px; }
.w-100 { width: 100%; } .text-center { text-align: center; }
.text-primary { color: var(--primary); } .text-accent { color: var(--accent); } .text-muted { color: var(--text-muted); } .text-sm { font-size: 0.85rem; }

/* TOPBAR */
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 12px 5%; background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; transition: 0.3s; }
.logo-area { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--text-main); }
.logo-img { width: 36px; height: 36px; border-radius: 50%; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn { background: transparent; border: none; color: var(--text-muted); cursor: pointer; padding: 6px; border-radius: 50%; transition: 0.2s; display: flex; align-items: center; }
.icon-btn:hover { background: var(--bg-base); color: var(--primary); }
.user-info { display: flex; align-items: center; gap: 10px; font-size: 0.9rem; font-weight: 500; }

/* LAYOUT E CONTAINERS */
.container { max-width: 1000px; margin: 0 auto; padding: 20px 15px; }
.view-section { display: none; animation: fadeIn 0.3s; }
.view-section.active { display: block; }
.view-center { min-height: calc(100vh - 60px); display: flex; align-items: center; justify-content: center; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

/* CARDS E FORMULÁRIOS */
.auth-card { background: var(--surface); padding: 35px 25px; border-radius: var(--radius-lg); width: 100%; max-width: 400px; box-shadow: var(--shadow-card); border: 1px solid var(--border); text-align: center; }
.auth-header { margin-bottom: 25px; }
.auth-header h2 { color: var(--primary); font-size: 1.8rem; }
.auth-header p { color: var(--text-muted); font-size: 0.9rem; }

.input-group { display: flex; align-items: center; background: var(--bg-base); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 0 15px; margin-bottom: 15px; transition: 0.2s; }
.input-group:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1); }
.input-group .material-icons-round { color: var(--text-muted); font-size: 20px; }
.input-group input { flex: 1; background: transparent; border: none; padding: 15px 10px; color: var(--text-main); font-size: 1rem; outline: none; }

.input-modern { width: 100%; background: var(--bg-base); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 14px 15px; color: var(--text-main); font-size: 0.95rem; margin-bottom: 12px; outline: none; transition: 0.2s; }
.input-modern:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* BOTÕES */
button { font-family: 'Inter', sans-serif; cursor: pointer; }
.btn-primary { background: var(--primary); color: #fff; padding: 14px; border: none; border-radius: var(--radius-md); font-weight: 600; font-size: 1rem; transition: 0.2s; box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.2); }
.btn-primary:hover { transform: translateY(-2px); filter: brightness(1.1); }
.btn-accent { background: var(--accent); color: #000; padding: 14px; border: none; border-radius: var(--radius-md); font-weight: 600; font-size: 1rem; transition: 0.2s; box-shadow: 0 4px 6px -1px rgba(245, 158, 11, 0.2); }
.btn-accent:hover { transform: translateY(-2px); filter: brightness(1.1); }
.btn-outline-primary { background: transparent; color: var(--primary); border: 1px solid var(--primary); padding: 12px; border-radius: var(--radius-md); font-weight: 600; transition: 0.2s; }
.btn-outline-primary:hover { background: rgba(79, 70, 229, 0.1); }
.btn-outline-danger { background: transparent; color: #ef4444; border: 1px solid #ef4444; padding: 8px 16px; border-radius: 50px; font-weight: 500; font-size: 0.85rem; }
.btn-ia { background: linear-gradient(135deg, #10b981 0%, #059669 100%); color: white; border: none; padding: 12px; border-radius: var(--radius-md); font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 10px; }

/* APP VIEW (ESCALAS E MURAL) */
.tab-content { display: none; animation: fadeIn 0.3s; }
.tab-content.active { display: block; }
.section-header { margin-bottom: 20px; border-bottom: 1px solid var(--border); padding-bottom: 10px; }
.section-header h2 { display: flex; align-items: center; gap: 8px; font-size: 1.3rem; }

/* CARD DE ESCALA NOVO ESTILO */
.cards-list { display: flex; flex-direction: column; gap: 15px; }
.app-card { background: var(--surface); border-radius: var(--radius-lg); padding: 20px; border: 1px solid var(--border); box-shadow: var(--shadow-card); position: relative; overflow: hidden; }
.app-card.hoje { border: 2px solid var(--accent); }
.app-card.passado { opacity: 0.6; filter: grayscale(50%); }
.card-data-badge { display: inline-flex; align-items: center; gap: 5px; background: var(--bg-base); padding: 6px 12px; border-radius: 50px; font-size: 0.85rem; font-weight: 600; color: var(--primary); margin-bottom: 12px; }
.card-title { font-size: 1.2rem; margin-bottom: 10px; color: var(--text-main); font-weight: 700; }
.card-details p { display: flex; gap: 8px; font-size: 0.95rem; margin-bottom: 6px; color: var(--text-muted); }
.card-details .material-icons-round { font-size: 18px; color: var(--text-muted); }

/* MURAL AVISOS */
.aviso-card { background: var(--surface); border-radius: var(--radius-lg); padding: 20px; border: 1px solid var(--border); border-left: 4px solid var(--accent); box-shadow: var(--shadow-card); }
.aviso-card h3 { color: var(--primary); font-size: 1.1rem; margin-bottom: 5px; }

/* BOTTOM NAVIGATION (MOBILE) */
.bottom-nav { position: fixed; bottom: 0; left: 0; width: 100%; background: var(--surface); border-top: 1px solid var(--border); display: flex; justify-content: space-around; padding: 8px 5px 15px; box-shadow: 0 -4px 10px rgba(0,0,0,0.05); z-index: 900; }
.nav-item { flex: 1; background: none; border: none; color: var(--text-muted); display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 0.75rem; font-weight: 500; transition: 0.2s; }
.nav-item.active { color: var(--primary); }
.nav-item .material-icons-round { font-size: 24px; transition: 0.2s; }
.nav-item.active .material-icons-round { transform: translateY(-2px); }

/* ADMIN DASHBOARD */
.admin-layout { padding-bottom: 30px; }
.admin-header-flex { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.dash-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 25px; box-shadow: var(--shadow-card); }
.dash-card h3 { font-size: 1.1rem; margin-bottom: 15px; border-bottom: 1px solid var(--border); padding-bottom: 8px; color: var(--text-main); }
.feature-card { background: linear-gradient(135deg, rgba(79, 70, 229, 0.05) 0%, rgba(79, 70, 229, 0.1) 100%); border-color: rgba(79, 70, 229, 0.2); }
.status-msg { font-size: 0.85rem; color: #f59e0b; margin-top: 8px; text-align: center; font-weight: 600; min-height: 20px; }
.preview-box { background: var(--bg-base); border-radius: var(--radius-md); padding: 15px; margin-top: 15px; font-size: 0.9rem; }
.preview-box ul { padding-left: 20px; margin: 10px 0; color: var(--text-muted); }

/* TABELA ADMIN */
.table-responsive { overflow-x: auto; }
.table-modern { width: 100%; border-collapse: collapse; font-size: 0.9rem; min-width: 500px;}
.table-modern th { text-align: left; padding: 12px; color: var(--text-muted); font-weight: 600; border-bottom: 2px solid var(--border); }
.table-modern td { padding: 15px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }

/* MODALS E FAB */
.modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); backdrop-filter: blur(5px); z-index: 2000; display: flex; align-items: center; justify-content: center; }
.modal-surface { background: var(--surface); padding: 30px; border-radius: var(--radius-lg); width: 90%; max-width: 400px; position: relative; box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5); border: 1px solid var(--border); }
.close-modal { position: absolute; top: 15px; right: 15px; font-size: 24px; color: var(--text-muted); cursor: pointer; }
.fab-donate { position: fixed; bottom: 85px; right: 20px; width: 56px; height: 56px; border-radius: 50%; background: #ef4444; color: white; border: none; box-shadow: 0 10px 15px -3px rgba(239, 68, 68, 0.4); display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 800; transition: 0.3s; }
.fab-donate:hover { transform: scale(1.05); }
.fab-donate .material-icons-round { font-size: 28px; }
.pix-key-box { background: var(--bg-base); padding: 15px; border-radius: var(--radius-md); font-family: monospace; font-size: 1.1rem; margin: 20px 0; word-break: break-all; border: 1px dashed var(--border); color: var(--text-main); }

/* TOAST */
.toast { position: fixed; bottom: 100px; left: 50%; transform: translateX(-50%); background: var(--text-main); color: var(--surface); padding: 12px 24px; border-radius: 50px; z-index: 3000; font-weight: 500; font-size: 0.9rem; white-space: nowrap; animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
@keyframes popIn { 0% { opacity: 0; transform: translate(-50%, 20px) scale(0.9); } 100% { opacity: 1; transform: translate(-50%, 0) scale(1); } }

/* RESPONSIVO DESKTOP FIX */
@media (min-width: 769px) {
    .bottom-nav { display: none; }
    #memberArea { display: flex; gap: 30px; max-width: 1200px; margin: 0 auto; padding: 20px; }
    .tab-content { display: block !important; flex: 1; }
    .fab-donate { bottom: 30px; right: 30px; width: 64px; height: 64px; }
}

/* ======================================================== */
/* CARD DO VERSÍCULO DO DIA                                 */
/* ======================================================== */
.versiculo-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 25px 20px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    margin-bottom: 25px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Um leve brilho no fundo do card */
.versiculo-card::before {
    content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
}

.versiculo-header {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    margin-bottom: 12px; font-size: 0.85rem; text-transform: uppercase;
    letter-spacing: 1.5px; font-weight: 700; color: rgba(255,255,255,0.8);
    position: relative; z-index: 2;
}

#textoVersiculo {
    font-size: 1.15rem; font-style: italic; font-weight: 500;
    line-height: 1.5; margin-bottom: 10px; position: relative; z-index: 2;
}

#refVersiculo {
    font-size: 0.95rem; font-weight: 700; color: var(--accent);
    position: relative; z-index: 2;
}


/* ======================================================== */
/* DEPARTAMENTOS (GRUPOS)                                   */
/* ======================================================== */
.dept-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
}
.dept-icon {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.dept-icon .material-icons-round {
    font-size: 30px;
}
.dept-info h3 {
    font-size: 1.15rem;
    color: var(--text-main);
    margin-bottom: 2px;
}
.dept-info p {
    font-size: 0.95rem;
    color: var(--text-main);
}
