:root {
    --bg: #f4f6f8;
    --card-bg: #ffffff;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --success: #16a34a;
    --success-hover: #15803d;
    --text: #1e293b;
    --border: #e2e8f0;
}

body {
    font-family: system-ui, -apple-system, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
}

.card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

h2 {
    margin-top: 0;
    font-size: 1.5rem;
    color: #0f172a;
}

.pantalla {
    background-color: #0f172a;
    color: #22c55e;
    font-family: monospace;
    font-size: 3rem;
    font-weight: bold;
    padding: 1rem;
    border-radius: 8px;
    margin: 1.5rem 0;
    letter-spacing: 2px;
}

.btn-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.btn {
    color: white;
    border: none;
    padding: 0.85rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
}

.btn-primary {
    background-color: var(--primary);
}
.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-success {
    background-color: var(--success);
}
.btn-success:hover {
    background-color: var(--success-hover);
}

.btn:disabled {
    background-color: #94a3b8;
    cursor: not-allowed;
    opacity: 0.7;
}

.status {
    margin-top: 1rem;
    font-size: 0.875rem;
    color: #64748b;
    min-height: 1.25rem;
}

.log {
    margin-top: 1rem;
    font-size: 0.75rem;
    color: #166534;
    background: #f0fdf4;
    padding: 0.5rem;
    border-radius: 4px;
    border: 1px solid #bbf7d0;
    display: none;
}














/* ==========================================
   ESTILOS BASE (Escritorio / Pantallas grandes)
   ========================================== */

/* Modal contenedor principal */
.modalBascula_container {
    display: none; /* Al activarse por JS suele ser 'flex' */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    z-index: 5999;
    flex-direction: column;
    align-items: center;
    justify-content: center; /* En escritorio se mantiene al centro */
    box-sizing: border-box;
}

/* Título */
.modalBascula_titulo {
    font-size: 30px;
    margin-bottom: 20px;
    text-align: center;
}

/* Sección de total a cobrar */
.modalBascula_totalGroup {
    margin: 20px 0;
    text-align: center;
    width: 100%;
}

.modalBascula_label {
    font-size: 24px;
    font-weight: bold;
}

.modalBascula_inputTotal {
    font-size: 60px;
    text-align: center;
    width: 300px;
    padding: 15px;
    margin-top: 10px;
    background-color: #f4f4f4;
    border: 2px solid #ccc;
    border-radius: 10px;
    box-sizing: border-box;
}

/* Grupo de botones */
.modalBascula_acciones {
    display: flex;
    gap: 20px;
    margin-top: 30px;
}

/* Estilo base para los botones */
.modalBascula_btn {
    padding: 20px 40px;
    font-size: 22px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    color: #ffffff;
    font-weight: bold;
    transition: opacity 0.2s ease;
}

.modalBascula_btn:active {
    opacity: 0.8;
}

/* Variantes de botones por tipo de acción */
.modalBascula_btn--peso {
    background-color: #007bff;
}

.modalBascula_btn--cobrar {
    background-color: #28a745;
}

.modalBascula_btn--reset {
    background-color: #ffc107;
    color: #000000;
}

.modalBascula_btn--salir {
    background-color: #dc3545;
}


/* ==========================================
   RESPONSIVO (Móviles - Hasta 768px)
   ========================================== */
@media (max-width: 768px) {
    .modalBascula_container {
        justify-content: flex-start; /* Alinea todo arriba */
        padding: 30px 15px 15px 15px; /* Espaciado superior para que respire */
        overflow-y: auto; /* Permite scroll si la pantalla es muy pequeña */
    }

    .modalBascula_titulo {
        font-size: 22px;
        margin-bottom: 10px;
    }

    .modalBascula_label {
        font-size: 18px;
    }

    .modalBascula_inputTotal {
        font-size: 42px;
        width: 100%;
        max-width: 280px;
        padding: 10px;
    }

    /* Botones a 2 columnas con CSS Grid */
    .modalBascula_acciones {
        display: grid;
        grid-template-columns: repeat(2, 1fr); /* 2 columnas iguales */
        gap: 12px;
        width: 100%;
        max-width: 400px;
        margin-top: 20px;
    }

    .modalBascula_btn {
        padding: 15px 10px;
        font-size: 16px;
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
    }
}