/**
 * Portal publik DTSEN — layout login + list + wizard (web & mobile)
 */
.dtsen-page {
  --b900: #0f4c81;
  --b700: #138abf;
  --b600: #0f6d96;
  --b100: #d4eaf5;
  --b50: #eef6fb;
  --text: #1a2330;
  --muted: #64748b;
  --line: #e2e8f0;
  --surface: #f4f8fb;
  --card: #ffffff;
  --ok: #0f766e;
  --warn: #c2410c;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: Inter, system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--surface);
}

.dtsen-page *,
.dtsen-page *::before,
.dtsen-page *::after {
  box-sizing: border-box;
}

.dtsen-page[v-cloak],
[v-cloak] {
  display: none;
}

.dtsen-app {
  min-height: 100vh;
  min-height: 100dvh;
}

.dtsen-login-wrap {
  position: relative;
  z-index: 1;
}

/* Header app */
.dtsen-top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}

.dtsen-top__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dtsen-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.dtsen-brand img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.dtsen-brand strong {
  display: block;
  font-size: 15px;
  letter-spacing: -0.02em;
}

.dtsen-brand small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.dtsen-user {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.dtsen-user__meta {
  text-align: right;
  min-width: 0;
}

.dtsen-user__name {
  display: block;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}

.dtsen-user__wil {
  display: block;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

.dtsen-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

.dtsen-btn--ghost {
  background: var(--b50);
  color: var(--b600);
  border: 1px solid var(--b100);
}

.dtsen-btn--primary {
  background: var(--b700);
  color: #fff;
}

.dtsen-btn--primary:hover {
  background: var(--b600);
  color: #fff;
}

.dtsen-btn--ghost:hover {
  background: var(--b100);
}

.dtsen-btn--outline {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--line);
}

.dtsen-btn--danger {
  background: #fff;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.dtsen-main {
  padding: 16px 0 40px;
}

.dtsen-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}

.dtsen-stat {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  appearance: none;
  -webkit-appearance: none;
  font-family: inherit;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  cursor: pointer;
  color: inherit;
  min-width: 0;
}

.dtsen-stat:hover {
  border-color: var(--b100);
  background: var(--b50);
}

.dtsen-stat.is-active {
  border-color: var(--b700);
  background: var(--b50);
  box-shadow: 0 0 0 3px rgba(19, 138, 191, 0.12);
}

.dtsen-stat__icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.dtsen-stat--total .dtsen-stat__icon {
  background: #dbeafe;
  color: #1d4ed8;
}

.dtsen-stat--belum .dtsen-stat__icon {
  background: #f1f5f9;
  color: #475569;
}

.dtsen-stat--baru .dtsen-stat__icon {
  background: #dcfce7;
  color: #15803d;
}

.dtsen-stat--edit .dtsen-stat__icon {
  background: #ffedd5;
  color: #c2410c;
}

.dtsen-stat__body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.dtsen-stat__label {
  color: var(--muted);
  font-weight: 600;
  line-height: 1.2;
}

.dtsen-stat__value {
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
  min-height: 1.25em;
  display: flex;
  align-items: center;
}

.dtsen-stat__loader {
  display: inline-flex;
  align-items: center;
}

.dtsen-stat.is-loading {
  cursor: wait;
}

@keyframes dtsen-spin {
  to { transform: rotate(360deg); }
}

.dtsen-spinner {
  display: inline-block;
  width: 36px;
  height: 36px;
  border: 3px solid var(--b100);
  border-top-color: var(--b700);
  border-radius: 50%;
  animation: dtsen-spin 0.65s linear infinite;
}

.dtsen-spinner--sm {
  width: 18px;
  height: 18px;
  border-width: 2px;
}

.dtsen-spinner--xs {
  width: 12px;
  height: 12px;
  border-width: 2px;
}

.dtsen-search {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.dtsen-search input {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 15px;
  background: #fff;
}

.dtsen-search input:focus {
  outline: 0;
  border-color: var(--b700);
  box-shadow: 0 0 0 3px rgba(19, 138, 191, 0.12);
}

.dtsen-meta {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 12px;
  min-height: 1.4em;
}

.dtsen-meta__wait {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.dtsen-cards {
  display: grid;
  gap: 10px;
}

.dtsen-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  display: grid;
  gap: 8px;
}

.dtsen-card__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.dtsen-card__kk {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--b600);
}

.dtsen-card__name {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
}

.dtsen-card__addr {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}

.dtsen-card__foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.dtsen-card__actions,
.dtsen-table__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.dtsen-modal__sub {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.dtsen-modal--detail .dtsen-modal__panel {
  max-width: 820px;
}

.dtsen-detail-sec {
  margin-bottom: 20px;
}

.dtsen-detail-sec h4 {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

.dtsen-detail-grid {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.dtsen-detail-row {
  display: grid;
  grid-template-columns: minmax(0, 42%) minmax(0, 1fr);
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
}

.dtsen-detail-row dt {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

.dtsen-detail-row dd {
  margin: 0;
  font-size: 13px;
  color: #0f172a;
  word-break: break-word;
}

.dtsen-detail-art-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dtsen-detail-art {
  display: flex;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.dtsen-detail-art__thumb img,
.dtsen-detail-art__thumb .dtsen-art-row__placeholder {
  width: 52px;
  height: 52px;
}

.dtsen-detail-art__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12px;
  color: var(--muted);
}

.dtsen-detail-art__body strong {
  font-size: 14px;
  color: #0f172a;
}

.dtsen-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
}

.dtsen-badge--baru {
  background: #dbeafe;
  color: #1d4ed8;
}

.dtsen-badge--edit {
  background: #ffedd5;
  color: #c2410c;
}

.dtsen-badge--muted,
.dtsen-badge--belum {
  background: #f1f5f9;
  color: #64748b;
}

.dtsen-table-wrap {
  display: none;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: auto;
}

.dtsen-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.dtsen-table th,
.dtsen-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.dtsen-table th {
  background: var(--b50);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.dtsen-empty {
  text-align: center;
  padding: 40px 16px;
  color: var(--muted);
}

.dtsen-pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}

/* Wizard */
.dtsen-edit-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
}

.dtsen-edit-head h1 {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
}

.dtsen-edit-head p {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.dtsen-steps {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.dtsen-step {
  flex: 1 0 auto;
  min-width: 72px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 8px 6px;
  text-align: center;
  cursor: pointer;
}

.dtsen-step.is-active {
  border-color: var(--b700);
  background: var(--b50);
}

.dtsen-step.is-done {
  border-color: #99d4ea;
}

.dtsen-step__n {
  display: inline-flex;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  background: var(--line);
  color: var(--muted);
}

.dtsen-step.is-active .dtsen-step__n,
.dtsen-step.is-done .dtsen-step__n {
  background: var(--b700);
  color: #fff;
}

.dtsen-step__l {
  display: block;
  margin-top: 4px;
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  line-height: 1.2;
}

.dtsen-step.is-active .dtsen-step__l {
  color: var(--b600);
}

.dtsen-sec {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 12px;
}

.dtsen-sec h2 {
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 12px;
}

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

.dtsen-fg label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 4px;
}

.dtsen-fg .req {
  color: #e5693a;
}

.dtsen-fg input,
.dtsen-fg select,
.dtsen-fg textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 15px;
  background: #f8fafc;
}

.dtsen-fg input:focus,
.dtsen-fg select:focus,
.dtsen-fg textarea:focus {
  outline: 0;
  border-color: var(--b700);
  background: #fff;
}

.dtsen-fg input[readonly] {
  background: #eef2f6;
  color: #475569;
}

.dtsen-map {
  height: 240px;
  border-radius: 12px;
  border: 1px solid var(--line);
  margin-bottom: 10px;
}

.dtsen-nav {
  position: sticky;
  bottom: 0;
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid var(--line);
  padding: 10px 0;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  z-index: 15;
}

.dtsen-art-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dtsen-art-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.dtsen-art-row__thumb {
  flex-shrink: 0;
}

.dtsen-art-row__thumb img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line);
  background: #f8fafc;
}

.dtsen-art-row__placeholder,
.dtsen-art-foto__empty {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: #f1f5f9;
  color: #94a3b8;
}

.dtsen-art-foto__empty {
  width: 88px;
  height: 88px;
  border-radius: 12px;
  font-size: 28px;
}

.dtsen-art-foto {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.dtsen-art-foto__preview img {
  width: 88px;
  height: 88px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid var(--line);
  background: #f8fafc;
}

.dtsen-art-foto__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dtsen-art-foto__hint {
  flex: 1 1 100%;
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.dtsen-btn--disabled {
  opacity: 0.55;
  pointer-events: none;
}

.dtsen-art-row__info strong {
  display: block;
  font-size: 14px;
}

.dtsen-art-row__info span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.dtsen-art-row__actions {
  flex-shrink: 0;
}

.dtsen-btn--sm {
  padding: 6px 10px;
  font-size: 12px;
}

.dtsen-modal-open {
  overflow: hidden;
}

.dtsen-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}

.dtsen-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}

.dtsen-modal__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 720px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -8px 32px rgba(15, 23, 42, 0.18);
}

.dtsen-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--line);
}

.dtsen-modal__head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.dtsen-modal__close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: #f1f5f9;
  color: #334155;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.dtsen-modal__body {
  padding: 16px;
  overflow-y: auto;
  flex: 1;
}

.dtsen-modal__foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: #fff;
}

.dtsen-modal__spacer {
  flex: 1;
}

.dtsen-foto-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.dtsen-foto-item {
  position: relative;
  width: 88px;
}

.dtsen-foto-item img {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--line);
}

.dtsen-foto-item button {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 50%;
  background: rgba(185, 28, 28, 0.9);
  color: #fff;
  cursor: pointer;
}

.dtsen-alert {
  background: #fef3c7;
  color: #92400e;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 13px;
  margin-bottom: 10px;
}

.dtsen-loading {
  text-align: center;
  padding: 24px;
  color: var(--muted);
}

.dtsen-loading--list {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 48px 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.dtsen-loading .ti-loader-2 {
  display: inline-block;
  animation: dtsen-spin 0.65s linear infinite;
}

@media (min-width: 768px) {
  .dtsen-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
  }

  .dtsen-cards {
    display: none;
  }

  .dtsen-table-wrap {
    display: block;
  }

  .dtsen-grid {
    grid-template-columns: 1fr 1fr;
  }

  .dtsen-detail-grid {
    grid-template-columns: 1fr 1fr;
  }

  .dtsen-fg--full {
    grid-column: 1 / -1;
  }

  .dtsen-map {
    height: 320px;
  }

  .dtsen-step__l {
    font-size: 11px;
  }

  .dtsen-modal {
    align-items: center;
    padding: 24px 16px;
  }

  .dtsen-modal__panel {
    border-radius: 16px;
    max-height: 88vh;
  }

  .dtsen-user__name,
  .dtsen-user__wil {
    max-width: 280px;
  }
}
