
/* phase20d-direct-admin-body-and-top-menu */

body.rs-admin-page {
  background: #f4f6fb !important;
  color: #111827;
  overflow-x: auto;
}

/* top navbar */
body.rs-admin-page .navbar {
  position: sticky;
  top: 0;
  z-index: 1050;
  background: #0d0622 !important;
  border-bottom: 0 !important;
  box-shadow: 0 4px 18px rgba(15, 23, 42, .18);
}

body.rs-admin-page .navbar a,
body.rs-admin-page .navbar .navbar-brand,
body.rs-admin-page .navbar .nav-link {
  color: #ffffff !important;
}

body.rs-admin-page .navbar .badge,
body.rs-admin-page .navbar .text-bg-success {
  background: #dcfce7 !important;
  color: #166534 !important;
}

/* direct admin quickbar */
.rs-admin-quickbar {
  position: sticky;
  top: 38px;
  z-index: 1040;
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  box-shadow: 0 6px 18px rgba(15, 23, 42, .08);
  padding: 9px 18px;
}

.rs-admin-quickbar-inner {
  width: 100%;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.rs-admin-quickbar a {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  border: 1px solid #dbe3ef;
  background: #f8fafc;
  color: #111827;
  border-radius: 999px;
  padding: 8px 13px;
  font-weight: 800;
  font-size: .88rem;
  line-height: 1;
}

.rs-admin-quickbar a:hover,
.rs-admin-quickbar a.rs-active {
  background: #0d6efd;
  border-color: #0d6efd;
  color: #ffffff;
}

/* page width */
body.rs-admin-page main,
body.rs-admin-page .container,
body.rs-admin-page .container-sm,
body.rs-admin-page .container-md,
body.rs-admin-page .container-lg,
body.rs-admin-page .container-xl,
body.rs-admin-page .container-xxl {
  width: 100% !important;
  max-width: none !important;
}

body.rs-admin-page main,
body.rs-admin-page .container,
body.rs-admin-page .container-fluid {
  padding-left: clamp(14px, 1.5vw, 28px) !important;
  padding-right: clamp(14px, 1.5vw, 28px) !important;
}

/* stock page: use more width */
body.rs-admin-page .card {
  border: 0 !important;
  border-radius: 18px !important;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .08) !important;
}

/* common Bootstrap row on stock page */
body.rs-admin-page .row {
  --bs-gutter-x: 1rem;
}

/* make first/stock column wider if Bootstrap grid is used */
body.rs-admin-page .row > .col-lg-8:first-child,
body.rs-admin-page .row > .col-md-8:first-child,
body.rs-admin-page .row > .col-xl-8:first-child {
  flex: 0 0 auto !important;
  width: 75% !important;
}

body.rs-admin-page .row > .col-lg-4:last-child,
body.rs-admin-page .row > .col-md-4:last-child,
body.rs-admin-page .row > .col-xl-4:last-child {
  flex: 0 0 auto !important;
  width: 25% !important;
}

/* table */
body.rs-admin-page .table-responsive,
body.rs-admin-page .rs-table-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  border-radius: 18px;
  background: #ffffff;
}

body.rs-admin-page table {
  width: 100% !important;
  max-width: 100% !important;
  margin-bottom: 0 !important;
  background: #ffffff;
  border-collapse: separate !important;
  border-spacing: 0 !important;
}

body.rs-admin-page thead th {
  background: #f8fafc !important;
  color: #334155;
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  border-bottom: 1px solid #e5e7eb !important;
  white-space: nowrap;
}

body.rs-admin-page tbody td,
body.rs-admin-page thead th {
  padding: 10px 12px !important;
  vertical-align: top !important;
}

body.rs-admin-page tbody tr:nth-child(even) {
  background: #f8fafc;
}

body.rs-admin-page tbody tr.table-secondary,
body.rs-admin-page tbody tr.bg-secondary,
body.rs-admin-page tbody tr[class*="secondary"] {
  background: #eef2f7 !important;
}

/* compact adjustment area */
body.rs-admin-page table td:last-child,
body.rs-admin-page table th:last-child {
  min-width: 360px;
  max-width: 430px;
}

body.rs-admin-page table td:last-child form {
  display: grid !important;
  grid-template-columns: 70px minmax(140px, 1fr) 120px;
  gap: 6px 8px;
  align-items: end;
  min-width: 340px;
}

body.rs-admin-page table td:last-child label {
  font-size: .75rem;
  font-weight: 800;
  margin-bottom: 2px;
}

body.rs-admin-page table td:last-child small,
body.rs-admin-page table td:last-child .form-text,
body.rs-admin-page table td:last-child .text-muted {
  grid-column: 1 / -1;
  font-size: .72rem !important;
  line-height: 1.2;
  margin-top: -3px;
}

body.rs-admin-page table td:last-child .form-control,
body.rs-admin-page table td:last-child input,
body.rs-admin-page table td:last-child textarea,
body.rs-admin-page table td:last-child select {
  width: 100% !important;
  max-width: 100% !important;
  border-radius: 10px !important;
  border-color: #cbd5e1 !important;
  font-size: .86rem;
  min-height: 36px;
}

body.rs-admin-page table td:last-child textarea {
  min-height: 36px !important;
  max-height: 50px !important;
  resize: vertical;
}

body.rs-admin-page table td:last-child button,
body.rs-admin-page table td:last-child .btn {
  width: 100%;
  border-radius: 999px !important;
  font-weight: 800;
  min-height: 36px;
  padding: 7px 10px;
}

body.rs-admin-page .badge {
  border-radius: 999px;
  padding: .36em .65em;
  font-weight: 700;
}

/* hide old floating admin menu by common fixed button patterns */
body.rs-admin-page [style*="position: fixed"] {
  max-width: 100vw;
}

/* mobile */
@media (max-width: 992px) {
  body.rs-admin-page .row > .col-lg-8:first-child,
  body.rs-admin-page .row > .col-md-8:first-child,
  body.rs-admin-page .row > .col-xl-8:first-child,
  body.rs-admin-page .row > .col-lg-4:last-child,
  body.rs-admin-page .row > .col-md-4:last-child,
  body.rs-admin-page .row > .col-xl-4:last-child {
    width: 100% !important;
  }

  body.rs-admin-page table {
    min-width: 1050px;
  }

  .rs-admin-quickbar {
    top: 38px;
    padding: 8px 10px;
  }

  .rs-admin-quickbar a {
    padding: 8px 11px;
    font-size: .84rem;
  }
}
