:root {
    --primary: #1e293b;
    --accent: #3b82f6;
    --bg: #f8fafc;
    --card: #ffffff;
    --text: #334155;
    --border: #e2e8f0;
}

* { box-sizing: border-box; font-family: 'Plus Jakarta Sans', sans-serif; margin: 0; padding: 0; }

body {
    background: 
        linear-gradient(rgba(248, 250, 252, 0.88), rgba(248, 250, 252, 0.88)),
        url('fundo.jpeg') no-repeat center center fixed;
    background-size: cover;
    color: var(--text);
    overflow-x: hidden;
    /* Impede zoom acidental no celular com duplo clique */
    touch-action: manipulation; 
}

/* Telas em Tela Cheia (Login e App) */
.fullscreen-tela {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    /* Fundo escuro semi-transparente elegante para a tela de PIN */
    background: rgba(30, 41, 59, 0.85);
    backdrop-filter: blur(5px);
}

.card-login {
    background: white;
    padding: 30px 20px;
    border-radius: 16px;
    width: 100%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}

.card-login h2 { color: var(--primary); margin-bottom: 10px; }
.card-login p { font-size: 0.9rem; color: #64748b; margin-bottom: 20px; }

/* Header Fixo do App */
.app-header {
    position: fixed; top: 0; left: 0; width: 100%;
    background: var(--primary); color: white;
    padding: 15px 20px;
    display: flex; justify-content: space-between; align-items: center;
    z-index: 50;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Lista de Recados e Cards */
.lista-scroll {
    margin-top: 70px; /* Espaço do header */
    padding: 15px;
    padding-bottom: 90px; /* Espaço do FAB */
}

.recado-card {
    background: white; border: 1px solid var(--border);
    border-radius: 12px; padding: 15px; margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
    position: relative;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Animação de deslizar para sumir (Swipe) */
.recado-card.swipe-out {
    transform: translateX(100%);
    opacity: 0;
}

.prio-baixa { color: #64748b; background: #f1f5f9; padding: 2px 6px; border-radius: 4px; font-size: 0.75rem; font-weight: bold; }
.prio-normal { color: #3b82f6; background: #eff6ff; padding: 2px 6px; border-radius: 4px; font-size: 0.75rem; font-weight: bold; }
.prio-alta { color: #ea580c; background: #fff7ed; padding: 2px 6px; border-radius: 4px; font-size: 0.75rem; font-weight: bold; }
.prio-altissima { color: #e11d48; background: #fff1f2; padding: 2px 6px; border-radius: 4px; font-size: 0.75rem; font-weight: bold; }

/* Botão Flutuante (FAB) */
.fab {
    position: fixed; bottom: 25px; right: 25px;
    width: 60px; height: 60px;
    background: var(--accent); color: white;
    border-radius: 50%; font-size: 2rem; border: none;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
    display: flex; justify-content: center; align-items: center;
    z-index: 90; cursor: pointer; transition: transform 0.1s;
}
.fab:active { transform: scale(0.9); }

/* Inputs e Botões Mobile */
.input-mobile {
    width: 100%; padding: 12px; font-size: 1rem;
    border: 1px solid #cbd5e1; border-radius: 8px; margin-bottom: 10px;
    background: #fff;
}
.text-center { text-align: center; letter-spacing: 5px; font-size: 1.2rem; font-weight: bold;}

.btn-mega { width: 100%; padding: 15px; font-size: 1rem; font-weight: bold; background: #059669; color: white; border: none; border-radius: 8px; cursor: pointer; }
.btn-refresh { background: rgba(255,255,255,0.2); color: white; border: none; padding: 8px 12px; border-radius: 6px; font-weight: bold; font-size: 0.85rem;}
.btn-outline { flex:1; background: transparent; border: 1px solid #cbd5e1; color: #475569; padding: 10px; border-radius: 6px; font-size: 0.85rem; font-weight: bold; }
.btn-close { background: transparent; border: none; font-size: 1.5rem; color: #94a3b8; }

/* Modais Mobile (Abrem de baixo pra cima) */
.modal-mobile {
    display: none; position: fixed; z-index: 1000; left: 0; top: 0;
    width: 100%; height: 100%; background: rgba(0,0,0,0.6);
    backdrop-filter: blur(2px);
}
.modal-content-mobile {
    position: absolute; bottom: 0; left: 0; width: 100%;
    background: white; padding: 25px 20px;
    border-radius: 20px 20px 0 0;
    animation: slideUp 0.3s ease-out;
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

.label-mobile { font-size: 0.85rem; font-weight: bold; color: #64748b; margin-bottom: 5px; display: block; }

/* Chips Destinatários */
.chip-container { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { background: #0d9488; color: white; padding: 6px 12px; border-radius: 15px; font-size: 0.85rem; font-weight: bold; display: flex; align-items: center; gap: 5px; }

/* Toast */
.toast {
    position: fixed; bottom: -100px; left: 50%; transform: translateX(-50%);
    background: #1e293b; color: white; padding: 12px 20px; border-radius: 20px;
    font-size: 0.9rem; transition: bottom 0.3s; z-index: 9999; box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
.toast.show { bottom: 30px; }
/* Emojis Mobile */
.emoji-grid-mob { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; padding: 10px; max-height: 150px; overflow-y: auto; background: #fff; }
.emoji-item-mob { cursor: pointer; font-size: 1.3rem; text-align: center; user-select: none; }
.emoji-item-mob:active { transform: scale(1.3); background: #f1f5f9; border-radius: 4px; }