/* MVFiscal UI standard: Tabler */

:root {
    --mvf-sidebar-width: 290px;
}

body.tabler-enabled {
    background: var(--tblr-bg-surface-secondary, #f6f8fb);
    color: var(--tblr-body-color, #1e293b);
    font-family: var(--tblr-font-sans-serif, "Inter", "Segoe UI", Arial, sans-serif);
    font-size: calc(15.5px * var(--ui-font-scale, 1));
    line-height: var(--ui-line-height, 1.5);
    font-weight: var(--ui-font-weight, 400);
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.tabler-enabled .app-shell {
    min-height: 100vh;
}

body.tabler-enabled .app-sidebar {
    width: var(--mvf-sidebar-width);
    background: var(--tblr-bg-surface, #ffffff);
    border-right: 1px solid var(--tblr-border-color, #d9e2ec);
    box-shadow: 0 2px 14px rgba(15, 23, 42, 0.06);
}

body.tabler-enabled .ui-template-label {
    color: var(--tblr-muted, #6b7280);
    font-size: 0.75rem;
}

body.tabler-enabled .sidebar-link {
    border-radius: 0.625rem;
    font-weight: 600;
    color: var(--tblr-body-color, #1f2937);
}

body.tabler-enabled .sidebar-link:hover {
    background: var(--tblr-bg-surface-secondary, #eef2f7);
}

body.tabler-enabled .sidebar-link.active {
    background: var(--tblr-primary-lt, #dbeafe);
    color: var(--tblr-primary, #206bc4);
}

body.tabler-enabled .topbar,
body.tabler-enabled .panel,
body.tabler-enabled .notice,
body.tabler-enabled .workspace-month-shell,
body.tabler-enabled .monthly-focus-panel,
body.tabler-enabled .monthly-executive-panel {
    border-radius: 0.875rem;
    border-color: var(--tblr-border-color, #d9e2ec);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

body.tabler-enabled .panel {
    background: var(--tblr-bg-surface, #ffffff);
}

body.tabler-enabled .notice.success,
body.tabler-enabled .notice.positive {
    background: var(--tblr-success-lt, #e9f8ef);
    border-color: #9ad7ac;
}

body.tabler-enabled .notice.warning {
    background: var(--tblr-yellow-lt, #fff8e6);
    border-color: #f5cf7b;
}

body.tabler-enabled .notice.error,
body.tabler-enabled .notice.negative {
    background: var(--tblr-danger-lt, #fdecee);
    border-color: #eba7ab;
}

body.tabler-enabled button,
body.tabler-enabled .primary-link,
body.tabler-enabled .secondary-action,
body.tabler-enabled .button-muted {
    border-radius: 0.625rem;
    font-weight: 600;
}

body.tabler-enabled .table-wrap table,
body.tabler-enabled .konta-table-wrap table {
    border-color: var(--tblr-border-color, #d9e2ec);
}

body.tabler-enabled.ui-contrast-high {
    --tblr-body-color: #0f172a;
    --tblr-muted: #334155;
    --tblr-border-color: #b8c5d6;
    --tblr-bg-surface-secondary: #eef2f7;
}

body.tabler-enabled.ui-contrast-high .sidebar-link.active {
    background: #c8ddff;
    color: #0b4ea2;
}

body.tabler-enabled.ui-density-compact .panel,
body.tabler-enabled.ui-density-compact .notice,
body.tabler-enabled.ui-density-compact .topbar {
    padding-top: 0.8rem;
    padding-bottom: 0.8rem;
}

body.tabler-enabled.ui-density-spacious .panel,
body.tabler-enabled.ui-density-spacious .notice,
body.tabler-enabled.ui-density-spacious .topbar {
    padding-top: 1.3rem;
    padding-bottom: 1.3rem;
}

body.tabler-enabled.ui-font-weight-medium strong,
body.tabler-enabled.ui-font-weight-medium h1,
body.tabler-enabled.ui-font-weight-medium h2,
body.tabler-enabled.ui-font-weight-medium h3 {
    font-weight: 600;
}

body.tabler-enabled.ui-font-weight-semibold strong,
body.tabler-enabled.ui-font-weight-semibold h1,
body.tabler-enabled.ui-font-weight-semibold h2,
body.tabler-enabled.ui-font-weight-semibold h3 {
    font-weight: 700;
}

@media (max-width: 1024px) {
    body.tabler-enabled .app-sidebar {
        width: min(86vw, 340px);
    }
}

/* Mercancias: override final cargado despues de app.css. */
.merchandise-inventory-table {
    max-height: min(72vh, 760px);
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.merchandise-inventory-table table {
    width: 100%;
    min-width: 1380px;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
}

.merchandise-inventory-table th,
.merchandise-inventory-table td {
    white-space: normal;
    vertical-align: top;
    padding: 10px 9px;
    background: #fff;
    overflow-wrap: anywhere;
}

.merchandise-inventory-table th {
    position: sticky;
    top: 0;
    z-index: 3;
    background: #f8fafc;
    box-shadow: 0 1px 0 var(--line);
    font-size: 12px;
}

.merchandise-inventory-table th:nth-child(1),
.merchandise-inventory-table td:nth-child(1) { width: 190px; }
.merchandise-inventory-table th:nth-child(2),
.merchandise-inventory-table td:nth-child(2) { width: 330px; }
.merchandise-inventory-table th:nth-child(3),
.merchandise-inventory-table td:nth-child(3) { width: 120px; }
.merchandise-inventory-table th:nth-child(4),
.merchandise-inventory-table td:nth-child(4) { width: 135px; }
.merchandise-inventory-table th:nth-child(5),
.merchandise-inventory-table td:nth-child(5) { width: 115px; }
.merchandise-inventory-table th:nth-child(6),
.merchandise-inventory-table td:nth-child(6) { width: 490px; }

.merchandise-inventory-table .disclosure-panel {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 9px;
    margin-bottom: 8px;
    background: #fbfcfd;
}

.merchandise-inventory-table .disclosure-panel summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 0;
}

.merchandise-inventory-table .disclosure-panel[open] summary {
    margin-bottom: 9px;
}

.merchandise-inventory-table .disclosure-panel summary::before {
    display: none;
}

.merchandise-inventory-table .disclosure-panel summary .pill {
    margin-right: 0;
    flex: 0 0 auto;
}

.merchandise-inventory-table .form-grid.compact {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 0;
}

.merchandise-inventory-table .form-grid label {
    gap: 4px;
    font-size: 11px;
    line-height: 1.2;
}

.merchandise-inventory-table .form-grid label.wide,
.merchandise-inventory-table .form-grid button {
    grid-column: 1 / -1;
}

.merchandise-inventory-table input,
.merchandise-inventory-table select {
    min-height: 34px;
    padding: 6px 8px;
    font-size: 12px;
    border-radius: 7px;
}

.merchandise-inventory-table button {
    min-height: 34px;
    width: 100%;
    padding: 7px 10px;
    font-size: 12px;
}

.merchandise-batch-form {
    display: grid;
    gap: 12px;
}

.merchandise-batch-controls {
    align-items: end;
}

.merchandise-batch-table {
    max-height: 460px;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.merchandise-batch-table table {
    min-width: 980px;
}

.merchandise-batch-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f8fafc;
    box-shadow: 0 1px 0 var(--line);
}

.merchandise-batch-table th:nth-child(1),
.merchandise-batch-table td:nth-child(1) { width: 190px; }
.merchandise-batch-table th:nth-child(2),
.merchandise-batch-table td:nth-child(2) { width: 280px; }
.merchandise-batch-table th:nth-child(3),
.merchandise-batch-table td:nth-child(3) { width: 120px; }
.merchandise-batch-table th:nth-child(4),
.merchandise-batch-table td:nth-child(4) { width: 145px; }
.merchandise-batch-table th:nth-child(5),
.merchandise-batch-table td:nth-child(5) { width: 155px; }
.merchandise-batch-table th:nth-child(6),
.merchandise-batch-table td:nth-child(6) { width: 190px; }

.merchandise-batch-table input {
    width: 100%;
    min-width: 0;
    min-height: 34px;
    padding: 6px 8px;
    font-size: 12px;
    border-radius: 7px;
}
