/* Floating submit button (right-anchored) */
#pp-floating-submit {
  position: fixed;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1040; /* above modals if needed adjust; bootstrap modal is 1050 */
  display: flex;
  align-items: center;
  gap: 12px;
}

#pp-floating-submit .pp-fab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  height: 56px;
  padding: 0 20px;
  border-radius: 9999px;
  border: none;
  background: #9e2239;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18), 0 2px 6px rgba(0,0,0,0.12);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease, opacity 0.2s ease;
  cursor: pointer;
}

#pp-floating-submit .pp-fab:hover:not([disabled]) {
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(0,0,0,0.22), 0 4px 8px rgba(0,0,0,0.14);
  background: #7f1b2e;
}

#pp-floating-submit .pp-fab:focus-visible {
  outline: 3px solid rgba(114, 87, 229, 0.5); /* soft purple focus ring */
  outline-offset: 2px;
}

#pp-floating-submit .pp-fab[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  background: #9e2239; /* keep color but dimmed by opacity */
}

#pp-floating-submit .pp-fab .icon {
  margin-right: 10px;
  display: inline-flex;
}

/* Small screens: bottom-right */
@media (max-width: 576px) {
  #pp-floating-submit {
    top: 12px;
    right: 12px;
    bottom: auto;
    transform: none;
  }
  #pp-floating-submit .pp-fab {
    min-width: 44px; /* smaller on mobile */
    height: 44px;
    padding: 0 12px;
    border-radius: 999px;
  }
  #pp-floating-submit .pp-fab .label {
    display: none; /* icon-only on mobile for compactness */
  }
  #pp-floating-submit .pp-fab .icon {
    font-size: 18px;
    margin: 0;
  }
}
/* Mobile adjustments for docked checklist and floating submit */
@media (max-width: 767.98px) {
  /* Hide the post-it checklist dock on small screens */
  #pp-form-dock {
    display: none !important;
  }

  /* Ensure the floating submit is visible on mobile when dock is hidden */
  #pp-floating-submit {
    display: block !important;
  }
}

/* Post-it style dock with checklist and submit */
#pp-form-dock {
  position: fixed;
  right: 16px;
  top: 50%;
  transform: translateY(-50%) rotate(-1deg);
  z-index: 1040;
  width: 260px;
}

#pp-form-dock .pp-postit {
  background: #fff7c2; /* warm post-it */
  border: 1px solid #e5d98b;
  border-radius: 8px;
  box-shadow: 0 12px 24px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.08);
  padding: 12px;
  transform: rotate(0.5deg);
}

#pp-form-dock .pp-postit .pp-pin {
  width: 14px;
  height: 14px;
  background: #9e2239;
  border-radius: 50%;
  position: absolute;
  right: 10px;
  top: -7px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

#pp-form-dock .pp-title {
  font-weight: 700;
  font-size: 0.9rem;
  margin: 0 0 8px 0;
  color: #7a6f3b;
}

#pp-form-dock .pp-list {
  list-style: none;
  margin: 0 0 10px 0;
  padding: 0;
  max-height: 40vh;
  overflow: auto;
}

#pp-form-dock .pp-list li {
  font-size: 0.78rem;
  line-height: 1.3;
  color: #5b5531;
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 3px 0;
}

#pp-form-dock .pp-list li::before {
  content: '•';
  color: #b09b3b;
  line-height: 1;
  margin-top: 2px;
}

#pp-form-dock .pp-list li.pp-done {
  color: #9a956d;
  text-decoration: line-through;
}

#pp-form-dock .pp-actions {
  display: flex;
  justify-content: center;
}

#pp-form-dock .pp-actions .pp-fab {
  width: 100%;
}

@media (max-width: 768px) {
  #pp-form-dock {
    right: 12px;
    bottom: 12px;
    top: auto;
    transform: none;
    width: calc(100% - 24px);
  }
}

/* ======================================================
   Inspinia-like Power Pages Form Overrides
   Target: standard BootstrapV5 portals + portalbasictheme
   Place AFTER theme.css / portalbasictheme.css.
   Author: ChatGPT (Argabot)
   ====================================================== */

/* ---------- CSS variables (tweak to taste) ---------- */
:root {
  --pp-bg: #f5f7fb;
  --pp-card-bg: #ffffff;
  --pp-text: #0f172a;
  --pp-subtle: #64748b;
  --pp-border: #e5e7eb;
  --pp-border-strong: #d1d5db;
  --pp-primary: #9e2239; /* brand */
  --pp-primary-600: #7f1b2e; /* darker brand */
  --pp-danger: #ef4444;
  --pp-success: #10b981;
  --pp-radius: 14px;
  --pp-radius-sm: 10px;
  --pp-shadow: 0 10px 30px rgba(2,8,23,.06);
  /* Keep focus a soft purple for clarity and to avoid 'error' feel */
  --pp-focus: 0 0 0 .25rem rgba(99,102,241,.18);
  --pp-focus-border: #6366f1;
}

/* ---------- Page canvas ---------- */
.wrapper-body {
  background: var(--pp-bg);
  color: var(--pp-text);
}

/* Main form container */
.crmEntityFormView {
  max-width: 980px;
  margin: 40px auto 64px;
  padding: 0 12px;
}

/* Section card look */
.section-title + .section,
fieldset.section,
table.section {
  background: var(--pp-card-bg);
  border: 1px solid var(--pp-border);
  border-radius: var(--pp-radius);
  box-shadow: var(--pp-shadow);
  padding: 18px 18px 4px;
  margin-bottom: 22px;
}

/* Section headers */
legend.section-title,
legend.section-title h3 {
  margin: 0;
  padding: 0;
}

legend.section-title h3 {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--pp-subtle);
  text-transform: uppercase;
  padding: 14px 2px 10px;
  border-bottom: 1px solid var(--pp-border);
  margin-bottom: 14px;
}

/* Top-level tab title */
h2.tab-title {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: .02em;
  color: var(--pp-text);
  margin: 0 0 12px;
}

/* Table row spacing inside sections */
.section td.form-control-cell {
  padding: 6px 6px 10px !important;
}

/* Label + validators */
.table-info .field-label {
  display: block;
  font-weight: 600;
  color: var(--pp-text);
  font-size: .875rem; /* ~14px */
  margin: 0 0 4px;
}
.table-info.required .field-label::after {
  content: " *";
  color: var(--pp-danger);
  font-weight: 700;
}
.validators span[id^="RequiredFieldValidator"] {
  color: var(--pp-danger);
  margin-left: 6px;
  font-weight: 700;
}

/* Inputs */
.form-control,
input.form-control,
select.form-control,
textarea.form-control,
/* Bootstrap 5 select */
.form-select {
  border: 1px solid var(--pp-border);
  border-radius: 8px; /* slightly tighter for compact height */
  min-height: 36px;
  padding: .45rem .6rem;
  line-height: 1.3;
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

textarea.form-control {
  min-height: 120px;
  resize: vertical;
}

.form-control:focus:not(.is-invalid):not(.input-validation-error),
input.form-control:focus:not(.is-invalid):not(.input-validation-error),
select.form-control:focus:not(.is-invalid):not(.input-validation-error),
textarea.form-control:focus:not(.is-invalid):not(.input-validation-error),
/* Bootstrap 5 select */
.form-select:focus:not(.is-invalid):not(.input-validation-error) {
  border-color: var(--pp-focus-border);
  box-shadow: var(--pp-focus);
  outline: none;
}

/* Buttons: use soft purple ring on focus */
.btn:focus,
.btn:focus-visible {
  border-color: var(--pp-focus-border);
  box-shadow: var(--pp-focus);
  outline: none;
}

/* Checkboxes/radios */
.form-check-input:focus:not(.is-invalid) {
  border-color: var(--pp-focus-border);
  box-shadow: var(--pp-focus);
  outline: none;
}

/* Placeholder and readonly tweaks */
.form-control::placeholder { color: #9ca3af; }
.form-control[readonly],
.form-control[aria-readonly="true"] {
  background: #f8fafc;
  color: #475569;
}

/* Lookup control (input-group) */
.form-control-cell .input-group .form-control {
  border-right: 0;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}
.form-control-cell .input-group .btn {
  border: 1px solid var(--pp-border);
  background: #f8fafc;
  box-shadow: none;
  min-height: 36px;
  padding: .45rem .6rem;
}
.form-control-cell .input-group .btn:first-of-type {
  border-left: 0;
}
.form-control-cell .input-group .btn:hover {
  background: #fdecef; /* light brand tint */
  border-color: var(--pp-primary);
}
.clearlookupfield .fa-times,
.launchentitylookup .fa-search { opacity: .8; }

/* Validation summary */
.validation-summary.alert {
  border: 0;
  border-left: 4px solid var(--pp-danger);
  background: #fef2f2;
  color: #7f1d1d;
  border-radius: var(--pp-radius);
  box-shadow: var(--pp-shadow);
}
.validation-summary.alert .validation-header {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: .25rem;
}

/* Buttons */
.btn,
button,
input[type="submit"].btn {
  border-radius: 12px;
  padding: .65rem 1rem;
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform .06s ease, box-shadow .15s ease, background-color .15s ease;
}

.btn:active { transform: translateY(1px); }

.btn-default,
.btn-secondary {
  background: #f8fafc;
  color: #0f172a;
  border-color: var(--pp-border);
}
.btn-default:hover,
.btn-secondary:hover {
  background: #fdecef; /* light brand tint */
  border-color: var(--pp-primary);
}

.btn-primary {
  background: var(--pp-primary);
  border-color: var(--pp-primary);
}
.btn-primary:hover {
  background: var(--pp-primary-600);
  border-color: var(--pp-primary-600);
  box-shadow: 0 6px 16px rgba(158,34,57,.24);
}

/* Submit button alignment container (classic entity form) */
.form-action-container-left,
.form-action-container-right {
  margin-top: 8px;
}

/* Tables (grid / lookup modal list) */
table.table,
.view-grid table,
table.section {
  border-collapse: separate;
  border-spacing: 0;
}
table.table thead th,
.view-grid table thead th {
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: .75rem;
  color: var(--pp-subtle);
  border-bottom: 1px solid var(--pp-border-strong);
}
table.table tbody td,
.view-grid table tbody td {
  border-top: 1px solid var(--pp-border);
}

/* Modal (lookup and errors) */
.modal-dialog {
  max-width: 900px;
}
.modal-content {
  border: 1px solid var(--pp-border);
  border-radius: 16px;
  box-shadow: var(--pp-shadow);
}
.modal-header {
  border-bottom: 1px solid var(--pp-border);
}
.modal-footer {
  border-top: 1px solid var(--pp-border);
}

/* Help/error messages */
.alert.alert-warning,
.alert.alert-danger {
  border-radius: var(--pp-radius-sm);
}

/* Small layout niceties */
.zero-cell { display: none; } /* hide the layout filler cells when possible */

@media (min-width: 992px) {
  /* compact the vertical rhythm on desktop */
  .section td.form-control-cell { padding-bottom: 10px !important; }
}

/* Remove row-level focus effects for a cleaner look */
.form-control-cell:focus-within {
  outline: none;
  background: transparent;
}

/* ---------- Inline label + control layout (desktop) ---------- */
.section td.form-control-cell .table-info,
.section td.form-control-cell .control {
  display: inline-block;
  vertical-align: middle;
}
.section td.form-control-cell .table-info {
  width: 28%;
  padding-right: 12px;
}
.section td.form-control-cell .control {
  width: 72%;
}
/* Put validators on the same line as the label */
.table-info .field-label {
  display: inline-block; /* override earlier block */
  margin: 0; /* inline alignment */
}
.table-info .validators {
  display: inline-block;
  margin-left: 6px;
}

/* Responsive: stack on small screens */
@media (max-width: 576px) {
  .section td.form-control-cell .table-info,
  .section td.form-control-cell .control {
    display: block;
    width: 100%;
    padding-right: 0;
  }
  .table-info .field-label { display: block; margin: 0 0 4px; }
}

/* ---------- Transparent background overrides per request ---------- */
.crmEntityFormView,
.entitylist,
.modal-content,
.popover-content {
  background: transparent !important;
  background-color: transparent !important;
}

/* Bootstrap 5 popover compatibility (optional) */
.popover,
.popover-body {
  background: transparent !important;
}

/* Ensure Bootstrap 5 uses transparent backgrounds via CSS variables */
.modal-content {
  --bs-modal-bg: transparent;
}
.popover {
  --bs-popover-bg: transparent;
  --bs-popover-border-color: transparent;
}
/* Popover arrow transparency */
.popover .popover-arrow::before,
.popover .popover-arrow::after {
  border-color: transparent !important;
}

/* ---------- Background override: revert to white (updated request) ---------- */
/* Ensures modal, popover, form view, and entity list surfaces have solid white backgrounds */
.crmEntityFormView,
.entitylist,
.modal-content,
.popover-content {
  background: #ffffff !important;
  background-color: #ffffff !important;
}

/* Restore Bootstrap variable-driven backgrounds */
.modal-content { --bs-modal-bg: #ffffff; }
.popover {
  --bs-popover-bg: #ffffff;
  --bs-popover-border-color: var(--pp-border, #e5e7eb);
}

/* ---------- Helper/description text styling ---------- */
.crmEntityFormView .description,
.description {
  display: block;
  color: var(--pp-subtle);
  font-size: 0.92rem;
  line-height: 1.45;
  margin: 6px 0 0;
  padding: 8px 10px;
  border-left: 3px solid var(--pp-primary);
  background: linear-gradient(90deg, rgba(158,34,57,.06), rgba(158,34,57,0));
  border-radius: 8px;
}

/* When description sits under controls/labels, tighten spacing */
.table-info + .description,
.control + .description,
.form-group + .description,
.form-control + .description { margin-top: 6px; }

/* Links inside description use brand color */
.description a {
  color: var(--pp-primary);
  text-decoration: underline;
}
.description a:hover { opacity: .9; }

/* ---------- Enhanced tab title styling ---------- */
h2.tab-title {
  display: -ms-flexbox;
  display: flex;
  -ms-flex-align: center;
  align-items: center;
  font-weight: 900;
  letter-spacing: 0.01em;
  font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2.1rem);
  line-height: 1.2;
  margin: 4px 0 18px;
  color: var(--pp-text);
}

/* Left gradient accent */
h2.tab-title::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 28px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--pp-primary), var(--pp-primary-600));
  box-shadow: 0 8px 18px rgba(158,34,57,.28);
  margin-right: 12px; /* replaces flex gap for compatibility */
}

/* Subtle fading rule to the right */
h2.tab-title::after {
  content: "";
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(158,34,57,.38), rgba(158,34,57,0));
  -ms-flex: 1 1 auto;
  flex: 1 1 auto;
  margin-left: 8px;
}

@media (max-width: 480px) {
  h2.tab-title {
    font-size: 1.35rem;
    margin-bottom: 14px;
  }
  h2.tab-title::before { height: 24px; width: 6px; }
  h2.tab-title::after { height: 2px; }
}

/* ---------- Section legend styling to complement tab titles ---------- */
legend.section-title h3 {
  position: relative;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: .06em;
  color: var(--pp-text);
  text-transform: uppercase;
  margin: 0 0 14px;
  padding: 12px 0 8px;
  border-bottom: 0 !important; /* override earlier border */
}

/* Left accent pill */
legend.section-title h3::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 22px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--pp-primary), var(--pp-primary-600));
  box-shadow: 0 6px 14px rgba(158,34,57,.22);
  margin-right: 10px;
  vertical-align: middle;
}

/* Fading rule below the title */
legend.section-title h3::after {
  content: "";
  display: block;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(158,34,57,.28), rgba(158,34,57,0));
  margin-top: 8px;
}

/* Scope to your table */
table.compact-actions tr > td:last-child {
  white-space: nowrap;
  text-align: right;
  width: 1%;            /* keep the column tight */
}

/* Make the actions row a single line, right-aligned */
table.compact-actions .pp-inline-actions {
  display: flex !important;
  flex-wrap: nowrap !important;   /* stop stacking */
  justify-content: flex-end;
  align-items: center;
  gap: 8px;                        /* small spacing between buttons */
  margin: 0;
  padding: 0;
}

/* Make the buttons compact and remove Bootstrap margins */
table.compact-actions .pp-inline-actions .btn {
  margin: 0 !important;           /* overrides .me-1 .mb-1 */
  padding: 4px 8px;
  font-size: 12px;
  line-height: 1.1;
  border-radius: 6px;
}

/* Tighter icon spacing */
table.compact-actions .pp-inline-actions .fa,
table.compact-actions .pp-inline-actions .glyphicon {
  margin: 0 4px 0 0;
  font-size: 14px;
}

/* Optional: shrink further on small screens */
@media (max-width: 768px) {
  table.compact-actions .pp-inline-actions .btn {
    padding: 4px 6px;
    font-size: 11px;
  }
}

/* ===== Modern Table Base ===== */
.table-modern {
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;                 /* clip rounded corners */
  box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 6px 20px rgba(0,0,0,.06);
}

/* Scroll wrapper (optional but recommended) */
.table-modern-wrap {
  overflow: auto;
  border-radius: 12px;
  background: linear-gradient(#fff,#fff) padding-box,
              linear-gradient(to right, rgba(0,0,0,0.08), transparent) border-box;
}

/* Cell sizing/typography */
.table-modern th,
.table-modern td {
  padding: 10px 12px;
  vertical-align: middle;
  border: 0;                        /* let zebra/row separators handle rhythm */
  font-size: 14px;
}

/* Header: sticky, clean, with small caps vibe */
.table-modern thead th {
  position: sticky; top: 0; z-index: 2;
  background: #f8fafc;              /* light slate */
  text-transform: uppercase;
  letter-spacing: .04em;
  font-weight: 600;
  font-size: 12px;
  color: #334155;                    /* slate-700 */
  border-bottom: 1px solid #e5e7eb;
}

/* Round the very first/last header cells */
.table-modern thead th:first-child { border-top-left-radius: 12px; }
.table-modern thead th:last-child  { border-top-right-radius: 12px; }

/* Zebra + hover */
.table-modern tbody tr:nth-child(even) td { background: #fcfcfd; }
.table-modern tbody tr:hover td { background: #f5f7fb; }

/* Subtle row dividers */
.table-modern tbody tr + tr td { border-top: 1px dashed #eef0f3; }

/* Make the action column tight & right (keeps your earlier fix) */
.table-modern tr > td:last-child { white-space: nowrap; text-align: right; width: 1%; }
.table-modern .pp-inline-actions { display:flex !important; flex-wrap:nowrap !important; gap:8px; justify-content:flex-end; align-items:center; }
.table-modern .pp-inline-actions .btn { margin:0 !important; padding:4px 8px; font-size:12px; line-height:1.1; border-radius:6px; }

/* Truncation for long text columns */
.table-modern td[data-attribute="stt_customer"],
.table-modern td[data-attribute="stt_ordernumber"],
.table-modern td[data-attribute="ownerid"] {
  max-width: 260px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Dates: monospace for readability */
.table-modern td[data-type="System.DateTime"] time {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
}

/* Status as a pill badge (no markup changes needed) */
.table-modern td[data-attribute="statuscode"] {
  white-space: nowrap;
}
/* Show status as a pill and hide the built-in text so it doesn't duplicate */
.table-modern td[data-attribute="statuscode"][aria-label] {
  position: relative;
  font-size: 0;                  /* hides the native text node */
  white-space: nowrap;
}

.table-modern td[data-attribute="statuscode"][aria-label]::before {
  content: attr(aria-label);
  display: inline-block;
  font-size: 12px;               /* restore readable size for the pill */
  line-height: 1.2;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
}

/* Optional: keyword color tweaks */
.table-modern td[data-attribute="statuscode"][aria-label*="Submitted"]::before { background:#fff7ed; color:#9a3412; }
.table-modern td[data-attribute="statuscode"][aria-label*="Approved"]::before  { background:#ecfdf5; color:#065f46; }
.table-modern td[data-attribute="statuscode"][aria-label*="Rejected"]::before  { background:#fef2f2; color:#991b1b; }

/* Sorting: cleaner arrow without fa icon */
.table-modern th.sort-enabled a .fa { display:none; }
.table-modern th.sort-enabled a {
  position: relative; display: inline-flex; align-items: center; gap: 6px;
}
.table-modern th.sort-enabled.sort a::after {
  content: "▲"; opacity: .45; font-size: 10px; transform: translateY(-1px) rotate(180deg);
}
.table-modern th.sort-enabled.sort.sort-desc a::after {
  content: "▼"; opacity: .75; transform: translateY(1px);
}

/* Row density options */
.table-modern.table-compact th,
.table-modern.table-compact td { padding: 8px 10px; }

/* Hide low-value columns on small screens (adjust indices if your column order changes) */
@media (max-width: 992px) {
  /* Example hides: Date Prepared (8th), Owner (9th) */
  .table-modern thead th:nth-child(8),
  .table-modern tbody td:nth-child(8),
  .table-modern thead th:nth-child(9),
  .table-modern tbody td:nth-child(9) { display: none; }
}

/* ===== Picklist (select) cells: label left, control right ===== */
.section td.picklist-cell .table-info,
.section td.picklist-cell .control {
  display: inline-block;
  vertical-align: middle;
}

.section td.picklist-cell .table-info {
  width: 28%;                 /* match your other fields */
  padding-right: 12px;
}

.section td.picklist-cell .control {
  width: 72%;
}

/* Keep label + validator on one line */
.section td.picklist-cell .table-info .field-label { 
  display: inline-block; 
  margin: 0; 
  font-weight: 600;
}
.section td.picklist-cell .table-info .validators {
  display: inline-block;
  margin-left: 6px;
  line-height: 1;
}

/* Select sizing/alignment */
.section td.picklist-cell select.form-select,
.section td.picklist-cell select.form-control,
.section td.picklist-cell select.picklist {
  display: block;
  width: 100%;
  min-height: 36px;
  line-height: 1.3;
  padding-right: 2rem;         /* space for caret */
  background-clip: padding-box;
  background-repeat: no-repeat;
  background-position: right .5rem center;
}

/* Multi-select (if you use it) */
.section td.picklist-cell select[multiple] {
  min-height: 120px;
  padding-right: .6rem;        /* no caret in multi-select */
}

/* Responsive: stack on small screens like other fields */
@media (max-width: 576px) {
  .section td.picklist-cell .table-info,
  .section td.picklist-cell .control {
    display: block;
    width: 100%;
    padding-right: 0;
  }
  .section td.picklist-cell .table-info .field-label {
    display: block;
    margin: 0 0 4px;
  }
}

/* Align picklist rows with other fields */
.section td.picklist-cell { 
  padding: 6px 6px 10px !important;   /* same rhythm as form-control-cell */
}

/* Label (left) / Control (right) just for selects */
.section td.picklist-cell .table-info,
.section td.picklist-cell .control {
  display: inline-block;
  vertical-align: middle;
}
.section td.picklist-cell .table-info { 
  width: 28%; 
  padding-right: 12px; 
}
.section td.picklist-cell .control { 
  width: 72%; 
  margin: 0; 
}

/* Normalize select sizing to match input/date height */
.section td.picklist-cell select.form-select,
.section td.picklist-cell select.form-control,
.section td.picklist-cell select.picklist {
  display: block;
  width: 100%;
  height: 40px;                     /* <- match your input-group height */
  line-height: 1.25;
  padding-top: .375rem;
  padding-bottom: .375rem;
  padding-right: 2rem;              /* room for caret */
  margin-bottom: 0 !important;      /* kill stray bottom gaps */
  background-clip: padding-box;
  background-position: right .5rem center;
  background-repeat: no-repeat;
}

/* (Optional) if your date input-group sits at 40px, keep it consistent */
.section td.form-control-cell .input-group > .form-control,
.section td.form-control-cell .input-group > .btn {
  height: 40px;
}

/* Mobile: stack label over select */
@media (max-width: 576px) {
  .section td.picklist-cell .table-info,
  .section td.picklist-cell .control { 
    display: block; width: 100%; padding-right: 0; 
  }
  .section td.picklist-cell .table-info .field-label { 
    display: block; margin: 0 0 4px; 
  }
}

.crmEntityFormView .cell {
    padding: 0 8px 20px 5px;
}

/* =========================
   FinCEN Header — Clean
   ========================= */

/* Tokens */
:root{
  --hdr-bg1:#0f172a;          /* slate-900 */
  --hdr-bg2:#1e293b;          /* slate-800 */
  --hdr-accent:#9e2239;       /* brand */
  --hdr-accent-600:#7f1b2e;
  --hdr-text:#e6ecf5;         /* light text */
  --ring:0 0 0 .2rem rgba(158,34,57,.35);
}

/* Bar */
.navbar.navbar-dark{
  position:sticky; top:0; z-index:1030;
  background:linear-gradient(120deg,var(--hdr-bg1),var(--hdr-bg2));
  color:var(--hdr-text);
  padding:.75rem 0;
  border-bottom:1px solid rgba(255,255,255,.06);
  box-shadow:0 10px 30px rgba(2,8,23,.25);
  backdrop-filter:blur(8px);
}

/* Layout: logo + nav aligned */
.navbar .custom-container{ display:flex; align-items:center; gap:20px; max-width:1280px; width:100%; }
.navbar .navbar-header{ display:flex; align-items:center; margin:0; padding:0; flex:0 0 auto; }
.navbar .navbar-header .xrm-attribute-value > a{ display:inline-flex; align-items:center; gap:12px; text-decoration:none; }
.navbar .navbar-header img{ height:56px; width:auto; display:block; filter:drop-shadow(0 4px 10px rgba(0,0,0,.25)); }

/* Hide H1 title (logo only) */
.navbar .siteTitle,
.navbar .custom-sitetitle{ display:none !important; }

/* Nav fills row; align with logo */
#navbar{ flex:1 1 auto !important; width:auto !important; max-height:none !important; }
.menu-bar{ margin-left:auto; display:flex; align-items:center; }
.menu-bar .weblinks{ display:flex; align-items:center; gap:.25rem .9rem; margin:0; padding:0; list-style:none; }

/* Links */
.menu-bar .nav-link{
  color:var(--hdr-text) !important; opacity:.95;
  padding:.5rem .8rem; line-height:1.2; border-radius:10px;
  transition:background .15s ease, transform .1s ease, opacity .15s ease;
}
.menu-bar .nav-link:hover{ background:rgba(255,255,255,.1); opacity:1; transform:translateY(-1px); }
.menu-bar .nav-link:focus{ box-shadow:var(--ring); outline:none; }

/* Thin dividers */
.nav-item.divider-vertical{
  align-self:center; width:1px; height:22px; margin:0 .4rem;
  background:rgba(255,255,255,.28);
}

/* Search icon bubble */
.navbar .navbar-icon{
  display:inline-flex; align-items:center; justify-content:center;
  width:36px; height:36px; border-radius:10px; background:rgba(255,255,255,.10);
}
.navbar .navbar-icon:hover{ background:rgba(255,255,255,.18); }

/* Toggler */
.custom-navbar-toggler{
  border:1px solid rgba(255,255,255,.25); border-radius:10px; padding:.4rem .6rem;
  transition:transform .15s ease, box-shadow .2s ease, background .2s ease;
}
.custom-navbar-toggler:hover{ background:rgba(255,255,255,.06); transform:translateY(-1px); }
.custom-navbar-toggler:focus{ box-shadow:var(--ring); outline:none; }
.navbar-dark .navbar-toggler-icon{
  background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3e%3cpath stroke='rgba(255,255,255,.9)' stroke-width='2' stroke-linecap='round' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Dropdowns */
.navbar .dropdown-toggle{ border-radius:10px; }
.navbar .username{ color:#fff; font-weight:700; }
.navbar .dropdown-menu{
  border:1px solid rgba(255,255,255,.12);
  background:rgba(15,23,42,.98); color:var(--hdr-text);
  border-radius:14px; padding:.4rem; min-width:220px;
  box-shadow:0 14px 40px rgba(2,8,23,.45); backdrop-filter:blur(10px);
}
.navbar .dropdown-item{ color:var(--hdr-text); border-radius:10px; }
.navbar .dropdown-item:hover{ background:rgba(255,255,255,.10); }
.navbar .dropdown-divider{ border-top-color:rgba(255,255,255,.12); }

/* Search dropdown */
.dropdown-search{ padding:.75rem !important; width:min(480px,92vw); }
.dropdown-search .form-search .form-control{
  background:#0b1220; color:var(--hdr-text);
  border:1px solid rgba(255,255,255,.15);
  height:42px; border-top-left-radius:10px; border-bottom-left-radius:10px;
}
.dropdown-search .btn{
  height:42px; border-top-right-radius:10px; border-bottom-right-radius:10px;
  background:var(--hdr-accent); border-color:var(--hdr-accent);
}
.dropdown-search .btn:hover{ background:var(--hdr-accent-600); }

/* Accent bar */
.navbar.navbar-dark::before{
  content:""; position:absolute; inset:0 0 auto 0; height:2px;
  background:linear-gradient(90deg,transparent,var(--hdr-accent),transparent);
  opacity:.55;
}

/* Responsiveness */
@media (max-width:1199.98px){
  .menu-bar .nav-link{ padding:.5rem .7rem; }
}
@media (max-width:991.98px){
  .navbar .navbar-header img{ height:48px; }
  .menu-bar{ width:100%; margin-top:.5rem; }
  .menu-bar .weblinks{ justify-content:flex-start; }
}

/* Remove vertical pipes/dividers between menu items */
.menu-bar .weblinks > li.divider-vertical,
.menu-bar .weblinks > li.divider-vertical::before,
.menu-bar .weblinks > li.divider-vertical::after {
  display: none !important;
  content: none !important;
}

/* If any theme adds borders as dividers, nuke them too */
.menu-bar .weblinks > li {
  border: 0 !important;
}

/* Tight, consistent spacing between links */
.menu-bar .weblinks {
  gap: 0 .9rem;   /* adjust to taste */
}


/* ===== Dashboard Widget shell ===== */
.widget {
  --widget-padding: 18px;
  --widget-radius: 14px;
  --widget-shadow: 0 8px 24px rgba(0,0,0,.08);
  --widget-border: 1px solid rgba(0,0,0,.06);
  background: #fff;
  border: var(--widget-border);
  border-radius: var(--widget-radius);
  box-shadow: var(--widget-shadow);
  padding: var(--widget-padding);
}

.widget-title {
  font-size: 1.125rem;
  font-weight: 700;
  margin: 0 0 .25rem 0;
}

.widget-subtle {
  color: #6b7280; /* gray-500 */
  font-size: .925rem;
  margin-bottom: .75rem;
}

/* List */
.widget-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.widget-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .6rem .25rem;
  border-radius: 10px;
}
.widget-item + .widget-item { margin-top: .15rem; }
.widget-item:hover { background: rgba(0,0,0,.03); }

/* Left side: index + title */
.widget-left {
  display: flex; align-items: center; gap: .75rem; min-width: 0;
}
.widget-index {
  width: 30px; height: 30px; border-radius: 8px;
  color: #fff; display: grid; place-items: center;
  font-weight: 700; font-size: .95rem;
}

/* Nice numbered colors (1–5 then cycle) */
.widget-item:nth-child(5n+1) .widget-index { background: #10b981; } /* teal/green */
.widget-item:nth-child(5n+2) .widget-index { background: #0ea5e9; } /* blue */
.widget-item:nth-child(5n+3) .widget-index { background: #3b82f6; } /* indigo */
.widget-item:nth-child(5n+4) .widget-index { background: #9ca3af; } /* gray */
.widget-item:nth-child(5n+5) .widget-index { background: #f59e0b; } /* amber */

.widget-title-line {
  font-weight: 600; white-space: nowrap; text-overflow: ellipsis; overflow: hidden;
}

/* Right side time */
.widget-time { color:#6b7280; font-weight:600; white-space:nowrap; }

/* Footer button */
.widget-footer {
  margin-top: .9rem; display:flex; justify-content:center;
}
.widget-cta {
  border: none; border-radius: 999px; padding:.55rem 1.05rem;
  background: linear-gradient(180deg, #1d7ed6, #1267b8);
  color:#fff; font-weight:600;
}
.widget-cta:hover{ filter:brightness(1.05); }

/* Empty state */
.widget-empty {
  color:#6b7280; text-align:center; padding:.75rem 0;
}

/* badges */
.widget-right { display:flex; align-items:center; gap:.5rem; }
.widget-badge { font-size:.75rem; font-weight:700; border-radius:999px; padding:.15rem .5rem; line-height:1; }

/* status coloring */
.widget-item.is-overdue  .widget-index { background:#dc2626; }     /* red */
.widget-item.is-today    .widget-index { background:#f59e0b; }     /* yellow */
.widget-item.is-future   .widget-index { background:#0ea5e9; }     /* blue */

/* badge tints */
.widget-badge.overdue { background:#fee2e2; color:#b91c1c; }
.widget-badge.today   { background:#fef3c7; color:#b45309; }
.widget-badge.future  { background:#dbeafe; color:#1e40af; }

/* make time adopt a softer color for future */
.widget-item.is-future .widget-time { color:#374151; } /* near-black */
.widget-item.is-today  .widget-time { color:#92400e; }
.widget-item.is-overdue .widget-time { color:#991b1b; }


.widget-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:.25rem}
.widget-action{display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;border-radius:999px;background:#eef2f7;color:#1d4ed8;text-decoration:none}
.widget-action:hover{filter:brightness(.97)}

.widget-donut{display:grid;grid-template-columns:180px 1fr;align-items:center;gap:14px}
.donut{width:180px;height:180px}
.donut-ring{fill:none;stroke:#eef2f7;stroke-width:16}
.donut-segment{fill:none;stroke-width:16;stroke-linecap:butt;transition:opacity .2s}
.donut-segment:hover{opacity:.85}
.donut-center{dominant-baseline:middle;text-anchor:middle;font-weight:800;fill:#0f172a}

.widget-legend{display:grid;gap:6px}
.widget-legend-item{display:grid;grid-template-columns:16px 1fr auto;align-items:center;column-gap:8px}
.legend-swatch{width:10px;height:10px;border-radius:2px}
.legend-label{color:#475569;font-weight:600;font-size:.85rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:260px}
.legend-count{font-weight:700;color:#0f172a;font-size:.9rem}

.msg-list{margin:0;padding:0;list-style:none;border-top:1px solid #eef2f7}
.msg-item{display:grid;grid-template-columns:44px 1fr auto;gap:12px;align-items:start;padding:14px 0;border-bottom:1px solid #eef2f7}
.msg-avatar{width:44px;height:44px;border-radius:50%;display:grid;place-items:center;background:#eef2f7;color:#334155;font-weight:700}
.msg-name{font-weight:700;color:#0f172a}
.msg-text{color:#475569;margin-top:2px}
.msg-ago{color:#94a3b8;white-space:nowrap;margin-left:12px}
.msg-reply{margin-top:8px;display:inline-block;background:#d1fae5;color:#065f46;border-radius:6px;font-size:.8rem;padding:3px 8px}

/* Header container */
  .navbar.static-top {
    background: #fff !important;
    border-bottom: 1px solid #e5e7eb; /* gray bottom border */
    box-shadow: none;
  }

  /* Brand/title */
  .navbar.static-top .navbar-brand,
  .navbar.static-top .navbar-header,
  .navbar.static-top .custom-sitetitle {
    color: #111 !important;
  }

  /* Links & icons (force black over navbar-dark defaults) */
  .navbar.static-top .nav-link,
  .navbar.static-top .navbar-icon,
  .navbar.static-top .username,
  .navbar.static-top .navbar-brand a,
  .navbar.static-top a.navbar-brand {
    color: #111 !important;
  }
  .navbar.static-top .nav-link:hover,
  .navbar.static-top .navbar-icon:hover {
    color: #000 !important;
    background-color: transparent;
  }

  /* Vertical dividers */
  .navbar.static-top .divider-vertical {
    width: 1px;
    background: #e5e7eb;
    margin: 0 8px;
  }

  /* Toggler: dark lines on white background */
  .navbar.static-top .navbar-toggler {
    border-color: rgba(0,0,0,.2);
  }
  .navbar.static-top .navbar-toggler-icon {
    /* Bootstrap's navbar-light icon (black) */
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(0,0,0,0.55)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
  }

  /* Dropdowns on white */
  .navbar.static-top .dropdown-menu,
  .navbar.static-top .dropdown-search {
    background: #fff;
    border: 1px solid #e5e7eb;
  }
  .navbar.static-top .dropdown-item {
    color: #111;
  }
  .navbar.static-top .dropdown-item:hover,
  .navbar.static-top .dropdown-item:focus {
    background: #f3f4f6;
    color: #111;
  }

  /* Search input/button inside dropdown */
  .navbar.static-top .dropdown-search .form-control {
    color: #111;
    background: #fff;
    border-color: #e5e7eb;
  }

  /* Skip link */
  .navbar.static-top .skip-to-content a { color: #111; }