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

:root {
    --primary-color: #5A008A; /* Roxo escuro dos botões e navegação */
    --primary-light: #B485C9; /* Roxo claro para textos secundários */
    --bg-app: #F4F2F7; /* Fundo lilás bem claro do aplicativo */
    --white: #FFFFFF;
    --text-dark: #333333;
    --text-muted: #A0A0A0;
    --border-radius: 12px;
    --shadow-sm: 0 4px 10px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 4px 15px rgba(0, 0, 0, 0.08);
}

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

body {
    background-color: var(--bg-app);
    color: var(--text-dark);
    /* padding-bottom para não esconder conteúdo atrás da barra inferior */
    padding-bottom: 80px; 
    min-height: 100vh;
}

/* --- TOP BAR --- */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background-color: transparent;
}

.top-bar .action-icon {
    color: var(--primary-color);
    font-size: 22px;
    text-decoration: none;
    cursor: pointer;
}

.top-bar .page-title {
    color: var(--primary-color);
    font-size: 20px;
    font-weight: 700;
}

/* --- BOTTOM NAVIGATION BAR --- */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 65px;
    background-color: var(--primary-color);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 999;
}

.bottom-nav a {
    color: var(--white);
    font-size: 24px;
    text-decoration: none;
    flex: 1;
    text-align: center;
}

/* Botão Central Flutuante (Sirene) */
.bottom-nav .emergency-btn-wrapper {
    position: relative;
    top: -25px; /* Sobe o botão */
    display: flex;
    justify-content: center;
    align-items: center;
}

.bottom-nav .emergency-btn {
    width: 70px;
    height: 70px;
    background-color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 6px solid var(--bg-app); /* Cria o efeito vazado combinando com o fundo */
    color: var(--white);
    font-size: 28px;
    text-decoration: none;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

/* --- FORMULÁRIOS E INPUTS --- */
.form-container { padding: 0 20px; }

.input-group {
    position: relative;
    margin-bottom: 15px;
}

.input-group input, .input-group select {
    width: 100%;
    padding: 16px 20px;
    border: none;
    border-radius: var(--border-radius);
    background-color: var(--white);
    font-size: 15px;
    color: var(--text-dark);
    box-shadow: var(--shadow-sm);
    outline: none;
    appearance: none;
}

.input-group input::placeholder { color: #d0d0d0; }

.input-group .input-icon-right {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #d0d0d0;
    font-size: 14px;
    pointer-events: none;
}

.btn-primary {
    width: 100%;
    padding: 16px;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    margin-top: 10px;
    margin-bottom: 15px;
}

/* --- DASHBOARD GRID (09 Dashboard.png) --- */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    padding: 0 20px;
}

.dash-card {
    background-color: var(--white);
    border-radius: 15px;
    padding: 15px;
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    height: 160px;
}

.dash-card span {
    color: var(--text-dark);
    font-size: 14px;
    font-weight: 400;
    margin-bottom: 10px;
}

.dash-card img {
    width: 100%;
    max-height: 90px;
    object-fit: contain;
    margin-top: auto;
}

/* --- PERFIL / CARTEIRINHA (09 Dashboard - 1.png) --- */
.profile-banner {
    margin: 0 20px 20px 20px;
    background: url('../images/bg-perfil.jpg') center/cover; /* Usar imagem de fundo depois */
    background-color: var(--primary-color);
    border-radius: 15px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.profile-banner img.avatar {
    width: 80px;
    height: 80px;
    border-radius: 15px;
    object-fit: cover;
}

.profile-info h2 { color: var(--primary-color); font-size: 20px; font-weight: 700; margin-bottom: -2px;}
.profile-info .cid { color: var(--text-muted); font-size: 12px; margin-bottom: 5px; }
.profile-info .status { color: var(--primary-light); font-size: 22px; font-weight: 700; line-height: 1; }
.profile-info .status span { font-size: 12px; font-weight: 400; }

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 0 20px;
    margin-bottom: 20px;
}

.info-box {
    background: var(--white);
    padding: 10px 15px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

.info-box.full { grid-column: span 2; }
.info-box label { display: block; font-size: 10px; color: var(--text-muted); margin-bottom: 2px; }
.info-box p { font-size: 14px; color: var(--text-dark); font-weight: 400; }

.qr-container {
    background: var(--white);
    margin: 0 20px 30px 20px;
    padding: 20px;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    text-align: center;
}

.qr-container img { width: 100%; max-width: 250px; }