/* JR COMSHOP portal-wide UI system.
   This file loads last so shared controls stay readable and aligned even when a
   workflow has older page-specific rules. */

:root{
  --jr-black:#101010;
  --jr-ink:#171717;
  --jr-gray-900:#292929;
  --jr-gray-700:#555;
  --jr-gray-500:#858585;
  --jr-gray-300:#c9c9c5;
  --jr-gray-200:#deded9;
  --jr-gray-100:#f2f2ef;
  --jr-white:#fff;
  --jr-danger:#a40000;
  --jr-warning:#7a5100;
  --jr-success:#155f32;
  --jr-focus:#f1c40f;
  --jr-control-height:48px;
  --jr-page-width:1680px;
}

/* Purchased-phone identity block */
.acquisition-device-identity-heading {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid #111;
  background: #f5f5f5;
  color: #111;
}
.acquisition-device-identity-heading > i {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  background: #111;
  color: #fff;
  font-size: 1.25rem;
}
.acquisition-device-identity-heading span { min-width: 0; }
.acquisition-device-identity-heading b,
.acquisition-device-identity-heading small { display: block; }
.acquisition-device-identity-heading b { font-size: 1rem; }
.acquisition-device-identity-heading small { margin-top: .2rem; color: #4b4b4b; line-height: 1.45; }
.acquisition-device-identity-heading em {
  padding: .45rem .65rem;
  background: #111;
  color: #fff;
  font-size: .68rem;
  font-style: normal;
  font-weight: 800;
  letter-spacing: .06em;
  white-space: nowrap;
}
.acquisition-identity-reason {
  padding: 1rem !important;
  border: 1px solid #111;
  background: #fff8d8;
}
.acquisition-identity-reason-box {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: .75rem;
}
.acquisition-identity-reason-box > i { font-size: 1.4rem; }
.acquisition-identity-reason-box span,
.acquisition-identity-reason-box label,
.acquisition-identity-reason-box small { display: block; }
.acquisition-identity-reason-box label { margin: 0; font-weight: 800; }
.acquisition-identity-reason-box small { color: #494126; }
@media (max-width: 767.98px) {
  .acquisition-device-identity-heading { grid-template-columns: 2.75rem minmax(0, 1fr); }
  .acquisition-device-identity-heading > i { width: 2.75rem; height: 2.75rem; }
  .acquisition-device-identity-heading em { grid-column: 1 / -1; text-align: center; }
}

/* Page shell and readable type */
.portal-system-v2{
  background:var(--jr-gray-100)!important;
  color:var(--jr-ink)!important;
  font-size:16px;
  line-height:1.5;
  text-rendering:optimizeLegibility;
}
.portal-system-v2 .portal-main{min-width:0;background:var(--jr-gray-100)!important}
.portal-system-v2 .portal-view-frame{min-width:0;padding-bottom:40px;overflow-x:clip}
.portal-system-v2 .portal-view-frame>:first-child{width:100%;min-width:0}
.portal-system-v2 .portal-view-frame :is(.container,.container-fluid){width:100%;max-width:var(--jr-page-width);margin-inline:auto}
.portal-system-v2 :is(h1,h2,h3,h4,h5,h6){color:inherit;font-weight:850;line-height:1.15;text-wrap:balance}
.portal-system-v2 p{line-height:1.55}
.portal-system-v2 .text-muted{color:#5c5c5c!important}
.portal-system-v2 :is(.small,small){font-size:.78rem!important;line-height:1.45}
.portal-system-v2 a:focus-visible,
.portal-system-v2 button:focus-visible,
.portal-system-v2 input:focus-visible,
.portal-system-v2 select:focus-visible,
.portal-system-v2 textarea:focus-visible,
.portal-system-v2 summary:focus-visible{
  outline:3px solid var(--jr-focus)!important;
  outline-offset:2px!important;
}

/* Sidebar: high-contrast and one consistent active state */
.portal-system-v2 .portal-sidebar,
.portal-system-v2 .portal-sidebar-inner{background:#090909!important;color:#fff!important}
.portal-system-v2 .portal-sidebar{border-right:1px solid #333!important}
.portal-system-v2 .portal-brand,
.portal-system-v2 .portal-account,
.portal-system-v2 .portal-nav,
.portal-system-v2 .portal-sidebar-footer{color:#fff!important}
.portal-system-v2 .portal-menu-label{margin:12px 10px 5px!important;color:#aaa!important;font-size:.72rem!important;font-weight:900!important;letter-spacing:.11em!important}
.portal-system-v2 .admin-organized-nav .admin-nav-section{border-color:#343434!important}
.portal-system-v2 .admin-organized-nav summary{
  min-height:48px!important;
  border:1px solid transparent!important;
  background:#090909!important;
  color:#fff!important;
  padding:10px 11px!important;
  font-size:.9rem!important;
}
.portal-system-v2 .admin-organized-nav summary:hover,
.portal-system-v2 .admin-organized-nav details[open]>summary{background:#1d1d1d!important;border-color:#3b3b3b!important}
.portal-system-v2 .portal-nav a{
  display:flex!important;
  align-items:center!important;
  min-height:46px!important;
  border:1px solid transparent!important;
  background:transparent!important;
  color:#eee!important;
  padding:10px 11px!important;
  font-size:.9rem!important;
  line-height:1.25!important;
}
.portal-system-v2 .portal-nav a>i:first-child{
  display:grid!important;
  width:28px!important;
  height:28px!important;
  flex:0 0 28px!important;
  place-items:center!important;
  color:#fff!important;
}
.portal-system-v2 .portal-nav a:hover{border-color:#444!important;background:#202020!important;color:#fff!important}
.portal-system-v2 .portal-nav a.active{
  border-color:#fff!important;
  background:#fff!important;
  color:#111!important;
  box-shadow:none!important;
}
.portal-system-v2 .portal-nav a.active :is(i,span){color:#111!important}
.portal-system-v2 .portal-nav-current{margin-left:auto!important}
.portal-system-v2 .portal-sidebar-footer{gap:7px!important;border-top:1px solid #444!important;padding:10px 12px!important}
.portal-system-v2 .portal-sidebar-footer a{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-height:44px!important;
  border:1px solid #555!important;
  background:#111!important;
  color:#fff!important;
  font-size:.78rem!important;
}
.portal-system-v2 .portal-sidebar-footer a:hover{border-color:#fff!important;background:#fff!important;color:#111!important}
.portal-system-v2 .portal-menu-search{min-height:46px!important;border:1px solid #777!important;border-radius:0!important;background:#fff!important}
.portal-system-v2 .portal-menu-search input{font-size:.9rem!important;color:#111!important}

/* Utility bar stays compact and does not compete with the page task */
.portal-system-v2 .portal-utility-bar{
  min-height:64px!important;
  border-bottom:1px solid var(--jr-gray-300)!important;
  background:#fff!important;
  padding:10px clamp(14px,2vw,28px)!important;
}
.portal-system-v2 .portal-utility-context span{color:#666!important;font-size:.7rem!important;font-weight:900!important;letter-spacing:.09em!important}
.portal-system-v2 .portal-utility-context b{font-size:1rem!important}
.portal-system-v2 .portal-utility-actions a,
.portal-system-v2 .portal-secure-status{min-height:40px!important;border:1px solid #aaa!important;background:#fff!important;color:#111!important;padding:8px 11px!important}
.portal-system-v2 .portal-utility-actions a:hover{border-color:#111!important;background:#111!important;color:#fff!important}

/* Shared content surfaces */
.portal-system-v2 :is(.card,.table-card,.dashboard-card,.stat-card){
  border:1px solid var(--jr-gray-300)!important;
  border-radius:0!important;
  background:#fff!important;
  color:#111!important;
  box-shadow:4px 4px 0 rgba(0,0,0,.14)!important;
}
.portal-system-v2 :is(.card-header,.card-footer){border-color:var(--jr-gray-300)!important;background:#fff!important;color:#111!important}
.portal-system-v2 hr{border-color:var(--jr-gray-300);opacity:1}
.portal-system-v2 .alert{
  display:flex;
  align-items:flex-start;
  gap:10px;
  border:2px solid currentColor!important;
  border-radius:0!important;
  padding:13px 15px!important;
  font-size:.9rem!important;
}
.portal-system-v2 .alert-danger{background:#fff1f1!important;color:#780000!important}
.portal-system-v2 .alert-warning{background:#fff7dc!important;color:#674500!important}
.portal-system-v2 .alert-success{background:#edf9f1!important;color:#104d2a!important}
.portal-system-v2 .alert-info{background:#f2f2f2!important;color:#111!important}
.portal-system-v2 .badge{border-radius:0!important;font-size:.72rem!important;line-height:1.25!important;padding:.4rem .55rem!important}

/* Every form uses the same rhythm, control size, and contrast */
.portal-system-v2 form{min-width:0}
.portal-system-v2 .row{--bs-gutter-x:1rem;--bs-gutter-y:1rem}
.portal-system-v2 .row>[class*="col-"]{min-width:0}
.portal-system-v2 :is(label,.form-label){color:#111;font-size:.875rem;font-weight:800;line-height:1.35}
.portal-system-v2 label:has(>.form-control),
.portal-system-v2 label:has(>.form-select),
.portal-system-v2 label:has(>textarea){display:flex;min-width:0;flex-direction:column;gap:7px}
.portal-system-v2 :is(.form-control,.form-select){
  width:100%;
  min-height:var(--jr-control-height);
  border:1.5px solid #777!important;
  border-radius:0!important;
  background:#fff!important;
  color:#111!important;
  box-shadow:none!important;
  padding:.7rem .8rem!important;
  font-size:1rem!important;
  line-height:1.35!important;
}
.portal-system-v2 textarea.form-control{min-height:104px;resize:vertical}
.portal-system-v2 :is(.form-control,.form-select)::placeholder{color:#686868!important;opacity:1}
.portal-system-v2 :is(.form-control,.form-select):focus{border-color:#111!important;box-shadow:0 0 0 3px rgba(0,0,0,.14)!important}
.portal-system-v2 :is(.form-control,.form-select):disabled,
.portal-system-v2 :is(.form-control,.form-select)[readonly]{background:#e8e8e4!important;color:#4b4b4b!important;opacity:1!important}
.portal-system-v2 .input-group{min-width:0;align-items:stretch}
.portal-system-v2 .input-group-text{
  min-width:46px;
  min-height:var(--jr-control-height);
  justify-content:center;
  border:1.5px solid #111!important;
  border-radius:0!important;
  background:#111!important;
  color:#fff!important;
  font-weight:900;
}
.portal-system-v2 .input-group>.form-control,
.portal-system-v2 .input-group>.form-select{min-width:0}
.portal-system-v2 .form-check{display:flex;align-items:flex-start;gap:9px;min-height:28px}
.portal-system-v2 .form-check-input{
  width:20px!important;
  height:20px!important;
  flex:0 0 20px!important;
  margin:.1rem 0 0!important;
  border:2px solid #555!important;
  border-radius:0!important;
}
.portal-system-v2 .form-check-input:checked{border-color:#111!important;background-color:#111!important}
.portal-system-v2 .form-text,
.portal-system-v2 label>small,
.portal-system-v2 .modal-body small{color:#5c5c5c;font-size:.78rem;line-height:1.45}
.portal-system-v2 .is-invalid,
.portal-system-v2 .was-validated :is(.form-control,.form-select):invalid{border-color:var(--jr-danger)!important}
.portal-system-v2 .invalid-feedback{color:#8b0000!important;font-size:.8rem!important;font-weight:700!important}

/* Buttons are balanced and retain clear primary/secondary meaning */
.portal-system-v2 .btn{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:.5rem!important;
  min-height:44px!important;
  border-width:1.5px!important;
  border-radius:0!important;
  padding:.65rem .95rem!important;
  font-size:.875rem!important;
  font-weight:850!important;
  line-height:1.2!important;
  white-space:normal;
}
.portal-system-v2 .btn-sm{min-height:38px!important;padding:.5rem .7rem!important;font-size:.8rem!important}
/* Preserve Bootstrap visibility utilities. The global button display rule above
   must never make wizard actions visible before their step is active. */
.portal-system-v2 .d-none{display:none!important}

/* Shared intake history check: repair, warranty, and purchased-phone records. */
.device-history-check{grid-column:1/-1;border:2px solid #111;background:#fff;margin:.35rem 0;padding:0}
.device-history-check>header{display:flex;align-items:center;gap:.9rem;padding:1rem 1.1rem;background:#111;color:#fff}
.device-history-check>header>span{display:grid;place-items:center;flex:0 0 46px;width:46px;height:46px;background:#fff;color:#111;font-size:1.25rem}
.device-history-check>header small{display:block;font-size:.64rem;font-weight:900;letter-spacing:.14em}
.device-history-check>header h3{margin:.12rem 0;font-size:1.08rem;color:#fff}
.device-history-check>header p{margin:0;color:#ddd;font-size:.82rem}
.device-history-questions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1px;background:#bbb}
.device-history-questions>article{display:flex;flex-direction:column;gap:.85rem;background:#fff;padding:1rem}
.device-history-question{display:flex;gap:.7rem;align-items:flex-start;min-height:68px}
.device-history-question>i{display:grid;place-items:center;flex:0 0 38px;width:38px;height:38px;border:1px solid #111;color:#111}
.device-history-question span{display:flex;flex-direction:column;gap:.2rem}
.device-history-question b{font-size:.88rem;line-height:1.25;color:#111}
.device-history-question small{font-size:.72rem;line-height:1.35;color:#606060}
.device-history-options{display:grid;grid-template-columns:repeat(3,1fr);gap:.35rem;margin-top:auto}
.device-history-options label{margin:0;cursor:pointer}
.device-history-options input{position:absolute;opacity:0;pointer-events:none}
.device-history-options span{display:flex;align-items:center;justify-content:center;gap:.32rem;min-height:42px;border:1px solid #111;background:#fff;color:#111;font-size:.72rem;font-weight:900;text-transform:uppercase}
.device-history-options input:checked+span{background:#111;color:#fff;box-shadow:3px 3px 0 #aaa}
.device-history-options input:focus-visible+span{outline:3px solid #777;outline-offset:2px}
.device-history-notes{display:grid;grid-template-columns:minmax(220px,.7fr) minmax(0,1.3fr);gap:1rem;align-items:center;padding:1rem 1.1rem;border-top:1px solid #bbb;margin:0}
.device-history-notes>span{display:flex;flex-direction:column;gap:.2rem}.device-history-notes b{color:#111}.device-history-notes small{color:#666;font-size:.74rem;line-height:1.4}
.device-history-notes textarea{border-radius:0;min-height:88px}
@media(max-width:900px){.device-history-questions{grid-template-columns:1fr}.device-history-question{min-height:0}.device-history-notes{grid-template-columns:1fr}}
.portal-system-v2 .btn-lg{min-height:52px!important;padding:.8rem 1.1rem!important;font-size:1rem!important}
.portal-system-v2 .btn-dark,
.portal-system-v2 .btn-primary{border-color:#111!important;background:#111!important;color:#fff!important}
.portal-system-v2 :is(.btn-dark,.btn-primary):hover{border-color:#333!important;background:#333!important;color:#fff!important}
.portal-system-v2 .btn-outline-dark{border-color:#111!important;background:#fff!important;color:#111!important}
.portal-system-v2 .btn-outline-dark:hover{background:#111!important;color:#fff!important}
.portal-system-v2 .btn-light{border-color:#111!important;background:#fff!important;color:#111!important}
.portal-system-v2 .btn-outline-light{border-color:#111!important;background:#fff!important;color:#111!important}
.portal-system-v2 .btn-danger,
.portal-system-v2 .btn-outline-danger{border-color:var(--jr-danger)!important}
.portal-system-v2 .btn-outline-danger{background:#fff!important;color:var(--jr-danger)!important}
.portal-system-v2 .btn-outline-danger:hover{background:var(--jr-danger)!important;color:#fff!important}
.portal-system-v2 .btn:disabled{cursor:not-allowed!important;opacity:.52!important}
.portal-system-v2 :is(.d-flex,.modal-footer,.card-footer):has(>.btn){row-gap:8px}

/* Tables and pagination */
.portal-system-v2 .table-responsive{min-width:0;border:1px solid var(--jr-gray-300);background:#fff}
.portal-system-v2 .table{width:100%;margin:0;color:#111;vertical-align:middle}
.portal-system-v2 .table thead th{
  border-color:#333!important;
  background:#191919!important;
  color:#fff!important;
  padding:.8rem!important;
  font-size:.75rem!important;
  font-weight:900!important;
  letter-spacing:.045em;
  vertical-align:middle;
  white-space:nowrap;
}
.portal-system-v2 .table tbody td{border-color:#d6d6d1!important;padding:.8rem!important;font-size:.875rem;vertical-align:middle}
.portal-system-v2 .table tbody tr:hover>*{background:#f6f6f3!important;color:#111!important}
.portal-system-v2 .pagination{flex-wrap:wrap;gap:5px;margin-bottom:0}
.portal-system-v2 .page-link{
  display:grid;
  min-width:42px;
  min-height:42px;
  place-items:center;
  border:1px solid #777!important;
  border-radius:0!important;
  background:#fff!important;
  color:#111!important;
  font-weight:800;
}
.portal-system-v2 .page-item.active .page-link{border-color:#111!important;background:#111!important;color:#fff!important}

/* Tabs and dropdowns */
.portal-system-v2 :is(.nav-tabs,.nav-pills){gap:5px;border-color:#aaa}
.portal-system-v2 :is(.nav-tabs,.nav-pills) .nav-link{
  min-height:44px;
  border:1px solid #999!important;
  border-radius:0!important;
  background:#fff!important;
  color:#111!important;
  padding:.65rem .85rem;
  font-size:.875rem;
  font-weight:800;
}
.portal-system-v2 :is(.nav-tabs,.nav-pills) .nav-link.active{border-color:#111!important;background:#111!important;color:#fff!important}
.portal-system-v2 .dropdown-menu{border:1.5px solid #111!important;border-radius:0!important;background:#fff!important;color:#111!important;box-shadow:5px 5px 0 rgba(0,0,0,.2)!important;padding:6px!important}
.portal-system-v2 .dropdown-item{display:flex;align-items:center;gap:9px;min-height:42px;color:#111!important;font-size:.875rem}
.portal-system-v2 .dropdown-item:hover,
.portal-system-v2 .dropdown-item:focus{background:#111!important;color:#fff!important}

/* Toolbars must respond to the workspace width, not only the browser width. */
.portal-system-v2 .accessory-shop-toolbar{
  grid-template-columns:minmax(220px,1fr) repeat(3,minmax(130px,.55fr)) auto!important;
  align-items:stretch!important;
}
.portal-system-v2 .accessory-shop-toolbar>*{min-width:0}
.portal-system-v2 .accessory-shop-toolbar>.btn{height:100%;min-width:132px}

/* Modal system: fixed header/footer, scrollable body, errors stay readable */
.portal-system-v2 .modal{--bs-modal-margin:12px}
.portal-system-v2 .modal-dialog{width:min(760px,calc(100vw - 24px));max-width:none;margin:12px auto!important}
.portal-system-v2 .modal-lg{width:min(980px,calc(100vw - 24px))}
.portal-system-v2 .modal-xl{width:min(1280px,calc(100vw - 24px))}
.portal-system-v2 .modal-content{
  display:flex!important;
  max-height:calc(100dvh - 24px)!important;
  min-height:0!important;
  overflow:hidden!important;
  border:2px solid #111!important;
  border-radius:0!important;
  background:#fff!important;
  color:#111!important;
  box-shadow:8px 8px 0 rgba(0,0,0,.3)!important;
}
.portal-system-v2 .modal-content>form{display:flex;min-height:0;flex:1 1 auto;flex-direction:column;overflow:hidden}
.portal-system-v2 .modal-header{
  display:flex!important;
  flex:0 0 auto!important;
  align-items:center!important;
  gap:14px!important;
  min-height:76px;
  border-bottom:2px solid #111!important;
  background:#111!important;
  color:#fff!important;
  padding:15px 18px!important;
}
.portal-system-v2 .modal-header>div,
.portal-system-v2 .modal-header>span{min-width:0}
.portal-system-v2 .modal-header small{display:block;color:#ccc!important;font-size:.7rem!important;font-weight:900!important;letter-spacing:.1em!important}
.portal-system-v2 .modal-header :is(h1,h2,h3,.modal-title){margin:2px 0!important;color:#fff!important;font-size:clamp(1.2rem,2.1vw,1.65rem)!important;font-weight:900!important;line-height:1.12!important}
.portal-system-v2 .modal-header p{margin:3px 0 0!important;color:#d2d2d2!important;font-size:.84rem!important;line-height:1.4!important}
.portal-system-v2 .modal-header .btn-close{
  width:42px!important;
  height:42px!important;
  flex:0 0 42px!important;
  margin:0 0 0 auto!important;
  border:1px solid #777!important;
  border-radius:0!important;
  background-color:transparent!important;
  filter:invert(1)!important;
  opacity:1!important;
}
.portal-system-v2 .modal-body{
  flex:1 1 auto!important;
  min-height:0!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
  overscroll-behavior:contain;
  background:#f4f4f1!important;
  color:#111!important;
  padding:20px 20px 32px!important;
}
.portal-system-v2 .modal-body>:last-child{margin-bottom:0!important}
.portal-system-v2 .modal-footer{
  display:flex!important;
  flex:0 0 auto!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:8px!important;
  min-height:68px;
  border-top:2px solid #111!important;
  background:#fff!important;
  color:#111!important;
  padding:11px 16px!important;
}
.portal-system-v2 .modal-footer>span:first-child{min-width:180px;margin-right:auto!important;color:#4f4f4f!important;font-size:.8rem!important}
.portal-system-v2 .modal-backdrop.show{opacity:.62}
.portal-system-v2 .modal :is(.modal-field-errors,.alert-danger){scroll-margin-top:12px}

/* Queue handover is one continuous workflow. The outer modal surface scrolls,
   never a small card inside another scrolling layer. */
.portal-system-v2 .queue-phone-assignment-modal{overflow-x:hidden!important;overflow-y:auto!important}
.portal-system-v2 .queue-phone-assignment-modal .queue-assignment-dialog{min-height:0!important;margin-top:18px!important;margin-bottom:28px!important}
.portal-system-v2 .queue-phone-assignment-modal .modal-content{max-height:none!important;overflow:visible!important}
.portal-system-v2 .queue-phone-assignment-modal .modal-content>form{display:block!important;overflow:visible!important}
.portal-system-v2 .queue-phone-assignment-modal .modal-body{min-height:auto!important;max-height:none!important;overflow:visible!important}
.portal-system-v2 .queue-phone-assignment-modal .modal-footer{position:static!important}

/* The guided Repair quotation is embedded in the page, not used as a
   viewport-sized modal. Let the document own the only vertical scrollbar so
   every service field and action remains reachable without a nested scroller. */
.portal-system-v2 .repair-guided-host{
  min-height:0;
  overflow:visible!important;
  padding-bottom:48px;
}
.portal-system-v2 .repair-guided-inline-modal,
.portal-system-v2 .repair-guided-inline-modal .modal-dialog,
.portal-system-v2 .repair-guided-inline-modal .modal-content{
  height:auto!important;
  max-height:none!important;
  overflow:visible!important;
}
.portal-system-v2 .repair-guided-inline-modal .modal-content>form{
  display:block!important;
  height:auto!important;
  max-height:none!important;
  overflow:visible!important;
}
.portal-system-v2 .repair-guided-inline-modal .modal-body,
.portal-system-v2 .repair-guided-inline-modal .quote-wizard-body,
.portal-system-v2 .repair-guided-inline-modal .quote-catalog-list{
  height:auto!important;
  max-height:none!important;
  overflow-x:visible!important;
  overflow-y:visible!important;
  overscroll-behavior:auto!important;
  scrollbar-gutter:auto!important;
}
.portal-system-v2 .repair-guided-inline-modal .quote-wizard-footer{
  position:static!important;
  inset:auto!important;
  width:auto!important;
  box-shadow:none!important;
}
.portal-system-v2 .repair-guided-inline-modal .quote-service-step{
  padding-bottom:16px!important;
}

/* Repair-card action menus must stay above the cards that follow them.
   The generic card hover transform creates a stacking context, so keep sales
   cards flat and elevate only the card whose More menu is open. */
.portal-system-v2 .job-order-list{
  isolation:isolate;
  overflow:visible!important;
}
.portal-system-v2 .sales-repair-card{
  position:relative;
  z-index:1;
  overflow:visible!important;
}
.portal-system-v2 .sales-repair-card:hover{
  z-index:2;
  transform:none!important;
}
.portal-system-v2 .sales-repair-card:has(.sales-repair-more .dropdown-menu.show){
  z-index:1200!important;
  transform:none!important;
}
.portal-system-v2 .sales-repair-more:has(.dropdown-menu.show){z-index:1201}
.portal-system-v2 .sales-repair-more .dropdown-menu.show{z-index:1202!important}

/* Login and first-password portal surfaces */
.public-site .portal-login-page,
.public-site .first-password-page{font-size:16px;color:#111}
.public-site :is(.portal-login-page,.first-password-page,.portal-forgot-modal) :is(.form-control,.form-select){
  min-height:48px;
  border:1.5px solid #777!important;
  border-radius:0!important;
  background:#fff!important;
  color:#111!important;
  font-size:1rem!important;
}
.public-site :is(.portal-login-page,.first-password-page,.portal-forgot-modal) :is(.form-control,.form-select):focus{border-color:#111!important;box-shadow:0 0 0 3px rgba(0,0,0,.14)!important}
.public-site .portal-login-input>i,
.public-site .first-password-input>i{color:#111!important}
.public-site .portal-login-card,
.public-site .first-password-card{border-radius:0!important;box-shadow:7px 7px 0 rgba(0,0,0,.22)!important}

@media(max-width:1199.98px){
  .portal-system-v2 .portal-mobile-header{min-height:62px;border-bottom:1px solid #333;background:#090909;color:#fff}
  .portal-system-v2 .portal-sidebar{width:min(330px,88vw)!important}
  .portal-system-v2 .portal-view-frame{padding-bottom:28px}
  .portal-system-v2 .portal-utility-bar{display:none!important}
  .portal-system-v2 .portal-view-frame :is(.container,.container-fluid){padding-inline:14px!important}
}

/* Balanced listing controls when a live iPhone can also be unlisted. */
.portal-system-v2 .admin-phone-product>footer:has(.admin-phone-unlist){
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
}
.portal-system-v2 .admin-phone-product>footer:has(.admin-phone-unlist) .btn,
.portal-system-v2 .phone-work-card footer:has(.phone-work-unlist) .btn{width:100%;min-width:0}
.portal-system-v2 .phone-work-card footer:has(.phone-work-unlist){
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
}
.portal-system-v2 .phone-work-card footer:has(.phone-work-unlist)>:first-child{grid-column:1/-1}

@media(max-width:1500px) and (min-width:992px){
  .portal-system-v2 .accessory-shop-toolbar{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .portal-system-v2 .accessory-shop-toolbar .accessory-search{grid-column:1/-1!important}
  .portal-system-v2 .accessory-shop-toolbar>.btn{width:100%;min-width:0}
}

@media(max-width:767.98px){
  .portal-system-v2{font-size:15px}
  .portal-system-v2 .modal-dialog,
  .portal-system-v2 .modal-lg,
  .portal-system-v2 .modal-xl{width:calc(100vw - 12px)!important;margin:6px!important}
  .portal-system-v2 .modal-content{max-height:calc(100dvh - 12px)!important;box-shadow:none!important}
  .portal-system-v2 .modal-header{min-height:68px;padding:12px 13px!important}
  .portal-system-v2 .modal-header .btn-close{width:38px!important;height:38px!important;flex-basis:38px!important}
  .portal-system-v2 .modal-body{padding:14px 12px 28px!important}
  .portal-system-v2 .modal-footer{display:grid!important;grid-template-columns:1fr 1fr!important;padding:10px 12px!important}
  .portal-system-v2 .modal-footer>span:first-child{grid-column:1/-1;min-width:0;margin:0!important}
  .portal-system-v2 .modal-footer>.btn:only-child,
  .portal-system-v2 .modal-footer>.btn:last-child:nth-child(odd){grid-column:1/-1}
  .portal-system-v2 .modal-footer .btn{width:100%!important}
  .portal-system-v2 .queue-phone-assignment-modal .queue-assignment-dialog{margin:6px!important}
  .portal-system-v2 .table thead th,
  .portal-system-v2 .table tbody td{padding:.65rem!important}
  .portal-system-v2 :is(.nav-tabs,.nav-pills){flex-wrap:nowrap;overflow-x:auto;padding-bottom:4px}
  .portal-system-v2 :is(.nav-tabs,.nav-pills) .nav-link{white-space:nowrap}
  .portal-system-v2 .accessory-shop-toolbar{grid-template-columns:1fr!important}
  .portal-system-v2 .accessory-shop-toolbar .accessory-search{grid-column:auto!important}
  .portal-system-v2 .admin-phone-product>footer:has(.admin-phone-unlist),
  .portal-system-v2 .phone-work-card footer:has(.phone-work-unlist){grid-template-columns:1fr!important}
  .portal-system-v2 .phone-work-card footer:has(.phone-work-unlist)>:first-child{grid-column:auto}
}

@media(max-width:480px){
  .portal-system-v2 .modal-footer{grid-template-columns:1fr!important}
  .portal-system-v2 .modal-footer>*{grid-column:1!important}
  .portal-system-v2 .btn{min-height:46px!important}
}

@media(prefers-reduced-motion:reduce){
  .portal-system-v2 *,
  .portal-system-v2 *::before,
  .portal-system-v2 *::after{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}
}
/* Portal-wide SweetAlert field validation: high-contrast and consistent with the portal. */
.swal2-container.portal-swal-container{z-index:20050!important;padding:18px!important;background:rgba(0,0,0,.62)!important}
.portal-swal-popup{width:min(560px,calc(100vw - 28px))!important;border:3px solid #111!important;border-radius:0!important;background:#fff!important;color:#111!important;box-shadow:10px 10px 0 #111!important;padding:24px!important;font-family:Arial,Helvetica,sans-serif!important}
.portal-swal-popup .swal2-icon{margin:4px auto 14px!important;border-color:#111!important;color:#111!important}
.portal-swal-title{padding:0!important;color:#111!important;font-size:clamp(24px,4vw,34px)!important;font-weight:950!important;line-height:1.08!important}
.portal-swal-content{margin:14px 0 0!important;padding:0!important;color:#111!important;text-align:left!important}
.portal-swal-error-copy>p{margin:0 0 12px;color:#444;font-size:15px;line-height:1.5}
.portal-swal-error-copy>ul{display:grid;gap:8px;margin:0;padding:0;list-style:none}
.portal-swal-error-copy li{position:relative;border-left:5px solid #111;background:#f1f1ee;padding:11px 12px 11px 38px;color:#111;font-size:14px;font-weight:800;line-height:1.4}
.portal-swal-error-copy li:before{content:"!";position:absolute;left:13px;top:10px;display:grid;width:18px;height:18px;place-items:center;background:#111;color:#fff;font-size:11px;font-weight:950}
.portal-swal-popup .swal2-actions{width:100%!important;margin:18px 0 0!important}
.portal-swal-confirm{width:100%;min-height:52px;border:2px solid #111;border-radius:0;background:#111;color:#fff;padding:12px 18px;font-size:14px;font-weight:950;text-transform:uppercase;letter-spacing:.03em}
.portal-swal-confirm:hover,.portal-swal-confirm:focus{background:#fff;color:#111;outline:3px solid #111;outline-offset:3px}
@media(max-width:600px){.portal-swal-popup{padding:19px!important;box-shadow:6px 6px 0 #111!important}.portal-swal-title{font-size:25px!important}.portal-swal-error-copy li{font-size:13px}}
/* Technician language control: compact, high-contrast, and available on desktop or mobile. */
.technician-language-switcher{display:inline-flex;align-items:center;gap:4px;border:1px solid #111;background:#fff;padding:3px;margin:0}
.technician-language-switcher>i{display:grid;place-items:center;width:30px;height:30px;color:#111}
.technician-language-switcher button{border:0;background:#fff;color:#111;min-width:38px;height:30px;padding:0 9px;font-size:12px;font-weight:900;letter-spacing:.06em}
.technician-language-switcher button:hover,.technician-language-switcher button:focus-visible{outline:2px solid #111;outline-offset:-2px}
.technician-language-switcher button.active{background:#111;color:#fff}
.sidebar-language-switcher{display:none;margin:12px 0 4px;padding:10px;border-color:#555;background:#080808;color:#fff;align-items:stretch;flex-direction:column;gap:8px}
.sidebar-language-switcher>span{display:flex;align-items:center;gap:8px;font-size:10px;letter-spacing:.12em}
.sidebar-language-switcher>span i{font-size:16px}
.sidebar-language-switcher>div{display:grid;grid-template-columns:1fr 1fr;gap:5px}
.sidebar-language-switcher button{height:38px;border:1px solid #777;background:#111;color:#fff}
.sidebar-language-switcher button.active{background:#fff;color:#111;border-color:#fff}
@media(max-width:1199.98px){.portal-utility-actions>.technician-language-switcher{display:none}.sidebar-language-switcher{display:flex}}

/* One mobile drawer scroller. Avoid competing calculated heights and nested
   momentum scrolling when the phone's browser toolbar changes height. */
@media(max-width:1199.98px){
  .portal-system-v2 #portalSidebar{
    display:flex!important;
    flex-direction:column;
    height:100vh;
    height:100dvh;
    max-height:100%;
    overflow:hidden;
    z-index:1045;
    transition:none!important;
  }
  .portal-system-v2 #portalSidebar .portal-sidebar-mobile-title{
    flex:0 0 auto;
    min-height:62px;
    padding:12px 16px;
  }
  .portal-system-v2 #portalSidebar .portal-sidebar-mobile-title .btn-close{
    width:44px;height:44px;padding:0;margin:0 0 0 auto;opacity:1;
  }
  .portal-system-v2 #portalSidebar .portal-sidebar-inner{
    flex:1 1 auto;
    height:auto!important;
    min-height:0;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    overscroll-behavior-y:contain;
    -webkit-overflow-scrolling:touch;
    padding-bottom:env(safe-area-inset-bottom,0px)!important;
  }
  .portal-system-v2 #portalSidebar .portal-sidebar-inner>*{flex-shrink:0}
  .portal-system-v2 #portalSidebar .portal-nav{
    flex:0 0 auto!important;
    overflow:visible!important;
    height:auto!important;
  }
  /* Closed drawer descendants must not stay focusable/visible via legacy rules. */
  .portal-system-v2 #portalSidebar:not(.show):not(.showing):not(.hiding){visibility:hidden!important;pointer-events:none}
  .portal-system-v2 #portalSidebar:not(.show):not(.showing):not(.hiding) *{visibility:hidden!important}
  .portal-system-v2>.portal-menu-backdrop{
    position:fixed;inset:0;z-index:1040;display:block;
    width:100%;height:100%;padding:0;margin:0;border:0;border-radius:0;
    background:rgba(0,0,0,.5);box-shadow:none;touch-action:manipulation;
  }
}
@media(min-width:1200px){.portal-system-v2>.portal-menu-backdrop{display:none}}

/* Phone assignment: every editable section belongs to the one modal body. */
.portal-system-v2[data-sample-data-enabled="1"] .portal-mobile-sample-holder{position:static!important;display:flex!important;visibility:visible!important;pointer-events:auto!important;justify-content:flex-end;margin:0 0 14px;padding:0}
.portal-system-v2[data-sample-data-enabled="1"] .portal-mobile-sample-holder .local-sample-fill{position:static!important;display:inline-flex!important;visibility:visible!important;pointer-events:auto!important;min-height:44px;white-space:normal}
.portal-system-v2 .phone-assignment-modal .modal-footer .local-sample-fill{grid-column:1/-1!important}
.portal-system-v2 .phone-assignment-modal .modal-body{padding-bottom:24px!important}
.portal-system-v2 .phone-assignment-modal .assignment-parts-wrapper{margin-top:18px;padding:16px 0 0;min-width:0}
.portal-system-v2 .phone-assignment-modal .phone-assignment-save-note{margin:18px 0 0;font-size:13px;line-height:1.5;color:#555}
.portal-system-v2 .phone-assignment-modal .assignment-exact-part-picker>header small{color:#ddd!important}
.portal-system-v2 .phone-assignment-modal .assignment-part-search input,
.portal-system-v2 .phone-assignment-modal .assignment-exact-part-grid input[type="number"]{
  position:static;opacity:1;pointer-events:auto;min-width:0;
}
.portal-system-v2 .phone-assignment-modal .assignment-part-search input{width:100%}
.portal-system-v2 .phone-assignment-modal :is(.phone-assignment-options,.assignment-part-plan,.assignment-exact-part-grid) label{min-width:0}
.portal-system-v2 .phone-assignment-modal :is(.phone-assignment-options,.assignment-part-plan,.assignment-exact-part-grid) :is(b,small){overflow-wrap:anywhere}
.portal-system-v2 .phone-assignment-modal :is(.phone-assignment-options,.assignment-part-plan,.assignment-exact-part-grid) label>span{
  display:grid!important;grid-template-columns:32px minmax(0,1fr) 22px!important;gap:6px 10px!important;align-items:start!important;text-transform:none!important;
}
.portal-system-v2 .phone-assignment-modal :is(.phone-assignment-options,.assignment-part-plan,.assignment-exact-part-grid) label>span>i{grid-column:1;grid-row:1/3}
.portal-system-v2 .phone-assignment-modal :is(.phone-assignment-options,.assignment-part-plan,.assignment-exact-part-grid) label>span>b{grid-column:2;grid-row:1;font-size:14px!important;line-height:1.4!important}
.portal-system-v2 .phone-assignment-modal :is(.phone-assignment-options,.assignment-part-plan,.assignment-exact-part-grid) label>span>small{grid-column:2;grid-row:2;font-size:12px!important;font-weight:400!important;line-height:1.45!important;color:inherit!important}
.portal-system-v2 .phone-assignment-modal :is(.phone-assignment-options,.assignment-exact-part-grid) label>span>em{grid-column:3;grid-row:1/3}
@media(max-width:575.98px){
  .portal-system-v2 .phone-assignment-modal .modal-dialog{
    width:100%!important;max-width:100%!important;height:100%;min-height:100%;margin:0!important;
  }
  .portal-system-v2 .phone-assignment-modal .modal-content{
    width:100%!important;margin:0!important;height:100vh;height:100dvh;max-height:100vh!important;max-height:100dvh!important;border:0!important;
  }
  .portal-system-v2 .phone-assignment-modal .modal-header{align-items:flex-start!important;gap:8px!important}
  .portal-system-v2 .phone-assignment-modal .modal-header small{font-size:10px!important;letter-spacing:.04em!important}
  .portal-system-v2 .phone-assignment-modal .modal-header p{font-size:12px!important}
  .portal-system-v2 .phone-assignment-modal .modal-body{padding:14px 12px 24px!important;-webkit-overflow-scrolling:touch}
  .portal-system-v2 .phone-assignment-modal :is(.phone-assignment-options,.assignment-part-plan){grid-template-columns:minmax(0,1fr)}
  .portal-system-v2 .phone-assignment-modal :is(.phone-assignment-options,.assignment-part-plan) b{font-size:14px}
  .portal-system-v2 .phone-assignment-modal .assignment-exact-part-picker>.assignment-exact-part-grid{padding:0 10px 12px}
  .portal-system-v2 .phone-assignment-modal .assignment-part-search{margin:10px!important}
  .portal-system-v2 .phone-assignment-modal .modal-footer{
    display:grid!important;grid-template-columns:1fr 2fr!important;gap:8px!important;
    padding:10px 12px calc(10px + env(safe-area-inset-bottom,0px))!important;min-height:0;
  }
  .portal-system-v2 .phone-assignment-modal .modal-footer .btn{
    width:100%;min-width:0;min-height:46px;margin:0!important;padding:10px 8px!important;
    grid-column:auto!important;white-space:normal;font-size:13px!important;line-height:1.35;
  }
}
