body {
    background-color: #f8faf6;
    font-family: 'Roboto', Arial, sans-serif;
    color: #3d4631;
    padding-top: 56px;
    font-size: 1.07rem;
    line-height: 1.6;
    min-height: 100vh;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: #556b2f;
    font-weight: 700;
    letter-spacing: 0.7px;
    margin-bottom: 0.7em;
}

.form-container,
.card {
    border: 1.5px solid #b7c7a3;
    background: #fff;
    padding: 36px 32px;
    border-radius: 14px;
    box-shadow: 0 6px 32px rgba(107, 142, 35, 0.10);
}

button,
.btn-primary {
    background: linear-gradient(90deg, #8a9a5b 0%, #556b2f 100%);
    border: none;
    color: #fff;
    font-weight: 600;
    letter-spacing: 0.6px;
    border-radius: 7px;
    transition: background 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(107, 142, 35, 0.10);
    padding: 0.7em 2.2em;
}

button:hover,
.btn-primary:hover {
    background: linear-gradient(90deg, #556b2f 0%, #8a9a5b 100%);
    color: #fff;
    box-shadow: 0 6px 18px rgba(107, 142, 35, 0.15);
}

input.form-control,
select.form-control,
textarea.form-control {
    border: 1.5px solid #b7c7a3;
    border-radius: 7px;
    padding: 0.55em 1em;
    font-size: 1.05rem;
    background: #f9fbf4;
    transition: border 0.2s, box-shadow 0.2s;
}

input.form-control:focus,
select.form-control:focus,
textarea.form-control:focus {
    border-color: #8a9a5b;
    box-shadow: 0 0 0 2px rgba(138, 154, 91, 0.13);
    background: #fff;
}

label,
.col-form-label {
    font-weight: 700;
    color: #556b2f;
    margin-bottom: 0.3em;
    letter-spacing: 0.2px;
}

.tutorial {
    margin-top: 30px;
}

.hero-section {
    background: linear-gradient(120deg, #b7c7a3 0%, #8a9a5b 100%), url('/static/images/hero.png') no-repeat center center;
    background-size: cover;
    color: #fff;
    padding: 80px 0 60px 0;
    border-radius: 0 0 22px 22px;
    box-shadow: 0 8px 32px rgba(107, 142, 35, 0.10);
}

.hero-content h1 {
    font-size: 3.4rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 0.5em;
    letter-spacing: 1px;
}

.hero-content p {
    font-size: 1.3rem;
    color: #e6eedd;
    font-weight: 400;
}

.card {
    border: 1.5px solid #b7c7a3;
    border-radius: 14px;
    transition: transform 0.3s ease, box-shadow 0.3s;
    box-shadow: 0 2px 16px rgba(107, 142, 35, 0.09);
    background: #fff;
}

.card:hover {
    transform: translateY(-8px) scale(1.012);
    box-shadow: 0 10px 36px rgba(107, 142, 35, 0.17);
}

.card-title {
    font-size: 1.45rem;
    font-weight: 700;
    color: #556b2f;
}

.card-text {
    font-size: 1.07rem;
    color: #6e7c4b;
}

.btn-primary {
    background: linear-gradient(90deg, #8a9a5b 0%, #556b2f 100%);
    border: none;
    color: #fff;
}

.btn-primary:hover {
    background: linear-gradient(90deg, #556b2f 0%, #8a9a5b 100%);
    color: #fff;
}

.container {
    margin-top: 44px;
    border: none;
}

.pricing-section .card {
    border: 2px solid #8a9a5b;
}

footer {
    color: #fff;
    background: #556b2f;
    padding: 32px 0 16px 0;
    font-size: 1.12rem;
    letter-spacing: 0.6px;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    box-shadow: 0 -4px 18px rgba(107, 142, 35, 0.10);
}

footer p {
    margin: 0;
}

.navbar {
    background-color: #556b2f;
    box-shadow: 0 6px 18px rgba(107, 142, 35, 0.10);
    border-bottom-left-radius: 14px;
    border-bottom-right-radius: 14px;
}

.navbar-brand,
.navbar-nav .nav-link {
    color: #fff !important;
    font-weight: 600;
    letter-spacing: 0.6px;
}

.navbar-brand:hover,
.navbar-nav .nav-link:hover {
    color: #e6eedd !important;
}

.messages .alert {
    border-radius: 9px;
    font-size: 1.05rem;
    padding: 0.85em 1.7em;
    margin-bottom: 0.8em;
}

.messages .alert-success {
    background: #eaf7e6;
    color: #5c7d3a;
    border: 1.5px solid #b7e4c7;
}

.messages .alert-danger {
    background: #f9f6ea;
    color: #a67c52;
    border: 1.5px solid #e4d6b7;
}

/* Table styling for product lists */
table.table {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(107, 142, 35, 0.06);
}

table.table th {
    background: linear-gradient(90deg, #8a9a5b 0%, #556b2f 100%);
    color: #fff;
    font-weight: 700;
    border-bottom: 2.5px solid #556b2f;
    font-size: 1.12rem;
    letter-spacing: 0.35px;
}

table.table td {
    color: #3d4631;
    vertical-align: middle;
    font-size: 1.05rem;
    padding: 0.8em 1em;
}

@media (max-width: 768px) {
    .container {
        padding: 12px 3px;
        margin-top: 20px;
    }

    .form-container,
    .card {
        padding: 14px 6px;
    }

    .hero-content h1 {
        font-size: 2.2rem;
    }
}

@media (max-width: 576px) {
    .dropdown-menu {
        right: 0;
        left: auto;
    }
}

#btn-finalizar:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.is-invalid {
    border: 2px solid red !important;
}

#imprimir_btns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 0.5rem;
    width: 100%;
}

.imprimir-btn {
    background: #8a9a5b !important;
    border: 2px solid #000 !important;
    color: #000 !important;
    padding: 0.6rem;
    font-weight: 500;
    border-radius: 0.5rem;
    transition: all 0.2s ease-in-out;
    cursor: pointer;
    text-align: center;
    white-space: normal;
    word-wrap: break-word;
    font-size: 0.9rem;
}

/* Hover */
.imprimir-btn:hover {
    background-color: #a6b875 !important;
    transform: translateY(-3px);
}

/* Activo */
.imprimir-btn.active,
.imprimir-btn:active {
    background-color: #FFA500 !important;
    border-color: #000 !important;
    color: #000 !important;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    transform: translateY(-5px);
}

/* 📱 Responsive */
@media (max-width: 768px) {
    #imprimir_btns {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    }
    .imprimir-btn {
        font-size: 0.8rem;
        padding: 0.5rem;
    }
}

@media (max-width: 480px) {
    #imprimir_btns {
        grid-template-columns: repeat(2, 1fr);
    }
    .imprimir-btn {
        font-size: 0.75rem;
        padding: 0.4rem;
    }
}

#formas_pago_btns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); /* ancho mínimo más cómodo */
    gap: 0.5rem;
    width: 100%;
}

.forma-pago-btn {
    background: #8a9a5b !important;
    border: 2px solid #000 !important;
    color: #000 !important;
    padding: 0.6rem;
    font-weight: 500;
    border-radius: 0.5rem;
    transition: all 0.2s ease-in-out;
    cursor: pointer;
    text-align: center;
    white-space: normal;   /* 👈 permite saltos de línea */
    word-wrap: break-word; /* 👈 divide si es muy largo */
    font-size: 0.9rem;     /* fuente un poco más chica */
}

/* Hover */
.forma-pago-btn:hover {
    color: #000;
    transform: translateY(-3px);
}

/* Activo */
.forma-pago-btn.active {
    background-color: #FFA500 !important;
    border-color: #000 !important;
    color: #000 !important;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    transform: translateY(-5px);
}

/* 📱 Responsive */
@media (max-width: 768px) {
    #formas_pago_btns {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    }
    .forma-pago-btn {
        font-size: 0.8rem;
        padding: 0.5rem;
    }
}

@media (max-width: 480px) {
    #formas_pago_btns {
        grid-template-columns: repeat(2, 1fr); /* 2 por fila en celus */
    }
    .forma-pago-btn {
        font-size: 0.75rem;
        padding: 0.4rem;
    }
}

#tabla-articulos th, 
#tabla-articulos td {
  white-space: nowrap;   /* evita que se corten en varias líneas */
  font-size: 0.85rem;    /* achica fuente en pantallas chicas */
  padding: 0.4rem;       /* achica espaciado */
}

@media (max-width: 768px) {
  #tabla-articulos th,
  #tabla-articulos td {
    font-size: 0.75rem;  /* aún más chico en celulares */
    padding: 0.3rem;
  }
}
/* overlay  */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}



/* Contenedor de botones */
#clientes_cc_btns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 0.5rem;
    width: 100%;
}
/* Botón individual */
.cliente-cc-btn {
    background: #afc767 !important;
    border: 2px solid #000 !important;
    color: #000 !important;
    padding: 0.6rem;
    font-weight: 500;
    border-radius: 0.5rem;
    transition: all 0.2s ease-in-out;
    cursor: pointer;
    text-align: center;
    white-space: normal;
    word-wrap: break-word;
    font-size: 0.9rem;
}

/* Hover */
.cliente-cc-btn:hover {
    color: #000;
    transform: translateY(-3px);
}

/* Activo */
.cliente-cc-btn.active {
        background-color: #ffcf75 !important;
    border-color: #000 !important;
    color: #000 !important;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    transform: translateY(-5px);
}

/* 📱 Responsive */
@media (max-width: 768px) {
    #clientes_cc_btns {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    }
    .cliente-cc-btn {
        font-size: 0.8rem;
        padding: 0.5rem;
    }
}

@media (max-width: 480px) {
    #clientes_cc_btns {
        grid-template-columns: repeat(2, 1fr);
    }
    .cliente-cc-btn {
        font-size: 0.75rem;
        padding: 0.4rem;
    }
}


/* CSS PARA ENTREGAS CUENTA CORRIENTE */
/* =================== TUS BOTONES PERSONALIZADOS =================== */
.forma-pago-btn1,
.cliente-cc-btn1,
.imprimir-btn1 {
    background: #8a9a5b; /* Tu verde militar */
    border: 2px solid #000;
    color: #fff !important; /* Texto blanco para que resalte */
    padding: 0.8rem 0.5rem;
    font-weight: 600;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    font-size: 0.75rem;
    line-height: 1.2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.forma-pago-btn1:hover, .cliente-cc-btn1:hover, .imprimir-btn1:hover {
    background: #6b7a44;
    color: white;
}

.forma-pago-btn1.active,
.cliente-cc-btn1.active,
.imprimir-btn1.active {
    background: #FFA500 !important; /* Tu naranja */
    color: #000 !important;
    transform: translateY(-4px);
    box-shadow: 0 5px 10px rgba(0,0,0,0.2);
    border-color: #000;
}

/* =================== GRILLAS =================== */
#formas_pago_btns1,
#clientes_cc_btns1,
#imprimir_btns1 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.6rem;
}

/* =================== TABLA =================== */
#tabla-articulos1 th {
    background-color: #f8f9fa;
    color: #333;
    font-weight: 700;
}

#tabla-articulos1 th,
#tabla-articulos1 td {
    font-size: 0.85rem;
    padding: 0.6rem 0.4rem;
    white-space: nowrap;
}

/* =================== SUGERENCIAS DNI =================== */
#sugerencias_dni1 {
    border: 1px solid #000;
    max-height: 200px;
    overflow-y: auto;
    display: none;
    position: absolute;
    background: white;
    width: 85%; /* Ajustado al ancho del input */
    list-style: none;
    padding-left: 0;
    z-index: 1050;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

#sugerencias_dni1 li {
    padding: 10px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}

#sugerencias_dni1 li:hover {
    background: #FFA500;
    color: #000;
}

/* Estilo para el botón de registrar de Bootstrap para que no desentone */
.btn-success1 {
    background-color: #28a745 !important;
    color: #eee;
    border: 2px solid #000 !important;
}

/* overlay  */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* CSS PARA ELEGIR SUCURSALES ANTES DE TOMAR EL PEDIDO */

/* =================== BOTONES BASE =================== */
.forma-pago-btn-sucursal {
    background: #8a9a5b;
    border: 2px solid #000;
    color: #fff !important;
    padding: 1rem 0.75rem;
    font-weight: 600;
    border-radius: 0.6rem;
    cursor: pointer;
    transition: all 0.25s ease;
    text-transform: uppercase;
    font-size: 0.8rem;
    line-height: 1.2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

/* Hover elegante */
.forma-pago-btn-sucursal:hover {
    background: #6b7a44;
    transform: translateY(-3px);
    box-shadow: 0 10px 18px rgba(0,0,0,0.18);
}

/* =================== BOTÓN SUCURSAL =================== */
.sucursal-btn-sucursal {
    min-height: 120px;
    gap: 0.4rem;
    position: relative;
}

.sucursal-btn-sucursal i {
    font-size: 1.6rem;
}

.sucursal-btn-sucursal::after {
    font-size: 0.65rem;
    letter-spacing: 1px;
    opacity: 0.85;
}

/* =================== CARD CONTENEDORA =================== */
.sucursal-card-sucursal {
    background: #fdfdfb;
    border: 2px solid #000;
    border-radius: 0.8rem;
    padding: 2rem 1.5rem;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

/* =================== GRILLA =================== */
#sucursales_btns-sucursal {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.2rem;
}

/* =================== OVERLAY =================== */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#overlay-sucursal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    justify-content: center;
    align-items: center;
    z-index: 9999;
}
