/* ==========================================================
   AG GRID — PREMIUM THEME  v2
   Design language: Linear · Stripe · Mantine · Ramp
   Palette: strictly CLIENT_COLORS
   —
   v2 fixes:
   · Dramatically reduced row / header height — less blocky
   · Tight, intentional spacing system (3px base)
   · text-overflow: ellipsis on ALL cells — no more bleed
   · Filter inputs are hairline-bordered, minimal, near-invisible
   · Column separators suppressed in body; ghost lines only in header
   · Font size pulled to 13px for density without sacrifice
   · Transitions everywhere for premium feel
   · Yellow accent is surgical — selection bar, checkbox, focus only
========================================================== */

/* ==========================================================
   CSS VARIABLES — DESIGN TOKENS
========================================================== */
.ag-theme-alpine,
.ag-theme-client {
  /* Brand palette */
  --color-yellow-light:  #FCE5B0;
  --color-yellow-base:   #FCBB4E;
  --color-yellow-dark:   #B07D10;
  --color-white-light:   #FFFFFF;
  --color-white-base:    #FAF7F2;
  --color-white-dark:    #E4E0D9;
  --color-black-light:   #514F59;
  --color-black-base:    #1E1B18;
  --color-black-dark:    #141318;
  --color-green-light:   #BFE8C6;
  --color-green-base:    #2FBF71;
  --color-green-dark:    #1F7A46;

  /* Semantic tokens */
  --surface-page:        var(--color-white-light);
  --surface-subtle:      var(--color-white-base);
  --surface-divider:     var(--color-white-dark);
  --surface-header:      var(--color-black-base);
  --surface-header-deep: var(--color-black-dark);

  --text-primary:        var(--color-black-base);
  --text-secondary:      var(--color-black-light);
  --text-header:         var(--color-white-base);

  --accent:              var(--color-yellow-base);
  --accent-light:        var(--color-yellow-light);
  --accent-dark:         var(--color-yellow-dark);

  --shadow-popup:
    0 2px 8px rgba(20,19,24,0.10),
    0 8px 32px rgba(20,19,24,0.08);

  --radius-sm: 3px;
  --radius-md: 5px;
  --radius-lg: 8px;

  --transition-fast: 110ms ease;
  --transition-base: 160ms ease;
}


/* ==========================================================
   SCROLLBARS — hairline, barely there
========================================================== */
.ag-theme-alpine ::-webkit-scrollbar,
.ag-theme-client ::-webkit-scrollbar {
  width:  5px;
  height: 5px;
}

.ag-theme-alpine ::-webkit-scrollbar-track,
.ag-theme-client ::-webkit-scrollbar-track {
  background: transparent;
}

.ag-theme-alpine ::-webkit-scrollbar-thumb,
.ag-theme-client ::-webkit-scrollbar-thumb {
  background-color: var(--color-white-dark);
  border-radius:    99px;
  transition:       background-color var(--transition-fast);
}

.ag-theme-alpine ::-webkit-scrollbar-thumb:hover,
.ag-theme-client ::-webkit-scrollbar-thumb:hover {
  background-color: var(--color-black-light);
}

.ag-theme-alpine ::-webkit-scrollbar-corner,
.ag-theme-client ::-webkit-scrollbar-corner {
  background: transparent;
}


/* ==========================================================
   AG GRID — BASE THEME (ag-theme-alpine)
   Key sizing decisions:
   · row-height 36px  (was 44px) — less blocky, more data visible
   · header-height 38px           — proportional to rows
   · font-size 13px               — sharper, more data-table feel
   · grid-size 3px                — tighter internal gutters
   · cell padding 10px            — breathing room without bulk
========================================================== */
.ag-theme-alpine {
  font-family:    var(--app-font, inherit) !important;
  font-weight:    400;
  letter-spacing: -0.01em;
  text-align:     center;

  --ag-font-family:    var(--app-font, inherit) !important;
  --ag-font-size:      13px !important;
  --ag-grid-size:      3px !important;

  /* Surface */
  --ag-foreground-color:           var(--text-primary) !important;
  --ag-background-color:           var(--surface-page) !important;
  --ag-odd-row-background-color:   var(--surface-subtle) !important;
  --ag-border-color:               var(--surface-divider) !important;
  --ag-row-border-color:           var(--color-white-dark) !important;
  --ag-secondary-foreground-color: var(--text-secondary) !important;

  /* Header */
  --ag-header-foreground-color:   var(--text-header) !important;
  --ag-header-background-color:   var(--surface-header) !important;
  --ag-header-font-weight:        600 !important;

  /* Column separators — ghost lines in header, none in body */
  --ag-header-column-separator-display:       block !important;
  --ag-header-column-separator-color:         rgba(255,255,255,0.06) !important;
  --ag-header-column-separator-height:        40% !important;
  --ag-header-column-resize-handle-display:   block !important;
  --ag-header-column-resize-handle-color:     rgba(255,255,255,0.12) !important;
  --ag-header-column-resize-handle-height:    28% !important;
  --ag-cell-horizontal-border:                none !important;

  /* Interaction */
  --ag-row-hover-color:               rgba(252,187,78,0.07) !important;
  --ag-selected-row-background-color: rgba(252,187,78,0.11) !important;

  /* Range selection */
  --ag-range-selection-border-color:     var(--color-yellow-base) !important;
  --ag-range-selection-background-color: rgba(252,187,78,0.07) !important;

  /* Checkbox */
  --ag-checkbox-checked-color:       var(--color-yellow-base) !important;
  --ag-checkbox-unchecked-color:     var(--color-white-dark) !important;
  --ag-checkbox-indeterminate-color: var(--color-yellow-base) !important;

  /* Input */
  --ag-input-focus-border-color: var(--color-yellow-base) !important;
  --ag-input-border-color:       var(--surface-divider) !important;

  /* Popups */
  --ag-card-shadow:  var(--shadow-popup) !important;
  --ag-popup-shadow: var(--shadow-popup) !important;

  /* Sizing — tighter than v1 */
  --ag-cell-horizontal-padding: 10px !important;
  --ag-row-height:              36px !important;
  --ag-header-height:           38px !important;
  --ag-list-item-height:        28px !important;
}


/* ----------------------------------------------------------
   WRAPPER
---------------------------------------------------------- */
.ag-theme-alpine .ag-root-wrapper {
  border:        1px solid var(--surface-divider);
  border-radius: var(--radius-lg);
  overflow:      hidden;
  background:    var(--surface-page);
  /* Subtle lift so grid reads as a card */
  box-shadow:    0 1px 3px rgba(20,19,24,0.06), 0 1px 2px rgba(20,19,24,0.04);
}


/* ----------------------------------------------------------
   HEADER
   Dark surface, refined uppercase labels at 10px / 700 weight.
   Thinner than before — 38px feels purposeful, not heavy.
---------------------------------------------------------- */
.ag-theme-alpine .ag-header {
  background:    var(--surface-header) !important;
  border-bottom: 1px solid var(--surface-header-deep) !important;
}

.ag-theme-alpine .ag-header-row {
  background: var(--surface-header) !important;
}

.ag-theme-alpine .ag-header-cell {
  padding:    0 10px;
  transition: background var(--transition-fast);
}

.ag-theme-alpine .ag-header-cell:hover {
  background: rgba(255,255,255,0.035) !important;
}

.ag-theme-alpine .ag-header-cell-label {
  display:         flex;
  align-items:     center;
  justify-content: center;
  gap:             5px;
  font-size:       10px !important;
  font-weight:     700 !important;
  text-transform:  uppercase;
  letter-spacing:  0.08em;
  color:           var(--text-header) !important;
  opacity:         0.75;
  white-space:     nowrap;
  overflow:        hidden;
  /* Prevent header text overflow too */
  text-overflow:   ellipsis;
  transition:      opacity var(--transition-fast);
}

.ag-theme-alpine .ag-header-cell:hover .ag-header-cell-label {
  opacity: 1;
}

/* Sort icons */
.ag-theme-alpine .ag-sort-indicator-icon,
.ag-theme-alpine .ag-sort-ascending-icon,
.ag-theme-alpine .ag-sort-descending-icon,
.ag-theme-alpine .ag-sort-none-icon {
  color:     var(--color-yellow-base) !important;
  font-size: 11px;
  opacity:   0.85;
  flex-shrink: 0;
}

/* Filter/menu icon */
.ag-theme-alpine .ag-header-icon {
  color:   var(--color-yellow-base) !important;
  opacity: 0.7;
  transition: opacity var(--transition-fast);
}
.ag-theme-alpine .ag-header-icon:hover {
  opacity: 1;
}


/* ----------------------------------------------------------
   FILTER ROW (the inline input row below the header)
   This is the main source of "blocky, amateur" feeling.
   We make it near-invisible — hairline borders, no background,
   very compact inputs that feel part of the surface.
---------------------------------------------------------- */
.ag-theme-alpine .ag-header-row.ag-header-row-column-filter {
  background: var(--surface-header-deep) !important;
  border-top: none !important;
  height:     30px !important;
}

/* Filter input cell wrapper */
.ag-theme-alpine .ag-floating-filter {
  padding:    0 6px;
  background: transparent;
}

/* The actual input element */
.ag-theme-alpine .ag-floating-filter-input,
.ag-theme-alpine .ag-text-field-input,
.ag-theme-alpine .ag-floating-filter input {
  height:           22px !important;
  min-height:       22px !important;
  background:       rgba(255,255,255,0.06) !important;
  border:           1px solid rgba(255,255,255,0.1) !important;
  border-radius:    var(--radius-sm) !important;
  color:            var(--color-white-base) !important;
  font-size:        11px !important;
  padding:          0 7px !important;
  outline:          none !important;
  transition:
    border-color var(--transition-fast),
    background   var(--transition-fast),
    box-shadow   var(--transition-fast);
  /* Full width so it fills its column */
  width:            100% !important;
  box-sizing:       border-box !important;
}

.ag-theme-alpine .ag-floating-filter input:focus,
.ag-theme-alpine .ag-text-field-input:focus {
  border-color: var(--color-yellow-base) !important;
  background:   rgba(252,187,78,0.08) !important;
  box-shadow:   0 0 0 2px rgba(252,187,78,0.15) !important;
  color:        var(--color-white-light) !important;
}

/* Filter button icon (the funnel icon after the input) */
.ag-theme-alpine .ag-floating-filter-button {
  margin-left: 4px;
}

.ag-theme-alpine .ag-floating-filter-button button {
  background:    transparent;
  border:        none;
  color:         rgba(255,255,255,0.35);
  cursor:        pointer;
  padding:       0;
  width:         16px;
  height:        16px;
  display:       flex;
  align-items:   center;
  justify-content: center;
  transition:    color var(--transition-fast);
}

.ag-theme-alpine .ag-floating-filter-button button:hover {
  color: var(--color-yellow-base);
}


/* ----------------------------------------------------------
   ROWS
   Thinner, tighter, cleaner. Key change: text-overflow on
   every cell so long content never bleeds.
---------------------------------------------------------- */
.ag-theme-alpine .ag-row {
  border-bottom: 1px solid var(--color-white-dark);
  transition:
    background var(--transition-fast),
    box-shadow  var(--transition-fast);
  font-size: 13px;
  color:     var(--text-primary);
}

.ag-theme-alpine .ag-row-even {
  background: var(--surface-page);
}

.ag-theme-alpine .ag-row-odd {
  background: var(--surface-subtle);
}

.ag-theme-alpine .ag-row:not(.ag-row-selected):hover {
  background: rgba(252,187,78,0.065) !important;
}

/* Selected row — left accent bar, warm yellow wash */
.ag-theme-alpine .ag-row-selected {
  background:  rgba(252,187,78,0.11) !important;
  border-left: 2px solid var(--color-yellow-base) !important;
}

.ag-theme-alpine .ag-row:last-child {
  border-bottom: none;
}


/* ----------------------------------------------------------
   CELLS
   text-overflow: ellipsis is the single most important fix.
   Every cell must clip, not bleed.
---------------------------------------------------------- */
.ag-theme-alpine .ag-cell {
  padding:         0 10px;
  line-height:     36px;
  /* THE FIX — prevent text overflow from bleeding past column */
  overflow:        hidden;
  text-overflow:   ellipsis;
  white-space:     nowrap;
  display:         block; /* block for ellipsis to work with AG Grid */
  border-right:    none !important;
  transition:      background var(--transition-fast);
}

/* Re-center content inside block cells using leading-trim trick */
.ag-theme-alpine .ag-cell-wrapper {
  display:     flex;
  align-items: center;
  height:      100%;
  overflow:    hidden;
}

.ag-theme-alpine .ag-cell-value {
  overflow:      hidden;
  text-overflow: ellipsis;
  white-space:   nowrap;
  width:         100%;
}

/* Focus ring — yellow, no browser blue */
.ag-theme-alpine .ag-cell-focus:not(.ag-cell-range-selected) {
  border:        1px solid var(--color-yellow-base) !important;
  border-radius: var(--radius-sm);
  outline:       none !important;
  box-shadow:    0 0 0 2px rgba(252,187,78,0.15);
}

/* Keyboard nav */
.ag-theme-alpine .ag-cell.ag-cell-keyboard-focus {
  box-shadow:   0 0 0 2px var(--color-yellow-base) !important;
  border-radius: var(--radius-sm);
  z-index:      2;
}


/* ----------------------------------------------------------
   LINKS
---------------------------------------------------------- */
.ag-theme-alpine a {
  color:           var(--text-primary) !important;
  text-decoration: none;
  font-weight:     600;
  border-bottom:   1px solid transparent;
  transition:
    border-color var(--transition-fast),
    color        var(--transition-fast);
}

.ag-theme-alpine a:hover {
  color:               var(--color-black-dark) !important;
  border-bottom-color: var(--color-yellow-base);
}


/* ----------------------------------------------------------
   STRIKE-THROUGH ROWS (preserved from v1)
---------------------------------------------------------- */
.ag-theme-alpine .ag-row.ag-grid-strike .ag-cell[col-id="campaign"],
.ag-theme-alpine .ag-row.ag-grid-strike .ag-cell[col-id="data_status"],
.ag-theme-alpine .ag-row.ag-grid-strike .ag-cell[col-id="status"] {
  text-decoration: line-through !important;
  color:           #b91c1c !important;
  font-weight:     bold;
}


/* ----------------------------------------------------------
   CHECKBOXES
---------------------------------------------------------- */
.ag-theme-alpine .ag-checkbox-input-wrapper {
  border-radius: var(--radius-sm);
  transition:    box-shadow var(--transition-fast);
}

.ag-theme-alpine .ag-checkbox-input-wrapper:focus-within {
  box-shadow: 0 0 0 2px rgba(252,187,78,0.3);
}

.ag-theme-alpine .ag-checkbox-input-wrapper.ag-checked::after {
  color: var(--color-black-dark) !important;
}


/* ----------------------------------------------------------
   COLUMN RESIZE HANDLE
---------------------------------------------------------- */
.ag-theme-alpine .ag-header-cell-resize {
  width:      2px;
  opacity:    0;
  cursor:     col-resize;
  transition: opacity var(--transition-fast);
}

.ag-theme-alpine .ag-header-cell:hover .ag-header-cell-resize {
  opacity: 1;
}

.ag-theme-alpine .ag-header-cell-resize::after {
  background-color: var(--color-yellow-base);
  border-radius:    1px;
}


/* ----------------------------------------------------------
   FILTER POPUP / COLUMN MENU
   Feels like a Mantine Popover — card with elevation.
---------------------------------------------------------- */
.ag-theme-alpine .ag-popup,
.ag-theme-alpine .ag-menu,
.ag-theme-alpine .ag-filter {
  background:    var(--surface-page);
  border:        1px solid var(--surface-divider);
  border-radius: var(--radius-lg);
  box-shadow:    var(--shadow-popup);
  padding:       4px 0;
}

.ag-theme-alpine .ag-menu-option {
  padding:    7px 12px;
  font-size:  12px;
  color:      var(--text-primary);
  cursor:     pointer;
  transition: background var(--transition-fast);
  white-space: nowrap;
}

.ag-theme-alpine .ag-menu-option:hover,
.ag-theme-alpine .ag-menu-option-active {
  background: var(--accent-light);
  color:      var(--color-black-dark);
}

.ag-theme-alpine .ag-menu-separator {
  border-top: 1px solid var(--surface-divider);
  margin:     3px 0;
}

/* Filter panel inputs (inside popup, different from floating filter) */
.ag-theme-alpine .ag-filter-body-wrapper input,
.ag-theme-alpine .ag-filter-body-wrapper select,
.ag-theme-alpine .ag-picker-field-wrapper {
  height:        28px !important;
  background:    var(--surface-page);
  border:        1px solid var(--surface-divider) !important;
  border-radius: var(--radius-sm) !important;
  color:         var(--text-primary);
  font-size:     12px;
  padding:       0 8px;
  outline:       none;
  width:         100%;
  box-sizing:    border-box;
  transition:
    border-color var(--transition-fast),
    box-shadow   var(--transition-fast);
}

.ag-theme-alpine .ag-filter-body-wrapper input:focus,
.ag-theme-alpine .ag-filter-body-wrapper select:focus {
  border-color: var(--color-yellow-base) !important;
  box-shadow:   0 0 0 2px rgba(252,187,78,0.15);
}


/* ----------------------------------------------------------
   PAGINATION — refined, tight
---------------------------------------------------------- */
.ag-theme-alpine .ag-paging-panel {
  border-top:      1px solid var(--surface-divider);
  padding:         6px 14px;
  font-size:       11px;
  color:           var(--text-secondary);
  background:      var(--surface-subtle);
  display:         flex;
  align-items:     center;
  justify-content: flex-end;
  gap:             4px;
  min-height:      34px;
}

.ag-theme-alpine .ag-paging-button {
  border:        1px solid var(--surface-divider);
  border-radius: var(--radius-sm);
  background:    var(--surface-page);
  color:         var(--text-primary);
  padding:       3px 8px;
  font-size:     11px;
  cursor:        pointer;
  transition:
    background    var(--transition-fast),
    border-color  var(--transition-fast);
  line-height:   1;
  height:        24px;
  display:       inline-flex;
  align-items:   center;
}

.ag-theme-alpine .ag-paging-button:hover:not([disabled]) {
  background:   var(--accent-light);
  border-color: var(--color-yellow-base);
  color:        var(--color-black-dark);
}

.ag-theme-alpine .ag-paging-button[disabled] {
  opacity: 0.3;
  cursor:  default;
}

.ag-theme-alpine .ag-paging-page-summary-panel {
  font-weight: 600;
  color:       var(--text-primary);
  font-size:   11px;
}


/* ----------------------------------------------------------
   ROW GROUPING / COLUMN DROP PANELS
---------------------------------------------------------- */
.ag-theme-alpine .ag-column-drop {
  background:    var(--surface-subtle);
  border-bottom: 1px solid var(--surface-divider);
  padding:       5px 8px;
  min-height:    32px;
}

.ag-theme-alpine .ag-column-drop-cell {
  background:    var(--color-white-dark);
  border:        1px solid var(--surface-divider);
  border-radius: var(--radius-sm);
  font-size:     11px;
  font-weight:   600;
  color:         var(--text-primary);
  padding:       2px 7px;
  height:        22px;
  transition:    background var(--transition-fast);
}

.ag-theme-alpine .ag-column-drop-cell:hover {
  background:   var(--accent-light);
  border-color: var(--color-yellow-base);
}

/* Group rows */
.ag-theme-alpine .ag-row-group {
  background:  var(--color-white-dark) !important;
  font-weight: 600;
  font-size:   11px;
  letter-spacing: 0.025em;
}

.ag-theme-alpine .ag-row-group:hover {
  background: var(--accent-light) !important;
}

.ag-theme-alpine .ag-group-expanded .ag-icon,
.ag-theme-alpine .ag-group-contracted .ag-icon {
  color: var(--color-yellow-base);
}


/* ----------------------------------------------------------
   LOADING / NO-ROWS OVERLAYS
---------------------------------------------------------- */
.ag-theme-alpine .ag-overlay-loading-wrapper {
  background:     rgba(255,255,255,0.7);
  backdrop-filter: blur(3px);
}

.ag-theme-alpine .ag-overlay-loading-center {
  background:    var(--surface-page);
  border:        1px solid var(--surface-divider);
  border-radius: var(--radius-lg);
  box-shadow:    var(--shadow-popup);
  padding:       12px 20px;
  font-size:     12px;
  font-weight:   600;
  color:         var(--text-secondary);
}

.ag-theme-alpine .ag-overlay-no-rows-center {
  font-size:   13px;
  font-weight: 500;
  color:       var(--text-secondary);
  opacity:     0.6;
}


/* ----------------------------------------------------------
   STATUS BAR
---------------------------------------------------------- */
.ag-theme-alpine .ag-status-bar {
  border-top:  1px solid var(--surface-divider);
  background:  var(--surface-subtle);
  padding:     4px 14px;
  font-size:   11px;
  color:       var(--text-secondary);
  min-height:  30px;
  display:     flex;
  align-items: center;
}

.ag-theme-alpine .ag-status-name-value-value {
  font-weight: 700;
  color:       var(--text-primary);
}


/* ==========================================================
   DENSITY VARIANTS
========================================================== */

/* --- COMPACT — maximum data density --- */
.ag-theme-alpine.compact {
  --ag-font-size:               11px !important;
  --ag-grid-size:               2px !important;
  --ag-row-height:              28px !important;
  --ag-header-height:           30px !important;
  --ag-cell-horizontal-padding: 8px !important;
}

.ag-theme-alpine.compact .ag-cell {
  font-size:   11px;
  line-height: 28px;
}

.ag-theme-alpine.compact .ag-header-cell-label {
  justify-content: center;
  font-size:       9px !important;
  font-weight:     700 !important;
  letter-spacing:  0.09em;
}

/* Filter row in compact mode */
.ag-theme-alpine.compact .ag-header-row.ag-header-row-column-filter {
  height: 24px !important;
}
.ag-theme-alpine.compact .ag-floating-filter input {
  height: 18px !important;
  min-height: 18px !important;
  font-size: 10px !important;
}


/* --- THICC — executive / dashboard view with more breathing room --- */
.ag-theme-alpine.thicc {
  --ag-font-size:               14px !important;
  --ag-grid-size:               5px !important;
  --ag-row-height:              48px !important;
  --ag-header-height:           50px !important;
  --ag-cell-horizontal-padding: 16px !important;
}

.ag-theme-alpine.thicc .ag-cell {
  font-size:   14px;
  line-height: 48px;
}

.ag-theme-alpine.thicc .ag-header-cell-label {
  justify-content: center;
  font-size:       11px !important;
  font-weight:     700 !important;
  letter-spacing:  0.07em;
}


/* ==========================================================
   CLIENT THEME (ag-theme-client)
   Brand-forward, frameless, tight.
   Uses same token system as alpine variant.
========================================================== */
.ag-theme-client {
  --ag-font-family:    inherit;
  --ag-font-size:      13px;
  --ag-grid-size:      3px;
  --ag-row-height:     36px;
  --ag-header-height:  38px;
  --ag-cell-horizontal-padding: 10px;

  /* Borders */
  --ag-borders:          solid 1px;
  --ag-border-color:     var(--color-white-dark) !important;
  --ag-border-radius:    0px;
  --ag-row-border-color: var(--color-white-dark) !important;

  /* No column decorations — we handle our own */
  --ag-header-column-separator-display:     none;
  --ag-header-column-resize-handle-display: none;
  --ag-cell-horizontal-border:              none !important;

  /* Colors */
  --ag-background-color:         var(--surface-page) !important;
  --ag-odd-row-background-color: var(--surface-subtle) !important;
  --ag-foreground-color:         var(--text-primary) !important;
  --ag-header-background-color:  var(--surface-header) !important;
  --ag-header-foreground-color:  var(--text-header) !important;

  /* Interaction */
  --ag-row-hover-color:               rgba(252,187,78,0.07) !important;
  --ag-selected-row-background-color: rgba(252,187,78,0.12) !important;
  --ag-range-selection-border-color:  var(--color-yellow-base) !important;
  --ag-checkbox-checked-color:        var(--color-yellow-base) !important;
  --ag-input-focus-border-color:      var(--color-yellow-base) !important;
}

/* Frameless */
.ag-theme-client .ag-root-wrapper {
  border:        none;
  border-radius: 0;
  background:    var(--surface-page);
}

/* Header — charcoal with yellow bottom accent edge */
.ag-theme-client .ag-header {
  background:    var(--surface-header) !important;
  border-bottom: 2px solid var(--color-yellow-base) !important;
}

.ag-theme-client .ag-header-row {
  background: var(--surface-header) !important;
}

/* Filter row */
.ag-theme-client .ag-header-row.ag-header-row-column-filter {
  background: var(--surface-header-deep) !important;
  height:     28px !important;
}

.ag-theme-client .ag-floating-filter {
  padding:    0 5px;
  background: transparent;
}

.ag-theme-client .ag-floating-filter input,
.ag-theme-client .ag-text-field-input {
  height:        20px !important;
  min-height:    20px !important;
  background:    rgba(255,255,255,0.06) !important;
  border:        1px solid rgba(255,255,255,0.09) !important;
  border-radius: var(--radius-sm) !important;
  color:         var(--color-white-base) !important;
  font-size:     11px !important;
  padding:       0 6px !important;
  width:         100% !important;
  box-sizing:    border-box !important;
  outline:       none;
  transition:
    border-color var(--transition-fast),
    background   var(--transition-fast);
}

.ag-theme-client .ag-floating-filter input:focus {
  border-color: var(--color-yellow-base) !important;
  background:   rgba(252,187,78,0.09) !important;
}

.ag-theme-client .ag-header-cell-label {
  justify-content: center;
  font-size:       10px;
  font-weight:     700;
  text-transform:  uppercase;
  letter-spacing:  0.07em;
  color:           var(--text-header) !important;
  opacity:         0.75;
  white-space:     nowrap;
  overflow:        hidden;
  text-overflow:   ellipsis;
  transition:      opacity var(--transition-fast);
}

.ag-theme-client .ag-header-cell:hover .ag-header-cell-label {
  opacity: 1;
}

/* Sort icons */
.ag-theme-client .ag-sort-indicator-icon,
.ag-theme-client .ag-sort-ascending-icon,
.ag-theme-client .ag-sort-descending-icon {
  color:     var(--color-yellow-base) !important;
  flex-shrink: 0;
}

/* Rows */
.ag-theme-client .ag-row {
  border-bottom: 1px solid var(--color-white-dark);
  transition:    background var(--transition-fast);
  font-size:     13px;
}

.ag-theme-client .ag-row:not(.ag-row-selected):hover {
  background: rgba(252,187,78,0.07) !important;
}

.ag-theme-client .ag-row-selected {
  background:  rgba(252,187,78,0.12) !important;
  border-left: 2px solid var(--color-yellow-base) !important;
}

/* Cells — same overflow fix */
.ag-theme-client .ag-cell {
  padding:       0 10px;
  line-height:   36px;
  overflow:      hidden;
  text-overflow: ellipsis;
  white-space:   nowrap;
  display:       block;
  border-right:  none !important;
}

.ag-theme-client .ag-cell-wrapper {
  display:     flex;
  align-items: center;
  height:      100%;
  overflow:    hidden;
}

.ag-theme-client .ag-cell-value {
  overflow:      hidden;
  text-overflow: ellipsis;
  white-space:   nowrap;
  width:         100%;
}

.ag-theme-client .ag-cell-focus:not(.ag-cell-range-selected) {
  border:        1px solid var(--color-yellow-base) !important;
  border-radius: var(--radius-sm);
  outline:       none !important;
  box-shadow:    0 0 0 2px rgba(252,187,78,0.15);
}

/* Links */
.ag-theme-client a {
  color:           var(--text-primary) !important;
  text-decoration: none;
  font-weight:     600;
  border-bottom:   1px solid transparent;
  transition:      border-color var(--transition-fast);
}

.ag-theme-client a:hover {
  border-bottom-color: var(--color-yellow-base);
}


/* ==========================================================
   SUCCESS / POSITIVE STATE UTILITIES
   Green is semantic-only — never decorative.
========================================================== */
.ag-cell-positive,
.cell-positive {
  color:       var(--color-green-dark) !important;
  font-weight: 600;
}

.ag-cell-badge-success {
  display:        inline-flex;
  align-items:    center;
  background:     var(--color-green-light);
  color:          var(--color-green-dark);
  border-radius:  99px;
  padding:        1px 7px;
  font-size:      10px;
  font-weight:    700;
  letter-spacing: 0.04em;
  line-height:    18px;
}

.ag-cell-badge-warning {
  display:        inline-flex;
  align-items:    center;
  background:     var(--color-yellow-light);
  color:          var(--color-yellow-dark);
  border-radius:  99px;
  padding:        1px 7px;
  font-size:      10px;
  font-weight:    700;
  letter-spacing: 0.04em;
  line-height:    18px;
}