/* ============================================================
   MAHI TECH SERVICES — Login modal styles
   Bootstrap-compatible subset used by my1jo.js / my1jp.js.
   Scoped to .modal so the rest of the site is untouched.
   ============================================================ */

/* ---------- modal shell ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: none;
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  outline: 0;
  font-family: var(--font, "Poppins", "Segoe UI", Tahoma, sans-serif);
}

.modal.show { display: block; }

.modal.fade .modal-dialog {
  transition: transform 0.3s ease-out;
  transform: translateY(-30px);
}

.modal.show .modal-dialog { transform: none; }

.modal-dialog {
  position: relative;
  width: auto;
  max-width: 520px;
  margin: 1.75rem auto;
  pointer-events: none;
}

.modal-dialog-scrollable { height: calc(100% - 3.5rem); }

.modal-content {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  pointer-events: auto;
  background-color: #f8fafc;
  border: 0 !important;
  border-radius: 0.65rem;
  outline: 0;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2990;
  background-color: #000;
}

.modal-backdrop.fade { opacity: 0; transition: opacity 0.15s linear; }
.modal-backdrop.show { opacity: 0.58; }

/* my1e3 wraps every modal's content in this scrollable body */
.modal-content > .modal-body {
  position: relative;
  padding: 0;
  max-height: 95vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  color: #1f2937;
  border-bottom: 1px solid #e5e7eb;
  border-top-left-radius: 0.65rem;
  border-top-right-radius: 0.65rem;
}

.modal-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.9rem 1.25rem;
  border-top: 1px solid #e5e7eb;
  border-bottom-left-radius: 0.65rem;
  border-bottom-right-radius: 0.65rem;
}

.modal-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.3;
  color: #1f2937;
}

/* Title + small action button (e.g. Logout) on one line */
.modal-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* inner modal body (alert / user info modals) */
.modal-body .modal-body { padding: 1.25rem; color: #1f2937; }

/* ---------- card used by the login forms ---------- */
.modal .card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  word-wrap: break-word;
  background: #ffffff;
  background-clip: border-box;
  border: 0;
  border-radius: 0.65rem;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

.modal .card::before { display: none !important; }

.modal .card:hover {
  transform: none;
  background: #ffffff;
  border-color: transparent;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

.modal .card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: #f3f4f6;
  border-bottom: 1px solid #e5e7eb;
  border-radius: 0;
}

.modal .card-header .card-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.3;
}

.modal .card-body {
  flex: 1 1 auto;
  padding: 1.25rem;
  color: #1f2937;
  background: #ffffff;
}

.modal .card-body p,
.modal .card-body h5,
.modal .card-body h6,
.modal .card-body .form-label,
.modal .card-body .form-check-label {
  color: #1f2937;
}

.modal .container {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

/* ---------- buttons ---------- */
.modal .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.48rem 0.95rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
  text-align: center;
  text-decoration: none;
  vertical-align: middle;
  cursor: pointer;
  user-select: none;
  border: 1px solid transparent;
  border-radius: 0.4rem;
  box-shadow: none;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.modal .btn:hover { transform: none; }
.modal .btn:disabled,
.modal .btn.disabled { opacity: 0.6; cursor: not-allowed; box-shadow: none; transform: none; }
.modal .btn-sm { padding: 0.3rem 0.6rem; font-size: 0.82rem; border-radius: 0.35rem; }

.modal .btn-primary {
  color: #04102b;
  background-color: var(--cyan, #01acf8);
  border-color: var(--cyan, #01acf8);
}
.modal .btn-primary:hover,
.modal .btn-primary:focus {
  color: #04102b;
  background-color: var(--cyan-soft, #4fc9ff);
  border-color: var(--cyan-soft, #4fc9ff);
}

.modal .btn-secondary { color: #fff; background-color: #6c757d; border-color: #6c757d; }
.modal .btn-secondary:hover { color: #fff; background-color: #5c636a; border-color: #565e64; }

/* Transport Department — deliberately different from the other
   account actions, which all use the cyan .btn-primary. */
.modal .btn-transport {
  color: #ffffff;
  background-color: #7c3aed;
  border-color: #7c3aed;
}
.modal .btn-transport:hover,
.modal .btn-transport:focus {
  color: #ffffff;
  background-color: #6d28d9;
  border-color: #6d28d9;
}

.modal .btn-danger { color: #fff; background-color: #dc3545; border-color: #dc3545; }
.modal .btn-danger:hover { color: #fff; background-color: #bb2d3b; border-color: #b02a37; }

.modal .btn-warning { color: #212529; background-color: #ffc107; border-color: #ffc107; }
.modal .btn-warning:hover { color: #212529; background-color: #ffca2c; border-color: #ffc720; }

.modal .btn-outline-primary {
  color: var(--cyan, #01acf8);
  background-color: transparent;
  border-color: var(--cyan, #01acf8);
}
.modal .btn-outline-primary:hover {
  color: #04102b;
  background-color: var(--cyan, #01acf8);
  border-color: var(--cyan, #01acf8);
}

.modal .btn-outline-secondary {
  color: #495057;
  background-color: #ffffff;
  border-color: #6c757d;
}
.modal .btn-outline-secondary:hover { color: #fff; background-color: #6c757d; border-color: #6c757d; }

.modal .btn-outline-danger {
  color: #dc3545;
  background-color: transparent;
  border-color: #dc3545;
}
.modal .btn-outline-danger:hover { color: #fff; background-color: #dc3545; border-color: #dc3545; }

.modal .btn-close {
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  margin: 0;
  color: #212529;
  font-size: 1.6rem;
  line-height: 1;
  background: transparent;
  border: 0;
  border-radius: 0.25rem;
  opacity: 0.8;
  cursor: pointer;
}
.modal .btn-close::before { content: "\00d7"; display: block; }
.modal .btn-close:hover { opacity: 1; }

/* ---------- forms ---------- */
.modal .form-label {
  display: inline-block;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: #374151;
}

.modal .form-check-label {
  display: inline-block;
  color: #374151;
  font-size: 0.9rem;
  cursor: pointer;
}

.modal .form-control,
.modal .form-select {
  display: block;
  width: 100%;
  height: auto;
  padding: 0.48rem 0.7rem;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.5;
  color: #111827;
  background-color: #ffffff;
  border: 1px solid #6c757d;
  border-radius: 0.375rem;
  outline: 0;
  box-shadow: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.modal textarea.form-control { min-height: 90px; }

.modal .form-control::placeholder { color: #9ca3af; opacity: 1; }

.modal .form-select {
  padding-right: 2.1rem;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 14px 10px;
}

.modal .form-text {
  margin-top: 0.25rem;
  font-size: 0.8rem;
  color: #6b7280;
}

.modal .input-group {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  width: 100%;
}

.modal .input-group.flex-nowrap { flex-wrap: nowrap; }
.modal .input-group > .form-control,
.modal .input-group > .form-select { flex: 1 1 auto; width: 1%; min-width: 0; }
.modal .input-group > .form-select { flex: 0 0 auto; width: auto; }
.modal .input-group > .btn { border-top-left-radius: 0; border-bottom-left-radius: 0; }

.modal .invalid-feedback {
  display: none;
  width: 100%;
  margin-top: 0.3rem;
  font-size: 0.85rem;
  color: #dc3545;
}
.modal .invalid-feedback:not(.d-none) { display: block; }

.modal input[type="file"].form-control { padding: 0.4rem 0.5rem; }

/* ---------- alerts ---------- */
.modal .alert {
  position: relative;
  padding: 0.7rem 0.9rem;
  margin-bottom: 0.85rem;
  font-size: 0.9rem;
  line-height: 1.45;
  border: 1px solid transparent;
  border-radius: 0.45rem;
}
.modal .alert-info { color: #055160; background-color: #cff4fc; border-color: #b6effb; }
.modal .alert-warning { color: #664d03; background-color: #fff3cd; border-color: #ffecb5; }
.modal .alert-success { color: #0f5132; background-color: #d1e7dd; border-color: #badbcc; }
.modal .alert-danger { color: #842029; background-color: #f8d7da; border-color: #f5c2c7; }

/* ---------- spinner ---------- */
.modal .spinner-border {
  display: inline-block;
  width: 2rem;
  height: 2rem;
  vertical-align: -0.125em;
  border: 0.25em solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: siteLoginSpin 0.75s linear infinite;
}
.modal .spinner-border-sm { width: 1rem; height: 1rem; border-width: 0.2em; }

@keyframes siteLoginSpin { to { transform: rotate(360deg); } }

/* ---------- utility classes used by my1jo / my1jp ---------- */
.modal .d-flex { display: flex !important; }
.modal .d-inline-flex { display: inline-flex !important; }
.modal .d-block { display: block !important; }
.modal .d-none { display: none !important; }
.modal .flex-row { flex-direction: row !important; }
.modal .flex-wrap { flex-wrap: wrap !important; }
.modal .flex-nowrap { flex-wrap: nowrap !important; }
.modal .justify-content-between { justify-content: space-between !important; }
.modal .justify-content-center { justify-content: center !important; }
.modal .align-items-center { align-items: center !important; }
.modal .gap-1 { gap: 0.25rem !important; }
.modal .gap-2 { gap: 0.5rem !important; }
.modal .w-100 { width: 100% !important; }
.modal .h-100 { height: 100% !important; }
.modal .position-relative { position: relative !important; }
.modal .position-absolute { position: absolute !important; }
.modal .m-0 { margin: 0 !important; }
.modal .p-0 { padding: 0 !important; }
.modal .mb-0 { margin-bottom: 0 !important; }
.modal .mb-1 { margin-bottom: 0.25rem !important; }
.modal .mb-2 { margin-bottom: 0.5rem !important; }
.modal .mb-3 { margin-bottom: 1rem !important; }
.modal .mb-4 { margin-bottom: 1.5rem !important; }
.modal .mt-1 { margin-top: 0.25rem !important; }
.modal .mt-2 { margin-top: 0.5rem !important; }
.modal .mt-3 { margin-top: 1rem !important; }
.modal .my-1 { margin-top: 0.25rem !important; margin-bottom: 0.25rem !important; }
.modal .ms-1 { margin-left: 0.25rem !important; }
.modal .ms-2 { margin-left: 0.5rem !important; }
.modal .me-1 { margin-right: 0.25rem !important; }
.modal .me-2 { margin-right: 0.5rem !important; }
.modal .ml-2 { margin-left: 0.5rem !important; }
.modal .ml-3 { margin-left: 1rem !important; }
.modal .pt-3 { padding-top: 1rem !important; }
.modal .text-center { text-align: center !important; }
.modal .text-end { text-align: right !important; }
.modal .text-muted { color: #6b7280 !important; }
.modal .text-primary { color: var(--cyan, #01acf8) !important; }
.modal .text-success { color: #198754 !important; }
.modal .text-danger { color: #dc3545 !important; }
.modal .text-white { color: #ffffff !important; }
.modal .text-decoration-none { text-decoration: none !important; }
.modal .text-uppercase { text-transform: uppercase !important; }
.modal .text-xs { font-size: 0.75rem !important; }
.modal .small { font-size: 0.875em !important; }
.modal .fw-bold { font-weight: 700 !important; }
.modal .bg-secondary { background-color: #6c757d !important; }
.modal .border { border: 1px solid #dee2e6 !important; }
.modal .border-dark { border-color: #212529 !important; }
.modal .border-top { border-top: 1px solid #dee2e6 !important; }
.modal .rounded-circle { border-radius: 50% !important; }

.modal .row {
  display: flex;
  flex-wrap: wrap;
  margin-right: -0.5rem;
  margin-left: -0.5rem;
}
.modal .row > [class*="col-"] {
  padding-right: 0.5rem;
  padding-left: 0.5rem;
}
.modal .row.g-2 { row-gap: 0.5rem; }
.modal .col-4 { flex: 0 0 auto; width: 33.333333%; }
.modal .col-6 { flex: 0 0 auto; width: 50%; }
.modal .col-8 { flex: 0 0 auto; width: 66.666667%; }

.modal hr {
  margin: 0.35rem 0;
  border: 0;
  border-top: 1px solid #e5e7eb;
  opacity: 1;
}

.modal .lo-pw-login {
  padding: 0.28rem 0.55rem;
  font-size: 0.8rem;
  color: #ffffff;
  background: transparent;
  border: 1px solid #ffffff;
  border-radius: 0.35rem;
}

/* ============================================================
   Visitors data modal (Account -> Check visitors data)
   ============================================================ */
.modal-dialog.modal-visitors {
  max-width: 1040px;
  width: calc(100% - 2rem);
}

.visitors-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #e5e7eb;
  background: #ffffff;
  border-top-left-radius: 0.65rem;
  border-top-right-radius: 0.65rem;
}

.visitors-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
  color: #1f2937;
}

.visitors-meta {
  margin: 0.2rem 0 0;
  font-size: 0.82rem;
  color: #4b5563;
}

#visitorsContent {
  padding: 1rem 1.25rem;
  color: #1f2937;
}

#candidatesContent {
  padding: 1rem 1.25rem;
  background: #f1f5f9;
  color: #0f172a;
}

.visitors-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.85rem 1.25rem;
  border-top: 1px solid #e5e7eb;
  background: #f8fafc;
  border-bottom-left-radius: 0.65rem;
  border-bottom-right-radius: 0.65rem;
}

.visitors-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.visitors-stat {
  padding: 0.75rem 0.9rem;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 0.55rem;
}

.visitors-stat span {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #6b7280;
}

.visitors-stat b {
  display: block;
  margin-top: 0.15rem;
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.2;
  color: #0256c9;
}

.visitors-block {
  margin-bottom: 1.1rem;
}

.visitors-block h4,
.visitors-list h4 {
  margin: 0 0 0.55rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #1f2937;
}

.visitors-bars {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.visitors-bar {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.82rem;
}

.visitors-bar-label {
  color: #6b7280;
  white-space: nowrap;
}

.visitors-bar-track {
  display: block;
  height: 10px;
  overflow: hidden;
  background: #eef2f7;
  border-radius: 999px;
}

.visitors-bar-track > span {
  display: block;
  height: 100%;
  min-width: 2px;
  background: linear-gradient(90deg, #01acf8, #0256c9);
  border-radius: 999px;
}

.visitors-bar b {
  min-width: 96px;
  text-align: right;
  font-weight: 600;
  color: #1f2937;
}

.visitors-bar b em {
  font-style: normal;
  font-weight: 400;
  color: #6b7280;
}

.visitors-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem 1.4rem;
  margin-bottom: 1.1rem;
}

.visitors-list ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.visitors-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.32rem 0;
  border-bottom: 1px solid #eef2f7;
  font-size: 0.83rem;
}

.visitors-list li:last-child { border-bottom: 0; }

.visitors-list li span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #374151;
}

.visitors-list li b {
  flex: 0 0 auto;
  font-weight: 600;
  color: #0256c9;
}

.visitors-empty,
.visitors-note {
  margin: 0;
  font-size: 0.8rem;
  color: #6b7280;
}

.visitors-note { margin-top: 0.75rem; }

.visitors-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 3rem 1rem;
  color: #6b7280;
  font-size: 0.9rem;
}

.visitors-spinner {
  width: 2.2rem;
  height: 2.2rem;
  border: 3px solid #e5e7eb;
  border-top-color: #0256c9;
  border-radius: 50%;
  animation: siteLoginLoaderSpin 0.8s linear infinite;
}

.visitors-error {
  padding: 1rem;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 0.55rem;
}

.visitors-error h4 {
  margin: 0 0 0.4rem;
  font-size: 1rem;
  color: #9a3412;
}

.visitors-error p {
  margin: 0 0 0.5rem;
  font-size: 0.86rem;
  color: #7c2d12;
}

.visitors-error details {
  margin-top: 0.5rem;
  font-size: 0.78rem;
  color: #7c2d12;
}

.visitors-error details ul {
  margin: 0.4rem 0 0;
  padding-left: 1.1rem;
}

.visitors-error code {
  word-break: break-all;
  font-size: 0.75rem;
  color: #7c2d12;
}

.visitors-table-wrap {
  overflow-x: auto;
  border: 1px solid #e5e7eb;
  border-radius: 0.55rem;
  background: #ffffff;
}

.visitors-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  white-space: nowrap;
}

.visitors-table th,
.visitors-table td {
  padding: 0.5rem 0.7rem;
  text-align: left;
  border-bottom: 1px solid #eef2f7;
}

.visitors-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6b7280;
  background: #f3f4f6;
}

.visitors-table tbody tr:last-child td { border-bottom: 0; }
.visitors-table tbody tr:hover { background: #f8fafc; }

.visitors-table td:nth-child(3) {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.visitors-table td:nth-child(6) {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.visitors-status {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: #065f46;
  background: #d1fae5;
  border-radius: 0.3rem;
}

.visitors-badge {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #92400e;
  background: #fef3c7;
  border-radius: 0.3rem;
}

@media (max-width: 767px) {
  .modal-dialog.modal-visitors {
    width: calc(100% - 1rem);
    margin: 0.5rem auto;
  }
  .visitors-grid { grid-template-columns: 1fr; }
  .visitors-bar { grid-template-columns: 58px 1fr auto; }
  .visitors-bar b { min-width: 80px; }
}

/* ============================================================
   Transport Department modal (Account -> Transport Department)
   ============================================================ */
.modal-dialog.modal-transport {
  max-width: 96vw;
  width: 96vw;
}

.transport-table td,
.transport-table th {
  white-space: nowrap;
}

.transport-table td {
  color:#000;
  vertical-align: middle;
}

/* Undo the visitors-table ellipsis columns for the register. */
.transport-table td:nth-child(3),
.transport-table td:nth-child(6) {
  max-width: none;
  overflow: visible;
  text-overflow: clip;
}

.transport-photo-cell {
  padding: 0.35rem 0.5rem !important;
}

.transport-photo {
  display: block;
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  background: #f3f4f6;
  cursor: zoom-in;
}

.transport-photo-empty {
  display: inline-block;
  width: 52px;
  text-align: center;
  color: #9ca3af;
}

.transport-lightbox {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: rgba(5, 5, 23, 0.85);
  cursor: zoom-out;
}

.transport-lightbox img {
  max-width: 92vw;
  max-height: 92vh;
  border-radius: 0.5rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  background: #ffffff;
}

@media (max-width: 767px) {
  .modal-dialog.modal-transport {
    width: calc(100% - 1rem);
    margin: 0.5rem auto;
  }
}

/* Table viewport: keep the horizontal scrollbar at the bottom of the
   visible table box instead of below all 50 rows. The header stays
   sticky because this box is now the scroll container. */
.transport-scroll {
  max-height: calc(95vh - 210px);
  overflow: auto;
  scrollbar-width: auto;
  scrollbar-color: #9ca3af #eef2f7;
}

.transport-scroll::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

.transport-scroll::-webkit-scrollbar-track {
  background: #eef2f7;
  border-radius: 6px;
}

.transport-scroll::-webkit-scrollbar-thumb {
  background: #9ca3af;
  border: 2px solid #eef2f7;
  border-radius: 6px;
}

.transport-scroll::-webkit-scrollbar-thumb:hover {
  background: #6b7280;
}

/* Amount cells stay blank until the code is entered. */
.transport-secret {
  cursor: pointer;
}

.transport-secret:not(.is-revealed):not(.is-editing):hover {
  background: #f8fafc;
}

.transport-secret.is-revealed,
.transport-secret.is-editing {
  cursor: default;
}

.transport-amount-inner {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.3rem;
}

.transport-amount-value {
  min-width: 42px;
  text-align: right;
}

/* Small pencil / cancel controls. */
.transport-amount-edit,
.transport-amount-cancel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  font-size: 0.72rem;
  line-height: 1;
  cursor: pointer;
  background: transparent;
  border: 0;
  border-radius: 4px;
}

.transport-amount-edit {
  color: #6b7280;
}

.transport-amount-edit:hover,
.transport-amount-edit:focus {
  color: #111827;
  background: #eef2f7;
}

.transport-amount-cancel {
  color: #6b7280;
}

.transport-amount-cancel:hover,
.transport-amount-cancel:focus {
  color: #dc3545;
  background: #fef2f2;
}

.transport-amount-edit:focus-visible,
.transport-amount-cancel:focus-visible {
  outline: 2px solid #7c3aed;
  outline-offset: 1px;
}

.transport-amount-save {
  padding: 0.18rem 0.5rem;
  font: inherit;
  font-size: 0.75rem;
  line-height: 1.3;
  color: #ffffff;
  cursor: pointer;
  background: #7c3aed;
  border: 1px solid #7c3aed;
  border-radius: 0.3rem;
}

.transport-amount-save:hover,
.transport-amount-save:focus {
  background: #6d28d9;
  border-color: #6d28d9;
}

.transport-amount-input {
  width: 6.5rem;
  max-width: 100%;
  padding: 0.22rem 0.4rem;
  font: inherit;
  color: inherit;
  text-align: right;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 0.3rem;
}

.transport-amount-input:focus {
  outline: none;
  border-color: #7c3aed;
  box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.15);
}

.transport-amount-cell.is-saving .transport-amount-input {
  opacity: 0.6;
}

.transport-amount-cell.is-saved {
  background: #ecfdf5;
}

.transport-amount-cell.is-error .transport-amount-input {
  border-color: #dc3545;
}

/* Password prompt for the two amount columns. */
.transport-password-overlay {
  position: fixed;
  inset: 0;
  z-index: 4100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(5, 5, 23, 0.6);
}

.transport-password-card {
  width: min(360px, 100%);
  padding: 1.25rem;
  font-family: var(--font, "Poppins", "Segoe UI", Tahoma, sans-serif);
  color: #111827;
  background: #ffffff;
  border-radius: 0.65rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.transport-password-card h4 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}

.transport-password-card p {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  color: #6b7280;
}

.transport-password-card input {
  width: 100%;
  padding: 0.55rem 0.65rem;
  font: inherit;
  letter-spacing: 0.2em;
  border: 1px solid #d1d5db;
  border-radius: 0.4rem;
}

.transport-password-card input:focus {
  outline: none;
  border-color: #7c3aed;
  box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.15);
}

.transport-password-error {
  min-height: 1.1rem;
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
  color: #dc3545;
}

.transport-password-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.9rem;
}

.transport-password-actions button {
  padding: 0.45rem 0.85rem;
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 0.4rem;
}

.transport-password-actions .tp-cancel {
  color: #495057;
  background: #ffffff;
  border-color: #6c757d;
}

.transport-password-actions .tp-submit {
  color: #ffffff;
  background: #7c3aed;
  border-color: #7c3aed;
}

.transport-password-actions .tp-submit:hover {
  background: #6d28d9;
  border-color: #6d28d9;
}

/* ============================================================
   Bootstrap account modals (iframe-safe)
   Mirrors the scoped style block injected by js/login-otp.js so
   the same modals also render correctly on the public pages.
   ============================================================ */
.site-account-modal .modal-dialog.modal-xl { max-width: 1140px; }
.site-account-modal .modal-dialog.modal-transport { width: 96vw; max-width: 96vw; }
.site-account-modal .modal-content { border: 0; box-shadow: 0 24px 70px rgba(0, 0, 0, 0.4); }
.site-account-modal .modal-header { background: #f8fafc; }
.site-account-modal .modal-title.text-success { color: #198754 !important; }
.site-account-modal .modal-title.text-danger { color: #dc3545 !important; }
.site-account-modal .modal-body { color: #0f172a; max-height: none; overflow-y: auto; padding: 1rem; }
.site-account-modal .modal-body.p-0 { padding: 0; }
.site-account-modal .modal-footer { background: #f8fafc; }

.site-account-modal .account-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  white-space: nowrap;
  --bs-table-bg: transparent;
  --bs-table-striped-bg: transparent;
  --bs-table-hover-bg: #f1f5f9;
}
.site-account-modal .account-data-table th,
.site-account-modal .account-data-table td {
  padding: 0.5rem 0.7rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid #f1f5f9;
}
.site-account-modal .account-data-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafc;
  color: #475569;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}
.site-account-modal .account-data-table tbody tr:nth-child(even) { background: #fbfdff; }
.site-account-modal .account-data-table tbody td { color: #0f172a; }
.site-account-modal .account-data-table tbody tr:hover { background: #f1f5f9; }

.site-account-modal .account-scroll {
  max-height: min(56vh, 620px);
  overflow: auto;
  scrollbar-width: auto;
  scrollbar-color: #94a3b8 #eef2f7;
}
.site-account-modal .transport-scroll { max-height: min(58vh, 640px); }
.site-account-modal .account-scroll::-webkit-scrollbar,
.site-account-modal .transport-scroll::-webkit-scrollbar { width: 12px; height: 12px; }
.site-account-modal .account-scroll::-webkit-scrollbar-track,
.site-account-modal .transport-scroll::-webkit-scrollbar-track { background: #eef2f7; border-radius: 6px; }
.site-account-modal .account-scroll::-webkit-scrollbar-thumb,
.site-account-modal .transport-scroll::-webkit-scrollbar-thumb { background: #94a3b8; border: 2px solid #eef2f7; border-radius: 6px; }
.site-account-modal .account-scroll::-webkit-scrollbar-thumb:hover,
.site-account-modal .transport-scroll::-webkit-scrollbar-thumb:hover { background: #64748b; }

.site-account-modal .btn-transport { color: #fff; background-color: #7c3aed; border-color: #7c3aed; }
.site-account-modal .btn-transport:hover,
.site-account-modal .btn-transport:focus,
.site-account-modal .btn-transport:active { color: #fff; background-color: #6d28d9; border-color: #6d28d9; }

.site-account-modal .transport-photo {
  display: block;
  width: 52px;
  height: 52px;
  object-fit: cover;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #f3f4f6;
  cursor: zoom-in;
}
.site-account-modal .transport-photo-empty { display: inline-block; width: 52px; text-align: center; color: #94a3b8; }
.site-account-modal .transport-secret { cursor: pointer; }
.site-account-modal .transport-secret:not(.is-revealed):not(.is-editing):hover { background: #f8fafc; }
.site-account-modal .transport-secret.is-revealed,
.site-account-modal .transport-secret.is-editing { cursor: default; }
.site-account-modal .transport-amount-inner { display: inline-flex; align-items: center; justify-content: flex-end; gap: 0.3rem; }
.site-account-modal .transport-amount-value { min-width: 42px; text-align: right; }
.site-account-modal .transport-amount-edit,
.site-account-modal .transport-amount-cancel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  font-size: 0.72rem;
  line-height: 1;
}
.site-account-modal .transport-amount-edit { color: #64748b; }
.site-account-modal .transport-amount-cancel { color: #dc3545; }
.site-account-modal .transport-amount-save {
  padding: 0.15rem 0.45rem;
  font-size: 0.75rem;
  line-height: 1.3;
  color: #fff;
  background: #7c3aed;
  border: 1px solid #7c3aed;
  border-radius: 0.3rem;
}
.site-account-modal .transport-amount-save:hover { background: #6d28d9; border-color: #6d28d9; }
.site-account-modal .transport-amount-input {
  width: 6.5rem;
  max-width: 100%;
  padding: 0.2rem 0.4rem;
  font: inherit;
  text-align: right;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 0.3rem;
}
.site-account-modal .transport-amount-input:focus { outline: 0; border-color: #7c3aed; box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.15); }
.site-account-modal .transport-amount-cell.is-saving .transport-amount-input { opacity: 0.6; }
.site-account-modal .transport-amount-cell.is-saved { background: #ecfdf5; }
.site-account-modal .transport-amount-cell.is-error .transport-amount-input { border-color: #dc3545; }

.site-account-modal .account-prompt { z-index: 1060; }
.site-account-modal .account-prompt .card { width: min(360px, 100%); }
.site-account-modal .transport-password-input { letter-spacing: 0.2em; }
.site-account-modal .tp-submit { color: #fff; background-color: #7c3aed; border-color: #7c3aed; }
.site-account-modal .tp-submit:hover { background-color: #6d28d9; border-color: #6d28d9; }

.site-account-modal .account-lightbox { z-index: 1080; }
.site-account-modal .account-lightbox img {
  max-width: 92vw;
  max-height: 92vh;
  border-radius: 0.5rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  background: #fff;
}
.site-account-modal .account-iframe { display: block; width: 100%; height: min(70vh, 760px); border: 0; background: #fff; }

@media (max-width: 767.98px) {
  .site-account-modal .modal-dialog.modal-transport { width: calc(100% - 1rem); max-width: calc(100% - 1rem); margin: 0.5rem auto; }
  .site-account-modal .account-scroll { max-height: 52vh; }
  .site-account-modal .transport-scroll { max-height: 54vh; }
  .site-account-modal .account-iframe { height: 65vh; }
}

