/* ── Sombra profesional compartida ───────────────────────── */
:root {
    --panel-shadow: 0 1px 3px rgba(0,0,0,0.07), 0 2px 8px rgba(0,0,0,0.05);
    --panel-border: 1px solid rgba(0,0,0,0.06);
}

/* ── Base ─────────────────────────────────────────────────── */
header { box-shadow: var(--panel-shadow); border-bottom: var(--panel-border); }
html, body { height: auto; }
.bg_auth { min-height: 88vh; padding-top: 12vh; }
#logo_panel {    padding-left: 12px;
    width: 160px;
    min-height: 46px;
    display: flex; }
.input_full { margin-bottom: 16px; }
.table-responsive td { vertical-align: middle; }

/* DataTables */
.dataTables_length select { width: 90px; margin: 0 20px; }
div.dataTables_filter { text-align: right; margin-bottom: 14px; }
.dataTables_wrapper .dataTables_filter input { max-width: 180px; margin-left: 20px; }
.dataTables_wrapper .dataTables_filter label { font-size: 15px; font-weight: bold; }
div.dataTables_info { margin-top: 14px; }

/* ── Sidebar / Panel ──────────────────────────────────────── */
.heightcont  { min-height: calc(100vh - 46px); }
.panelcont   { display: flex; }
.sidepanel   { width: 220px; flex-shrink: 0; }
.mainpanel   { width: calc(100% - 220px); padding: 24px 28px; box-sizing: border-box; }

#menu_dashboard {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: calc(100vh - 46px);
    padding: 20px 12px 16px;
    background: #ffffff;
    border-right: var(--panel-border);
    box-shadow: var(--panel-shadow);
    box-sizing: border-box;
}

.scroll #menu_dashboard {
    min-height: calc(100vh - 46px);
    border-radius: 0 0 30px 0;
}



.sidebar-nav   { display: flex; flex-direction: column; gap: 2px; }
.sidebar-bottom { border-top: 1px solid var(--grisclaroalt); padding-top: 10px; }

.sidebar-link {
    display: flex !important;
    align-items: center;
    gap: 8px;
    padding: 9px 12px !important;
    border-radius: 8px !important;
    font-size: 13.5px !important;
    font-weight: 500 !important;
    color: var(--negro) !important;
    background: transparent !important;
    transition: background 0.15s, color 0.15s;
    width: 100%;
    box-sizing: border-box;
}
.sidebar-link i { font-size: 13px; width: 16px; text-align: center; opacity: 0.6; }
.sidebar-link:hover { background: var(--grisclaroalt) !important; color: var(--corporativo1) !important; text-decoration: none; }
.sidebar-link:hover i, .sidebar-link.active i { opacity: 1; }
.sidebar-link.active { background: var(--grisclaro) !important; color: var(--corporativo1) !important; font-weight: 600 !important; }
.sidebar-logout { color: var(--colorterciary) !important; font-size: 13px !important; border: none; cursor: pointer; }
.sidebar-logout:hover { background: #FEF2F2 !important; color: #ef4444 !important; }

/* ── Dashboard header ─────────────────────────────────────── */
 
.dash-user    { display: flex; align-items: center; gap: 10px; float: right; color: var(--blanco) }
.dash-greeting { font-size: 14px; font-weight: 500; color: var(--blanco); }
.dash-avatar  {
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--corporativo2); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; flex-shrink: 0;
}

/* ── Cards ────────────────────────────────────────────────── */
.card-plain { box-shadow: var(--panel-shadow); border: var(--panel-border); border-radius: 12px; }


/* ── Badges ───────────────────────────────────────────────── */
.badge         { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.badge-green   { background: #DCFCE7; color: #16a34a; }
.badge-purple   {     background: #e4def9;    color: #8225eb; }
.badge-blue    { background: #DBEAFE; color: #2563eb; }
.badge-gray    { background: var(--grisclaroalt); color: var(--grisalt); }
.badge-orange  { background: #FEF3C7; color: #d97706; }

/* ── Producto row ─────────────────────────────────────────── */
.product-row { display: flex; gap: 12px; align-items: flex-start; border-bottom: 1px solid var(--grisclaroalt); padding-bottom: 14px; }
.product-img { width: 52px; height: 52px; border-radius: 8px; background: var(--grisclaroalt); display: flex; align-items: center; justify-content: center; flex-shrink: 0; overflow: hidden; }
.product-img img { width: 100%; height: 100%; object-fit: contain; }

/* ── Qty selector ─────────────────────────────────────────── */
.qty-selector { display: flex; align-items: center; border: 1px solid var(--grisclaroalt); border-radius: 8px; overflow: hidden; }
.qty-btn      { width: 42px; height: 42px; border: none; background: var(--blancoalt); cursor: pointer; font-size: 12px; color: var(--negro); display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: background 0.15s; }
.qty-btn:hover { background: var(--grisclaroalt); color: var(--corporativo1); }
.qty-val      { flex: 1; text-align: center; font-size: 15px; font-weight: 600; color: var(--negro); }

/* ── Qty total ────────────────────────────────────────────── */
.qty-total { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-top: 1px solid var(--grisclaroalt); font-size: 14px; }
.qty-total strong { font-size: 16px; font-weight: 700; }

/* ── Fiscal list ──────────────────────────────────────────── */
.fiscal-list      { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.fiscal-list li   { font-size: 13px; color: var(--negro); display: flex; align-items: center; gap: 8px; }
.fiscal-list li i { width: 14px; text-align: center; color: var(--grisalt); font-size: 12px; flex-shrink: 0; }

 
/* ── Spacing helpers ──────────────────────────────────────── */
.mt4  { margin-top: 4px; }
.mt16 { margin-top: 16px; }
.mt20 { margin-top: 20px; }
.mt24 { margin-top: 24px; }
.mb8  { margin-bottom: 8px; }
.mb12 { margin-bottom: 12px; }
.mb16 { margin-bottom: 16px; }
.mb20 { margin-bottom: 20px; }
.pt12 { padding-top: 12px; }

/* ── Responsive ───────────────────────────────────────────── */
@media screen and (max-width: 1030px) {
    .panelcont  { display: block; }
    .sidepanel  { width: 100%; }
    .mainpanel  { width: 100%; padding: 12px 10px; }

    .bg_auth { min-height: 88vh; padding-top: 3vh; }

    #menu_dashboard {
        flex-direction: row;
        flex-wrap: wrap;
        display: block;
        min-height: unset;
        padding: 10px 12px;
        border-right: none;
        border-bottom: 1px solid var(--grisclaroalt);
        gap: 4px;
                height: 54px;
        overflow-x: scroll; overflow-y: hidden;
    }
    .sidebar-nav    { flex-direction: row; flex-wrap: wrap; display: block;     }
    .sidebar-bottom {        border-top: none;
        padding-top: 0;
        margin-left: auto;
        position: absolute;
        top: -37px;
        right: 10px;
        z-index: 999; }
        .scroll .sidebar-bottom { top: -30px;  }
    .sidebar-link span { display: none; }
    .sidebar-link   {    padding: 8px 10px !important;
        width: auto;
        display: inline-block !important;
        float: left;}

    .dash-header { flex-direction: column; gap: 10px; }
    .dash-footer { flex-direction: column; gap: 6px; text-align: center; }
}
