body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    background: #f5f7fa;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color: #333;
}

#telaInicial.ativa {
    display: block;
    max-width: 450px;
}


.tela {
    display: none;
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-width: 900px;
    width: 95%;
    margin: 20px 0;
}



.ativa {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.coluna-esquerda {
    flex: 1;
    min-width: 300px;
}

.coluna-direita {
    flex: 1;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

h2 {
    text-align: center;
    margin-bottom: 25px;
    color: #2c3e50;
    font-size: 24px;
    width: 100%;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #34495e;
    font-size: 14px;
}

input,
button,
select {
    width: 100%;
    margin: 5px 0 15px;
    padding: 12px 15px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-sizing: border-box;
    transition: all 0.3s;
}

input:focus,
select:focus {
    border-color: #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
    outline: none;
}

button {
    background-color: #4CAF50;
    color: white;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 10px;
}

button:hover {
    background-color: #45a049;
}

button.secondary {
    background-color: #3498db;
}

button.secondary:hover {
    background-color: #2980b9;
}

button.danger {
    background-color: #e74c3c;
}

button.danger:hover {
    background-color: #c0392b;
}

#painel {
    border: 1px solid #e0e0e0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 20px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.info-label {
    font-weight: 600;
    color: #7f8c8d;
}

.info-value {
    font-weight: 500;
    color: #2c3e50;
}

pre {
    background: #f0f3f4;
    padding: 15px;
    font-size: 14px;
    border-radius: 8px;
    overflow-x: auto;
    white-space: pre-wrap;
    margin-top: 0;
    flex-grow: 1;
    height: 200px;
}

#jsonLocal {
    overflow-y: auto;
    background: #f0f3f4;
    padding: 15px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.3s ease;
    border-radius: 8px;
}

#jsonLocal:hover {
    background: #e5e8e8;
}

.button-group {
    display: flex;
    gap: 10px;
    margin-top: 0;
}

.button-group button {
    flex: 1;
}

.validation-message {
    font-size: 14px;
    margin-top: -10px;
    margin-bottom: 10px;
    padding: 5px;
    border-radius: 4px;
    text-align: center;
}

.valid {
    background-color: #d4edda;
    color: #155724;
}

.invalid {
    background-color: #f8d7da;
    color: #721c24;
}

.embalagem-cheia {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 0, 0, 0.9);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 3rem;
    text-align: center;
    z-index: 2000;
    animation: piscar 0.5s linear 3;
    flex-direction: column;
}

.embalagem-cheia small {
    font-size: 1.5rem;
    margin-top: 20px;
}

.instrucoes {
    background-color: #f8f9fa;
    border-left: 4px solid #3498db;
    padding: 15px;
    border-radius: 0 8px 8px 0;
    flex-grow: 0;
}

.instrucoes h3 {
    margin-top: 0;
    color: #2c3e50;
}

.instrucoes ul {
    padding-left: 20px;
    margin-bottom: 0;
}

.instrucoes li {
    margin-bottom: 8px;
}

.comando-qr {
    display: inline-block;
    background-color: #e3f2fd;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    color: #0d47a1;
}

.historico-container {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.historico-container label {
    margin-bottom: 8px;
}

@keyframes piscar {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@media (max-width: 768px) {
    .ativa {
        flex-direction: column;
    }
    
    .coluna-esquerda, .coluna-direita {
        min-width: 100%;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    pre {
        height: 150px;
    }
}

.checklist-container {
    margin: 20px 0;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    background-color: #f9f9f9;
}

.checklist-item {
    display: flex;
    align-items: center;
    margin: 10px 0;
    font-size: 18px;
}

.check-icon {
    margin-right: 15px;
    font-size: 24px;
    width: 24px;
    display: inline-block;
    text-align: center;
}

.check-icon.checked {
    color: #4CAF50;
}

.info-box {
    background-color: #e8f5e9;
    padding: 10px;
    border-radius: 5px;
    margin-top: 20px;
    text-align: center;
}

.qr-input-container {
    margin: 20px 0;
}

.qr-input-container input {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    border: 2px solid #2196F3;
    border-radius: 4px;
    text-align: center;
}

.status-message {
    min-height: 24px;
    color: #2196F3;
    text-align: center;
    font-weight: bold;
    margin-top: 10px;
}

