﻿/* ------------------------------------------------------------------
   app.css - one visual system for miCorp (Oct 2026 redesign).

   Modelled on the AI Software portal: a left rail menu that collapses to
   icons (a bar + drawer on a phone), neutral headings, one accent colour,
   rounded cards, and RadGrids drawn as a plain rounded table with no inner
   scrolling. Light and dark both come from the variables below; the theme
   is html[data-theme="light|dark"], set before first paint by the inline
   script in each master page and switched by app.js.

   Telerik controls keep the Bootstrap skin; the dark overrides at the end
   repaint its surfaces (it ships high-specificity CSS, hence !important).
   ------------------------------------------------------------------ */

:root {
  --brand: #1e376c;            /* Micorp navy (logo) */
  --brand-2: #2a9fd8;          /* Micorp sky blue (logo swoosh) */
  --accent: #1f6fd1;           /* links, active states */
  --accent-hover: #1858a8;
  --accent-soft: rgba(31, 111, 209, .10);
  --danger: #d6334b;
  --success: #1f9d55;
  --warning: #d99a06;

  --bg: #f4f6fa;
  --surface: #ffffff;
  --surface-2: #f8f9fb;
  --border: #e3e7ee;
  --line: #edf0f4;
  --text: #1d2433;
  --heading: #141a26;
  --muted: #667085;

  --btn-bg: #1e376c;
  --btn-text: #ffffff;
  --btn-hover: #162a54;

  --field-bg: #ffffff;
  --field-border: #cfd6e2;
  --field-text: #1d2433;
  --field-hover: #f6f7f9;
  --popup-bg: #ffffff;
  --popup-hover: #eef3fb;
  --popup-selected: #1f6fd1;

  --rail-w: 252px;
  --rail-mini-w: 68px;
  --rail-bg: #ffffff;
  --rail-text: #1d2433;
  --rail-muted: #667085;
  --rail-hover: rgba(16, 24, 40, .05);
  --rail-on-bg: rgba(31, 111, 209, .10);
  --rail-on-text: #1f6fd1;

  --radius: 12px;
  --radius-sm: 8px;
  --field-h: 40px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 4px 16px rgba(16, 24, 40, .06);
  --font: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

html[data-theme="dark"] {
  --accent: #5aa9ff;
  --accent-hover: #86c0ff;
  --accent-soft: rgba(90, 169, 255, .14);
  --danger: #ff6b81;
  --success: #3ccf7e;

  --bg: #11141a;
  --surface: #1a1e26;
  --surface-2: #20252f;
  --border: #2d3340;
  --line: #262b36;
  --text: #e4e7ee;
  --heading: #f3f5f9;
  --muted: #9aa3b2;

  --btn-bg: #2f6fd6;
  --btn-text: #ffffff;
  --btn-hover: #4583e6;

  --field-bg: #232834;
  --field-border: #3a4150;
  --field-text: #eef0f5;
  --field-hover: #2a3040;
  --popup-bg: #272d3a;
  --popup-hover: #333a4a;
  --popup-selected: #2f6fd6;

  --rail-bg: #161a21;
  --rail-text: #e4e7ee;
  --rail-muted: #9aa3b2;
  --rail-hover: rgba(255, 255, 255, .05);
  --rail-on-bg: rgba(90, 169, 255, .14);
  --rail-on-text: #7ab8ff;

  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 20px rgba(0, 0, 0, .25);
  color-scheme: dark;
}

/* ===================== base ===================== */
html, body { min-height: 100%; }
body {
  margin: 0; background: var(--bg) !important; color: var(--text);
  font-family: var(--font); font-size: 14px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
td { color: inherit; font-family: inherit; }
a, a:link, a:visited { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }
a img { border: 0; }
.pageHeader, h1.pageHeader {
  display: block; margin: 0; font-size: 24px; line-height: 1.25; font-weight: 700;
  letter-spacing: -.3px; color: var(--heading) !important;
}
.text-muted { color: var(--muted) !important; }
hr { border-color: var(--border); opacity: 1; }

/* ===================== the rail ===================== */
#siteNav {
  position: fixed; top: 0; left: 0; bottom: 0; width: var(--rail-w); z-index: 1030;
  display: flex; flex-direction: column; background: var(--rail-bg); color: var(--rail-text);
  border-right: 1px solid var(--border); transition: width .15s ease;
}
.rail-brand { display: flex; align-items: center; gap: 8px; padding: 16px 14px 12px; }
.rail-logo {
  display: flex; align-items: center; justify-content: center; min-width: 0; flex: 1 1 auto;
  padding: 6px 10px; border-radius: 10px; background: #ffffff;   /* the logo is navy on white in both themes */
}
.rail-logo img { display: block; max-width: 100%; max-height: 54px; width: auto; height: auto; }
.rail-logo .rail-mark { display: none; }
.rail-tog, .rail-close {
  flex: 0 0 auto; width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 8px; background: transparent; color: var(--rail-muted); cursor: pointer; font-size: 15px;
}
.rail-tog:hover, .rail-close:hover { background: var(--rail-hover); color: var(--rail-text); }
.rail-close { display: none; font-size: 20px; }

.rail-nav { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 4px 10px 10px; }
.rail-title {
  padding: 14px 10px 4px; font-size: 11px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase;
  color: var(--rail-muted); white-space: nowrap;
}
.rail-item {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 10px; margin: 1px 0; border: 0; border-radius: 8px;
  background: transparent; color: var(--rail-text) !important; text-decoration: none !important; font: inherit; font-weight: 600;
  text-align: left; cursor: pointer; white-space: nowrap;
}
.rail-item:hover { background: var(--rail-hover); }
.rail-item > i { width: 18px; flex: 0 0 18px; text-align: center; font-size: 15px; color: var(--rail-muted); }
.rail-item .lbl { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.rail-item.on { background: var(--rail-on-bg); color: var(--rail-on-text) !important; }
.rail-item.on > i { color: var(--rail-on-text); }
.rail-item .rail-count {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--brand-2); color: #fff;
  font-size: 11px; font-weight: 700; line-height: 20px; text-align: center;
}
.rail-chev { font-size: 11px !important; width: auto !important; flex: none !important; transition: transform .15s; }
.rail-group.open > .rail-item .rail-chev { transform: rotate(90deg); }
.rail-kids { display: none; position: relative; padding: 2px 0 6px 30px; }
.rail-kids::before { content: ""; position: absolute; left: 19px; top: 4px; bottom: 8px; width: 1px; background: var(--border); }
.rail-group.open > .rail-kids { display: block; }
.rail-kid {
  display: block; padding: 6px 10px; border-radius: 7px; color: var(--rail-muted) !important; text-decoration: none !important;
  font-size: 13.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rail-kid:hover { color: var(--rail-text) !important; background: var(--rail-hover); }
.rail-kid.on { color: var(--rail-on-text) !important; background: var(--rail-on-bg); font-weight: 600; }

.rail-foot { flex: 0 0 auto; border-top: 1px solid var(--border); padding: 10px; }
.rail-user { display: flex; align-items: center; gap: 10px; padding: 6px 8px 10px; min-width: 0; }
.rail-avatar {
  width: 34px; height: 34px; flex: 0 0 34px; border-radius: 50%; background: var(--brand); color: #fff;
  font-size: 13px; font-weight: 700; line-height: 34px; text-align: center;
}
.rail-who { min-width: 0; line-height: 1.25; }
.rail-who b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail-who small { display: block; color: var(--rail-muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail-actions { display: flex; gap: 6px; }
.rail-actions .rail-item { justify-content: center; padding: 8px; font-weight: 500; font-size: 13px; }
.rail-actions .rail-item > i { width: auto; flex: none; }
.rail-logout:hover, .rail-logout:hover > i { color: var(--danger) !important; }
.theme-ico-dark { display: none; }
html[data-theme="dark"] .theme-ico-light { display: none; }
html[data-theme="dark"] .theme-ico-dark { display: inline-block; }

/* the page beside the rail */
#siteBody { margin-left: var(--rail-w); min-height: 100vh; transition: margin-left .15s ease; }
.page-wrap { padding: 22px 28px 56px; max-width: 1680px; }

/* collapsed to icons */
@media (min-width: 992px) {
  html.rail-mini #siteNav { width: var(--rail-mini-w); }
  html.rail-mini #siteBody { margin-left: var(--rail-mini-w); }
  html.rail-mini .rail-brand { flex-direction: column; padding: 12px 8px; }
  html.rail-mini .rail-logo { padding: 4px; width: 44px; height: 44px; flex: none; }
  html.rail-mini .rail-logo img { display: none; }
  html.rail-mini .rail-logo .rail-mark { display: block; font-weight: 800; font-size: 18px; color: var(--brand); }
  html.rail-mini .rail-tog i { transform: rotate(180deg); }
  html.rail-mini .rail-nav { padding: 4px 8px; }
  html.rail-mini .rail-item { justify-content: center; padding: 10px 0; }
  html.rail-mini .rail-item .lbl, html.rail-mini .rail-item .rail-chev, html.rail-mini .rail-item .rail-count,
  html.rail-mini .rail-title, html.rail-mini .rail-who, html.rail-mini .rail-kids { display: none !important; }
  html.rail-mini .rail-user { justify-content: center; padding: 6px 0 10px; }
  html.rail-mini .rail-actions { flex-direction: column; }
}

/* phone / tablet: top bar + drawer */
.mbar { display: none; }
.mbar-backdrop { display: none; }
@media (max-width: 991.98px) {
  .mbar {
    display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 1020; height: 58px; padding: 0 14px;
    background: var(--rail-bg); border-bottom: 1px solid var(--border);
  }
  .mbar-btn { width: 40px; height: 40px; border: 0; border-radius: 8px; background: transparent; color: var(--text); font-size: 19px; }
  .mbar-logo { height: 36px; background: #fff; border-radius: 6px; padding: 2px 6px; }
  .mbar-logo img { height: 32px; width: auto; }
  .mbar-right { margin-left: auto; display: flex; align-items: center; gap: 6px; }
  #siteNav { transform: translateX(-105%); transition: transform .2s ease; width: min(86vw, 300px); box-shadow: 0 10px 40px rgba(0,0,0,.3); }
  html.nav-open #siteNav { transform: none; }
  html.nav-open .mbar-backdrop { display: block; position: fixed; inset: 0; z-index: 1025; background: rgba(10, 14, 22, .45); }
  .rail-tog { display: none; }
  .rail-close { display: inline-flex; }
  #siteBody { margin-left: 0; }
  .page-wrap { padding: 16px 16px 48px; }
}

/* ===================== page header + toolbar ===================== */
.page-head {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 16px; margin: 0 0 18px;
}
.page-title { display: flex; align-items: center; gap: 12px; min-width: 0; flex-wrap: wrap; }
.page-sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.page-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.page-toolbar .RadInput, .page-toolbar .RadComboBox, .page-toolbar .RadDropDownList, .page-toolbar .RadPicker { vertical-align: middle; }
.page-toolbar .tb-sep { width: 1px; align-self: stretch; margin: 4px 4px; background: var(--border); }
.back-link {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--border); color: var(--muted) !important; font-size: 13px; font-weight: 600; text-decoration: none !important;
}
.back-link:hover { color: var(--text) !important; border-color: var(--field-border); }
.page-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
@media (max-width: 767.98px) {
  .page-toolbar { width: 100%; margin-left: 0; }
  .page-toolbar .RadInput, .page-toolbar .RadComboBox { flex: 1 1 160px; width: auto !important; min-width: 0; }
}

/* ===================== cards ===================== */
.card, .app-card {
  background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
}
.app-card { padding: 20px 22px; margin-bottom: 18px; }
.card-header, .card-footer { background: transparent; border-color: var(--border); }
.app-card h2, .card-title { font-size: 16px; font-weight: 700; margin: 0 0 12px; color: var(--heading); }

/* ===================== buttons (RadButton + Bootstrap, one look) ===================== */
.RadButton.rbButton, .RadButton.rbButton.rbSkinnedButton, .btn {
  border-radius: var(--radius-sm) !important; font-family: var(--font) !important; font-weight: 600 !important; font-size: 14px !important;
  line-height: 1.2 !important; min-height: var(--field-h); padding: 6px 16px !important; box-shadow: none !important;
  text-transform: none !important; letter-spacing: 0 !important; transition: background .12s, border-color .12s, color .12s;
}
.btn { display: inline-flex !important; align-items: center; justify-content: center; gap: 7px; }
.RadButton.rbButton, .RadButton.rbButton.rbSkinnedButton {
  display: inline-flex !important; align-items: center !important; justify-content: center !important; height: var(--field-h) !important;
  width: auto !important; background: var(--btn-bg) !important; background-image: none !important; color: var(--btn-text) !important;
  border: 1px solid var(--btn-bg) !important; vertical-align: middle;
}
.RadButton.rbButton:hover, .RadButton.rbButton.rbHovered { background: var(--btn-hover) !important; border-color: var(--btn-hover) !important; }
.RadButton.rbButton .rbText { color: inherit !important; padding: 0 !important; margin: 0 !important; line-height: inherit !important; height: auto !important; float: none !important; }
.RadButton.rbButton .rbPrimaryIcon:empty, .RadButton.rbButton .rbSecondaryIcon:empty { display: none !important; }
.RadButton.rbButton.rbDisabled { opacity: .6; }
/* secondary: outline (View All, Back, Cancel...) */
.RadButton.rbButton.btn-sec, .btn-secondary, .btn-light {
  background: var(--surface) !important; color: var(--text) !important; border: 1px solid var(--field-border) !important;
}
.RadButton.rbButton.btn-sec:hover, .btn-secondary:hover, .btn-light:hover { background: var(--field-hover) !important; color: var(--text) !important; }
.btn-primary { background: var(--btn-bg) !important; border-color: var(--btn-bg) !important; color: var(--btn-text) !important; }
.btn-primary:hover { background: var(--btn-hover) !important; border-color: var(--btn-hover) !important; }
.btn-danger, .RadButton.rbButton.btn-del { background: var(--danger) !important; border-color: var(--danger) !important; color: #fff !important; }
/* Font Awesome glyphs on RadButtons by class, so the markup only needs CssClass */
.RadButton.btn-add .rbText::before, .RadButton.btn-all .rbText::before, .RadButton.btn-back .rbText::before,
.RadButton.btn-search .rbText::before, .RadButton.btn-save .rbText::before, .RadButton.btn-ico .rbText::before {
  font-family: "Font Awesome 6 Free"; font-weight: 900; margin-right: 7px; font-size: 13px;
}
.RadButton.btn-add .rbText::before { content: "\2b"; }
.RadButton.btn-all .rbText::before { content: "\f0ca"; }
.RadButton.btn-back .rbText::before { content: "\f060"; }
.RadButton.btn-search .rbText::before { content: "\f002"; }
.RadButton.btn-save .rbText::before { content: "\f00c"; }

/* ===================== grids ===================== */
.grid-wrap { width: 100%; }
html[data-theme] .RadGrid.RadGrid_Bootstrap {
  border: 1px solid var(--border) !important; border-radius: var(--radius) !important; overflow: hidden;
  background: var(--surface) !important; color: var(--text) !important; box-shadow: var(--shadow);
  height: auto !important; font-family: var(--font) !important;
}
html[data-theme] .RadGrid .rgMasterTable, html[data-theme] .RadGrid .rgHeaderDiv, html[data-theme] .RadGrid .rgDataDiv,
html[data-theme] .RadGrid .rgHeaderWrapper { border: 0 !important; background: transparent !important; }
html[data-theme] .RadGrid .rgDataDiv { height: auto !important; overflow: visible !important; }
html[data-theme] .RadGrid .rgHeaderDiv { margin-right: 0 !important; padding-right: 0 !important; }
.RadGrid .rgMasterTable { border-collapse: separate !important; border-spacing: 0 !important; }
html[data-theme] .RadGrid th.rgHeader, html[data-theme] .RadGrid .rgHeader {
  border: 0 !important; border-bottom: 1px solid var(--border) !important; background: var(--surface-2) !important; background-image: none !important;
  padding: 11px 12px 9px !important; font-size: 11px !important; font-weight: 700 !important; letter-spacing: .5px; text-transform: uppercase;
  color: var(--muted) !important; white-space: nowrap;
}
html[data-theme] .RadGrid .rgHeader a { color: var(--muted) !important; text-decoration: none !important; }
html[data-theme] .RadGrid .rgHeader a:hover { color: var(--text) !important; }
html[data-theme] .RadGrid .rgRow > td, html[data-theme] .RadGrid .rgAltRow > td, html[data-theme] .RadGrid .rgEditRow > td {
  border: 0 !important; border-bottom: 1px solid var(--line) !important; padding: 9px 12px !important; background: transparent !important;
  color: var(--text) !important; font-size: 13px !important; vertical-align: middle;
}
html[data-theme] .RadGrid .rgRow, html[data-theme] .RadGrid .rgAltRow { background: transparent !important; }
html[data-theme] .RadGrid .rgRow:hover > td, html[data-theme] .RadGrid .rgAltRow:hover > td,
html[data-theme] .RadGrid .rgHoveredRow > td { background: var(--accent-soft) !important; }
html[data-theme] .RadGrid .rgSelectedRow > td { background: var(--accent-soft) !important; }
html[data-theme] .RadGrid .rgPager, html[data-theme] .RadGrid .rgPager > td, html[data-theme] .RadGrid .rgFooter > td,
html[data-theme] .RadGrid .rgCommandRow > td {
  border: 0 !important; border-top: 1px solid var(--border) !important; background: var(--surface-2) !important; color: var(--text) !important;
}
html[data-theme] .RadGrid .rgPager .rgWrap, html[data-theme] .RadGrid .rgInfoPart, html[data-theme] .RadGrid .rgPager .rgPagerLabel { color: var(--muted) !important; }
html[data-theme] .RadGrid .rgNumPart a { color: var(--text) !important; border-radius: 6px !important; }
html[data-theme] .RadGrid .rgNumPart a.rgCurrentPage { background: var(--btn-bg) !important; border-color: var(--btn-bg) !important; color: #fff !important; }
html[data-theme] .RadGrid .rgNoRecords td, html[data-theme] .RadGrid .rgNoRecords div { border: 0 !important; background: transparent !important; color: var(--muted) !important; padding: 18px 12px !important; }
.RadGrid img { max-width: 100%; }
/* tablets / narrow windows: a wide grid swipes sideways inside its frame instead of being clipped (phones get cards, below).
   (Vertically nothing scrolls inside a grid - the page does.) */
@media (min-width: 768.02px) and (max-width: 991.98px) {
  .grid-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius); }
  html[data-theme] .grid-wrap .RadGrid.RadGrid_Bootstrap { overflow: visible; min-width: 100%; width: max-content !important; box-shadow: none; }
}

/* row action icons (Font Awesome, replacing the old PNGs) */
.ico-cell { text-align: center !important; white-space: nowrap; }
a.gi, .gi {
  display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 8px;
  color: var(--muted) !important; font-size: 15px; text-decoration: none !important; border: 0; background: transparent; cursor: pointer;
}
a.gi:hover, .gi:hover { background: var(--accent-soft); color: var(--accent) !important; }
a.gi.gi-del:hover { background: rgba(214, 51, 75, .12); color: var(--danger) !important; }
a.gi.gi-Y { color: var(--success) !important; font-size: 18px; }
a.gi.gi-N { color: var(--muted) !important; opacity: .7; font-size: 18px; }
a.gi.gi-Y:hover { background: rgba(31, 157, 85, .12); }

/* ===================== forms (the add / edit pages) ===================== */
.form-card { max-width: 1120px; }
.form-table { border-collapse: separate; border-spacing: 0; width: 100%; }
.form-table > tbody > tr > td { padding: 7px 8px; vertical-align: middle; }
.form-table > tbody > tr > td:nth-child(odd):not(:last-child) {
  width: 180px; color: var(--muted); font-size: 13px; font-weight: 600; white-space: nowrap; text-align: right; padding-right: 16px;
}
.form-table .RadInput, .form-table .RadComboBox, .form-table .RadDropDownList, .form-table .RadPicker, .form-table .RadUpload, .form-table textarea { max-width: 100%; }
.form-actions { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 12px; margin-top: 8px; border-top: 1px solid var(--line); }
.field-err { color: var(--danger) !important; font-weight: 600; }
.field-err i, .val-ico { color: var(--danger); }
.alert-inline { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 8px; background: rgba(214,51,75,.08); color: var(--danger); font-weight: 600; }
.alert-ok { background: rgba(31,157,85,.10); color: var(--success); }
@media (max-width: 767.98px) {
  .form-table, .form-table > tbody, .form-table > tbody > tr, .form-table > tbody > tr > td { display: block; width: 100% !important; }
  .form-table > tbody > tr > td:nth-child(odd):not(:last-child) { text-align: left; padding: 10px 0 2px; }
  .form-table > tbody > tr > td { padding: 2px 0; }
  .form-table .RadInput, .form-table .RadComboBox, .form-table .RadPicker { width: 100% !important; }
}

/* ===================== Telerik inputs: one height, rounded ===================== */
.RadInput .riTextBox, .RadInput_Bootstrap .riTextBox { border-radius: var(--radius-sm) !important; min-height: var(--field-h); font-family: var(--font) !important; font-size: 14px !important; }
.RadComboBox .rcbInputCell, .RadComboBox_Bootstrap .rcbInner { border-radius: var(--radius-sm) !important; }
.RadComboBox_Bootstrap .rcbInner { min-height: var(--field-h); display: flex !important; align-items: center; }
.RadComboBox .rcbInput { font-family: var(--font) !important; font-size: 14px !important; }
.form-control, .form-select { border-radius: var(--radius-sm); min-height: var(--field-h); background-color: var(--field-bg); color: var(--field-text); border-color: var(--field-border); }
.form-control:focus, .form-select:focus { background-color: var(--field-bg); color: var(--field-text); border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* ===================== tabs (RadTabStrip) ===================== */
.RadTabStrip.RadTabStrip_Bootstrap { margin-bottom: 14px; border-bottom: 1px solid var(--border); background: transparent !important; }
.RadTabStrip_Bootstrap .rtsLevel1, .RadTabStrip_Bootstrap .rtsUL { background: transparent !important; border: 0 !important; }
.RadTabStrip_Bootstrap .rtsLink { background: transparent !important; border: 0 !important; border-bottom: 2px solid transparent !important; border-radius: 0 !important; color: var(--muted) !important; font-family: var(--font) !important; font-weight: 600; padding: 10px 16px !important; }
.RadTabStrip_Bootstrap .rtsLink:hover { color: var(--text) !important; }
.RadTabStrip_Bootstrap .rtsSelected, .RadTabStrip_Bootstrap .rtsSelected .rtsLink { color: var(--accent) !important; border-bottom-color: var(--accent) !important; background: transparent !important; }

/* ===================== modals / RadWindow ===================== */
.modal-content { background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.modal-header, .modal-footer { border-color: var(--border); }
.modal-icon { width: 52px; height: 52px; margin: 0 auto 12px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent); font-size: 22px; }
html[data-theme="dark"] .btn-close { filter: invert(1) grayscale(100%) brightness(200%); }
.RadWindow.RadWindow_Bootstrap, .RadWindow.RadWindow_MetroTouch { border-radius: var(--radius) !important; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,.35) !important; }
.RadWindow .rwTitleBar { background: var(--surface-2) !important; border-color: var(--border) !important; }
.RadWindow .rwTitleBar .rwTitle, .RadWindow .rwTitleWrapper .rwTitle { color: var(--text) !important; font-family: var(--font) !important; font-weight: 700 !important; }
.RadWindow .rwContent { background: var(--surface) !important; }

/* ===================== popup pages (shown inside a RadWindow) ===================== */
body.popup { background: var(--surface) !important; }
body.popup .page-wrap { padding: 16px 18px 24px; max-width: none; }
/* stored HTML (order e-mails, dashboard copy) written black-on-white: keep it on white paper in both themes */
.paper { background: #fff; color: #1d2433; border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; }
.paper td { color: inherit; }
@media print { .page-foot, .mbar, #siteNav { display: none !important; } .paper { border: 0; padding: 0; } }

/* ===================== dealer storefront ===================== */
.shop-bar {
  position: sticky; top: 0; z-index: 1010; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px 28px; background: var(--surface); border-bottom: 1px solid var(--border);
}
.shop-bar .shop-label { font-size: 12px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); margin-right: 4px; }
.shop-bar .shop-label i { color: var(--brand-2); margin-right: 6px; }
.shop-cart {
  margin-left: auto; display: inline-flex; align-items: center; gap: 8px; height: var(--field-h); padding: 0 14px 0 6px;
  border-radius: 20px; background: var(--btn-bg); color: #fff !important; font-weight: 700; text-decoration: none !important;
}
.shop-cart:hover { background: var(--btn-hover); }
.shop-cart .shop-cart-ico { width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,.18); display: inline-flex; align-items: center; justify-content: center; }
.shop-cart a, .shop-cart a:link, .shop-cart a:visited { color: #fff !important; text-decoration: none !important; }
@media (max-width: 991.98px) { .shop-bar { top: 58px; padding: 10px 16px; } .shop-bar .RadComboBox { flex: 1 1 140px; width: auto !important; } }
.page-wrap.has-bg { background-attachment: fixed; background-size: cover; background-position: center; min-height: 70vh; }
.has-bg .page-head .pageHeader, .has-bg .page-head .pageHeader span { color: #fff !important; text-shadow: 0 2px 12px rgba(0,0,0,.55); }
.dealer-foot { padding: 18px 28px; color: var(--muted); font-size: 13px; border-top: 1px solid var(--border); background: var(--surface); }
.dealer-foot a { color: var(--accent); }
.no-shop .shop-bar, .dealer-sub:empty { display: none; }
.dealer-sub { padding: 14px 28px; background: var(--brand); color: #fff; }
.dealer-sub, .dealer-sub span, .dealer-sub td { color: #fff !important; }
.dealer-sub a { color: #fff !important; text-decoration: underline; }
/* product tiles (ListView) */
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.tile { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; transition: transform .12s, box-shadow .12s; }
.tile:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(16,24,40,.12); }
.tile-img { display: flex; align-items: center; justify-content: center; height: 180px; padding: 10px; background: #ffffff; }
.tile-img img { max-width: 100%; max-height: 160px; width: auto !important; height: auto !important; object-fit: contain; }
.tile-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1 1 auto; }
.tile-title, .tile-title:link, .tile-title:visited { color: var(--heading) !important; font-weight: 600; line-height: 1.35; }
.tile-price { display: flex; align-items: center; gap: 10px; margin-top: auto; font-size: 16px; font-weight: 700; }
.tile-cost { color: var(--danger); }

/* ===================== Telerik dark mode ===================== */
html[data-theme="dark"] .riTextBox, html[data-theme="dark"] .RadInput .riTextBox,
html[data-theme="dark"] .RadComboBox .rcbInputCell, html[data-theme="dark"] .RadComboBox .rcbArrowCell,
html[data-theme="dark"] .RadComboBox_Bootstrap .rcbInner, html[data-theme="dark"] .RadComboBox_Bootstrap .rcbActionButton,
html[data-theme="dark"] .RadDropDownList .rddlInner, html[data-theme="dark"] .RadPicker .rcCalPopup, html[data-theme="dark"] .RadPicker .rcTimePopup,
html[data-theme="dark"] .RadUpload .ruFakeInput, html[data-theme="dark"] .RadAsyncUpload .ruFakeInput, html[data-theme="dark"] textarea {
  background-color: var(--field-bg) !important; background-image: none !important; color: var(--field-text) !important; border-color: var(--field-border) !important;
}
html[data-theme="dark"] .RadComboBox .rcbInput, html[data-theme="dark"] .RadDropDownList .rddlFakeInput { background: transparent !important; color: var(--field-text) !important; }
html[data-theme="dark"] .RadInput .riHover, html[data-theme="dark"] .RadComboBox .rcbHovered .rcbInputCell,
html[data-theme="dark"] .RadComboBox_Bootstrap .rcbHovered .rcbInner, html[data-theme="dark"] .RadDropDownList .rddlHovered {
  background-color: var(--field-hover) !important; color: var(--field-text) !important;
}
html[data-theme="dark"] .RadInput .riFocused, html[data-theme="dark"] .RadComboBox .rcbFocused .rcbInputCell,
html[data-theme="dark"] .RadComboBox_Bootstrap .rcbFocused .rcbInner, html[data-theme="dark"] .RadDropDownList .rddlFocused {
  background-color: var(--field-bg) !important; border-color: var(--accent) !important; color: var(--field-text) !important;
}
html[data-theme="dark"] .RadInput .riEmpty, html[data-theme="dark"] .RadComboBox .rcbEmptyMessage { color: var(--muted) !important; }
html[data-theme="dark"] .RadComboBoxDropDown, html[data-theme="dark"] .rddlPopup, html[data-theme="dark"] .RadComboBoxDropDown .rcbScroll {
  background-color: var(--popup-bg) !important; color: var(--field-text) !important; border-color: var(--field-border) !important;
}
html[data-theme="dark"] .RadComboBoxDropDown .rcbItem, html[data-theme="dark"] .rddlPopup .rddlItem { background: transparent !important; color: var(--field-text) !important; }
html[data-theme="dark"] .RadComboBoxDropDown .rcbHovered, html[data-theme="dark"] .rddlPopup .rddlItemHovered { background-color: var(--popup-hover) !important; color: var(--field-text) !important; }
html[data-theme="dark"] .RadComboBoxDropDown .rcbSelected, html[data-theme="dark"] .rddlPopup .rddlItemSelected { background-color: var(--popup-selected) !important; color: #fff !important; }
html[data-theme="dark"] .RadCalendar, html[data-theme="dark"] .RadCalendar .rcTitlebar, html[data-theme="dark"] .RadCalendarMonthView {
  background: var(--popup-bg) !important; color: var(--field-text) !important; border-color: var(--field-border) !important;
}
html[data-theme="dark"] .RadCalendar a, html[data-theme="dark"] .RadCalendar th, html[data-theme="dark"] .RadCalendar .rcTitle { color: var(--field-text) !important; }
html[data-theme="dark"] .RadCalendar .rcSelected a { background: var(--popup-selected) !important; color: #fff !important; }
html[data-theme="dark"] .RadEditor, html[data-theme="dark"] .RadEditor .reToolBarWrapper, html[data-theme="dark"] .RadEditor .reModesWrapper,
html[data-theme="dark"] .RadEditor .reWrapper_corner, html[data-theme="dark"] .RadEditor .reToolCell { background-color: var(--surface-2) !important; border-color: var(--border) !important; }
html[data-theme="dark"] .RadToolTip .rtContent, html[data-theme="dark"] .RadToolTip .rtWrapper { background: var(--popup-bg) !important; color: var(--text) !important; }
html[data-theme="dark"] .RadAjax .raDiv, html[data-theme="dark"] .RadAjax_Bootstrap .raColor { background-color: rgba(17,20,26,.6) !important; }
html[data-theme="dark"] .table { color: var(--text); --bs-table-bg: transparent; --bs-table-color: var(--text); border-color: var(--border); }
html[data-theme="dark"] .input-group-text { background: var(--surface-2); color: var(--text); border-color: var(--field-border); }

/* thin, theme-coloured scrollbars */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--muted) 40%, transparent); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ===================== grids as cards on a phone =====================
   scripts/mobilegrid.js stamps every grid cell with its column header (data-label) and
   tags it: mgrid-title (names the record), mgrid-meta (a short value on the title line),
   mgrid-icon (action icons), mgrid-thumb (picture), mgrid-check (row checkbox). Below
   768px each row becomes a card: title on top, the other columns two per line with a
   small caption, and the action icons spread across ONE row at the bottom with their
   column name underneath. Ported from the AI Software portal (mobilegrid.css). */
@media (max-width: 768px) {
  html[data-theme] .RadGrid.mgrid-host {
    display: block; width: 100% !important; max-width: 100% !important; overflow: visible !important;
    border: 0 !important; background: transparent !important; box-shadow: none !important; border-radius: 0 !important;
  }
  html[data-theme] .RadGrid.mgrid-host .rgDataDiv, html[data-theme] .RadGrid.mgrid-host .rgHeaderDiv { height: auto !important; max-height: none !important; overflow: visible !important; width: 100% !important; }
  html[data-theme] .RadGrid.mgrid-host .mgrid-headrow { display: none !important; }
  html[data-theme] .RadGrid.mgrid-host.mgrid-ready .mgrid-table { display: flex !important; flex-direction: column !important; width: 100% !important; max-width: 100% !important; }
  html[data-theme] .RadGrid.mgrid-host.mgrid-ready .mgrid-sec { display: block !important; width: 100% !important; }
  html[data-theme] .RadGrid.mgrid-host.mgrid-ready thead.mgrid-sec { order: 1 !important; }
  html[data-theme] .RadGrid.mgrid-host.mgrid-ready tbody.mgrid-sec { order: 2 !important; }
  html[data-theme] .RadGrid.mgrid-host.mgrid-ready tfoot.mgrid-sec { order: 3 !important; }
  html[data-theme] .RadGrid.mgrid-host.mgrid-ready .mgrid-table > colgroup { display: none !important; }

  /* the card: a 60-column grid; --ico is one icon cell's share of the row */
  html[data-theme] .RadGrid.mgrid-host .mgrid-row {
    --ico: 15;
    display: grid !important; grid-template-columns: repeat(60, minmax(0, 1fr)); align-items: stretch;
    width: 100% !important; height: auto !important; margin: 0 0 12px !important; padding: 6px 8px 4px !important;
    background: var(--surface) !important; border: 1px solid var(--border) !important; border-radius: var(--radius) !important;
    box-shadow: var(--shadow) !important; box-sizing: border-box;
  }
  html[data-theme] .RadGrid.mgrid-host .mgrid-row[data-icons="1"] { --ico: 60; }
  html[data-theme] .RadGrid.mgrid-host .mgrid-row[data-icons="2"] { --ico: 30; }
  html[data-theme] .RadGrid.mgrid-host .mgrid-row[data-icons="3"] { --ico: 20; }
  html[data-theme] .RadGrid.mgrid-host .mgrid-row[data-icons="5"] { --ico: 12; }
  html[data-theme] .RadGrid.mgrid-host .mgrid-row[data-icons="6"] { --ico: 10; }
  html[data-theme] .RadGrid.mgrid-host .mgrid-footrow { border-width: 2px !important; font-weight: 600 !important; }

  /* text cells: caption above value, two per line */
  html[data-theme] .RadGrid.mgrid-host .mgrid-row > .mgrid-cell {
    grid-column: span 30; display: flex !important; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 1px;
    width: auto !important; max-width: 100% !important; height: auto !important; min-width: 0;
    padding: 5px 6px 7px !important; border: 0 !important; background: transparent !important;
    text-align: left !important; white-space: normal !important; word-break: break-word; font-size: 13.5px !important;
  }
  html[data-theme] .RadGrid.mgrid-host .mgrid-cell::before {
    content: attr(data-label); display: block; font-size: 10px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--muted);
  }
  html[data-theme] .RadGrid.mgrid-host .mgrid-cell[data-label=""]::before { display: none; }
  html[data-theme] .RadGrid.mgrid-host .mgrid-cell.mgrid-empty { display: none !important; }
  html[data-theme] .RadGrid.mgrid-host .mgrid-cell br { display: none; }
  html[data-theme] .RadGrid.mgrid-host .mgrid-cell .RadInput, html[data-theme] .RadGrid.mgrid-host .mgrid-cell .RadComboBox, html[data-theme] .RadGrid.mgrid-host .mgrid-cell input[type=text] { width: 100% !important; }

  /* title line: the record's name full width (or most of it, with a meta value on the right) */
  html[data-theme] .RadGrid.mgrid-host .mgrid-row > .mgrid-title {
    order: -2; grid-column: 1 / -1; font-size: 15.5px !important; font-weight: 700 !important; color: var(--heading) !important; padding: 8px 6px 4px !important;
  }
  html[data-theme] .RadGrid.mgrid-host .mgrid-title::before { display: none !important; }
  html[data-theme] .RadGrid.mgrid-host .mgrid-row[data-meta="1"] > .mgrid-title { grid-column: span 34; }
  html[data-theme] .RadGrid.mgrid-host .mgrid-row > .mgrid-meta {
    order: -1; grid-column: span 26; align-items: flex-end; text-align: right !important; padding: 9px 6px 4px !important; color: var(--muted) !important; font-size: 12px !important; white-space: nowrap !important;
  }
  html[data-theme] .RadGrid.mgrid-host .mgrid-meta::before { display: none !important; }
  /* picture column: a thumbnail at the top of the card */
  html[data-theme] .RadGrid.mgrid-host .mgrid-row > .mgrid-thumb { order: -3; grid-column: 1 / -1; align-items: center; padding: 4px !important; }
  html[data-theme] .RadGrid.mgrid-host .mgrid-thumb img { max-height: 120px; width: auto; }
  /* row checkbox: rides at the start of the title line */
  html[data-theme] .RadGrid.mgrid-host .mgrid-row > .mgrid-check { order: -3; grid-column: span 6; justify-content: center; padding: 8px 0 4px !important; }
  html[data-theme] .RadGrid.mgrid-host .mgrid-row:has(.mgrid-check) > .mgrid-title { grid-column: span 54; }

  /* action icons: one row across the bottom, caption under each, a divider above */
  html[data-theme] .RadGrid.mgrid-host .mgrid-row > .mgrid-icon {
    order: 1; grid-column: span var(--ico); flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    margin-top: 4px; padding: 6px 0 4px !important; border-top: 1px solid var(--line) !important; text-align: center !important;
  }
  html[data-theme] .RadGrid.mgrid-host .mgrid-row > .mgrid-icon:not(.mgrid-icon ~ .mgrid-cell) { grid-column: 1 / span var(--ico); }
  html[data-theme] .RadGrid.mgrid-host .mgrid-row:not([data-icons="1"]):not([data-icons="2"]):not([data-icons="3"]):not([data-icons="4"]):not([data-icons="5"]):not([data-icons="6"]) .mgrid-icon ~ .mgrid-icon ~ .mgrid-icon ~ .mgrid-icon ~ .mgrid-icon { margin-top: 0; border-top: 0 !important; }
  html[data-theme] .RadGrid.mgrid-host .mgrid-icon::before { display: none !important; }
  html[data-theme] .RadGrid.mgrid-host .mgrid-icon::after { content: attr(data-label); font-size: 10px; line-height: 1; color: var(--muted); white-space: nowrap; }
  html[data-theme] .RadGrid.mgrid-host .mgrid-icon > div, html[data-theme] .RadGrid.mgrid-host .mgrid-icon .ico-cell { display: contents; }
  html[data-theme] .RadGrid.mgrid-host .mgrid-icon a.gi, html[data-theme] .RadGrid.mgrid-host .mgrid-icon .gi { width: 44px; height: 40px; font-size: 19px; }
  html[data-theme] .RadGrid.mgrid-host .mgrid-icon a.gi.gi-Y, html[data-theme] .RadGrid.mgrid-host .mgrid-icon a.gi.gi-N { font-size: 21px; }
  html[data-theme] .RadGrid.mgrid-host .mgrid-icon .RadButton.rbButton { min-height: 36px; height: 36px !important; padding: 4px 14px !important; }
  html[data-theme] .RadGrid.mgrid-host .mgrid-row[data-icons="1"] > .mgrid-icon .RadButton.rbButton { width: 100% !important; }

  /* pager: prev / current page / next, item count under it */
  html[data-theme] .RadGrid.mgrid-host .rgPager, html[data-theme] .RadGrid.mgrid-host .rgPager > td { display: block !important; border: 0 !important; background: transparent !important; padding: 4px 0 !important; text-align: center !important; white-space: normal !important; }
  html[data-theme] .RadGrid.mgrid-host .rgPager > td > div { display: flex !important; flex-wrap: wrap !important; justify-content: center !important; align-items: center !important; gap: 6px !important; width: 100% !important; }
  html[data-theme] .RadGrid.mgrid-host .rgPager .rgArrPart1, html[data-theme] .RadGrid.mgrid-host .rgPager .rgNumPart, html[data-theme] .RadGrid.mgrid-host .rgPager .rgArrPart2 { display: contents !important; float: none !important; }
  html[data-theme] .RadGrid.mgrid-host .rgPager .rgActionButton, html[data-theme] .RadGrid.mgrid-host .rgPager .rgNumPart a {
    display: inline-flex !important; align-items: center; justify-content: center; min-width: 40px; height: 38px; margin: 0 !important; padding: 0 8px !important;
    border: 1px solid var(--border) !important; border-radius: 10px !important; background: var(--surface) !important; color: var(--text) !important; font-size: 14px !important;
  }
  html[data-theme] .RadGrid.mgrid-host .rgPager .rgNumPart a.rgCurrentPage { background: var(--btn-bg) !important; border-color: var(--btn-bg) !important; color: #fff !important; min-width: 46px; }
  html[data-theme] .RadGrid.mgrid-host .rgPager .rgNumPart a:not(.rgCurrentPage), html[data-theme] .RadGrid.mgrid-host .rgPager .rgPageFirst, html[data-theme] .RadGrid.mgrid-host .rgPager .rgPageLast, html[data-theme] .RadGrid.mgrid-host .rgPager .rgAdvPart { display: none !important; }
  html[data-theme] .RadGrid.mgrid-host .rgPager .rgInfoPart { order: 4; flex: 0 0 100%; float: none !important; margin-top: 4px; font-size: 12px !important; color: var(--muted) !important; }

  /* toolbar: search full width, the buttons share one row */
  .page-toolbar .RadInput, .page-toolbar .RadComboBox, .page-toolbar > div[id$="Panel"]:has(.RadInput, .RadComboBox) { flex: 0 0 100% !important; width: 100% !important; }
  /* a button RadAjax wrapped in its own panel div shares the button row like the rest */
  .page-toolbar > div[id$="Panel"]:has(.RadButton) { flex: 1 1 0 !important; min-width: 0; display: flex !important; }
  .page-toolbar > div[id$="Panel"]:has(.RadButton) .RadButton.rbButton { width: 100% !important; }
  .page-toolbar > div[id$="Panel"] .RadComboBox { width: 100% !important; }
  .page-toolbar .RadInput .riTextBox { width: 100% !important; }
  .page-toolbar .RadButton.rbButton { flex: 1 1 0 !important; min-width: 0 !important; padding-left: 8px !important; padding-right: 8px !important; white-space: nowrap; }
  .page-title .back-link, .page-title .RadButton { margin-left: auto; }

  /* a row with a checkbox keeps the title line to itself: a meta value reads as a normal field */
  html[data-theme] .RadGrid.mgrid-host .mgrid-row:has(.mgrid-check) > .mgrid-meta { order: 0; grid-column: span 30; align-items: flex-start; text-align: left !important; padding: 5px 6px 7px !important; color: var(--text) !important; font-size: 13.5px !important; }
  html[data-theme] .RadGrid.mgrid-host .mgrid-row:has(.mgrid-check) > .mgrid-meta::before { display: block !important; }

  /* dealer vehicle bar: compact and not pinned on a phone - year, make, model on one line, cart under it */
  .shop-bar { position: static; gap: 8px; padding: 10px 16px; }
  .shop-bar .shop-label { display: none; }
  /* RadAjax wraps the AJAX-updated pickers in <div id="...Panel">, so size whichever is the flex item */
  .shop-bar > .RadComboBox, .shop-bar > div[id$="Panel"] { flex: 1 1 0 !important; min-width: 0; width: auto !important; }
  .shop-bar > div[id$="Panel"] .RadComboBox { width: 100% !important; }
  .shop-bar > [id$="ddlYear"], .shop-bar > [id$="ddlYearPanel"] { flex: 0 0 86px !important; }
  .shop-bar > [id$="ddlCategoryID"], .shop-bar > [id$="ddlCategoryIDPanel"] { flex: 1 1 100% !important; }
  .shop-cart { flex: 1 1 100%; justify-content: center; margin-left: 0; height: 38px; }
  /* the dealer footer is stored HTML laid out for a desktop table: stack it */
  .dealer-foot table, .dealer-foot tbody, .dealer-foot tr, .dealer-foot td { display: block; width: auto !important; text-align: left !important; }
  .dealer-foot img { max-width: 100%; height: auto; }
  .dealer-foot, .dealer-sub { padding: 14px 16px; }

  /* a column that needs the whole line (email on the people grids): full width, one line, ellipsis if it must */
  html[data-theme] .RadGrid.mgrid-host .mgrid-row > .mgrid-wide { grid-column: 1 / -1; }
  html[data-theme] .RadGrid.mgrid-host .mgrid-row > .mgrid-nowrap { white-space: nowrap !important; word-break: normal; overflow: hidden; text-overflow: ellipsis; display: block !important; }
  html[data-theme] .RadGrid.mgrid-host .mgrid-row > .mgrid-nowrap::before { display: block; }
}

/* ===================== dropdowns (RadComboBox): one clean field, no grey arrow block ===================== */
html[data-theme] .RadComboBox_Bootstrap .rcbInner {
  background: var(--field-bg) !important; border: 1px solid var(--field-border) !important; border-radius: var(--radius-sm) !important;
  box-shadow: none !important; min-height: var(--field-h); padding-right: 34px !important;
}
html[data-theme] .RadComboBox_Bootstrap .rcbInner:hover, html[data-theme] .RadComboBox_Bootstrap .rcbHovered .rcbInner { border-color: color-mix(in srgb, var(--field-border) 60%, var(--text)) !important; }
html[data-theme] .RadComboBox_Bootstrap .rcbFocused .rcbInner { border-color: var(--accent) !important; box-shadow: 0 0 0 3px var(--accent-soft) !important; }
html[data-theme] .RadComboBox_Bootstrap .rcbActionButton {
  background: transparent !important; background-image: none !important; border: 0 !important; box-shadow: none !important;
  width: 32px !important; right: 2px !important; color: var(--muted) !important;
}
html[data-theme] .RadComboBox_Bootstrap .rcbActionButton .rcbIcon { color: var(--muted) !important; }
html[data-theme] .RadComboBox_Bootstrap .rcbInput { color: var(--field-text) !important; font-size: 14px !important; }
html[data-theme] .RadComboBoxDropDown_Bootstrap { border-radius: var(--radius-sm) !important; border-color: var(--field-border) !important; box-shadow: 0 12px 32px rgba(16,24,40,.16) !important; overflow: hidden; }
html[data-theme] .RadComboBoxDropDown_Bootstrap .rcbItem, html[data-theme] .RadComboBoxDropDown_Bootstrap .rcbHovered, html[data-theme] .RadComboBoxDropDown_Bootstrap .rcbSelected { padding: 7px 12px !important; font-family: var(--font) !important; font-size: 14px !important; }
html[data-theme="light"] .RadComboBoxDropDown_Bootstrap .rcbHovered { background: var(--accent-soft) !important; color: var(--text) !important; }
html[data-theme="light"] .RadComboBoxDropDown_Bootstrap .rcbSelected { background: var(--accent) !important; color: #fff !important; }

/* ===================== cart: pill, drawer, list ===================== */
.shop-cart { cursor: pointer; user-select: none; }
.shop-cart.bump { animation: cart-bump .6s ease; }
@keyframes cart-bump { 0% { transform: scale(1); } 30% { transform: scale(1.14); } 55% { transform: scale(.96); } 100% { transform: scale(1); } }
.cart-drawer { width: min(420px, 100vw) !important; background: var(--surface) !important; color: var(--text); border-left: 1px solid var(--border) !important; }
.cart-drawer .offcanvas-header { border-bottom: 1px solid var(--border); padding: 16px 20px; }
.cart-drawer .offcanvas-title { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--heading); }
.cart-drawer .offcanvas-title i { color: var(--brand-2); }
.cart-drawer .offcanvas-body { padding: 0; display: flex; }
.cart-drawer iframe { border: 0; width: 100%; flex: 1 1 auto; background: var(--surface); }
.cart-drawer-foot { display: grid; gap: 8px; padding: 14px 20px 18px; border-top: 1px solid var(--border); }
html[data-theme="dark"] .cart-drawer .btn-close { filter: invert(1) grayscale(100%) brightness(200%); }
body.cart-plugin { background: var(--surface) !important; padding: 6px 20px 16px; }
.cart-list.RadGrid, html[data-theme] .cart-list.RadGrid.RadGrid_Bootstrap { border: 0 !important; box-shadow: none !important; background: transparent !important; border-radius: 0 !important; }
html[data-theme] .cart-list.RadGrid .rgRow > td, html[data-theme] .cart-list.RadGrid .rgAltRow > td { padding: 0 !important; border-bottom: 1px solid var(--line) !important; }
html[data-theme] .cart-list.RadGrid .rgRow:hover > td, html[data-theme] .cart-list.RadGrid .rgAltRow:hover > td { background: transparent !important; }
.cart-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.cart-item-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.cart-item-title { font-weight: 600; color: var(--heading); line-height: 1.35; }
.cart-item-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.cart-item-price { font-weight: 700; white-space: nowrap; }
.cart-total { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 0 4px; font-size: 15px; color: var(--muted); }
.cart-total b { font-size: 18px; color: var(--heading); }
.cart-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 48px 12px; color: var(--muted); }
.cart-empty i { font-size: 34px; color: var(--border); margin-bottom: 6px; }
.cart-empty b { color: var(--heading); font-size: 16px; }

/* ===================== add to cart: spin, then a green check ===================== */
.RadButton.btn-cart { transition: background .2s, border-color .2s, transform .1s; }
.RadButton.btn-cart:active { transform: scale(.96); }
.RadButton.btn-cart.is-adding, .RadButton.btn-cart.is-added { pointer-events: none; }
.RadButton.btn-cart.is-adding .rbText, .RadButton.btn-cart.is-added .rbText { font-size: 0 !important; }
.RadButton.btn-cart.is-adding .rbText::before { content: "\f110"; font-size: 14px; display: inline-block; animation: fa-spin 1s linear infinite; }
.RadButton.btn-cart.is-adding .rbText::after { content: "Adding"; font-size: 14px; }
.RadButton.btn-cart.is-added { background: var(--success) !important; border-color: var(--success) !important; animation: added-pop .45s ease; }
.RadButton.btn-cart.is-added .rbText::before { content: "\f00c"; font-size: 14px; }
.RadButton.btn-cart.is-added .rbText::after { content: "Added"; font-size: 14px; }
@keyframes added-pop { 0% { transform: scale(.92); } 60% { transform: scale(1.06); } 100% { transform: scale(1); } }
.toast-stack { position: fixed; right: 20px; bottom: 20px; z-index: 1090; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.app-toast {
  pointer-events: auto; display: flex; align-items: center; gap: 12px; min-width: 280px; max-width: min(380px, calc(100vw - 32px));
  padding: 12px 14px; border-radius: var(--radius); background: var(--surface); color: var(--text); border: 1px solid var(--border);
  box-shadow: 0 12px 32px rgba(16,24,40,.18); animation: toast-in .3s ease; transition: opacity .35s, transform .35s;
}
.app-toast > i { font-size: 20px; color: var(--success); }
.app-toast > div { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.app-toast > div span { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-toast > a { font-weight: 700; font-size: 13px; white-space: nowrap; }
.app-toast.out { opacity: 0; transform: translateY(8px); }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (max-width: 768px) { .toast-stack { left: 16px; right: 16px; bottom: 16px; } .app-toast { max-width: none; } }

/* ===================== dealer footer + Contact Us ===================== */
.dealer-foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 20px; }
.dealer-foot-links { display: flex; gap: 6px 20px; flex-wrap: wrap; }
.dealer-foot-links a { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; color: var(--text) !important; }
.dealer-foot-links a i { color: var(--brand-2); }
.dealer-foot-links a:hover { color: var(--accent) !important; text-decoration: none; }
.dealer-sub i { margin-right: 6px; }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.contact-card { padding: 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }
.contact-card h6 { font-weight: 700; color: var(--heading); margin: 0 0 8px; }
.contact-card p { margin: 0 0 8px; color: var(--text); line-height: 1.5; }
.contact-card p a i, .contact-dir i { margin-right: 6px; }
.contact-dir { font-weight: 600; font-size: 13.5px; }
.modal-header .modal-title { font-weight: 700; color: var(--heading); }
.modal-footer .btn i { margin-right: 2px; }

/* ===================== product pop-up ===================== */
.product-pop .page-wrap { padding: 22px 26px 28px; }
.pp-photo { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; display: flex; align-items: center; justify-content: center; min-height: 220px; }
.pp-photo img { max-width: 100%; max-height: 380px; width: auto; height: auto; object-fit: contain; border: 0 !important; }
.pp-title { font-size: 26px !important; margin-bottom: 14px !important; }
.pp-buy { padding: 18px 20px; margin-bottom: 14px; }
.pp-price { display: flex; justify-content: space-between; align-items: baseline; padding: 6px 0; border-bottom: 1px solid var(--line); }
.pp-price span { color: var(--muted); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: .4px; }
.pp-price > [id] { font-size: 20px; font-weight: 700; color: var(--heading); }
.pp-cost > [id] { color: var(--danger) !important; }
.pp-call { font-weight: 700; color: var(--muted); }
.pp-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; align-items: center; }
.pp-actions .RadButton.btn-cart { flex: 1 1 100%; height: 46px !important; font-size: 15px !important; }
.pp-added { flex: 1 1 100%; display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: var(--radius-sm); background: rgba(31,157,85,.10); color: var(--success); font-weight: 700; animation: toast-in .3s ease; }
.pp-actions .RadButton.btn-save, .pp-actions .RadButton.btn-sec { flex: 1 1 0; }
.pp-note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--border); font-size: 14px; }
.pp-note i { color: var(--brand-2); margin-top: 3px; }
.pp-disclaimer { display: block; margin-top: 12px; color: var(--danger); font-size: 13px; }
.pp-desc { line-height: 1.6; overflow-wrap: anywhere; }
.pp-desc img { max-width: 100%; height: auto; }
.pp-desc table { max-width: 100%; }
.pp-rotator { display: flex; align-items: center; gap: 10px; }
.pp-rotator .RadRotator { flex: 1 1 auto; min-width: 0; }
.pp-rotator .RotatorImage { width: 120px; height: 110px; object-fit: contain; background: #fff; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; }
.pp-rot-btn { width: 32px; height: auto; cursor: pointer; opacity: .7; }

/* ===================== request information pop-up ===================== */
.rf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.rf-field { display: flex; flex-direction: column; gap: 4px; }
.rf-field label { font-size: 12px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--muted); }
.rf-wide { grid-column: 1 / -1; }
.rf-thanks { text-align: center; padding: 40px 10px; }
.rf-thanks h2 { font-size: 22px; font-weight: 700; color: var(--heading); }
@media (max-width: 440px) { .rf-grid { grid-template-columns: 1fr; } }

/* ===================== pop-up window chrome (RadWindow) ===================== */
.RadWindow .rwIcon { display: none !important; }
.RadWindow .rwTitleBar { padding: 10px 14px !important; height: auto !important; }
.RadWindow .rwTitleBar .rwTitle, .RadWindow .rwTitle { font-size: 15px !important; padding-left: 4px !important; }
.RadWindow .rwCommandButton, .RadWindow .rwCloseButton { border-radius: 8px !important; }
.RadWindow .rwContent { border: 0 !important; }

/* vehicle bar between phone and wide desktop: the pickers share the line so the cart never drops to its own row */
@media (min-width: 768.02px) and (max-width: 1399.98px) {
  .shop-bar { flex-wrap: nowrap; }
  .shop-bar > .RadComboBox, .shop-bar > div[id$="Panel"] { flex: 1 1 140px !important; min-width: 0; width: auto !important; }
  .shop-bar > div[id$="Panel"] .RadComboBox { width: 100% !important; }
  .shop-bar > [id$="ddlYear"], .shop-bar > [id$="ddlYearPanel"] { flex: 0 0 96px !important; }
  .shop-bar .shop-label { display: none; }
  .shop-cart { flex: 0 0 auto; }
}

/* phones: product tiles two per row, Add under the prices; a button cell in a card needs no caption */
@media (max-width: 575.98px) {
  .tile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tile-img { height: 130px; padding: 8px; }
  .tile-img img { max-height: 114px; }
  .tile-body { padding: 10px 10px 12px; }
  .tile-title, .tile-title:link, .tile-title:visited { font-size: 13.5px; }
  .tile-price-table, .tile-price-table tbody, .tile-price-table tr { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; width: 100%; }
  .tile-price-table td { padding: 0 !important; font-size: 15px !important; }
  .tile-price-table td:last-child { flex: 1 1 100%; margin-top: 8px; text-align: left !important; }
  .tile-price-table .RadButton.rbButton { width: 100% !important; }
}
@media (max-width: 768px) {
  html[data-theme] .RadGrid.mgrid-host .mgrid-icon:has(.RadButton)::after { display: none; }
}

/* rich-text editors never wider than their card */
.RadEditor { max-width: 100% !important; }
@media (max-width: 768px) { .RadEditor { width: 100% !important; } .RadEditor .reToolBarWrapper { white-space: normal !important; } }
