/* Estilos globais */
body { 
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; 
    margin: 0; 
    padding: 0; 
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh; 
    color: #333;
}

.pagina { 
    display: none; 
    min-height: 100vh;
}

.pagina.ativa { 
    display: block; 
}

h1 { 
    text-align: center; 
    color: #333; 
    margin-bottom: 20px; 
    font-weight: 600;
}

button { 
    padding: 8px 12px; 
    border: none; 
    border-radius: 5px; 
    cursor: pointer; 
    font-size: 14px;
    transition: all 0.3s ease;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

button:active {
    transform: translateY(0);
}

input { 
    padding: 10px; 
    border: 1px solid #ccc; 
    border-radius: 5px;
    transition: border-color 0.3s ease;
}

input:focus {
    outline: none;
    border-color: #667eea;
}

/* Grid para listagens */
.grid { 
    display: grid; 
    grid-template-columns: 1fr; 
    gap: 8px; 
    max-height: 65vh; 
    overflow-y: auto; 
    padding: 12px; 
}

.linha { 
    background: white; 
    padding: 12px; 
    border-radius: 8px; 
    display: flex; 
    justify-content: space-between;
    align-items: center;
    gap: 8px; 
    border: 1px solid #ddd; 
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    min-height: 60px; 
}

.linha .info {
    flex: 1;
    line-height: 1.4;
}

.linha .info span {
    display: inline;
    margin-bottom: 4px;
    margin-right: 12px;
    color: #333;
    font-size: 15px;
    font-weight: bold;
    line-height: 1.5;
    white-space: nowrap;
}

/* Permite quebra de linha apenas em campos específicos */
.linha .info span.wrap-text {
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    display: block;
    max-width: 100%;
}

.linha .info span::before {
    content: attr(data-label) ": ";
    font-weight: normal;
    color: #666;
    margin-right: 4px;
}

.linha .info span:after {
    content: "\A";
    white-space: pre;
}

.linha .botoes { 
    display: flex; 
    flex-direction: column;
    gap: 5px; 
    align-self: flex-end;
    min-width: 100px;
}

/* Botões de ação */
.ativar { 
    background: #4CAF50; 
    color: white; 
}

.remover { 
    background: #f44336; 
    color: white; 
}

.desativar { 
    background: #FF9800; 
    color: white; 
}

.pagar { 
    background: #4CAF50; 
    color: white; 
}

.cancelar { 
    background: #f44336; 
    color: white; 
}

/* Rodapé das páginas */
.rodape {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #ddd;
}

.btn-voltar {
    background: #6c757d; 
    color: white; 
    padding: 12px 16px;
    font-weight: bold;
    border: 1px solid #5a6268;
}

.btn-recarregar {
    background: #007AFF; 
    color: white; 
    padding: 12px 16px;
    font-weight: bold;
    border: 1px solid #0056b3;
    border-radius: 5px;
    cursor: pointer;
}

/* Indicador de status offline */
.status-offline {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: #f44336;
    color: white;
    text-align: center;
    padding: 8px 0;
    font-size: 14px;
    font-weight: bold;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.status-offline::before {
    content: '● ';
    font-size: 18px;
}

.status-offline.ativo {
    display: block;
}
