body {
  min-height: 100vh;
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}

.app-shell {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(13, 110, 253, 0.08), transparent 32%),
    linear-gradient(180deg, rgba(248, 249, 250, 0.96), rgba(233, 236, 239, 0.92));
}

.app-frame {
  max-width: 980px;
}

.app-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 0 0.25rem;
}

.app-version {
  font-size: 0.82rem;
  color: var(--bs-secondary-color);
  letter-spacing: 0.04em;
}

.app-nav,
.scanner-card,
.accordion-item,
.form-control,
.form-text,
.btn,
.badge,
.submission-json,
.accordion-button,
.barcode-item,
.cycle-summary {
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.app-nav,
.scanner-card {
  border-radius: 1.25rem;
}

.nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1 1 auto;
  min-width: 0;
}

.nav-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
  flex: 1 1 480px;
  min-width: 0;
  flex-wrap: nowrap;
}

.app-logo {
  width: 36px;
  height: 36px;
  display: block;
  object-fit: contain;
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  font-weight: 700;
  color: #0d6efd;
}

.app-title {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  font-weight: 700;
  color: #0d6efd;
}

.module-links {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex: 0 1 auto;
  flex-wrap: wrap;
}

.module-link {
  border-radius: 999px;
  border: 1px solid rgba(13, 110, 253, 0.18);
  background: rgba(13, 110, 253, 0.08);
  color: #0b3d91;
  font-weight: 600;
  padding: 0.7rem 1rem;
  box-shadow: none;
}

.module-link:hover,
.module-link:focus-visible {
  background: rgba(13, 110, 253, 0.14);
  color: #0a2f72;
}

.module-link.is-active {
  background: #0d6efd;
  border-color: #0d6efd;
  color: #fff;
  box-shadow: 0 0.75rem 1.5rem rgba(13, 110, 253, 0.18);
}

.account-select-inline {
  min-width: 200px;
}

.floating-meta-bar {
  position: fixed;
  top: 0.85rem;
  left: 1rem;
  right: 1rem;
  z-index: 1100;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 0.85rem;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(13, 110, 253, 0.1);
  box-shadow: 0 0.5rem 1rem rgba(13, 110, 253, 0.08);
  backdrop-filter: blur(8px);
}

.floating-account-pill,
.floating-module-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #0b3d91;
}

.floating-module-pill {
  flex: 0 0 auto;
}

.floating-account-pill {
  flex: 0 0 auto;
}

.module-select {
  width: 100%;
  min-height: 2.5rem;
  padding: 0.45rem 2.3rem 0.45rem 0.85rem;
  border: 1px solid rgba(13, 110, 253, 0.18);
  border-radius: 0.75rem;
  background:
    linear-gradient(45deg, transparent 50%, currentColor 50%) calc(100% - 1.15rem) calc(50% - 0.15rem) / 0.5rem 0.5rem no-repeat,
    linear-gradient(135deg, currentColor 50%, transparent 50%) calc(100% - 0.8rem) calc(50% - 0.15rem) / 0.5rem 0.5rem no-repeat,
    rgba(13, 110, 253, 0.05);
  color: #0b3d91;
  font-weight: 600;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.module-select:hover,
.module-select:focus-visible {
  background:
    linear-gradient(45deg, transparent 50%, currentColor 50%) calc(100% - 1.15rem) calc(50% - 0.15rem) / 0.5rem 0.5rem no-repeat,
    linear-gradient(135deg, currentColor 50%, transparent 50%) calc(100% - 0.8rem) calc(50% - 0.15rem) / 0.5rem 0.5rem no-repeat,
    rgba(13, 110, 253, 0.1);
  color: #0a2f72;
}

.module-panel {
  animation: panel-in 0.22s ease;
}

.module-heading {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.module-heading-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.module-status {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.6rem;
}

.module-heading .scanner-status {
  margin-left: 0.15rem;
}

.module-heading .info-button {
  margin-left: auto;
}

.module-instructions {
  margin: 0;
  padding-left: 1.2rem;
}

.info-button {
  width: 1.7rem;
  height: 1.7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(13, 110, 253, 0.16);
  border-radius: 999px;
  background: rgba(13, 110, 253, 0.06);
  color: #0d6efd;
}

.info-button:hover,
.info-button:focus-visible {
  background: rgba(13, 110, 253, 0.12);
  color: #0a58ca;
}

.info-icon {
  width: 0.9rem;
  height: 0.9rem;
  display: inline-block;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16Zm.93-11.588-2.29.287-.082.38.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319.545 0 .877-.252 1.02-.598l.088-.416c.066-.293.123-.352.417-.417l.451-.083.082-.381-1.547-.287c-.293-.058-.352-.176-.293-.469l.738-3.468c.205-.96-.252-1.319-.92-1.319Zm-.812-2.29a1 1 0 1 0 0 2 1 1 0 0 0 0-2Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16Zm.93-11.588-2.29.287-.082.38.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319.545 0 .877-.252 1.02-.598l.088-.416c.066-.293.123-.352.417-.417l.451-.083.082-.381-1.547-.287c-.293-.058-.352-.176-.293-.469l.738-3.468c.205-.96-.252-1.319-.92-1.319Zm-.812-2.29a1 1 0 1 0 0 2 1 1 0 0 0 0-2Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.form-control-lg {
  font-size: 1.15rem;
}

#locationCode,
#productCode,
#cycleLocationCode,
#cycleProductCode,
.barcode-value {
  font-family: Consolas, "Courier New", monospace;
}

.scanner-status {
  font-size: 0.9rem;
  padding: 0.55rem 0.8rem;
}

.theme-toggle-wrap {
  position: relative;
  flex: 0 0 auto;
}

.footer-theme-toggle .theme-toggle-button {
  width: 1.65rem;
  height: 1.65rem;
  border-color: rgba(13, 110, 253, 0.12);
  background: rgba(13, 110, 253, 0.04);
  color: rgba(11, 61, 145, 0.78);
}

.footer-theme-toggle .theme-icon {
  width: 0.82rem;
  height: 0.82rem;
}

.theme-toggle-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.theme-toggle-button {
  width: 2.2rem;
  height: 2.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border: 1px solid rgba(13, 110, 253, 0.16);
  border-radius: 999px;
  background: rgba(13, 110, 253, 0.08);
  color: #0b3d91;
  cursor: pointer;
}

.theme-toggle-button:hover,
.theme-toggle-button:focus-visible {
  background: rgba(13, 110, 253, 0.14);
  color: #0a2f72;
}

.theme-toggle-input:focus-visible+.theme-toggle-button {
  outline: 2px solid rgba(13, 110, 253, 0.35);
  outline-offset: 2px;
}

.theme-icon {
  width: 1.1rem;
  height: 1.1rem;
  position: absolute;
  background-color: currentColor;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.theme-icon-sun {
  opacity: 1;
  transform: scale(1);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='M8 11a3 3 0 1 0 0-6 3 3 0 0 0 0 6Zm0 1a4 4 0 1 1 0-8 4 4 0 0 1 0 8Zm0-12a.5.5 0 0 1 .5.5V2a.5.5 0 0 1-1 0V.5A.5.5 0 0 1 8 0Zm0 14a.5.5 0 0 1 .5.5V16a.5.5 0 0 1-1 0v-1.5A.5.5 0 0 1 8 14Zm8-6a.5.5 0 0 1-.5.5H14a.5.5 0 0 1 0-1h1.5A.5.5 0 0 1 16 8ZM2 8a.5.5 0 0 1-.5.5H0a.5.5 0 0 1 0-1h1.5A.5.5 0 0 1 2 8Zm11.657-5.657a.5.5 0 0 1 0 .707L12.596 4.11a.5.5 0 1 1-.707-.707L12.95 2.343a.5.5 0 0 1 .707 0ZM4.11 12.596a.5.5 0 0 1 0 .707L3.05 14.364a.5.5 0 1 1-.707-.707l1.06-1.061a.5.5 0 0 1 .707 0Zm9.546 1.768a.5.5 0 0 1-.707 0l-1.06-1.06a.5.5 0 1 1 .707-.708l1.06 1.061a.5.5 0 0 1 0 .707ZM4.11 3.404a.5.5 0 0 1-.707 0L2.343 2.343a.5.5 0 0 1 .707-.707l1.06 1.06a.5.5 0 0 1 0 .708Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='M8 11a3 3 0 1 0 0-6 3 3 0 0 0 0 6Zm0 1a4 4 0 1 1 0-8 4 4 0 0 1 0 8Zm0-12a.5.5 0 0 1 .5.5V2a.5.5 0 0 1-1 0V.5A.5.5 0 0 1 8 0Zm0 14a.5.5 0 0 1 .5.5V16a.5.5 0 0 1-1 0v-1.5A.5.5 0 0 1 8 14Zm8-6a.5.5 0 0 1-.5.5H14a.5.5 0 0 1 0-1h1.5A.5.5 0 0 1 16 8ZM2 8a.5.5 0 0 1-.5.5H0a.5.5 0 0 1 0-1h1.5A.5.5 0 0 1 2 8Zm11.657-5.657a.5.5 0 0 1 0 .707L12.596 4.11a.5.5 0 1 1-.707-.707L12.95 2.343a.5.5 0 0 1 .707 0ZM4.11 12.596a.5.5 0 0 1 0 .707L3.05 14.364a.5.5 0 1 1-.707-.707l1.06-1.061a.5.5 0 0 1 .707 0Zm9.546 1.768a.5.5 0 0 1-.707 0l-1.06-1.06a.5.5 0 1 1 .707-.708l1.06 1.061a.5.5 0 0 1 0 .707ZM4.11 3.404a.5.5 0 0 1-.707 0L2.343 2.343a.5.5 0 0 1 .707-.707l1.06 1.06a.5.5 0 0 1 0 .708Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.theme-icon-moon {
  opacity: 0;
  transform: scale(0.7);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='M6 0a.5.5 0 0 1 .458.7A6.993 6.993 0 0 0 6 3.5C6 7.09 8.91 10 12.5 10c.963 0 1.88-.204 2.708-.571a.5.5 0 0 1 .652.652A8 8 0 1 1 5.919.14.5.5 0 0 1 6 0Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='M6 0a.5.5 0 0 1 .458.7A6.993 6.993 0 0 0 6 3.5C6 7.09 8.91 10 12.5 10c.963 0 1.88-.204 2.708-.571a.5.5 0 0 1 .652.652A8 8 0 1 1 5.919.14.5.5 0 0 1 6 0Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.theme-toggle-input:checked+.theme-toggle-button .theme-icon-sun {
  opacity: 0;
  transform: scale(0.7);
}

.theme-toggle-input:checked+.theme-toggle-button .theme-icon-moon {
  opacity: 1;
  transform: scale(1);
}

.action-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.cycle-count-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
}

.cycle-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 1rem;
  background: rgba(13, 110, 253, 0.04);
}

.summary-label {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--bs-secondary-color);
}

.barcode-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

.barcode-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.85);
}

.barcode-entry {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.barcode-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: #0d6efd;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
}

.barcode-value {
  overflow-wrap: anywhere;
  font-size: 1rem;
}

.icon-button {
  width: 2.5rem;
  height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(220, 53, 69, 0.2);
  border-radius: 999px;
  background: rgba(220, 53, 69, 0.08);
  color: #b02a37;
}

.icon-button:hover,
.icon-button:focus-visible {
  background: rgba(220, 53, 69, 0.14);
  border-color: rgba(220, 53, 69, 0.35);
}

.glyphicon.glyphicon-trash {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='M5.5 5.5A.5.5 0 0 1 6 6v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5Zm2.5.5a.5.5 0 0 0-1 0v6a.5.5 0 0 0 1 0V6Zm2.5-.5A.5.5 0 0 1 11 6v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5Z'/%3E%3Cpath fill='black' d='M14.5 3a1 1 0 0 1-1 1H13v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V4h-.5a1 1 0 0 1 0-2H5a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1h2.5a1 1 0 0 1 1 1ZM6 2v1h4V2H6Zm-2 2v9a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V4H4Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='M5.5 5.5A.5.5 0 0 1 6 6v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5Zm2.5.5a.5.5 0 0 0-1 0v6a.5.5 0 0 0 1 0V6Zm2.5-.5A.5.5 0 0 1 11 6v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5Z'/%3E%3Cpath fill='black' d='M14.5 3a1 1 0 0 1-1 1H13v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V4h-.5a1 1 0 0 1 0-2H5a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1h2.5a1 1 0 0 1 1 1ZM6 2v1h4V2H6Zm-2 2v9a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V4H4Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.submission-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.submission-item {
  border: 1px solid var(--bs-border-color);
  border-radius: 0.75rem;
  overflow: hidden;
}

.submission-button {
  padding: 0;
  background: transparent;
}

.submission-button:not(.collapsed) {
  box-shadow: none;
}

.submission-button:focus {
  box-shadow: none;
}

.submission-button::after {
  margin-right: 1rem;
}

.submission-summary {
  width: 100%;
  padding: 1rem 3.25rem 1rem 1rem;
}

.submission-summary-main {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.45rem;
}

.submission-date {
  font-weight: 700;
}

.submission-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  font-size: 0.95rem;
}

.result-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 700;
  flex: 0 0 auto;
}

.result-success {
  background-color: #198754;
  color: #fff;
}

.result-failure {
  background-color: #dc3545;
  color: #fff;
}

.submission-json {
  min-height: 120px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
  padding: 1rem;
  border-radius: 0.5rem;
  background: #111827;
  color: #f8f9fa;
}

.modal-content {
  border-radius: 1rem;
  border: 1px solid rgba(13, 110, 253, 0.12);
}

.modal-header {
  border-bottom-color: rgba(13, 110, 253, 0.12);
}

.modal-footer {
  border-top-color: rgba(13, 110, 253, 0.12);
}

.empty-state {
  border: 1px dashed var(--bs-border-color);
  border-radius: 0.75rem;
  padding: 1rem;
  color: var(--bs-secondary-color);
  background: rgba(0, 0, 0, 0.02);
}

.status-detail {
  font-size: 0.95rem;
  color: var(--bs-secondary-color);
}

.status-detail.is-success {
  color: #0f5132;
}

.status-detail.is-error {
  color: #842029;
}

@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
}

:root[data-theme="dark"] .app-shell {
  background:
    radial-gradient(circle at top left, rgba(13, 110, 253, 0.18), transparent 28%),
    linear-gradient(180deg, #0f1115, #151922);
}

:root[data-theme="dark"] body.bg-light {
  background: #0f1115 !important;
  color: #e6e6e6;
}

:root[data-theme="dark"] .bg-white {
  background: #262626 !important;
}

:root[data-theme="dark"] .border-bottom,
:root[data-theme="dark"] .border,
:root[data-theme="dark"] .card,
:root[data-theme="dark"] .dropdown-menu,
:root[data-theme="dark"] .modal-content,
:root[data-theme="dark"] .accordion-item,
:root[data-theme="dark"] .submission-item,
:root[data-theme="dark"] .empty-state,
:root[data-theme="dark"] .barcode-item,
:root[data-theme="dark"] .cycle-summary,
:root[data-theme="dark"] .module-link {
  border-color: rgba(255, 255, 255, 0.12) !important;
}

:root[data-theme="dark"] .card,
:root[data-theme="dark"] .dropdown-menu,
:root[data-theme="dark"] .form-control,
:root[data-theme="dark"] .form-select,
:root[data-theme="dark"] .modal-content,
:root[data-theme="dark"] .accordion-button,
:root[data-theme="dark"] .accordion-body,
:root[data-theme="dark"] .empty-state,
:root[data-theme="dark"] .barcode-item,
:root[data-theme="dark"] .cycle-summary,
:root[data-theme="dark"] .module-link {
  background: #262626 !important;
  color: #e6e6e6 !important;
}

:root[data-theme="dark"] .modal-header,
:root[data-theme="dark"] .modal-footer {
  border-color: rgba(255, 255, 255, 0.12);
}

:root[data-theme="dark"] .btn-close {
  filter: invert(1) grayscale(100%);
}

:root[data-theme="dark"] .module-link.is-active {
  background: #0d6efd !important;
  color: #fff !important;
}

:root[data-theme="dark"] .theme-toggle-button {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
  color: #f8f9fa;
}

:root[data-theme="dark"] .footer-theme-toggle .theme-toggle-button {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
  color: rgba(230, 230, 230, 0.75);
}

:root[data-theme="dark"] .info-button {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: #73a8ff;
}

:root[data-theme="dark"] .info-button:hover,
:root[data-theme="dark"] .info-button:focus-visible {
  background: rgba(255, 255, 255, 0.1);
  color: #9ec2ff;
}

:root[data-theme="dark"] .floating-meta-bar {
  background: rgba(38, 38, 38, 0.92);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.22);
}

:root[data-theme="dark"] .floating-account-pill,
:root[data-theme="dark"] .floating-module-pill {
  color: #e6e6e6;
}

:root[data-theme="dark"] .module-select {
  border-color: rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(45deg, transparent 50%, currentColor 50%) calc(100% - 1.15rem) calc(50% - 0.15rem) / 0.5rem 0.5rem no-repeat,
    linear-gradient(135deg, currentColor 50%, transparent 50%) calc(100% - 0.8rem) calc(50% - 0.15rem) / 0.5rem 0.5rem no-repeat,
    #262626;
  color: #e6e6e6;
}

:root[data-theme="dark"] .module-select:hover,
:root[data-theme="dark"] .module-select:focus-visible {
  background:
    linear-gradient(45deg, transparent 50%, currentColor 50%) calc(100% - 1.15rem) calc(50% - 0.15rem) / 0.5rem 0.5rem no-repeat,
    linear-gradient(135deg, currentColor 50%, transparent 50%) calc(100% - 0.8rem) calc(50% - 0.15rem) / 0.5rem 0.5rem no-repeat,
    #2d2d2d;
}

:root[data-theme="dark"] .form-control::placeholder {
  color: rgba(230, 230, 230, 0.6);
}

:root[data-theme="dark"] .text-secondary {
  color: rgba(230, 230, 230, 0.65) !important;
}

:root[data-theme="dark"] .text-muted,
:root[data-theme="dark"] .form-text,
:root[data-theme="dark"] .summary-label {
  color: rgba(230, 230, 230, 0.65) !important;
}

:root[data-theme="dark"] .dropdown-item {
  color: #e6e6e6;
}

:root[data-theme="dark"] .dropdown-item:hover,
:root[data-theme="dark"] .dropdown-item:focus {
  background: rgba(255, 255, 255, 0.08);
}

:root[data-theme="dark"] .badge.text-bg-light {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #e6e6e6 !important;
}

:root[data-theme="dark"] .navbar-brand {
  color: #ffffff !important;
}

:root[data-theme="dark"] .form-label,
:root[data-theme="dark"] .form-check-label,
:root[data-theme="dark"] h1,
:root[data-theme="dark"] h2,
:root[data-theme="dark"] h3,
:root[data-theme="dark"] strong,
:root[data-theme="dark"] .submission-date,
:root[data-theme="dark"] .submission-meta,
:root[data-theme="dark"] .btn-outline-secondary {
  color: #f8f9fa !important;
}

:root[data-theme="dark"] .btn-outline-secondary {
  border-color: rgba(255, 255, 255, 0.2);
}

:root[data-theme="dark"] .btn-outline-secondary:hover {
  background-color: rgba(255, 255, 255, 0.08);
  color: #fff;
}

:root[data-theme="dark"] .icon-button {
  background: rgba(220, 53, 69, 0.14);
  border-color: rgba(220, 53, 69, 0.32);
  color: #ffc7cf;
}

:root[data-theme="dark"] .accordion-button:not(.collapsed) {
  background: #2d2d2d !important;
  color: #f8f9fa !important;
}

:root[data-theme="dark"] .accordion-button::after {
  filter: invert(1);
}

:root[data-theme="dark"] .submission-json {
  background: #171717;
  color: #e6e6e6;
}

:root[data-theme="dark"] .empty-state {
  background: rgba(255, 255, 255, 0.03) !important;
}

:root[data-theme="dark"] .status-detail.is-success {
  color: #c7f1d7;
}

:root[data-theme="dark"] .status-detail.is-error {
  color: #ffc7cf;
}

:root[data-theme="dark"] .eyebrow {
  color: #73a8ff;
}

:root[data-theme="dark"] .app-title {
  color: #73a8ff;
}

:root[data-theme="dark"] .app-version {
  color: rgba(230, 230, 230, 0.6);
}

@media (min-width: 768px) {
  .nav-header {
    flex-wrap: nowrap;
  }

  .brand-group {
    flex: 1 1 auto;
  }

  .nav-actions {
    flex: 0 1 auto;
  }

  .cycle-count-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  }
}

@media (max-width: 576px) {
  .submission-summary {
    padding-right: 3rem;
  }

  .submission-meta {
    flex-direction: column;
    gap: 0.35rem;
  }

  .nav-actions,
  .action-row,
  .module-links {
    width: 100%;
  }

  .nav-actions {
    flex-wrap: wrap;
  }

  .brand-group {
    flex: 1 1 auto;
    min-width: 0;
  }

  .account-select-inline,
  .module-link,
  .module-select,
  .action-row .btn {
    width: 100%;
  }

  .account-select-inline {
    min-width: 0;
  }

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

  .nav-header {
    align-items: center;
  }

  .barcode-item {
    grid-template-columns: auto 1fr;
  }

  .barcode-item .btn {
    grid-column: 1 / -1;
  }

  .cycle-summary {
    grid-template-columns: 1fr;
  }

  .floating-meta-bar {
    top: 0rem;
    left: 0rem;
    right: 0rem;
    gap: 0.65rem;
    padding: 0.45rem 0.7rem;
  }

}