/* Foto Referencia — listados */
.producto-thumb-wrap {
    position: relative;
    display: inline-block;
    line-height: 0;
}
.producto-thumb-wrap .tagFotoReferencia {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: rgb(204 202 202 / 50%);
    background: none;
    padding: 0;
    font-size: 7px;
    line-height: 1.15;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-align: center;
    text-transform: uppercase;
    font-family: Arial, Helvetica, sans-serif;
    pointer-events: none;
    z-index: 1;
}
.producto-thumb-wrap .tagFotoReferenciaDiagonal {
    transform: translate(-50%, -50%) rotate(-35deg);
}

/* Foto Referencia — edición / ficha */
.foto-referencia-input,
.foto-referencia-preview {
    position: relative;
}
.foto-referencia-input .tagFotoReferencia,
.foto-referencia-preview .tagFotoReferencia {
    display: none;
    font-size: 13px;
    line-height: 1.15;
    color: rgb(204 202 202 / 50%);
    background: none;
    padding: 0;
    width: 100%;
    border-radius: 0;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    pointer-events: none;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-align: center;
    text-transform: uppercase;
    font-family: Arial, Helvetica, sans-serif;
}
.foto-referencia-input:not(.image-input-empty) .tagFotoReferencia,
.foto-referencia-preview .tagFotoReferencia {
    display: block;
}

/* Dashboard — KPI cards */
.dash-kpi-card {
    display: block;
    text-decoration: none;
    color: inherit;
    min-width: 0;
}
.dash-kpi-card:hover {
    color: inherit;
}
.dash-kpi-title {
    font-size: 11px;
    line-height: 1.2;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}
.dash-kpi-arrow {
    color: #000;
    font-size: 18px !important;
    line-height: 1;
    flex-shrink: 0;
}
.dash-kpi-main {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}
.dash-kpi-icon {
    color: #266dff;
    font-size: 22px !important;
    line-height: 1;
    flex-shrink: 0;
    white-space: nowrap;
}
.dash-kpi-icon.bi,
.dash-kpi-icon.las {
    font-size: 22px !important;
}
.dash-kpi-label {
    color: #266dff;
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    flex-shrink: 0;
    white-space: nowrap;
}
.dash-kpi-value {
    font-size: 22px;
    font-weight: 700;
    color: initial;
    line-height: 1;
    white-space: nowrap;
    min-width: 0;
}
.dash-kpi-desc {
    font-size: 11px;
    line-height: 1.25;
    margin: 0;
}
.dash-kpi-card .card-body {
    padding: 0.85rem 1rem;
}

/* SKU autocomplete — Informar Last Chance */
.sku-suggest-wrap {
    position: relative;
}
.sku-suggestions {
    position: absolute;
    top: calc(100% - 0.5rem);
    left: 0;
    right: 0;
    z-index: 20;
    max-height: 240px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #e4e6ef;
    border-radius: 0.475rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}
.sku-suggestion-item {
    display: block;
    width: 100%;
    text-align: left;
    border: 0;
    background: transparent;
    padding: 0.65rem 0.9rem;
    font-size: 0.95rem;
    color: #181c32;
    cursor: pointer;
}
.sku-suggestion-item:hover,
.sku-suggestion-item:focus {
    background: #f1f3f9;
    outline: none;
}

/* Sidebar — foto de perfil */
.app-sidebar-user .profile-circle {
    width: 30px;
    height: 30px;
    min-width: 30px;
    min-height: 30px;
    flex-shrink: 0;
}
.app-sidebar-user .profile-circle img {
    width: 30px;
    height: 30px;
    max-width: 30px;
    object-fit: cover;
}

/* Sidebar — ocultar saludo al minimizar, foto centrada y completa */
@media (min-width: 992px) {
    [data-kt-app-sidebar-minimize=on]:not([data-kt-app-sidebar-hoverable=true]) .app-sidebar-user,
    [data-kt-app-sidebar-minimize=on][data-kt-app-sidebar-hoverable=true] .app-sidebar:not(:hover) .app-sidebar-user {
        padding: 0.75rem 0 !important;
        overflow: visible;
    }

    [data-kt-app-sidebar-minimize=on]:not([data-kt-app-sidebar-hoverable=true]) .app-sidebar-user .app-sidebar-user-greeting,
    [data-kt-app-sidebar-minimize=on]:not([data-kt-app-sidebar-hoverable=true]) .app-sidebar-user hr,
    [data-kt-app-sidebar-minimize=on][data-kt-app-sidebar-hoverable=true] .app-sidebar:not(:hover) .app-sidebar-user .app-sidebar-user-greeting,
    [data-kt-app-sidebar-minimize=on][data-kt-app-sidebar-hoverable=true] .app-sidebar:not(:hover) .app-sidebar-user hr {
        display: none !important;
    }

    [data-kt-app-sidebar-minimize=on]:not([data-kt-app-sidebar-hoverable=true]) .app-sidebar-user .d-flex,
    [data-kt-app-sidebar-minimize=on][data-kt-app-sidebar-hoverable=true] .app-sidebar:not(:hover) .app-sidebar-user .d-flex {
        justify-content: center;
        align-items: center;
    }

    [data-kt-app-sidebar-minimize=on]:not([data-kt-app-sidebar-hoverable=true]) .app-sidebar-user .app-sidebar-user-avatar,
    [data-kt-app-sidebar-minimize=on][data-kt-app-sidebar-hoverable=true] .app-sidebar:not(:hover) .app-sidebar-user .app-sidebar-user-avatar {
        margin: 0 !important;
    }
}

/* Órdenes de Compra — grilla comentarios y columnas unificadas */
.om-comment-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 150px;
    border: 0;
    background: transparent;
    color: #99a1b7;
    font-size: 12px;
    line-height: 1.3;
    padding: 0;
    cursor: pointer;
    text-align: left;
}
.om-comment-btn .om-comment-ico { font-size: 14px; flex: 0 0 auto; }
.om-comment-btn .om-comment-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}
.om-comment-btn:hover,
.om-comment-btn:focus {
    color: #000;
}
.om-comment.is-empty { color: #d1d5db; font-size: 12px; }
.om-fecha-upd { color: #99a1b7; font-size: 11px; margin-top: 2px; }
.om-cliente-nro { color: #99a1b7; font-size: 11px; }
.om-sucursal { font-weight: 600; color: #252f4a; }
.om-tipo { color: #99a1b7; font-size: 11px; }
.om-total-imp { font-weight: 700; color: #252f4a; }
.om-total-meta { color: #99a1b7; font-size: 11px; }
.om-search { width: 320px; flex: 0 0 320px; max-width: 320px; min-width: 320px; }
.om-daterange-box,
.om-daterange,
.om-daterange.form-control,
.om-daterange.form-control-solid {
    background-color: #fff !important;
    background-image: none !important;
    cursor: pointer;
}
.om-daterange-input {
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: 0 !important;
    padding: 0;
    width: 100%;
    min-width: 0;
    cursor: pointer;
    font-size: 13px;
    color: #252f4a !important;
    opacity: 1 !important;
}
.om-daterange-input:read-only,
.om-daterange-input[readonly] {
    background: transparent !important;
    color: #252f4a !important;
    opacity: 1 !important;
    cursor: pointer;
}
.om-table,
.om-table.fs-6,
.om-table tbody td,
.om-table .om-orden,
.om-table .om-cliente-nombre,
.om-table .om-fecha,
.om-table .om-sucursal,
.om-table .om-total-imp {
    font-size: 12px !important;
}
.om-actions-menu .menu-link i.bi {
    font-size: 16px;
    line-height: 1;
    width: 16px;
    flex: 0 0 16px;
}
.om-actions-menu .menu-link i.om-ico-aprobar,
.om-actions-menu .menu-link i.om-ico-aprobar::before { color: #17c653 !important; }
.om-actions-menu .menu-link i.om-ico-rechazar,
.om-actions-menu .menu-link i.om-ico-rechazar::before { color: #f1416c !important; }
.om-actions-menu .menu-link i.om-ico-editar,
.om-actions-menu .menu-link i.om-ico-editar::before { color: #99a1b7 !important; }
.om-actions-menu .menu-link i.om-ico-listo,
.om-actions-menu .menu-link i.om-ico-listo::before,
.om-actions-menu .menu-link i.om-ico-retirado,
.om-actions-menu .menu-link i.om-ico-retirado::before { color: #181c32 !important; }
.om-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
}
.om-status-badge.om-status-generado { background: #fff4de; color: #ff8d00; }
.om-status-badge.om-status-aprobado { background: #e8fff3; color: #17c653; }
.om-status-badge.om-status-facturado { background: #3f4254; color: #fff; }
.om-status-badge.om-status-armado { background: #f8f5ff; color: #7239ea; }
.om-status-badge.om-status-listo { background: #d1f7c4; color: #2e9e4b; }
.om-status-badge.om-status-cancelado { background: #fff5f8; color: #f1416c; }
.om-status-badge.om-status-default { background: #f1f1f4; color: #78829d; }
.om-modal-comment {
    min-height: 72px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 12px 14px;
    font-size: 14px;
    color: #4b5675;
    white-space: pre-wrap;
    background: #fff;
}

.om-view-toolbar,
.op-view-toolbar {
    display: flex !important;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
}
.om-view-toolbar > .page-title,
.op-view-toolbar > .page-title {
    flex: 1 1 auto;
    min-width: 0;
}
.om-view-toolbar .om-btn-black,
.op-view-toolbar .op-btn-black {
    margin-left: auto !important;
    flex-shrink: 0;
}

/* Drawer Agregar Producto */
#kt_drawer_agregar_producto .card {
    position: relative;
}
#kt_drawer_agregar_producto .om-drawer-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 24px 20px 12px 24px;
    position: relative;
}
#kt_drawer_agregar_producto .om-drawer-head-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding-right: 8px;
    flex: 1 1 auto;
    min-width: 0;
}
#kt_drawer_agregar_producto .om-drawer-close {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    margin: -6px -6px 0 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #5e6278;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex: 0 0 40px;
    line-height: 0;
    border-radius: 6px;
    box-shadow: none;
}
#kt_drawer_agregar_producto .om-drawer-close:hover,
#kt_drawer_agregar_producto .om-drawer-close:focus {
    color: #181c32;
    background: #f1f1f4;
}
#kt_drawer_agregar_producto .om-drawer-close svg {
    display: block;
    width: 24px;
    height: 24px;
    fill: currentColor;
    flex-shrink: 0;
}
.om-req { color: #f1416c; font-weight: 600; margin-left: 2px; }

/* MELI — pausado (naranja) / no habilitado por abast (negro) */
.badge-meli-activar,
.bg-meli-activar,
.badge-meli-pausado,
.bg-meli-pausado {
    background-color: #FF8A00 !important;
}
.badge-meli-abast,
.bg-meli-abast {
    background-color: #000000 !important;
}
