﻿* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    background: #f4f6fb;
    color: #1f2937;
}

.login-body {
    min-height: 100vh;
    background: linear-gradient(135deg, #0f172a, #1d4ed8);
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    width: 390px;
    background: #fff;
    border-radius: 22px;
    padding: 35px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.25);
}

.login-logo {
    width: 70px;
    height: 70px;
    border-radius: 20px;
    background: #2563eb;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    font-weight: 800;
    margin: 0 auto 15px;
}

.login-card h3 {
    text-align: center;
    font-weight: 800;
    margin-bottom: 5px;
}

.login-card p {
    text-align: center;
    color: #64748b;
    margin-bottom: 25px;
}

.login-footer {
    margin-top: 20px;
    text-align: center;
    font-size: 13px;
    color: #64748b;
}

/* SIDEBAR */

.sidebar {
    width: 230px;
    background: #071633;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    padding: 18px 14px;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 10px;
}

.sidebar .brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 25px;
    color: white;
}

.brand-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
}

.brand h4 {
    margin: 0;
    font-weight: 800;
}

.brand small {
    color: #cbd5e1;
}

.sidebar a {
    display: block;
    color: #e5e7eb;
    text-decoration: none;
    padding: 10px 14px;
    margin-bottom: 5px;
    border-radius: 10px;
    transition: 0.2s;
    font-size: 14px;
}

.sidebar a:hover,
.sidebar a.active {
    background: #2563eb;
    color: white;
}

/* MENU DESPLEGABLE */

.menu-group {
    margin-bottom: 8px;
}

.menu-title {
    width: 100%;
    background: #0f244a;
    border: 1px solid #1e3a8a;
    color: #f8fafc;
    text-align: left;
    padding: 11px 14px;
    font-size: 14px;
    font-weight: 800;
    border-radius: 12px;
    cursor: pointer;
    margin-bottom: 5px;
}

.menu-title:hover {
    background: #1d4ed8;
    color: white;
}

.submenu {
    display: none;
    padding-left: 10px;
    margin-bottom: 8px;
}

.submenu.show {
    display: block;
}

.submenu a {
    display: block;
    color: #cbd5e1;
    text-decoration: none;
    padding: 8px 12px;
    margin: 3px 0;
    border-radius: 9px;
    font-size: 13px;
}

.submenu a:hover,
.submenu a.active {
    background: #2563eb;
    color: white;
}

/* MAIN */

.main {
    margin-left: 230px;
    min-height: 100vh;
    background: #eef1f7;
}

.topbar {
    background: white;
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #ddd;
}

.topbar h5 {
    margin: 0;
    font-weight: 800;
}

.topbar small {
    color: #64748b;
}

.content {
    padding: 25px;
}

.page-title {
    font-weight: 800;
    margin-bottom: 8px;
}

/* CARDS */

.stat-card {
    border-radius: 20px;
    padding: 24px;
    color: white;
    min-height: 145px;
    box-shadow: 0 15px 35px rgba(15,23,42,0.12);
}

.stat-card h6 {
    font-size: 15px;
    opacity: 0.9;
}

.stat-card h3 {
    font-size: 30px;
    font-weight: 800;
    margin: 12px 0;
}

.stat-card p {
    margin: 0;
    opacity: 0.85;
}

.blue {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

.green {
    background: linear-gradient(135deg, #16a34a, #15803d);
}

.orange {
    background: linear-gradient(135deg, #f97316, #c2410c);
}

.red {
    background: linear-gradient(135deg, #dc2626, #991b1b);
}

.panel {
    background: white;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(15,23,42,0.08);
}

.panel h5 {
    font-weight: 800;
    margin-bottom: 16px;
}

.quick-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.sidebar-rate-card {
    margin: 14px 0 18px;
    padding: 12px;
    border: 1px solid rgba(99, 102, 241, 0.28);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.36);
    color: #e5e7eb;
}

.sidebar-rate-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0;
}

.sidebar-rate-head a {
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    color: #93c5fd !important;
    font-size: 12px !important;
    font-weight: 700 !important;
}

.sidebar-rate-form {
    display: grid;
    gap: 8px;
}

.sidebar-rate-select,
.sidebar-rate-input {
    width: 100%;
    min-height: 34px;
    border: 1px solid rgba(148, 163, 184, 0.32);
    border-radius: 10px;
    background: #0f172a;
    color: #f8fafc;
    padding: 6px 9px;
    font-size: 12px;
}

.sidebar-rate-select:focus,
.sidebar-rate-input:focus {
    outline: 2px solid rgba(96, 165, 250, 0.45);
    border-color: rgba(96, 165, 250, 0.8);
}

.sidebar-rate-row {
    display: grid;
    grid-template-columns: 1fr 74px 38px;
    align-items: center;
    gap: 6px;
}

.sidebar-rate-row span {
    font-size: 12px;
    font-weight: 800;
    color: #f8fafc;
}

.sidebar-rate-save {
    min-height: 34px;
    border: 0;
    border-radius: 10px;
    background: #16a34a;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}

.sidebar-rate-save:disabled,
.sidebar-rate-input:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.mini-card {
    background: white;
    border-radius: 18px;
    padding: 22px;
    box-shadow: 0 10px 30px rgba(15,23,42,0.08);
    border-left: 5px solid #2563eb;
}

.mini-card span {
    color: #64748b;
    font-size: 14px;
}

.mini-card h3 {
    margin: 8px 0 0;
    font-weight: 800;
    color: #0f172a;
}

/* TABLAS Y FORMULARIOS */

.search-box {
    max-width: 330px;
    border-radius: 12px;
}

.table th {
    font-size: 13px;
    text-transform: uppercase;
    color: #475569;
}

.table td {
    font-size: 14px;
}

.btn-sm {
    border-radius: 10px;
}

.form-control,
.form-select {
    border-radius: 10px;
}

/* PRODUCTOS */

.product-img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid #ddd;
}

.no-image {
    width: 70px;
    height: 70px;
    border-radius: 12px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: #64748b;
}

.product-view-card {
    background: white;
    border-radius: 24px;
    padding: 30px;
    display: flex;
    gap: 35px;
    box-shadow: 0 10px 30px rgba(15,23,42,0.08);
}

.product-image-side {
    width: 320px;
}

.product-view-image {
    width: 100%;
    border-radius: 20px;
    object-fit: cover;
    border: 1px solid #ddd;
}

.product-no-image {
    height: 320px;
    border-radius: 20px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
}

.product-info-side {
    flex: 1;
}

.product-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.product-header h2 {
    margin: 0;
    font-weight: 800;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(2,1fr);
    gap: 18px;
    margin-bottom: 25px;
}

.info-box {
    background: #f8fafc;
    border-radius: 16px;
    padding: 18px;
}

.info-box label {
    display: block;
    font-size: 13px;
    color: #64748b;
    margin-bottom: 8px;
}

.info-box strong {
    font-size: 16px;
}

.description-box,
.sale-total-box {
    background: #f8fafc;
    border-radius: 18px;
    padding: 20px;
}

/* FACTURA */

.invoice-box {
    background: white;
    border-radius: 22px;
    padding: 35px;
    box-shadow: 0 10px 30px rgba(15,23,42,0.08);
}

.invoice-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.invoice-header h2 {
    font-weight: 900;
    margin: 0;
}

.invoice-total {
    max-width: 320px;
    margin-left: auto;
    text-align: right;
}

/* RESPONSIVE */

@media (max-width: 900px) {
    .sidebar {
        width: 210px;
    }

    .main {
        margin-left: 210px;
    }

    .product-view-card {
        flex-direction: column;
    }

    .product-image-side {
        width: 100%;
    }
}

/* PRINT */

@media print {
    .sidebar,
    .topbar,
    .btn {
        display: none !important;
    }

    .main {
        margin-left: 0 !important;
        width: 100% !important;
    }

    .content {
        padding: 0 !important;
    }

    body {
        background: white !important;
    }

    .invoice-box {
        box-shadow: none !important;
        border-radius: 0 !important;
    }

    .ventas-productos-table {
    width: 100%;
    min-width: 1800px;
    }

    .ventas-productos-table th {
        white-space: nowrap;
        font-size: 13px;
    }

    .ventas-productos-table td {
        padding: 6px;
    }

    .ventas-productos-table .producto-select {
        min-width: 300px;
    }

    .ventas-productos-table .descripcion-item {
        min-width: 250px;
    }

    .ventas-productos-table .observacion-item {
        min-width: 250px;
    }

    .ventas-productos-table .codigo-item,
    .ventas-productos-table .grupo-item,
    .ventas-productos-table .categoria-item {
        min-width: 130px;
    }

    .ventas-productos-table .uom-item {
        min-width: 80px;
    }

    .ventas-productos-table .cantidad {
        min-width: 90px;
    }

    .ventas-productos-table .precio {
        min-width: 120px;
    }

    .ventas-productos-table .subtotal {
        min-width: 120px;
    }

    .producto-card-venta {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 18px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
    }

    .producto-card-venta h6 {
        font-weight: 800;
        color: #111827;
    }

    .producto-card-venta .form-label {
        font-size: 12px;
        font-weight: 700;
        color: #374151;
    }

    .producto-card-venta input,
    .producto-card-venta select {
        font-size: 14px;
    }

    .producto-card-venta {
        background: #fff;
        border: 1px solid #e5e7eb;
        border-radius: 14px;
        padding: 14px;
        margin-bottom: 12px;
    }

    .producto-card-venta .form-label {
        font-size: 12px;
        font-weight: 700;
        margin-bottom: 4px;
    }

    .producto-card-venta input,
    .producto-card-venta select {
        height: 38px;
        font-size: 13px;
    }

    .producto-card-venta .row {
        row-gap: 8px;
    }

    .producto-card-venta {
        background: #ffffff;
        border: 1px solid #e5e7eb;
        border-radius: 16px;
        padding: 16px;
        margin-bottom: 14px;
        box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
    }

    .producto-card-venta .form-label {
        font-size: 12px;
        font-weight: 700;
        margin-bottom: 4px;
    }

    .producto-card-venta input,
    .producto-card-venta select {
        font-size: 13px;
        height: 38px;
    }
}

/* Production layout lock: keeps Hostinger rendering aligned with localhost. */
@media screen and (min-width: 901px) {
    html {
        font-size: 13px !important;
    }

    body {
        font-size: 13px !important;
        line-height: 1.32 !important;
    }

    .sidebar {
        width: 210px !important;
        padding: 16px 12px !important;
    }

    .main {
        margin-left: 210px !important;
    }

    .content {
        padding: 20px !important;
    }

    .sidebar a,
    .menu-title {
        font-size: 13px !important;
        padding: 9px 12px !important;
    }

    .submenu a,
    .topbar small,
    table,
    .form-control,
    .form-select,
    .btn {
        font-size: 12px !important;
    }

    .page-title {
        font-size: 28px !important;
    }

    .topbar {
        padding: 12px 20px !important;
    }

    .panel,
    .invoice-box,
    .product-view-card {
        padding: 20px !important;
    }

    .panel {
        border-radius: 18px !important;
    }

    .stat-card {
        min-height: 118px !important;
        padding: 18px !important;
    }

    .stat-card h3 {
        font-size: 24px !important;
    }

    .brand-icon {
        width: 38px !important;
        height: 38px !important;
    }

    .brand h4 {
        font-size: 22px !important;
    }
}


