/**
 * CraftBelt premium phone shell — field home / entry chrome (410×840).
 * Standalone CraftBelt product chrome (leather + amber). Tenant appears only
 * in the connected-to strip — never paints primary / orange chrome.
 */
html[data-cb-phone='1'] {
  --cb-phone-bg0: #0c0a08;
  --cb-phone-bg1: #1a120e;
  --cb-phone-ink: var(--pc-text, #f7f1e8);
  --cb-phone-muted: var(--pc-slate, #9a8776);
  --cb-phone-brand: #e86f24;
  --cb-phone-brand-soft: rgba(232, 111, 36, 0.14);
  --cb-phone-saddle: #c4a574;
  --cb-phone-surface: rgba(26, 21, 18, 0.62);
  --cb-phone-line: rgba(232, 196, 160, 0.12);
  --cb-phone-font: var(--pc-font, 'Outfit', sans-serif);
  --cb-phone-display: var(--pc-font-display, 'Fraunces', Georgia, serif);
  --cb-phone-tap: var(--pc-tap, 44px);
  --cb-phone-radius: var(--pc-radius-lg, 16px);

  /* Lock product chrome — ignore any prior tenant overrides */
  --pc-primary: #e86f24;
  --pc-primary-soft: rgba(232, 111, 36, 0.14);
  --pc-focus-ring: 0 0 0 2px rgba(232, 111, 36, 0.55);
  --orange: #e86f24;
  --v2-accent: #e86f24;
}

html[data-cb-phone='1'] body.cb-phone-host {
  background:
    radial-gradient(ellipse 90% 55% at 50% -8%, rgba(232, 111, 36, 0.18), transparent 55%),
    radial-gradient(circle at 12% 88%, rgba(107, 62, 36, 0.45), transparent 42%),
    radial-gradient(circle at 88% 70%, rgba(40, 28, 20, 0.7), transparent 40%),
    linear-gradient(168deg, #18130f 0%, var(--cb-phone-bg0) 48%, var(--cb-phone-bg1) 100%);
}

html[data-cb-phone='1'] .smartphone-container {
  box-shadow:
    0 25px 60px -15px rgba(0, 0, 0, 0.95),
    0 0 36px rgba(232, 111, 36, 0.12);
}

html[data-cb-phone='1'] .smartphone-container > .screen-content {
  background:
    radial-gradient(ellipse 130% 70% at 50% -18%, rgba(232, 111, 36, 0.2), transparent 52%),
    radial-gradient(ellipse 80% 40% at 100% 30%, rgba(107, 62, 36, 0.22), transparent 50%),
    linear-gradient(180deg, #1c1511 0%, var(--pc-bg, #0c0a08) 50%, #100d0b 100%);
  color: var(--cb-phone-ink);
  font-family: var(--cb-phone-font);
}

/* ---- Home composition -------------------------------------------------- */

html[data-cb-phone='1'] .cb-home {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 14px 14px 72px;
  min-height: 100%;
  box-sizing: border-box;
}

html[data-cb-phone='1'] .cb-home-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  padding: 4px 4px 2px;
  animation: cbBrandIn 0.55s ease both;
}

html[data-cb-phone='1'] .cb-home-brand__mark {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

html[data-cb-phone='1'] .cb-home-brand__logo {
  height: 48px;
  max-width: 70%;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.45));
  animation: cbLogoPulse 2.8s ease-in-out infinite;
}

html[data-cb-phone='1'] .cb-home-brand__product {
  margin: 0;
  font-family: var(--cb-phone-display);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.02;
  color: var(--cb-phone-ink);
}

html[data-cb-phone='1'] .cb-home-brand__product span {
  color: var(--cb-phone-brand);
}

html[data-cb-phone='1'] .cb-home-brand__tag {
  margin: 0;
  font-family: var(--cb-phone-font);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cb-phone-saddle);
}

/* Connected-to strip — ONLY place tenant branding appears */
html[data-cb-phone='1'] .cb-connected {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 360px;
  min-height: 48px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(196, 165, 116, 0.22);
  background:
    linear-gradient(120deg, rgba(232, 111, 36, 0.08), transparent 55%),
    rgba(12, 10, 8, 0.55);
  text-align: left;
  animation: cbConnectedIn 0.5s ease both;
  animation-delay: 0.12s;
}

html[data-cb-phone='1'] .cb-connected__logo {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

html[data-cb-phone='1'] .cb-connected__logo[hidden],
html[data-cb-phone='1'] .cb-connected__logo[src=''],
html[data-cb-phone='1'] .cb-connected__logo:not([src]) {
  display: none;
}

html[data-cb-phone='1'] .cb-connected__copy {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

html[data-cb-phone='1'] .cb-connected__label {
  margin: 0;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cb-phone-muted);
}

html[data-cb-phone='1'] .cb-connected__name {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  color: var(--cb-phone-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

html[data-cb-phone='1'] .cb-home-brand__role {
  margin: 2px 0 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--cb-phone-muted);
}

/* Compact time-entry process strip (replaces role-steps help panel) */
html[data-cb-phone='1'] .cb-process {
  margin: 0;
  padding: 10px 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(232, 111, 36, 0.28);
  background:
    linear-gradient(120deg, rgba(232, 111, 36, 0.12), transparent 55%),
    linear-gradient(165deg, rgba(42, 28, 18, 0.92), rgba(18, 14, 11, 0.96));
  animation: cbConnectedIn 0.45s ease both;
  animation-delay: 0.08s;
}

html[data-cb-phone='1'] .cb-process[hidden] {
  display: none !important;
}

html[data-cb-phone='1'] .cb-process__eyebrow {
  margin: 0 0 8px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fdba74;
}

html[data-cb-phone='1'] .cb-process__steps {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 4px;
}

html[data-cb-phone='1'] .cb-process__step {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  text-align: center;
}

html[data-cb-phone='1'] .cb-process__n {
  flex: 0 0 auto;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  color: #0c0a08;
  background: var(--cb-phone-brand);
  box-shadow: 0 2px 8px rgba(232, 111, 36, 0.35);
}

html[data-cb-phone='1'] .cb-process__t {
  font-size: 10px;
  line-height: 1.25;
  font-weight: 700;
  color: var(--cb-phone-ink);
  letter-spacing: 0.01em;
}

html[data-cb-phone='1'] .cb-process__arrow {
  flex: 0 0 auto;
  align-self: center;
  padding-bottom: 14px;
  font-size: 12px;
  font-weight: 700;
  color: rgba(232, 111, 36, 0.65);
  line-height: 1;
}

html[data-cb-phone='1'] .cb-home-section__title {
  margin: 0 0 8px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cb-phone-saddle);
}

html[data-cb-phone='1'] .cb-home-today {
  display: flex;
  flex-direction: column;
  gap: 0;
}

html[data-cb-phone='1'] .cb-home-err {
  margin: 0;
  padding: 12px 14px;
  border-radius: var(--pc-radius, 10px);
  border: 1px solid rgba(232, 90, 79, 0.45);
  background: rgba(232, 90, 79, 0.12);
  color: #fecaca;
  font-size: 12px;
  font-weight: 600;
}

html[data-cb-phone='1'] .cb-home-err[hidden] {
  display: none !important;
}

html[data-cb-phone='1'] .cb-home-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

html[data-cb-phone='1'] .cb-home-action {
  --cb-stagger: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 56px;
  padding: 14px 16px;
  border-radius: var(--cb-phone-radius);
  border: 1px solid var(--cb-phone-line);
  background:
    linear-gradient(135deg, rgba(232, 111, 36, 0.14), transparent 55%),
    var(--cb-phone-surface);
  color: var(--cb-phone-ink);
  text-decoration: none;
  font-family: var(--cb-phone-font);
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
  transition: border-color 0.18s ease, transform 0.12s ease, background 0.18s ease;
  animation: cbActionIn 0.45s ease both;
  animation-delay: calc(0.08s + var(--cb-stagger) * 0.06s);
}

html[data-cb-phone='1'] .cb-home-action:focus-visible {
  outline: none;
  box-shadow: var(--pc-focus-ring, 0 0 0 2px rgba(232, 111, 36, 0.55));
}

html[data-cb-phone='1'] .cb-home-action:active {
  transform: scale(0.985);
}

html[data-cb-phone='1'] .cb-home-action--primary {
  border-color: rgba(232, 111, 36, 0.5);
  background:
    linear-gradient(135deg, rgba(232, 111, 36, 0.3), rgba(232, 111, 36, 0.06) 60%),
    rgba(26, 21, 18, 0.75);
}

html[data-cb-phone='1'] .cb-home-action--hero {
  min-height: 68px;
  padding: 16px 18px;
  border-color: rgba(232, 111, 36, 0.72);
  background:
    linear-gradient(135deg, rgba(232, 111, 36, 0.42), rgba(232, 111, 36, 0.1) 55%),
    linear-gradient(180deg, rgba(42, 28, 18, 0.95), rgba(18, 14, 11, 0.98));
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(232, 111, 36, 0.12);
}

html[data-cb-phone='1'] .cb-home-action--hero .cb-home-action__label {
  font-family: var(--cb-phone-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

html[data-cb-phone='1'] .cb-home-action--hero .cb-home-action__ico {
  width: 46px;
  height: 46px;
  flex-basis: 46px;
  border-radius: 14px;
}

html[data-cb-phone='1'] .cb-home-action--warn {
  border-color: rgba(227, 160, 8, 0.45);
  background:
    linear-gradient(135deg, rgba(227, 160, 8, 0.18), transparent 60%),
    var(--cb-phone-surface);
}

html[data-cb-phone='1'] .cb-home-action__ico {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background-color: var(--cb-phone-brand);
  background-image: var(--tile-icon, none);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 70% 70%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.28);
}

html[data-cb-phone='1'] .cb-home-action__copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  text-align: left;
}

html[data-cb-phone='1'] .cb-home-action__label {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.2;
}

html[data-cb-phone='1'] .cb-home-action__hint {
  font-size: 11px;
  font-weight: 500;
  color: var(--cb-phone-muted);
  line-height: 1.3;
}

html[data-cb-phone='1'] .cb-home-action__chev {
  margin-left: auto;
  color: var(--cb-phone-brand);
  font-size: 18px;
  font-weight: 700;
  opacity: 0.85;
}

html[data-cb-phone='1'] .cb-home-empty {
  margin: 0;
  padding: 14px 16px;
  border-radius: var(--pc-radius, 10px);
  border: 1px dashed rgba(154, 135, 118, 0.35);
  background: rgba(154, 135, 118, 0.06);
  color: var(--cb-phone-muted);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  line-height: 1.4;
  animation: cbActionIn 0.45s ease both;
  animation-delay: 0.2s;
}

html[data-cb-phone='1'] .cb-home-more {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(196, 165, 116, 0.12);
}

html[data-cb-phone='1'] .cb-home-more__title {
  margin: 0 0 4px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cb-phone-saddle);
}

html[data-cb-phone='1'] .cb-home-more__group {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 10px;
  padding: 4px 8px 6px;
  border-radius: 12px;
  border: 1px solid rgba(196, 165, 116, 0.1);
  background: rgba(12, 10, 8, 0.35);
}

html[data-cb-phone='1'] .cb-home-more__group-label {
  margin: 6px 4px 2px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8a7360;
}

html[data-cb-phone='1'] .cb-home-more__link {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 8px;
  row-gap: 1px;
  min-height: var(--cb-phone-tap);
  padding: 8px 6px;
  color: var(--cb-phone-ink);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  -webkit-tap-highlight-color: transparent;
  background: none;
  border-left: none;
  border-right: none;
  border-top: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font-family: var(--cb-phone-font);
  transition: color 0.15s ease, background 0.15s ease;
}

html[data-cb-phone='1'] .cb-home-more__label {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
}

html[data-cb-phone='1'] .cb-home-more__hint {
  grid-column: 1;
  grid-row: 2;
  font-size: 10px;
  font-weight: 500;
  color: var(--cb-phone-muted);
  line-height: 1.3;
}

html[data-cb-phone='1'] .cb-home-more__chev {
  grid-column: 2;
  grid-row: 1 / span 2;
  color: var(--cb-phone-brand);
  font-size: 16px;
  font-weight: 700;
  opacity: 0.75;
}

html[data-cb-phone='1'] .cb-home-more__link:last-child {
  border-bottom: none;
}

html[data-cb-phone='1'] .cb-home-more__link:hover,
html[data-cb-phone='1'] .cb-home-more__link:focus-visible {
  color: var(--cb-phone-ink);
  background: rgba(232, 111, 36, 0.08);
}

html[data-cb-phone='1'] .cb-home-more__link:focus-visible {
  outline: none;
  box-shadow: var(--pc-focus-ring);
  border-radius: 8px;
}

html[data-cb-phone='1'] .cb-home-meta {
  margin: 8px 0 0;
  font-size: 10px;
  color: #6b5a4a;
  text-align: center;
  line-height: 1.4;
}

html[data-cb-phone='1'] .cb-home-weekly {
  text-align: center;
}

html[data-cb-phone='1'] #qaPinMount {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

html[data-cb-phone='1'] #qaPinMount[hidden] {
  display: none !important;
}

html[data-cb-phone='1'] .cb-home-gate {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--cb-phone-radius);
  border: 1px solid rgba(232, 111, 36, 0.45);
  background: rgba(232, 111, 36, 0.12);
  color: #fdba74;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

/* ---- Field shell chrome ------------------------------------------------ */

html[data-cb-phone='1'] .v2-header {
  background:
    linear-gradient(180deg, rgba(28, 21, 17, 0.98) 0%, rgba(14, 11, 9, 0.96) 100%) !important;
  border-bottom: 1px solid rgba(232, 111, 36, 0.22) !important;
}

html[data-cb-phone='1'] .v2-header h1,
html[data-cb-phone='1'] .cb-field-title {
  font-family: var(--cb-phone-display) !important;
  font-weight: 700 !important;
  text-transform: none !important;
  letter-spacing: -0.02em !important;
  color: var(--cb-phone-brand) !important;
}

html[data-cb-phone='1'] .v2-mode-pill {
  font-family: var(--cb-phone-font);
  border-color: rgba(232, 111, 36, 0.35) !important;
  background: rgba(232, 111, 36, 0.12) !important;
  color: var(--cb-phone-brand) !important;
}

html[data-cb-phone='1'] .cb-field-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

html[data-cb-phone='1'] .cb-field-brand__logo {
  height: 28px;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.35));
}

html[data-cb-phone='1'] .cb-field-brand__text {
  min-width: 0;
}

html[data-cb-phone='1'] .cb-field-connected {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
  min-width: 0;
}

html[data-cb-phone='1'] .cb-field-connected__logo {
  width: 16px;
  height: 16px;
  object-fit: contain;
  border-radius: 3px;
  flex-shrink: 0;
}

html[data-cb-phone='1'] .cb-field-connected__name {
  font-size: 10px;
  font-weight: 700;
  color: var(--cb-phone-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

@keyframes cbConnectedIn {
  from { opacity: 0; transform: translateY(6px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

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

@keyframes cbLogoPulse {
  0%, 100% { filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.45)); }
  50% { filter: drop-shadow(0 6px 22px rgba(232, 111, 36, 0.35)); }
}

@media (prefers-reduced-motion: reduce) {
  html[data-cb-phone='1'] .cb-home-brand,
  html[data-cb-phone='1'] .cb-connected,
  html[data-cb-phone='1'] .cb-process,
  html[data-cb-phone='1'] .cb-home-action,
  html[data-cb-phone='1'] .cb-home-empty,
  html[data-cb-phone='1'] .cb-home-brand__logo {
    animation: none;
  }
}

/* ==========================================================================
   Dual-workflow phone density (410×840) — EMP Enter Time / FOR Schedule Ahead
   / Review & Approve edits / Clock JPCC correction
   Compact chrome; keep --pc-tap (44px) on interactive targets.
   Tablet (≥700px viewport, not Hub 410 iframe): see @media block at end.
   ========================================================================== */

html[data-cb-phone='1'] {
  --cb-dense-gap: 5px;
  --cb-dense-pad: 8px;
  --cb-dense-radius: 8px;
  --cb-dense-line: rgba(232, 196, 160, 0.14);
  --cb-dense-surface: rgba(20, 16, 14, 0.9);
  --cb-dense-active-bg: rgba(232, 111, 36, 0.18);
  --cb-dense-active-line: rgba(232, 111, 36, 0.65);
}

/* ---- Dense panel shell ------------------------------------------------- */

html[data-cb-phone='1'] .cb-dense-panel.pc-card,
html[data-cb-phone='1'] .cb-dense-panel {
  padding: var(--cb-dense-pad) !important;
  margin-bottom: 6px;
  border-radius: 10px;
}

html[data-cb-phone='1'] .cb-dense-panel__title {
  margin: 0 0 2px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--cb-phone-brand);
  font-family: var(--cb-phone-font);
}

html[data-cb-phone='1'] .cb-dense-panel__hint {
  margin: 0 0 6px;
  font-size: 10px;
  line-height: 1.3;
  color: var(--cb-phone-muted);
}

html[data-cb-phone='1'] .cb-dense-panel__hint--tight {
  font-size: 9px;
  margin-bottom: 4px;
  color: #7a6858;
}

html[data-cb-phone='1'] .cb-dense-stack {
  display: grid;
  gap: var(--cb-dense-gap);
}

html[data-cb-phone='1'] .cb-dense-label {
  display: block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--cb-phone-muted);
  margin-bottom: 3px;
}

html[data-cb-phone='1'] .cb-dense-field .pc-select,
html[data-cb-phone='1'] .cb-dense-field .pc-input,
html[data-cb-phone='1'] .cb-dense-field select,
html[data-cb-phone='1'] .cb-dense-field input[type='date'],
html[data-cb-phone='1'] .cb-dense-field input[type='number'],
html[data-cb-phone='1'] .cb-dense-field input[type='text'] {
  width: 100%;
  margin-top: 2px;
  padding: 7px 8px;
  min-height: var(--cb-phone-tap);
  box-sizing: border-box;
  background: #14100e;
  border: 1px solid rgba(232, 196, 160, 0.18);
  color: var(--cb-phone-ink);
  border-radius: var(--cb-dense-radius);
  font-size: 12px;
}

html[data-cb-phone='1'] .cb-dense-hours {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
}

html[data-cb-phone='1'] .cb-dense-actions {
  display: grid;
  gap: 5px;
  margin-top: 2px;
}

html[data-cb-phone='1'] .cb-dense-actions.cb-sticky-save {
  display: flex;
  grid-template-columns: unset;
}

html[data-cb-phone='1'] .cb-dense-actions .pc-btn {
  width: 100%;
  min-height: var(--cb-phone-tap);
  padding: 10px;
  font-size: 11px;
  font-weight: 800;
}

html[data-cb-phone='1'] .cb-dense-actions.cb-sticky-save .pc-btn {
  width: auto;
}

/* Work date secondary — week chips are primary navigator */
html[data-cb-phone='1'] .cb-work-date--secondary {
  opacity: 0.72;
  margin-top: 2px;
}

html[data-cb-phone='1'] .cb-work-date--secondary .cb-dense-label {
  font-size: 8px;
  letter-spacing: 0.06em;
  color: #7a6858;
}

html[data-cb-phone='1'] .cb-work-date--secondary .pc-input,
html[data-cb-phone='1'] .cb-work-date--secondary input[type='date'] {
  min-height: 36px;
  padding: 5px 8px;
  font-size: 11px;
  border-color: rgba(232, 196, 160, 0.12);
  background: rgba(20, 16, 14, 0.55);
  color: var(--cb-phone-muted);
}

/* ---- Week chips (Enter Time) ------------------------------------------- */

html[data-cb-phone='1'] .cb-week-section__label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

html[data-cb-phone='1'] .cb-week-section {
  position: relative;
}

html[data-cb-phone='1'] .cb-week-strip {
  display: flex;
  gap: 3px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0;
  margin: 0 0 2px;
  scrollbar-width: none;
}

html[data-cb-phone='1'] .cb-week-strip::-webkit-scrollbar {
  display: none;
}

html[data-cb-phone='1'] .cb-week-chip {
  flex: 1 1 0;
  min-width: 0;
  min-height: var(--cb-phone-tap);
  padding: 3px 1px;
  border-radius: 7px;
  border: 1px solid var(--cb-dense-line);
  background: var(--cb-dense-surface);
  color: var(--cb-phone-ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  font-family: var(--cb-phone-font);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 0.15s ease, background 0.15s ease;
}

html[data-cb-phone='1'] .cb-week-chip:focus-visible {
  outline: none;
  box-shadow: var(--pc-focus-ring);
}

html[data-cb-phone='1'] .cb-week-chip--active {
  border-color: var(--cb-dense-active-line);
  background: var(--cb-dense-active-bg);
}

html[data-cb-phone='1'] .cb-week-chip__day {
  font-size: 7px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 1.05;
  color: var(--cb-phone-ink);
  white-space: nowrap;
}

html[data-cb-phone='1'] .cb-week-chip__count {
  font-size: 11px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.05;
  color: var(--cb-phone-muted);
}

html[data-cb-phone='1'] .cb-week-chip__count--hot {
  color: var(--cb-phone-brand);
}

/* ---- Day-ticket list --------------------------------------------------- */

html[data-cb-phone='1'] .cb-day-tickets {
  margin: 0 0 4px;
}

html[data-cb-phone='1'] .cb-day-tickets__label {
  font-size: 8px;
  font-weight: 700;
  color: var(--cb-phone-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 3px;
}

html[data-cb-phone='1'] .cb-day-tickets__empty {
  font-size: 9px;
  color: var(--cb-phone-muted);
  line-height: 1.3;
  margin: 0 0 2px;
}

html[data-cb-phone='1'] .cb-day-tickets__list {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

html[data-cb-phone='1'] .cb-day-ticket.pc-btn,
html[data-cb-phone='1'] .cb-day-ticket {
  width: 100%;
  text-align: left;
  padding: 6px 8px;
  font-size: 10px;
  min-height: var(--cb-phone-tap);
  line-height: 1.2;
  border-radius: var(--cb-dense-radius);
}

html[data-cb-phone='1'] .cb-day-ticket__label {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Existing ticket picker collapses when day chips already list tickets */
html[data-cb-phone='1'] .cb-existing-wrap[hidden],
html[data-cb-phone='1'] .cb-existing-wrap.is-collapsed {
  display: none !important;
}

/* ---- Schedule Ahead grid ----------------------------------------------- */

html[data-cb-phone='1'] .cb-sa-panel.pc-card,
html[data-cb-phone='1'] .cb-sa-panel {
  padding: var(--cb-dense-pad) !important;
  border: 1px solid rgba(232, 111, 36, 0.28);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

html[data-cb-phone='1'] .cb-sa-panel__meta {
  font-size: 8px;
  color: var(--cb-phone-muted);
  margin: 4px 0 4px;
}

html[data-cb-phone='1'] .cb-sa-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -2px;
  padding-bottom: 2px;
}

html[data-cb-phone='1'] .cb-sa-grid {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: min-content;
}

html[data-cb-phone='1'] .cb-sa-row {
  display: flex;
  gap: 3px;
  align-items: stretch;
}

html[data-cb-phone='1'] .cb-sa-row--head {
  position: sticky;
  top: 0;
  z-index: 3;
  padding-bottom: 2px;
  background: linear-gradient(180deg, #14100e 70%, rgba(20, 16, 14, 0.85));
}

html[data-cb-phone='1'] .cb-sa-crew {
  position: sticky;
  left: 0;
  z-index: 2;
  flex: 0 0 64px;
  width: 64px;
  min-width: 64px;
  padding: 4px 4px 4px 2px;
  box-sizing: border-box;
  background: linear-gradient(90deg, #14100e 78%, rgba(20, 16, 14, 0));
  font-size: 9px;
  font-weight: 700;
  color: var(--cb-phone-ink);
  line-height: 1.1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

html[data-cb-phone='1'] .cb-sa-crew--head {
  font-size: 7px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--cb-phone-muted);
  padding-top: 2px;
  padding-bottom: 2px;
  min-height: 24px;
}

html[data-cb-phone='1'] .cb-sa-crew__code {
  font-size: 7px;
  font-weight: 600;
  color: var(--cb-phone-muted);
  margin-top: 1px;
}

html[data-cb-phone='1'] .cb-sa-dayhead {
  flex: 0 0 48px;
  width: 48px;
  min-width: 48px;
  text-align: center;
  font-size: 7px;
  font-weight: 800;
  color: var(--cb-phone-brand);
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 1.1;
  padding: 2px 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-height: 24px;
}

html[data-cb-phone='1'] .cb-sa-cell {
  flex: 0 0 48px;
  width: 48px;
  min-width: 48px;
  min-height: var(--cb-phone-tap);
  padding: 3px 2px;
  border-radius: 5px;
  border: 1px solid var(--cb-dense-line);
  background: var(--cb-dense-surface);
  color: var(--cb-phone-ink);
  font-size: 7px;
  font-weight: 700;
  line-height: 1.1;
  font-family: var(--cb-phone-font);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 0.15s ease, background 0.15s ease;
  overflow: hidden;
  text-overflow: ellipsis;
}

html[data-cb-phone='1'] .cb-sa-cell:focus-visible {
  outline: none;
  box-shadow: var(--pc-focus-ring);
}

html[data-cb-phone='1'] .cb-sa-cell--painted {
  border-color: rgba(232, 111, 36, 0.45);
  background: rgba(232, 111, 36, 0.16);
}

html[data-cb-phone='1'] .cb-sa-empty {
  padding: 10px 6px;
  color: var(--cb-phone-muted);
  font-size: 10px;
}

/* Sticky save bar (Enter Time / Schedule Ahead) */
html[data-cb-phone='1'] .cb-sticky-save {
  position: sticky;
  bottom: 0;
  z-index: 28;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 6px -2px 0;
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(180deg, rgba(26, 21, 18, 0.88) 0%, rgba(12, 10, 8, 0.98) 45%);
  border-top: 1px solid rgba(232, 111, 36, 0.32);
  box-shadow: 0 -8px 22px rgba(0, 0, 0, 0.4);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

html[data-cb-phone='1'] .cb-sticky-save .pc-btn {
  flex: 1;
  width: auto;
  min-height: var(--cb-phone-tap);
  padding: 8px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

html[data-cb-phone='1'] .cb-sticky-save .cb-btn--ghost {
  flex: 0 0 auto;
  min-width: 88px;
  text-transform: none;
  font-size: 10px;
}

/* ---- Edit-inline (Review & Approve ticket edits) ----------------------- */

html[data-cb-phone='1'] .cb-edit-inline {
  margin: 0 0 4px;
}

html[data-cb-phone='1'] .cb-edit-inline > summary {
  font-size: 9px;
  font-weight: 800;
  color: var(--cb-phone-brand);
  cursor: pointer;
  list-style: none;
  min-height: 36px;
  display: flex;
  align-items: center;
  -webkit-tap-highlight-color: transparent;
}

html[data-cb-phone='1'] .cb-edit-inline > summary::-webkit-details-marker {
  display: none;
}

html[data-cb-phone='1'] .cb-edit-inline__body {
  display: grid;
  gap: 4px;
  margin-top: 2px;
}

html[data-cb-phone='1'] .cb-edit-inline__row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 3px;
}

html[data-cb-phone='1'] .cb-edit-inline label {
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--cb-phone-muted);
}

html[data-cb-phone='1'] .cb-edit-inline .pc-input {
  width: 100%;
  margin-top: 1px;
  padding: 5px 6px;
  min-height: 40px;
  box-sizing: border-box;
  font-size: 11px;
  background: #14100e;
  border: 1px solid rgba(232, 196, 160, 0.18);
  color: var(--cb-phone-ink);
  border-radius: var(--cb-dense-radius);
}

html[data-cb-phone='1'] .cb-edit-inline__note .pc-input {
  min-height: 40px;
}

html[data-cb-phone='1'] .cb-edit-inline .pc-btn {
  min-height: var(--cb-phone-tap);
  font-weight: 800;
  font-size: 10px;
  padding: 8px;
}

html[data-cb-phone='1'] .cb-ticket-card.pc-card {
  margin-bottom: 6px;
  padding: 8px !important;
  border-radius: 10px;
}

html[data-cb-phone='1'] .cb-ticket-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
}

html[data-cb-phone='1'] .cb-ticket-card__copy {
  min-width: 0;
}

html[data-cb-phone='1'] .cb-ticket-card__name {
  font-family: var(--cb-phone-font);
  font-weight: 800;
  font-size: 12px;
  color: var(--cb-phone-ink);
  line-height: 1.15;
}

html[data-cb-phone='1'] .cb-ticket-card__sub {
  font-size: 10px;
  color: var(--cb-phone-muted);
  margin-top: 1px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html[data-cb-phone='1'] .cb-ticket-card__meta {
  display: flex;
  gap: 8px;
  margin: 4px 0;
  color: var(--pc-slate, var(--cb-phone-muted));
  font-size: 10px;
}

html[data-cb-phone='1'] .cb-ticket-card__dings {
  margin: 2px 0 4px;
}

html[data-cb-phone='1'] .cb-ticket-card__actions {
  display: flex;
  gap: 5px;
}

html[data-cb-phone='1'] .cb-ticket-card__actions .pc-btn {
  flex: 1;
  min-height: var(--cb-phone-tap);
  font-size: 11px;
  padding: 8px;
}

html[data-cb-phone='1'] .cb-ticket-card__reject {
  color: var(--pc-alert, #f87171);
  border-color: var(--pc-alert, #f87171);
}

/* ---- Daily sheet cards (day desk) -------------------------------------- */

html[data-cb-phone='1'] .cb-ds-card.pc-card,
html[data-cb-phone='1'] .pc-ds-card.cb-ds-card {
  margin-bottom: 6px;
  padding: 8px !important;
  border-radius: 10px;
}

html[data-cb-phone='1'] .cb-ds-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
}

html[data-cb-phone='1'] .cb-ds-card__title {
  font-family: var(--cb-phone-font);
  font-weight: 800;
  font-size: 12px;
  color: var(--cb-phone-ink);
  line-height: 1.15;
}

html[data-cb-phone='1'] .cb-ds-card__meta {
  font-size: 10px;
  color: var(--cb-phone-muted);
  margin-top: 1px;
}

html[data-cb-phone='1'] .cb-ds-card__qty {
  display: flex;
  gap: 6px;
  align-items: flex-end;
  margin-top: 6px;
}

html[data-cb-phone='1'] .cb-ds-card__qty-field {
  flex: 1 1 0;
  min-width: 0;
}

html[data-cb-phone='1'] .cb-ds-card__qty .pc-input {
  width: 100%;
  min-height: var(--cb-phone-tap);
  padding: 6px 8px;
  font-size: 12px;
  box-sizing: border-box;
}

html[data-cb-phone='1'] .cb-ds-card__qty .pc-btn {
  flex: 0 0 auto;
  min-height: var(--cb-phone-tap);
  padding: 8px 10px;
  font-size: 11px;
}

html[data-cb-phone='1'] .cb-ds-card__actions {
  display: flex;
  gap: 5px;
  margin-top: 6px;
}

html[data-cb-phone='1'] .cb-ds-card__actions .pc-btn {
  flex: 1;
  min-height: var(--cb-phone-tap);
  font-size: 10px;
  padding: 8px;
}

html[data-cb-phone='1'] .pc-ds-day {
  margin-bottom: 10px;
}

html[data-cb-phone='1'] .pc-ds-day__head {
  margin-bottom: 6px;
}

html[data-cb-phone='1'] .pc-ds-day__title {
  font-size: 11px;
}

html[data-cb-phone='1'] .pc-ds-day__count {
  font-size: 9px;
}

/* ---- Review & Approve shell -------------------------------------------- */

html[data-cb-phone='1'] .cb-ra__title {
  margin: 0 0 4px;
  font-family: var(--cb-phone-display);
  font-weight: 700;
  font-size: 16px;
  color: var(--cb-phone-ink);
  letter-spacing: -0.02em;
}

html[data-cb-phone='1'] .cb-ra__hint {
  margin: 0 0 10px;
  font-size: 10px;
  color: var(--cb-phone-muted);
  line-height: 1.3;
}

html[data-cb-phone='1'] .cb-ra-desk {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

html[data-cb-phone='1'] .cb-ra-desk__label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--cb-phone-font);
  font-weight: 800;
  font-size: 11px;
  color: var(--cb-phone-ink);
  margin-bottom: 6px;
}

html[data-cb-phone='1'] .cb-ra-desk__label i,
html[data-cb-phone='1'] .cb-ra-desk__label svg {
  color: var(--cb-phone-brand);
}

html[data-cb-phone='1'] .cb-ra-more {
  margin: 12px 0 8px;
  border: 1px solid var(--cb-phone-line);
  border-radius: 10px;
  padding: 6px 8px;
  background: var(--cb-phone-surface);
}

html[data-cb-phone='1'] .cb-ra-more > summary {
  min-height: var(--cb-phone-tap);
  display: flex;
  align-items: center;
  font-family: var(--cb-phone-font);
  font-weight: 800;
  font-size: 11px;
  color: var(--cb-phone-ink);
  cursor: pointer;
  list-style: none;
}

html[data-cb-phone='1'] .cb-ra-more > summary::-webkit-details-marker {
  display: none;
}

html[data-cb-phone='1'] .cb-ra-more__body {
  padding-top: 6px;
}

html[data-cb-phone='1'] .cb-ra-more__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--cb-phone-tap);
  margin-bottom: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--cb-phone-line);
  background: rgba(20, 16, 14, 0.85);
  color: var(--cb-phone-ink);
  text-decoration: none;
  font-family: var(--cb-phone-font);
  font-size: 11px;
  font-weight: 800;
}

html[data-cb-phone='1'] .cb-ra-more__chev {
  color: var(--cb-phone-brand);
}

html[data-cb-phone='1'] .cb-ra-more__section {
  margin-bottom: 10px;
}

/* ---- Compact disclosure (Clock JPCC correction) ------------------------ */

html[data-cb-phone='1'] .cb-disclose {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid rgba(154, 135, 118, 0.28);
}

html[data-cb-phone='1'] .cb-disclose > summary {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--cb-phone-muted);
  cursor: pointer;
  list-style: none;
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 6px;
  -webkit-tap-highlight-color: transparent;
}

html[data-cb-phone='1'] .cb-disclose > summary::-webkit-details-marker {
  display: none;
}

html[data-cb-phone='1'] .cb-disclose > summary::before {
  content: '';
  width: 0;
  height: 0;
  border-left: 5px solid var(--cb-phone-brand);
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  transition: transform 0.15s ease;
  flex: 0 0 auto;
}

html[data-cb-phone='1'] .cb-disclose[open] > summary::before {
  transform: rotate(90deg);
}

html[data-cb-phone='1'] .cb-disclose__body {
  display: grid;
  gap: 5px;
  padding: 2px 0 2px;
}

html[data-cb-phone='1'] .cb-disclose__body .pc-btn {
  width: 100%;
  min-height: var(--cb-phone-tap);
  padding: 10px;
  font-weight: 800;
  font-size: 11px;
}

html[data-cb-phone='1'] .cb-clock-panel.pc-card {
  padding: var(--cb-dense-pad) !important;
  border: 1px solid rgba(232, 111, 36, 0.28);
}

html[data-cb-phone='1'] .cb-clock-panel__title {
  color: var(--cb-phone-brand);
}

html[data-cb-phone='1'] .cb-clock-status {
  font-size: 10px;
  color: var(--cb-phone-muted);
  margin: 4px 0 6px;
  min-height: 14px;
}

html[data-cb-phone='1'] .cb-clock-status--ok {
  color: #4ade80;
}

html[data-cb-phone='1'] .cb-clock-status--err {
  color: #f87171;
}

html[data-cb-phone='1'] .cb-clock-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
}

html[data-cb-phone='1'] .cb-clock-actions .pc-btn {
  min-height: var(--cb-phone-tap);
  padding: 10px;
  font-weight: 800;
  font-size: 11px;
}

html[data-cb-phone='1'] .v2-main {
  padding: 8px 10px 20px;
}

@media (prefers-reduced-motion: reduce) {
  html[data-cb-phone='1'] .cb-week-chip,
  html[data-cb-phone='1'] .cb-sa-cell,
  html[data-cb-phone='1'] .cb-disclose > summary::before,
  html[data-cb-phone='1'] .cb-sticky-save {
    transition: none;
    animation: none;
  }
}

/* ==========================================================================
   Tablet (≥700px) — FOR/SUP cellular tablets. Hub iframe is 410px so this
   media does not fire inside the phone preview frame.
   ========================================================================== */

@media (min-width: 700px) {
  html[data-cb-phone='1'] {
    --cb-dense-gap: 8px;
    --cb-dense-pad: 12px;
  }

  html[data-cb-phone='1'] .v2-main {
    padding: 14px 18px 28px;
    max-width: 1100px;
    margin: 0 auto;
  }

  html[data-cb-phone='1'] .cb-dense-panel__hint--tight {
    font-size: 10px;
  }

  /* Schedule Ahead: fill width with equal day columns + sticky headers */
  html[data-cb-phone='1'] .cb-sa-scroll {
    overflow-x: auto;
    max-height: min(62vh, 640px);
    overflow-y: auto;
  }

  html[data-cb-phone='1'] .cb-sa-grid {
    min-width: 100%;
  }

  html[data-cb-phone='1'] .cb-sa-row {
    display: grid;
    grid-template-columns: 120px repeat(var(--cb-sa-days, 10), minmax(0, 1fr));
    gap: 4px;
    align-items: stretch;
  }

  html[data-cb-phone='1'] .cb-sa-crew,
  html[data-cb-phone='1'] .cb-sa-crew--head {
    flex: unset;
    width: auto;
    min-width: 0;
  }

  html[data-cb-phone='1'] .cb-sa-crew {
    font-size: 11px;
    padding: 6px 8px 6px 4px;
    background: linear-gradient(90deg, #14100e 85%, rgba(20, 16, 14, 0.4));
  }

  html[data-cb-phone='1'] .cb-sa-crew__code {
    font-size: 8px;
  }

  html[data-cb-phone='1'] .cb-sa-dayhead {
    flex: unset;
    width: auto;
    min-width: 0;
    font-size: 9px;
    min-height: 32px;
  }

  html[data-cb-phone='1'] .cb-sa-cell {
    flex: unset;
    width: auto;
    min-width: 0;
    font-size: 9px;
    padding: 6px 4px;
  }

  html[data-cb-phone='1'] .cb-sa-row--head {
    position: sticky;
    top: 0;
    z-index: 4;
    background: #14100e;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  }

  html[data-cb-phone='1'] .cb-sa-row--head .cb-sa-crew {
    z-index: 5;
  }

  /* Review & Approve: tickets | daily sheets */
  html[data-cb-phone='1'] .cb-ra__title {
    font-size: 22px;
  }

  html[data-cb-phone='1'] .cb-ra__hint {
    font-size: 12px;
    margin-bottom: 14px;
  }

  html[data-cb-phone='1'] .cb-ra-desk {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    align-items: start;
  }

  html[data-cb-phone='1'] .cb-ra-desk__col {
    min-width: 0;
    position: sticky;
    top: 8px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-right: 2px;
  }

  html[data-cb-phone='1'] .cb-ra-desk__label {
    font-size: 12px;
    position: sticky;
    top: 0;
    z-index: 2;
    background: linear-gradient(180deg, #14100e 70%, rgba(20, 16, 14, 0));
    padding: 4px 0 8px;
  }

  html[data-cb-phone='1'] .cb-ticket-card.pc-card,
  html[data-cb-phone='1'] .cb-ds-card.pc-card {
    padding: 10px 12px !important;
  }

  html[data-cb-phone='1'] .cb-edit-inline__row {
    gap: 6px;
  }

  html[data-cb-phone='1'] .cb-week-chip__day {
    font-size: 9px;
  }

  html[data-cb-phone='1'] .cb-week-chip {
    min-width: 52px;
    flex: 1 1 52px;
  }
}
