/*
 * DMS brand accent — teal palette matching dms_logo.svg.
 *
 * Scoped to CSS custom properties used by Frappe's Desk theme. These
 * variables cascade into navbar, buttons, and links without touching
 * Frappe's CSS directly. Loaded via hooks.app_include_css and
 * hooks.web_include_css so both Desk and the login/website shell pick
 * up the accent consistently.
 */

:root {
	--dms-primary: #0f766e;
	--dms-primary-dark: #134e4a;
	--dms-primary-light: #14b8a6;
}


/* Hide the Move / Add buttons column entirely so the row's flex children
   redistribute. The buttons sit inside `.col-sm-2.text-right` per
   apps/erpnext/erpnext/stock/dashboard/item_dashboard_list.html. */
body.dms-stock-summary-active .dashboard-list-item .col-sm-2.text-right {
	display: none !important;
}

/* Reclaim the freed space:
   - Widen "Reserved Stock" col (default col-sm-1 = 8.33%) to ~12% on
     BOTH the header and the data rows so the title fits on one line and
     the column stays pixel-aligned with the value cells below.
   - Leave the bar widget col (col-sm-3 = 25%) at its native width — the
     inline-graph renders well at 25% and aligning the header at the
     same col class avoids brittle :nth-of-type selectors that broke in
     UAT round 4.
   - The hidden Move/Add col-sm-2 leaves ~17% of right-side whitespace
     naturally; the page no longer feels cramped. */
body.dms-stock-summary-active .dashboard-list-item .col-sm-1,
body.dms-stock-summary-active .dms-stock-summary-headers .col-sm-1 {
	flex: 0 0 12%;
	max-width: 12%;
}

/* Padding parity with Frappe's list-row-head (it sets its own padding via
   the .list-row-head class). We only add a tiny top/bottom touch-up. */
body.dms-stock-summary-active .dms-stock-summary-headers {
	padding-top: var(--padding-sm);
	padding-bottom: var(--padding-sm);
}



/* ---------------------------------------------------------------------------
 * UAT 2026-06-09 — hide the No./idx column on SO/DN/Installation Note item
 * grids. Scoped via the dms-hide-row-index class added by each form's
 * refresh handler (sales_order.js / delivery_note.js / installation_note.js).
 * Frappe doesn't expose a clean API to disable row-index per-grid in v16,
 * so CSS targeting .row-index inside the specific items grid is the
 * cleanest path; the class gate keeps the rule from leaking to other
 * doctypes.
 * --------------------------------------------------------------------------- */
.dms-hide-row-index .frappe-control[data-fieldname="items"] .row-index,
.dms-hide-row-index .frappe-control[data-fieldname="items"] .grid-form-row-index {
	display: none !important;
}
