/* modern-ui.css  VERSION: 2026-11-20-review */
/* System sans-serif fonts only (no font files to host). To change: edit --ui-font below. */
/* =====================================================================
   modern-ui.css  -  global font + control refresh
   Load LAST (after modern.css, theme, custom.css and Kendo CSS).
   Pure overrides: no view markup needs to change.
   Brand color: edit the variables below (or map to your theme color).
   ===================================================================== */
:root {
  --ui-font: "Segoe UI", Arial, Helvetica, sans-serif;
  --ui-primary: #2b6cb0;
  --ui-primary-hover: #245a94;
  --ui-primary-soft: rgba(43, 108, 176, .16);
  --ui-text: #111827;
  --ui-muted: #4b5563;
  --ui-border: #aab4bf;
  --ui-border-hover: #7b8794;
  --ui-bg-disabled: #f3f5f7;
  --ui-danger: #c53030;
  --ui-radius: 6px;
  --ui-control-h: 44px;
  --ui-ease: .15s ease-in-out;
}

/* ---------- Typography ---------- */
html, body,
input, select, textarea, button,
.form-control, .form-control-popup, .btn,
.k-widget, .k-input, .k-button, .k-grid, .k-list, .k-tabstrip, .k-window,
.chosen-container, .dropdown-menu, .table, label, legend {
  font-family: var(--ui-font) !important;
}
body {
  font-size: 16px;
  line-height: 1.5;
  color: var(--ui-text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, h5, h6, .page-header, .wizardlegend { font-family: var(--ui-font) !important; letter-spacing: -.01em; }
label, .form_text { font-size: 17px; font-weight: 500; }
.wizardlegend { font-weight: 600; }
/* keep icon fonts intact */
.fa, [class^="icon-"], [class*=" icon-"], .glyphicon, .wi { font-family: inherit; }
.fa { font-family: FontAwesome !important; }
.glyphicon { font-family: "Glyphicons Halflings" !important; }
[class^="icon-"], [class*=" icon-"] { font-family: "simple-line-icons" !important; }

/* ---------- Text inputs / selects / textareas ---------- */
.form-control, .form-control-popup,
input[type="text"], input[type="password"], input[type="email"], input[type="tel"],
input[type="number"], input[type="search"], select, textarea {
  font-size: 16px;
  color: var(--ui-text);
}
.form-control, .form-control-popup {
  height: var(--ui-control-h);
  background: #fff;
  border: 1px solid var(--ui-border) !important;
  border-radius: var(--ui-radius) !important;
  box-shadow: none !important;
  padding: 6px 12px !important;
  transition: border-color var(--ui-ease), box-shadow var(--ui-ease), background var(--ui-ease);
}
textarea.form-control, textarea.form-control-popup { height: auto; min-height: 100px; }
.form-control:hover, .form-control-popup:hover { border-color: var(--ui-border-hover) !important; }
.form-control:focus, .form-control-popup:focus {
  border-color: var(--ui-primary) !important;
  box-shadow: 0 0 0 3px var(--ui-primary-soft) !important;
  outline: 0;
}
.form-control::placeholder, .form-control-popup::placeholder { color: #6b7280; }
input[disabled], select[disabled], textarea[disabled], .form-control[readonly] {
  background: var(--ui-bg-disabled) !important; color: var(--ui-muted); cursor: not-allowed;
}
.input-validation-error, .has-error .form-control { border-color: var(--ui-danger) !important; }
.field-validation-error, .text-danger, label.error { color: var(--ui-danger); font-size: 14px; font-weight: 500; }

/* ---------- Buttons ---------- */
.btn {
  border-radius: var(--ui-radius) !important;
  font-size: 16px; font-weight: 600;
  padding: 7px 18px;
  min-height: var(--ui-control-h);
  line-height: 1.4;
  border-width: 1px;
  box-shadow: none !important;
  transition: background var(--ui-ease), border-color var(--ui-ease), transform .05s ease, box-shadow var(--ui-ease);
}
.btn:active { transform: translateY(1px); }
.btn:focus, .btn:focus-visible { outline: 0; box-shadow: 0 0 0 3px var(--ui-primary-soft) !important; }
.btn-sm { min-height: 30px; padding: 4px 12px; font-size: 15px; }
.btn-primary { background: var(--ui-primary); border-color: var(--ui-primary); color: #fff; }
.btn-primary:hover, .btn-primary:focus, .btn-primary:active { background: var(--ui-primary-hover); border-color: var(--ui-primary-hover); color: #fff; }
.btn-default { background: #fff; border-color: var(--ui-border); color: var(--ui-text); }
.btn-default:hover, .btn-default:focus { background: #f3f5f7; border-color: var(--ui-border-hover); color: var(--ui-text); }
.btn-link { font-weight: 500; color: var(--ui-primary); }
.btn[disabled], .btn.disabled { opacity: .5; cursor: not-allowed; }

/* ---------- Checkboxes & radios ---------- */
input[type="checkbox"], input[type="radio"] {
  width: 17px; height: 17px; margin: 0 6px 0 0;
  accent-color: var(--ui-primary);
  vertical-align: -3px; cursor: pointer;
}
input[type="checkbox"]:focus-visible, input[type="radio"]:focus-visible { outline: 2px solid var(--ui-primary); outline-offset: 2px; }

/* ---------- Kendo widgets (2021.3 default theme) ---------- */
.k-textbox, .k-input, .k-maskedtextbox .k-textbox,
.k-picker-wrap, .k-dropdown-wrap, .k-dropdown .k-dropdown-wrap, .k-datepicker .k-picker-wrap,
.k-autocomplete {
  border-radius: var(--ui-radius) !important;
  border-color: var(--ui-border) !important;
  background: #fff;
  box-shadow: none !important;
  transition: border-color var(--ui-ease), box-shadow var(--ui-ease);
}
.k-textbox, .k-maskedtextbox .k-textbox { min-height: var(--ui-control-h); padding: 6px 12px; font-size: 16px; }
.k-dropdown, .k-datepicker, .k-autocomplete, .k-maskedtextbox { width: 100%; }
.k-dropdown .k-dropdown-wrap, .k-datepicker .k-picker-wrap { min-height: var(--ui-control-h); }
.k-dropdown .k-input, .k-datepicker .k-input { height: calc(var(--ui-control-h) - 2px); line-height: calc(var(--ui-control-h) - 2px); font-size: 16px; padding: 0 12px; }
.k-textbox:hover, .k-picker-wrap:hover, .k-dropdown-wrap:hover { border-color: var(--ui-border-hover) !important; }
.k-textbox:focus, .k-state-focused, .k-state-focused > .k-picker-wrap,
.k-picker-wrap.k-state-focused, .k-dropdown-wrap.k-state-focused,
.k-dropdown-wrap.k-state-active, .k-picker-wrap.k-state-active {
  border-color: var(--ui-primary) !important;
  box-shadow: 0 0 0 3px var(--ui-primary-soft) !important;
}
.k-picker-wrap .k-select, .k-dropdown-wrap .k-select { border-radius: 0 var(--ui-radius) var(--ui-radius) 0; background: transparent; color: var(--ui-muted); }
.k-picker-wrap .k-select:hover, .k-dropdown-wrap .k-select:hover { color: var(--ui-primary); }
.k-state-disabled, .k-widget.k-state-disabled .k-input { background: var(--ui-bg-disabled); opacity: .75; }
.k-invalid, .k-widget.k-invalid .k-picker-wrap, .k-widget.k-invalid .k-dropdown-wrap { border-color: var(--ui-danger) !important; }

/* Kendo popups / lists / calendar */
.k-popup { border-radius: var(--ui-radius); border-color: var(--ui-border); box-shadow: 0 8px 24px rgba(15, 30, 50, .14); overflow: hidden; }
.k-list .k-item { padding: 8px 12px; font-size: 16px; }
.k-list .k-item:hover, .k-list .k-item.k-state-hover { background: #eef3f9; color: var(--ui-text); }
.k-list .k-item.k-state-selected, .k-calendar .k-state-selected .k-link { background: var(--ui-primary); color: #fff; }
.k-calendar .k-link { border-radius: 4px; }
.k-calendar .k-today .k-link { color: var(--ui-primary); font-weight: 600; }
.k-calendar .k-header { background: #f7f9fb; }

/* Kendo buttons / windows / grid / tabs */
.k-button { border-radius: var(--ui-radius); font-weight: 600; border-color: var(--ui-border); }
.k-button.k-primary { background: var(--ui-primary); border-color: var(--ui-primary); color: #fff; }
.k-window { border-radius: 10px; overflow: hidden; box-shadow: 0 16px 48px rgba(15, 30, 50, .22); border-color: var(--ui-border); }
.k-window-titlebar { background: #f7f9fb; color: var(--ui-text); font-weight: 600; border-bottom: 1px solid var(--ui-border); }
.k-grid { border-radius: var(--ui-radius); border-color: var(--ui-border); overflow: hidden; font-size: 15px; }
.k-grid th.k-header, .k-grid-header { background: #f3f6f9; color: var(--ui-text); font-weight: 600; }
.k-grid td { padding: 10px 12px; }
.k-grid tr:hover td { background: #f7fafd; }
.k-grid tr.k-alt td { background: #fbfcfd; }
.k-pager-wrap { background: #f7f9fb; border-color: var(--ui-border); }
.k-tabstrip-items .k-state-active { border-color: var(--ui-primary); color: var(--ui-primary); font-weight: 600; }

/* ---------- Chosen (searchable selects) ---------- */
.chosen-container-single .chosen-single,
.chosen-container-multi .chosen-choices {
  height: var(--ui-control-h); line-height: calc(var(--ui-control-h) - 2px);
  border: 1px solid var(--ui-border); border-radius: var(--ui-radius);
  background: #fff; box-shadow: none; padding: 0 12px; font-size: 16px; color: var(--ui-text);
  transition: border-color var(--ui-ease), box-shadow var(--ui-ease);
}
.chosen-container-multi .chosen-choices { height: auto; min-height: var(--ui-control-h); }
.chosen-container-active .chosen-single, .chosen-container-active.chosen-with-drop .chosen-single,
.chosen-container-active .chosen-choices {
  border-color: var(--ui-primary); box-shadow: 0 0 0 3px var(--ui-primary-soft);
}
.chosen-container .chosen-drop { border-color: var(--ui-primary); border-radius: 0 0 var(--ui-radius) var(--ui-radius); box-shadow: 0 8px 24px rgba(15, 30, 50, .14); }
.chosen-container .chosen-results li { padding: 8px 12px; font-size: 16px; }
.chosen-container .chosen-results li.highlighted { background: var(--ui-primary); }
.chosen-container-single .chosen-search input[type="text"] { border-radius: var(--ui-radius); border-color: var(--ui-border); height: 32px; }

/* ---------- Panels, tables, alerts, dropdown menus, modals ---------- */
.panel, .panel.panel-default { border-radius: 10px !important; box-shadow: 0 1px 2px rgba(15, 30, 50, .05); overflow: hidden; }
.panel .panel-heading { font-weight: 600; }
.table > thead > tr > th { font-weight: 600; font-size: 15px; }
.table > tbody > tr > td { vertical-align: middle; }
.table-hover > tbody > tr:hover { background: #f7fafd; }
.alert { border-radius: var(--ui-radius); border-width: 1px; font-size: 16px; }
.dropdown-menu { border-radius: var(--ui-radius); border-color: var(--ui-border); box-shadow: 0 8px 24px rgba(15, 30, 50, .14); padding: 6px; }
.dropdown-menu > li > a { border-radius: 4px; padding: 8px 12px; font-size: 16px; }
.modal-content, .popup_modal_wrapper { border-radius: 10px; }
.form-group { margin-bottom: 16px; }

/* ---------- Sidebar nav ---------- */
.page-sidebar .menu > li > a, .accordion-menu > li > a { font-size: 16px; font-weight: 500; }
.accordion-menu .sub-menu a { font-size: 15px; }

/* ---------- Login page (_LoginLayout) ---------- */
.form-holder .form-content .form-items .form-control {
  height: 44px; border: 1px solid var(--ui-border) !important; border-radius: var(--ui-radius) !important;
  font-size: 17px; padding: 8px 14px !important;
}
.form-holder .form-content .form-items label { font-weight: 500; margin-bottom: 6px; }
.form-holder .form-button .ibtn {
  font-family: var(--ui-font); font-size: 17px; font-weight: 600;
  min-height: 44px; padding: 10px 28px; border-radius: var(--ui-radius);
  border: 0; transition: filter var(--ui-ease), transform .05s ease;
}
.form-holder .form-button .ibtn:hover { filter: brightness(.93); }
.form-holder .form-button .ibtn:active { transform: translateY(1px); }
.form-holder .form-button a { font-weight: 500; }

/* =====================================================================
   CONTROLS v2  -  text boxes, date pickers, dropdowns (all variants)
   Uses !important only where page-level <style> blocks fight back.
   ===================================================================== */
:root {
  --ui-chevron: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1.5l5 5 5-5' fill='none' stroke='%236b7885' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/></svg>");
}

/* ---- 1. Text boxes (Bootstrap, popup variants, Kendo textbox / masked) ---- */
.form-control, .form-control-popup, .form-control-popup-date,
input.k-textbox, .k-textbox, .k-maskedtextbox > .k-textbox {
  box-sizing: border-box;
  height: var(--ui-control-h) !important;
  min-height: var(--ui-control-h);
  padding: 6px 12px !important;
  font-size: 16px !important;
  line-height: 1.4;
  color: var(--ui-text);
  background-color: #fff;
  border: 1px solid var(--ui-border) !important;
  border-radius: var(--ui-radius) !important;
  box-shadow: none !important;
  text-transform: none;
}
textarea.form-control, textarea.form-control-popup { height: auto !important; min-height: 100px; padding-top: 8px !important; }
.form-control:focus, .form-control-popup:focus, .form-control-popup-date:focus,
.k-textbox:focus, .k-textbox.k-state-focused, .k-maskedtextbox.k-state-focused > .k-textbox {
  border-color: var(--ui-primary) !important;
  box-shadow: 0 0 0 3px var(--ui-primary-soft) !important;
  outline: 0 !important;
}
.form-control[readonly], .form-control:disabled, .form-control-popup[readonly], .form-control-popup:disabled,
.k-textbox[readonly], .k-textbox:disabled {
  background-color: var(--ui-bg-disabled) !important;
  border-color: #e1e6eb !important;
  color: var(--ui-muted);
}


/* ---- 1b. Kendo TextBoxFor renders <span class="k-textbox"><input class="k-input"></span>.
        Style the SPAN as the box and make the inner input borderless, otherwise it looks
        like a box inside a box. ---- */
span.k-textbox, .k-widget.k-textbox {
  display: flex !important; align-items: center;
  width: 100%; padding: 0 !important; overflow: hidden;
}
span.k-textbox > input, span.k-textbox > .k-input, .k-widget.k-textbox > input {
  flex: 1 1 auto; width: 100% !important; min-width: 0;
  height: 100% !important; min-height: 0 !important;
  padding: 0 12px !important; margin: 0;
  font-size: 16px !important; line-height: 1.4;
  background: transparent !important; color: var(--ui-text);
  border: 0 !important; border-radius: 0 !important; box-shadow: none !important; outline: 0 !important;
}
span.k-textbox:focus-within, .k-widget.k-textbox:focus-within {
  border-color: var(--ui-primary) !important; box-shadow: 0 0 0 3px var(--ui-primary-soft) !important;
}
span.k-textbox.k-state-disabled, span.k-textbox:has(> input:disabled), span.k-textbox:has(> input[readonly]) {
  background: var(--ui-bg-disabled) !important; border-color: #e1e6eb !important;
}
span.k-textbox > input:disabled, span.k-textbox > input[readonly] { color: var(--ui-muted) !important; cursor: not-allowed; }


/* ---- 1c. Markup-proof version of 1b: Kendo 2021.3 may render
        <span class="k-textbox k-input ..."><input class="k-input-inner"></span>
        Any input nested directly in a Kendo wrapper is never its own box. ---- */
span.k-textbox, span.k-maskedtextbox > span.k-textbox {
  display: flex !important; align-items: center; box-sizing: border-box;
  width: 100%; height: var(--ui-control-h); min-height: var(--ui-control-h);
  padding: 0 !important; overflow: hidden; background: #fff;
  border: 1px solid var(--ui-border) !important; border-radius: var(--ui-radius) !important; box-shadow: none !important;
}
span.k-textbox > input, span.k-textbox > .k-input-inner, span.k-textbox > .k-input {
  flex: 1 1 auto; width: 100% !important; min-width: 0; height: 100% !important; min-height: 0 !important;
  margin: 0; padding: 0 12px !important; font-size: 16px !important; line-height: 1.4;
  background: transparent !important; border: 0 !important; border-radius: 0 !important;
  box-shadow: none !important; outline: 0 !important; color: var(--ui-text);
}
span.k-textbox:focus-within {
  border-color: var(--ui-primary) !important; box-shadow: 0 0 0 3px var(--ui-primary-soft) !important;
}


/* ---- Zip "-" Zip4 separator: the dash is its own <label> after the box. Now that the Kendo box
   is a full-width block, pin the dash into the gap to the right of the box, vertically centered. ---- */
.selectBoxContainer:has(> label.form_text > .k-textbox + *), .selectBoxContainer:has(> label.form_text .k-textbox) { position: relative; }
label.form_text:has(.k-textbox) + label.form_text:not(:has(*)) {
  position: absolute; top: 0; right: -16px; width: 12px; height: var(--ui-control-h);
  display: flex; align-items: center; justify-content: center; margin: 0; padding: 0;
  color: var(--ui-muted); font-weight: 600; pointer-events: none;
}
/* County read-only text: line it up with the text inside the boxes beside it */
#ddlCountrytxt { display: block; padding: 0 12px !important; line-height: var(--ui-control-h); font-size: 16px; color: var(--ui-text); }


/* Colored header bars (theme sets white text on them): never force a text color here */
.box-header .box-title, .box-header h1, .box-header h2, .box-header h3, .box-header h4,
.panel-heading h1, .panel-heading h2, .panel-heading h3, .panel-heading h4, .panel-heading .panel-title {
  font-family: var(--ui-font) !important; font-weight: 600; letter-spacing: -.01em;
}

/* ---- 2. Native <select> (Html.DropDownListFor with form-control) ---- */
select.form-control, select.form-control-popup {
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
  padding-right: 34px !important;
  background-image: var(--ui-chevron);
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px 8px;
  cursor: pointer;
}
select.form-control::-ms-expand { display: none; }

/* ---- 3. Kendo DropDownList / ComboBox / AutoComplete ---- */
.k-widget.k-dropdown, .k-widget.k-datepicker, .k-widget.k-autocomplete, .k-widget.k-maskedtextbox,
.k-widget.k-combobox { width: 100% !important; max-width: 100%; border: 0; background: transparent; }
.k-dropdown .k-dropdown-wrap, .k-combobox .k-dropdown-wrap, .k-datepicker .k-picker-wrap, .k-autocomplete {
  display: flex; align-items: stretch;
  height: var(--ui-control-h); min-height: var(--ui-control-h);
  background: #fff;
  border: 1px solid var(--ui-border) !important;
  border-radius: var(--ui-radius) !important;
  box-shadow: none !important;
  overflow: hidden;
}
.k-dropdown .k-dropdown-wrap .k-input, .k-combobox .k-dropdown-wrap .k-input, .k-datepicker .k-picker-wrap .k-input,
.k-autocomplete .k-input {
  flex: 1 1 auto; height: auto !important; line-height: calc(var(--ui-control-h) - 2px) !important;
  padding: 0 12px !important; font-size: 16px !important; color: var(--ui-text);
  background: transparent; border: 0 !important; box-shadow: none !important;
}
.k-dropdown .k-dropdown-wrap:hover, .k-datepicker .k-picker-wrap:hover, .k-combobox .k-dropdown-wrap:hover { border-color: var(--ui-border-hover) !important; }
.k-dropdown .k-state-focused, .k-dropdown .k-state-active, .k-datepicker .k-state-focused, .k-datepicker .k-state-active,
.k-combobox .k-state-focused, .k-autocomplete.k-state-focused {
  border-color: var(--ui-primary) !important;
  box-shadow: 0 0 0 3px var(--ui-primary-soft) !important;
}
/* arrow / calendar button */
.k-dropdown .k-select, .k-datepicker .k-select, .k-combobox .k-select {
  display: flex !important; align-items: center !important; justify-content: center !important;
  align-self: stretch !important; position: relative !important; float: none !important;
  box-sizing: border-box; width: 44px !important; min-width: 44px; height: 100% !important;
  margin: 0 !important; padding: 0 !important; line-height: 1 !important;
  background: transparent !important; border: 0 !important; border-left: 1px solid #e6eaee !important;
  color: var(--ui-muted); transition: color var(--ui-ease), background var(--ui-ease);
}
.k-dropdown .k-select:hover, .k-datepicker .k-select:hover, .k-combobox .k-select:hover { color: var(--ui-primary); background: #f3f7fb !important; }
.k-dropdown .k-select .k-icon, .k-datepicker .k-select .k-icon, .k-combobox .k-select .k-icon { font-size: 16px; position: static !important; margin: 0 !important; top: auto; left: auto; }
.k-dropdown .k-dropdown-wrap .k-input.k-readonly, .k-datepicker input[readonly] { cursor: pointer; }
.k-dropdown.k-state-disabled .k-dropdown-wrap, .k-datepicker.k-state-disabled .k-picker-wrap {
  background: var(--ui-bg-disabled); border-color: #e1e6eb !important; opacity: 1;
}
.k-dropdown.k-state-disabled .k-input, .k-datepicker.k-state-disabled .k-input { color: var(--ui-muted); }
/* placeholder text in Kendo inputs */
.k-input::placeholder, .k-textbox::placeholder { color: #6b7280; opacity: 1; }


/* ---- 3b. BULLETPROOF select button (calendar / dropdown arrow) ----
   Pinned to the right edge of the box with absolute positioning, so it fills the full height
   and centers its icon no matter what display/height other stylesheets set on the wrapper.
   Extra specificity + !important to beat theme and page-level CSS. ---- */
.k-widget.k-datepicker > .k-picker-wrap, .k-widget.k-dropdown > .k-dropdown-wrap, .k-widget.k-combobox > .k-dropdown-wrap {
  position: relative !important; box-sizing: border-box !important;
  height: var(--ui-control-h) !important; padding-right: 44px !important;
}
.k-widget.k-datepicker > .k-picker-wrap > span.k-select, .k-widget.k-dropdown > .k-dropdown-wrap > span.k-select,
.k-widget.k-combobox > .k-dropdown-wrap > span.k-select {
  position: absolute !important; top: 0 !important; bottom: 0 !important; right: 0 !important; left: auto !important;
  width: 44px !important; min-width: 44px !important; height: auto !important; max-height: none !important;
  margin: 0 !important; padding: 0 !important; float: none !important; line-height: 1 !important;
  display: flex !important; align-items: center !important; justify-content: center !important;
  box-sizing: border-box !important; background: transparent !important;
  border: 0 !important; border-left: 1px solid #e6eaee !important;
}
.k-widget.k-datepicker > .k-picker-wrap > span.k-select > .k-icon, .k-widget.k-dropdown > .k-dropdown-wrap > span.k-select > .k-icon,
.k-widget.k-combobox > .k-dropdown-wrap > span.k-select > .k-icon {
  position: static !important; margin: 0 !important; top: auto !important; left: auto !important; transform: none !important;
  display: block !important; width: 16px; height: 16px; line-height: 16px !important; font-size: 16px !important; text-align: center;
}
.k-widget.k-datepicker > .k-picker-wrap > input.k-input, .k-widget.k-dropdown > .k-dropdown-wrap > .k-input {
  width: 100% !important; height: 100% !important; box-sizing: border-box !important;
}

/* ---- 4. Kendo popups: dropdown list + calendar ---- */
.k-animation-container .k-popup { border: 1px solid var(--ui-border); border-radius: 8px; box-shadow: 0 10px 30px rgba(15, 30, 50, .16); }
.k-list-container .k-list-scroller { padding: 4px; }
.k-list .k-item { border-radius: 4px; margin: 1px 0; padding: 8px 12px; font-size: 16px; color: var(--ui-text); }
.k-list .k-item.k-state-focused { box-shadow: none; background: #eef3f9; }
.k-list .k-item.k-state-selected { background: var(--ui-primary); color: #fff; }
.k-calendar { font-family: var(--ui-font); width: 296px; border: 0; }
.k-calendar .k-header { padding: 8px; border: 0; background: #fff; }
.k-calendar .k-header .k-link.k-nav-fast { font-weight: 600; font-size: 16px; color: var(--ui-text); }
.k-calendar .k-header .k-link { border-radius: 6px; }
.k-calendar .k-header .k-link:hover { background: #eef3f9; }
.k-calendar th { color: var(--ui-muted); font-size: 14px; font-weight: 600; }
.k-calendar td .k-link { width: 36px; height: 36px; line-height: 36px; margin: 0 auto; padding: 0; border-radius: 50%; text-align: center; font-size: 15px; color: var(--ui-text); }
.k-calendar td.k-other-month .k-link { color: #b6bfc8; }
.k-calendar td:hover .k-link { background: #eef3f9; }
.k-calendar td.k-state-selected .k-link, .k-calendar td.k-state-selected:hover .k-link { background: var(--ui-primary); color: #fff; }
.k-calendar td.k-today .k-link { box-shadow: inset 0 0 0 1px var(--ui-primary); color: var(--ui-primary); font-weight: 600; }
.k-calendar td.k-state-selected.k-today .k-link { color: #fff; }
.k-calendar .k-footer { border-top: 1px solid #e6eaee; padding: 6px; }
.k-calendar .k-nav-today { color: var(--ui-primary); font-weight: 600; }
.k-calendar td.k-state-disabled .k-link { color: #c9d0d7; }


/* popup polish: white surfaces, brand-colored "today", round selected day */
.k-popup, .k-popup .k-list, .k-list-container, .k-calendar, .k-calendar .k-calendar-view, .k-calendar .k-footer { background: #fff !important; }
.k-calendar .k-footer .k-link.k-nav-today, .k-calendar .k-nav-today { color: var(--ui-primary) !important; font-weight: 600; }
.k-calendar td .k-link, .k-calendar td.k-state-selected .k-link { border-radius: 50% !important; }
.k-calendar td.k-state-selected .k-link { background: var(--ui-primary) !important; color: #fff !important; box-shadow: none !important; }

/* ---- 5. Chosen (searchable dropdowns, class chosen-select-searchable) ---- */
.chosen-container { width: 100% !important; font-size: 16px; }
.chosen-container-single .chosen-single {
  display: flex; align-items: center;
  height: var(--ui-control-h) !important; line-height: 1.4 !important;
  padding: 0 36px 0 12px !important;
  background: #fff !important; background-image: none !important;
  border: 1px solid var(--ui-border) !important; border-radius: var(--ui-radius) !important;
  box-shadow: none !important; color: var(--ui-text);
}
.chosen-container-single .chosen-single span { margin-right: 0; flex: 1 1 auto; }
.chosen-container-single .chosen-single:hover { border-color: var(--ui-border-hover) !important; }
.chosen-container-single .chosen-single div { width: 36px; right: 0; top: 0; height: 100%; }
.chosen-container-single .chosen-single div b {
  background: var(--ui-chevron) no-repeat center center !important; background-size: 12px 8px !important;
  transition: transform var(--ui-ease);
}
.chosen-container-active.chosen-with-drop .chosen-single div b { transform: rotate(180deg); }
.chosen-container-single .chosen-single abbr { top: 50%; margin-top: -6px; right: 40px; }
.chosen-container-active .chosen-single, .chosen-container-active.chosen-with-drop .chosen-single {
  border-color: var(--ui-primary) !important; box-shadow: 0 0 0 3px var(--ui-primary-soft) !important;
}
.chosen-container-active.chosen-with-drop .chosen-single { border-radius: var(--ui-radius) var(--ui-radius) 0 0 !important; }
.chosen-container .chosen-drop {
  border: 1px solid var(--ui-primary) !important; border-top: 0 !important;
  border-radius: 0 0 var(--ui-radius) var(--ui-radius) !important; box-shadow: 0 10px 30px rgba(15, 30, 50, .16);
}
.chosen-container .chosen-results { padding: 4px; margin: 0; }
.chosen-container .chosen-results li { border-radius: 4px; padding: 8px 12px; font-size: 16px; color: var(--ui-text); }
.chosen-container .chosen-results li.highlighted { background: #eef3f9 !important; background-image: none !important; color: var(--ui-text); }
.chosen-container .chosen-results li.result-selected { background: var(--ui-primary); color: #fff; }
.chosen-container .chosen-results li.no-results { background: transparent; color: var(--ui-muted); }
.chosen-container-single .chosen-search { padding: 8px; }
.chosen-container-single .chosen-search input[type="text"] {
  height: 34px; padding: 4px 12px; border: 1px solid var(--ui-border); border-radius: var(--ui-radius);
  background-image: none !important; font-size: 16px;
}
.chosen-container-single .chosen-search input[type="text"]:focus { border-color: var(--ui-primary); outline: 0; box-shadow: 0 0 0 3px var(--ui-primary-soft); }
.chosen-container-single.chosen-disabled .chosen-single { background: var(--ui-bg-disabled) !important; opacity: 1; color: var(--ui-muted); }

/* ---- 6. Input-group add-ons (calendar glyph beside inputs), file inputs ---- */
.input-group-addon { background: #f3f6f9; border: 1px solid var(--ui-border); border-radius: var(--ui-radius); color: var(--ui-muted); }
.input-group .form-control:first-child { border-top-right-radius: 0 !important; border-bottom-right-radius: 0 !important; }
.input-group-addon:last-child { border-top-left-radius: 0; border-bottom-left-radius: 0; border-left: 0; }
.inputfile + label { border-radius: var(--ui-radius); font-weight: 600; }


@supports ((-webkit-mask-image: url(x)) or (mask-image: url(x))) {
/* =====================================================================
   WIZARD STEP ICONS  -  modern outline icons (Lucide-style, inline SVG)
   Replaces the Font Awesome glyphs inside .round-tab without touching the
   views. Icons use currentColor, so the existing green / orange / grey
   step colors keep working.
   ===================================================================== */
.wizard .round-tab > i.fa,
.wizard .round-tab > i.wizard__icon {
  display: inline-block;
  width: 26px; height: 26px;
  font-size: 0 !important; line-height: 0 !important;
  vertical-align: middle;
  background-color: currentColor;
  -webkit-mask: var(--wiz-icon) center / contain no-repeat;
          mask: var(--wiz-icon) center / contain no-repeat;
}
.wizard .round-tab > i.fa::before { content: none !important; }
.wizard .round-tab > i.fa-info { --wiz-icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='10'/><path d='M12 16v-4M12 8h.01'/></svg>"); }
.wizard .round-tab > i.fa-book { --wiz-icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z'/><path d='M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z'/></svg>"); }
.wizard .round-tab > i.fa-user { --wiz-icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2'/><circle cx='12' cy='7' r='4'/></svg>"); }
.wizard .round-tab > i.fa-list-alt { --wiz-icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='8' y='2' width='8' height='4' rx='1'/><path d='M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2M12 11h4M12 16h4M8 11h.01M8 16h.01'/></svg>"); }
.wizard .round-tab > i.fa-briefcase { --wiz-icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='2' y='7' width='20' height='14' rx='2'/><path d='M16 21V5a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16'/></svg>"); }
.wizard .round-tab > i.fa-medkit { --wiz-icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M12 11v4M14 13h-4M16 6V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v2M18 6v14M6 6v14'/><rect x='2' y='6' width='20' height='14' rx='2'/></svg>"); }
.wizard .round-tab > i.fa-question { --wiz-icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='10'/><path d='M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3M12 17h.01'/></svg>"); }
.wizard .round-tab > i.fa-user-md { --wiz-icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M11 2v2M5 2v2M5 3H4a2 2 0 0 0-2 2v4a6 6 0 0 0 12 0V5a2 2 0 0 0-2-2h-1M8 15a6 6 0 0 0 12 0v-3'/><circle cx='20' cy='10' r='2'/></svg>"); }
.wizard .round-tab > i.fa-check { --wiz-icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M20 6 9 17l-5-5'/></svg>"); }
.wizard .round-tab > i.fa-upload { --wiz-icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4M17 8l-5-5-5 5M12 3v12'/></svg>"); }
.wizard .round-tab > i.fa-envelope { --wiz-icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='2' y='4' width='20' height='16' rx='2'/><path d='m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7'/></svg>"); }
.wizard .round-tab { display: flex; align-items: center; justify-content: center; transition: border-color var(--ui-ease), color var(--ui-ease), background var(--ui-ease); }
.wizard li:not(.disabled) > a:hover .round-tab { box-shadow: 0 0 0 4px var(--ui-primary-soft); }

/* =====================================================================
   ROW ACTION LINKS (Edit / PDF / Docs / Notes ...)
   <a><i class="fa fa-xxx fa-lg"></i><br/>Label</a>  ->  modern outline icon over a label,
   soft rounded hover tile. Colors still come from text-danger / text-warning / text-muted.
   ===================================================================== */
a > i.fa.fa-lg {
  display: block; flex: 0 0 auto; width: 22px; height: 22px; margin: 0 auto; pointer-events: none;
  font-size: 0 !important; line-height: 0 !important;
  background-color: currentColor;
  -webkit-mask: var(--act-icon, url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='9'/><path d='M12 8h.01M11 12h1v5h1'/></svg>")) center / contain no-repeat;
          mask: var(--act-icon, url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='9'/><path d='M12 8h.01M11 12h1v5h1'/></svg>")) center / contain no-repeat;
}
a > i.fa.fa-lg::before { content: none !important; }
a > i.fa.fa-lg + br { display: none; }
/* Bootstrap col-md-1 columns are far narrower than an icon + label. Let the columns that
   hold action links size to their content (floats then wrap instead of overlapping). */
[class*="col-"]:has(> a > i.fa.fa-lg) {
  width: auto !important; min-width: 56px; flex: 0 0 auto;
  padding-left: 2px !important; padding-right: 2px !important; text-align: center;
}
a:has(> i.fa.fa-lg) {
  display: inline-flex; flex-direction: column; align-items: center; gap: 4px;
  box-sizing: border-box; width: max-content; max-width: none; min-width: 0;
  padding: 4px 0; border-radius: 8px; position: relative; overflow: visible;
  font-size: 14px; font-weight: 500; line-height: 1.2; text-align: center;
  white-space: nowrap; text-decoration: none !important;
  transition: background var(--ui-ease), box-shadow var(--ui-ease);
}
a:has(> i.fa.fa-lg):hover { background: #eef3f9; box-shadow: 0 0 0 4px #eef3f9; z-index: 2; }
a:has(> i.fa.fa-lg):active { background: #e2eaf3; box-shadow: 0 0 0 4px #e2eaf3; }
a:has(> i.fa.fa-lg):focus-visible { outline: 2px solid var(--ui-primary); outline-offset: 2px; }
a:has(> i.fa.fa-lg.text-muted) { cursor: not-allowed; }
a:has(> i.fa.fa-lg.text-muted):hover { background: transparent; box-shadow: none; z-index: auto; }
a > i.fa.fa-pencil-square-o { --act-icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7'/><path d='M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z'/></svg>"); }
a > i.fa.fa-file-pdf-o { --act-icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z'/><path d='M14 2v4a2 2 0 0 0 2 2h4M10 9H8M16 13H8M16 17H8'/></svg>"); }
a > i.fa.fa-folder-open-o { --act-icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2'/></svg>"); }
a > i.fa.fa-file-text-o { --act-icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M15.5 3H5a2 2 0 0 0-2 2v14c0 1.1.9 2 2 2h14a2 2 0 0 0 2-2V8.5z'/><path d='M15 3v6h6'/></svg>"); }
a > i.fa.fa-ban { --act-icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='10'/><path d='m4.9 4.9 14.2 14.2'/></svg>"); }
a > i.fa.fa-eye { --act-icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M1 12s4-7 11-7 11 7 11 7-4 7-11 7S1 12 1 12z'/><circle cx='12' cy='12' r='3'/></svg>"); }
a > i.fa.fa-street-view { --act-icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M9 3h6a2 2 0 0 1 2 2v1H7V5a2 2 0 0 1 2-2z'/><path d='M7 6H6a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-1'/><path d='M12 17.5s-3.5-2-3.5-4.5a2 2 0 0 1 3.5-1.3 2 2 0 0 1 3.5 1.3c0 2.5-3.5 4.5-3.5 4.5z'/></svg>"); }
a > i.fa.fa-mobile { --act-icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='7' y='2' width='10' height='20' rx='2'/><path d='M11 18h2'/></svg>"); }
a > i.fa.fa-trash-o, a > i.fa.fa-trash { --act-icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M3 6h18'/><path d='M8 6V4a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v2'/><path d='M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6'/><path d='M10 11v6M14 11v6'/></svg>"); }
}


/* ---- Active wizard step: make it POP ----
   Filled circle + white icon, slightly enlarged, soft glow, one-time pop animation.
   Change --wiz-active to match your theme. ---- */
:root { --wiz-active: #f39c12; --wiz-active-glow: rgba(243, 156, 18, .28); }
.wizard .nav-tabs > li.active > a .round-tab,
.wizard .nav-tabs > li.active .round-tab {
  background: var(--wiz-active) !important;
  border-color: var(--wiz-active) !important;
  color: #fff !important;
  transform: scale(1.14);
  box-shadow: 0 0 0 6px var(--wiz-active-glow), 0 8px 18px rgba(0, 0, 0, .16) !important;
  animation: wiz-pop .45s cubic-bezier(.34, 1.56, .64, 1) both, wiz-ring 1.6s ease-out .45s 2;
  position: relative; z-index: 2;
}
.wizard .nav-tabs > li.active .round-tab > i { color: #fff !important; }
@keyframes wiz-pop  { 0% { transform: scale(.82); } 100% { transform: scale(1.14); } }
@keyframes wiz-ring {
  0%   { box-shadow: 0 0 0 0 var(--wiz-active-glow), 0 8px 18px rgba(0, 0, 0, .16); }
  70%  { box-shadow: 0 0 0 14px rgba(243, 156, 18, 0), 0 8px 18px rgba(0, 0, 0, .16); }
  100% { box-shadow: 0 0 0 6px var(--wiz-active-glow), 0 8px 18px rgba(0, 0, 0, .16); }
}
@media (prefers-reduced-motion: reduce) {
  .wizard .nav-tabs > li.active .round-tab { animation: none !important; }
}


/* =====================================================================
   CLICKABLE CONTROLS: lift + glow on hover, press-down on click
   ===================================================================== */
:root {
  --ui-success: #1f9d63; --ui-success-hover: #188250;
  --ui-warning: #f0a30a; --ui-warning-hover: #d48f06;
  --ui-danger-btn: #d64545; --ui-danger-btn-hover: #b93636;
  --ui-lift: 0 6px 14px rgba(15, 30, 50, .18);
}
.btn, .k-button, .form-holder .form-button .ibtn, button.ibtn {
  position: relative; cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: transform .15s cubic-bezier(.2, .8, .2, 1), box-shadow .15s ease, background-color .15s ease, border-color .15s ease, filter .15s ease !important;
}
.btn:not([disabled]):not(.disabled):hover, .k-button:not(.k-state-disabled):not([disabled]):hover,
.form-holder .form-button .ibtn:hover {
  transform: translateY(-2px); box-shadow: var(--ui-lift) !important; filter: none;
}
.btn:not([disabled]):not(.disabled):active, .k-button:not(.k-state-disabled):not([disabled]):active,
.form-holder .form-button .ibtn:active {
  transform: translateY(1px) scale(.97); box-shadow: 0 1px 2px rgba(15, 30, 50, .22) !important; transition-duration: .05s !important;
}
.btn:focus-visible, .k-button:focus-visible, .ibtn:focus-visible { outline: 3px solid var(--ui-primary-soft); outline-offset: 2px; }
.btn[disabled], .btn.disabled, .k-button.k-state-disabled { transform: none !important; box-shadow: none !important; cursor: not-allowed; }

.btn-success { background: var(--ui-success); border-color: var(--ui-success); color: #fff; }
.btn-success:hover, .btn-success:focus, .btn-success:active { background: var(--ui-success-hover); border-color: var(--ui-success-hover); color: #fff; }
.btn-warning { background: var(--ui-warning); border-color: var(--ui-warning); color: #fff; }
.btn-warning:hover, .btn-warning:focus, .btn-warning:active { background: var(--ui-warning-hover); border-color: var(--ui-warning-hover); color: #fff; }
.btn-danger { background: var(--ui-danger-btn); border-color: var(--ui-danger-btn); color: #fff; }
.btn-danger:hover, .btn-danger:focus, .btn-danger:active { background: var(--ui-danger-btn-hover); border-color: var(--ui-danger-btn-hover); color: #fff; }
.btn-secondary { background: #eef1f5; border-color: #eef1f5; color: var(--ui-text); }
.btn-secondary:hover { background: #e2e7ee; border-color: #e2e7ee; color: var(--ui-text); }
.btn-default:not([disabled]):hover { border-color: var(--ui-primary); color: var(--ui-primary); background: #fff; }
.btn-link:hover { text-decoration: underline; box-shadow: none !important; transform: none; }
.btn-large { min-height: 44px; padding-top: 8px; padding-bottom: 8px; }
/* Buttons inside the app's fixed-width field containers (e.g. the 100px Search cell) must never grow past
   the cell and cover the neighbour (e.g. the "Advanced Search" link). */
.medium_field_container .btn, .selectBoxContainer .btn {
  box-sizing: border-box; max-width: 100%; padding-left: 12px; padding-right: 12px; white-space: nowrap;
}

/* top-bar / menu links and dropdown items: smooth color + nudge */
.dropdown-menu > li > a { transition: background .12s ease, padding-left .12s ease; }
.dropdown-menu > li > a:hover { background: #eef3f9; padding-left: 16px; }
.accordion-menu > li > a, .accordion-menu .sub-menu a { transition: background .15s ease, padding-left .15s ease, color .15s ease; }
.accordion-menu .sub-menu a:hover { padding-left: 24px; }

/* wizard steps pop on hover too (clickable ones only) */
.wizard li:not(.disabled):not(.active) > a .round-tab { transition: transform .18s cubic-bezier(.2,.8,.2,1), box-shadow .18s ease, border-color .18s ease; }
.wizard li:not(.disabled):not(.active) > a:hover .round-tab { transform: scale(1.1) translateY(-2px); box-shadow: 0 8px 16px rgba(15,30,50,.2), 0 0 0 4px var(--ui-primary-soft); }
.wizard li:not(.disabled) > a:active .round-tab { transform: scale(.96); }

/* action links (Edit/PDF/Docs/Notes): icon pops, the link itself never moves, so neighbours can't be covered */
@supports ((-webkit-mask-image: url(x)) or (mask-image: url(x))) {
  a:has(> i.fa.fa-lg) > i.fa.fa-lg { transition: transform .18s cubic-bezier(.2,.8,.2,1); }
  a:has(> i.fa.fa-lg):hover > i.fa.fa-lg { transform: scale(1.25) translateY(-1px); }
  a:has(> i.fa.fa-lg):active > i.fa.fa-lg { transform: scale(.9); }
  a:has(> i.fa.fa-lg.text-muted):hover > i.fa.fa-lg { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .btn:hover, .k-button:hover, .ibtn:hover, .wizard a:hover .round-tab, a:hover > i.fa.fa-lg { transform: none !important; }
}


/* =====================================================================
   APPLICATION ENTRY UX  (wizard states, transitions, field feedback, choice cards)
   ===================================================================== */

/* ---- 1. Step states: finished = soft green fill + check badge; upcoming = dimmed ---- */
.wizard .round-tab { position: relative; }
.wizard li.finish > a .round-tab { background: #e9f7f0 !important; border-color: var(--ui-success) !important; color: var(--ui-success); }
.wizard li.finish > a .round-tab::after {
  content: ""; position: absolute; right: -4px; bottom: -4px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--ui-success) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'><path d='M20 6 9 17l-5-5'/></svg>") center / 13px 13px no-repeat; border: 2px solid #fff;
  animation: wiz-badge .35s cubic-bezier(.34, 1.56, .64, 1) both;
}
@keyframes wiz-badge { from { transform: scale(0); } to { transform: scale(1); } }
.wizard li.disabled > a .round-tab { opacity: .55; }
/* connecting line fills with progress (width set by modern-ui.js through --wiz-progress) */
.wizard .connecting-line { overflow: visible; }
.wizard .connecting-line::after {
  content: ""; position: absolute; left: 0; top: 0; height: 100%; width: var(--wiz-progress, 0%);
  background: linear-gradient(90deg, var(--ui-success), #36c58a); border-radius: 2px;
  transition: width .6s cubic-bezier(.4, 0, .2, 1);
}

/* ---- 2. Smooth step-to-step transition ---- */
.tab-content > .tab-pane.active { animation: wiz-in .38s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes wiz-in { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }

/* ---- 3. Progress header (injected by modern-ui.js above the step icons) ---- */
.wiz-progress { max-width: 100%; margin: 4px 0 18px; padding: 0 4px; }
.wiz-progress-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.wiz-step-label { font-size: 16px; font-weight: 600; color: var(--ui-text); }
.wiz-step-label small { font-weight: 500; color: var(--ui-muted); margin-left: 6px; font-size: 15px; }
.wiz-pct { font-size: 15px; font-weight: 700; color: var(--ui-success); font-variant-numeric: tabular-nums; }
.wiz-track { height: 8px; background: #e6ebf0; border-radius: 99px; overflow: hidden; }
.wiz-fill { height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--ui-success), #36c58a); transition: width .6s cubic-bezier(.4, 0, .2, 1); }

/* ---- 4. Field feedback ---- */
.form_label_container label, .form_label_container .form_text { transition: color .15s ease; }
.medium_field_container:focus-within > .form_label_container label,
.large_field_container:focus-within > .form_label_container label { color: var(--ui-primary); }
input.form-control.valid:not([disabled]):not([readonly]) {
  border-color: #8fd3b2 !important; padding-right: 34px !important;
  background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231f9d63' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><path d='M20 6 9 17l-5-5'/></svg>") right 12px center / 14px 14px no-repeat;
}
input.input-validation-error, .k-widget.k-invalid, span.k-textbox.k-invalid { animation: wiz-shake .35s ease; }
@keyframes wiz-shake { 20%, 60% { transform: translateX(-4px); } 40%, 80% { transform: translateX(4px); } }

/* ---- 5. Radio buttons as tappable choice cards (label wraps the input) ---- */
label:has(> input[type="radio"]) {
  position: relative; display: inline-flex; align-items: center; gap: 8px;
  margin: 0 10px 8px 0; padding: 8px 16px; cursor: pointer;
  background: #fff; border: 1px solid var(--ui-border); border-radius: 999px;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease, transform .1s ease;
}
label:has(> input[type="radio"]) > input[type="radio"] { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
label:has(> input[type="radio"]) label, label:has(> input[type="radio"]) .form_text { margin: 0; cursor: pointer; padding: 0 !important; color: var(--ui-text) !important; font-weight: 500; }
label:has(> input[type="radio"])::before {
  content: ""; flex: 0 0 auto; width: 16px; height: 16px; border-radius: 50%; box-sizing: border-box;
  border: 2px solid var(--ui-border-hover); background: #fff; transition: all .15s ease;
}
label:has(> input[type="radio"]:hover), label:has(> input[type="radio"]):hover { border-color: var(--ui-primary); background: #f5f9fd; }
label:has(> input[type="radio"]:checked) { border-color: var(--ui-primary); background: #eaf2fb; box-shadow: 0 0 0 3px var(--ui-primary-soft); }
label:has(> input[type="radio"]:checked)::before { border-color: var(--ui-primary); background: radial-gradient(circle, var(--ui-primary) 0 4px, #fff 4.5px); }
label:has(> input[type="radio"]:focus-visible) { outline: 3px solid var(--ui-primary-soft); outline-offset: 2px; }
label:has(> input[type="radio"]:disabled) { opacity: .55; cursor: not-allowed; background: var(--ui-bg-disabled); }
label:has(> input[type="radio"]:active) { transform: scale(.97); }

/* ---- 6. Sticky Back / Next bar: stays visible at the bottom of a long step ---- */
.tab-pane .row:has(button[id^="btnStep"][id$="Next"]), .tab-pane .row:has(button.prev-step) {
  position: sticky; bottom: 0; z-index: 30; display: flow-root; padding: 10px 0; margin-top: 12px;
  background: rgba(255, 255, 255, .94); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  border-top: 1px solid #e3e8ed; box-shadow: 0 -6px 16px rgba(15, 30, 50, .06);
}
.tab-pane .row:has(button.prev-step) ul.list-inline, .tab-pane .row:has(button[id^="btnStep"][id$="Next"]) ul.list-inline { margin-bottom: 0; }


/* Validation errors must stay red: placed after the base .form-control rules so it wins */
.form-control.input-validation-error, input.input-validation-error, select.input-validation-error, textarea.input-validation-error,
.has-error .form-control, span.k-textbox.k-invalid, .k-widget.k-invalid > .k-picker-wrap, .k-widget.k-invalid > .k-dropdown-wrap {
  border-color: var(--ui-danger) !important; background-color: #fff6f6;
}
.form-control.input-validation-error:focus, input.input-validation-error:focus, span.k-textbox.k-invalid:focus-within {
  box-shadow: 0 0 0 3px rgba(197, 48, 48, .18) !important;
}

@media (prefers-reduced-motion: reduce) {
  .tab-content > .tab-pane.active, .wizard li.finish > a .round-tab::after, input.input-validation-error, .k-widget.k-invalid { animation: none !important; }
  .wiz-fill, .wizard .connecting-line::after { transition: none; }
}


/* =====================================================================
   GRIDS & TABLES  (Bootstrap tables + DataTables)
   ===================================================================== */
table.table, table.dataTable { border-collapse: separate; border-spacing: 0; width: 100%; }
table.table > thead > tr > th, table.dataTable > thead > tr > th {
  background: #f3f6f9; color: var(--ui-text);
  font-size: 14px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap;
  padding: 12px 14px; border: 0 !important; border-bottom: 2px solid var(--ui-border) !important;
}
table.table > tbody > tr > td, table.dataTable > tbody > tr > td {
  padding: 12px 14px; font-size: 16px; vertical-align: middle;
  border: 0 !important; border-bottom: 1px solid #edf0f3 !important;
}
.table-bordered { border: 1px solid var(--ui-border); border-radius: 10px; overflow: hidden; }
.table-striped > tbody > tr:nth-of-type(odd) { background-color: #fbfcfd; }
.table-striped > tbody > tr:nth-of-type(even) { background-color: #fff; }
table.dataTable > tbody > tr, .table > tbody > tr { transition: background-color .12s ease; }
table.dataTable > tbody > tr:hover, .table > tbody > tr:hover { background-color: #eef5fc !important; }
table.dataTable > tbody > tr:hover > td { box-shadow: inset 0 0 0 9999px rgba(43, 108, 176, .03); }
table.dataTable > tbody > tr > td a:not(.btn) { color: var(--ui-primary); }
table.dataTable > tbody > tr > td a:not(.btn):hover { color: var(--ui-primary-hover); }
/* sticky header inside a scroll area on larger screens */
@media (min-width: 992px) {
  .table-responsive:has(> table.dataTable) { max-height: 70vh; overflow: auto; border-radius: 10px; }
  .table-responsive > table.dataTable > thead > tr > th { position: sticky; top: 0; z-index: 5; box-shadow: 0 1px 0 var(--ui-border); }
}
/* empty state */
td.dataTables_empty { text-align: center; padding: 54px 12px !important; color: var(--ui-muted); font-size: 16px; background: #fff; }
td.dataTables_empty::before {
  content: ""; display: block; width: 46px; height: 46px; margin: 0 auto 12px; background-color: #b3bfcb;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M22 12h-6l-2 3h-4l-2-3H2'/><path d='M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z'/></svg>") center / contain no-repeat; mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M22 12h-6l-2 3h-4l-2-3H2'/><path d='M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z'/></svg>") center / contain no-repeat;
}
/* status badges (added by modern-ui.js) */
.ui-badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
  font-size: 14px; font-weight: 600; line-height: 1.5; white-space: nowrap; border: 1px solid transparent;
}
.ui-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.ui-badge--green { background: #e6f6ee; color: #14663f; border-color: #c4e8d6; }
.ui-badge--amber { background: #fff4de; color: #8a5a00; border-color: #f6dfa8; }
.ui-badge--red   { background: #fdeaea; color: #9b2222; border-color: #f4c4c4; }
.ui-badge--grey  { background: #eef1f5; color: #4b5866; border-color: #dbe1e8; }
/* DataTables controls */
.dataTables_wrapper .dataTables_filter input, .dataTables_wrapper .dataTables_length select {
  height: var(--ui-control-h); padding: 6px 12px; border: 1px solid var(--ui-border); border-radius: var(--ui-radius);
  background-color: #fff; font-size: 16px; margin: 0 6px; outline: 0; transition: border-color var(--ui-ease), box-shadow var(--ui-ease);
}
.dataTables_wrapper .dataTables_filter input:focus, .dataTables_wrapper .dataTables_length select:focus { border-color: var(--ui-primary); box-shadow: 0 0 0 3px var(--ui-primary-soft); }
.dataTables_wrapper .dataTables_info { color: var(--ui-muted); font-size: 15px; padding-top: 16px; }
.dataTables_wrapper .dataTables_paginate { padding-top: 10px; }
.dataTables_wrapper .dataTables_paginate .paginate_button, .pagination > li > a, .pagination > li > span {
  display: inline-block; min-width: 36px; margin: 0 2px; padding: 6px 12px !important; text-align: center;
  border: 1px solid transparent !important; border-radius: 8px !important; background: transparent !important;
  color: var(--ui-text) !important; font-size: 15px; font-weight: 500; cursor: pointer; transition: background .12s ease, border-color .12s ease;
}
.dataTables_wrapper .dataTables_paginate .paginate_button:hover, .pagination > li > a:hover { background: #eef3f9 !important; border-color: #d5e1ee !important; color: var(--ui-text) !important; }
.dataTables_wrapper .dataTables_paginate .paginate_button.current, .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover,
.pagination > .active > a, .pagination > .active > a:hover, .pagination > .active > span {
  background: var(--ui-primary) !important; border-color: var(--ui-primary) !important; color: #fff !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled, .pagination > .disabled > a { opacity: .4; cursor: not-allowed; }

/* =====================================================================
   LOADING FEEDBACK  (overlay, top progress bar, busy buttons)
   ===================================================================== */
@keyframes ui-spin { to { transform: rotate(360deg); } }
.blockUI.blockOverlay { background: rgba(15, 30, 50, .38) !important; opacity: 1 !important; -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.blockUI.blockMsg { border: 0 !important; background: transparent !important; box-shadow: none !important; color: var(--ui-text) !important; }
#ajaxWaitModal { background: transparent !important; width: auto !important; }
#ajaxWaitModal #LoaderImage { display: none !important; }
#ajaxWaitModal .loader_col-md-4 > div[style*="opacity"] { display: none !important; }
#ajaxWaitModal .loader_col-md-4, #ajaxWaitModal .loading_modal_wrapper {
  display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center;
}
#ajaxWaitModal .loader_col-md-4 { padding: 26px 36px; background: #fff; border-radius: 16px; box-shadow: 0 20px 50px rgba(15, 30, 50, .3); }
#ajaxWaitModal .loader_col-md-4::before {
  content: ""; width: 44px; height: 44px; border-radius: 50%; box-sizing: border-box;
  border: 4px solid #dfe8f2; border-top-color: var(--ui-primary); animation: ui-spin .8s linear infinite;
}
#ajaxWaitModal .loading_txt { font-size: 16px; font-weight: 600; color: var(--ui-text); }
.pace .pace-progress { background: var(--ui-primary) !important; height: 3px !important; }
.pace .pace-activity { border-top-color: var(--ui-primary) !important; border-left-color: var(--ui-primary) !important; }
/* busy button: text hides, spinner shows, width stays the same, clicks are ignored */
.btn.is-busy, .btn[aria-busy="true"] { position: relative; color: transparent !important; pointer-events: none; cursor: progress; transform: none !important; box-shadow: none !important; }
.btn.is-busy *, .btn[aria-busy="true"] * { color: transparent !important; }
.btn.is-busy::after, .btn[aria-busy="true"]::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; box-sizing: border-box;
  border: 2px solid rgba(255, 255, 255, .4); border-top-color: #fff; border-radius: 50%; animation: ui-spin .7s linear infinite;
}
.btn-default.is-busy::after, .btn-link.is-busy::after, .btn-secondary.is-busy::after { border-color: rgba(31, 41, 51, .2); border-top-color: var(--ui-primary); }

/* =====================================================================
   TOASTS & ALERTS
   ===================================================================== */
#ui-toasts { position: fixed; top: 18px; right: 18px; z-index: 100000; display: flex; flex-direction: column; gap: 10px; width: min(380px, calc(100vw - 28px)); pointer-events: none; }
.ui-toast {
  position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 14px 40px 16px 16px; overflow: hidden; pointer-events: auto;
  background: #fff; border: 1px solid var(--ui-border); border-left: 5px solid var(--t-color, var(--ui-primary)); border-radius: 12px;
  box-shadow: 0 12px 32px rgba(15, 30, 50, .18); font-size: 16px; line-height: 1.45; color: var(--ui-text);
  animation: ui-toast-in .32s cubic-bezier(.2, .8, .2, 1) both;
}
.ui-toast.is-leaving { animation: ui-toast-out .25s ease forwards; }
.ui-toast__icon { flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%; background: var(--t-color, var(--ui-primary)); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 800; }
.ui-toast__body { flex: 1 1 auto; min-width: 0; word-wrap: break-word; }
.ui-toast__title { font-weight: 700; margin-bottom: 2px; }
.ui-toast__close { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border: 0; border-radius: 50%; background: transparent url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23506070' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><path d='M18 6 6 18M6 6l12 12'/></svg>") center / 12px no-repeat; cursor: pointer; opacity: .7; transition: background-color .12s ease, opacity .12s ease; }
.ui-toast__close:hover { background-color: #eef1f5; opacity: 1; }
.ui-toast__bar { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: var(--t-color, var(--ui-primary)); opacity: .55; transform-origin: left; animation: ui-toast-bar var(--t-dur, 4500ms) linear forwards; }
.ui-toast:hover .ui-toast__bar { animation-play-state: paused; }
.ui-toast--success { --t-color: var(--ui-success); } .ui-toast--error { --t-color: var(--ui-danger); }
.ui-toast--warning { --t-color: var(--ui-warning); } .ui-toast--info { --t-color: var(--ui-primary); }
@keyframes ui-toast-in { from { opacity: 0; transform: translateX(40px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes ui-toast-out { to { opacity: 0; transform: translateX(40px); } }
@keyframes ui-toast-bar { to { transform: scaleX(0); } }
/* toastr (if used) matches */
#toast-container > div { border-radius: 12px !important; box-shadow: 0 12px 32px rgba(15, 30, 50, .18) !important; opacity: 1 !important; padding: 14px 16px 14px 50px !important; font-family: var(--ui-font) !important; }
/* inline alert boxes */
.alert { position: relative; border: 1px solid transparent; border-left-width: 5px; border-radius: 10px; padding: 12px 16px; box-shadow: 0 1px 2px rgba(15, 30, 50, .04); }
.alert-success { background: #eaf7f0; border-color: #c4e8d6; border-left-color: var(--ui-success); color: #145a3a; }
.alert-info    { background: #eaf2fb; border-color: #c9ddf1; border-left-color: var(--ui-primary); color: #1d4b80; }
.alert-warning { background: #fff6e3; border-color: #f6e2b0; border-left-color: var(--ui-warning); color: #7a5200; }
.alert-danger  { background: #fdeeee; border-color: #f5c9c9; border-left-color: var(--ui-danger); color: #8f2020; }
.alert .close { opacity: .55; text-shadow: none; font-weight: 400; } .alert .close:hover { opacity: 1; }

/* =====================================================================
   POPUPS  (Custombox + Bootstrap modals)
   ===================================================================== */
@keyframes ui-pop { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
[class*="custombox-overlay"] { background: rgba(15, 30, 50, .52) !important; -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.default_modal > div[style*="border-radius"], .popup_modal_wrapper {
  animation: ui-pop .28s cubic-bezier(.2, .8, .2, 1) backwards;
}
.default_modal > div[style*="border-radius"] { border-radius: 16px !important; box-shadow: 0 28px 70px rgba(15, 30, 50, .35); }
.popup_modal_wrapper .page-header, .popup_modal_wrapper h1.page-header { font-weight: 700; border-bottom: 0; }
a.modal_close, .modal_close {
  width: 34px !important; height: 34px !important; border-radius: 50%; box-sizing: border-box;
  background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23506070' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><path d='M18 6 6 18M6 6l12 12'/></svg>") center / 13px no-repeat !important; border: 1px solid #dfe5ea; box-shadow: 0 3px 10px rgba(15, 30, 50, .18);
  transition: transform .2s ease, background-color .15s ease, box-shadow .15s ease;
}
a.modal_close:hover, .modal_close:hover { background-color: #f3f5f7 !important; transform: rotate(90deg); box-shadow: 0 5px 14px rgba(15, 30, 50, .24); }
.modal-backdrop.in { opacity: .52; -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.modal.fade .modal-dialog { transform: translateY(22px) scale(.97); transition: transform .28s cubic-bezier(.2, .8, .2, 1); }
.modal.in .modal-dialog { transform: none; }
.modal-content { border: 0; border-radius: 16px; box-shadow: 0 28px 70px rgba(15, 30, 50, .35); overflow: hidden; }
.modal-header { border-bottom: 1px solid #edf0f3; padding: 16px 20px; } .modal-footer { border-top: 1px solid #edf0f3; padding: 14px 20px; }

@media (prefers-reduced-motion: reduce) {
  .ui-toast, .ui-toast__bar, .default_modal > div, .popup_modal_wrapper, #ajaxWaitModal .loader_col-md-4::before { animation-duration: .01ms !important; }
  .modal.fade .modal-dialog, a.modal_close { transition: none !important; }
}


/* =====================================================================
   READABILITY (older users): bigger text, real contrast, no thin/grey/all-caps text, larger targets
   ===================================================================== */
html { font-size: 16px; }
body { font-size: 16px; line-height: 1.6; color: var(--ui-text); letter-spacing: .005em; }
p, li, td, dd, dt { line-height: 1.55; }
/* field labels: clear and bold */
.form_label_container label, .form_label_container .form_text, label.form_caption, .form_caption {
  font-size: var(--ui-label-size, 18px) !important; font-weight: 600 !important; color: #2d3748 !important; line-height: 1.35;
}
/* other form text (answers, radio text, notes): regular weight, dark, never thin/grey */
.form_text { font-size: var(--ui-text-size, 17px) !important; font-weight: 400 !important; }
label.control-label, .control-label, .form-group > label, .form-text { font-size: var(--ui-label-size, 18px) !important; }
.form_text:not(.error) { color: var(--ui-text) !important; }
.verifiedText { font-size: 15px !important; font-weight: 700 !important; }
/* inputs */
.form-control, .form-control-popup, .form-control-popup-date, select.form-control, textarea.form-control,
span.k-textbox > input, .k-textbox, .k-dropdown .k-input, .k-datepicker .k-input, .k-dropdown-wrap .k-input,
.chosen-container, .chosen-container-single .chosen-single, .chosen-container .chosen-results li, .k-list .k-item { font-size: 16px !important; }
.form-control::placeholder, .k-input::placeholder, .k-textbox::placeholder { color: #6b7280; opacity: 1; }
input[type="checkbox"], input[type="radio"] { width: 22px; height: 22px; vertical-align: -5px; }
label:has(> input[type="radio"]) { padding: 10px 18px; }
label:has(> input[type="radio"])::before { width: 20px; height: 20px; }
/* buttons and links */
.btn { font-size: 16px; font-weight: 700; min-height: 44px; padding: 9px 22px; }
.btn-sm { min-height: 38px; font-size: 15px; padding: 6px 14px; }
.btn-large { min-height: 46px; }
.medium_field_container .btn, .selectBoxContainer .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: 100%; max-width: 100%; box-sizing: border-box;
  font-size: 15px; padding-left: 6px; padding-right: 6px; white-space: nowrap; overflow: hidden;
}
.medium_field_container .btn .glyphicon, .selectBoxContainer .btn .glyphicon, .medium_field_container .btn .fa, .selectBoxContainer .btn .fa {
  flex: 0 0 auto; font-size: 14px; line-height: 1; top: 0;
}
.form-holder .form-button .ibtn { font-size: 17px; min-height: 48px; }
a:focus-visible { outline: 3px solid var(--ui-primary); outline-offset: 2px; border-radius: 3px; }
/* tables: sentence case at a readable size (no tiny uppercase headers) */
table.table > thead > tr > th, table.dataTable > thead > tr > th { font-size: 15px; font-weight: 700; text-transform: none; letter-spacing: 0; }
table.table > tbody > tr > td, table.dataTable > tbody > tr > td { font-size: 16px; }
.ui-badge { font-size: 14px; font-weight: 700; padding: 4px 12px; }
.dataTables_wrapper .dataTables_info, .dataTables_wrapper .dataTables_filter, .dataTables_wrapper .dataTables_length { font-size: 15px; color: var(--ui-text); }
/* action links (Edit / PDF / Docs / Notes) */
a:has(> i.fa.fa-lg) { font-size: 14px; font-weight: 700; }
.ui-toast { font-size: 16px; }
/* validation messages: large enough to notice and read */
.field-validation-error, label.error, span.field-validation-error { font-size: 15px !important; font-weight: 700 !important; color: var(--ui-danger) !important; }


/* =====================================================================
   SPACING & LAYOUT (neat, calm, evenly spaced for daily use)
   Step container = no frame; each inner section = one clean card with room to breathe.
   ===================================================================== */
form > fieldset { border: 0; padding: 0; margin: 0 !important; min-width: 0; }
form > fieldset > legend.wizardlegend, form > fieldset > legend {
  display: block; width: 100%; padding: 0 0 12px; margin: 0 0 22px; border: 0;
  border-bottom: 2px solid #e3e8ed; font-size: 24px; font-weight: 700; color: var(--ui-text); line-height: 1.3;
}
fieldset fieldset {
  min-width: 0; margin: 0 0 24px !important; padding: 22px 24px 10px; background: #fff;
  border: 1px solid #d5dce3; border-radius: 14px; box-shadow: 0 1px 3px rgba(15, 30, 50, .05);
}
fieldset fieldset > legend.wizardlegend, fieldset fieldset > legend {
  width: auto; margin: 0 0 8px; padding: 0 10px; border: 0; font-size: 22px; font-weight: 700; color: #0b1220; line-height: 1.3;
}
/* fields: even vertical rhythm, label sits close to its box */
.medium_field_container, .large_field_container, .small_field_container { margin-bottom: 20px; vertical-align: top; }
.form_label_container { margin-bottom: 6px; min-height: 22px; }
.selectBoxContainer { margin-bottom: 2px; }
.selectBoxContainer + .selectBoxContainer { margin-top: 8px; }
p.form_text, .form_text > p { margin: 0 0 16px; }
.field-validation-error, .text-danger, label.error { display: block; margin-top: 6px; line-height: 1.4; }
/* groups of choices */
label:has(> input[type="radio"]) { margin: 0 14px 12px 0; }
/* rows and page padding */
.row + .row { margin-top: 6px; }
hr { margin: 26px 0; border-top: 1px solid #e3e8ed; }
.box-body { padding: 22px 26px; }
.box-header { padding-top: 14px; padding-bottom: 14px; }
.table-responsive { padding: 0; margin-top: 6px; }
table.table > thead > tr > th, table.dataTable > thead > tr > th { padding: 14px 16px; }
table.table > tbody > tr > td, table.dataTable > tbody > tr > td { padding: 15px 16px; }
.dataTables_wrapper .dataTables_filter, .dataTables_wrapper .dataTables_length { margin-bottom: 14px; }
/* Back / Next bar and button groups: clear gaps, no crowding */
.tab-pane .row:has(button[id^="btnStep"][id$="Next"]), .tab-pane .row:has(button.prev-step) { padding: 16px 0; margin-top: 18px; }
ul.list-inline > li { padding: 0 6px; }
.btn + .btn { margin-left: 10px; }
.alert { padding: 16px 20px; margin-bottom: 20px; }
.panel .panel-body { padding: 22px; }
.modal-body { padding: 22px 24px; }
.popup_modal_wrapper { padding: 6px 8px; }

/* ---------- Accessibility: reduced motion ---------- */
/* File upload control: keep the whole "Choose a file" button visible */
.inputfile-6 + label { display:flex !important; align-items:stretch; width:100%; max-width:100% !important; box-sizing:border-box; overflow:hidden; padding:0 !important; min-height:var(--ui-control-h); }
.inputfile-6 + label span { flex:1 1 auto; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; padding:0 12px !important; line-height:var(--ui-control-h) !important; width:auto !important; }
.inputfile-6 + label strong { flex:0 0 auto; display:inline-flex !important; align-items:center; gap:6px; white-space:nowrap; font-size:14px !important; padding:0 14px !important; height:auto !important; line-height:1.2 !important; }
.inputfile-6 + label strong svg { width:16px; height:14px; flex:none; margin:0 !important; }

/* Validation / message popups: the original inline margin-top:-50px pulled the heading out of the white card */
.popup_modal_wrapper .container1 { margin-top: 0 !important; }
.popup_modal_wrapper { padding: 16px 20px 14px !important; }
.popup_modal_wrapper .page-header { margin: 0 0 10px !important; padding: 0 0 8px; font-size: 20px; color: var(--ui-text); }
.popup_modal_wrapper .row + .row { margin-top: 8px; }

/* =====================================================================
   KEYBOARD FOCUS (clear, large outline for keyboard users)
   ===================================================================== */
a:focus-visible, button:focus-visible, .btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible,
.nav-tabs > li > a:focus-visible, .round-tab:focus-visible, label.form_text:has(> input:focus-visible) {
  outline: 3px solid #f39c12 !important; outline-offset: 2px !important;
}
.k-textbox:focus-within, .k-picker-wrap:focus-within, .k-dropdown-wrap:focus-within { outline: 3px solid rgba(43,108,176,.35); outline-offset: 1px; }
.k-textbox:focus-within > input, .k-picker-wrap:focus-within input, .k-dropdown-wrap:focus-within input { outline: 0 !important; }

/* =====================================================================
   TABLET & PHONE LAYOUT
   ===================================================================== */
img, video { max-width: 100%; height: auto; }
.dataTables_wrapper, .table-responsive, .grid-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }

@media (max-width: 991px) {
  .container, .container-fluid { padding-left: 12px; padding-right: 12px; }
  .wizard .nav-tabs { overflow-x: auto; overflow-y: hidden; white-space: nowrap; -webkit-overflow-scrolling: touch; padding-bottom: 6px; }
  .wizard .nav-tabs > li { float: none; display: inline-block; }
  .form-group > label[class*="col-"], label.form-text[class*="col-"] { text-align: left; padding-bottom: 4px; }
  .paperSOA, .eSOA, .telSOA { margin-left: 0 !important; }
  .k-widget, .k-textbox, .k-picker-wrap, .k-dropdown-wrap, .chosen-container { max-width: 100%; }
  .popup_modal_wrapper, .default_modal > div { max-width: 94vw !important; }
}
@media (max-width: 767px) {
  body { font-size: 16px; }
  .medium_field_container, .large_field_container, .small_field_container, .selectBoxContainer { width: 100% !important; max-width: 100% !important; }
  .medium_field_container .btn, .selectBoxContainer .btn { width: 100%; }
  .form-horizontal .control-label, label.form_text { display: block; text-align: left !important; }
  input[type=text], input[type=tel], input[type=number], input[type=email], input[type=password], select, textarea, .form-control { font-size: 16px; } /* stops iOS zoom-on-focus */
  .wiz-progress { margin-left: 0; margin-right: 0; }
  .wizard .round-tab { transform: scale(.9); }
  .modal-dialog { margin: 10px; width: auto; }
  .popup_modal_wrapper { padding: 14px 14px 12px !important; }
  .popup_modal_wrapper .btn, #phy_search_modal .btn { min-height: 46px; }
  table.dataTable { font-size: 15px; }
  #ui-toasts { left: 10px !important; right: 10px !important; max-width: none !important; }
}
@media (max-width: 480px) {
  h1, .page-header { font-size: 22px; }
  .row { margin-left: -8px; margin-right: -8px; }
}

/* Input + Search button row (e.g. Eligibility "MBI" + Search): line the button up with the text box */
.row:has(> .mfc-extension_btn) { display: flex !important; flex-wrap: wrap; align-items: flex-end; gap: 14px; }
.row:has(> .mfc-extension_btn)::before, .row:has(> .mfc-extension_btn)::after { display: none; }
.row:has(> .mfc-extension_btn) > .medium_field_container { float: none !important; margin-bottom: 20px; }
.row:has(> .mfc-extension_btn) > .mfc-extension_btn { width: auto !important; min-width: 130px; }
.row:has(> .mfc-extension_btn) > .mfc-extension_btn .form_label_container { display: none; }
.row:has(> .mfc-extension_btn) .selectBoxContainer > label.form_text:has(> input) { display: block; margin: 0; }
.row:has(> .mfc-extension_btn) .btn_custom { width: 100%; min-height: var(--ui-control-h); padding: 0 20px; font-size: 16px; }

/* Application Search button: wider (--ui-search-btn-w). The page fixes its cell at 100px, so the button
   is allowed to extend past the cell and the "Advanced Search" cell beside it is pushed over to match. */
:root { --ui-search-btn-w: 140px; }
.medium_field_container:has(> .selectBoxContainer > #btnSearchApplications) { overflow: visible; }
#btnSearchApplications { width: var(--ui-search-btn-w) !important; max-width: none !important; padding: 0 22px !important; font-size: 16px !important; overflow: visible; }
.medium_field_container:has(> .selectBoxContainer > #btnSearchApplications) + .medium_field_container { margin-left: calc(var(--ui-search-btn-w) - 100px + 14px) !important; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Export to Excel button bar */
.ui-excel-bar { display: flex; justify-content: flex-end; margin: 6px 0 10px; }
.ui-excel-btn { min-height: 40px; padding: 0 18px; font-size: 16px; font-weight: 700; }
.ui-excel-inline { float: right; margin: 0 16px 0 0; }
.ui-excel-inline .ui-excel-btn { min-height: var(--ui-control-h); }
@media (max-width: 767px) { .ui-excel-inline { float: none; margin: 0 0 10px; } }

/* Tighten the gap under the Period / Status / Search row: hide empty spacer cells and trim margins */
.row > .medium_field_container:not(:has(label:not(.form_caption), button, input, select, a, img, .k-widget)):has(> .form_label_container:only-child) { display: none !important; }
.row > .col-lg-12:not(:has(*)):not(:has(> *)) { display: none; }
.row:has(> .medium_field_container .btn) > .medium_field_container { margin-bottom: 8px; }
.row:has(> .medium_field_container .btn) + hr, .row:has(> .medium_field_container .btn) ~ hr { margin-top: 0 !important; }

/* =====================================================================
   REVIEW ANSWERS dialog
   ===================================================================== */
.wiz-progress-top { display: flex; align-items: center; gap: 12px; }
.wiz-progress-top .wiz-step-label { flex: 1 1 auto; }
.ui-review-btn { min-height: 40px; padding: 0 16px; font-weight: 700; font-size: 15px; }
html.ui-review-open { overflow: hidden; }
.ui-review-overlay { position: fixed; inset: 0; z-index: 100000; background: rgba(15, 30, 50, .55); display: flex; align-items: flex-start; justify-content: center; padding: 4vh 12px; overflow: auto; }
.ui-review-card { background: #fff; width: 100%; max-width: 880px; border-radius: 14px; box-shadow: 0 20px 60px rgba(0,0,0,.35); display: flex; flex-direction: column; max-height: 92vh; }
.ui-review-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 24px 8px; }
.ui-review-title { margin: 0; font-size: 24px; font-weight: 700; color: var(--ui-text); }
.ui-review-sub { margin: 0; padding: 0 24px 14px; font-size: 16px; color: var(--ui-muted); border-bottom: 1px solid #e3e8ed; }
.ui-review-sub.ui-review-warn { color: var(--ui-danger); font-weight: 700; }
.ui-review-body { overflow: auto; padding: 8px 24px 24px; }
.ui-review-sec { margin-top: 18px; border: 1px solid #d5dce3; border-radius: 12px; overflow: hidden; }
.ui-review-sechead { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 16px; background: #f1f4f8; }
.ui-review-sechead h4 { margin: 0; font-size: 18px; font-weight: 700; color: var(--ui-text); }
.ui-review-list { margin: 0; padding: 6px 16px 10px; display: grid; grid-template-columns: minmax(150px, 34%) 1fr; column-gap: 18px; }
.ui-review-list dt, .ui-review-list dd { margin: 0; padding: 9px 0; border-bottom: 1px solid #eef1f4; font-size: 16px; line-height: 1.4; }
.ui-review-list dt { font-weight: 600; color: #2d3748; }
.ui-review-list dd { color: var(--ui-text); word-break: break-word; }
.ui-review-list dd.ui-review-empty { color: #6b7280; font-style: italic; }
.ui-review-list dd.ui-review-missing { color: var(--ui-danger); font-weight: 700; }
@media (max-width: 600px) { .ui-review-list { grid-template-columns: 1fr; } .ui-review-list dt { border-bottom: 0; padding-bottom: 0; } }
a.ui-review-action { color: #2f855a; }

/* Provider Search popup: wider (the page asks Custombox for 1050px; this overrides it for this popup only).
   Change --ui-provider-popup-w to resize. */
:root { --ui-provider-popup-w: 1320px; }
.custombox-content:has(#txtPhyFirstName), .custombox-content:has(#PhysicianSearchResults) {
  width: min(var(--ui-provider-popup-w), calc(100vw - 60px)) !important; max-width: calc(100vw - 60px) !important;
}
.custombox-content:has(#txtPhyFirstName) #phy_search_modal, .custombox-content:has(#txtPhyFirstName) .popup_modal_wrapper { width: 100%; max-width: 100%; box-sizing: border-box; }
#PhysicianSearchResults { width: 100% !important; }

/* Application History: no Edit action in the Actions column (applications are still opened from the ID / HIC links) */
#applSearchResults td [class*="col-"]:has(> a > i.fa-pencil-square-o),
#applSearchResults td [class*="col-"]:has(> a > i.fa-ban) { display: none !important; }
.ui-actions-wrap { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: center; gap: 4px 12px; }
.ui-actions-wrap > [class*="col-"] { float: none !important; width: auto !important; flex: 0 0 auto; padding-left: 0; padding-right: 0; margin: 0; }
.ui-actions-wrap { gap: 4px 8px; }
.ui-actions-wrap > [class*="col-"], .ui-actions-wrap > [class*="col-"]:has(> a > i.fa.fa-lg) { min-width: 48px !important; }
@media (min-width: 992px) { .ui-actions-wrap { flex-wrap: nowrap; } }

/* Several buttons in one box (e.g. Advanced Search: Cancel / Clear / Search): one tidy row, same height, right-aligned */
.selectBoxContainer:has(> .btn ~ .btn), .medium_field_container:has(> .btn ~ .btn) { display: flex !important; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 12px; float: none !important; width: 100%; }
.selectBoxContainer:has(> .btn ~ .btn) > .btn, .medium_field_container:has(> .btn ~ .btn) > .btn { width: auto !important; min-width: 120px; flex: 0 0 auto; min-height: var(--ui-control-h); padding: 0 22px; font-size: 16px; }
/* grey Cancel / Clear buttons: darker grey so the white text is readable */
.btn-secondary[style*="darkgrey"] { background: #5b6675 !important; border-color: #5b6675 !important; color: #fff !important; }
.btn-secondary[style*="darkgrey"]:hover { background: #475160 !important; }
.ui-review-title { text-align: left; flex: 1 1 auto; }

/* Provider Search results: Select button stays on the same row; tighter header/cell padding so everything fits */
#PhysicianSearchResults th, #PhysicianSearchResults td { padding-left: 8px !important; padding-right: 8px !important; }
#PhysicianSearchResults td button.btn { white-space: nowrap; min-width: 84px; }
#PhysicianSearchResults th.sorting:before, #PhysicianSearchResults th.sorting:after, #PhysicianSearchResults th.sorting_asc:before, #PhysicianSearchResults th.sorting_asc:after, #PhysicianSearchResults th.sorting_desc:before, #PhysicianSearchResults th.sorting_desc:after { right: 4px; }
#phy_search_modal, #phy_search_modal1 { max-width: none; }
.ui-review-diag { font-size: 12px; color: #718096; margin: 0 0 8px; word-break: break-all; }

/* Signature type (Telephone / On-Screen / Email): same rounded choice cards as the application's other radios.
   These radios sit beside their label (not inside it), so the label next to the radio becomes the card. */
input[name="Signature_Type"] { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0 !important; pointer-events: none; }
input[name="Signature_Type"] + label {
  position: relative; display: inline-flex; align-items: center; gap: 8px; vertical-align: middle;
  margin: 0 10px 8px 0; padding: 8px 16px; cursor: pointer; font-weight: 500; color: var(--ui-text);
  background: #fff; border: 1px solid var(--ui-border); border-radius: 999px;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
input[name="Signature_Type"] + label::before {
  content: ""; flex: 0 0 auto; width: 16px; height: 16px; border-radius: 50%; box-sizing: border-box;
  border: 2px solid var(--ui-border-hover); background: #fff; transition: all .15s ease;
}
input[name="Signature_Type"] + label:hover { border-color: var(--ui-primary); background: #f5f9fd; }
input[name="Signature_Type"]:checked + label { border-color: var(--ui-primary); background: #eaf2fb; box-shadow: 0 0 0 3px var(--ui-primary-soft); }
input[name="Signature_Type"]:checked + label::before { border-color: var(--ui-primary); background: radial-gradient(circle, var(--ui-primary) 0 4px, #fff 4.5px); }
input[name="Signature_Type"]:focus-visible + label { outline: 3px solid var(--ui-primary-soft); outline-offset: 2px; }
input[name="Signature_Type"]:disabled + label { opacity: .55; cursor: not-allowed; background: var(--ui-bg-disabled); }

/* Eligibility / Medicaid search rows: the page gives the field a wide fixed box, which pushed Search far to the right.
   Let each field take only the room it needs so the button sits right beside it. */
.row:has(> .mfc-extension_btn) > .medium_field_container:not(.mfc-extension_btn) {
  width: auto !important; flex: 0 0 auto; min-width: 190px; max-width: 100%; margin-right: 0 !important;
}
.row:has(> .mfc-extension_btn) > .medium_field_container:not(.mfc-extension_btn) input.form-control-popup,
.row:has(> .mfc-extension_btn) > .medium_field_container:not(.mfc-extension_btn) .selectBoxContainer { width: 100%; }

/* Eligibility Details popup: the Bootstrap .container inside it is a fixed ~1170px wide with side margins, which pushed the table
   off the right edge and left an empty strip on the left. Make everything inside fit the popup. */
#Eligibility_Details_Modal, #Eligibility_Details_Modal .popup_modal_wrapper { width: 100% !important; max-width: 100% !important; box-sizing: border-box; margin-left: 0 !important; margin-right: 0 !important; }
#Eligibility_Details_Modal .container, #Eligibility_Details_Modal .modal_container { width: 100% !important; max-width: 100% !important; margin: 0 !important; padding: 0 !important; }
#Eligibility_Details_Modal fieldset { margin: 0; padding: 0; min-width: 0; }
#Eligibility_Details_Modal .content, #Eligibility_Details_Modal section.content { padding: 0 !important; margin: 0 !important; }
#Eligibility_Details_Modal .row { margin-left: 0 !important; margin-right: 0 !important; }
#Eligibility_Details_Modal .box { margin: 0 !important; width: 100%; }
#Eligibility_Details_Modal .box-body { padding: 8px 4px 4px !important; overflow-x: auto; }
#Eligibility_Details_Modal table { width: 100% !important; table-layout: auto; }
#Eligibility_Details_Modal td { word-break: break-word; }
.custombox-content:has(#Eligibility_Details_Modal) { width: min(1000px, calc(100vw - 40px)) !important; max-width: calc(100vw - 40px) !important; }

/* Search rows that also hold other blocks (Medicaid Eligibility keeps its results panel inside the same row):
   anything that is not a field or the Search button takes the full width on its own line, below the search controls. */
.row:has(> .mfc-extension_btn) > :not(.medium_field_container) { flex: 0 0 100% !important; width: 100% !important; max-width: 100% !important; float: none !important; }
.row:has(> .mfc-extension_btn) > .medium_field_container.mfc-extension_btn { align-self: flex-end; }

/* Medicaid Eligibility / History: even field widths, all fields and labels on one line, results panel full width */
.row:has(> .mfc-extension_btn) > .medium_field_container:not(.mfc-extension_btn) { flex: 0 0 210px !important; width: 210px !important; min-width: 0 !important; padding-left: 0 !important; padding-right: 0 !important; }
.row:has(> .mfc-extension_btn) { padding-left: 15px; padding-right: 15px; }
.row:has(> .mfc-extension_btn) .selectBoxContainer > label.form_text { display: block !important; margin: 0 !important; }
.row:has(> .mfc-extension_btn) .k-widget.k-datepicker, .row:has(> .mfc-extension_btn) .k-datepicker { display: block; width: 100% !important; vertical-align: top; }
.row:has(> .mfc-extension_btn) .form_label_container { min-height: 28px; }
#MedicaidEligibilitySearchDetails > .col-lg-12, #medicaidEligibilityHistoryDetails > .col-lg-12 { width: 100% !important; float: none !important; padding-left: 0; padding-right: 0; }
#MedicaidEligibilitySearchDetails .box, #medicaidEligibilityHistoryDetails .box { width: 100% !important; max-width: 100% !important; margin: 0 !important; }

/* Rows where one label wraps onto two lines (Emergency Contact, PCP Choices, Authorized Rep): give the label line a fixed two-line height
   so every box in that row starts at the same level. Only on narrower screens, where the labels actually wrap. Only these rows are touched; their layout is not changed. */
@media (max-width: 1200px) {
  .col-lg-12:has(> .medium_field_container #ddlEmergencyRel) > .medium_field_container > .form_label_container,
  .col-lg-12:has(> .medium_field_container #txtPrimaryCarePhy) > .medium_field_container > .form_label_container { min-height: 54px; }
  .col-md-12:has(> [class*="col-lg-"] #txtRelToEnrollee) > [class*="col-lg-"] > label.form_text { display: block; min-height: 54px; }
}

/* Provider Search fields (page and popup): every box on the same line.
   The 130px columns made "Search Provider" wrap to two lines, which pushed its box lower than the rest. */
.col-lg-12:has(> .medium_field_container[style*="width:130px"]) { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 0 4px; }
.col-lg-12:has(> .medium_field_container[style*="width:130px"])::before, .col-lg-12:has(> .medium_field_container[style*="width:130px"])::after { display: none; }
.col-lg-12 > .medium_field_container[style*="width:130px"] { float: none !important; width: 150px !important; flex: 0 0 150px; }
.col-lg-12 > .medium_field_container[style*="width:130px"] .form_label_container > label { white-space: nowrap; display: block; height: 30px; line-height: 30px; margin: 0 !important; padding: 0 !important; }
.col-lg-12 > .medium_field_container[style*="width:130px"] .selectBoxContainer, .col-lg-12 > .medium_field_container[style*="width:130px"] .selectBoxContainer[style*="margin-top"] { margin-top: 0 !important; }
.col-lg-12 > .medium_field_container[style*="width:130px"] .form_label_container { margin: 0 !important; padding: 0 !important; }
.col-lg-12 > .medium_field_container[style*="width:130px"] input.form-control { width: 100% !important; box-sizing: border-box; }
.col-lg-12:has(> .medium_field_container[style*="width:130px"]) { gap: 0 10px; }

/* Key Management row (Secret KeyID + Search): field and button share one line,
   tops aligned, and the page's own negative margin on the button's box is cancelled. */
.col-lg-12:has(> .medium_field_container button[onclick*="KeySearch"]) { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: flex-start !important; gap: 0 10px; text-align: left; }
.col-lg-12:has(> .medium_field_container button[onclick*="KeySearch"])::before, .col-lg-12:has(> .medium_field_container button[onclick*="KeySearch"])::after { display: none; }
.col-lg-12:has(> .medium_field_container button[onclick*="KeySearch"]) > .medium_field_container { float: none !important; }
.col-lg-12:has(> .medium_field_container button[onclick*="KeySearch"]) > .medium_field_container .form_label_container { margin: 0 !important; }
.col-lg-12:has(> .medium_field_container button[onclick*="KeySearch"]) > .medium_field_container .form_label_container > label { display: block; height: 30px; line-height: 30px; margin: 0 !important; padding: 0 !important; white-space: nowrap; }
.col-lg-12:has(> .medium_field_container button[onclick*="KeySearch"]) > .medium_field_container .selectBoxContainer { margin-top: 0 !important; }

/* Signature Options (e-signature): Full Name and E-Mail of the signer side by side (stack again on small screens).
   The page shows/hides this block with an inline display style, so only apply when it is not hidden. */
.docusign:not([style*="display: none"]):not([style*="display:none"]) { display: flex !important; flex-wrap: wrap; gap: 0 16px; align-items: flex-start; }
.docusign > .row { flex: 0 1 260px; max-width: 260px; margin: 0 !important; }
.docusign > .row > [class*="col-"] { width: 100% !important; float: none; padding-left: 0; padding-right: 0; }

/* County choices (Step 4, filled in by the page's script): the page forces these labels to inline-block, which squashed the radio dot into a thin oval. */
#ddlPCountry, #ddlMCountry { display: flex; flex-wrap: wrap; gap: 6px 8px; }
#ddlPCountry label.form_text, #ddlMCountry label.form_text { display: inline-flex !important; align-items: center; margin: 0 !important; }
#ddlPCountry label.form_text::before, #ddlMCountry label.form_text::before { display: block; flex: 0 0 16px; width: 16px; min-width: 16px; height: 16px; }

/* A checkbox and its text ("Permission to Text...", "Skip Eligibility Check", "Skip Address Verification?"): keep them on one line, text right beside the box. */
.form_label_container:has(> input[type="checkbox"]), .selectBoxContainer:has(> input[type="checkbox"]) { width: auto !important; max-width: 100%; white-space: nowrap; display: flex; align-items: center; gap: 8px; }
.form_label_container > input[type="checkbox"] + label, .selectBoxContainer > input[type="checkbox"] + label,
.form_label_container > input[type="checkbox"] ~ label.form_text { display: inline-block !important; margin: 0 !important; padding-left: 0 !important; width: auto !important; white-space: normal; }
.form_label_container > input[type="checkbox"], .selectBoxContainer > input[type="checkbox"] { flex: 0 0 auto; margin: 0; }

.col-lg-12:has(> .medium_field_container button[onclick*="KeySearch"]) > .medium_field_container { margin-left: 0 !important; margin-right: 0 !important; flex: 0 0 auto; }
.col-lg-12:has(> .medium_field_container button[onclick*="KeySearch"]) > .medium_field_container:first-child { width: 340px !important; max-width: 100%; }
#Eligibility_Details_Modal th, #Eligibility_Details_Modal td, #Eligibility_Details_Modal td.text-left, #Eligibility_Details_Modal td.text-center { text-align: center !important; }

/* ---------- Enroll Applications screen only: tighter spacing and smaller type ---------- */
body:has(#applSearchResults) { --ui-label-size: 15px; --ui-text-size: 14px; --ui-control-h: 38px; }
body:has(#applSearchResults) .medium_field_container, body:has(#applSearchResults) .large_field_container, body:has(#applSearchResults) .small_field_container { margin-bottom: 8px; }
body:has(#applSearchResults) .form_label_container { margin-bottom: 4px; min-height: 0; }
body:has(#applSearchResults) .k-dropdown .k-input, body:has(#applSearchResults) .k-datepicker .k-input { font-size: 14px; }
body:has(#applSearchResults) .content-header, body:has(#applSearchResults) section.content-header { padding-top: 8px; padding-bottom: 8px; }
body:has(#applSearchResults) .content { padding-top: 8px; }
body:has(#applSearchResults) .panel-heading, body:has(#applSearchResults) .box-header { padding: 8px 12px !important; font-size: 16px; }
body:has(#applSearchResults) .dataTables_wrapper { font-size: 14px; }
body:has(#applSearchResults) .dataTables_wrapper .dataTables_length, body:has(#applSearchResults) .dataTables_wrapper .dataTables_filter { margin: 6px 0 8px; }
body:has(#applSearchResults) #applSearchResults th { font-size: 14px !important; padding: 8px 8px !important; }
body:has(#applSearchResults) #applSearchResults td { font-size: 14px !important; padding: 6px 8px !important; line-height: 1.3; }
body:has(#applSearchResults) #applSearchResults td a { font-size: 14px; }
body:has(#applSearchResults) .btn { font-size: 14px; }
body:has(#applSearchResults) #btnSearchApplications { min-height: 38px; }
body:has(#applSearchResults) hr { margin: 8px 0; }

/* hover card on the ID / HIC link in the grid */
.ui-hovercard { position: fixed; z-index: 100001; width: 340px; max-width: calc(100vw - 24px); background: #fff; border: 1px solid #cfd8e3; border-top: 4px solid var(--ui-primary, #2f6fb3); border-radius: 10px; box-shadow: 0 10px 30px rgba(15, 30, 50, .22); padding: 12px 14px; font-size: 14px; color: #1a2433; pointer-events: none; opacity: 0; transform: translateY(4px); transition: opacity .12s ease, transform .12s ease; }
.ui-hovercard.is-on { opacity: 1; transform: none; }
.ui-hovercard h4 { margin: 0 0 8px; font-size: 16px; font-weight: 700; color: #0b1220; }
.ui-hovercard dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0; }
.ui-hovercard dt { font-weight: 600; color: #5b6675; }
.ui-hovercard dd { margin: 0; word-break: break-word; }
.ui-hovercard .ui-hc-hint { margin-top: 8px; padding-top: 6px; border-top: 1px solid #e8edf3; font-size: 12px; color: #718096; }
#applSearchResults td a:not(.ui-review-action):not(:has(i)):hover { text-decoration: underline; background: #eaf2fb; border-radius: 4px; }

/* ---------- Applications Dashboard ---------- */
/* Nine tiles in a 3 x 3 grid (they used to be 4 + 4 + 1); the chart row stays full width underneath. */
section.content:has(.info-box) { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 18px; }
section.content:has(.info-box) > .row:has(> [class*="col-"] > .info-box) { display: contents; }
section.content:has(.info-box) > .row:has(> [class*="col-"] > .info-box)::before, section.content:has(.info-box) > .row:has(> [class*="col-"] > .info-box)::after { display: none; }
section.content:has(.info-box) > .row:has(> [class*="col-"] > .info-box) > [class*="col-"] { width: auto !important; float: none !important; padding: 0 !important; margin: 0; }
section.content:has(.info-box) > :not(.row:has(> [class*="col-"] > .info-box)) { grid-column: 1 / -1; }
.info-box { margin: 0 !important; }
/* the coloured bars always showed the same 40%, so they did not mean anything; the icons did not match the numbers */
.info-box-progress, .info-box-icon { display: none !important; }
/* tiles: colour-coded edge by meaning, number in the same colour */
.info-box { --tone: #2f6fb3; border: 1px solid #e3e8ef !important; box-shadow: inset 6px 0 0 var(--tone), 0 1px 3px rgba(15, 30, 50, .08) !important; border-radius: 10px; background: #fff; }
.info-box[data-tone="warn"] { --tone: #d9534f; }
.info-box[data-tone="today"] { --tone: #1f9d6b; }
.info-box[data-tone="period"] { --tone: #0aa3a3; }
.info-box .panel-body { padding: 16px 22px 16px 28px !important; }
.info-box-stats p, .info-box-stats p span { font-size: 34px !important; font-weight: 700 !important; line-height: 1.1; color: var(--tone) !important; margin: 0 0 6px; }
.info-box-title { display: block; font-size: 16px !important; font-weight: 600; color: #2d3748 !important; letter-spacing: 0; }
/* chart panels: larger headings and axis text */
section.content .panel-default > .panel-heading { font-size: 17px !important; font-weight: 700; color: #0b1220; padding: 14px 16px !important; }
#line-chart text, #pie-chart text { font-size: 14px !important; }
@media (max-width: 991px) { section.content:has(.info-box) { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 575px) { section.content:has(.info-box) { grid-template-columns: 1fr; } .info-box-stats p, .info-box-stats p span { font-size: 30px !important; } }

/* Application History grid: headings and cell text start at the same left edge; Status and Actions stay centred */
#applSearchResults thead th, #applSearchResults tbody td { text-align: left !important; }
#applSearchResults thead th:nth-last-child(-n+2), #applSearchResults tbody td:nth-last-child(-n+2) { text-align: center !important; }
#applSearchResults thead th, #applSearchResults tbody td { padding-left: 10px !important; padding-right: 10px !important; vertical-align: middle; }

/* Agency search: keep Search and Add Agency buttons side by side */
.row:has(> .medium_field_container #btnAgencySearch){display:flex;flex-wrap:wrap;align-items:flex-start;gap:0 12px}
.row:has(> .medium_field_container #btnAgencySearch) > .medium_field_container{width:auto!important;margin-left:0!important;flex:0 0 auto;float:none!important}
.row:has(> .medium_field_container #btnAgencySearch) > .medium_field_container:first-child,
.row:has(> .medium_field_container #btnAgencySearch) > .medium_field_container:has(#ddlAgencies){width:260px!important;margin-left:10px!important}
.row:has(> .medium_field_container #btnAgencySearch) .btn{white-space:nowrap}

/* Clear + Save button pairs: always side by side */
:is(.selectBoxContainer, .form-group, div):has(> input.btn[value="Clear"] + input.btn[type="submit"], > input.btn[value="Clear"] + input.btn[value="Save"]){
  display:flex!important;flex-direction:row!important;flex-wrap:nowrap;align-items:center;gap:10px;width:auto!important;max-width:100%}
:is(.selectBoxContainer, .form-group, div) > input.btn[value="Clear"],
:is(.selectBoxContainer, .form-group, div) > input.btn[value="Save"]{
  display:inline-block!important;width:auto!important;min-width:96px;float:none!important;flex:0 0 auto;margin:0!important}

/* Manage Invitations grids: compact so all columns fit */
#inviteNewBroker, #inviteRetBroker, #inviteAgencyAllBroker{width:100%!important;table-layout:auto}
#inviteNewBroker th, #inviteRetBroker th, #inviteAgencyAllBroker th{font-size:12px!important;padding:8px 18px 8px 6px!important;line-height:1.25;white-space:normal;text-align:left!important}
#inviteNewBroker td, #inviteRetBroker td, #inviteAgencyAllBroker td{font-size:12px!important;padding:6px!important;line-height:1.3;word-break:break-word;vertical-align:middle}
#inviteNewBroker td .btn, #inviteRetBroker td .btn, #inviteAgencyAllBroker td .btn,
#inviteNewBroker td a.btn, #inviteRetBroker td a.btn, #inviteAgencyAllBroker td a.btn{min-height:28px!important;padding:0 10px!important;font-size:12px!important;min-width:0!important}
#inviteNewBroker td .label, #inviteRetBroker td .label, #inviteAgencyAllBroker td .label,
#inviteNewBroker td [class*="status"], #inviteRetBroker td [class*="status"], #inviteAgencyAllBroker td [class*="status"]{font-size:11px!important;padding:2px 8px!important}
.table-responsive:has(> #inviteNewBroker, > #inviteRetBroker, > #inviteAgencyAllBroker){overflow-x:auto}
