/* ==========================================================================
   CONFIGURAÇÕES GERAIS DO SISTEMA
   ========================================================================== */
body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background-color: #f4f7f6;
    margin: 0;
    padding: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 85vh;
}

/* ==========================================================================
   CAIXA CONTAINER PRINCIPAL DE TODAS AS TELAS (LOGIN, CADASTRO, SUCESSO)
   ========================================================================== */
.container {
    width: 100%;
    max-width: 450px;
    background: white;
    padding: 40px 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    text-align: center;
    box-sizing: border-box;
}

/* CONTAINER EXTENDIDO PARA O RELATÓRIO DO CHEFE */
.container-larga {
    max-width: 1100px;
}

h2 {
    color: #2c3e50;
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 26px;
}

p {
    color: #7f8c8d;
    margin-bottom: 25px;
    font-size: 15px;
}

/* ==========================================================================
   ESTILOS DE CAMPOS DE FORMULÁRIO (TELA DE LOGIN E CADASTRO)
   ========================================================================== */
.input-group {
    margin-bottom: 20px;
    text-align: left;
}

.input-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: bold;
    color: #34495e;
    font-size: 14px;
}

.input-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #cccccc;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 16px;
    transition: border 0.3s;
}

.input-group input:focus {
    border-color: #3498db;
    outline: none;
}

/* ==========================================================================
   ESTILOS DOS BOTÕES DO SISTEMA
   ========================================================================== */
.btn {
    border: none;
    padding: 14px 20px;
    font-size: 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    width: 100%;
    transition: background 0.2s;
    box-sizing: border-box;
}

.btn-azul {
    background-color: #3498db;
    color: white;
}

.btn-azul:hover {
    background-color: #2980b9;
}

.btn-verde {
    background-color: #2ecc71;
    color: white;
    font-size: 18px;
    padding: 18px;
}

.btn-verde:hover {
    background-color: #27ae60;
}

/* ==========================================================================
   CAIXAS DE MENSAGENS, ALERTAS E ERROS
   ========================================================================== */
.erro-msg {
    background-color: #fde8e8;
    color: #e74c3c;
    border: 1px solid #f8b4b4;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-weight: bold;
    font-size: 14px;
}

.sucesso-msg {
    background-color: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-weight: bold;
    font-size: 14px;
}

#status {
    margin-top: 20px;
    font-weight: bold;
    font-size: 15px;
    line-height: 1.5;
}

/* ==========================================================================
   LINKS E MENU DE NAVEGAÇÃO SUPERIOR
   ========================================================================== */
.btn-sair {
    display: inline-block;
    margin-top: 25px;
    color: #e74c3c;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.btn-sair:hover {
    text-decoration: underline;
}

.nav-links {
    margin-bottom: 20px;
    text-align: right;
    width: 100%;
}

.nav-links a {
    text-decoration: none;
    color: #3498db;
    font-weight: bold;
    margin-left: 15px;
    font-size: 14px;
}

/* ==========================================================================
   CAIXA VISUAL DA WEBCAM / CÂMERA
   ========================================================================== */
#camera-box {
    width: 100%;
    max-width: 320px;
    height: 240px;
    background: #2c3e50;
    margin: 20px auto;
    border-radius: 8px;
    overflow: hidden;
    border: 3px solid #bdc3c7;
    transform: scaleX(-1);
}

video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

canvas {
    display: none;
}

/* ==========================================================================
   TABELA ADMINISTRATIVA (TELA DE RELATÓRIO)
   ========================================================================== */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: white;
}

th, td {
    padding: 14px 15px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
    font-size: 14px;
}

th {
    background-color: #34495e;
    color: white;
    font-weight: 600;
}

tr:hover {
    background-color: #f8fafc;
}

.btn-mapa {
    background-color: #1abc9c;
    color: white;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: bold;
    display: inline-block;
}

.btn-mapa:hover {
    background-color: #16a085;
}

/* ==========================================================================
   CLASSES DE SUPORTE PARA A TELA DE SUCESSO DO PONTO
   ========================================================================== */
.titulo-sucesso {
    color: #2ecc71;
}

.titulo-erro {
    color: #e74c3c;
}

.caixa-info-ponto {
    text-align: left;
    margin: 20px 0;
    background: #f8fafc;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.caixa-info-ponto p {
    margin: 5px 0;
    color: #34495e;
    font-size: 14px;
}

.bloco-foto-auditoria {
    margin-bottom: 20px;
}

.bloco-foto-auditoria span {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
    color: #34495e;
    font-size: 14px;
}

.foto-comprovante {
    width: 100%;
    max-width: 180px;
    height: 135px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #bdc3c7;
}

.btn-link-bloco {
    text-decoration: none;
    display: block;
    line-height: 1.2;
}

/* ==========================================================================
   🆕 ESTRUTURA PARA MODO APP NATIVO (BASEADO NO PONTOTEL)
   ========================================================================== */
.app-body {
    background-color: #f7f9fa;
    margin: 0;
    padding: 0;
    display: block;
}

.app-container {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    background: #ffffff;
    min-height: 100vh;
    position: relative;
    padding-bottom: 80px; /* Evita que o menu inferior cubra o conteúdo */
    box-sizing: border-box;
    box-shadow: 0 0 20px rgba(0,0,0,0.05);
}

/* TOPO DO APP */
.app-header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid #edf2f7;
    background: #ffffff;
}

.app-logo {
    font-size: 20px;
    font-weight: bold;
    color: #2c3e50;
    letter-spacing: 1px;
}

/* CARTÃO CENTRAL DE BATIDA DE PONTO (IDÊNTICO À IMAGEM 3) */
.card-ponto {
    background: #fff8e7; /* Tom amarelado pastel exato do app original */
    border: 3px solid #f39c12;
    border-radius: 24px;
    margin: 30px 20px;
    padding: 40px 20px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(243, 156, 18, 0.15);
    cursor: pointer;
    transition: transform 0.1s;
}

.card-ponto:active {
    transform: scale(0.98);
}

.icone-relogio {
    font-size: 50px;
    margin-bottom: 15px;
    display: inline-block;
}

.texto-bater-ponto {
    font-size: 28px;
    font-weight: 500;
    color: #2c3e50;
    margin: 10px 0;
}

.relogio-digital {
    font-size: 42px;
    font-weight: bold;
    color: #1a1a1a;
    font-family: monospace;
    margin-top: 10px;
}

/* MENU INFERIOR FIXO DE ABAS (IDÊNTICO ÀS IMAGENS 1 E 2) */
.menu-inferior {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-width: 480px;
    margin: 0 auto;
    background: #ffffff;
    height: 65px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 999;
}

.aba-item {
    text-decoration: none;
    color: #718096;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 11px;
    font-weight: bold;
    gap: 4px;
    flex: 1;
}

.aba-item.ativa {
    color: #9b59b6; /* Tom roxo exato da aba selecionada nos prints */
}

.aba-icone {
    font-size: 22px;
}

/* ==========================================================================
   🆕 LINHA DO TEMPO / HISTÓRICO DE AUDITORIA (IDÊNTICO À IMAGEM 4)
   ========================================================================== */
.historico-container {
    padding: 20px;
    text-align: left;
}

.timeline {
    position: relative;
    padding-left: 30px;
    list-style: none;
    margin-top: 20px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 9px;
    top: 5px;
    bottom: 5px;
    width: 3px;
    background: #1a1a1a; /* Linha vertical escura do aplicativo */
}

.timeline-item {
    position: relative;
    margin-bottom: 25px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -26px;
    top: 4px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #ffffff;
    border: 3px solid #1a1a1a;
}

.timeline-data {
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 10px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 5px;
}

.badge-ponto {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: bold;
    border: 1px solid #ccc;
    background: #f8fafc;
}

.badge-entrada { background: #e8f8f5; color: #117a65; border-color: #a3e4d7; }
.badge-saida { background: #fdf2e9; color: #b9770e; border-color: #f5cba7; }
