/* India pack: older core screens restyled automatically (layouts/app.blade.php adds .vx-auto / .vx-auto-head).
   The list / card / DataTables styles come from the .vx-legacy block in vyapar.css; this file adds the page head,
   plain boxes, forms and a few core widgets those screens use. */
.content-header.vx-auto-head { padding: 18px 22px 0; }
.content-header.vx-auto-head > h1 { font-size: 21px; font-weight: 800; color: var(--vx-text); letter-spacing: -.01em; margin: 0; line-height: 1.3; }
.content-header.vx-auto-head > h1 small { display: block; font-size: 12.5px; font-weight: 500; color: var(--vx-muted); margin: 3px 0 0; padding: 0; }
.content-header.vx-auto-head > .breadcrumb { display: none; }
.content.vx-auto { padding-top: 12px; }

/* plain AdminLTE boxes (forms, report summaries) look like vx cards */
.vx-auto .box { border: 1px solid var(--vx-line) !important; border-top: 1px solid var(--vx-line) !important; border-radius: var(--vx-radius);
  box-shadow: var(--vx-shadow); background: #fff; margin-bottom: 14px; }
.vx-auto .box > .box-header { border-bottom: 1px solid var(--vx-line-2, #eef2f6); }
.vx-auto .box > .box-body { padding: 14px 16px; }
.vx-auto .box > .box-footer { border-top: 1px solid var(--vx-line-2, #eef2f6); background: #fafbfd; border-radius: 0 0 var(--vx-radius) var(--vx-radius); }
.vx-auto .box-solid > .box-header, .vx-auto .box-primary > .box-header { background: #fff; color: var(--vx-text); }

/* forms */
.vx-auto label { font-size: 12.5px; font-weight: 600; color: #334155; }
.vx-auto .form-control { border-radius: 8px; border-color: #d6dde6; font-size: 13.5px; }
.vx-auto .form-control:focus { border-color: var(--vx-blue); box-shadow: 0 0 0 3px rgba(11, 111, 214, .12); }
.vx-auto .input-group-addon { border-color: #d6dde6; background: #f6f8fb; color: #64748b; }
.vx-auto .input-group .form-control:not(:first-child) { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.vx-auto .input-group .form-control:not(:last-child) { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.vx-auto .help-block { font-size: 12px; color: var(--vx-muted); }

/* report summary tables (purchase & sale, register, tax, z-report) */
.vx-auto .table > tbody > tr > th, .vx-auto .table > tbody > tr > td { border-top-color: #eef2f6; }
.vx-auto .table > thead > tr > th { background: #f6f8fb; color: #475569; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--vx-line); }
.vx-auto .table-striped > tbody > tr:nth-of-type(odd) { background: #fbfcfe; }

/* small-box / info-box widgets on old reports */
.vx-auto .small-box, .vx-auto .info-box { border-radius: var(--vx-radius); box-shadow: var(--vx-shadow); border: 1px solid var(--vx-line); }
.vx-auto .info-box { background: #fff; min-height: 76px; }
.vx-auto .info-box-icon { border-radius: var(--vx-radius) 0 0 var(--vx-radius); }

/* buttons */
.vx-auto .btn { border-radius: 8px; font-weight: 600; }
.vx-auto .btn-primary, .vx-auto .tw-dw-btn-primary { background: var(--vx-blue); border-color: var(--vx-blue); }
.vx-auto .btn-xs { border-radius: 6px; }

@media (max-width: 767px) {
  .content-header.vx-auto-head { padding: 12px 10px 0; }
  .content-header.vx-auto-head > h1 { font-size: 18px; }
}
@media print {
  .content-header.vx-auto-head { padding: 0; }
  .vx-auto .box { box-shadow: none; border: 0 !important; }
}

/* ---- QA fixes: cramped inputs and clipped dropdowns ---- */
/* Add Sale / POS line: tax and unit selects readable */
#pos_table select.tax_id, #pos_table select[name$="[tax_id]"], #pos_table select.sub_unit { min-width: 96px; }
/* Add Purchase grid: inputs wide enough for "80.00", "100.00", "Pieces" */
#purchase_entry_table input.form-control { min-width: 78px; }
#purchase_entry_table select.form-control { min-width: 92px; }
#purchase_entry_table { min-width: 1100px; }
.vx-formpage .table-responsive, #purchase_entry_table_wrapper { overflow-x: auto; }
/* POS header store picker not clipped */
#select_location_id, select#location_id.pos-location { min-width: 220px; }
.pos-header .select2-container { min-width: 220px; }
/* required star when a field becomes required by script */
label.vx-req::after { content: ' *'; color: #dc2626; }
/* table row "Actions" menu moved to <body> by vx-guards.js so it is never clipped */
.dropdown-menu.vx-floating { position: fixed !important; z-index: 2000 !important; display: block; margin: 0; }

/* ---- QA low-priority visual fixes ---- */
/* L1: plain file inputs look like the rest of the form */
.vx-auto input[type="file"], .vx-formpage input[type="file"] { display: block; width: 100%; max-width: 420px; font-size: 13px; color: #334155;
  border: 1px dashed #cbd5e1; border-radius: 8px; padding: 7px 10px; background: #fafbfd; cursor: pointer; }
.vx-auto input[type="file"]::file-selector-button, .vx-formpage input[type="file"]::file-selector-button {
  border: 1px solid #d6dde6; background: #fff; border-radius: 6px; padding: 4px 10px; margin-right: 10px; font-weight: 600; cursor: pointer; }
/* L4: no grey scrollbar when the table fits; one vertical scrollbar (the page's), not two */
.dataTables_scrollBody { overflow-x: auto !important; scrollbar-width: thin; }
.vx-legacy .dataTables_scrollBody { max-height: none !important; overflow-y: hidden !important; }
.dataTables_wrapper .dataTables_scrollFoot { overflow: hidden !important; }
.vx-legacy tfoot td { white-space: normal; vertical-align: top; }
/* L7: profit chip on Add Sale sits right of the sidebar, not over "Open POS" */
@media (min-width: 768px) { .vx-profit-chip:not(.pos) { left: 270px; } }
/* L8: short values never wrap mid-way */
.vx-page .vx-table td:first-child, .vx-recent td, #pl_data_div td.text-right, #pl_data_div td:last-child { white-space: nowrap; }
.vx-auto .btn, .vx-auto .tw-dw-btn { white-space: nowrap; }
/* L9: Invoice Settings action buttons wrap instead of being cut off */
#invoice_table td:last-child, #invoice_layout_table td:last-child, .vx-auto table td .btn-group { white-space: normal; }
#invoice_table td:last-child .btn, #invoice_table td:last-child a { margin: 2px 2px; }
/* L15: dashboard "Most used reports" — icons in one column, labels aligned */
.vx-report-links .vx-btn { justify-content: flex-start; gap: 10px; text-align: left; }
.vx-report-links .vx-btn::first-letter { display: inline-block; width: 22px; }
