/*
 * Utilities and focused UI components added after the pinned Tailwind build.
 * Named component rules keep the shell and Accounts workspace independent of
 * generated utility availability; fold them into app.css on its next rebuild.
 */
.min-h-10 {
  min-height: 2.5rem;
}

.min-h-11 {
  min-height: 2.75rem;
}

.min-w-64 {
  min-width: 16rem;
}

.break-words {
  overflow-wrap: break-word;
}

.transition-transform {
  transition-property: transform;
  transition-duration: 150ms;
}

.border-brand-500 {
  border-color: #0f766e;
}

.border-amber-500 {
  border-color: #f59e0b;
}

.pb-6 {
  padding-bottom: 1.5rem;
}

.disabled\:opacity-40:disabled {
  opacity: 0.4;
}

.hover\:text-brand-900:hover {
  color: #134e4a;
}

/* Compact command launcher. These named rules avoid coupling a frequently
 * rendered shell interaction to generated utility-class availability. */
.command-palette-backdrop {
  padding-top: clamp(1rem, 10vh, 6rem);
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(2px);
}

.command-palette {
  width: min(100%, 42rem);
  max-height: min(78vh, 42rem);
  border: 1px solid var(--line);
  border-radius: 1.125rem;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.24);
  animation: command-palette-enter 140ms ease-out;
}

@keyframes command-palette-enter {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.command-palette-search {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  height: 4rem;
  padding: 0 1.125rem;
  border-bottom: 1px solid var(--line-soft);
  box-shadow: inset 0 -2px transparent;
  transition: box-shadow 150ms ease;
}

.command-palette-search:focus-within {
  box-shadow: inset 0 -2px var(--accent);
}

.command-palette-search__icon {
  flex: none;
  color: var(--ink-3);
  font-size: 1.375rem;
}

.command-palette-search__input {
  min-width: 0;
  flex: 1;
  height: 100%;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 1rem;
  box-shadow: none !important;
}

.command-palette-search__input:focus,
.command-palette-search__input:focus-visible {
  outline: 0;
  box-shadow: none !important;
}

.command-palette-close {
  min-height: 2rem;
  padding: 0 0.55rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  color: var(--ink-3);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  transition: border-color 150ms ease, color 150ms ease, background 150ms ease;
}

.command-palette-close:hover {
  border-color: #86baac;
  background: var(--accent-soft);
  color: var(--accent);
}

.command-palette-results {
  max-height: calc(min(78vh, 42rem) - 4rem);
  padding: 0.625rem 0.75rem 0.75rem;
}

.command-palette-section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2rem;
  padding: 0 0.375rem 0.25rem;
  color: var(--ink-3);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.command-palette-section-title .ms {
  color: var(--accent);
  font-size: 1.125rem;
}

.command-palette-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.25rem;
}

.command-palette-action {
  display: flex;
  min-width: 0;
  min-height: 3.625rem;
  align-items: center;
  gap: 0.6875rem;
  padding: 0.5rem 0.625rem;
  border: 1px solid transparent;
  border-radius: 0.75rem;
  transition: border-color 150ms ease, background 150ms ease;
}

.command-palette-action:hover {
  border-color: rgba(15, 107, 92, 0.16);
  background: var(--accent-soft);
}

.command-palette-action:focus-visible {
  border-color: var(--accent);
  outline: 0;
  box-shadow: 0 0 0 2px rgba(15, 107, 92, 0.16);
}

.command-palette-action__icon {
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  flex: 0 0 2.5rem;
  place-items: center;
  border-radius: 0.625rem;
  background: var(--accent-soft);
  color: var(--accent);
}

.command-palette-action__glyph {
  display: block;
  width: 1em;
  height: 1em;
  font-size: 1.25rem;
  line-height: 1;
  text-align: center;
  font-variation-settings: "opsz" 24, "wght" 350, "FILL" 0, "GRAD" 0;
}

.command-palette-action__copy,
.command-palette-action__title,
.command-palette-action__sub {
  display: block;
  min-width: 0;
}

.command-palette-action__copy {
  overflow: hidden;
}

.command-palette-action__title,
.command-palette-action__sub {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.command-palette-action__title {
  color: var(--ink);
  font-size: 0.90625rem;
  font-weight: 650;
  line-height: 1.25rem;
}

.command-palette-action__sub {
  margin-top: 0.0625rem;
  color: var(--ink-3);
  font-size: 0.78125rem;
  line-height: 1rem;
}

.command-palette-hint {
  margin-top: 0.5rem;
  padding: 0.75rem 0.5rem 0.125rem;
  border-top: 1px solid var(--line-soft);
  color: var(--ink-3);
  font-size: 0.75rem;
  text-align: center;
}

.command-palette-empty {
  padding: 2rem 1rem;
  color: var(--ink-3);
  font-size: 0.875rem;
  text-align: center;
}

@media (min-width: 640px) {
  .command-palette-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 639px) {
  .command-palette-backdrop {
    padding: 0.75rem;
  }

  .command-palette {
    max-height: calc(100dvh - 1.5rem);
    border-radius: 1rem;
  }

  .command-palette-results {
    max-height: calc(100dvh - 5.5rem);
  }
}

/* Accounts Today: one dense action queue with a small entry rail. */
.accounts-today {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.accounts-today-summary {
  display: grid;
  overflow: hidden;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 0.875rem;
  background: var(--card);
}

.accounts-today-summary__item {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 6.5rem;
  align-items: center;
  gap: 0.875rem;
  padding: 1rem 1.125rem;
  border-right: 1px solid var(--line);
  transition: background 150ms ease;
}

.accounts-today-summary__item:last-child {
  border-right: 0;
}

.accounts-today-summary__item:hover {
  background: var(--accent-soft);
}

.accounts-today-summary__icon {
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  flex: 0 0 2.5rem;
  place-items: center;
  border-radius: 0.625rem;
  background: var(--accent-soft);
  color: var(--accent);
}

.accounts-today-summary__glyph {
  font-size: 1.25rem;
}

.accounts-today-summary__copy,
.accounts-today-summary__label,
.accounts-today-summary__value,
.accounts-today-summary__note {
  display: block;
  min-width: 0;
}

.accounts-today-summary__copy {
  flex: 1;
}

.accounts-today-summary__label {
  color: var(--ink-3);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.accounts-today-summary__value {
  margin-top: 0.2rem;
  overflow: hidden;
  color: var(--ink);
  font-size: clamp(1.25rem, 1.6vw, 1.625rem);
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.accounts-today-summary__note {
  margin-top: 0.3rem;
  overflow: hidden;
  color: var(--ink-3);
  font-size: 0.75rem;
  line-height: 1rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.accounts-today-summary__note--danger {
  color: #b91c1c;
  font-weight: 700;
}

.accounts-today-summary__arrow {
  color: var(--ink-3);
  font-size: 1rem;
  opacity: 0;
  transform: translateX(-3px);
  transition: opacity 150ms ease, transform 150ms ease;
}

.accounts-today-summary__item:hover .accounts-today-summary__arrow {
  opacity: 1;
  transform: translateX(0);
}

.accounts-today-layout {
  display: grid;
  align-items: start;
  grid-template-columns: minmax(0, 1fr) 23rem;
  gap: 1.25rem;
}

.accounts-today-queue,
.accounts-today-fast {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0.875rem;
  background: var(--card);
}

.accounts-today-section-header,
.accounts-today-fast > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.125rem;
  border-bottom: 1px solid var(--line-soft);
}

.accounts-today-section-header h2,
.accounts-today-fast h2 {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 800;
}

.accounts-today-section-header p,
.accounts-today-fast p {
  margin-top: 0.2rem;
  color: var(--ink-3);
  font-size: 0.75rem;
  line-height: 1rem;
}

.accounts-today-count {
  flex: none;
  padding: 0.35rem 0.625rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.6875rem;
  font-weight: 650;
}

.accounts-today-count strong {
  font-size: 0.8125rem;
}

.accounts-today-task {
  display: flex;
  min-width: 0;
  min-height: 5rem;
  align-items: center;
  gap: 0.875rem;
  padding: 0.875rem 1.125rem;
  border-bottom: 1px solid var(--line-soft);
}

.accounts-today-task__icon {
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  flex: 0 0 2.5rem;
  place-items: center;
  border-radius: 0.625rem;
}

.accounts-today-task__glyph {
  font-size: 1.125rem;
}

.accounts-today-task__icon--danger {
  background: #fef2f2;
  color: #b91c1c;
}

.accounts-today-task__icon--warning {
  background: #fffbeb;
  color: #b45309;
}

.accounts-today-task__icon--waiting {
  background: #f1f5f9;
  color: #475569;
}

.accounts-today-task__icon--normal {
  background: var(--accent-soft);
  color: var(--accent);
}

.accounts-today-task__copy {
  min-width: 0;
  flex: 1;
}

.accounts-today-task__copy h3 {
  color: var(--ink);
  font-size: 0.9375rem;
  font-weight: 750;
  line-height: 1.25rem;
}

.accounts-today-task__copy p {
  margin-top: 0.15rem;
  color: var(--ink-3);
  font-size: 0.78125rem;
  line-height: 1.125rem;
}

.accounts-today-task__waiting {
  display: block;
  margin-top: 0.25rem;
  color: var(--ink-2);
  font-size: 0.6875rem;
  font-weight: 700;
}

.accounts-today-task__button {
  display: inline-flex;
  min-height: 2.375rem;
  flex: none;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 0.625rem;
  color: var(--ink-2);
  font-size: 0.78125rem;
  font-weight: 700;
  transition: border-color 150ms ease, background 150ms ease, color 150ms ease;
}

.accounts-today-task__button:hover {
  border-color: #86baac;
  background: var(--accent-soft);
  color: var(--accent);
}

.accounts-today-task__button--primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.accounts-today-task__button--primary:hover {
  border-color: #0b5147;
  background: #0b5147;
  color: #fff;
}

.accounts-today-clear {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.5rem 1.125rem;
  border-bottom: 1px solid var(--line-soft);
}

.accounts-today-clear > .ms {
  color: #059669;
  font-size: 2rem;
}

.accounts-today-clear h3 {
  color: #047857;
  font-size: 0.9375rem;
  font-weight: 800;
}

.accounts-today-clear p {
  margin-top: 0.15rem;
  color: var(--ink-3);
  font-size: 0.75rem;
}

.accounts-today-books {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.125rem;
  background: rgba(15, 107, 92, 0.035);
}

.accounts-today-books__icon {
  display: grid;
  width: 1.5rem;
  height: 1.5rem;
  flex: 0 0 1.5rem;
  place-items: center;
  color: var(--accent);
}

.accounts-today-books__glyph {
  font-size: 1.25rem;
}

.accounts-today-books__copy {
  min-width: 0;
  flex: 1;
}

.accounts-today-books__copy > div {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.accounts-today-books__copy strong {
  color: var(--ink);
  font-size: 0.75rem;
}

.accounts-today-books__copy p {
  margin-top: 0.125rem;
  color: var(--ink-3);
  font-size: 0.6875rem;
  line-height: 1rem;
}

.accounts-today-books__status {
  padding: 0.15rem 0.4rem;
  border-radius: 999px;
  font-size: 0.5625rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.accounts-today-books__status--on {
  background: #d1fae5;
  color: #047857;
}

.accounts-today-books__status--off {
  background: #fef3c7;
  color: #92400e;
}

.accounts-today-books > a {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 0.25rem;
  color: var(--accent);
  font-size: 0.6875rem;
  font-weight: 700;
}

.accounts-today-books > a .ms {
  font-size: 0.875rem;
}

.accounts-today-fast > header {
  display: block;
}

.accounts-today-fast__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  padding: 0.875rem;
}

.accounts-today-fast__action {
  display: flex;
  min-width: 0;
  min-height: 4rem;
  align-items: center;
  gap: 0.625rem;
  padding: 0.55rem 0.625rem;
  border: 1px solid var(--line);
  border-radius: 0.625rem;
  transition: border-color 150ms ease, background 150ms ease;
}

.accounts-today-fast__action:hover {
  border-color: #86baac;
  background: var(--accent-soft);
}

.accounts-today-fast__icon {
  display: grid;
  width: 2rem;
  height: 2rem;
  flex: 0 0 2rem;
  place-items: center;
  border-radius: 0.5rem;
  background: var(--accent-soft);
  color: var(--accent);
}

.accounts-today-fast__glyph {
  font-size: 1rem;
}

.accounts-today-summary__glyph,
.accounts-today-task__glyph,
.accounts-today-books__glyph,
.accounts-today-fast__glyph {
  display: block;
  width: 1em;
  height: 1em;
  line-height: 1;
  text-align: center;
  font-variation-settings: "opsz" 24, "wght" 350, "FILL" 0, "GRAD" 0;
}

.accounts-today-fast__action > span:last-child,
.accounts-today-fast__action strong,
.accounts-today-fast__action small {
  display: block;
  min-width: 0;
}

.accounts-today-fast__action > span:last-child {
  overflow: hidden;
}

.accounts-today-fast__action strong,
.accounts-today-fast__action small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.accounts-today-fast__action strong {
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1rem;
}

.accounts-today-fast__action small {
  margin-top: 0.1rem;
  color: var(--ink-3);
  font-size: 0.65625rem;
  line-height: 0.875rem;
}

html.theme-dark .accounts-today-task__icon--danger {
  background: #3a1d22;
  color: #fca5a5;
}

html.theme-dark .accounts-today-task__icon--warning {
  background: #392b17;
  color: #fcd34d;
}

html.theme-dark .accounts-today-task__icon--waiting {
  background: #252c36;
  color: #cbd5e1;
}

@media (max-width: 1023px) {
  .accounts-today-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  .accounts-today-summary {
    grid-template-columns: 1fr;
  }

  .accounts-today-summary__item {
    min-height: 5.75rem;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .accounts-today-summary__item:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 639px) {
  .accounts-today-task {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .accounts-today-task__copy {
    width: calc(100% - 3.375rem);
    flex: auto;
  }

  .accounts-today-task__button {
    width: 100%;
  }

  .accounts-today-books {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .accounts-today-books > a {
    width: 100%;
    padding-left: 2rem;
  }

  .accounts-today-fast__grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 640px) {
  .sm\:absolute {
    position: absolute;
  }

  .sm\:right-0 {
    right: 0;
  }
}

@media (min-width: 1024px) {
  .material-receipt-layout {
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  }
}

/* Keep material balances and correction controls together on narrow screens. */
@media (max-width: 767px) {
  :is(.stock-responsive-table, .quality-responsive-table) { min-width: 0; }
  :is(.stock-responsive-table, .quality-responsive-table) thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  :is(.stock-responsive-table, .quality-responsive-table) tbody, :is(.stock-responsive-table, .quality-responsive-table) tr { display: block; }
  :is(.stock-responsive-table, .quality-responsive-table) td[data-label] { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: .5rem 1rem; text-align: right; }
  :is(.stock-responsive-table, .quality-responsive-table) td[data-label]::before { content: attr(data-label); color: #475569; font-size: .75rem; font-weight: 500; text-align: left; }
  :is(.stock-responsive-table, .quality-responsive-table) td[data-label]:first-child { display: block; text-align: left; padding-top: 1rem; }
  :is(.stock-responsive-table, .quality-responsive-table) td[data-label]:first-child::before { display: none; }
  :is(.stock-responsive-table, .quality-responsive-table) td[data-label]:last-child { padding-bottom: 1rem; }
}

@media (max-width: 767px) {
  .quality-responsive-table td[data-label] > div { min-width: 0; overflow-wrap: anywhere; }
  .stock-responsive-table td[data-label]:last-child { display: block; }
  .stock-responsive-table td[data-label]:last-child::before { display: none; }
  .stock-responsive-table td[data-label]:last-child details { display: block; }
  .stock-responsive-table [data-stock-adjustment-form] { width: 100%; }
}

/* Floor register controls share a usable touch size with the operator screens. */
.attendance-register [class~="min-h-[44px]"] { min-height: 44px; }
.attendance-register .attendance-date-step { width: 44px; min-width: 44px; height: 44px; flex-shrink: 0; }
.attendance-register .attendance-filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.attendance-register .attendance-filters a { min-height: 44px; justify-content: center; }
.attendance-register .attendance-filters a[aria-current="page"] { background: var(--accent); color: #fff; }
.attendance-register .attendance-search-bar input[type="search"] { height: 44px; }
.attendance-register .attendance-search-bar { align-items: end; }
@media (min-width: 768px) {
  .attendance-register .attendance-filters { display: flex; }
}
@media (min-width: 1024px) {
  .attendance-register .attendance-search-bar { grid-template-columns: minmax(0, 1fr) 240px 320px; }
}
