/* ===== DATABASE VIEW ===== */
.database-page {
  height: calc(var(--app-height, 100vh));
  display: flex;
  flex-direction: column;
  background: var(--bg-primary);
  overflow: hidden;
}

/* HEADER */
.database-header {
  width: 100%;
  background: var(--accent);
  padding: 15px 16px;
  border-radius: 0 0 30px 30px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
  color: var(--text-inverse);
  display: flex;
  align-items: center;
  gap: 12px;
}
.database-header span {
  font-size: 18px;
  font-weight: 700;
}
.database-back-btn {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  color: var(--text-inverse);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

/* LIST WRAPPER */
.database-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 14px 12px 100px;
  gap: 10px;
  box-sizing: border-box;
  min-height: 0;
}

/* KURIR ITEM */
.database-kurir-item {
  background: var(--customer-list, var(--bg-card));
  border-radius: 20px;
  padding: 12px 14px;
  transition: background 0.2s;
}
.database-kurir-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}
.database-kurir-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.database-kurir-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-icon-orange-bg, rgba(179, 135, 79, 0.15));
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  flex-shrink: 0;
}
.database-kurir-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.database-kurir-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.database-kurir-total {
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
}
.database-kurir-chevron {
  width: 18px;
  height: 18px;
  color: var(--text-secondary);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
.database-kurir-item.open .database-kurir-chevron {
  transform: rotate(180deg);
}

/* BREAKDOWN HARI (expand) */
.database-kurir-hari-list {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}
.database-kurir-item.open .database-kurir-hari-list {
  max-height: 400px;
  padding-top: 8px;
  margin-top: 8px;
  border-top: 1px dashed var(--border-color);
}
.database-hari-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 4px;
  font-size: 13px;
}
.database-hari-label {
  color: var(--text-secondary);
}
.database-hari-value {
  color: var(--text-primary);
  font-weight: 700;
}
.database-map-btn {
  width: 100%;
  height: 38px;
  margin-top: 10px;
  border: none;
  border-radius: 14px;
  background: var(--nav-fab-border);
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  font-family: "Poppins", sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: background 0.2s;
}
.database-map-btn svg {
  width: 16px;
  height: 16px;
}
.database-map-btn:active {
  background: var(--color-icon-orange-bg);
}

/* EMPTY / SKELETON */
.database-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-secondary);
  font-size: 14px;
}
.database-skeleton {
  padding: 0;
}
