html,
body {
  min-height: 100vh;
}

body {
  margin: 0;
  color: #1f2937;
  background: #f6f7f9;
}

.bi {
  vertical-align: -.125em;
}

.app-shell {
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
  background: #f6f7f9;
}

.app-sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex: 0 0 272px;
  flex-direction: column;
  width: 272px;
  height: 100vh;
  padding: 1rem;
  background: #fff;
  border-right: 1px solid #dfe5ec;
}

.app-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 7.25rem;
  margin-bottom: 1rem;
  padding: .75rem;
  text-decoration: none;
  border-bottom: 1px solid #edf1f5;
}

.app-brand img {
  width: 7.25rem;
  max-width: 72%;
  height: auto;
}

.app-nav {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 1.15rem;
}

.app-nav-section {
  display: flex;
  flex-direction: column;
  gap: .25rem;
}

.app-nav-label {
  padding: 0 .65rem .25rem;
  font-size: .72rem;
  font-weight: 800;
  color: #667085;
}

.app-nav-link {
  display: flex;
  align-items: center;
  gap: .65rem;
  min-height: 2.55rem;
  padding: .55rem .65rem;
  color: #344054;
  text-decoration: none;
  border-radius: 8px;
}

.app-nav-link:hover,
.app-nav-link:focus {
  color: #111827;
  background: #f2f4f7;
}

.app-nav-link.active {
  color: #0d6efd;
  background: #eef5ff;
}

.app-nav-link .bi {
  display: inline-flex;
  justify-content: center;
  width: 1.15rem;
  font-size: 1rem;
}

.app-sidebar-footer {
  display: flex;
  align-items: center;
  gap: .45rem;
  padding-top: 1rem;
  margin-top: 1rem;
  font-size: .78rem;
  font-weight: 700;
  color: #667085;
  border-top: 1px solid #edf1f5;
}

.app-footer-dot {
  width: .5rem;
  height: .5rem;
  background: #198754;
  border-radius: 999px;
}

.app-content {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 100vh;
}

.app-empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  min-height: 100vh;
  padding: 2rem;
  text-align: center;
}

.app-empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  margin-bottom: 1rem;
  color: #0d6efd;
  background: #eef5ff;
  border: 1px solid #d8e7ff;
  border-radius: 8px;
}

.app-empty-state h1 {
  margin: 0 0 .35rem;
  font-size: 1.3rem;
  font-weight: 700;
  color: #111827;
}

.app-empty-state p {
  margin: 0;
  color: #667085;
}

@media (max-width: 991.98px) {
  .app-shell {
    flex-direction: column;
  }

  .app-sidebar {
    position: relative;
    width: 100%;
    height: auto;
    flex-basis: auto;
    border-right: 0;
    border-bottom: 1px solid #dfe5ec;
  }

  .app-brand {
    justify-content: flex-start;
    min-height: auto;
    margin-bottom: .75rem;
    padding: 0 0 .75rem;
  }

  .app-brand img {
    width: 5.75rem;
    max-width: none;
  }

  .app-nav {
    flex: 0 0 auto;
    gap: .75rem;
  }

  .app-nav-section {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .app-nav-label {
    width: 100%;
    padding-left: .1rem;
  }

  .app-nav-link {
    flex: 1 1 12rem;
  }

  .app-sidebar-footer {
    display: none;
  }
}

.modulus-page {
  min-height: 100vh;
  margin: 0;
  padding: 1.5rem;
  color: #1f2937;
  background: #f6f7f9;
}

.modulus-content {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
}

.modulus-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #dfe5ec;
}

.modulus-kicker {
  margin-bottom: .25rem;
  font-size: .78rem;
  font-weight: 700;
  color: #667085;
}

.modulus-title {
  font-size: 1.45rem;
  font-weight: 700;
  color: #111827;
}

.modulus-env-badge {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .4rem .65rem;
  font-weight: 700;
}

.modulus-env-badge .bi {
  font-size: .45rem;
}

.modulus-panel {
  padding: 1rem;
  background: #fff;
  border: 1px solid #dfe5ec;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}

.modulus-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.modulus-panel-title {
  margin: 0;
  font-size: .98rem;
  font-weight: 700;
  color: #111827;
}

.modulus-panel-subtitle {
  margin-top: .15rem;
  font-size: .82rem;
  color: #667085;
}

.modulus-panel-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  color: #0d6efd;
  background: #eef5ff;
  border: 1px solid #d8e7ff;
  border-radius: 8px;
}

.modulus-primary-action,
.modulus-row-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  white-space: nowrap;
}

.modulus-page .form-label {
  margin-bottom: .35rem;
  font-size: .82rem;
  font-weight: 700;
  color: #4b5563;
}

.modulus-page .form-control,
.modulus-page .input-group-text {
  border-color: #d0d7de;
}

.modulus-page .input-group-text {
  min-width: 3.25rem;
  justify-content: center;
  color: #667085;
  background: #f8fafc;
}

.modulus-progress {
  height: .8rem;
  background: #e8edf3;
  border-radius: 999px;
}

.modulus-progress .progress-bar {
  background-color: #0d6efd;
}

.modulus-progress-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .75rem;
  margin-top: .9rem;
}

.modulus-meta-item {
  min-height: 4rem;
  padding: .7rem .75rem;
  background: #f8fafc;
  border: 1px solid #edf1f5;
  border-radius: 8px;
}

.modulus-meta-label {
  display: block;
  margin-bottom: .2rem;
  font-size: .75rem;
  font-weight: 700;
  color: #667085;
}

.modulus-meta-item strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: .95rem;
  color: #111827;
}

.modulus-status-log {
  display: flex;
  flex-direction: column;
  gap: .3rem;
  margin-top: .85rem;
  padding-left: .75rem;
  font-size: .84rem;
  color: #667085;
  border-left: 2px solid #cfd7e3;
}

.modulus-status-log:empty {
  display: none;
}

.modulus-status-item {
  overflow-wrap: anywhere;
}

.modulus-send-panel {
  border-color: #cfe0ff;
  background: #fbfdff;
}

.modulus-table-wrap {
  border: 1px solid #dfe5ec;
  border-radius: 8px;
  overflow: hidden;
}

.modulus-table {
  min-width: 920px;
}

.modulus-table thead th {
  padding: .7rem .75rem;
  font-size: .76rem;
  font-weight: 700;
  color: #4b5563;
  white-space: nowrap;
  background: #f8fafc;
  border-bottom: 1px solid #dfe5ec;
}

.modulus-table tbody td {
  padding: .72rem .75rem;
  vertical-align: middle;
  border-color: #edf1f5;
}

.modulus-table tbody tr:hover {
  background: #fbfcfe;
}

.modulus-company,
.modulus-client-doc {
  font-weight: 700;
  color: #111827;
}

.modulus-client-name,
.modulus-status-detail {
  margin-top: .15rem;
  font-size: .78rem;
  color: #667085;
}

.modulus-delay {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  padding: .2rem .45rem;
  font-weight: 700;
  color: #344054;
  background: #f2f4f7;
  border-radius: 999px;
}

@media (max-width: 767.98px) {
  .modulus-page {
    padding: 1rem;
  }

  .modulus-header,
  .modulus-panel-header {
    align-items: stretch;
    flex-direction: column;
  }

  .modulus-primary-action {
    width: 100%;
  }

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

.ops-page {
  min-height: 100vh;
  margin: 0;
  padding: 1.5rem;
  color: #1f2937;
  background: #f6f7f9;
}

.ops-content {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
}

.ops-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #dfe5ec;
}

.ops-kicker {
  margin-bottom: .25rem;
  font-size: .78rem;
  font-weight: 700;
  color: #667085;
}

.ops-title {
  font-size: 1.45rem;
  font-weight: 700;
  color: #111827;
}

.ops-env-badge,
.ops-count-badge {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .4rem .65rem;
  font-weight: 700;
}

.ops-env-badge .bi {
  font-size: .45rem;
}

.ops-panel {
  padding: 1rem;
  background: #fff;
  border: 1px solid #dfe5ec;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}

.ops-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.ops-panel-title {
  margin: 0;
  font-size: .98rem;
  font-weight: 700;
  color: #111827;
}

.ops-panel-subtitle {
  margin-top: .15rem;
  font-size: .82rem;
  color: #667085;
}

.ops-panel-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  color: #0d6efd;
  background: #eef5ff;
  border: 1px solid #d8e7ff;
  border-radius: 8px;
}

.ops-primary-action,
.ops-row-actions,
.ops-icon-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
}

.ops-primary-action {
  white-space: nowrap;
}

.ops-row-actions {
  gap: .4rem;
}

.ops-icon-action {
  width: 2rem;
  height: 2rem;
  padding: 0;
}

.ops-page .form-label {
  margin-bottom: .35rem;
  font-size: .82rem;
  font-weight: 700;
  color: #4b5563;
}

.ops-page .form-control,
.ops-page .input-group-text {
  border-color: #d0d7de;
}

.ops-page .input-group-text {
  min-width: 5.5rem;
  justify-content: center;
  color: #667085;
  background: #f8fafc;
}

.ops-status-log {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  padding-left: .75rem;
  font-size: .86rem;
  color: #667085;
  border-left: 2px solid #cfd7e3;
}

.ops-status-log:empty {
  display: none;
}

.ops-status-item {
  overflow-wrap: anywhere;
}

.upload-dropzone {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 8rem;
  padding: 1rem;
  cursor: pointer;
  background: #f8fafc;
  border: 1px dashed #aebccc;
  border-radius: 8px;
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}

.upload-dropzone:hover,
.upload-dropzone.is-dragover {
  background: #eef5ff;
  border-color: #0d6efd;
  box-shadow: 0 0 0 .2rem rgba(13, 110, 253, .08);
}

.upload-dropzone.has-file {
  background: #ecfdf3;
  border-color: #75d6a0;
}

.upload-drop-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 3rem;
  width: 3rem;
  height: 3rem;
  color: #0d6efd;
  background: #fff;
  border: 1px solid #d8e7ff;
  border-radius: 8px;
}

.upload-drop-icon .bi {
  font-size: 1.35rem;
}

.upload-drop-copy {
  display: block;
  min-width: 0;
}

.upload-drop-copy strong,
.upload-drop-copy small {
  display: block;
}

.upload-drop-copy strong {
  overflow: hidden;
  color: #111827;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-drop-copy small {
  margin-top: .2rem;
  color: #667085;
}

.upload-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.upload-table {
  min-width: 980px;
}

.upload-client-cell {
  min-width: 16rem;
}

.upload-code {
  display: inline-block;
  max-width: 18rem;
  overflow: hidden;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: .78rem;
  text-overflow: ellipsis;
  vertical-align: middle;
  white-space: nowrap;
}

.ops-table-wrap {
  border: 1px solid #dfe5ec;
  border-radius: 8px;
  overflow: hidden;
}

.ops-table {
  min-width: 780px;
}

.ops-table thead th {
  padding: .7rem .75rem;
  font-size: .76rem;
  font-weight: 700;
  color: #4b5563;
  white-space: nowrap;
  background: #f8fafc;
  border-bottom: 1px solid #dfe5ec;
}

.ops-table tbody td {
  padding: .72rem .75rem;
  vertical-align: middle;
  border-color: #edf1f5;
}

.ops-table tbody tr:hover {
  background: #fbfcfe;
}

.ops-row-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 1.6rem;
  font-weight: 700;
  color: #344054;
  background: #f2f4f7;
  border-radius: 999px;
}

.ops-strong {
  font-weight: 700;
  color: #111827;
}

.ops-pagination {
  display: flex;
  justify-content: flex-end;
  margin-top: 1rem;
}

.ops-pagination .page-link {
  color: #344054;
  border-color: #dfe5ec;
}

.ops-pagination .active .page-link {
  color: #fff;
  background: #0d6efd;
  border-color: #0d6efd;
}

.ops-overlay {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 1060;
  background: rgba(17, 24, 39, .48);
}

.ops-alert-box {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 1061;
  display: none;
  width: min(340px, calc(100vw - 2rem));
  padding: 1.25rem;
  text-align: center;
  background: #fff;
  border: 1px solid #dfe5ec;
  border-radius: 8px;
  box-shadow: 0 20px 45px rgba(16, 24, 40, .18);
  transform: translate(-50%, -50%);
}

.ops-alert-box .bi {
  margin-bottom: .55rem;
  font-size: 2rem;
  color: #198754;
}

.ops-alert-box.ops-alert-error .bi {
  color: #dc3545;
}

.ops-modal-content {
  border: 1px solid #dfe5ec;
  border-radius: 8px;
}

.config-mode-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
}

.config-mode-option {
  display: flex;
  align-items: center;
  gap: .75rem;
  min-height: 4.5rem;
  padding: .9rem;
  cursor: pointer;
  background: #f8fafc;
  border: 1px solid #dfe5ec;
  border-radius: 8px;
}

.config-mode-option:hover {
  background: #f2f4f7;
}

.btn-check:checked + .config-mode-option {
  background: #eef5ff;
  border-color: #9ec5fe;
  box-shadow: 0 0 0 .2rem rgba(13, 110, 253, .08);
}

.config-mode-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 2.3rem;
  width: 2.3rem;
  height: 2.3rem;
  background: #fff;
  border: 1px solid #dfe5ec;
  border-radius: 8px;
}

.config-mode-option strong,
.config-mode-option small {
  display: block;
}

.config-mode-option strong {
  color: #111827;
}

.config-mode-option small,
.config-env-key {
  color: #667085;
}

.config-field-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.config-field {
  min-width: 0;
}

.config-field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 1.55rem;
  gap: .5rem;
  margin-bottom: .35rem;
}

.config-field-head .form-label {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.config-field .form-control,
.config-field .input-group {
  min-height: 2.35rem;
}

.config-field-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 1.25rem;
  gap: .5rem;
  margin-top: .35rem;
}

.config-env-key {
  display: block;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  font-size: .72rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.config-secret-state {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: .25rem;
  max-width: 48%;
  padding: .18rem .5rem;
  overflow: hidden;
  font-size: .68rem;
  font-weight: 700;
  line-height: 1.2;
  color: #067647;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: #ecfdf3;
  border: 1px solid #abefc6;
  border-radius: 999px;
}

.config-secret-state .bi {
  flex: 0 0 auto;
  font-size: .62rem;
}

.config-secret-state.is-empty {
  color: #667085;
  background: #fff;
  border-color: #dfe5ec;
}

.config-field-hint {
  flex: 0 0 auto;
  font-size: .72rem;
  font-weight: 600;
  color: #667085;
  white-space: nowrap;
}

.config-actions {
  display: flex;
  justify-content: flex-end;
  padding: 1rem 0 0;
}

@media (max-width: 767.98px) {
  .ops-page {
    padding: 1rem;
  }

  .ops-header,
  .ops-panel-header {
    align-items: stretch;
    flex-direction: column;
  }

  .ops-primary-action,
  .ops-pagination {
    width: 100%;
  }

  .config-mode-grid {
    grid-template-columns: 1fr;
  }

  .config-field-grid {
    grid-template-columns: 1fr;
  }

  .config-actions {
    justify-content: stretch;
  }

  .ops-pagination {
    justify-content: flex-start;
    overflow-x: auto;
  }
}
