/* GotCracked compact desktop / 4:3 POS treatment.
   Targets 1024x768-class touch workstations without collapsing into the
   phone navigation model. Mobile rules remain owned by the existing layers. */

@media (min-width:751px) and (max-width:1120px),
       (min-width:751px) and (max-height:820px) {
  :root{
    --gc-sidebar-desktop:184px;
    --gc-topbar:58px;
  }

  html,body{min-width:0;max-width:100%;overflow-x:clip}
  .app-shell{grid-template-columns:var(--gc-sidebar-desktop) minmax(0,1fr)!important}

  .sidebar{
    width:auto!important;
    height:100dvh;
    padding:10px 8px 9px!important;
    overflow:hidden!important;
  }
  .sidebar .brand{
    height:68px!important;
    min-height:68px!important;
    max-height:68px!important;
    margin:0 6px 5px!important;
    justify-content:center;
  }
  .sidebar .brand-logo{
    width:105px!important;
    max-width:105px!important;
    height:64px!important;
    max-height:64px!important;
    object-fit:contain!important;
  }
  .sidebar nav{
    gap:1px!important;
    padding-top:0!important;
  }
  .sidebar .nav-link{
    min-height:34px;
    padding:7px 8px!important;
    gap:9px!important;
    border-radius:7px;
    font-size:12px;
    line-height:1.12;
  }
  .sidebar .nav-link .nav-icon{
    flex:0 0 15px;
    width:15px;
    transform:scale(.9);
    transform-origin:center;
  }
  .sidebar .nav-link b{
    padding:1px 5px;
    font-size:9px;
  }
  .sidebar-bottom{min-width:0}
  .sidebar .profile{
    margin:5px 4px 0!important;
    padding-top:7px!important;
    gap:5px!important;
  }
  .sidebar .gc-account-identity{
    min-width:0!important;
    padding:4px!important;
  }
  .sidebar .gc-account-identity-copy strong{font-size:11px!important}
  .sidebar .gc-account-identity-copy small{display:none!important}
  .sidebar .avatar{width:29px;height:29px;font-size:9px}
  .sidebar .gc-logout-button{
    min-width:34px!important;
    width:34px!important;
    padding:6px!important;
  }
  .sidebar .gc-logout-button>span:last-child{display:none!important}

  .topbar{
    display:grid!important;
    grid-template-columns:max-content minmax(0,1fr) max-content!important;
    grid-template-rows:var(--gc-topbar)!important;
    height:var(--gc-topbar)!important;
    min-height:var(--gc-topbar)!important;
    padding:0 12px!important;
    gap:7px!important;
  }
  .topbar .mobile-menu{display:none!important}
  .topbar .location{
    grid-column:1!important;
    grid-row:1!important;
    flex:0 0 auto;
    font-size:11px;
    white-space:nowrap;
  }
  .gc-global-search{
    grid-column:2!important;
    grid-row:1!important;
    justify-self:stretch!important;
    flex:1 1 230px!important;
    width:auto!important;
    min-width:170px!important;
    max-width:430px!important;
    margin:0 4px!important;
    height:38px!important;
  }
  .gc-global-search input{height:36px!important;font-size:12px}
  .gc-global-search kbd{display:none!important}
  .top-actions{
    grid-column:3!important;
    grid-row:1!important;
    justify-self:end!important;
    gap:7px!important;
    min-width:0;
  }
  .gc-notification-trigger{width:36px!important;height:36px!important}
  .gc-availability-trigger{
    min-width:0!important;
    max-width:130px;
    min-height:36px!important;
    padding:5px 7px!important;
    gap:6px!important;
  }
  .gc-availability-trigger small,
  .gc-availability-chevron{display:none!important}
  .gc-availability-trigger strong{
    max-width:82px;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    font-size:11px!important;
  }

  .app-shell main>.view,
  .view{
    width:100%;
    max-width:none!important;
    margin:0!important;
    padding:17px 15px 32px!important;
  }
  .page-heading{
    gap:12px!important;
    margin-bottom:15px!important;
    align-items:center!important;
  }
  .page-heading .eyebrow{margin-bottom:4px;font-size:10px}
  .page-heading h1{font-size:23px!important;line-height:1.08}
  .page-heading .primary-button,
  .page-heading .secondary-button{
    min-height:40px;
    padding:9px 12px;
    white-space:nowrap;
  }

  .metrics{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:10px!important;
    margin-bottom:14px!important;
  }
  .metrics article{
    min-height:78px;
    padding:12px 13px!important;
    gap:10px!important;
  }
  .metrics strong{font-size:21px!important}
  .metrics p{font-size:11px!important;margin-bottom:3px!important}
  .metrics small{font-size:10px!important;margin-top:2px!important}
  .metric-icon{width:34px;height:34px;font-size:16px}

  .content-grid{
    grid-template-columns:minmax(0,1fr)!important;
    gap:14px!important;
  }
  .right-column{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:12px!important;
  }
  .card,.empty-card{border-radius:10px}
  .card{padding:14px!important}
  .card-title{margin-bottom:11px!important}
  .card-title h2{font-size:14px}
  .card-title p{font-size:11px}

  #dashboard.active-view{
    gap:12px!important;
  }
  .gc-dashboard-rail{
    position:static!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:10px!important;
    margin-top:12px!important;
  }
  .gc-dashboard-rail-bottom{grid-column:1/-1!important}

  .toolbar{
    gap:8px!important;
    padding-bottom:12px!important;
  }
  .search{min-width:220px!important}
  .search input{font-size:12px}
  .table-wrap{
    max-width:100%;
    overflow:auto;
    overscroll-behavior-inline:contain;
  }
  table{font-size:12px}
  th{padding:9px 8px!important}
  td{padding:11px 8px!important}

  dialog{
    max-height:calc(100dvh - 20px)!important;
    overflow:auto!important;
  }
  .gc-payment-dialog,
  .gc-receipt-dialog{
    width:min(600px,calc(100vw - 18px))!important;
    max-height:calc(100dvh - 18px)!important;
  }

  #settings #gc-payment-settings .gc-pay-settings-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
  #settings #gc-store-hours-form .gc-hours-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
}

/* 768px-tall POS displays need a denser authentication card. */
@media (min-width:541px) and (max-height:820px) {
  .login-screen{
    place-items:center!important;
    padding:10px 12px!important;
  }
  .login-panel{
    width:min(420px,100%)!important;
    padding:22px 30px!important;
    border-radius:18px!important;
  }
  .login-panel .login-logo{
    width:min(190px,60%)!important;
    margin-bottom:13px!important;
  }
  .login-panel .eyebrow{margin-bottom:5px!important;font-size:10px}
  .login-panel h1{font-size:28px!important;line-height:1.05}
  .login-panel .subtle{margin:6px 0 13px!important;font-size:12px}
  .login-panel .provider-button{min-height:38px!important}
  .login-panel .gc-google-gsi-host{min-height:38px!important;margin-bottom:8px!important}
  .login-panel .owner-recovery{margin-top:11px!important}
  .login-panel .owner-recovery[open] summary{margin-bottom:10px!important}
  .login-panel .access-note{
    margin-top:10px!important;
    font-size:11px!important;
    line-height:1.3!important;
  }
  .login-panel .error-message{margin-top:10px!important}
}

/* Very short 4:3 deployments keep all critical sign-in controls visible. */
@media (min-width:541px) and (max-height:700px) {
  .login-panel{padding:16px 26px!important}
  .login-panel .login-logo{width:min(155px,50%)!important;margin-bottom:9px!important}
  .login-panel h1{font-size:24px!important}
  .login-panel .subtle{margin-bottom:9px!important}
  .login-panel .owner-recovery{margin-top:8px!important}
  .login-panel .access-note{margin-top:7px!important}
}


/* Dedicated 1024x768-class counter-terminal layout. Preserve Portal's labeled
   navigation so touch operators can find every permitted workspace. */
@media (min-width:751px) and (max-width:1120px),
       (min-width:751px) and (max-height:820px) {
  html[data-gc-pos-workstation="gotcracked-pos"] .app-shell main>.view,
  html[data-gc-pos-workstation="gotcracked-pos"] .view{
    width:100%!important;
    max-width:none!important;
    margin:0!important;
    padding:12px 14px 24px!important;
  }
  html[data-gc-pos-workstation="gotcracked-pos"] .page-heading{
    min-height:42px;
    display:flex!important;
    flex-direction:row!important;
    align-items:center!important;
    justify-content:space-between!important;
    gap:10px!important;
    margin-bottom:10px!important;
  }
  html[data-gc-pos-workstation="gotcracked-pos"] .page-heading .eyebrow{
    margin-bottom:2px!important;
    font-size:9px!important;
  }
  html[data-gc-pos-workstation="gotcracked-pos"] .page-heading h1{
    font-size:22px!important;
    line-height:1.05!important;
  }
  html[data-gc-pos-workstation="gotcracked-pos"] .page-heading .subtle{
    margin-top:3px!important;
    font-size:10px!important;
  }
  html[data-gc-pos-workstation="gotcracked-pos"] .page-heading .primary-button,
  html[data-gc-pos-workstation="gotcracked-pos"] .page-heading .secondary-button{
    min-height:38px!important;
    padding:8px 11px!important;
  }

  html[data-gc-pos-workstation="gotcracked-pos"] #dashboard .metrics{
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    gap:8px!important;
    margin-bottom:10px!important;
  }
  html[data-gc-pos-workstation="gotcracked-pos"][data-account-type="shared_workstation"] #dashboard .metrics{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
  }
  html[data-gc-pos-workstation="gotcracked-pos"] #dashboard .metrics article{
    min-height:72px!important;
    padding:10px 11px!important;
    gap:8px!important;
  }
  html[data-gc-pos-workstation="gotcracked-pos"] #dashboard .metrics .metric-icon{
    width:32px!important;
    height:32px!important;
    flex:0 0 32px!important;
    font-size:15px!important;
  }
  html[data-gc-pos-workstation="gotcracked-pos"] #dashboard .metrics p{font-size:10px!important}
  html[data-gc-pos-workstation="gotcracked-pos"] #dashboard .metrics strong{font-size:20px!important}
  html[data-gc-pos-workstation="gotcracked-pos"] #dashboard .metrics small{font-size:9px!important}

  html[data-gc-pos-workstation="gotcracked-pos"] .card{padding:12px!important;border-radius:10px!important}
  html[data-gc-pos-workstation="gotcracked-pos"] .card-title{margin-bottom:9px!important}
  html[data-gc-pos-workstation="gotcracked-pos"] .toolbar{
    gap:7px!important;
    padding-bottom:9px!important;
  }
  html[data-gc-pos-workstation="gotcracked-pos"] .toolbar .search{
    min-width:180px!important;
    min-height:36px!important;
    flex:0 1 300px;
    max-width:300px;
  }
  html[data-gc-pos-workstation="gotcracked-pos"] .toolbar select{min-height:36px!important}
  html[data-gc-pos-workstation="gotcracked-pos"] .table-wrap{
    max-width:100%!important;
    overflow:auto!important;
  }
  html[data-gc-pos-workstation="gotcracked-pos"] table{font-size:11px!important}
  html[data-gc-pos-workstation="gotcracked-pos"] th{padding:8px 7px!important;font-size:9px!important}
  html[data-gc-pos-workstation="gotcracked-pos"] td{padding:9px 7px!important;font-size:11px!important}

  html[data-gc-pos-workstation="gotcracked-pos"] .gc-master-directory,
  html[data-gc-pos-workstation="gotcracked-pos"] [data-gc-master-directory]{
    margin-top:0!important;
  }
  html[data-gc-pos-workstation="gotcracked-pos"] .gc-dashboard-rail{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:8px!important;
    margin-top:8px!important;
  }

  html[data-gc-pos-workstation="gotcracked-pos"] .gc-operator-dialog{
    width:min(340px,calc(100vw - 24px))!important;
    max-height:calc(100dvh - 24px)!important;
  }
  html[data-gc-pos-workstation="gotcracked-pos"] .gc-operator-head{padding:14px 16px 11px!important}
  html[data-gc-pos-workstation="gotcracked-pos"] .gc-operator-body{padding:12px 16px 16px!important}
}

/* Keep the complete itemized amount breakdown visible on the counter, even
   when workflow is open. Long descriptions wrap instead of widening the row. */
@media (min-width:751px) and (max-width:1120px) {
  #inventory .gc-inv-commandbar{grid-template-columns:minmax(180px,300px) 180px auto;justify-content:start}
  #work-order .gc-line-table{min-width:0;width:100%;table-layout:fixed;font-size:13px}
  #work-order .gc-line-table :is(th,td){min-width:0;max-width:none;padding:7px 4px!important;white-space:normal;overflow-wrap:anywhere}
  #work-order .gc-line-table td{font-size:13px!important}
  #work-order .gc-line-table :is(th,td):nth-child(1){width:8%}
  #work-order .gc-line-table :is(th,td):nth-child(2){width:24%}
  #work-order .gc-line-table :is(th,td):nth-child(3){width:7%}
  #work-order .gc-line-table :is(th,td):nth-child(4),
  #work-order .gc-line-table :is(th,td):nth-child(5){width:11%}
  #work-order .gc-line-table :is(th,td):nth-child(6),
  #work-order .gc-line-table :is(th,td):nth-child(7){width:12%}
  #work-order .gc-line-table :is(th,td):nth-child(8){width:15%}
  #work-order .gc-line-select-actions-inner{flex-wrap:wrap;gap:4px}
  #work-order .gc-line-table :is(input:not([type="checkbox"]),select){width:100%;min-width:0;max-width:100%}
  #work-order .gc-line-discount-form{min-width:0;padding:4px}
  #work-order .gc-line-table .gc-table-header-sort{white-space:normal;align-items:flex-start}
  #work-order .v1-line-search{max-width:340px}
}


/* Premium counter-terminal finish. Scoped to the dedicated GotCracked POS so
   the normal Portal remains visually and structurally unchanged. */
@media (min-width:751px) and (max-width:1120px),
       (min-width:751px) and (max-height:820px) {
  html[data-gc-pos-workstation="gotcracked-pos"] body{
    background:#07111d;
    -webkit-font-smoothing:antialiased;
    text-rendering:optimizeLegibility;
  }
  html[data-gc-pos-workstation="gotcracked-pos"][data-theme="dark"] .topbar{
    background:rgba(9,22,35,.96)!important;
    border-bottom-color:rgba(116,168,214,.18)!important;
    box-shadow:0 8px 22px rgba(0,0,0,.16);
  }
  html[data-gc-pos-workstation="gotcracked-pos"][data-theme="dark"] .sidebar{
    background:linear-gradient(180deg,#071523 0%,#081827 62%,#07131f 100%)!important;
    border-right:1px solid rgba(91,158,217,.14);
    box-shadow:10px 0 28px rgba(0,0,0,.16);
  }

  html[data-gc-pos-workstation="gotcracked-pos"] .gc-global-search:focus-within{
    border-color:rgba(77,163,255,.65)!important;
    box-shadow:0 0 0 3px rgba(42,142,247,.11),0 5px 14px rgba(0,0,0,.10)!important;
  }
  html[data-gc-pos-workstation="gotcracked-pos"] .gc-operator-pill{
    background:linear-gradient(180deg,rgba(42,142,247,.14),rgba(42,142,247,.075))!important;
  }
  html[data-gc-pos-workstation="gotcracked-pos"] .gc-operator-pill.is-ready{
    border-color:rgba(58,184,137,.34)!important;
    background:linear-gradient(180deg,rgba(35,151,103,.14),rgba(35,151,103,.07))!important;
  }

  html[data-gc-pos-workstation="gotcracked-pos"][data-theme="dark"] :is(.card,.empty-card,#dashboard .metrics article){
    background:linear-gradient(180deg,rgba(18,34,50,.98),rgba(14,29,43,.98))!important;
    border-color:rgba(119,164,205,.20)!important;
    box-shadow:0 8px 24px rgba(0,0,0,.14),inset 0 1px rgba(255,255,255,.018);
  }
  html[data-gc-pos-workstation="gotcracked-pos"] #dashboard .metrics article{
    position:relative;
    overflow:hidden;
    transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease;
  }
  html[data-gc-pos-workstation="gotcracked-pos"] #dashboard .metrics article::after{
    content:"";
    position:absolute;
    left:0;
    right:0;
    bottom:0;
    height:2px;
    background:linear-gradient(90deg,rgba(42,142,247,.95),rgba(67,190,255,.28));
  }
  html[data-gc-pos-workstation="gotcracked-pos"] #dashboard .metrics article:hover{
    transform:translateY(-1px);
    border-color:rgba(91,170,241,.34)!important;
    box-shadow:0 10px 26px rgba(0,0,0,.18)!important;
  }
  html[data-gc-pos-workstation="gotcracked-pos"] #dashboard .metrics strong{
    letter-spacing:-.035em!important;
  }
  html[data-gc-pos-workstation="gotcracked-pos"] .page-heading h1{
    letter-spacing:-.035em!important;
  }
  html[data-gc-pos-workstation="gotcracked-pos"] .page-heading .eyebrow,
  html[data-gc-pos-workstation="gotcracked-pos"] .card .eyebrow{
    color:#67b8ff!important;
    letter-spacing:.11em!important;
  }

  html[data-gc-pos-workstation="gotcracked-pos"] :is(.primary-button,.secondary-button){
    border-radius:9px!important;
    transition:transform .14s ease,box-shadow .14s ease,border-color .14s ease,background-color .14s ease;
  }
  html[data-gc-pos-workstation="gotcracked-pos"] .primary-button{
    box-shadow:0 5px 14px rgba(11,101,200,.22)!important;
  }
  html[data-gc-pos-workstation="gotcracked-pos"] :is(.primary-button,.secondary-button):active{
    transform:translateY(1px);
  }
  html[data-gc-pos-workstation="gotcracked-pos"] :is(button,a,input,select,textarea):focus-visible{
    outline:2px solid #6ec5ff!important;
    outline-offset:2px!important;
  }

  html[data-gc-pos-workstation="gotcracked-pos"] .table-wrap{
    border-radius:10px;
    scrollbar-width:thin;
    scrollbar-color:#3c6689 transparent;
  }
  html[data-gc-pos-workstation="gotcracked-pos"] .table-wrap thead th{
    position:sticky;
    top:0;
    z-index:2;
    backdrop-filter:blur(8px);
  }
  html[data-gc-pos-workstation="gotcracked-pos"][data-theme="dark"] .table-wrap thead th{
    background:rgba(14,29,43,.96)!important;
    border-bottom-color:rgba(120,166,207,.23)!important;
  }
  html[data-gc-pos-workstation="gotcracked-pos"][data-theme="dark"] tbody tr:hover{
    background:rgba(57,132,197,.065)!important;
  }

  html[data-gc-pos-workstation="gotcracked-pos"] #inventory .gc-receive-overview{
    gap:7px!important;
  }
  html[data-gc-pos-workstation="gotcracked-pos"] #inventory .gc-receive-overview>div{
    min-height:62px;
    padding:9px 10px!important;
    border-radius:9px!important;
  }
  html[data-gc-pos-workstation="gotcracked-pos"] #inventory .gc-receive-overview strong{
    font-size:18px!important;
  }
  html[data-gc-pos-workstation="gotcracked-pos"] #inventory .gc-receive-steps{
    gap:7px!important;
  }
  html[data-gc-pos-workstation="gotcracked-pos"] #inventory .gc-receive-step{
    min-height:54px;
    padding:8px 9px!important;
  }
  html[data-gc-pos-workstation="gotcracked-pos"] #inventory .gc-receive-bulk-actions{
    position:sticky;
    top:64px;
    z-index:5;
    padding:9px 10px;
    border:1px solid rgba(113,161,203,.22);
    border-radius:10px;
    background:rgba(11,25,38,.94);
    backdrop-filter:blur(10px);
    box-shadow:0 8px 20px rgba(0,0,0,.14);
  }
  html[data-gc-pos-workstation="gotcracked-pos"] #inventory .gc-receive-row{
    grid-template-columns:26px minmax(0,1fr) 130px 78px 92px!important;
    gap:9px!important;
    padding:11px!important;
    border-radius:10px!important;
    box-shadow:0 4px 14px rgba(0,0,0,.08);
  }
  html[data-gc-pos-workstation="gotcracked-pos"] #inventory .gc-receive-row input[type="number"]{
    min-height:38px!important;
  }
}


/* Final 1024x768 counter-terminal QA: keep support available without covering
   work tables or list rows. */
@media (min-width:751px) and (max-width:1120px),
       (min-width:751px) and (max-height:820px) {
  html[data-gc-pos-workstation="gotcracked-pos"] .gc-marlon-activity-pill{
    display:none!important;
  }
  html[data-gc-pos-workstation="gotcracked-pos"] .gc-marlon{
    right:10px!important;
    bottom:10px!important;
  }
  html[data-gc-pos-workstation="gotcracked-pos"] .gc-marlon-launcher{
    width:42px!important;
    min-width:42px!important;
    height:42px!important;
    padding:0!important;
    border-radius:12px!important;
    font-size:0!important;
    box-shadow:0 8px 20px rgba(0,0,0,.24)!important;
  }
  html[data-gc-pos-workstation="gotcracked-pos"] .gc-marlon-launcher::before,
  html[data-gc-pos-workstation="gotcracked-pos"] .gc-marlon-launcher:not([data-label])::before,
  html[data-gc-pos-workstation="gotcracked-pos"] .gc-marlon-launcher[data-label=""]::before{
    content:"?"!important;
    font-size:20px!important;
    font-weight:900!important;
    line-height:1!important;
  }
  html[data-gc-pos-workstation="gotcracked-pos"] .gc-marlon-panel{
    right:0!important;
    bottom:50px!important;
    width:min(360px,calc(100vw - 98px))!important;
    height:min(590px,calc(100vh - 82px))!important;
  }
}


/* 4:3 inventory fit found during live visual QA. The standard Portal table
   remains unchanged everywhere else. */
@media (min-width:751px) and (max-width:1120px),
       (min-width:751px) and (max-height:820px) {
  html[data-gc-pos-workstation="gotcracked-pos"] #inventory .gc-inv-table:not(.gc-receive-table){
    width:100%!important;
    min-width:760px!important;
    table-layout:fixed!important;
  }
  html[data-gc-pos-workstation="gotcracked-pos"] #inventory .gc-inv-table:not(.gc-receive-table) th,
  html[data-gc-pos-workstation="gotcracked-pos"] #inventory .gc-inv-table:not(.gc-receive-table) td{
    padding-left:6px!important;
    padding-right:6px!important;
  }
  html[data-gc-pos-workstation="gotcracked-pos"] #inventory .gc-inv-table:not(.gc-receive-table) th:nth-child(1){width:30%!important}
  html[data-gc-pos-workstation="gotcracked-pos"] #inventory .gc-inv-table:not(.gc-receive-table) th:nth-child(2){width:17%!important}
  html[data-gc-pos-workstation="gotcracked-pos"] #inventory .gc-inv-table:not(.gc-receive-table) th:nth-child(3){width:12%!important}
  html[data-gc-pos-workstation="gotcracked-pos"] #inventory .gc-inv-table:not(.gc-receive-table) th:nth-child(4){width:11%!important}
  html[data-gc-pos-workstation="gotcracked-pos"] #inventory .gc-inv-table:not(.gc-receive-table) th:nth-child(5){width:10%!important}
  html[data-gc-pos-workstation="gotcracked-pos"] #inventory .gc-inv-table:not(.gc-receive-table) th:nth-child(6){width:10%!important}
  html[data-gc-pos-workstation="gotcracked-pos"] #inventory .gc-inv-table:not(.gc-receive-table) th:nth-child(7){width:10%!important}
}

/* 1024x768 POS density: keep operational tables scan-friendly without
   swallowing the viewport with long issue/lead summaries. Full details remain
   available by opening the row. */
@media (min-width:751px) and (max-width:1120px),
       (min-width:751px) and (max-height:820px) {
  :is(html[data-gc-pos-workstation="gotcracked-pos"],html.gc-pos-shared) :is(#repairs,#leads) .v1-table td{
    padding-top:8px!important;
    padding-bottom:8px!important;
    vertical-align:top!important;
  }
  :is(html[data-gc-pos-workstation="gotcracked-pos"],html.gc-pos-shared) #repairs .v1-table td:nth-child(3) small,
  :is(html[data-gc-pos-workstation="gotcracked-pos"],html.gc-pos-shared) #leads .v1-table td:nth-child(2) small{
    display:-webkit-box!important;
    -webkit-box-orient:vertical;
    -webkit-line-clamp:2;
    line-clamp:2;
    overflow:hidden;
    line-height:1.35;
    max-height:2.7em;
  }
  :is(html[data-gc-pos-workstation="gotcracked-pos"],html.gc-pos-shared) :is(#repairs,#leads) .v1-table td strong{
    line-height:1.25;
  }
}

/* Counter receiving fit and filters. Scanning and stock-commit rules are unchanged. */
#inventory .gc-receive-filters{display:grid;grid-template-columns:minmax(160px,240px) minmax(160px,240px) auto;gap:10px;align-items:end;margin:0 0 8px}
#inventory .gc-receive-filters label{display:grid;gap:5px;font-size:12px;font-weight:650;color:var(--inv-muted)}
#inventory .gc-receive-filters select{width:100%;min-width:0;min-height:42px;padding:8px;border:1px solid var(--inv-line);border-radius:8px;background:var(--inv-surface);color:var(--inv-ink)}
#inventory .gc-receive-filter-note{font-size:11px;line-height:1.4;color:var(--inv-muted);margin:0 0 10px}
@media(min-width:621px) and (max-width:1120px){
 html[data-gc-pos-workstation="gotcracked-pos"] #inventory .gc-csv-receive-card{padding:12px!important;min-width:0}
 html[data-gc-pos-workstation="gotcracked-pos"] #inventory .gc-receive-table{width:100%!important;min-width:0!important;table-layout:fixed!important;font-size:12px}
 html[data-gc-pos-workstation="gotcracked-pos"] #inventory .gc-receive-table :is(th,td){min-width:0!important;overflow-wrap:anywhere;padding:8px 5px}
 html[data-gc-pos-workstation="gotcracked-pos"] #inventory .gc-receive-table th{font-size:10px;letter-spacing:.02em}
 html[data-gc-pos-workstation="gotcracked-pos"] #inventory .gc-receive-table th:nth-child(1){width:22%!important}
 html[data-gc-pos-workstation="gotcracked-pos"] #inventory .gc-receive-table th:nth-child(2){width:13%!important}
 html[data-gc-pos-workstation="gotcracked-pos"] #inventory .gc-receive-table th:nth-child(n+3):nth-child(-n+6){width:8%!important}
 html[data-gc-pos-workstation="gotcracked-pos"] #inventory .gc-receive-table th:nth-child(7){width:11%!important}
 html[data-gc-pos-workstation="gotcracked-pos"] #inventory .gc-receive-table th:nth-child(8){width:22%!important}
 html[data-gc-pos-workstation="gotcracked-pos"] #inventory .gc-receive-table code{word-break:break-all;font-size:11px}
 html[data-gc-pos-workstation="gotcracked-pos"] #inventory .gc-receive-table .gc-stock-pill{white-space:normal;font-size:10px}
 html[data-gc-pos-workstation="gotcracked-pos"] #inventory .gc-receive-order-head{flex-wrap:wrap;padding:10px}
 html[data-gc-pos-workstation="gotcracked-pos"] #inventory .gc-receive-order-head>div{min-width:0;flex:1 1 220px}
}
@media(max-width:620px){#inventory .gc-receive-filters{grid-template-columns:1fr}}

@media(min-width:621px){
 #inventory .gc-receive-toolbar .search{flex:0 1 320px;max-width:320px}
 #inventory .gc-receive-filters{justify-content:start}
 #inventory .gc-receive-table .gc-table-header-sort{gap:2px;white-space:nowrap;overflow-wrap:normal}
 #inventory .gc-receive-scanner-dock{padding:10px 12px;grid-template-columns:minmax(0,1fr) minmax(240px,300px)}
 #inventory .gc-receive-scanner-field input{min-height:38px;font-size:13px}
}

@media(min-width:751px){
 #gc-master-directory .gc-dir-search-row{display:flex;justify-content:flex-start}
 #gc-master-directory .gc-dir-search{flex:0 1 340px;max-width:340px}
}

/* Small counter displays use the same Portal, with less surrounding chrome.
   Keep every navigation label, filter, action and status available. */
@media (min-width:751px) and (max-width:1120px) {

  html[data-gc-pos-workstation="gotcracked-pos"] .app-shell{grid-template-columns:164px minmax(0,1fr)!important}




  html[data-gc-pos-workstation="gotcracked-pos"] :is(#price-book,#settings) .page-heading{margin-bottom:8px!important}

  html[data-gc-pos-workstation="gotcracked-pos"] #price-book :is(.gc-pb-context,.gc-pb-sync){gap:10px;padding:8px 10px;margin-bottom:8px;border-radius:9px}
  html[data-gc-pos-workstation="gotcracked-pos"] #price-book .gc-pb-context>div{gap:2px}
  html[data-gc-pos-workstation="gotcracked-pos"] #price-book .gc-pb-context span{font-size:.72rem;line-height:1.3}
  html[data-gc-pos-workstation="gotcracked-pos"] #price-book .gc-pb-sync-copy{gap:2px}
  html[data-gc-pos-workstation="gotcracked-pos"] #price-book .gc-pb-tabs{padding:3px;margin-bottom:8px}
  html[data-gc-pos-workstation="gotcracked-pos"] #price-book .gc-pb-tabs button{min-height:34px;padding:5px 10px}
  html[data-gc-pos-workstation="gotcracked-pos"] #price-book .gc-pb-workspace{padding:10px!important}
  html[data-gc-pos-workstation="gotcracked-pos"] #price-book .gc-pb-subtabs{padding-bottom:6px;margin-bottom:8px}
  html[data-gc-pos-workstation="gotcracked-pos"] #price-book .gc-pb-service-controls{grid-template-columns:minmax(0,1.5fr) minmax(180px,1fr);gap:8px;margin-bottom:8px}
  html[data-gc-pos-workstation="gotcracked-pos"] #price-book .gc-pb-filters{gap:6px}
  html[data-gc-pos-workstation="gotcracked-pos"] #price-book :is(.gc-pb-filters label,.gc-pb-search){gap:3px}
  html[data-gc-pos-workstation="gotcracked-pos"] #price-book :is(.gc-pb-filters select,.gc-pb-search input){min-height:36px;padding:6px 8px}
  html[data-gc-pos-workstation="gotcracked-pos"] #price-book .gc-table-toolbar{gap:6px 10px;padding:7px 9px;margin-bottom:7px}
  html[data-gc-pos-workstation="gotcracked-pos"] #price-book .gc-table-paging{flex:1 1 auto;gap:6px}
  html[data-gc-pos-workstation="gotcracked-pos"] #price-book .gc-table-toolbar-title{font-size:.75rem}
  html[data-gc-pos-workstation="gotcracked-pos"] #price-book .gc-pb-table{min-width:760px}
  html[data-gc-pos-workstation="gotcracked-pos"] #price-book .gc-pb-table :is(th,td){padding:7px 7px}
  html[data-gc-pos-workstation="gotcracked-pos"] #price-book .gc-pb-table td:first-child{min-width:150px}
  html[data-gc-pos-workstation="gotcracked-pos"] #price-book .gc-pb-device-prices{min-width:210px}
  html[data-gc-pos-workstation="gotcracked-pos"] #price-book .gc-pb-device-table td{vertical-align:top}
  html[data-gc-pos-workstation="gotcracked-pos"] #price-book .gc-table-header-sort{min-height:25px}
  html[data-gc-pos-workstation="gotcracked-pos"] #price-book .gc-pb-part-controls{grid-template-columns:minmax(160px,1fr) auto auto;gap:8px}

  html[data-gc-pos-workstation="gotcracked-pos"] #settings .gc-settings-command-tabs{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:thin;gap:3px;margin-bottom:8px}
  html[data-gc-pos-workstation="gotcracked-pos"] #settings .gc-settings-command-tabs button{flex:none;min-height:38px;padding:7px 10px}
  html[data-gc-pos-workstation="gotcracked-pos"] #settings .settings-list>label{gap:12px;padding:8px 0}
  html[data-gc-pos-workstation="gotcracked-pos"] #settings .settings-list>label>:is(input,select,textarea){width:min(380px,100%)!important;min-width:0}
  html[data-gc-pos-workstation="gotcracked-pos"] #settings #gc-store-hours-form .gc-hours-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media (min-width:951px) and (max-width:1120px) {
  html[data-gc-pos-workstation="gotcracked-pos"] #settings #gc-store-hours-form .gc-hours-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  html[data-gc-pos-workstation="gotcracked-pos"] #settings #gc-store-hours-form input[type="time"]{font-size:12px;padding:6px}
  html[data-gc-pos-workstation="gotcracked-pos"] #price-book .gc-table-toolbar{gap:6px}
  html[data-gc-pos-workstation="gotcracked-pos"] #price-book .gc-table-toolbar-main{flex:0 0 78px;margin-right:0}
  html[data-gc-pos-workstation="gotcracked-pos"] #price-book .gc-table-sort-select{gap:5px}
  html[data-gc-pos-workstation="gotcracked-pos"] #price-book .gc-table-sort-select select{width:128px;max-width:128px}
  html[data-gc-pos-workstation="gotcracked-pos"] #price-book .gc-table-columns>summary{padding-inline:8px}
  html[data-gc-pos-workstation="gotcracked-pos"] #price-book .gc-table-columns>summary::after{margin-left:0}
  html[data-gc-pos-workstation="gotcracked-pos"] #price-book .gc-table-clear{padding-inline:7px}
  html[data-gc-pos-workstation="gotcracked-pos"] #price-book .gc-table-paging{gap:4px;font-size:11px;white-space:nowrap}
  html[data-gc-pos-workstation="gotcracked-pos"] #price-book .gc-table-paging button{padding-inline:7px}
}

/* Chrome's frame leaves about 580 CSS pixels on the counter. Arrange the
   existing page tools across the width so rows are visible before scrolling. */
@media (min-width:951px) and (max-width:1120px) and (max-height:640px) {







  html[data-gc-pos-workstation="gotcracked-pos"] #price-book.active-view{display:grid!important;grid-template-columns:minmax(0,1fr) auto;grid-auto-rows:max-content;align-content:start;gap:6px}
  html[data-gc-pos-workstation="gotcracked-pos"] #price-book> :is([data-pb-sync-host],.gc-pb-tabs,.gc-pb-workspace,.gc-pb-quote-lower){grid-column:1/-1;min-width:0;margin:0!important}
  html[data-gc-pos-workstation="gotcracked-pos"] #price-book>.page-heading{grid-column:1;grid-row:1;margin:0!important;min-width:0}
  html[data-gc-pos-workstation="gotcracked-pos"] #price-book>.page-heading .eyebrow{display:none}
  html[data-gc-pos-workstation="gotcracked-pos"] #price-book>.gc-pb-context{grid-column:2;grid-row:1;margin:0;padding:0;border:0;background:transparent}
  html[data-gc-pos-workstation="gotcracked-pos"] #price-book>.gc-pb-context>div{display:none}
  html[data-gc-pos-workstation="gotcracked-pos"] #price-book .gc-pb-context a{padding-inline:10px;font-size:11px;min-height:36px}
  html[data-gc-pos-workstation="gotcracked-pos"] #price-book .gc-pb-sync{margin:0;padding:6px 9px}
  html[data-gc-pos-workstation="gotcracked-pos"] #price-book .gc-pb-workspace{padding:8px!important}
  html[data-gc-pos-workstation="gotcracked-pos"] #price-book .gc-pb-subtabs{margin-bottom:6px;padding-bottom:5px}
  html[data-gc-pos-workstation="gotcracked-pos"] #price-book .gc-pb-filters label{display:flex;align-items:center;gap:4px}
  html[data-gc-pos-workstation="gotcracked-pos"] #price-book .gc-pb-service-controls>.gc-pb-search{display:flex;align-items:center;gap:6px;white-space:nowrap}
  html[data-gc-pos-workstation="gotcracked-pos"] #price-book .gc-pb-service-controls{grid-template-columns:minmax(0,1.55fr) minmax(0,1fr)}
  html[data-gc-pos-workstation="gotcracked-pos"] #price-book .gc-pb-table th{padding-block:4px!important}
  html[data-gc-pos-workstation="gotcracked-pos"] #price-book .gc-table-header-sort{min-height:21px}
  html[data-gc-pos-workstation="gotcracked-pos"] #price-book .gc-column-filter>summary{min-height:24px}
}
@media (min-width:951px) and (max-width:1120px) and (max-height:640px) {
  html[data-gc-pos-workstation="gotcracked-pos"] #price-book .gc-pb-sync-copy{display:block;line-height:1.2}
  html[data-gc-pos-workstation="gotcracked-pos"] #price-book .gc-pb-sync-copy strong{margin-right:8px}
  html[data-gc-pos-workstation="gotcracked-pos"] #price-book .gc-pb-sync-copy small{display:block;font-size:10px;line-height:1.2;margin-top:2px}
  html[data-gc-pos-workstation="gotcracked-pos"] #price-book .gc-table-toolbar{padding-block:4px}
  html[data-gc-pos-workstation="gotcracked-pos"] #price-book .gc-table-header-sort{font-size:10px;line-height:1.1;padding:0;min-height:22px}
  html[data-gc-pos-workstation="gotcracked-pos"] #price-book .gc-column-filter>summary{line-height:1.1}
  html[data-gc-pos-workstation="gotcracked-pos"] #price-book .gc-pb-table td{padding-block:5px!important}
}

/* The narrow workflow drawer shares the corner used by floating support.
   Yield that space while editing, then restore Marlon without losing its draft. */
@media (max-width:1100px) {
  body:has(#work-order.active-view #v1-workorder-layout:not(.drawer-collapsed)) .gc-marlon{
    display:none!important;
  }
}

/* Counter shell contract: one labelled rail at every desktop size, including RDC.
   Mobile navigation and all authentication/permission gates remain unchanged. */
@media (min-width:751px) {
  html[data-gc-pos-workstation="gotcracked-pos"]{--gc-sidebar-desktop:164px;--gc-topbar:56px}
  html[data-gc-pos-workstation="gotcracked-pos"] .app-shell{grid-template-columns:164px minmax(0,1fr)!important;height:100dvh;min-height:0;overflow:hidden}
  html[data-gc-pos-workstation="gotcracked-pos"] .sidebar{display:flex!important;flex-direction:column;width:164px!important;height:100dvh;min-height:0;padding:8px 6px!important;overflow:hidden!important;box-sizing:border-box}
  html[data-gc-pos-workstation="gotcracked-pos"] .sidebar>.brand{flex:0 0 56px;height:56px!important;min-height:56px!important;max-height:56px!important;width:100%;margin:0 0 6px!important;justify-content:center!important}
  html[data-gc-pos-workstation="gotcracked-pos"] .sidebar>.brand .brand-logo{display:block!important;width:112px!important;max-width:112px!important;height:52px!important;max-height:52px!important;object-fit:contain!important}
  html[data-gc-pos-workstation="gotcracked-pos"] .sidebar>.brand::after{content:none!important;display:none!important}
  html[data-gc-pos-workstation="gotcracked-pos"] .sidebar>nav:not(.gc-mobile-nav){flex:1 1 auto;min-height:0;width:100%;display:flex!important;flex-direction:column;gap:3px!important;padding:0 0 6px!important;overflow-x:hidden!important;overflow-y:auto!important;overscroll-behavior:contain;scrollbar-width:thin;scroll-padding-block:8px}
  html[data-gc-pos-workstation="gotcracked-pos"] .sidebar>nav:not(.gc-mobile-nav)>.gc-nav-section-label{display:none!important}
  html[data-gc-pos-workstation="gotcracked-pos"] .sidebar :is(.nav-link,.sidebar-settings-link){flex-shrink:0;box-sizing:border-box;width:100%!important;max-width:100%;min-height:44px!important;height:auto!important;margin:0!important;padding:9px 7px!important;gap:8px!important;justify-content:flex-start!important;font-size:12px!important;line-height:1.25!important;white-space:normal;border-radius:8px}
  html[data-gc-pos-workstation="gotcracked-pos"] .sidebar .nav-link>.nav-icon{flex:0 0 18px!important;width:18px!important;min-width:18px!important;height:18px!important;transform:none!important}
  html[data-gc-pos-workstation="gotcracked-pos"] .sidebar .nav-link b:not([hidden]){display:inline-flex!important;flex-shrink:0;margin-left:auto;padding:2px 4px;font-size:10px!important}
  html[data-gc-pos-workstation="gotcracked-pos"] .sidebar-bottom{flex:0 0 auto;min-height:0;width:100%;display:block!important;padding-top:5px}
  html[data-gc-pos-workstation="gotcracked-pos"] .sidebar-bottom>.profile{display:flex!important;justify-content:center!important;align-items:center;min-width:0;margin:0!important;padding-top:6px!important;gap:6px!important}
  html[data-gc-pos-workstation="gotcracked-pos"] .sidebar .gc-logout-button{min-width:44px!important;min-height:44px!important;padding:8px!important}
  html[data-gc-pos-workstation="gotcracked-pos"] .app-shell>main{min-width:0;min-height:0;height:100dvh;grid-template-rows:56px minmax(0,1fr)!important;overflow:hidden}
  html[data-gc-pos-workstation="gotcracked-pos"] .topbar{display:grid!important;grid-template-columns:116px minmax(0,1fr) max-content!important;grid-template-rows:56px!important;align-items:center;height:56px!important;min-height:56px!important;padding:0 12px!important;gap:8px!important}
  html[data-gc-pos-workstation="gotcracked-pos"] .topbar .mobile-menu{display:none!important}
  html[data-gc-pos-workstation="gotcracked-pos"] .topbar .location{grid-column:1!important;grid-row:1!important;width:116px!important;min-width:0;max-width:116px;overflow:hidden;font-size:12px}
  html[data-gc-pos-workstation="gotcracked-pos"] .topbar .location .v1-store-switch{min-width:0!important;width:100%;min-height:42px;padding:6px!important}
  html[data-gc-pos-workstation="gotcracked-pos"] .topbar .gc-global-search{grid-column:2!important;grid-row:1!important;width:100%!important;min-width:0!important;max-width:none!important;margin:0!important;height:42px!important}
  html[data-gc-pos-workstation="gotcracked-pos"] .topbar .gc-global-search input{font-size:13px!important;height:40px!important}
  html[data-gc-pos-workstation="gotcracked-pos"] .topbar .gc-global-search kbd{display:none!important}
  html[data-gc-pos-workstation="gotcracked-pos"] .topbar .top-actions{grid-column:3!important;grid-row:1!important;min-width:0;gap:6px!important}
  html[data-gc-pos-workstation="gotcracked-pos"] .gc-workstation-badge{display:none!important}
  html[data-gc-pos-workstation="gotcracked-pos"] .gc-operator-pill{min-height:42px!important;max-width:180px;padding:8px 10px!important;font-size:12px!important}
  html[data-gc-pos-workstation="gotcracked-pos"] .gc-operator-pill small{display:none!important}
  html[data-gc-pos-workstation="gotcracked-pos"] .app-shell main>.view{min-width:0;min-height:0;max-width:none!important;margin:0!important;padding:12px 14px 24px!important;overscroll-behavior:contain}
  html[data-gc-pos-workstation="gotcracked-pos"] .page-heading{flex-wrap:wrap;gap:8px!important;margin-bottom:12px!important}
  html[data-gc-pos-workstation="gotcracked-pos"] .page-heading h1{font-size:24px!important}
  html[data-gc-pos-workstation="gotcracked-pos"] .page-heading :is(.primary-button,.secondary-button){min-height:42px!important}
  html[data-gc-pos-workstation="gotcracked-pos"] :is(.table-wrap,.v1-table-wrap,.gc-pb-table-wrap,.gc-receive-table-wrap){min-width:0;max-width:100%;overflow:auto!important;overscroll-behavior-inline:contain;scrollbar-width:thin}
  html[data-gc-pos-workstation="gotcracked-pos"] table{font-size:12px!important}
  html[data-gc-pos-workstation="gotcracked-pos"] td{font-size:12px!important;line-height:1.4;padding:10px 8px!important}
  html[data-gc-pos-workstation="gotcracked-pos"] th{font-size:11px!important;padding:8px!important;vertical-align:middle}
  html[data-gc-pos-workstation="gotcracked-pos"] .gc-table-header-sort{min-height:32px!important;font-size:11px!important;line-height:1.2!important}
  html[data-gc-pos-workstation="gotcracked-pos"] .gc-table-toolbar{flex-wrap:wrap;gap:8px!important;padding:8px!important}
  html[data-gc-pos-workstation="gotcracked-pos"] .gc-table-toolbar :is(button,select,summary){min-height:40px!important;box-sizing:border-box}
  html[data-gc-pos-workstation="gotcracked-pos"] .gc-table-toolbar-main{display:none}
  html[data-gc-pos-workstation="gotcracked-pos"] .gc-table-paging{margin-left:auto;flex:0 1 auto!important;white-space:normal!important}
  html[data-gc-pos-workstation="gotcracked-pos"] .gc-table-paging [data-gc-page-summary]{font-size:11px;line-height:1.3}
  html[data-gc-pos-workstation="gotcracked-pos"] :is(.gc-payment-dialog,.gc-receipt-dialog,.gc-operator-dialog){max-height:calc(100dvh - 24px)!important;max-width:calc(100vw - 24px)!important;overflow:auto!important;overscroll-behavior:contain}
  html[data-gc-pos-workstation="gotcracked-pos"] .gc-operator-dialog{width:min(410px,calc(100vw - 24px))!important}
  html[data-gc-pos-workstation="gotcracked-pos"] .gc-marlon-activity-pill{display:none!important}
}

@media(min-width:751px){html[data-gc-pos-workstation="gotcracked-pos"] .gc-table-header-sort{text-transform:none!important}}

/* Keep counter support available without covering quote/checkout actions. */
@media(min-width:751px){
 html[data-gc-pos-workstation="gotcracked-pos"] .sidebar-bottom>.profile{justify-content:flex-end!important;padding-right:12px!important;box-sizing:border-box}
 html[data-gc-pos-workstation="gotcracked-pos"] .gc-marlon{left:18px!important;right:auto!important;bottom:10px!important}
 html[data-gc-pos-workstation="gotcracked-pos"] .gc-marlon-launcher{width:42px!important;min-width:42px!important;height:42px!important;min-height:42px!important;padding:0!important;font-size:0!important}
 html[data-gc-pos-workstation="gotcracked-pos"] .gc-marlon-launcher::before{content:"?"!important;font-size:20px!important;line-height:1!important}
 html[data-gc-pos-workstation="gotcracked-pos"] .gc-marlon-panel{left:0!important;right:auto!important;max-width:calc(100vw - 36px)!important}
 html[data-gc-pos-workstation="gotcracked-pos"] th{text-transform:none!important}
}
