/* =========================
   DASHBAR (moved from kt-portfolio-core.php inline <style>)
   ========================= */

.kt-dashbar{
  border: 1px solid #0d47a1;
  border-radius: 10px;
  padding: 10px 12px;
  margin: 10px 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  background: #fff;
}

.kt-dashbar-left{
  display:flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 220px;
}

.kt-dashbar-title{
  margin:0;
  font-weight: 800;
  color:#0d47a1;
  font-size: 18px;
  line-height: 1.1;
}

.kt-dashbar-user{
  font-size: 13px;
  opacity: .85;
  white-space: nowrap;
}

.kt-dashbar-actions{
  display:flex;
  align-items:center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Make these look like consistent buttons/links */
.kt-dashbar-actions a{
  text-decoration: none;
  border: 1px solid #0d47a1;
  color: #0d47a1;
  padding: 6px 10px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 13px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
}

.kt-dashbar-actions a.kt-primary{
  background:#0d47a1;
  color:#fff;
}

.kt-dashbar-actions a.kt-logout{
  border-color:#b71c1c;
  color:#b71c1c;
}

.kt-dashbar-actions a:hover{
  opacity: .92;
}

@media (max-width: 640px){
  .kt-dashbar{
    padding: 10px;
  }
  .kt-dashbar-user{
    white-space: normal;
  }
  .kt-dashbar-actions a{
    flex: 1 1 auto;
    justify-content: center;
  }
}

/* Dashbar form controls (moved from inline styles) */
.kt-dashbar-form{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  margin:0 14px 0 0;
}

.kt-dashbar-label{
  display:flex;
  align-items:center;
  gap:8px;
  white-space:nowrap;
}

.kt-dashbar-label-title{
  font-weight:600;
}

.kt-dashbar-date{
  padding:6px 8px;
  border:1px solid #d0d0d0;
  border-radius:6px;
}

.kt-dashbar-scopegroup{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.kt-dashbar-scope{
  display:flex;
  align-items:center;
  gap:6px;
  white-space:nowrap;
}

.kt-dashbar-select{
  padding:6px 8px;
  border:1px solid #d0d0d0;
  border-radius:6px;
  width:140px;
  min-width:120px;
  max-width:160px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.kt-dashbar-submit{
  padding:8px 12px;
  border-radius:8px;
}


/* Existing (also moved from the same inline <style>) */
.aerm-actions { display:flex; gap:10px; flex-wrap:wrap; margin-bottom:12px; }

.aerm-btn {
  display:inline-block;
  padding:8px 14px;
  border-radius:10px;
  text-decoration:none;
  border:1px solid transparent;
  font-weight:600;
  line-height:1;
  white-space:nowrap;
}

.aerm-btn-magenta { background:#c2185b; color:#fff; border-color:#c2185b; }
.aerm-btn-magenta:hover { filter:brightness(0.95); }

.aerm-btn-magenta-blacktext { background:#c2185b; color:#000; border-color:#c2185b; }
.aerm-btn-magenta-blacktext:hover { filter:brightness(0.95); }


/* Trade Direction styling front end long/short(requires kt-dir-long / kt-dir-short classes) */
.kt-dir{
  font-weight: 700;
}

.kt-dir-long{
  color: #0b6b0b; /* deep green */
}

.kt-dir-short{
  color: #8b0000; /* deep red */
}


/* FFA section + filters (Batch 7) */
.kt-toggle-wrap{
  margin: 6px 0;
}

.kt-filters-mt{
  margin-top: 8px;
  border: 1px solid #0d47a1;
  border-radius: 10px;
  padding: 12px;
  background: #fff;
}


.kt-filters-actions{
  align-self: end;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Reusable blue button skin */
.btn-blue{
  background: #1976d2;
  border-color: #1976d2;
  color: #fff;
}

/* Inline-to-CSS cleanup — Batch 8 */
.kt-help-icon{
  cursor: help;
  margin-left: 6px;
  font-weight: 700;
  opacity: .7;
}

.kt-asof-note{
  color: #a33;
  font-weight: 600;
}

.kt-is-hidden{
  display: none;
}

.kt-grid-span-all{
  grid-column: 1 / -1;
}

.kt-row-actions{
  margin-top: 8px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Reusable green button skin */
.btn-green{
  background: #2e7d32;
  border-color: #2e7d32;
  color: #fff;
}

/* Inline-to-CSS cleanup — Batch 9 */
.kt-pager-mt{
  margin-top: 8px;
}

.kt-admin-notice{
  padding: 10px;
  margin: 15px 0;
}


/* =========================
   SHARED BLOTTER BASE (applies to Stocks + FFA + future tabs)
   Everything generic must live under .kt-blotter
   ========================= */

.kt-blotter{
  --kt-accent:#c2185b;   /* DEFAULT accent for ALL blotters (fixes FFA headers) */
  font-size:14px;
  margin-top:18px;
  overflow-x:auto;
}

.kt-blotter table{
  width:100%;
  border-collapse:collapse;
  margin-top:10px;
}

/* Cells: borders, padding, alignment */
.kt-blotter th,
.kt-blotter td{
  border:1px solid #eee;
  padding:6px 8px;
  text-align:left;
  white-space:nowrap;
  vertical-align:middle;
}

.kt-blotter thead th{
  color:var(--kt-accent);
  font-size:16px;
  font-weight:600;
}

/* Numeric alignment helpers */
.kt-blotter .kt-num{ text-align:right; }
.kt-blotter td.kt-num{ text-align:right; } /* beats td{ text-align:left } */
.kt-blotter td.num{ text-align:right; }
.kt-blotter th.num{ text-align:right; }


/* Value colors */
.kt-blotter .kt-val-pos{ color:#1b5e20; }
.kt-blotter .kt-val-neg{ color:#b71c1c; }

/* Status colors */
.kt-blotter .aerm-status-open{ color:#b00020; font-weight:700; }
.kt-blotter .aerm-status-closed{ color:#0d47a1; font-weight:700; }

/* Tabs */
.kt-blotter .kt-tabs a{
  margin-right:8px;
  text-decoration:none;
  padding:6px 10px;
  border:1px solid #ddd;
  border-radius:6px;
  display:inline-block;
}
.kt-blotter .kt-tabs a.active{ background:#f5f5f5; }

/* Small buttons/selects: unified sizing */
.kt-blotter .button.kt-btn-sm,
.kt-section-ffa .button.kt-btn-sm{
  height:30px;
  line-height:28px;
  padding:0 10px;
  font-size:12px;
  border-radius:6px;
  margin:0;
}

.kt-blotter select.kt-select-sm{
  height:30px;
  line-height:28px;          /* some browsers ignore on <select> */
  font-size:12px;
  padding:0 28px 0 8px;      /* room for dropdown arrow */
  border-radius:6px;
  margin:0;
  vertical-align:middle;
  border:1px solid #ddd;
  background:#fff;
}

/* Generic buttons */
.kt-blotter .kt-btn-danger{
  background:#b00020;
  border-color:#b00020;
  color:#fff;
}

/* Filter/Clear buttons (shared) */
.kt-blotter .kt-filter-btn,
.kt-section-ffa .kt-filter-btn{
  background:var(--kt-accent);
  border-color:var(--kt-accent);
  color:#fff;
}
.kt-blotter .kt-clear-btn,
.kt-section-ffa .kt-clear-btn{
  background:#455a64;
  border-color:#455a64;
  color:#fff;
}


/* Front-end export button (small, deep green border + green text) */
.kt-blotter .kt-export-btn,
.kt-section-ffa .kt-export-btn{
  background:transparent;
  border:1px solid #0b5a3c;   /* <-- force visible border */
  color:#0b5a3c;
}
.kt-blotter .kt-export-btn:hover,
.kt-blotter .kt-export-btn:focus,
.kt-section-ffa .kt-export-btn:hover,
.kt-section-ffa .kt-export-btn:focus{
  background:rgba(11, 90, 60, 0.08);
  border:1px solid #0b5a3c;   /* <-- keep border on hover/focus */
  color:#0b5a3c;
}




/* Assign: keep on a single line (desktop) */
.kt-blotter .kt-assign-form{
  display:inline-flex;
  align-items:center;
  gap:8px;
  flex-wrap:nowrap;
}
.kt-blotter .kt-assign-input{ display:none !important; }
.kt-blotter .kt-assign-btn{
  background:var(--kt-accent);
  border-color:var(--kt-accent);
  color:#fff;
}

/* Actions: keep on a single line (desktop) */
.kt-blotter .kt-actions{
  display:inline-flex;
  align-items:center;
  gap:8px;
  flex-wrap:nowrap;
}
.kt-blotter .kt-actions form{ margin:0; }
.kt-blotter .kt-actions .button{ margin:0; }




/* Filters layout */
.kt-blotter .kt-filters{
  border: 1px solid #0d47a1;
  border-radius: 10px;
  padding: 12px;
  background: #fff;

  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap:8px;
  align-items:end;
}


@media (max-width:1000px){
  .kt-blotter .kt-filters{ grid-template-columns:repeat(3, minmax(150px, 1fr)); }
}
@media (max-width:640px){
  .kt-blotter .kt-filters{ grid-template-columns:1fr; }
}

.kt-blotter .kt-filters input[type="date"],
.kt-blotter .kt-filters input[type="text"],
.kt-blotter .kt-filters select{
  width:100%;
  height:34px;
  padding:4px 8px;
}

/* keep Filter/Clear button group compact and right-aligned on wide screens */
@media (min-width: 900px){
  .kt-blotter .kt-filters > div:last-child{
    justify-self:end;
    white-space:nowrap;
  }
}



/* Responsive: allow wrapping on narrow screens */
@media (max-width:800px){
  .kt-blotter .kt-assign-form,
  .kt-blotter .kt-actions{ flex-wrap:wrap; }
}

/* Utility */
.kt-blotter .hidden{ display:none !important; }

/* Info icon */
.kt-blotter .kt-info{
  cursor:help;
  font-weight:700;
  margin-left:6px;
  opacity:.75;
}
.kt-blotter .kt-info:hover{ opacity:1; }

/* Dropdown multi-select (if used) */
.kt-blotter .kt-dd{ position:relative; display:inline-block; }
.kt-blotter .kt-dd details{ position:relative; }
.kt-blotter .kt-dd summary{
  list-style:none;
  cursor:pointer;
  user-select:none;
  padding:6px 10px;
  border:1px solid #ccc;
  border-radius:6px;
  background:#fff;
  min-width:180px;
  line-height:18px;
}
.kt-blotter .kt-dd summary::-webkit-details-marker{ display:none; }
.kt-blotter .kt-dd details[open] summary{
  border-bottom-left-radius:0;
  border-bottom-right-radius:0;
}
.kt-blotter .kt-dd-panel{
  position:absolute;
  z-index:9999;
  top:100%;
  left:0;
  width:260px;
  max-height:240px;
  overflow:auto;
  border:1px solid #ccc;
  border-top:none;
  background:#fff;
  border-bottom-left-radius:6px;
  border-bottom-right-radius:6px;
  padding:8px 10px;
  box-shadow:0 8px 20px rgba(0,0,0,.12);
}
.kt-blotter .kt-dd-item{ display:flex; align-items:center; gap:8px; padding:4px 0; }
.kt-blotter .kt-dd-item input{ margin:0; }
.kt-blotter .kt-dd-hint{ font-size:11px; color:#777; margin-top:6px; }

/* Alternate "filter select" styling (if used) */
.kt-blotter .kt-filter-select,
.kt-blotter .kt-dd summary.kt-filter-select{
  height:34px;
  padding:6px 10px;
  border:1px solid #ccc;
  border-radius:6px;
  background:#fff;
  line-height:20px;
  min-width:180px;
}
.kt-blotter .kt-dd summary.kt-filter-select{
  display:flex;
  align-items:center;
  justify-content:space-between;
}

/* MtM highlight + misc */
.kt-blotter .aerm-cell-mtm-missing{ background:#ffecec; } /* light red when mark is missing */

/* Sumbar (FFA code uses .aerm-sumbar) */
.kt-blotter .aerm-sumbar{
  display:flex;
  gap:16px;
  justify-content:flex-end;
  margin:6px 0;
  font-weight:600;
}
.kt-blotter .aerm-sumbar .label{
  opacity:.75;
  margin-right:6px;
  font-weight:500;
}


/* Stock sumbar (match FFA layout) */
.kt-blotter .kt-sumbar{
  display:flex;
  gap:16px;
  justify-content:flex-end;
  margin:6px 0;
  font-weight:600;
}
.kt-blotter .kt-sumbar .label{
  opacity:.75;
  margin-right:6px;
  font-weight:500;
}


/* Filter labels (Stocks + FFA) */
.kt-blotter .kt-filters label{
  display:block;
  font-size:12px;
  color:#555;
  margin-bottom:4px;
}

/* Filter action cell */
.kt-blotter .kt-filter-actions{
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap:wrap;
}

/* Ticker dropdown toolbar */
.kt-blotter .kt-dd-toolbar{
  display:flex;
  gap:8px;
  align-items:center;
  margin-bottom:6px;
}
.kt-blotter .kt-dd-toolbar a{
  font-size:12px;
}

.kt-blotter .kt-ticker-unselectall{
  font-size:12px;
  text-decoration:none;
}

/* Front-end blotters: emphasize identifiers */
.kt-section-ffa table tbody td:nth-child(6){
  font-weight: 700; /* Contract column for FFA (Dir is col 4, Sector col 5, Contract col 6) */
}

.kt-section-stocks .kt-stock-blotter table tbody td:nth-child(5){
  font-weight: 700; /* Ticker column for Stock (Ticker is col 5) */
}


/* HOVERABLE */

.kt-blotter td.aerm-cell-mtm-missing{
  cursor: help;
}


/* =========================
   PER-BLOTTER ACCENTS ONLY
   ========================= */

/* Stocks wrapper (or per-blotter class) can set the accent */
.kt-stock{ --kt-accent:#c2185b; }

/* If you want a different accent for FFA, uncomment & pick color:
.kt-ffa{ --kt-accent:#1565c0; }
*/

/* Stock blotter: hide the tabs only inside the stock blotter wrapper */
.kt-stock-blotter .kt-blotter .kt-tabs{
  display:none !important;
}

/* =========================
   MtM page styles (moved from sc_mtm inline <style>)
   ========================= */

.aerm-mtm-wrap{ font-size:14px; }
.aerm-card{ border:1px solid #eee; border-radius:10px; padding:12px; margin:12px 0; }
.aerm-row{ display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
.aerm-grid{ display:grid; grid-template-columns:1fr 160px; gap:8px; align-items:center; }
.aerm-grid label{ font-weight:700; }
.aerm-grid input[type="number"]{ width:100%; height:34px; padding:4px 8px; }
table.aerm{ width:100%; border-collapse:collapse; }
table.aerm th,
table.aerm td{ border-bottom:1px solid #f4f4f4; padding:6px 8px; }
table.aerm th{ border-bottom:1px solid #eee; }
.btn-magenta{ background:#c2185b; border-color:#c2185b; color:#fff; }




/* =========================================================
   GLOBAL NOTICES + TOASTS + MODALS
   Must be GLOBAL because the modal/toast markup can live
   OUTSIDE .kt-blotter (kt_blotter_shared_ui()).
   ========================================================= */

/* Notices (GLOBAL) */
.kt-notice{
  max-width:860px;
  margin:10px auto;
  padding:10px 14px;
  border-radius:10px;
  border:1px solid transparent;
  text-align:center;
  font-size:14px;
}

.kt-notice.success{ background:#e8f5e9; color:#111; border-color:#cfe3cf; }
.kt-notice.warn{ background:#fde3f3; color:#b00020; font-weight:700; border-color:#f3b0d0; }
.kt-notice.info{ background:#e7f3ff; color:#111; border-color:#c5ddff; }

/* Toast wrapper */
.kt-toast-wrap{
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 999999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(520px, 92vw);
}

.kt-toast-wrap .kt-notice{
  margin: 0 !important;
  box-shadow: 0 10px 25px rgba(0,0,0,.18);
  pointer-events: auto;
}

/* Modals (GLOBAL) */
.kt-modal[hidden]{ display:none !important; }

.kt-modal{
  position:fixed;
  inset:0;
  z-index:999999;
}

.kt-modal-backdrop{
  position:absolute;
  inset:0;
  background:rgba(0,0,0,0.35);
}

.kt-modal-dialog{
  position:relative;
  z-index:1;
  width:min(520px, 92vw);
  margin:10vh auto;
  background:#fff;
  border-radius:12px;
  padding:16px;
  box-shadow:0 10px 30px rgba(0,0,0,0.25);
}

.kt-modal-dialog.warn{
  background:#fde3f3;
  color:#b00020;
  font-weight:700;
}

.kt-modal-actions{
  display:flex;
  gap:8px;
  justify-content:flex-end;
  flex-wrap:wrap;
}

/* Modal buttons (make anchors look like buttons, align vertically) */
.kt-modal-actions .kt-modal-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  line-height: 28px;
  padding: 0 10px;
  border-radius: 6px;
  text-decoration: none;
  cursor: pointer;
}

/* Make modal action buttons consistent width */
.kt-modal-actions .kt-modal-btn-fixed{
  min-width: 110px;
}

/* Primary (match Create & Assign look) */
.kt-modal-actions .kt-modal-btn-primary{
  background: #c2185b;
  border: 1px solid #c2185b;
  color: #fff;
}

/* Cancel (same shape, slightly reddish background) */
.kt-modal-actions .kt-modal-btn-cancel{
  background: #fde3f3;
  border: 1px solid #b00020;
  color: #b00020;
}
.kt-modal-actions .kt-modal-btn-cancel:hover,
.kt-modal-actions .kt-modal-btn-primary:hover{
  opacity: .92;
}


/* Admin UI */
/* Admin UI (moved from inline styles in kt-portfolio-core.php) */
.kt-admin-form{ margin: 0; }
.kt-admin-form-lg{ margin: 12px 0; }
.kt-admin-form-md{ margin: 10px 0; }

.kt-admin-table{ max-width: 820px; }

.kt-admin-th-mapped{ width: 60px; }

.kt-admin-h3{ margin: 0 0 8px; }

.kt-admin-label-min{ min-width: 120px; display: inline-block; }

.kt-admin-helptext{
  margin: 8px 0 0;
  opacity: .8;
}

/* Admin UI — Batch 4 */
.kt-admin-h4{
  margin: 0 0 8px;
}

.kt-admin-muted{
  opacity: .8;
}

.kt-admin-row{
  margin-bottom: 8px;
}

.kt-td-left{ text-align: left; }
.kt-td-right{ text-align: right; }
.kt-td-bold{ font-weight: 700; }

.kt-admin-mark-input{
  width: 140px;
}

.kt-admin-mt10{
  margin-top: 10px;
}

.kt-admin-form-max{
  max-width: 640px;
}

.kt-admin-form-title{
  margin: 6px 0 4px;
  font-weight: 600;
}


/* Admin UI — Batch 6 */
.kt-admin-mt14{ margin-top: 14px; }
.kt-admin-mt18{ margin-top: 18px; }

.kt-admin-h4-sm{ margin: 0 0 6px; }

.kt-admin-intro{
  margin: 0 0 10px;
  opacity: .8;
}

.kt-admin-form-row{
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: end;
  margin-bottom: 10px;
}

.kt-field-label{
  display: block;
  font-size: 12px;
  margin-bottom: 4px;
}

.kt-admin-select-lg{
  min-width: 260px;
  height: 34px;
}

/* Admin Trades page (Batch A) */
.kt-admin-page-title{
  margin: 12px 0;
}

.kt-admin-filters-form{
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
  margin: 10px 0 14px;
}

.kt-admin-actions-row{
  display: flex;
  gap: 8px;
}

.kt-admin-summary{
  margin: 6px 0 10px;
  opacity: .8;
}

.kt-admin-emptycell{
  padding: 10px;
}


/* Dashboard sections (moved from inline styles in kt-portfolio-core.php) */
.kt-section{ }
.kt-section-ffa{ margin: 8px 0 14px; }
.kt-section-stocks{ margin: 18px 0 0; }
.kt-section-limits{ margin-top: 10px; }

.kt-section-title{ margin: 0 0 6px; }

.kt-muted{ opacity: .8; }

/* My trading limits table */
.kt-limits-table{
  width: 100%;
  border-collapse: collapse;
}

.kt-limits-th{
  border-bottom: 1px solid #eee;
  padding: 6px 8px;
}

.kt-limits-th-left{ text-align: left; }
.kt-limits-th-right{ text-align: right; }

.kt-limits-td{
  border-bottom: 1px solid #f4f4f4;
  padding: 6px 8px;
}

.kt-limits-td-sector{
  font-weight: 700;
}

.kt-limits-td-right{
  text-align: right;
}

.kt-limits-neg{
  color: #b71c1c;
  font-weight: 700;
}

/* Front end columns sorting formatting */
.kt-sort-asc::after { content: " ▲"; font-size: 0.85em; opacity: 0.7; }
.kt-sort-desc::after { content: " ▼"; font-size: 0.85em; opacity: 0.7; }

/* Modal typography & spacing (moved from inline styles in kt-portfolio-core.php) */
.kt-modal-h3{
  margin: 0 0 6px;
}

.kt-modal-p-lg{
  margin: 0 0 12px;
}

.kt-modal-p-sm{
  margin: 0 0 6px;
}

.kt-modal-summary{
  margin: 0 0 12px;
  font-size: 13px;
  white-space: normal;
}

.kt-modal-input{
  width: 100%;
  padding: 8px;
  box-sizing: border-box;
}

.kt-modal-actions-mt{
  margin-top: 12px;
}

.kt-blotter .kt-title{
  margin:0 0 6px;
}

.kt-blotter .kt-filters{
  margin:10px 0 12px;
}

.kt-blotter .kt-empty{
  margin:6px 0 10px;
  opacity:.8;
}

.kt-blotter .kt-empty-td{
  padding:10px 8px;
  opacity:.8;
}

.kt-blotter .kt-btn-dup{
  background:#1976d2;
  border-color:#1976d2;
  color:#fff;
}

.kt-blotter .kt-btn-save{
  background:#2e7d32;
  border-color:#2e7d32;
  color:#fff;
}

.kt-blotter .kt-pager{
  margin-top:8px;
}

.kt-blotter .kt-edit-span-all{
  grid-column: 1 / -1;
}

.kt-blotter .kt-edit-actions{
  margin-top: 8px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Top actions inside inline Edit row (Duplicate/Delete moved here) */
.kt-edit-topbar{
  display:flex;
  justify-content:flex-end;
  gap:8px;
  flex-wrap:wrap;
  margin:0 0 10px 0;
}

.aerm-status-na { background:#eee; color:#555; }



/* =========================
   AERM DARK THEME OVERRIDES
   Matches site palette:
   BG #343D4A, Text #E6E9ED, Muted #9FB3C8, Accent #4FC3F7
   ========================= */

:root{
  --aerm-bg:#343D4A;
  --aerm-panel:#2F3743;
  --aerm-border:rgba(230,233,237,.18);
  --aerm-text:#E6E9ED;
  --aerm-muted:#9FB3C8;
  --aerm-accent:#4FC3F7;
}

/* Dashbar */
.kt-dashbar{
  background: var(--aerm-panel) !important;
  border: 1px solid var(--aerm-border) !important;
}
.kt-dashbar-title{ color: var(--aerm-accent) !important; }
.kt-dashbar-user{ color: var(--aerm-muted) !important; opacity: 1 !important; }

/* Dashbar actions -> link buttons */
.kt-dashbar-actions a{
  border-color: var(--aerm-accent) !important;
  color: var(--aerm-accent) !important;
  background: transparent !important;
}
.kt-dashbar-actions a.kt-primary{
  background: var(--aerm-accent) !important;
  color: #0b1b24 !important; /* dark text on bright accent */
  border-color: var(--aerm-accent) !important;
}

/* Form controls */
.kt-dashbar-date,
.kt-dashbar-select,
.kt-blotter select.kt-select-sm,
.kt-blotter .kt-filters input[type="date"],
.kt-blotter .kt-filters input[type="text"],
.kt-blotter .kt-filters select{
  background: #25303b !important;
  color: var(--aerm-text) !important;
  border: 1px solid var(--aerm-border) !important;
}

/* Filters panel */
.kt-filters-mt,
.kt-blotter .kt-filters{
  background: var(--aerm-panel) !important;
  border: 1px solid var(--aerm-border) !important;
}

/* Filter labels */
.kt-blotter .kt-filters label{
  color: var(--aerm-muted) !important;
}

/* Tables */
.kt-blotter th,
.kt-blotter td{
  border-color: var(--aerm-border) !important;
  color: var(--aerm-text) !important;
}
.kt-blotter table{
  background: transparent !important;
}
.kt-blotter thead th{
  color: var(--aerm-accent) !important;
}

/* Tabs */
.kt-blotter .kt-tabs a{
  border-color: var(--aerm-border) !important;
  color: var(--aerm-text) !important;
  background: transparent !important;
}
.kt-blotter .kt-tabs a.active{
  background: rgba(79,195,247,.12) !important;
  border-color: rgba(79,195,247,.35) !important;
}

/* Buttons */
.kt-blotter .kt-filter-btn,
.kt-section-ffa .kt-filter-btn,
.btn-blue,
.kt-blotter .kt-btn-dup{
  background: var(--aerm-accent) !important;
  border-color: var(--aerm-accent) !important;
  color: #0b1b24 !important;
}

.kt-blotter .kt-clear-btn,
.kt-section-ffa .kt-clear-btn{
  background: #455a64 !important;
  border-color: #455a64 !important;
  color: var(--aerm-text) !important;
}

/* Positive/negative values - keep but brighten slightly */
.kt-blotter .kt-val-pos{ color:#6ee07a !important; }
.kt-blotter .kt-val-neg{ color:#ff6b6b !important; }

/* Notices + modals (remove white panels in dark UI) */
.kt-modal-dialog{
  background: var(--aerm-panel) !important;
  color: var(--aerm-text) !important;
  border: 1px solid var(--aerm-border) !important;
}
.kt-notice.success,
.kt-notice.warn,
.kt-notice.info{
  border-color: var(--aerm-border) !important;
}

/* --- Empty table cells: soften (remove pink) --- */
.kt-blotter td:empty{
  background: rgba(255,255,255,0.06) !important;  /* slightly lighter than rows */
}

.kt-blotter td.aerm-cell-mtm-missing{
  background: rgba(255,255,255,0.06) !important;
}


/* --- Table hover --- */
.kt-blotter table tbody tr:hover td{
  background: rgba(79,195,247,0.06) !important;  /* very subtle accent hover */
}

/* --- Plugin section headings color --- */
.kt-section-title,
.kt-section h1,
.kt-section h2,
.kt-section h3{
  color: #7FD3F7 !important;
}

/* =========================
   DARK THEME – INLINE EDIT ROW (CONFIRMED STRUCTURE)
   ========================= */

/* Edit row background (slightly lifted from table bg) */
.kt-blotter tr.kt-edit-row td{
  background: #2F3743 !important;
}

/* Grid container spacing */
.kt-blotter .kt-edit-grid{
  gap: 10px;
}

/* Labels – make them pop like column headers */
.kt-blotter .kt-edit-grid label{
  color: #4FC3F7 !important;   /* same as table headers */
  font-weight: 600 !important;
  font-size: 13px;
}

/* Inputs, selects, textareas */
.kt-blotter .kt-edit-grid input[type="text"],
.kt-blotter .kt-edit-grid input[type="number"],
.kt-blotter .kt-edit-grid input[type="date"],
.kt-blotter .kt-edit-grid textarea,
.kt-blotter .kt-edit-grid select{
  background: rgba(255,255,255,0.08) !important;  /* light grey panel */
  color: #E6E9ED !important;
  border: 1px solid rgba(230,233,237,0.22) !important;
  border-radius: 8px !important;
  box-shadow: none !important;
}

/* Placeholder text */
.kt-blotter .kt-edit-grid input::placeholder,
.kt-blotter .kt-edit-grid textarea::placeholder{
  color: rgba(159,179,200,0.75) !important;
}

/* Focus state */
.kt-blotter .kt-edit-grid input:focus,
.kt-blotter .kt-edit-grid textarea:focus,
.kt-blotter .kt-edit-grid select:focus{
  outline: none !important;
  border-color: rgba(79,195,247,0.6) !important;
  box-shadow: 0 0 0 3px rgba(79,195,247,0.12) !important;
}

/* Action buttons row (Duplicate / Delete / Save / Cancel) */
.kt-blotter .kt-row-actions,
.kt-blotter .kt-edit-topbar{
  background: transparent;
}

/* Remove any remaining white blocks */
.kt-blotter tr.kt-edit-row input,
.kt-blotter tr.kt-edit-row select,
.kt-blotter tr.kt-edit-row textarea{
  background-clip: padding-box;
}

/* --- Dashbar / controls labels (MtM as of date, All trades, etc.) --- */
.kt-dashbar,
.kt-dashbar label,
.kt-dashbar span,
.kt-dashbar .kt-dashbar-label-title{
  color: #9FB3C8 !important;          /* muted */
}

/* Make checkbox labels a bit brighter for readability */
.kt-dashbar input[type="checkbox"] + label,
.kt-dashbar label{
  color: #E6E9ED !important;          /* primary text */
}

/* --- Inline edit row: include URL inputs (Attachment URL) --- */
.kt-blotter .kt-edit-grid input[type="url"]{
  background: rgba(255,255,255,0.08) !important;
  color: #E6E9ED !important;
  border: 1px solid rgba(230,233,237,0.22) !important;
  border-radius: 8px !important;
  box-shadow: none !important;
}

/* =========================
   FINAL DARK POLISH
   ========================= */

/* 1) Any remaining select/input backgrounds (incl. ticker dropdowns) */
.kt-blotter select,
.kt-blotter input[type="text"],
.kt-blotter input[type="number"],
.kt-blotter input[type="date"],
.kt-blotter input[type="url"],
.kt-blotter textarea{
  background: rgba(255,255,255,0.08) !important;
  color: #E6E9ED !important;
  border: 1px solid rgba(230,233,237,0.22) !important;
}

/* Placeholder on those controls */
.kt-blotter input::placeholder,
.kt-blotter textarea::placeholder{
  color: rgba(159,179,200,0.75) !important;
}

/* 2) Trading Limits section – heading + table text */
.kt-limits-table,
.kt-limits-table th,
.kt-limits-table td{
  color: #E6E9ED !important;
  border-color: rgba(230,233,237,0.18) !important;
}

.kt-limits-th{
  color: #4FC3F7 !important;              /* header text */
  font-weight: 700 !important;
}

.kt-limits-td-sector{
  color: #E6E9ED !important;
}

/* If Remaining cell is muted/odd, force it */
.kt-limits-td-right{
  color: #E6E9ED !important;
}

/* 3) Sum PnL / Sum MtM labels – make them striking */
.kt-blotter .aerm-sumbar,
.kt-blotter .kt-sumbar{
  color: #E6E9ED !important;
}

.kt-blotter .aerm-sumbar .label,
.kt-blotter .kt-sumbar .label{
  color: #4FC3F7 !important;              /* make "Sum PnL:" / "Sum MtM:" pop */
  opacity: 1 !important;
  font-weight: 700 !important;
}

/* =========================
   DARK THEME – TICKER MULTI-SELECT DROPDOWN (.kt-dd)
   ========================= */

/* The closed dropdown "pill" */
.kt-blotter .kt-dd summary,
.kt-blotter .kt-dd summary.kt-filter-select{
  background: rgba(255,255,255,0.08) !important;
  color: #E6E9ED !important;
  border: 1px solid rgba(230,233,237,0.22) !important;
}

/* The opened dropdown panel (THIS is the white box in your screenshot) */
.kt-blotter .kt-dd-panel{
  background: #2F3743 !important;                 /* dark panel */
  color: #E6E9ED !important;
  border: 1px solid rgba(230,233,237,0.22) !important;
  box-shadow: 0 10px 25px rgba(0,0,0,0.35) !important;
}

/* Each row in the dropdown */
.kt-blotter .kt-dd-item{
  color: #E6E9ED !important;
}

/* Checkbox label text */
.kt-blotter .kt-dd-item label,
.kt-blotter .kt-dd-item span{
  color: #E6E9ED !important;
}

/* The "Unselect all" / helper links area */
.kt-blotter .kt-dd-toolbar a,
.kt-blotter .kt-ticker-unselectall{
  color: #4FC3F7 !important;
  text-decoration: none;
}
.kt-blotter .kt-dd-toolbar a:hover,
.kt-blotter .kt-ticker-unselectall:hover{
  text-decoration: underline;
}

/* Hint text */
.kt-blotter .kt-dd-hint{
  color: rgba(159,179,200,0.80) !important;
}

/* Scrollbar track (optional: makes it less jarring) */
.kt-blotter .kt-dd-panel{
  scrollbar-color: rgba(79,195,247,0.45) rgba(255,255,255,0.08);
}

/* --- Restore Status colors (only Status column) --- */

/* If your code already adds these classes to the Status <td> */
.kt-blotter td.aerm-status-open{
  color: #ff6b6b !important;   /* light red */
  font-weight: 700 !important;
}

.kt-blotter td.aerm-status-closed{
  color: #6ee07a !important;   /* light green */
  font-weight: 700 !important;
}

/* --- Restore Dir colors (Long/Short) --- */

/* If your Dir cell/text uses these classes already */
.kt-blotter .kt-dir-long{
  color: #6ee07a !important;   /* slightly green */
  font-weight: 700 !important;
}

.kt-blotter .kt-dir-short{
  color: #ff6b6b !important;   /* slightly red */
  font-weight: 700 !important;
}

