.mock-file-list li {
  font-size: 13px;
}

.vd-attachment-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.vd-attachment-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f3f3f6;
}

.vd-attachment-name {
  font-size: 13px;
  color: rgba(0, 0, 0, 0.78);
  line-height: 1.35;
  min-width: 0;
  word-break: break-word;
}

.vd-attachment-download {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  margin-left: auto;
  font-size: 12px;
  font-weight: 600;
  color: #1976d2;
  text-decoration: none;
  white-space: nowrap;
}

.vd-attachment-download:hover {
  color: #1565c0;
}

.theme-dark .vd-attachment-row {
  background: rgba(255, 255, 255, 0.06);
}

.theme-dark .vd-attachment-name {
  color: rgba(255, 255, 255, 0.78);
}

.theme-dark .vd-attachment-download {
  color: #90caf9;
}

/* ── Bottom navigation clearance ──
   Add footer-clear to page-content on any page with #footer-bar. */
.page-content.footer-clear {
  padding-bottom: calc(90px + env(safe-area-inset-bottom, 0px));
}

#footer-bar a.nav-logout i {
  color: #d32f2f;
}

#footer-bar a.nav-logout span {
  color: #d32f2f;
}

.status-success {
  background: rgba(46, 125, 50, 0.12);
  color: #2e7d32;
}

/* ── App action buttons (canonical — use on every screen) ── */
.app-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  text-decoration: none;
  box-sizing: border-box;
}

.app-btn-full {
  display: flex;
  width: 100%;
}

.app-btn-primary {
  background: #1976d2;
  color: #fff;
  box-shadow: 0 2px 6px rgba(25, 118, 210, 0.28);
}

.app-btn-outline {
  background: #fff;
  color: #1976d2;
  border: 1.5px solid #1976d2 !important;
}

.theme-dark .app-btn-outline {
  background: transparent;
  color: #90caf9;
  border-color: #90caf9 !important;
}

.theme-dark .app-btn-primary {
  background: #1976d2;
  color: #fff;
}

.settings-page {
  font-family: "Roboto", system-ui, sans-serif;
}

.settings-page .ad-detail-root {
  padding: 0 15px;
}

.settings-profile-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.settings-profile-main {
  flex: 1;
  min-width: 0;
}

.settings-profile-edit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  margin-left: auto;
  border-radius: 12px;
  color: #1976d2;
  background: rgba(25, 118, 210, 0.08);
  text-decoration: none;
}

.settings-profile-edit i {
  font-size: 18px;
}

.settings-profile-edit:hover {
  background: rgba(25, 118, 210, 0.14);
  color: #1565c0;
}

.profile-edit-page {
  font-family: "Roboto", system-ui, sans-serif;
}

.profile-edit-root {
  padding: 0 15px;
}

.profile-edit-root .card.card-style {
  margin: 0;
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 2px 8px rgba(0, 0, 0, 0.08);
}

.profile-edit-root .ad-section-label {
  display: block;
  margin-bottom: 12px;
}

.profile-edit-root .ad-section-label + .visit-label {
  margin-top: 0;
}

.profile-edit-root .ad-section-label:not(:first-child) {
  margin-top: 4px;
}

.settings-avatar {
  width: 52px;
  height: 52px;
  font-size: 16px;
}

.settings-email {
  font-size: 12px;
  color: rgba(0, 0, 0, 0.52);
  margin-top: 4px;
}

.settings-field-value {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.settings-link-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  text-decoration: none;
  color: inherit;
  width: 100%;
  background: transparent;
  border-left: 0;
  border-right: 0;
  border-top: 0;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.settings-link-row:last-child {
  border-bottom: 0;
}

.settings-page .ad-detail-root > .card.card-style:last-child .content {
  margin-bottom: 20px !important;
}

.settings-link-row:first-child {
  padding-top: 0;
}

.settings-link-label {
  font-size: 14px;
  font-weight: 500;
  color: #1c1b1f;
}

.settings-link-row i.bi-chevron-right {
  color: rgba(0, 0, 0, 0.28);
  font-size: 14px;
  flex-shrink: 0;
}

.advanced-settings-page .visit-section-hint {
  margin-top: 0;
  margin-bottom: 14px;
}

.advanced-queue-total {
  font-size: 12px;
  color: rgba(0, 0, 0, 0.48);
}

.advanced-queue-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.advanced-queue-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.advanced-queue-row-main {
  min-width: 0;
  flex: 1;
}

.advanced-queue-type {
  font-size: 14px;
  font-weight: 600;
  color: #1c1b1f;
  word-break: break-word;
}

.advanced-queue-meta {
  font-size: 12px;
  color: rgba(0, 0, 0, 0.55);
  margin-top: 2px;
}

.advanced-queue-id {
  font-size: 11px;
  color: rgba(0, 0, 0, 0.38);
  margin-top: 4px;
  word-break: break-all;
}

.advanced-queue-row-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

.advanced-queue-when {
  font-size: 11px;
  color: rgba(0, 0, 0, 0.45);
  text-align: right;
  white-space: nowrap;
}

.advanced-queue-empty {
  margin: 4px 0 0;
  padding: 12px 0;
}

.kpi-section-head {
  padding: 0 15px;
  margin-bottom: 10px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  padding: 0 15px;
  margin-bottom: 30px;
  font-family: "Roboto", system-ui, sans-serif;
}

.kpi-grid .card.card-style {
  margin: 0;
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 2px 8px rgba(0, 0, 0, 0.08);
}

.kpi-card-full {
  grid-column: 1 / -1;
}

.kpi-grid .content {
  margin: 0 !important;
}

.kpi-tile {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.kpi-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 40px;
}

.kpi-label {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.01em;
  color: rgba(0, 0, 0, 0.62);
  flex: 1;
}

.kpi-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 22px;
}

.kpi-icon-blue {
  background: rgba(25, 118, 210, 0.12);
  color: #1976d2;
}

.kpi-icon-green {
  background: rgba(46, 125, 50, 0.12);
  color: #2e7d32;
}

.kpi-icon-red {
  background: rgba(211, 47, 47, 0.12);
  color: #d32f2f;
}

.kpi-value {
  font-size: 34px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
  color: #1c1b1f;
}

.theme-dark .kpi-label {
  color: rgba(255, 255, 255, 0.72);
}

.theme-dark .kpi-value {
  color: #e6e1e5;
}

/* ── Collection Queue (shared + variants) ── */

.queue-designs-page,
.queue-section {
  font-family: "Roboto", system-ui, sans-serif;
}

.queue-design-intro {
  padding: 0 15px 20px;
}

.queue-design-block {
  padding: 0 15px 36px;
}

.queue-design-label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #1976d2;
  margin-bottom: 4px;
}

.queue-design-desc {
  font-size: 13px;
  color: rgba(0, 0, 0, 0.55);
  margin-bottom: 12px;
}

.queue-section {
  padding: 0 15px 30px;
}

.queue-design-block .queue-section {
  padding-left: 0;
  padding-right: 0;
}

.queue-design-link {
  display: inline-block;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 500;
  color: #1976d2;
  text-decoration: none;
}

.queue-design-link:hover {
  text-decoration: underline;
}

.queue-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.queue-eyebrow {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #757575;
  margin-bottom: 0;
}

.queue-see-all {
  font-size: 13px;
  font-weight: 600;
  color: #1976d2;
  text-decoration: none;
  white-space: nowrap;
}

.queue-see-all:hover {
  text-decoration: underline;
}

.queue-title {
  font-size: 26px;
  font-weight: 600;
  line-height: 1.15;
  margin: 0;
  color: #1c1b1f;
}

.queue-search-md {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f3f3f6;
  border-radius: 14px;
  padding: 0 14px;
  height: 48px;
  margin-bottom: 14px;
}

.queue-search-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 2px 8px rgba(0, 0, 0, 0.08);
}

.queue-search-md i {
  color: rgba(0, 0, 0, 0.45);
  font-size: 16px;
}

.queue-search-md input {
  border: 0;
  background: transparent;
  width: 100%;
  font-size: 14px;
  outline: none;
  color: #1c1b1f;
}

.queue-search-md input::placeholder {
  color: rgba(0, 0, 0, 0.42);
}

.queue-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.queue-item {
  display: block;
  text-decoration: none;
  color: inherit;
}

.queue-item-name {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
  color: #1c1b1f;
}

.queue-item-sub {
  font-size: 12px;
  color: rgba(0, 0, 0, 0.52);
  margin-top: 2px;
}

.queue-item-address {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  font-size: 12px;
  line-height: 1.35;
  color: rgba(0, 0, 0, 0.52);
  margin-top: 4px;
}

.queue-item-address i {
  font-size: 12px;
  margin-top: 1px;
  flex-shrink: 0;
  color: rgba(0, 0, 0, 0.38);
}

.queue-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}

.avatar-pending {
  background: rgba(25, 118, 210, 0.14);
  color: #1976d2;
}

.avatar-ptp {
  background: rgba(245, 124, 0, 0.14);
  color: #ef6c00;
}

.avatar-broken {
  background: rgba(211, 47, 47, 0.14);
  color: #d32f2f;
}

.queue-status {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.status-pending {
  background: rgba(25, 118, 210, 0.12);
  color: #1976d2;
}

.status-ptp {
  background: rgba(245, 124, 0, 0.14);
  color: #ef6c00;
}

.status-broken {
  background: rgba(211, 47, 47, 0.12);
  color: #d32f2f;
}

.queue-amount {
  font-size: 14px;
  font-weight: 600;
  color: #1c1b1f;
}

.queue-amount-sm {
  font-size: 13px;
  font-weight: 600;
  color: #1c1b1f;
}

.queue-meta {
  font-size: 12px;
  color: rgba(0, 0, 0, 0.52);
}

.queue-chevron {
  color: rgba(0, 0, 0, 0.28);
  font-size: 14px;
}

/* A — Elevated Cards */
.queue-item-card {
  background: #fff;
  border-radius: 16px;
  padding: 14px 14px 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 2px 8px rgba(0, 0, 0, 0.08);
}

.queue-item-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.queue-item-main {
  flex: 1;
  min-width: 0;
}

.queue-item-bottom {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.queue-item-bottom .queue-meta {
  flex: 1;
}

/* Activity list — read-only cards (no detail navigation) */
.activity-item-card {
  cursor: default;
}

.activity-item-bottom {
  justify-content: space-between;
}

.activity-item-bottom .activity-card-meta {
  flex: 1;
}

.activity-time {
  font-size: 12px;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.52);
  white-space: nowrap;
}

.activity-card-summary {
  margin-top: 4px;
}

/* Notification list — read-only cards (no detail navigation) */
.notification-item-card {
  cursor: default;
}

.notification-unread {
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.06),
    0 2px 8px rgba(0, 0, 0, 0.08),
    inset 3px 0 0 #1976d2;
}

.notification-title-unread {
  font-weight: 700;
}

.notification-card-summary {
  margin-top: 4px;
}

/* B — Template list rows (inside card wrapper) */
.queue-b .queue-list.list-group {
  gap: 0;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 2px 8px rgba(0, 0, 0, 0.08);
}

.queue-b .list-group-item {
  border: 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.queue-b .list-group-item:last-child {
  border-bottom: 0;
}

/* C — Status rail */
.queue-rail-list {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 2px 8px rgba(0, 0, 0, 0.08);
  gap: 0;
}

.queue-item-rail {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 14px 14px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  border-left: 4px solid transparent;
}

.queue-item-rail:last-child {
  border-bottom: 0;
}

.queue-item-rail.status-pending {
  border-left-color: #1976d2;
}

.queue-item-rail.status-ptp {
  border-left-color: #ef6c00;
}

.queue-item-rail.status-broken {
  border-left-color: #d32f2f;
}

.queue-rail-body {
  flex: 1;
  padding-left: 12px;
}

.queue-rail-top,
.queue-rail-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.queue-rail-bottom {
  margin-top: 4px;
  font-size: 12px;
  color: rgba(0, 0, 0, 0.52);
}

.queue-status-text.status-pending { color: #1976d2; font-weight: 600; }
.queue-status-text.status-ptp { color: #ef6c00; font-weight: 600; }
.queue-status-text.status-broken { color: #d32f2f; font-weight: 600; }

.queue-item-rail .queue-chevron {
  margin-right: 12px;
}

/* D — Meta chips */
.queue-item-chips {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 2px 8px rgba(0, 0, 0, 0.08);
}

.queue-chip-body {
  flex: 1;
  min-width: 0;
}

.queue-chip-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.queue-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.queue-chip {
  font-size: 11px;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 8px;
  background: #f3f3f6;
  color: rgba(0, 0, 0, 0.62);
}

.queue-chip-amount {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.72);
}

/* E — Minimal touch list */
.queue-minimal-list {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 2px 8px rgba(0, 0, 0, 0.08);
  gap: 0;
}

.queue-item-minimal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 14px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.queue-item-minimal:last-child {
  border-bottom: 0;
}

.queue-minimal-main {
  flex: 1;
  min-width: 0;
}

.queue-minimal-side {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.theme-dark .queue-title,
.theme-dark .queue-item-name,
.theme-dark .queue-amount,
.theme-dark .queue-amount-sm {
  color: #e6e1e5;
}

.theme-dark .queue-eyebrow {
  color: #9e9e9e;
}

.theme-dark .queue-item-address {
  color: rgba(255, 255, 255, 0.58);
}

.theme-dark .queue-item-address i {
  color: rgba(255, 255, 255, 0.45);
}

.theme-dark .queue-search-md {
  background: rgba(255, 255, 255, 0.08);
}

.theme-dark .queue-search-card {
  background: #1e1e1e;
}

.theme-dark .queue-item-card,
.theme-dark .queue-b .queue-list.list-group,
.theme-dark .queue-rail-list,
.theme-dark .queue-item-chips,
.theme-dark .queue-minimal-list {
  background: #1e1e1e;
}

/* Collection Queue page */
.cq-filter-search {
  background: #f3f3f6;
  margin-bottom: 12px;
}

.cq-filter-close-btn {
  width: 36px;
  height: 36px;
  background: #d32f2f !important;
  color: #fff !important;
  border: none !important;
  border-radius: 10px;
  padding: 0 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px !important;
  line-height: 1 !important;
  box-shadow: none !important;
  flex-shrink: 0;
}

.theme-dark .cq-filter-close-btn {
  background: #c62828 !important;
  color: #fff !important;
}

.cq-filter-actions {
  display: flex;
  align-items: stretch;
  gap: 12px;
}

.cq-filter-action-btn {
  flex: 1;
  width: 50%;
  min-height: 48px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
}

.cq-filter-reset {
  background: #fff;
  color: #1976d2;
  border: 1.5px solid #1976d2 !important;
}

.cq-filter-apply {
  background: #1976d2;
  color: #fff;
  box-shadow: 0 2px 6px rgba(25, 118, 210, 0.28);
}

.theme-dark .cq-filter-reset {
  background: transparent;
  color: #90caf9;
  border-color: #90caf9 !important;
}

.theme-dark .cq-filter-apply {
  background: #1976d2;
  color: #fff;
}

.theme-dark .cq-filter-search {
  background: rgba(255, 255, 255, 0.08);
}

.cq-empty {
  text-align: center;
  padding: 28px 16px;
  font-size: 14px;
  color: rgba(0, 0, 0, 0.52);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 2px 8px rgba(0, 0, 0, 0.08);
}

.cq-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cq-filter-chip {
  margin: 0;
  cursor: pointer;
}

.cq-filter-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.cq-filter-chip span {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  background: #f3f3f6;
  color: rgba(0, 0, 0, 0.72);
  border: 1px solid transparent;
  transition: all 0.15s ease;
}

.cq-filter-chip input:checked + span {
  background: rgba(25, 118, 210, 0.12);
  color: #1976d2;
  border-color: rgba(25, 118, 210, 0.25);
}

.theme-dark .cq-empty {
  background: #1e1e1e;
  color: rgba(255, 255, 255, 0.58);
}

.theme-dark .cq-filter-chip span {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.78);
}

/* ── Account Detail ── */

.account-detail-page,
.ad-detail-root {
  font-family: "Roboto", system-ui, sans-serif;
}

.account-detail-designs-page {
  padding-bottom: 30px;
}

.ad-page-actions {
  position: relative;
  z-index: 2;
  padding: 0 15px 14px;
}

.ad-page-actions-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.ad-action-btn {
  display: flex;
  width: 100%;
  justify-content: center;
  box-sizing: border-box;
  min-height: 44px;
}

.ad-outline-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 12px;
  padding: 10px 14px;
  background: #fff;
  color: #1976d2;
  border: 1.5px solid #1976d2;
  box-shadow: none;
}

.ad-primary-btn-full {
  display: flex;
  width: 100%;
  justify-content: center;
  box-sizing: border-box;
}

.ad-history-sheet {
  max-height: 70vh;
  overflow-y: auto;
}

.ad-history-sheet .ad-history-list {
  gap: 0;
}

.ad-history-sheet .ad-history-item {
  margin-bottom: 0;
}

.ad-history-divider {
  margin: 14px 0;
}

.ad-link-btn,
.ad-primary-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 12px;
  padding: 10px 14px;
}

.ad-link-btn {
  color: #1976d2;
  background: rgba(25, 118, 210, 0.08);
}

.ad-primary-btn {
  color: #fff;
  background: #1976d2;
  box-shadow: 0 2px 6px rgba(25, 118, 210, 0.28);
}

.ad-detail-root {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 15px;
}

.ad-design-preview {
  padding-left: 0;
  padding-right: 0;
}

.ad-detail-root .card.card-style {
  margin: 0;
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 2px 8px rgba(0, 0, 0, 0.08);
}

.ad-detail-root .content {
  margin-left: 16px !important;
  margin-right: 16px !important;
}

.ad-hero-content {
  padding-top: 4px !important;
}

.ad-hero-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.ad-hero-main {
  flex: 1;
  min-width: 0;
}

.ad-hero-name {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.25;
  color: #1c1b1f;
}

.ad-hero-sub {
  font-size: 12px;
  color: rgba(0, 0, 0, 0.52);
  margin-top: 2px;
}

.ad-hero-bank {
  font-size: 12px;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.62);
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.ad-hero-status-row {
  margin-top: 10px;
}

.ad-hero-divider {
  margin: 14px 0 12px;
}

.ad-chip-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 0;
  margin-bottom: 12px;
}

.ad-chip {
  font-size: 11px;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 8px;
  background: #f3f3f6;
  color: rgba(0, 0, 0, 0.62);
}

.ad-chip-warn {
  background: rgba(211, 47, 47, 0.1);
  color: #d32f2f;
}

.ad-kpi-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.ad-kpi {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ad-kpi-label {
  font-size: 11px;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.52);
}

.ad-kpi-value {
  font-size: 14px;
  font-weight: 600;
  color: #1c1b1f;
  line-height: 1.2;
}

.ad-kpi-value-sm {
  font-size: 13px;
}

.ad-kpi-sub {
  font-size: 10px;
  color: rgba(0, 0, 0, 0.45);
}

.ad-ptp-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(245, 124, 0, 0.12);
  color: #ef6c00;
  font-size: 12px;
  font-weight: 600;
}

.ad-section-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #757575;
  margin-bottom: 12px;
}

.ad-mini-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #757575;
  margin-bottom: 8px;
}

.ad-field {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.ad-field:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.ad-field-label {
  font-size: 12px;
  color: rgba(0, 0, 0, 0.52);
  flex-shrink: 0;
  max-width: 42%;
}

.ad-field-value {
  font-size: 13px;
  font-weight: 500;
  color: #1c1b1f;
  text-align: right;
  line-height: 1.35;
}

.ad-phone-value {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  max-width: 100%;
}

.ad-phone-number {
  min-width: 0;
  word-break: break-word;
}

.ad-call-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: #1976d2;
  background: rgba(25, 118, 210, 0.1);
  text-decoration: none;
  line-height: 1;
}

.ad-call-link i {
  font-size: 13px;
}

.ad-call-link:hover,
.ad-call-link:focus-visible {
  color: #fff;
  background: #1976d2;
  outline: none;
}

.theme-dark .ad-call-link {
  color: #90caf9;
  background: rgba(144, 202, 249, 0.14);
}

.theme-dark .ad-call-link:hover,
.theme-dark .ad-call-link:focus-visible {
  color: #0d47a1;
  background: #90caf9;
}

.ad-remark {
  font-size: 13px;
  line-height: 1.45;
  color: rgba(0, 0, 0, 0.72);
  margin: 0;
  margin-top: 5%;
}

.ad-history-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ad-history-item {
  padding: 10px 12px;
  border-radius: 10px;
  background: #f3f3f6;
}

.ad-history-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ad-history-date {
  font-size: 12px;
  font-weight: 600;
  color: #1c1b1f;
}

.ad-history-body {
  font-size: 13px;
  line-height: 1.4;
  color: rgba(0, 0, 0, 0.72);
  margin-top: 4px;
}

.ad-history-meta {
  font-size: 11px;
  color: rgba(0, 0, 0, 0.45);
  margin-top: 4px;
}

.ad-history-tag {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 6px;
}

.ad-history-tag-active {
  background: rgba(245, 124, 0, 0.14);
  color: #ef6c00;
}

.ad-history-tag-broken {
  background: rgba(211, 47, 47, 0.12);
  color: #d32f2f;
}

.ad-history-tag-partial {
  background: rgba(25, 118, 210, 0.12);
  color: #1976d2;
}

.ad-history-empty {
  font-size: 13px;
  color: rgba(0, 0, 0, 0.45);
  padding: 8px 0;
}

.ad-collapse-summary {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ad-accordion .ad-acc-item {
  border: 0;
  border-radius: 16px !important;
  overflow: hidden;
  margin-bottom: 10px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 2px 8px rgba(0, 0, 0, 0.08);
}

.ad-accordion .accordion-button {
  font-size: 14px;
  font-weight: 600;
  padding: 14px 16px;
}

.ad-accordion .accordion-body {
  padding: 0 16px 14px;
}

.ad-tab-head-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.ad-nav-tabs {
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 4px;
}

.ad-nav-tabs .nav-link {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  color: rgba(0, 0, 0, 0.52);
  border: 0;
  padding: 8px 10px;
}

.ad-nav-tabs .nav-link.active {
  color: #1976d2;
  border-bottom: 2px solid #1976d2;
  background: transparent;
}

.ad-tab-panels {
  padding-top: 12px;
}

.ad-kv-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 0 12px;
}

.ad-kv-header .queue-status {
  margin-left: auto;
}

.ad-kv-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.ad-kv-card-wide {
  grid-column: 1 / -1;
}

.ad-snap-amount {
  font-size: 28px;
  font-weight: 600;
  color: #1c1b1f;
  margin-top: 8px;
  letter-spacing: -0.02em;
}

.ad-snap-meta {
  font-size: 12px;
  color: rgba(0, 0, 0, 0.52);
  margin-top: 4px;
}

.ad-snap-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.ad-snap-contacts {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.ad-snap-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #1976d2;
  text-decoration: none;
}

.ad-timeline {
  position: relative;
  padding-left: 18px;
}

.ad-timeline::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: rgba(0, 0, 0, 0.08);
}

.ad-timeline-item {
  position: relative;
  padding-bottom: 16px;
}

.ad-timeline-item:last-child {
  padding-bottom: 0;
}

.ad-timeline-dot {
  position: absolute;
  left: -18px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #1976d2;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.ad-timeline-ptp .ad-timeline-dot {
  background: #ef6c00;
}

.ad-timeline-payment .ad-timeline-dot {
  background: #2e7d32;
}

.ad-timeline-text {
  font-size: 13px;
  color: rgba(0, 0, 0, 0.72);
  margin-top: 2px;
}

.ad-timeline-meta {
  font-size: 11px;
  color: rgba(0, 0, 0, 0.45);
  margin-top: 2px;
}

.theme-dark .ad-hero-name,
.theme-dark .ad-kpi-value,
.theme-dark .ad-field-value,
.theme-dark .ad-snap-amount {
  color: #e6e1e5;
}

.theme-dark .ad-hero-bank {
  color: rgba(230, 225, 229, 0.78);
}

.theme-dark .ad-history-item {
  background: rgba(255, 255, 255, 0.06);
}

.theme-dark .ad-detail-root .card.card-style,
.theme-dark .ad-accordion .ad-acc-item {
  background: #1e1e1e;
}

.theme-dark .ad-outline-btn {
  background: transparent;
  color: #90caf9;
  border-color: #90caf9;
}

/* ── Record Visit Wizard ── */

.visit-update-page {
  padding: 0 15px calc(32px + env(safe-area-inset-bottom, 0px));
  font-family: "Roboto", system-ui, sans-serif;
}

.visit-wizard-shell {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.visit-wizard-nav-wrap {
  position: relative;
  margin-bottom: 40px;
}

.visit-wizard-nav {
  position: relative;
  z-index: 1;
  align-items: center;
  padding: 0 4px;
}

.visit-wizard-divider {
  z-index: 0;
  margin-top: -19px;
  margin-bottom: 0;
}

.visit-wizard-dot {
  border: 0;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
}

.visit-wizard-dot-done {
  cursor: pointer;
}

.visit-wizard-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.visit-wizard-card {
  margin: 0;
  min-height: 280px;
}

.visit-wizard-title {
  font-size: 18px;
  font-weight: 700;
  color: #1c1b1f;
  margin: 0 0 4px;
}

.visit-wizard-subtitle {
  font-size: 12px;
  color: rgba(0, 0, 0, 0.52);
  margin: 0 0 18px;
}

.visit-field-card {
  margin: 0;
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 2px 8px rgba(0, 0, 0, 0.08);
}

.visit-field-card .content {
  margin-left: 16px !important;
  margin-right: 16px !important;
}

.visit-section-hint {
  font-size: 12px;
  color: rgba(0, 0, 0, 0.52);
  margin: 0 0 14px;
  line-height: 1.4;
}

.visit-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #1c1b1f;
  margin-bottom: 8px;
}

.visit-required {
  color: #d32f2f;
}

.visit-control {
  font-size: 14px;
}

.visit-control[readonly] {
  background: #f3f3f6;
  color: rgba(0, 0, 0, 0.72);
}

.visit-radio-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.visit-radio-inline {
  flex-direction: row;
  gap: 20px;
}

.visit-radio {
  margin: 0;
  padding-left: 0;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.visit-radio .form-check-input {
  float: none;
  margin: 2px 0 0;
  flex-shrink: 0;
}

.visit-radio .form-check-label {
  font-size: 14px;
  line-height: 1.35;
  color: rgba(0, 0, 0, 0.78);
}

.visit-other-wrap {
  margin-top: 12px;
}

.visit-wizard-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.visit-wizard-btn {
  min-height: 48px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  border: 0;
}

.visit-wizard-btn-outline {
  background: #fff;
  color: #1976d2;
  border: 1px solid #1976d2;
}

.visit-wizard-actions .visit-wizard-btn-outline:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.visit-wizard-btn-primary {
  background: #1976d2;
  color: #fff;
  box-shadow: 0 2px 6px rgba(25, 118, 210, 0.28);
}

.visit-clear-btn {
  border: 0;
  background: transparent;
  color: #1976d2;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  padding: 4px 8px 0;
}

.visit-wizard-step .filepond--root {
  margin-bottom: 0;
  font-family: "Roboto", system-ui, sans-serif;
}

.visit-wizard-step .filepond--panel-root {
  background: #f3f3f6;
  border-radius: 12px;
}

.visit-wizard-step .filepond--drop-label {
  min-height: 72px;
  color: rgba(0, 0, 0, 0.62);
  font-size: 13px;
}

.visit-wizard-step .filepond--label-action {
  color: #1976d2;
  text-decoration-color: #1976d2;
}

.visit-wizard-step .filepond--item {
  margin-bottom: 8px;
}

.visit-wizard-step .filepond--image-preview-wrapper {
  border-radius: 10px;
  overflow: hidden;
}

.visit-submit-overlay {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(28, 27, 31, 0.42);
  backdrop-filter: blur(2px);
}

.visit-submit-overlay.d-none {
  display: none !important;
}

.visit-submit-overlay-card {
  width: min(100%, 280px);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
  padding: 28px 20px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}

.visit-submit-overlay-text {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #1c1b1f;
  line-height: 1.35;
}

body.visit-submit-busy {
  overflow: hidden;
}

.theme-dark .visit-wizard-title,
.theme-dark .visit-label,
.theme-dark .visit-radio .form-check-label {
  color: #e6e1e5;
}

.theme-dark .visit-control[readonly] {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.78);
}

.theme-dark .visit-field-card.card.card-style,
.theme-dark .visit-wizard-card.card.card-style {
  background: #1e1e1e;
}

.theme-dark .visit-wizard-btn-outline {
  background: transparent;
  color: #90caf9;
  border-color: #90caf9;
}

/* ── Visit History & Detail ── */

.visit-history-page {
  padding: 0 15px;
  font-family: "Roboto", system-ui, sans-serif;
}

.visit-history-context {
  margin: 0;
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 2px 8px rgba(0, 0, 0, 0.08);
}

.visit-history-context .content {
  margin-left: 16px !important;
  margin-right: 16px !important;
}

.vh-page {
  padding: 0;
}

.vh-page .queue-list {
  padding: 0;
}

.visit-record-card .visit-record-snippet {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.visit-code-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(25, 118, 210, 0.1);
  color: #1976d2;
  flex-shrink: 0;
}

.visit-detail-page {
  padding-bottom: calc(32px + env(safe-area-inset-bottom, 0px));
}

.visit-detail-root {
  padding-top: 0;
}

/* MFA setup (auth) — Duo card shell + QR / secret copy */
.mfa-qr-wrap {
  display: flex;
  justify-content: center;
}

.mfa-qr {
  width: 180px;
  height: 180px;
  padding: 12px;
  background: #fff;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-sizing: content-box;
}

.mfa-secret-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.mfa-secret-code {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 6px 10px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.04);
}

.mfa-copy-btn {
  border: 0;
  background: transparent;
  padding: 4px 6px;
  line-height: 1;
  cursor: pointer;
  color: inherit;
  opacity: 0.7;
}

.mfa-copy-btn:hover,
.mfa-copy-btn:focus {
  opacity: 1;
}

.mfa-copy-btn.is-copied {
  opacity: 1;
  color: #2e7d32;
}

.mfa-recovery-list {
  list-style: none;
  margin: 0;
  padding: 12px 16px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.04);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
}

.mfa-recovery-list li {
  padding: 4px 0;
}

