/* ============================================================
   DASTYAB ERP - Advanced Corporate UI (Soft Orange / Slate)
   - Fixed Sticky Header on Scroll
   - Fixed Dark Navy Sidebar & Sub-menu Hover (#t_Body_nav Lock)
   - Clean White Grid Rows + Light Grid Header & Footer
   - Clean Single Focus Border (No Double Outline in Forms or Grid)
   ============================================================ */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

:root {
  /* ---- Soft Mature Corporate Orange ---- */
  --erp-primary: #d9531e;          /* Rich Warm Orange (aankhon ko soft) */
  --erp-primary-2: #ed6c35;        /* Soft Amber-Orange end */
  --erp-primary-dark: #b84114;     /* Deep Terracotta */
  --erp-primary-soft: #fdf2ec;
  --erp-primary-softer: #fef8f5;
  --erp-focus: rgba(244, 81, 30, .14);

  /* ---- Tunable: Navy accent ---- */
  --erp-navy: #16254d;
  --erp-navy-2: #2a3f73;
  --erp-navy-soft: #eef2fa;
  --erp-navy-border: #d9e1f0;

  /* ---- Neutrals ---- */
  --erp-bg: #f2f5fa;
  --erp-surface: #ffffff;
  --erp-surface-soft: #f6f8fc;
  --erp-border: #dfe6f1;
  --erp-border-soft: #ecf0f7;

  --erp-text: #1c2845;
  --erp-text-soft: #3b4a6b;
  --erp-muted: #6b7a99;

  /* ---- Status ---- */
  --erp-success: #2f9e44;
  --erp-success-dark: #258039;
  --erp-success-bg: #e3f6e8;
  --erp-success-text: #1b7a34;
  --erp-danger: #d63a2f;
  --erp-danger-dark: #b92e24;
  --erp-danger-bg: #fde9e7;
  --erp-danger-text: #b42318;
  --erp-warning: #f5a524;
  --erp-warning-bg: #fff4d9;
  --erp-warning-text: #8a5a00;
  --erp-info-bg: #e5eefe;
  --erp-info-text: #1d4ed8;

  /* ---- Shape / depth ---- */
  --erp-radius: 14px;
  --erp-radius-md: 10px;
  --erp-radius-sm: 8px;
  --erp-shadow-sm: 0 1px 2px rgba(15, 23, 42, .05);
  --erp-shadow: 0 8px 24px rgba(15, 23, 42, .06), 0 1px 2px rgba(15, 23, 42, .04);
  --erp-shadow-lg: 0 24px 60px rgba(15, 23, 42, .22), 0 4px 12px rgba(15, 23, 42, .08);

  --erp-font: "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ============================================================
   BASE
   ============================================================ */
html {
  scrollbar-color: #cbd5e1 transparent;
}

.t-Body,
.t-Body-main,
.t-Body-content,
body {
  background: var(--erp-bg) !important;
  color: var(--erp-text) !important;
  font-family: var(--erp-font) !important;
  font-size: 13px !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: rgba(244, 81, 30, .22);
}

a {
  transition: color .15s ease;
}

/* ============================================================
   HEADER (Sticky on scroll - screen upar se nahi kategi)
   ============================================================ */
.t-Header {
  background: linear-gradient(90deg, #121f42 0%, #16254d 50%, #21356e 100%) !important;
  box-shadow: inset 0 -3px 0 var(--erp-primary), 0 4px 16px rgba(15, 23, 42, .18) !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 800 !important;
}

.t-Header-logo,
.t-Header-logo-link {
  color: #fff !important;
  font-weight: 600 !important;
  letter-spacing: .1px;
}

.t-Header .t-Button--icon,
.t-Header .t-Button--header,
.t-Header .a-Menu-labelContainer,
.t-Header .t-Header-nav .t-Button {
  color: #fff !important;
  background: transparent !important;
  border-radius: var(--erp-radius-sm) !important;
  box-shadow: none !important;
  transition: background .15s ease;
}

.t-Header .t-Button--icon:hover,
.t-Header .t-Button--header:hover,
.t-Header .t-Header-nav .t-Button:hover {
  background: rgba(255, 255, 255, .16) !important;
}

/* ============================================================
   SIDEBAR / NAVIGATION
   ============================================================ */
/* Collapsed nav */
.t-PageBody--leftNavCollapsed .t-Body-nav,
.t-PageBody--leftNavCollapsed .t-Body-nav .t-TreeNav {
  width: 60px !important;
}

.t-PageBody--leftNavCollapsed .t-TreeNav .a-TreeView-content {
  width: 44px !important;
  height: 44px !important;
  min-height: 44px !important;
  margin: 6px 8px !important;
  padding: 0 !important;
  border-radius: 12px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: visible !important;
  transition: background .15s ease, transform .15s ease;
}

.t-PageBody--leftNavCollapsed .t-TreeNav .a-TreeView-icon,
.t-PageBody--leftNavCollapsed .t-TreeNav .a-TreeView-toggle {
  width: 22px !important;
  height: 22px !important;
  min-width: 22px !important;
  margin: 0 !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #a9b8e0 !important;
  font-size: 18px !important;
  line-height: 1 !important;
}

.t-PageBody--leftNavCollapsed .t-TreeNav .a-TreeView-label {
  display: none !important;
}

.t-PageBody--leftNavCollapsed .t-TreeNav .a-TreeView-row,
.t-PageBody--leftNavCollapsed .t-TreeNav .a-TreeView-node,
.t-PageBody--leftNavCollapsed .t-TreeNav .a-TreeView-content {
  overflow: visible !important;
}

/* Expanded nav base */
.t-TreeNav .a-TreeView-content {
  border-radius: var(--erp-radius-sm) !important;
  transition: background .15s ease, color .15s ease;
}

/* ============================================================
   REGIONS (cards)
   ============================================================ */
.t-Region {
  background: var(--erp-surface) !important;
  border: 1px solid var(--erp-border) !important;
  border-radius: var(--erp-radius) !important;
  box-shadow: var(--erp-shadow) !important;
  overflow: hidden !important;
}

.t-Region-header {
  min-height: 48px !important;
  padding: 0 16px !important;
  background: linear-gradient(180deg, #ffffff, var(--erp-navy-soft)) !important;
  border-bottom: 1px solid var(--erp-navy-border) !important;
  border-left: 4px solid var(--erp-primary) !important;
}

.t-Region-title {
  color: var(--erp-navy) !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  letter-spacing: .1px;
}

.t-Region-body {
  padding: 18px 24px !important;
}

/* ============================================================
   BUTTONS (sirf color / radius / shadow - size same)
   ============================================================ */
.t-Button {
  border-radius: var(--erp-radius-sm) !important;
  transition: background .15s ease, box-shadow .15s ease, transform .1s ease, border-color .15s ease;
}

.t-Button:not(.t-Button--icon):active {
  transform: translateY(1px);
}

/* Primary / Create */
.t-Button--hot,
.t-Button--primary {
  background: linear-gradient(135deg, var(--erp-primary), var(--erp-primary-2)) !important;
  border-color: transparent !important;
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(244, 81, 30, .28) !important;
}

.t-Button--hot:hover,
.t-Button--primary:hover {
  background: linear-gradient(135deg, var(--erp-primary-dark), var(--erp-primary)) !important;
  box-shadow: 0 6px 16px rgba(244, 81, 30, .36) !important;
}

/* Apply / Save */
.t-Button--success {
  background: linear-gradient(135deg, var(--erp-success), #43b85a) !important;
  border-color: transparent !important;
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(47, 158, 68, .26) !important;
}

.t-Button--success:hover {
  background: linear-gradient(135deg, var(--erp-success-dark), var(--erp-success)) !important;
}

/* Delete */
.t-Button--danger {
  background: linear-gradient(135deg, var(--erp-danger), #ea5a4f) !important;
  border-color: transparent !important;
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(214, 58, 47, .26) !important;
}

.t-Button--danger:hover {
  background: linear-gradient(135deg, var(--erp-danger-dark), var(--erp-danger)) !important;
}

/* Warning (amber) */
.t-Button--warning {
  background: linear-gradient(135deg, #f7b32b, #ffd166) !important;
  border-color: transparent !important;
  color: #3b2a00 !important;
  box-shadow: 0 4px 12px rgba(245, 165, 36, .28) !important;
}

.t-Button--warning:hover {
  background: linear-gradient(135deg, #e9a21a, #f7b32b) !important;
}

/* Normal / Cancel / Actions */
.t-Button:not(.t-Button--hot):not(.t-Button--primary):not(.t-Button--success):not(.t-Button--danger):not(.t-Button--warning):not(.t-Button--noUI):not(.t-Button--link):not(.t-Button--closeAlert):not(.ui-dialog-titlebar-close) {
  background-color: #ffffff;
  border: 1px solid var(--erp-border) !important;
  color: var(--erp-text-soft) !important;
  box-shadow: var(--erp-shadow-sm) !important;
}

.t-Button:not(.t-Button--hot):not(.t-Button--primary):not(.t-Button--success):not(.t-Button--danger):not(.t-Button--warning):not(.t-Button--noUI):not(.t-Button--link):not(.t-Button--closeAlert):not(.ui-dialog-titlebar-close):hover {
  background-color: var(--erp-primary-softer);
  border-color: #ffc2ad !important;
  color: var(--erp-primary-dark) !important;
}

.t-Button:focus-visible {
  outline: none !important;
  box-shadow: 0 0 0 2px var(--erp-focus) !important;
}

/* ============================================================
   FORMS (NO DOUBLE OUTLINE BORDER ON CLICK/FOCUS)
   ============================================================ */
.t-Form-label {
  color: var(--erp-text-soft) !important;
  font-size: 12px !important;
  font-weight: 500 !important;
}

.t-Form-fieldContainer--floatingLabel .t-Form-label {
  color: var(--erp-navy-2) !important;
  font-weight: 600 !important;
}

/* Outer container par koi extra border ya shadow nahi aayega */
.t-Form-fieldContainer,
.t-Form-fieldContainer--floatingLabel,
.t-Form-fieldContainer--floatingLabel:focus-within,
.t-Form-fieldContainer--floatingLabel.is-active,
.t-Form-inputContainer {
  box-shadow: none !important;
  outline: none !important;
}

.apex-item-text,
.apex-item-select,
.apex-item-textarea,
.apex-item-datepicker,
.select2-selection,
.a-IRR-search-field {
  border: 1px solid var(--erp-border) !important;
  border-radius: var(--erp-radius-sm) !important;
  background: var(--erp-surface) !important;
  color: var(--erp-text) !important;
  outline: none !important;
  box-shadow: none !important;
  transition: border-color .15s ease, background .15s ease;
}

.apex-item-text:hover,
.apex-item-select:hover,
.apex-item-textarea:hover,
.apex-item-datepicker:hover {
  border-color: #cbd5e1 !important;
}

/* Click / Focus par sirf clean 1px border (no double ring) */
.apex-item-text:focus,
.apex-item-select:focus,
.apex-item-textarea:focus,
.apex-item-datepicker:focus,
input.text_field:focus,
textarea.textarea:focus {
  border-color: var(--erp-primary) !important;
  box-shadow: none !important;
  outline: none !important;
  background: #fff !important;
}

/* Read-only / Display-only fields ka dotted outline khatam */
.apex-item-display-only,
.display_only,
input[readonly] {
  outline: none !important;
  box-shadow: none !important;
}

/* Switch / checkbox / radio accent */
.apex-item-switch input:checked + label,
.a-Switch input:checked + .a-Switch-toggle,
.a-Switch.is-checked .a-Switch-toggle {
  background-color: var(--erp-primary) !important;
}

input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--erp-primary);
}

/* ============================================================
   REPORTS / INTERACTIVE REPORT & GRID (CLEAN LIGHT LOOK)
   ============================================================ */
.a-IRR,
.a-GV {
  border: 1px solid var(--erp-border) !important;
  border-radius: var(--erp-radius-md) !important;
  overflow: hidden !important;
  background: #ffffff !important;
}

/* Grid body & scroll area hamesha white (kale rows khatam) */
.a-GV-bdy,
.a-GV-w-scroll,
.a-GV-w-hdr,
.a-GV-table,
.a-IRR-table {
  background: #ffffff !important;
  background-color: #ffffff !important;
  font-size: 12px !important;
}

/* Light Header */
.a-IRR-table th,
.a-GV-header,
.a-GV-headerGroup,
.t-Report-colHead {
  background: linear-gradient(180deg, #f6f8fd, var(--erp-navy-soft)) !important;
  color: var(--erp-navy) !important;
  font-weight: 600 !important;
  font-size: 100%;
  border-color: var(--erp-border) !important;
  letter-spacing: .1px;
  outline: none !important;
  box-shadow: none !important;
}

.a-IRR-table th a,
.a-IRR-headerLink,
.a-IRR-headerLabel,
.a-IRR-header,
.a-GV-header a,
.a-GV-headerLabel,
.a-GV-headerLabel span,
.t-Report-colHead a {
  color: var(--erp-navy) !important;
}

.a-IRR-header .a-IRR-sortWidget,
.a-IRR-header .a-Icon,
.a-GV-header .a-Icon {
  color: var(--erp-primary) !important;
}

/* All Grid & Report Rows White by default */
.a-GV-row,
.a-IRR-table tr,
.a-IRR-table td,
.a-GV-cell {
  background-color: #ffffff !important;
  border-color: var(--erp-border-soft) !important;
  color: var(--erp-text) !important;
  outline: none !important;
}

/* Subtle zebra */
.a-IRR-table tr:nth-child(even) td,
.a-GV-row:nth-child(even) .a-GV-cell {
  background-color: #fcfdff !important;
}

/* Hover + Selected Row */
.a-IRR-table tr:hover td,
.a-GV-row:hover .a-GV-cell {
  background-color: var(--erp-primary-softer) !important;
}

.a-GV-row.is-selected .a-GV-cell,
.a-GV-row.is-active .a-GV-cell {
  background-color: var(--erp-primary-soft) !important;
}

/* Grid Cell ya Column Header par outer box-shadow bilkul band (No Double Border) */
.a-GV-cell:focus,
.a-GV-cell.is-focused,
.a-GV-cell:focus-within,
.a-GV-header:focus,
.a-GV-header.is-focused,
.a-IRR-table th:focus,
.a-IRR-table td:focus,
.a-GV-columnItem {
  outline: none !important;
  box-shadow: none !important;
}

/* Sirf jab cell edit mode mein NA ho tab halka single highlight dikhe */
.a-GV-cell.is-focused:not(:focus-within) {
  box-shadow: inset 0 0 0 1px var(--erp-primary) !important;
}

/* Light Interactive Grid Footer ("1 rows selected" / "Total 1") */
.a-GV-footer,
.a-IRR-paginationWrap,
.t-Report-pagination {
  background: linear-gradient(180deg, #ffffff, var(--erp-navy-soft)) !important;
  color: var(--erp-navy-2) !important;
  border-top: 1px solid var(--erp-border) !important;
  border-color: var(--erp-border) !important;
}

.a-GV-status,
.a-GV-pagination,
.a-GV-pagination-label,
.a-GV-pageSelector,
.a-GV-footer .a-Icon {
  color: var(--erp-navy-2) !important;
}

/* IR toolbar / pagination */
.a-IRR-toolbar,
.a-IRR-controlsContainer {
  background: transparent !important;
}

.a-IRR-pagination-label,
.a-IRR-pagination-item,
.a-GV-pagination {
  color: var(--erp-navy-2) !important;
}

/* IG edit input: sirf EK single clean border (outer wrapper border 0) */
.a-GV-floatingItem,
.a-GV-floatingItemContent,
.a-GV-floatingItem-content,
.a-GV-columnItem {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  outline: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.a-GV-floatingItem-close,
.a-GV-floatingItem button[title="Close"],
.a-GV-floatingItemContent button[title="Close"],
.a-GV-floatingItem .a-Button--close,
.a-GV-floatingItemContent .a-Button--close,
.a-GV-floatingItem .ui-dialog-titlebar-close,
.a-GV-floatingItemContent .ui-dialog-titlebar-close {
  display: none !important;
}

.a-GV-floatingItem input,
.a-GV-floatingItem textarea,
.a-GV-floatingItem select,
.a-GV-floatingItemContent input,
.a-GV-floatingItemContent textarea,
.a-GV-floatingItemContent select,
.a-GV-columnItem input,
.a-GV-columnItem select,
.a-GV-columnItem input:focus,
.a-GV-columnItem select:focus {
  height: 100% !important;
  min-height: 28px !important;
  padding: 2px 6px !important;
  border: 1px solid var(--erp-primary) !important;
  border-radius: 0 !important;
  background: #ffffff !important;
  color: #111827 !important;
  box-shadow: none !important;
  font-size: 12px !important;
  font-weight: 400 !important;
  outline: none !important;
}

/* ============================================================
   DIALOGS / MODALS
   ============================================================ */
.ui-widget-overlay,
.ui-front.ui-widget-overlay {
  background: rgba(15, 23, 42, .5) !important;
  opacity: 1 !important;
  backdrop-filter: blur(2px);
}

.ui-dialog.ui-dialog--apex,
.ui-dialog {
  border: 0 !important;
  border-radius: 18px !important;
  box-shadow: var(--erp-shadow-lg) !important;
  overflow: hidden !important;
}

.ui-dialog .ui-dialog-titlebar,
.t-Dialog-header {
  background: linear-gradient(180deg, #ffffff, var(--erp-navy-soft)) !important;
  box-shadow: inset 0 3px 0 var(--erp-primary) !important;
  border-bottom: 1px solid var(--erp-border-soft) !important;
}

.ui-dialog .ui-dialog-title,
.t-Dialog-title {
  color: var(--erp-navy) !important;
  font-weight: 700 !important;
}

.ui-dialog .ui-dialog-titlebar-close {
  border-radius: var(--erp-radius-sm) !important;
  border: 1px solid #ffc2ad !important;
  background: var(--erp-primary-softer) !important;
  color: var(--erp-primary-dark) !important;
  transition: background .15s ease, box-shadow .15s ease;
}

.ui-dialog .ui-dialog-titlebar-close:hover {
  background: var(--erp-primary-soft) !important;
  box-shadow: 0 0 0 3px var(--erp-focus) !important;
}

.t-Dialog-footer,
.t-ButtonRegion--dialogFooter {
  background: #fbfcfe !important;
  border-top: 1px solid var(--erp-border-soft) !important;
}

.t-Dialog-page,
.t-Dialog-body {
  background: #ffffff !important;
}

/* ============================================================
   MENUS / POPUPS / DATEPICKER / TABS
   ============================================================ */
.a-Menu-content,
.ui-datepicker,
.a-PopupLOV-dialog,
.ui-menu {
  border: 1px solid var(--erp-border) !important;
  border-radius: var(--erp-radius-md) !important;
  box-shadow: 0 16px 40px rgba(15, 23, 42, .16) !important;
}

.a-Menu-item.is-focused > .a-Menu-label,
.a-Menu-item:hover > .a-Menu-label,
.ui-menu-item .ui-state-active {
  background: var(--erp-primary-soft) !important;
  color: var(--erp-primary-dark) !important;
}

.ui-datepicker .ui-state-active,
.ui-datepicker .ui-state-highlight.ui-state-active {
  background: var(--erp-primary) !important;
  border-color: var(--erp-primary) !important;
  color: #fff !important;
  border-radius: 6px !important;
}

.t-Tabs-link.is-active,
.t-TabsRegion-items .is-active a,
.a-Tabs-tab.is-active {
  color: var(--erp-navy) !important;
  border-bottom-color: var(--erp-primary) !important;
}

.t-BreadcrumbRegion a {
  color: var(--erp-muted) !important;
}

.t-BreadcrumbRegion a:hover {
  color: var(--erp-primary-dark) !important;
}

/* ============================================================
   BADGES
   ============================================================ */
.t-Badge {
  border-radius: 999px !important;
  font-weight: 600 !important;
  padding: 4px 10px !important;
}

.t-Badge--success { background: var(--erp-success-bg) !important; color: var(--erp-success-text) !important; }
.t-Badge--danger  { background: var(--erp-danger-bg)  !important; color: var(--erp-danger-text)  !important; }
.t-Badge--warning { background: var(--erp-warning-bg) !important; color: var(--erp-warning-text) !important; }
.t-Badge--info    { background: var(--erp-navy-soft)  !important; color: var(--erp-navy-2)       !important; }

/* ============================================================
   NAVY ACCENTS (extra touches)
   ============================================================ */
.t-Body-content h1, .t-Body-content h2, .t-Body-content h3, .t-Body-content h4,
.t-ContentBlock-title,
.t-Card-title {
  color: var(--erp-navy) !important;
}

.t-Header h1,
.t-Header .t-Header-logo,
.t-Header .t-Header-logo-link,
.t-Header .t-Header-logo a {
  color: #fff !important;
}

.t-Button:not(.t-Button--hot):not(.t-Button--primary):not(.t-Button--success):not(.t-Button--danger):not(.t-Button--warning):not(.t-Button--noUI):not(.t-Button--link):not(.t-Button--closeAlert):not(.ui-dialog-titlebar-close) {
  color: var(--erp-navy-2) !important;
  border-color: var(--erp-navy-border) !important;
}

.a-IRR-toolbar .a-Button,
.a-Toolbar .a-Button {
  color: var(--erp-navy-2) !important;
}

/* ============================================================
   V3 & V3.1 - Stronger Orange + Dark Navy Sidebar (#t_Body_nav Lock)
   ============================================================ */

/* ---- Header buttons: glass pill ---- */
.t-Header .t-Button.t-Button.t-Button.t-Button.t-Button.t-Button.t-Button.t-Button.t-Button.t-Button {
  background: rgba(255, 255, 255, .14) !important;
  border: 1px solid rgba(255, 255, 255, .32) !important;
  color: #fff !important;
  box-shadow: none !important;
}

.t-Header .t-Button.t-Button.t-Button.t-Button.t-Button.t-Button.t-Button.t-Button.t-Button.t-Button:hover {
  background: rgba(255, 255, 255, .26) !important;
  color: #fff !important;
}

.t-Header .t-Button .t-Icon,
.t-Header .t-Button .fa {
  color: #fff !important;
}

/* ---- Dark navy sidebar (ID + Class Lock) ---- */
#t_Body_nav,
.t-Body-nav {
  background: linear-gradient(180deg, #16254d 0%, #1d2f63 100%) !important;
  border-right: 0 !important;
  box-shadow: 4px 0 24px rgba(22, 37, 77, .28) !important;
  --a-treeview-row-hover-background-color: rgba(255, 255, 255, .12) !important;
  --a-treeview-row-selected-background-color: rgba(244, 81, 30, .26) !important;
  --a-treeview-row-focused-background-color: rgba(255, 255, 255, .12) !important;
  --ut-tree-row-hover-background-color: rgba(255, 255, 255, .12) !important;
  --ut-tree-row-selected-background-color: rgba(244, 81, 30, .26) !important;
}

#t_Body_nav #t_TreeNav,
.t-Body-nav .t-TreeNav,
.t-Body-nav .a-TreeView {
  background: transparent !important;
}

/* Clear any cream/light backgrounds on all tree elements & rows */
#t_Body_nav #t_TreeNav ul,
#t_Body_nav #t_TreeNav li,
#t_Body_nav #t_TreeNav .a-TreeView-node,
#t_Body_nav #t_TreeNav .a-TreeView-node:hover,
#t_Body_nav #t_TreeNav .a-TreeView-node.is-hover,
#t_Body_nav #t_TreeNav .a-TreeView-row,
#t_Body_nav #t_TreeNav .a-TreeView-row:hover,
#t_Body_nav #t_TreeNav .a-TreeView-row.is-hover,
#t_Body_nav #t_TreeNav .a-TreeView-row.is-focused,
#t_Body_nav #t_TreeNav ul ul .a-TreeView-row,
#t_Body_nav #t_TreeNav ul ul .a-TreeView-row:hover,
#t_Body_nav #t_TreeNav ul ul .a-TreeView-row.is-hover,
#t_Body_nav #t_TreeNav .a-TreeView-content,
#t_Body_nav #t_TreeNav .a-TreeView-label,
#t_Body_nav #t_TreeNav .a-TreeView-label:hover {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
}

/* Expanded child group: thora gehra navy panel */
#t_Body_nav #t_TreeNav ul ul,
.t-Body-nav .t-TreeNav ul ul {
  background: rgba(8, 16, 42, .32) !important;
  background-color: rgba(8, 16, 42, .32) !important;
}

/* Default text & icon colors */
#t_Body_nav #t_TreeNav .a-TreeView-content,
.t-TreeNav .a-TreeView-content {
  color: #c7d2ee !important;
}

/* Sub-menu text readable (sirf ul ul par taake collapsed nav kharab na ho) */
#t_Body_nav #t_TreeNav ul ul .a-TreeView-content,
#t_Body_nav #t_TreeNav ul ul .a-TreeView-label,
.t-Body-nav .t-TreeNav ul ul .a-TreeView-content,
.t-Body-nav .t-TreeNav ul ul .a-TreeView-label {
  color: #dbe3f7 !important;
}

#t_Body_nav #t_TreeNav .a-TreeView-icon,
#t_Body_nav #t_TreeNav .a-TreeView-toggle,
#t_Body_nav #t_TreeNav ul ul .a-TreeView-icon,
.t-TreeNav .a-TreeView-icon,
.t-TreeNav .a-TreeView-toggle,
.t-PageBody--leftNavCollapsed .t-TreeNav .a-TreeView-icon,
.t-PageBody--leftNavCollapsed .t-TreeNav .a-TreeView-toggle {
  color: #a9b8e0 !important;
}

/* Rows ke darmiyan halki line */
#t_Body_nav #t_TreeNav .a-TreeView-row,
.t-Body-nav .a-TreeView-row {
  border-bottom: 1px solid rgba(255, 255, 255, .06) !important;
}

/* Expand arrows */
#t_Body_nav #t_TreeNav .a-TreeView-toggle,
#t_Body_nav #t_TreeNav .a-TreeView-toggle .a-Icon {
  color: #8fa2d4 !important;
}

/* Hover state on Main & Sub-menu (Dark Navy highlight + White text) */
#t_Body_nav #t_TreeNav .a-TreeView-content:hover,
#t_Body_nav #t_TreeNav .a-TreeView-content.is-hover,
#t_Body_nav #t_TreeNav ul ul .a-TreeView-content:hover,
#t_Body_nav #t_TreeNav ul ul .a-TreeView-content.is-hover,
#t_Body_nav #t_TreeNav .a-TreeView-row.is-hover + .a-TreeView-content,
#t_Body_nav #t_TreeNav ul ul .a-TreeView-row.is-hover + .a-TreeView-content,
#t_Body_nav #t_TreeNav .a-TreeView-node:hover > .a-TreeView-content,
.t-PageBody--leftNavCollapsed .t-TreeNav .a-TreeView-content:hover {
  background: rgba(255, 255, 255, .14) !important;
  background-color: rgba(255, 255, 255, .14) !important;
  color: #ffffff !important;
}

#t_Body_nav #t_TreeNav ul ul .a-TreeView-content:hover .a-TreeView-label,
#t_Body_nav #t_TreeNav ul ul .a-TreeView-content.is-hover .a-TreeView-label,
#t_Body_nav #t_TreeNav ul ul .a-TreeView-row.is-hover + .a-TreeView-content .a-TreeView-label,
#t_Body_nav #t_TreeNav ul ul .a-TreeView-node:hover > .a-TreeView-content .a-TreeView-label {
  color: #ffffff !important;
}

#t_Body_nav #t_TreeNav .a-TreeView-content:hover .a-TreeView-icon,
#t_Body_nav #t_TreeNav .a-TreeView-content:hover .a-TreeView-toggle,
#t_Body_nav #t_TreeNav ul ul .a-TreeView-content:hover .a-TreeView-icon,
#t_Body_nav #t_TreeNav ul ul .a-TreeView-row.is-hover + .a-TreeView-content .a-TreeView-icon,
#t_Body_nav #t_TreeNav .a-TreeView-row.is-hover + .a-TreeView-content .a-TreeView-icon,
.t-PageBody--leftNavCollapsed .t-TreeNav .a-TreeView-content:hover .a-TreeView-icon,
.t-PageBody--leftNavCollapsed .t-TreeNav .a-TreeView-content:hover .a-TreeView-toggle {
  color: #ffb199 !important;
}

/* Selected / Current item on Main & Sub-menu */
#t_Body_nav #t_TreeNav .a-TreeView-content.is-selected,
#t_Body_nav #t_TreeNav .a-TreeView-content.is-current,
#t_Body_nav #t_TreeNav .a-TreeView-content[aria-current="page"],
#t_Body_nav #t_TreeNav ul ul .a-TreeView-content.is-selected,
#t_Body_nav #t_TreeNav ul ul .a-TreeView-content.is-current,
#t_Body_nav #t_TreeNav .a-TreeView-row.is-selected + .a-TreeView-content,
.t-PageBody--leftNavCollapsed .t-TreeNav .a-TreeView-content.is-selected,
.t-PageBody--leftNavCollapsed .t-TreeNav .a-TreeView-content.is-current,
.t-PageBody--leftNavCollapsed .t-TreeNav .a-TreeView-content[aria-current="page"] {
  background: rgba(244, 81, 30, .28) !important;
  background-color: rgba(244, 81, 30, .28) !important;
  color: #ffffff !important;
  box-shadow: inset 3px 0 0 #ff7a45 !important;
}

#t_Body_nav #t_TreeNav .a-TreeView-content.is-selected .a-TreeView-icon,
#t_Body_nav #t_TreeNav .a-TreeView-content.is-current .a-TreeView-icon,
#t_Body_nav #t_TreeNav .a-TreeView-content[aria-current="page"] .a-TreeView-icon,
#t_Body_nav #t_TreeNav ul ul .a-TreeView-content.is-selected .a-TreeView-icon,
#t_Body_nav #t_TreeNav ul ul .a-TreeView-content.is-current .a-TreeView-icon {
  color: #ffb199 !important;
}

/* ---- Row hover: orange left indicator ---- */
.a-IRR-table tr:hover td:first-child,
.a-GV-row:hover .a-GV-cell:first-child {
  box-shadow: inset 3px 0 0 var(--erp-primary);
}

/* Smart Filter / facets: navy touch */
.a-FC-label,
.a-FC-header,
.t-Facets-title {
  color: var(--erp-navy) !important;
}

.a-FC-checkbox:checked + label::before,
.a-FC-item.is-selected .a-FC-checkbox {
  background-color: var(--erp-primary) !important;
  border-color: var(--erp-primary) !important;
}

/* ============================================================
   NUMERIC UTILITY
   ============================================================ */
.num-display,
.num-display span,
.num-display .display_only,
.num-display .apex-item-display-only,
.a-IRR-table td[headers*="AMT"],
.a-IRR-table td[headers*="BAL"],
.a-IRR-table td[headers*="QTY"],
.a-IRR-table td[headers*="RATE"] {
  text-align: right !important;
  font-variant-numeric: tabular-nums !important;
}

/* ============================================================
   MOBILE
   ============================================================ */
@media (max-width: 768px) {
  .t-Region-body {
    padding: 14px !important;
  }

  .t-Button:not(.t-Button--icon) {
    min-height: 38px !important;
  }
}

/* ============================================================
   REDWOOD STYLE PAGE ALERTS
   ============================================================ */
.t-Alert.t-Alert--page {
  --al-accent: #d97706;
  --al-tint: #fff4dd;
  --al-icon: "!";

  min-width: 360px !important;
  max-width: 520px !important;
  background: #ffffff !important;
  color: #161513 !important;
  border: 1px solid #e4e1de !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  box-shadow:
    inset 5px 0 0 var(--al-accent),
    0 12px 32px rgba(22, 21, 19, .16),
    0 2px 6px rgba(22, 21, 19, .08) !important;
  animation: dtyToastIn .32s cubic-bezier(.2, .9, .2, 1) both;
}

.t-Alert--page {
  top: 18px !important;
  right: 22px !important;
}

.t-Alert--success,
#APEX_SUCCESS_MESSAGE,
#t_Alert_Success {
  --al-accent: #2e8540;
  --al-tint: #e6f4ea;
  --al-icon: "✓";
}

.t-Alert--warning,
#t_Alert_Notification {
  --al-accent: #d97706;
  --al-tint: #fff4dd;
  --al-icon: "!";
}

.t-Alert--danger {
  --al-accent: #c74634;
  --al-tint: #fde8e5;
  --al-icon: "✕";
}

.t-Alert--info {
  --al-accent: #2a3f73;
  --al-tint: #eef2fa;
  --al-icon: "i";
}

.t-Alert.t-Alert--page,
.t-Alert.t-Alert--page .t-Alert-wrap,
.t-Alert.t-Alert--page .t-Alert-content,
.t-Alert.t-Alert--page .t-Alert-body {
  color: #161513 !important;
}

.t-Alert.t-Alert--page .t-Alert-wrap {
  position: relative !important;
  display: grid !important;
  grid-template-columns: 38px 1fr !important;
  column-gap: 14px !important;
  align-items: start !important;
  padding: 16px 46px 16px 22px !important;
  background: transparent !important;
}

.t-Alert.t-Alert--page .t-Alert-icon {
  position: static !important;
  width: 38px !important;
  height: 38px !important;
  min-width: 38px !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 50% !important;
  background: var(--al-tint) !important;
  display: grid !important;
  place-items: center !important;
  overflow: hidden !important;
  line-height: 1 !important;
}

.t-Alert.t-Alert--page .t-Alert-icon .fa,
.t-Alert.t-Alert--page .t-Alert-icon .t-Icon {
  display: none !important;
}

.t-Alert.t-Alert--page .t-Alert-icon::before {
  content: var(--al-icon) !important;
  width: 22px !important;
  height: 22px !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 50% !important;
  background: var(--al-accent) !important;
  color: #fff !important;
  display: grid !important;
  place-items: center !important;
  font: 800 13px/1 Arial, sans-serif !important;
  text-align: center !important;
}

.t-Alert-content {
  padding: 0 !important;
  margin: 0 !important;
  min-height: 38px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.t-Alert-title {
  margin: 0 0 3px 0 !important;
  font-size: 15px !important;
  line-height: 1.3 !important;
  font-weight: 700 !important;
  color: #161513 !important;
}

.t-Alert-body {
  font-size: 13px !important;
  line-height: 1.5 !important;
  font-weight: 400 !important;
  color: #4a4745 !important;
}

.t-Alert-body ul {
  margin: 6px 0 0 16px !important;
  padding: 0 !important;
}

.t-Alert-body li {
  margin: 2px 0 !important;
}

.t-Alert-buttons,
.t-Alert-close {
  position: absolute !important;
  top: 10px !important;
  right: 10px !important;
  margin: 0 !important;
}

.t-Button--closeAlert,
.t-Alert-buttons button {
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: transparent !important;
  color: #6b6764 !important;
  box-shadow: none !important;
  transition: background .15s ease, color .15s ease;
}

.t-Button--closeAlert:hover,
.t-Alert-buttons button:hover {
  background: #f1efed !important;
  color: #161513 !important;
}

.t-Button--closeAlert .t-Icon,
.t-Alert-buttons button .t-Icon {
  color: inherit !important;
}

@keyframes dtyToastIn {
  from {
    opacity: 0;
    transform: translate3d(24px, -10px, 0) scale(.97);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}