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

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

.form-container,
.card {
    border: 1.5px solid #d1e3f6;
    background: #fff;
    padding: 36px 32px;
    border-radius: 14px;
    box-shadow: 0 6px 32px rgba(21, 58, 91, 0.10);
}

button,
.btn-primary {
    background: linear-gradient(90deg, #2073c5 0%, #17406d 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(32, 115, 197, 0.10);
    padding: 0.7em 2.2em;
}

button:hover,
.btn-primary:hover {
    background: linear-gradient(90deg, #17406d 0%, #2073c5 100%);
    color: #fff;
    box-shadow: 0 6px 18px rgba(32, 115, 197, 0.15);
}

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

input.form-control:focus,
select.form-control:focus,
textarea.form-control:focus {
    border-color: #2073c5;
    box-shadow: 0 0 0 2px rgba(32, 115, 197, 0.13);
    background: #fff;
}

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

.tutorial {
    margin-top: 30px;
}

.hero-section {
    background: linear-gradient(120deg, #2073c5 0%, #17406d 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(21, 58, 91, 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: #e3eaf2;
    font-weight: 400;
}

.card {
    border: 1.5px solid #d1e3f6;
    border-radius: 14px;
    transition: transform 0.3s ease, box-shadow 0.3s;
    box-shadow: 0 2px 16px rgba(32, 115, 197, 0.09);
    background: #fff;
}

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

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

.card-text {
    font-size: 1.07rem;
    color: #4a5a6a;
}

.btn-primary {
    background: linear-gradient(90deg, #2073c5 0%, #17406d 100%);
    border: none;
    color: #fff;
}

.btn-primary:hover {
    background: linear-gradient(90deg, #17406d 0%, #2073c5 100%);
    color: #fff;
}

.container {

    margin-top: 44px;
    border: none;
}

.pricing-section .card {
    border: 2px solid #2073c5;
}

footer {
    color: #fff;
    background: #153a5b;
    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(21, 58, 91, 0.10);
}

footer p {
    margin: 0;
}

.navbar {
    background-color: #153a5b;
    box-shadow: 0 6px 18px rgba(21, 58, 91, 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: #b3d1f3 !important;
}

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

.messages .alert-success {
    background: #e6f7ee;
    color: #207c3c;
    border: 1.5px solid #b7e4c7;
}

.messages .alert-danger {
    background: #fbeaea;
    color: #c52c2c;
    border: 1.5px solid #f5bcbc;
}

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

table.table th {
    background: linear-gradient(90deg, #2073c5 0%, #17406d 100%);
    color: #fff;
    font-weight: 700;
    border-bottom: 2.5px solid #153a5b;
    font-size: 1.12rem;
    letter-spacing: 0.35px;
}

table.table td {
    color: #1a2634;
    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;
    }
}
/* =========================================================
   ESTILOS GENERALES Y RESET - TEMA PROFESIONAL AZUL
========================================================= */
#btn-finalizar:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.is-invalid {
    border: 2px solid #c52c2c !important; /* Rojo profesional */
}

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

.imprimir-btn {
    background: #ffffff !important;
    border: 2px solid #d1e3f6 !important;
    color: #153a5b !important;
    padding: 0.6rem;
    font-weight: 600;
    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;
    box-shadow: 0 2px 4px rgba(21, 58, 91, 0.05);
}

.imprimir-btn:hover {
    background-color: #f0f7ff !important;
    border-color: #2073c5 !important;
    transform: translateY(-3px);
}

.imprimir-btn.active,
.imprimir-btn:active {
    background: linear-gradient(90deg, #2073c5 0%, #17406d 100%) !important;
    border-color: #153a5b !important;
    color: #ffffff !important;
    box-shadow: 0 4px 10px rgba(32, 115, 197, 0.25);
    transform: translateY(-5px);
}

/* 📱 Responsive Imprimir */
@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;
    }
}

/* =========================================================
   GRILLA DE BOTONES (FORMAS DE PAGO)
========================================================= */
#formas_pago_btns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 0.5rem;
    width: 100%;
}

.forma-pago-btn {
    background: #ffffff !important;
    border: 2px solid #d1e3f6 !important;
    color: #153a5b !important;
    padding: 0.6rem;
    font-weight: 600;
    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;
}

.forma-pago-btn:hover {
    background-color: #f0f7ff !important;
    border-color: #2073c5 !important;
    transform: translateY(-3px);
}

.forma-pago-btn.active {
    background: linear-gradient(90deg, #2073c5 0%, #17406d 100%) !important;
    border-color: #153a5b !important;
    color: #ffffff !important;
    box-shadow: 0 4px 10px rgba(32, 115, 197, 0.25);
    transform: translateY(-5px);
}

/* 📱 Responsive Pagos */
@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);
    }
    .forma-pago-btn {
        font-size: 0.75rem;
        padding: 0.4rem;
    }
}

/* =========================================================
   TABLAS DE ARTÍCULOS
========================================================= */
#tabla-articulos th, 
#tabla-articulos td {
  white-space: nowrap;
  font-size: 0.85rem;
  padding: 0.4rem;
}

#tabla-articulos th {
    background-color: #f7fafd;
    color: #153a5b;
    border-bottom: 2px solid #2073c5;
}

@media (max-width: 768px) {
  #tabla-articulos th,
  #tabla-articulos td {
    font-size: 0.75rem;
    padding: 0.3rem;
  }
}

/* =========================================================
   CLIENTES CUENTA CORRIENTE (CC)
========================================================= */
#clientes_cc_btns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 0.5rem;
    width: 100%;
}

.cliente-cc-btn {
    background: #fdfdfd !important;
    border: 2px solid #d1e3f6 !important;
    color: #153a5b !important;
    padding: 0.6rem;
    font-weight: 600;
    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;
}

.cliente-cc-btn:hover {
    background-color: #f0f7ff !important;
    transform: translateY(-3px);
}

.cliente-cc-btn.active {
    background: linear-gradient(90deg, #17406d 0%, #153a5b 100%) !important;
    border-color: #153a5b !important;
    color: #ffffff !important;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    transform: translateY(-5px);
}

/* 📱 Responsive Clientes */
@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);
    }
}

/* =========================================================
   ENTREGAS CUENTA CORRIENTE (Estilos con el "1")
========================================================= */
.forma-pago-btn1,
.cliente-cc-btn1,
.imprimir-btn1 {
    background: #ffffff;
    border: 2px solid #d1e3f6;
    color: #153a5b !important;
    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: #f0f7ff;
    border-color: #2073c5;
}

.forma-pago-btn1.active,
.cliente-cc-btn1.active,
.imprimir-btn1.active {
    background: #153a5b !important;
    color: #ffffff !important;
    transform: translateY(-4px);
    box-shadow: 0 5px 10px rgba(0,0,0,0.15);
    border-color: #153a5b;
}

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

#tabla-articulos1 th {
    background-color: #153a5b;
    color: #ffffff;
    font-weight: 700;
}

#tabla-articulos1 th,
#tabla-articulos1 td {
    font-size: 0.85rem;
    padding: 0.6rem 0.4rem;
    white-space: nowrap;
    border-bottom: 1px solid #d1e3f6;
}

/* =================== SUGERENCIAS DNI =================== */
#sugerencias_dni1 {
    border: 1px solid #153a5b;
    max-height: 200px;
    overflow-y: auto;
    display: none;
    position: absolute;
    background: white;
    width: 85%;
    list-style: none;
    padding-left: 0;
    z-index: 1050;
    box-shadow: 0 4px 12px rgba(21, 58, 91, 0.15);
}

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

#sugerencias_dni1 li:hover {
    background: #2073c5;
    color: #ffffff;
}

.btn-success1 {
    background-color: #2073c5 !important;
    color: #ffffff;
    border: 2px solid #153a5b !important;
}

/* =========================================================
   SUCURSALES
========================================================= */
.forma-pago-btn-sucursal {
    background: linear-gradient(90deg, #2073c5 0%, #17406d 100%);
    border: 1px solid #153a5b;
    color: #ffffff !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;
}

.forma-pago-btn-sucursal:hover {
    background: linear-gradient(90deg, #17406d 0%, #2073c5 100%);
    transform: translateY(-3px);
    box-shadow: 0 10px 18px rgba(32, 115, 197, 0.2);
}

.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.9;
}

.sucursal-card-sucursal {
    background: #ffffff;
    border: 1px solid #d1e3f6;
    border-radius: 0.8rem;
    padding: 2rem 1.5rem;
    box-shadow: 0 8px 20px rgba(21, 58, 91, 0.08);
}

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

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

#overlay-sucursal, #overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(21, 58, 91, 0.85); /* Azul profundo translúcido */
    justify-content: center;
    align-items: center;
    z-index: 9999;
}