/* 20260618 - ruthless - initial agiotech responsive ui -- Begin */
:root {
  --primary: #112640;
  --primary-container: #e7ebf0;
  --on-primary: #ffffff;
  --secondary: #4b5e87;
  --surface: #f9f9f9;
  --surface-dim: #dadada;
  --surface-lowest: #ffffff;
  --surface-low: #f3f3f3;
  --surface-container: #eeeeee;
  --surface-high: #e8e8e8;
  --surface-highest: #e2e2e2;
  --on-surface: #1a1c1c;
  --on-surface-variant: #3b4948;
  --outline: #6b7a79;
  --outline-variant: #bacac8;
  --error: #ba1a1a;
  --error-container: #ffdad6;
  --success: #0f6b4f;
  --success-container: #dff7ed;
  --warning: #765600;
  --warning-container: #fff1c2;
  --teal-start: #006a67;
  --teal-end: #1cd8d2;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: "Inter", sans-serif;
  color: var(--on-surface);
  background:
    radial-gradient(ellipse at 15% 0%, rgba(28, 216, 210, 0.07) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 100%, rgba(17, 38, 64, 0.05) 0%, transparent 55%),
    var(--surface);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.material-symbols-outlined {
  font-variation-settings: "FILL" 0, "wght" 450, "GRAD" 0, "opsz" 24;
  line-height: 1;
}

.app-root {
  min-height: 100vh;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
}

.login-hero {
  padding: 48px;
  color: var(--on-primary);
  background: linear-gradient(135deg, #112640 0%, #006a67 58%, #1cd8d2 120%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.18);
}

.login-hero h1 {
  max-width: 620px;
  margin: 80px 0 18px;
  font-family: "Manrope", sans-serif;
  font-size: clamp(2.4rem, 5vw, 5.6rem);
  line-height: 0.96;
  letter-spacing: 0;
}

.login-hero p {
  max-width: 540px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.05rem;
  line-height: 1.7;
}

.login-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 36px;
}

.login-card {
  width: min(100%, 430px);
  padding: 30px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 48px rgba(17, 38, 64, 0.08);
}

/* 20260628 - ruthless - collapsible password recovery -- Begin */
.password-recovery {
  display: grid;
  gap: 14px;
  border-radius: 16px;
  background: var(--surface-low);
  padding: 14px;
}

.password-recovery summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  cursor: pointer;
  font-weight: 800;
}

.recovery-content {
  margin-top: 12px;
}

.recovery-panel {
  border-radius: 14px;
  background: var(--surface-lowest);
  padding: 16px;
}

.recovery-panel .headline {
  font-size: 1.08rem;
}
/* 20260628 - ruthless - collapsible password recovery -- End */

.eyebrow {
  margin: 0 0 8px;
  color: var(--outline);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.headline {
  margin: 0;
  font-family: "Manrope", sans-serif;
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  font-weight: 800;
  letter-spacing: 0;
}

.muted {
  color: var(--on-surface-variant);
}

.layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 18px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(16px);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding: 8px;
}

.sidebar-brand strong {
  display: block;
  font-family: "Manrope", sans-serif;
}

.sidebar-brand span {
  color: var(--outline);
  font-size: 0.78rem;
}

.nav-list {
  display: grid;
  gap: 8px;
  max-height: calc(100vh - 120px);
  overflow: auto;
  padding-right: 4px;
}

.nav-item {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  color: var(--on-surface-variant);
  border: 0;
  border-radius: 16px;
  background: transparent;
  text-align: left;
  transition: all 0.2s ease;
}

.nav-item:hover,
.nav-item.active {
  color: var(--primary);
  background: var(--surface-high);
}

.main {
  min-width: 0;
  padding: 26px 30px 96px;
}

.topbar {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.mobile-nav {
  display: none;
}

.panel {
  border-radius: 18px;
  background: var(--surface-low);
  padding: 22px;
}

.card {
  border-radius: 18px;
  background: var(--surface-lowest);
  padding: 20px;
  box-shadow: 0 2px 18px rgba(26, 28, 28, 0.05);
}

.grid {
  display: grid;
  gap: 16px;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* 20260620 - ruthless - prompt 5 compact table actions -- Begin */
.btn-table {
  min-height: 36px;
  padding: 0 12px;
  font-size: 0.74rem;
  white-space: nowrap;
}
/* 20260620 - ruthless - prompt 5 compact table actions -- End */

/* 20260618 - ruthless - prompt 3 selected order column -- Begin */
.process-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 480px);
  align-items: start;
  gap: 16px;
}

.selected-order-panel {
  align-self: start;
  overflow: hidden;
}

.selected-order-panel .panel {
  padding: 16px;
  overflow-wrap: anywhere;
}

.selected-order-panel .grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(124px, 1fr));
}
/* 20260618 - ruthless - prompt 3 selected order column -- End */

.stack {
  display: grid;
  gap: 14px;
}

.row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  color: var(--outline);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 52px;
  border: 0;
  border-bottom: 2px solid rgba(17, 38, 64, 0.22);
  border-radius: 14px 14px 4px 4px;
  outline: 0;
  color: var(--on-surface);
  background: var(--surface-highest);
  padding: 0 14px;
  transition: all 0.2s ease;
}

.textarea {
  min-height: 104px;
  padding: 14px;
  resize: vertical;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-bottom-color: var(--primary);
  background: #edf2f2;
}

.btn {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 0 18px;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  transition: all 0.2s ease;
}

.btn:active {
  transform: scale(0.96);
}

.btn-primary {
  color: var(--on-primary);
  background: linear-gradient(135deg, var(--teal-start), var(--teal-end));
  box-shadow: 0 8px 24px rgba(0, 106, 103, 0.22);
}

.btn-secondary {
  color: var(--primary);
  background: var(--surface-high);
}

.btn-ghost {
  color: var(--secondary);
  background: transparent;
}

.btn-icon {
  width: 48px;
  min-width: 48px;
  padding: 0;
  background: var(--surface-high);
  color: var(--primary);
}

.btn[disabled] {
  cursor: not-allowed;
  opacity: 0.46;
  box-shadow: none;
}

.metric {
  min-height: 136px;
}

.metric .icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--primary-container);
  color: var(--primary);
}

.metric strong {
  display: block;
  margin-top: 18px;
  font-family: "Manrope", sans-serif;
  font-size: 2rem;
  line-height: 1;
}

.metric span {
  display: block;
  margin-top: 6px;
  color: var(--on-surface-variant);
  font-size: 0.88rem;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  border-radius: 999px;
  padding: 0 10px;
  background: var(--surface-high);
  color: var(--on-surface-variant);
  font-size: 0.76rem;
  font-weight: 800;
}

.status-chip::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary);
}

.status-success {
  background: var(--success-container);
  color: var(--success);
}

.status-warning {
  background: var(--warning-container);
  color: var(--warning);
}

.data-list {
  display: grid;
  gap: 10px;
}

.order-card {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  border: 0;
  border-radius: 18px;
  padding: 16px;
  color: var(--on-surface);
  background: var(--surface-lowest);
  text-align: left;
  box-shadow: 0 1px 8px rgba(26, 28, 28, 0.04);
  transition: all 0.2s ease;
}

.order-card:hover,
.order-card.active {
  background: var(--surface-high);
}

.order-title {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.order-title strong {
  font-family: "Manrope", sans-serif;
  font-size: 1rem;
}

.order-meta {
  display: flex;
  gap: 8px 14px;
  flex-wrap: wrap;
  margin-top: 8px;
  color: var(--on-surface-variant);
  font-size: 0.83rem;
}

.money {
  font-variant-numeric: tabular-nums;
}

.table-wrap {
  overflow: auto;
  border-radius: 18px;
  background: var(--surface-lowest);
  outline: 1px solid rgba(186, 202, 200, 0.18);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

th,
td {
  padding: 14px 16px;
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--outline);
  background: var(--surface-container);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

tr:nth-child(even) td {
  background: var(--surface-low);
}

.empty {
  padding: 34px;
  text-align: center;
  color: var(--on-surface-variant);
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 100;
  max-width: min(420px, calc(100vw - 40px));
  padding: 14px 16px;
  border-radius: 16px;
  color: var(--on-primary);
  background: var(--primary);
  box-shadow: 0 12px 44px rgba(17, 38, 64, 0.24);
  transform: translateY(24px);
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s ease;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.scanner-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: end center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(6px);
}

.scanner-sheet {
  width: min(620px, 100%);
  border-radius: 22px;
  background: var(--surface-lowest);
  padding: 20px;
}

.scanner-video {
  width: 100%;
  max-height: 58vh;
  border-radius: 18px;
  background: var(--primary);
  object-fit: cover;
}

/* 20260626 - ruthless - universal camera scanner -- Begin */
.scanner-reader {
  width: 100%;
  min-height: 280px;
  overflow: hidden;
  border-radius: 18px;
  background: var(--primary);
}

.scanner-reader video {
  width: 100%;
  border-radius: 18px;
}
/* 20260626 - ruthless - universal camera scanner -- End */

.permission-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--surface-high);
  color: var(--on-surface-variant);
  font-weight: 700;
}

.check input {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.enter {
  animation: slideUp 0.34s ease both;
}

.d1 {
  animation-delay: 0.05s;
}

.d2 {
  animation-delay: 0.1s;
}

.d3 {
  animation-delay: 0.15s;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1080px) {
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .login-shell {
    grid-template-columns: 1fr;
  }

  .login-hero {
    min-height: 36vh;
    padding: 28px;
  }

  .login-hero h1 {
    margin-top: 42px;
  }

  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }

  .main {
    padding: 18px 16px 110px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .grid-2,
  .grid-3,
  .grid-4,
  .process-grid {
    grid-template-columns: 1fr;
  }

  .mobile-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(16px);
  }

  .mobile-nav .nav-item {
    min-width: 92px;
    flex-direction: column;
    gap: 4px;
    justify-content: center;
    font-size: 0.72rem;
    text-align: center;
  }

  .permission-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .login-panel {
    padding: 18px;
  }

  .login-card,
  .panel,
  .card {
    border-radius: 16px;
    padding: 18px;
  }

  .row-between {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar-actions {
    width: 100%;
  }

  .topbar-actions .btn {
    flex: 1;
  }
}

/* 20260626 - ruthless - ios iphone isolated frontend v2 -- Begin */
.version-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  width: fit-content;
  border-radius: 999px;
  padding: 0 10px;
  color: var(--primary);
  background: var(--primary-container);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.orientation-lock {
  display: none;
}

.orientation-lock-sheet {
  width: min(92vw, 520px);
  display: grid;
  justify-items: start;
  gap: 12px;
  border-radius: 22px;
  padding: 24px;
  color: var(--on-surface);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 2px 24px rgba(26, 28, 28, 0.12);
}

.orientation-lock-icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: var(--primary);
  background: var(--primary-container);
}

.orientation-lock-icon .material-symbols-outlined {
  font-size: 2rem;
}

.orientation-lock h1 {
  margin: 0;
  font-family: "Manrope", sans-serif;
  font-size: 1.55rem;
  line-height: 1.08;
  letter-spacing: 0;
}

.orientation-lock p {
  margin: 0;
  color: var(--on-surface-variant);
  line-height: 1.55;
}

html.ver-iosiphone body {
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
}

html.ver-iosiphone .btn,
html.ver-iosiphone .nav-item,
html.ver-iosiphone .order-card,
html.ver-iosiphone .check {
  touch-action: manipulation;
}

@media (orientation: landscape) and (max-width: 940px) and (max-height: 520px) {
  html.ver-iosiphone,
  html.ver-iosiphone body {
    overflow: hidden;
  }

  html.ver-iosiphone .orientation-lock {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    padding: calc(18px + env(safe-area-inset-top)) calc(18px + env(safe-area-inset-right))
      calc(18px + env(safe-area-inset-bottom)) calc(18px + env(safe-area-inset-left));
    background:
      radial-gradient(ellipse at 15% 0%, rgba(28, 216, 210, 0.12) 0%, transparent 55%),
      radial-gradient(ellipse at 85% 100%, rgba(17, 38, 64, 0.16) 0%, transparent 58%),
      rgba(249, 249, 249, 0.96);
  }

  html.ver-iosiphone .app-root,
  html.ver-iosiphone .toast,
  html.ver-iosiphone #scannerMount {
    pointer-events: none;
    filter: blur(8px);
  }
}

@media (max-width: 820px) {
  html.ver-iosiphone .login-shell,
  html.ver-iosiphone .layout {
    min-height: 100svh;
  }

  html.ver-iosiphone .login-hero {
    min-height: auto;
    padding: calc(24px + env(safe-area-inset-top)) 22px 24px;
  }

  html.ver-iosiphone .login-hero h1 {
    margin: 36px 0 14px;
    font-size: 2.25rem;
    line-height: 1.02;
  }

  html.ver-iosiphone .login-hero p {
    font-size: 0.96rem;
    line-height: 1.55;
  }

  html.ver-iosiphone .login-panel {
    padding: 18px 18px calc(24px + env(safe-area-inset-bottom));
  }

  html.ver-iosiphone .login-card {
    width: 100%;
    border-radius: 18px;
  }

  html.ver-iosiphone .main {
    padding: calc(10px + env(safe-area-inset-top)) 12px calc(94px + env(safe-area-inset-bottom));
  }

  html.ver-iosiphone .topbar {
    position: sticky;
    top: env(safe-area-inset-top);
    z-index: 55;
    min-height: 64px;
    align-items: center;
    flex-direction: row;
    gap: 10px;
    margin: 0 -4px 14px;
    padding: 12px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 2px 18px rgba(26, 28, 28, 0.06);
  }

  html.ver-iosiphone .topbar-title {
    display: grid;
    gap: 5px;
    min-width: 0;
  }

  html.ver-iosiphone .topbar .headline {
    max-width: 58vw;
    font-size: 1.15rem;
    line-height: 1.1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  html.ver-iosiphone .topbar-actions {
    width: auto;
    margin-left: auto;
    flex-wrap: nowrap;
    gap: 6px;
  }

  html.ver-iosiphone .topbar-actions .btn {
    min-width: 44px;
    min-height: 44px;
    flex: 0 0 auto;
    padding: 0 12px;
    font-size: 0;
  }

  html.ver-iosiphone .topbar-actions .material-symbols-outlined {
    font-size: 1.35rem;
  }

  html.ver-iosiphone .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  html.ver-iosiphone .grid-2,
  html.ver-iosiphone .grid-3,
  html.ver-iosiphone .process-grid {
    gap: 12px;
  }

  /* 20260626 - ruthless - ios iphone selected order first -- Begin */
  html.ver-iosiphone .process-grid > .selected-order-panel {
    order: 1;
  }

  html.ver-iosiphone .process-grid > .stack:not(.selected-order-panel) {
    order: 2;
  }
  /* 20260626 - ruthless - ios iphone selected order first -- End */

  html.ver-iosiphone .panel,
  html.ver-iosiphone .card {
    border-radius: 16px;
    padding: 16px;
  }

  html.ver-iosiphone .metric {
    min-height: 118px;
  }

  html.ver-iosiphone .metric strong {
    margin-top: 14px;
    font-size: 1.35rem;
    line-height: 1.08;
    overflow-wrap: anywhere;
  }

  html.ver-iosiphone .metric span {
    font-size: 0.78rem;
    line-height: 1.25;
  }

  html.ver-iosiphone .input,
  html.ver-iosiphone .select,
  html.ver-iosiphone .textarea {
    min-height: 56px;
    font-size: 1rem;
  }

  html.ver-iosiphone .btn {
    min-height: 52px;
  }

  html.ver-iosiphone .process-grid .order-card {
    grid-template-columns: 1fr;
    min-height: 60px;
    padding: 12px 14px;
  }

  html.ver-iosiphone .process-grid .order-meta,
  html.ver-iosiphone .process-grid .order-card > .material-symbols-outlined {
    display: none;
  }

  html.ver-iosiphone .table-wrap {
    margin-inline: -4px;
    border-radius: 16px;
    -webkit-overflow-scrolling: touch;
  }

  html.ver-iosiphone table {
    min-width: 640px;
  }

  html.ver-iosiphone th,
  html.ver-iosiphone td {
    padding: 12px 14px;
  }

  html.ver-iosiphone .mobile-nav {
    min-height: calc(72px + env(safe-area-inset-bottom));
    align-items: center;
    gap: 8px;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    box-shadow: 0 -2px 18px rgba(26, 28, 28, 0.08);
  }

  html.ver-iosiphone .mobile-nav::-webkit-scrollbar {
    display: none;
  }

  html.ver-iosiphone .mobile-nav .nav-item {
    min-width: 74px;
    min-height: 56px;
    border-radius: 18px;
    padding: 8px 10px;
    scroll-snap-align: start;
  }

  html.ver-iosiphone .mobile-nav .nav-item .material-symbols-outlined {
    font-size: 1.45rem;
  }

  html.ver-iosiphone .mobile-nav .nav-item span:not(.material-symbols-outlined) {
    max-width: 68px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  html.ver-iosiphone .scanner-overlay {
    padding: calc(20px + env(safe-area-inset-top)) 14px calc(20px + env(safe-area-inset-bottom));
  }

  html.ver-iosiphone .scanner-sheet {
    border-radius: 22px 22px 0 0;
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 390px) {
  html.ver-iosiphone .topbar .headline {
    max-width: 50vw;
  }

  html.ver-iosiphone .metric strong {
    font-size: 1.18rem;
  }

  html.ver-iosiphone .mobile-nav .nav-item {
    min-width: 68px;
  }
}
/* 20260626 - ruthless - ios iphone isolated frontend v2 -- End */
/* 20260626 - ruthless - unified ios ipad frontend -- Begin */
html.ver-iosipad body {
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
}

html.ver-iosipad .btn,
html.ver-iosipad .nav-item,
html.ver-iosipad .order-card,
html.ver-iosipad .check {
  touch-action: manipulation;
}

@media (orientation: portrait) and (max-width: 1100px) {
  html.ver-iosipad .layout {
    grid-template-columns: 1fr;
    min-height: 100svh;
  }

  html.ver-iosipad .sidebar {
    display: none;
  }

  html.ver-iosipad .main {
    padding: calc(12px + env(safe-area-inset-top)) 18px calc(104px + env(safe-area-inset-bottom));
  }

  html.ver-iosipad .topbar {
    position: sticky;
    top: env(safe-area-inset-top);
    z-index: 55;
    min-height: 68px;
    align-items: center;
    flex-direction: row;
    gap: 12px;
    margin: 0 0 16px;
    padding: 14px 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 2px 18px rgba(26, 28, 28, 0.06);
  }

  html.ver-iosipad .topbar-title {
    display: grid;
    gap: 5px;
    min-width: 0;
  }

  html.ver-iosipad .topbar .headline {
    max-width: 62vw;
    font-size: 1.28rem;
    line-height: 1.12;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  html.ver-iosipad .topbar-actions {
    width: auto;
    margin-left: auto;
    flex-wrap: nowrap;
    gap: 8px;
  }

  html.ver-iosipad .topbar-actions .btn {
    min-width: 48px;
    min-height: 48px;
    flex: 0 0 auto;
    padding: 0 14px;
    font-size: 0;
  }

  html.ver-iosipad .topbar-actions .material-symbols-outlined {
    font-size: 1.45rem;
  }

  html.ver-iosipad .grid-2,
  html.ver-iosipad .grid-3,
  html.ver-iosipad .process-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  html.ver-iosipad .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  html.ver-iosipad .panel,
  html.ver-iosipad .card {
    border-radius: 16px;
    padding: 18px;
  }

  html.ver-iosipad .process-grid > .selected-order-panel {
    order: 1;
  }

  html.ver-iosipad .process-grid > .stack:not(.selected-order-panel) {
    order: 2;
  }

  html.ver-iosipad .process-grid .order-card {
    grid-template-columns: 1fr;
    min-height: 64px;
    padding: 14px 16px;
  }

  html.ver-iosipad .process-grid .order-meta,
  html.ver-iosipad .process-grid .order-card > .material-symbols-outlined {
    display: none;
  }

  html.ver-iosipad .mobile-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    display: flex;
    min-height: calc(76px + env(safe-area-inset-bottom));
    align-items: center;
    gap: 10px;
    overflow-x: auto;
    padding: 9px 14px calc(9px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    box-shadow: 0 -2px 18px rgba(26, 28, 28, 0.08);
  }

  html.ver-iosipad .mobile-nav::-webkit-scrollbar {
    display: none;
  }

  html.ver-iosipad .mobile-nav .nav-item {
    min-width: 86px;
    min-height: 58px;
    flex-direction: column;
    gap: 4px;
    justify-content: center;
    border-radius: 18px;
    padding: 8px 10px;
    font-size: 0.74rem;
    text-align: center;
    scroll-snap-align: start;
  }
}

@media (orientation: landscape) and (min-width: 900px) {
  html.ver-iosipad .layout {
    grid-template-columns: 260px minmax(0, 1fr);
  }

  html.ver-iosipad .sidebar {
    display: block;
  }

  html.ver-iosipad .mobile-nav {
    display: none;
  }

  html.ver-iosipad .main {
    padding: calc(20px + env(safe-area-inset-top)) calc(24px + env(safe-area-inset-right))
      calc(34px + env(safe-area-inset-bottom)) calc(24px + env(safe-area-inset-left));
  }

  html.ver-iosipad .process-grid {
    grid-template-columns: minmax(0, 1fr) minmax(360px, 480px);
    gap: 16px;
  }

  html.ver-iosipad .selected-order-panel {
    align-self: start;
  }

  html.ver-iosipad .topbar {
    align-items: center;
    flex-direction: row;
  }

  html.ver-iosipad .topbar-title {
    display: grid;
    gap: 5px;
  }
}
/* 20260626 - ruthless - unified ios ipad frontend -- End */
/* 20260626 - ruthless - android mobile frontend -- Begin */
html.ver-android body {
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
}

html.ver-android .btn,
html.ver-android .nav-item,
html.ver-android .order-card,
html.ver-android .check {
  touch-action: manipulation;
}

@media (orientation: landscape) and (max-width: 940px) and (max-height: 520px) {
  html.ver-android,
  html.ver-android body {
    overflow: hidden;
  }

  html.ver-android .orientation-lock {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    padding: calc(18px + env(safe-area-inset-top)) calc(18px + env(safe-area-inset-right))
      calc(18px + env(safe-area-inset-bottom)) calc(18px + env(safe-area-inset-left));
    background:
      radial-gradient(ellipse at 15% 0%, rgba(28, 216, 210, 0.12) 0%, transparent 55%),
      radial-gradient(ellipse at 85% 100%, rgba(17, 38, 64, 0.16) 0%, transparent 58%),
      rgba(249, 249, 249, 0.96);
  }

  html.ver-android .app-root,
  html.ver-android .toast,
  html.ver-android #scannerMount {
    pointer-events: none;
    filter: blur(8px);
  }
}

@media (max-width: 820px) {
  html.ver-android .login-shell,
  html.ver-android .layout {
    min-height: 100svh;
  }

  html.ver-android .login-hero {
    min-height: auto;
    padding: calc(24px + env(safe-area-inset-top)) 22px 24px;
  }

  html.ver-android .login-hero h1 {
    margin: 36px 0 14px;
    font-size: 2.25rem;
    line-height: 1.02;
  }

  html.ver-android .login-hero p {
    font-size: 0.96rem;
    line-height: 1.55;
  }

  html.ver-android .login-panel {
    padding: 18px 18px calc(24px + env(safe-area-inset-bottom));
  }

  html.ver-android .login-card {
    width: 100%;
    border-radius: 18px;
  }

  html.ver-android .main {
    padding: calc(10px + env(safe-area-inset-top)) 12px calc(94px + env(safe-area-inset-bottom));
  }

  html.ver-android .topbar {
    position: sticky;
    top: env(safe-area-inset-top);
    z-index: 55;
    min-height: 64px;
    align-items: center;
    flex-direction: row;
    gap: 10px;
    margin: 0 -4px 14px;
    padding: 12px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 2px 18px rgba(26, 28, 28, 0.06);
  }

  html.ver-android .topbar-title {
    display: grid;
    gap: 5px;
    min-width: 0;
  }

  html.ver-android .topbar .headline {
    max-width: 58vw;
    font-size: 1.15rem;
    line-height: 1.1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  html.ver-android .topbar-actions {
    width: auto;
    margin-left: auto;
    flex-wrap: nowrap;
    gap: 6px;
  }

  html.ver-android .topbar-actions .btn {
    min-width: 44px;
    min-height: 44px;
    flex: 0 0 auto;
    padding: 0 12px;
    font-size: 0;
  }

  html.ver-android .topbar-actions .material-symbols-outlined {
    font-size: 1.35rem;
  }

  html.ver-android .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  html.ver-android .grid-2,
  html.ver-android .grid-3,
  html.ver-android .process-grid {
    gap: 12px;
  }

  html.ver-android .process-grid > .selected-order-panel {
    order: 1;
  }

  html.ver-android .process-grid > .stack:not(.selected-order-panel) {
    order: 2;
  }

  html.ver-android .panel,
  html.ver-android .card {
    border-radius: 16px;
    padding: 16px;
  }

  html.ver-android .metric {
    min-height: 118px;
  }

  html.ver-android .metric strong {
    margin-top: 14px;
    font-size: 1.35rem;
    line-height: 1.08;
    overflow-wrap: anywhere;
  }

  html.ver-android .metric span {
    font-size: 0.78rem;
    line-height: 1.25;
  }

  html.ver-android .input,
  html.ver-android .select,
  html.ver-android .textarea {
    min-height: 56px;
    font-size: 1rem;
  }

  html.ver-android .btn {
    min-height: 52px;
  }

  html.ver-android .process-grid .order-card {
    grid-template-columns: 1fr;
    min-height: 60px;
    padding: 12px 14px;
  }

  html.ver-android .process-grid .order-meta,
  html.ver-android .process-grid .order-card > .material-symbols-outlined {
    display: none;
  }

  html.ver-android .table-wrap {
    margin-inline: -4px;
    border-radius: 16px;
    -webkit-overflow-scrolling: touch;
  }

  html.ver-android table {
    min-width: 640px;
  }

  html.ver-android th,
  html.ver-android td {
    padding: 12px 14px;
  }

  html.ver-android .mobile-nav {
    min-height: calc(72px + env(safe-area-inset-bottom));
    align-items: center;
    gap: 8px;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    box-shadow: 0 -2px 18px rgba(26, 28, 28, 0.08);
  }

  html.ver-android .mobile-nav::-webkit-scrollbar {
    display: none;
  }

  html.ver-android .mobile-nav .nav-item {
    min-width: 74px;
    min-height: 56px;
    border-radius: 18px;
    padding: 8px 10px;
    scroll-snap-align: start;
  }

  html.ver-android .mobile-nav .nav-item .material-symbols-outlined {
    font-size: 1.45rem;
  }

  html.ver-android .mobile-nav .nav-item span:not(.material-symbols-outlined) {
    max-width: 68px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  html.ver-android .scanner-overlay {
    padding: calc(20px + env(safe-area-inset-top)) 14px calc(20px + env(safe-area-inset-bottom));
  }

  html.ver-android .scanner-sheet {
    border-radius: 22px 22px 0 0;
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 390px) {
  html.ver-android .topbar .headline {
    max-width: 50vw;
  }

  html.ver-android .metric strong {
    font-size: 1.18rem;
  }

  html.ver-android .mobile-nav .nav-item {
    min-width: 68px;
  }
}
/* 20260626 - ruthless - android mobile frontend -- End */
/* 20260627 - ruthless - android tablet adaptive frontend -- Begin */
html.ver-androidtablet body {
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
}

html.ver-androidtablet .btn,
html.ver-androidtablet .nav-item,
html.ver-androidtablet .order-card,
html.ver-androidtablet .check {
  touch-action: manipulation;
}

@media (orientation: portrait) and (max-width: 1100px) {
  html.ver-androidtablet .layout {
    grid-template-columns: 1fr;
    min-height: 100svh;
  }

  html.ver-androidtablet .sidebar {
    display: none;
  }

  html.ver-androidtablet .main {
    padding: calc(12px + env(safe-area-inset-top)) 18px calc(104px + env(safe-area-inset-bottom));
  }

  html.ver-androidtablet .topbar {
    position: sticky;
    top: env(safe-area-inset-top);
    z-index: 55;
    min-height: 68px;
    align-items: center;
    flex-direction: row;
    gap: 12px;
    margin: 0 0 16px;
    padding: 14px 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 2px 18px rgba(26, 28, 28, 0.06);
  }

  html.ver-androidtablet .topbar-title {
    display: grid;
    gap: 5px;
    min-width: 0;
  }

  html.ver-androidtablet .topbar .headline {
    max-width: 62vw;
    font-size: 1.28rem;
    line-height: 1.12;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  html.ver-androidtablet .topbar-actions {
    width: auto;
    margin-left: auto;
    flex-wrap: nowrap;
    gap: 8px;
  }

  html.ver-androidtablet .topbar-actions .btn {
    min-width: 48px;
    min-height: 48px;
    flex: 0 0 auto;
    padding: 0 14px;
    font-size: 0;
  }

  html.ver-androidtablet .topbar-actions .material-symbols-outlined {
    font-size: 1.45rem;
  }

  html.ver-androidtablet .grid-2,
  html.ver-androidtablet .grid-3,
  html.ver-androidtablet .process-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  html.ver-androidtablet .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  html.ver-androidtablet .panel,
  html.ver-androidtablet .card {
    border-radius: 16px;
    padding: 18px;
  }

  html.ver-androidtablet .process-grid > .selected-order-panel {
    order: 1;
  }

  html.ver-androidtablet .process-grid > .stack:not(.selected-order-panel) {
    order: 2;
  }

  html.ver-androidtablet .process-grid .order-card {
    grid-template-columns: 1fr;
    min-height: 64px;
    padding: 14px 16px;
  }

  html.ver-androidtablet .process-grid .order-meta,
  html.ver-androidtablet .process-grid .order-card > .material-symbols-outlined {
    display: none;
  }

  html.ver-androidtablet .mobile-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    display: flex;
    min-height: calc(76px + env(safe-area-inset-bottom));
    align-items: center;
    gap: 10px;
    overflow-x: auto;
    padding: 9px 14px calc(9px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    box-shadow: 0 -2px 18px rgba(26, 28, 28, 0.08);
  }

  html.ver-androidtablet .mobile-nav::-webkit-scrollbar {
    display: none;
  }

  html.ver-androidtablet .mobile-nav .nav-item {
    min-width: 86px;
    min-height: 58px;
    flex-direction: column;
    gap: 4px;
    justify-content: center;
    border-radius: 18px;
    padding: 8px 10px;
    font-size: 0.74rem;
    text-align: center;
    scroll-snap-align: start;
  }
}

@media (orientation: landscape) and (min-width: 900px) {
  html.ver-androidtablet .layout {
    grid-template-columns: 260px minmax(0, 1fr);
  }

  html.ver-androidtablet .sidebar {
    display: block;
  }

  html.ver-androidtablet .mobile-nav {
    display: none;
  }

  html.ver-androidtablet .main {
    padding: calc(20px + env(safe-area-inset-top)) calc(24px + env(safe-area-inset-right))
      calc(34px + env(safe-area-inset-bottom)) calc(24px + env(safe-area-inset-left));
  }

  html.ver-androidtablet .process-grid {
    grid-template-columns: minmax(0, 1fr) minmax(360px, 480px);
    gap: 16px;
  }

  html.ver-androidtablet .selected-order-panel {
    align-self: start;
  }

  html.ver-androidtablet .topbar {
    align-items: center;
    flex-direction: row;
  }

  html.ver-androidtablet .topbar-title {
    display: grid;
    gap: 5px;
  }
}
/* 20260627 - ruthless - android tablet adaptive frontend -- End */

/* 20260627 - ruthless - diagnostic order photos -- Begin */
.diagnostic-photos {
  display: grid;
  gap: 12px;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.photo-card {
  display: grid;
  gap: 10px;
  padding: 10px;
  border-radius: 14px;
  background: var(--surface-lowest);
}

.photo-thumb-button {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 0;
  border-radius: 12px;
  background: var(--surface-high);
  cursor: pointer;
  padding: 0;
}

.photo-thumb-button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-meta {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.photo-meta strong,
.photo-meta small {
  overflow-wrap: anywhere;
}

.photo-delete {
  justify-content: center;
  min-height: 40px;
}

.photo-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
}

.photo-modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(10, 22, 38, 0.68);
}

.photo-modal-sheet {
  position: relative;
  z-index: 1;
  display: grid;
  max-width: min(960px, 96vw);
  max-height: 92vh;
  gap: 10px;
}

.photo-modal-sheet img {
  max-width: 100%;
  max-height: 84vh;
  border-radius: 14px;
  background: var(--surface-lowest);
  object-fit: contain;
}

.photo-modal-close {
  justify-self: end;
  background: var(--surface-lowest);
}
/* 20260627 - ruthless - diagnostic order photos -- End */
/* 20260618 - ruthless - initial agiotech responsive ui -- End */
